@codecademy/gamut 68.6.2-alpha.1fc7ca.0 → 68.6.2-alpha.5eff58.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -67,19 +67,19 @@ export const CalendarBody = ({
67
67
  const containerEl = focusGridSync.calendarContainerRef.current;
68
68
  const focusInCalendarContainer = containerEl?.contains(activeEl) ?? false;
69
69
  const requested = focusGridSync.gridFocusRequested;
70
- const focusOnNavChevron = activeEl instanceof Element && activeEl.closest('[data-calendar-month-nav]') != null;
70
+ const focusOnNavChevron = activeEl instanceof Element && activeEl.closest('[data-calendar-month-nav]') !== null;
71
71
  if (!requested && (pauseGridRoving || focusOnNavChevron)) {
72
72
  return;
73
73
  }
74
74
 
75
75
  // Month navigation unmounts the active cell; focus often lands on <body>, the dialog shell,
76
76
  // or another non-grid node — not inside the container, so we must still sync.
77
- const focusLostFromCellUnmount = activeEl === document.body || activeEl === document.documentElement || activeEl instanceof HTMLElement && containerEl != null && containerEl.contains(activeEl) === false && activeEl.contains(containerEl);
77
+ const focusLostFromCellUnmount = activeEl === document.body || activeEl === document.documentElement || activeEl instanceof HTMLElement && containerEl?.contains(activeEl) === false && activeEl.contains(containerEl);
78
78
 
79
79
  // Sync DOM focus when: navigating inside this table; first focus from input (keyboard open);
80
80
  // focus is in the multi-month strip (cross-grid arrows); or focus was lost after the grid updated.
81
81
  // Do not pull focus from the input when the user opened with the mouse and never entered the surface.
82
- const shouldSyncFocus = inThisGrid || requested || focusInCalendarContainer || focusLostFromCellUnmount && containerEl != null;
82
+ const shouldSyncFocus = inThisGrid || requested || focusInCalendarContainer || focusLostFromCellUnmount && containerEl !== null;
83
83
  if (!shouldSyncFocus) return;
84
84
  const finish = success => {
85
85
  if (success && requested) {
@@ -24,7 +24,7 @@ export const DatePickerInputSegment = ({
24
24
  segments
25
25
  });
26
26
  const numericValue = parseSegmentNumericString(segments[field]);
27
- const ariaValue = segments[field].length > 0 && numericValue != null ? numericValue : undefined;
27
+ const ariaValue = segments[field].length > 0 && numericValue !== null ? numericValue : undefined;
28
28
  const display = segments[field].length > 0 ? segments[field] : getSegmentPlaceholder(field);
29
29
  const inputID = useId();
30
30
  const inputId = `datepicker-input-${inputID.replace(/:/g, '')}`;
@@ -66,7 +66,7 @@ export const DatePickerInput = /*#__PURE__*/forwardRef(({
66
66
  }, [segmentElRefs]);
67
67
  const shellRef = useCallback(el => {
68
68
  containerRef.current = el;
69
- if (typeof ref === 'function') ref(el);else if (ref != null) ref.current = el;
69
+ if (typeof ref === 'function') ref(el);else if (ref !== null) ref.current = el;
70
70
  }, [ref]);
71
71
  useEffect(() => {
72
72
  if (!isInputFocusedRef.current) {
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@codecademy/gamut",
3
3
  "description": "Styleguide & Component library for Codecademy",
4
- "version": "68.6.2-alpha.1fc7ca.0",
4
+ "version": "68.6.2-alpha.5eff58.0",
5
5
  "author": "Codecademy Engineering <dev@codecademy.com>",
6
6
  "dependencies": {
7
- "@codecademy/gamut-icons": "9.57.6-alpha.1fc7ca.0",
8
- "@codecademy/gamut-illustrations": "0.58.12-alpha.1fc7ca.0",
9
- "@codecademy/gamut-patterns": "0.10.31-alpha.1fc7ca.0",
10
- "@codecademy/gamut-styles": "18.0.1-alpha.1fc7ca.0",
11
- "@codecademy/variance": "0.26.2-alpha.1fc7ca.0",
7
+ "@codecademy/gamut-icons": "9.57.6-alpha.5eff58.0",
8
+ "@codecademy/gamut-illustrations": "0.58.12-alpha.5eff58.0",
9
+ "@codecademy/gamut-patterns": "0.10.31-alpha.5eff58.0",
10
+ "@codecademy/gamut-styles": "18.0.1-alpha.5eff58.0",
11
+ "@codecademy/variance": "0.26.2-alpha.5eff58.0",
12
12
  "@formatjs/intl-locale": "5.3.1",
13
13
  "@react-aria/interactions": "3.25.0",
14
14
  "@types/marked": "^4.0.8",