@codecademy/gamut
68.6.168.6.2-alpha.d829f9.0
~
Modified (4 files)
Index: package/dist/DatePicker/DatePickerCalendar/Calendar/CalendarBody.js
===================================================================
--- package/dist/DatePicker/DatePickerCalendar/Calendar/CalendarBody.js
+++ package/dist/DatePicker/DatePickerCalendar/Calendar/CalendarBody.js
@@ -66,21 +66,21 @@
const inThisGrid = tableRef.current?.contains(activeEl) ?? false;
const containerEl = focusGridSync.calendarContainerRef.current;
const focusInCalendarContainer = containerEl?.contains(activeEl) ?? false;
const requested = focusGridSync.gridFocusRequested;
- const focusOnNavChevron = activeEl instanceof Element && activeEl.closest('[data-calendar-month-nav]') != null;
+ const focusOnNavChevron = activeEl instanceof Element && activeEl.closest('[data-calendar-month-nav]') !== null;
if (!requested && (pauseGridRoving || focusOnNavChevron)) {
return;
}
// Month navigation unmounts the active cell; focus often lands on <body>, the dialog shell,
// or another non-grid node — not inside the container, so we must still sync.
- const focusLostFromCellUnmount = activeEl === document.body || activeEl === document.documentElement || activeEl instanceof HTMLElement && containerEl != null && containerEl.contains(activeEl) === false && activeEl.contains(containerEl);
+ const focusLostFromCellUnmount = activeEl === document.body || activeEl === document.documentElement || activeEl instanceof HTMLElement && containerEl?.contains(activeEl) === false && activeEl.contains(containerEl);
// Sync DOM focus when: navigating inside this table; first focus from input (keyboard open);
// focus is in the multi-month strip (cross-grid arrows); or focus was lost after the grid updated.
// Do not pull focus from the input when the user opened with the mouse and never entered the surface.
- const shouldSyncFocus = inThisGrid || requested || focusInCalendarContainer || focusLostFromCellUnmount && containerEl != null;
+ const shouldSyncFocus = inThisGrid || requested || focusInCalendarContainer || focusLostFromCellUnmount && containerEl !== null;
if (!shouldSyncFocus) return;
const finish = success => {
if (success && requested) {
focusGridSync.onGridFocusRequestHandled(); Index: package/dist/DatePicker/DatePickerInput/index.js
===================================================================
--- package/dist/DatePicker/DatePickerInput/index.js
+++ package/dist/DatePicker/DatePickerInput/index.js
@@ -65,9 +65,9 @@
segmentElRefs.current[field]?.focus();
}, [segmentElRefs]);
const shellRef = useCallback(el => {
containerRef.current = el;
- if (typeof ref === 'function') ref(el);else if (ref != null) ref.current = el;
+ if (typeof ref === 'function') ref(el);else if (ref !== null) ref.current = el;
}, [ref]);
useEffect(() => {
if (!isInputFocusedRef.current) {
setSegments(segmentsFromBound); Index: package/dist/DatePicker/DatePickerInput/Segment/index.js
===================================================================
--- package/dist/DatePicker/DatePickerInput/Segment/index.js
+++ package/dist/DatePicker/DatePickerInput/Segment/index.js
@@ -23,9 +23,9 @@
field,
segments
});
const numericValue = parseSegmentNumericString(segments[field]);
- const ariaValue = segments[field].length > 0 && numericValue != null ? numericValue : undefined;
+ const ariaValue = segments[field].length > 0 && numericValue !== null ? numericValue : undefined;
const display = segments[field].length > 0 ? segments[field] : getSegmentPlaceholder(field);
const inputID = useId();
const inputId = `datepicker-input-${inputID.replace(/:/g, '')}`;
const onKeyDown = useCallback(field => e => { Index: package/package.json
===================================================================
--- package/package.json
+++ package/package.json
@@ -1,15 +1,15 @@
{
"name": "@codecademy/gamut",
"description": "Styleguide & Component library for Codecademy",
- "version": "68.6.1",
+ "version": "68.6.2-alpha.d829f9.0",
"author": "Codecademy Engineering <[email protected]>",
"dependencies": {
- "@codecademy/gamut-icons": "9.57.5",
- "@codecademy/gamut-illustrations": "0.58.11",
- "@codecademy/gamut-patterns": "0.10.30",
- "@codecademy/gamut-styles": "18.0.0",
- "@codecademy/variance": "0.26.1",
+ "@codecademy/gamut-icons": "9.57.6-alpha.d829f9.0",
+ "@codecademy/gamut-illustrations": "0.58.12-alpha.d829f9.0",
+ "@codecademy/gamut-patterns": "0.10.31-alpha.d829f9.0",
+ "@codecademy/gamut-styles": "18.0.1-alpha.d829f9.0",
+ "@codecademy/variance": "0.26.2-alpha.d829f9.0",
"@formatjs/intl-locale": "5.3.1",
"@react-aria/interactions": "3.25.0",
"@types/marked": "^4.0.8",
"@vidstack/react": "^1.12.12",