@astryxdesign/core 0.7.1-canary.e199fa4 → 0.7.1-canary.e71c4e9

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.
Files changed (66) hide show
  1. package/dist/CommandPalette/CommandPalette.d.ts +6 -4
  2. package/dist/CommandPalette/CommandPalette.d.ts.map +1 -1
  3. package/dist/CommandPalette/CommandPalette.js +38 -20
  4. package/dist/CommandPalette/CommandPaletteEmpty.d.ts +4 -3
  5. package/dist/CommandPalette/CommandPaletteEmpty.d.ts.map +1 -1
  6. package/dist/CommandPalette/CommandPaletteEmpty.js +4 -3
  7. package/dist/CommandPalette/CommandPaletteInput.d.ts +5 -4
  8. package/dist/CommandPalette/CommandPaletteInput.d.ts.map +1 -1
  9. package/dist/CommandPalette/CommandPaletteInput.js +35 -18
  10. package/dist/CommandPalette/CommandPaletteList.d.ts +4 -2
  11. package/dist/CommandPalette/CommandPaletteList.d.ts.map +1 -1
  12. package/dist/CommandPalette/CommandPaletteList.js +9 -4
  13. package/dist/ContextMenu/ContextMenu.d.ts +3 -3
  14. package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
  15. package/dist/ContextMenu/ContextMenu.js +62 -48
  16. package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
  17. package/dist/DropdownMenu/DropdownMenu.js +140 -63
  18. package/dist/Layer/useLayerDismissal.d.ts +9 -9
  19. package/dist/Layer/useLayerDismissal.js +9 -9
  20. package/dist/MultiSelector/MultiSelector.d.ts +2 -1
  21. package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
  22. package/dist/Selector/Selector.d.ts +3 -3
  23. package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
  24. package/dist/i18n/generated-locales/en.generated.js +1 -0
  25. package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
  26. package/dist/i18n/generated-locales/pseudo.generated.js +1 -0
  27. package/dist/utils/plainDate.d.ts.map +1 -1
  28. package/dist/utils/plainDate.js +14 -5
  29. package/locales/en.json +5 -1
  30. package/locales/pseudo.json +3 -0
  31. package/package.json +3 -3
  32. package/src/Chat/ChatComposerInput.spec.md +86 -50
  33. package/src/CommandPalette/CommandPalette.doc.mjs +31 -1
  34. package/src/CommandPalette/CommandPalette.spec.md +96 -47
  35. package/src/CommandPalette/CommandPalette.test.tsx +241 -2
  36. package/src/CommandPalette/CommandPalette.tsx +44 -20
  37. package/src/CommandPalette/CommandPaletteEmpty.tsx +4 -3
  38. package/src/CommandPalette/CommandPaletteInput.doc.mjs +61 -4
  39. package/src/CommandPalette/CommandPaletteInput.spec.md +215 -0
  40. package/src/CommandPalette/CommandPaletteInput.test.tsx +375 -51
  41. package/src/CommandPalette/CommandPaletteInput.tsx +74 -21
  42. package/src/CommandPalette/CommandPaletteItem.test.tsx +7 -0
  43. package/src/CommandPalette/CommandPaletteList.doc.mjs +3 -3
  44. package/src/CommandPalette/CommandPaletteList.spec.md +41 -36
  45. package/src/CommandPalette/CommandPaletteList.test.tsx +67 -0
  46. package/src/CommandPalette/CommandPaletteList.tsx +9 -4
  47. package/src/CommandPalette/__tests__/CommandPalette.a11y.chromium.spec.ts +599 -0
  48. package/src/ComplexSelector/ComplexSelector.doc.mjs +1 -1
  49. package/src/ContextMenu/ContextMenu.doc.mjs +6 -0
  50. package/src/ContextMenu/ContextMenu.spec.md +51 -53
  51. package/src/ContextMenu/ContextMenu.test.tsx +132 -1
  52. package/src/ContextMenu/ContextMenu.tsx +78 -48
  53. package/src/DropdownMenu/DropdownMenu.doc.mjs +2 -2
  54. package/src/DropdownMenu/DropdownMenu.spec.md +73 -47
  55. package/src/DropdownMenu/DropdownMenu.test.tsx +239 -23
  56. package/src/DropdownMenu/DropdownMenu.tsx +189 -79
  57. package/src/DropdownMenu/__tests__/MenuHeaderFooter.a11y.chromium.spec.ts +40 -5
  58. package/src/Layer/useLayerDismissal.ts +9 -9
  59. package/src/MultiSelector/MultiSelector.doc.mjs +2 -2
  60. package/src/MultiSelector/MultiSelector.tsx +2 -1
  61. package/src/Selector/Selector.doc.mjs +2 -2
  62. package/src/Selector/Selector.tsx +3 -3
  63. package/src/i18n/generated-locales/en.generated.ts +1 -0
  64. package/src/i18n/generated-locales/pseudo.generated.ts +1 -0
  65. package/src/utils/plainDate.test.ts +99 -0
  66. package/src/utils/plainDate.ts +23 -5
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownMenu.d.ts","sourceRoot":"","sources":["../../src/DropdownMenu/DropdownMenu.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,EAOZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,EAAS,KAAK,WAAW,EAAC,MAAM,WAAW,CAAC;AAKnD,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,oBAAoB,CAAC;AAyB9D,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,kCAAkC,CAAC;AAI1C,OAAO,KAAK,EAAC,cAAc,EAAE,cAAc,EAAC,MAAM,mBAAmB,CAAC;AAStE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAmN5C;;;;;;;GAOG;AACH,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAChD,qBAAqB,EACnB,MAAM,GACN,SAAS,GACT,YAAY,GACZ,SAAS,GACT,aAAa,GACb,YAAY,GACZ,kBAAkB,GAClB,MAAM,GACN,QAAQ,GACR,KAAK,CACR;IACC;;;;;;OAMG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,6BAA6B;IAC7B,KAAK,EAAE,SAAS,CAAC;IACjB;;;;OAIG;IACH,KAAK,CAAC,EAAE,kBAAkB,EAAE,CAAC;CAC9B;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,SAAS,CAAC;IAChB,0E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CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC;IAE3B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B;;;;OAIG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,qBAAsB,SAAQ,qBAAqB;IAC3D;;;;;OAKG;IACH,YAAY,CAAC,EAAE,wBAAwB,CAAC;IACxC,KAAK,EAAE,kBAAkB,EAAE,CAAC;IAC5B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,UAAU,yBAA0B,SAAQ,qBAAqB;IAC/D,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,MAAM,iBAAiB,GAC3B,qBAAqB,GAAG,yBAAyB,CAAC;AA8pCpD,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBA4CpD;yBA5Ce,YAAY"}
@@ -83,6 +83,40 @@ const MENU_TRIGGER_OPEN_BACKGROUND = `linear-gradient(${colorVars['--color-overl
83
83
  * aria-hidden subtrees) are not reachable, judged by the popover focus trap's
84
84
  * own test so the two never disagree about where Tab can go.
85
85
  */
86
+ /**
87
+ * Collapse each named radio group to the one Tab stop a browser gives it: the
88
+ * focused radio, else the checked one, else the first radio moving forward or
89
+ * the last moving backward. The stop takes the group's first position.
90
+ */
91
+ function collapseRadioGroups(elements, active, isBackward) {
92
+ const groups = new Map();
93
+ const groupKey = el => el instanceof HTMLInputElement && el.getAttribute('type') === 'radio' && el.name !== '' ? `${el.form?.id ?? ''}\u0000${el.name}` : null;
94
+ for (const el of elements) {
95
+ const key = groupKey(el);
96
+ if (key != null) {
97
+ const members = groups.get(key) ?? [];
98
+ members.push(el);
99
+ groups.set(key, members);
100
+ }
101
+ }
102
+ const placed = new Set();
103
+ const result = [];
104
+ for (const el of elements) {
105
+ const key = groupKey(el);
106
+ if (key == null) {
107
+ result.push(el);
108
+ continue;
109
+ }
110
+ if (placed.has(key)) {
111
+ continue;
112
+ }
113
+ placed.add(key);
114
+ const members = groups.get(key) ?? [];
115
+ const stop = members.find(radio => radio === active) ?? members.find(radio => radio.checked) ?? (isBackward ? members[members.length - 1] : members[0]);
116
+ result.push(stop);
117
+ }
118
+ return result;
119
+ }
86
120
  function tabbablesIn(region) {
87
121
  if (region == null) {
88
122
  return [];
@@ -108,8 +142,9 @@ function isInsideHiddenWrapper(element, region) {
108
142
  }
109
143
 
110
144
  /**
111
- * Move focus to a region control. Reports whether focus actually arrived, so a
112
- * caller can close the menu instead of stranding focus on the page.
145
+ * Move focus to a Tab stop in the dialog. Reports whether focus actually
146
+ * arrived, so a caller can fall back to the menu instead of stranding focus on
147
+ * the page.
113
148
  */
114
149
  function focusRegionControl(element) {
115
150
  element.focus();
@@ -320,6 +355,16 @@ function visibleText(element) {
320
355
  for (const hidden of copy.querySelectorAll('[aria-hidden="true"]')) {
321
356
  hidden.remove();
322
357
  }
358
+ // An icon-only control is named by its image's alt, an inner aria-label, or
359
+ // an svg title rather than by text, so those count as its contents too.
360
+ for (const named of copy.querySelectorAll('img[alt], [aria-label]')) {
361
+ const name = named.getAttribute(named.tagName === 'IMG' ? 'alt' : 'aria-label') ?? '';
362
+ named.replaceWith(copy.ownerDocument.createTextNode(` ${name} `));
363
+ }
364
+ for (const svg of copy.querySelectorAll('svg')) {
365
+ const title = svg.querySelector('title')?.textContent ?? '';
366
+ svg.replaceWith(copy.ownerDocument.createTextNode(` ${title} `));
367
+ }
323
368
  return (copy.textContent ?? '').replace(/\s+/g, ' ').trim();
324
369
  }
325
370
 
@@ -343,6 +388,18 @@ function readAccessibleName(element) {
343
388
  if (label) {
344
389
  return label;
345
390
  }
391
+ // A form control is named by its own <label>s; an input button by its value.
392
+ const labels = 'labels' in element ? Array.from(element.labels ?? []) : [];
393
+ const labelText = labels.map(visibleText).join(' ').trim();
394
+ if (labelText !== '') {
395
+ return labelText;
396
+ }
397
+ if (element instanceof HTMLInputElement && ['button', 'submit', 'reset'].includes(element.getAttribute('type') ?? '')) {
398
+ const value = element.value.trim();
399
+ if (value !== '') {
400
+ return value;
401
+ }
402
+ }
346
403
  const text = visibleText(element);
347
404
  if (text !== '') {
348
405
  return text;
@@ -685,6 +742,16 @@ function DropdownMenuPopover({
685
742
  const openModalityRef = useRef('keyboard');
686
743
  // ArrowUp opens with the LAST enabled row highlighted.
687
744
  const focusLastOnOpenRef = useRef(false);
745
+
746
+ // Synchronizes the dialog's name from the custom trigger's DOM, an external
747
+ // system React does not own: the rendered control's accessible name is only
748
+ // readable once it mounts. With a header or footer the dialog is named like
749
+ // the menu, so that name is needed before the first open, not only at it.
750
+ useIsomorphicLayoutEffect(() => {
751
+ if (renderTrigger != null && hasRegions && triggerName == null) {
752
+ setTriggerName(readAccessibleName(buttonRef.current));
753
+ }
754
+ }, [renderTrigger, hasRegions, triggerName]);
688
755
  const handleLayerShow = useCallback(() => {
689
756
  acceptedOpenRef.current = true;
690
757
  resetFocusReturn();
@@ -700,15 +767,29 @@ function DropdownMenuPopover({
700
767
  setInternalIsOpen(true);
701
768
  }
702
769
  }, [isControlled, onClick, onOpenChange, renderTrigger, resetFocusReturn]);
770
+
771
+ // The menu's name: the dialog around it with a header or footer, and the
772
+ // Back row of a drilled-in view ("Back to <this>"), both read it.
773
+ // The design system's button names the menu by its label. A custom trigger
774
+ // names it by reference (or the caller's `aria-label` does), so that name
775
+ // is read off the control as the menu opens.
776
+ const callerMenuLabel = rest['aria-label'];
777
+ const menuLabel = renderTrigger != null ? typeof callerMenuLabel === 'string' && callerMenuLabel.trim() !== '' ? callerMenuLabel : triggerName : typeof button.label === 'string' ? button.label : undefined;
703
778
  const popover = usePopover({
704
779
  onHide: handleLayerHide,
705
780
  onShow: handleLayerShow,
706
781
  hasLightDismiss: true,
707
782
  hasCloseButton: false,
708
783
  hasAutoFocus: false,
709
- // The popup's own role="menu" is the exposed semantics; wrapping it in a
710
- // modal dialog would announce an unnamed dialog around the menu.
711
- role: 'none'
784
+ // Without a header or footer the popup's own role="menu" is the exposed
785
+ // semantics; a dialog around it would announce an extra container. With
786
+ // either, the popover holds controls that are not menu items, so it is a
787
+ // modal dialog named like the menu, with the menu inside it. A custom
788
+ // trigger's name is read off the control once it mounts; until then, or
789
+ // when the control exposes no readable name, the dialog takes the default
790
+ // menu label, so it is never unnamed and never loses its role.
791
+ role: hasRegions ? 'dialog' : 'none',
792
+ dialogLabel: hasRegions ? menuLabel ?? t(DEFAULT_BUTTON_I18N_KEY) : undefined
712
793
  });
713
794
  const closeMenu = useCallback(() => {
714
795
  popover.hide();
@@ -801,6 +882,42 @@ function DropdownMenuPopover({
801
882
  });
802
883
  }, [popover.isOpen, focusFirst, focusLast, listRef]);
803
884
 
885
+ // With a header or footer the popover is a modal dialog: Tab and Shift+Tab
886
+ // walk the header's controls, the menu as one stop, then the footer's
887
+ // controls, and wrap at either end. The key is handled here in full, so the
888
+ // popover's own focus trap, which listens on the document, never reads it a
889
+ // second time.
890
+ const moveDialogTab = useCallback((e, isFromFlyout = false) => {
891
+ const menu = listRef.current;
892
+ if (menu == null) {
893
+ return;
894
+ }
895
+ e.preventDefault();
896
+ e.stopPropagation();
897
+ // A named radio group is one stop, as the browser's own Tab order has it.
898
+ const cycle = collapseRadioGroups([...tabbablesIn(headerRef.current), menu, ...tabbablesIn(footerRef.current)], document.activeElement, e.shiftKey);
899
+ if (cycle.length === 1) {
900
+ // Nothing else to reach: focus stays in the menu. From a flyout that
901
+ // has just closed itself, that is the menu's own stop.
902
+ if (isFromFlyout) {
903
+ menu.focus();
904
+ }
905
+ return;
906
+ }
907
+ const active = document.activeElement;
908
+ const menuIndex = cycle.indexOf(menu);
909
+ // A row, or a row of an open flyout, counts as the menu's stop.
910
+ let index = menu.contains(active) ? menuIndex : cycle.findIndex(el => el === active || el.contains(active));
911
+ if (index < 0) {
912
+ index = menuIndex;
913
+ }
914
+ const step = e.shiftKey ? -1 : 1;
915
+ const next = cycle[(index + step + cycle.length) % cycle.length];
916
+ if (!focusRegionControl(next)) {
917
+ menu.focus();
918
+ }
919
+ }, [listRef]);
920
+
804
921
  // Extend useListFocus with Enter/Space activation + typeahead
805
922
  const listKeyDown = useCallback(e => {
806
923
  // A submenu flyout renders inline inside this menu; its key events bubble
@@ -810,16 +927,7 @@ function DropdownMenuPopover({
810
927
  // itself as the key bubbled up, and the root moves focus on as Tab
811
928
  // from one of its own rows would.
812
929
  if (e.key === 'Tab' && hasRegions) {
813
- const region = e.shiftKey ? headerRef.current : footerRef.current;
814
- const tabbables = tabbablesIn(region);
815
- e.stopPropagation();
816
- const target = e.shiftKey ? tabbables[tabbables.length - 1] : tabbables[0];
817
- if (target != null) {
818
- e.preventDefault();
819
- }
820
- if (target == null || !focusRegionControl(target)) {
821
- closeMenu();
822
- }
930
+ moveDialogTab(e, true);
823
931
  }
824
932
  return;
825
933
  }
@@ -838,30 +946,15 @@ function DropdownMenuPopover({
838
946
  }
839
947
  return;
840
948
  }
841
- // APG menu-button pattern: Tab closes the menu. Menu items are
842
- // tabIndex={-1} so the focus trap has nothing trappable and Tab would
843
- // otherwise leak into the page while the menu stayed open (menus-5).
844
- // Do NOT preventDefault — closing restores focus to the trigger, and the
845
- // browser's default Tab then continues from there to the next element.
846
- // A header or footer with something Tab can reach in that direction
847
- // takes the Tab instead, and the menu stays open.
949
+ // With a header or footer the popover is a dialog and Tab wraps inside
950
+ // it. Without either, the APG menu-button pattern: Tab closes the menu.
951
+ // Menu items are tabIndex={-1} so the focus trap has nothing trappable
952
+ // and Tab would otherwise leak into the page while the menu stayed open
953
+ // (menus-5). Do NOT preventDefault — closing restores focus to the
954
+ // trigger, and the browser's default Tab then continues from there.
848
955
  if (e.key === 'Tab') {
849
- const region = e.shiftKey ? headerRef.current : footerRef.current;
850
- const tabbables = tabbablesIn(region);
851
- if (tabbables.length > 0) {
852
- // From a row, the browser's Shift+Tab would stop on the menu element
853
- // itself — the row's ancestor and a Tab stop — before reaching the
854
- // header. The menu is one stop, so go straight to the header.
855
- if (e.shiftKey && e.target !== listRef.current) {
856
- e.preventDefault();
857
- // The popover's focus trap listens on the document and would read
858
- // this same Shift+Tab against the field just focused — the trap's
859
- // first element — and wrap to the footer. This key is handled.
860
- e.stopPropagation();
861
- if (!focusRegionControl(tabbables[tabbables.length - 1])) {
862
- closeMenu();
863
- }
864
- }
956
+ if (hasRegions) {
957
+ moveDialogTab(e);
865
958
  return;
866
959
  }
867
960
  closeMenu();
@@ -873,24 +966,14 @@ function DropdownMenuPopover({
873
966
  return;
874
967
  }
875
968
  listNavKeyDown(e);
876
- }, [listNavKeyDown, closeMenu, typeahead, ownsEvent, listRef, hasRegions]);
969
+ }, [listNavKeyDown, closeMenu, typeahead, ownsEvent, hasRegions, moveDialogTab]);
877
970
 
878
- // Tab past the last control of the footer, or Shift+Tab before the first
879
- // control of the header, leaves the menu as Tab from its rows does: the
880
- // menu closes, focus returns to the trigger, and the browser's own Tab
881
- // continues from there. Between the regions, Tab moves through the menu
882
- // as one stop.
971
+ // Tab from a header or footer control moves through the same dialog cycle.
883
972
  const handleRegionKeyDown = useCallback(e => {
884
- if (e.key !== 'Tab') {
885
- return;
886
- }
887
- const tabbables = tabbablesIn(e.currentTarget);
888
- const isHeader = e.currentTarget === headerRef.current;
889
- const exit = isHeader ? e.shiftKey ? tabbables[0] : undefined : e.shiftKey ? undefined : tabbables[tabbables.length - 1];
890
- if (exit != null && exit === document.activeElement) {
891
- closeMenu();
973
+ if (e.key === 'Tab') {
974
+ moveDialogTab(e);
892
975
  }
893
- }, [closeMenu]);
976
+ }, [moveDialogTab]);
894
977
  const openAndFocus = useCallback((modality = 'keyboard', notifyClick = false) => {
895
978
  // An unavailable trigger never opens the menu. Button keeps an
896
979
  // aria-disabled trigger focusable for its tooltip and swallows only
@@ -1047,12 +1130,6 @@ function DropdownMenuPopover({
1047
1130
  drillIn,
1048
1131
  wrapContent
1049
1132
  } = useMenuDrillIn(isOpen);
1050
- // The name a drilled-in view's Back row returns to: the menu's own name.
1051
- // The design system's button names the menu by its label. A custom trigger
1052
- // names it by reference (or the caller's `aria-label` does), so that name
1053
- // is read off the control as the menu opens.
1054
- const callerMenuLabel = rest['aria-label'];
1055
- const menuLabel = renderTrigger != null ? typeof callerMenuLabel === 'string' && callerMenuLabel.trim() !== '' ? callerMenuLabel : triggerName : typeof button.label === 'string' ? button.label : undefined;
1056
1133
  const resolvedMaxHeight = menuMaxHeight == null ? null : `${menuMaxHeight}px`;
1057
1134
  // Context for compound items
1058
1135
  const contextValue = useMemo(() => ({
@@ -1101,9 +1178,9 @@ function DropdownMenuPopover({
1101
1178
  // keeps the browser from drawing one after pointer input (see
1102
1179
  // handleLayerHide), so its focus needs no bookkeeping here.
1103
1180
  onFocus: () => {},
1104
- 'aria-haspopup': 'menu',
1181
+ 'aria-haspopup': hasRegions ? 'dialog' : 'menu',
1105
1182
  'aria-expanded': isOpen,
1106
- 'aria-controls': menuId
1183
+ 'aria-controls': hasRegions ? popover.id : menuId
1107
1184
  };
1108
1185
  return /*#__PURE__*/_jsxs(_Fragment, {
1109
1186
  children: [renderTrigger != null ? renderTrigger(triggerProps) : /*#__PURE__*/_jsx(Button, {
@@ -1141,9 +1218,9 @@ function DropdownMenuPopover({
1141
1218
  button.onFocus?.(event);
1142
1219
  onFocusReturnTargetFocus();
1143
1220
  },
1144
- "aria-haspopup": "menu",
1221
+ "aria-haspopup": hasRegions ? 'dialog' : 'menu',
1145
1222
  "aria-expanded": isOpen,
1146
- "aria-controls": menuId,
1223
+ "aria-controls": hasRegions ? popover.id : menuId,
1147
1224
  "data-testid": testId
1148
1225
  }), popover.render(renderWithRegions(/*#__PURE__*/_jsx("div", {
1149
1226
  ...rest,
@@ -66,16 +66,16 @@ export interface UseLayerDismissalReturn {
66
66
  *
67
67
  * The layer does NOT attach a key listener — the stack owns one listener and
68
68
  * routes each Escape press to the top-most REGISTERED layer, so one press
69
- * dismisses exactly one of them. Dialog (and what is built on it), Popover and
70
- * the menus built on it, Tooltip, HoverCard, Lightbox, MobileNav, BottomSheet,
71
- * BottomSheetSwitcher and lab's `Drawer` register today.
69
+ * dismisses exactly one of them. Dialog (and what is built on it, including
70
+ * CommandPalette), Popover and the menus built on it, ContextMenu, Tooltip,
71
+ * HoverCard, Lightbox, MobileNav, BottomSheet, BottomSheetSwitcher and lab's
72
+ * `Drawer` register today.
72
73
  *
73
- * `CommandPalette`, `ContextMenu`, `DropdownMenuSubMenu`, and
74
- * `PowerSearchEditPopover` still run their own Escape listeners. They stay safe
75
- * next to the stack only because each claims the press at element level, and the
76
- * stack stands down on an already-`defaultPrevented` press — but a registered
77
- * layer opened inside one of them does not get the press. Migrating them is the
78
- * fix.
74
+ * `DropdownMenuSubMenu` and `PowerSearchEditPopover` still run their own Escape
75
+ * listeners. They stay safe next to the stack only because each claims the press
76
+ * at element level, and the stack stands down on an already-`defaultPrevented`
77
+ * press — but a registered layer opened inside one of them does not get the
78
+ * press. Migrating them is the fix.
79
79
  *
80
80
  * Wrap the layer's own content in `LayerDepthProvider` so anything opened from
81
81
  * inside it registers as nested.
@@ -23,16 +23,16 @@ import { isTextComposing, isTopmostLayer, registerLayer } from "./layerStack.js"
23
23
  *
24
24
  * The layer does NOT attach a key listener — the stack owns one listener and
25
25
  * routes each Escape press to the top-most REGISTERED layer, so one press
26
- * dismisses exactly one of them. Dialog (and what is built on it), Popover and
27
- * the menus built on it, Tooltip, HoverCard, Lightbox, MobileNav, BottomSheet,
28
- * BottomSheetSwitcher and lab's `Drawer` register today.
26
+ * dismisses exactly one of them. Dialog (and what is built on it, including
27
+ * CommandPalette), Popover and the menus built on it, ContextMenu, Tooltip,
28
+ * HoverCard, Lightbox, MobileNav, BottomSheet, BottomSheetSwitcher and lab's
29
+ * `Drawer` register today.
29
30
  *
30
- * `CommandPalette`, `ContextMenu`, `DropdownMenuSubMenu`, and
31
- * `PowerSearchEditPopover` still run their own Escape listeners. They stay safe
32
- * next to the stack only because each claims the press at element level, and the
33
- * stack stands down on an already-`defaultPrevented` press — but a registered
34
- * layer opened inside one of them does not get the press. Migrating them is the
35
- * fix.
31
+ * `DropdownMenuSubMenu` and `PowerSearchEditPopover` still run their own Escape
32
+ * listeners. They stay safe next to the stack only because each claims the press
33
+ * at element level, and the stack stands down on an already-`defaultPrevented`
34
+ * press — but a registered layer opened inside one of them does not get the
35
+ * press. Migrating them is the fix.
36
36
  *
37
37
  * Wrap the layer's own content in `LayerDepthProvider` so anything opened from
38
38
  * inside it registers as nested.
@@ -221,7 +221,8 @@ export interface MultiSelectorProps<T extends MultiSelectorOptionType = MultiSel
221
221
  /**
222
222
  * Visual style of the selector trigger.
223
223
  * - 'input': bordered input-style trigger for forms
224
- * - 'secondary': borderless, neutral-filled trigger matching secondary buttons
224
+ * - 'secondary': matches the theme's secondary buttons (borderless and
225
+ * neutral-filled by default)
225
226
  * - 'ghost': borderless, transparent trigger matching ghost buttons
226
227
  * @default 'input'
227
228
  */
@@ -1 +1 @@
1
- {"version":3,"file":"MultiSelector.d.ts","sourceRoot":"","sources":["../../src/MultiSelector/MultiSelector.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,EAUZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,EAAuB,KAAK,QAAQ,EAAC,MAAM,SAAS,CAAC;AAE5D,OAAO,EAKL,KAAK,kBAAkB,EACxB,MAAM,UAAU,CAAC;AAOlB,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,cAAc,CAAC;AAapD,OAAO,KAAK,EACV,uBAAuB,EACvB,uBAAuB,EACvB,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAgBjB,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACzB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f,OAAO,EACP,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,SAAiB,EACjB,WAAW,EAAE,oBAAoB,EACjC,IAAI,EAAE,QAAQ,EACd,OAAiB,EACjB,MAAM,EACN,aAA0B,EAC1B,YAAY,EACZ,SAAS,EACT,QAAgB,EAChB,YAAoB,EACpB,cAAc,EAAE,uBAAuB,EACvC,SAAiB,EACjB,iBAAiB,EAAE,0BAA0B,EAC7C,SAAS,EAAE,kBAAkB,EAC7B,eAAe,EAAE,wBAAwB,EACzC,SAAiB,EACjB,cAAwB,EACxB,WAAW,EACX,SAAa,EACb,YAAY,EACZ,iBAA2B,EAC3B,YAAwB,EACxB,aAAqB,EACrB,aAAa,EACb,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,KAAK,EACL,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,GAAG,EACH,EAAE,EACF,OAAO,EACP,OAAO,EACP,SAAS,EAAE,aAAa,EACxB,kBAAkB,EAAE,mBAAmB,EACvC,GAAG,SAAS,EACb,EAAE,kBAAkB,CAAC,CAAC,CAAC,qBAgjDvB;yBAtmDe,aAAa"}
1
+ {"version":3,"file":"MultiSelector.d.ts","sourceRoot":"","sources":["../../src/MultiSelector/MultiSelector.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,EAUZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,EAAuB,KAAK,QAAQ,EAAC,MAAM,SAAS,CAAC;AAE5D,OAAO,EAKL,KAAK,kBAAkB,EACxB,MAAM,UAAU,CAAC;AAOlB,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,cAAc,CAAC;AAapD,OAAO,KAAK,EACV,uBAAuB,EACvB,uBAAuB,EACvB,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAgBjB,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACzB,MAA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AAO,EACP,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,SAAiB,EACjB,WAAW,EAAE,oBAAoB,EACjC,IAAI,EAAE,QAAQ,EACd,OAAiB,EACjB,MAAM,EACN,aAA0B,EAC1B,YAAY,EACZ,SAAS,EACT,QAAgB,EAChB,YAAoB,EACpB,cAAc,EAAE,uBAAuB,EACvC,SAAiB,EACjB,iBAAiB,EAAE,0BAA0B,EAC7C,SAAS,EAAE,kBAAkB,EAC7B,eAAe,EAAE,wBAAwB,EACzC,SAAiB,EACjB,cAAwB,EACxB,WAAW,EACX,SAAa,EACb,YAAY,EACZ,iBAA2B,EAC3B,YAAwB,EACxB,aAAqB,EACrB,aAAa,EACb,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,KAAK,EACL,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,GAAG,EACH,EAAE,EACF,OAAO,EACP,OAAO,EACP,SAAS,EAAE,aAAa,EACxB,kBAAkB,EAAE,mBAAmB,EACvC,GAAG,SAAS,EACb,EAAE,kBAAkB,CAAC,CAAC,CAAC,qBAgjDvB;yBAtmDe,aAAa"}
@@ -143,9 +143,9 @@ interface SelectorPropsBase<T extends SelectorOptionType = SelectorOptionType> e
143
143
  /**
144
144
  * Visual style of the selector trigger.
145
145
  * - 'input': bordered input-style trigger for forms
146
- * - 'secondary': borderless, neutral-filled trigger matching secondary
147
- * buttons, for navs and toolbars where the selector sits beside
148
- * secondary actions
146
+ * - 'secondary': matches the theme's secondary buttons (borderless and
147
+ * neutral-filled by default), for navs and toolbars where the selector
148
+ * sits beside secondary actions
149
149
  * - 'ghost': borderless trigger matching ghost buttons, for toolbars
150
150
  * @default 'input'
151
151
  */
@@ -1 +1 @@
1
- {"version":3,"file":"en.generated.d.ts","sourceRoot":"","sources":["../../../src/i18n/generated-locales/en.generated.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,QAAA,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAocpD,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"en.generated.d.ts","sourceRoot":"","sources":["../../../src/i18n/generated-locales/en.generated.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,QAAA,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAqcpD,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -223,6 +223,7 @@ const runtimeCatalog = {
223
223
  '@astryx.chat.speechRecognition.noSpeechDetected': 'No speech was detected.',
224
224
  '@astryx.commandPalette.label': 'Command palette',
225
225
  '@astryx.commandPalette.input.placeholder': 'Search…',
226
+ '@astryx.commandPalette.input.label': 'Search commands',
226
227
  '@astryx.commandPalette.list.label': 'Commands',
227
228
  '@astryx.contextMenu.label': 'Context menu',
228
229
  '@astryx.dateInput.placeholder': 'Select a date',
@@ -1 +1 @@
1
- {"version":3,"file":"pseudo.generated.d.ts","sourceRoot":"","sources":["../../../src/i18n/generated-locales/pseudo.generated.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,QAAA,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA6cpD,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"pseudo.generated.d.ts","sourceRoot":"","sources":["../../../src/i18n/generated-locales/pseudo.generated.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,QAAA,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA8cpD,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -223,6 +223,7 @@ const runtimeCatalog = {
223
223
  '@astryx.chat.speechRecognition.noSpeechDetected': '⟦Ñó šþééçĥ ŵàš ðéţéçţéð.⟧',
224
224
  '@astryx.commandPalette.label': '⟦Çóɱɱàñð þàłéţţé⟧',
225
225
  '@astryx.commandPalette.input.placeholder': '⟦Šéàřçĥ…⟧',
226
+ '@astryx.commandPalette.input.label': '⟦Šéàřçĥ çóɱɱàñðš⟧',
226
227
  '@astryx.commandPalette.list.label': '⟦Çóɱɱàñðš⟧',
227
228
  '@astryx.contextMenu.label': '⟦Çóñţéẋţ ɱéñú⟧',
228
229
  '@astryx.dateInput.placeholder': '⟦Šéłéçţ à ðàţé⟧',
@@ -1 +1 @@
1
- {"version":3,"file":"plainDate.d.ts","sourceRoot":"","sources":["../../src/utils/plainDate.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,OAAO,KAAK,EAAC,aAAa,EAAE,SAAS,EAAC,MAAM,aAAa,CAAC;AAC1D,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,eAAe,CAAC;AAE1C,YAAY,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAE3C,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,GACV,SAAS,CAcX;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,aAAa,GAAG,SAAS,CAG9D;AAED,wBAAgB,cAAc,CAAC,EAAE,EAAE,SAAS,GAAG,aAAa,CAK3D;AAED,wBAAgB,eAAe,CAAC,EAAE,EAAE,SAAS,GAAG,IAAI,CAMnD;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,IAAI,GAAG,SAAS,CAMpD;AAED,wBAAgB,cAAc,IAAI,SAAS,CAE1C;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAMlE;AAED,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,SAAS,GAAG,MAAM,CAExD;AAED,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAStE;AAED,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,SAAS,EA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139
  const parts = getTimeZoneParts(instant, timezoneID);
140
140
  return utcTime(parts.year, parts.month - 1, parts.day, parts.hour, parts.minute, parts.second) - instant;
141
141
  }
142
+ const DAY_MS = 24 * 60 * 60 * 1000;
142
143
  export function plainDateToInstant(date, timezoneID, hour = 0, minute = 0) {
143
- const utcGuess = utcTime(date.year, date.month - 1, date.day, hour, minute);
144
- const firstOffset = getTimezoneOffsetMS(timezoneID, utcGuess);
145
- const firstInstant = utcGuess - firstOffset;
146
- const secondOffset = getTimezoneOffsetMS(timezoneID, firstInstant);
147
- return utcGuess - secondOffset;
144
+ // The wall time read as if it were UTC; subtracting an offset gives a
145
+ // candidate instant.
146
+ const wallTime = utcTime(date.year, date.month - 1, date.day, hour, minute);
147
+ // The offsets in effect a day either side cover any transition that can make
148
+ // this wall time skipped or repeated.
149
+ const offsetBefore = getTimezoneOffsetMS(timezoneID, wallTime - DAY_MS);
150
+ const offsetAfter = getTimezoneOffsetMS(timezoneID, wallTime + DAY_MS);
151
+ // AST-067 (Temporal's "compatible" disambiguation): a wall time that happens
152
+ // twice resolves to its earlier occurrence, and one that never happens is
153
+ // read in the offset before the transition, which moves it forward by the
154
+ // length of the gap.
155
+ const candidates = [offsetBefore, offsetAfter].map(offset => wallTime - offset).filter((instant, index) => getTimezoneOffsetMS(timezoneID, instant) === (index === 0 ? offsetBefore : offsetAfter));
156
+ return candidates.length > 0 ? Math.min(...candidates) : wallTime - offsetBefore;
148
157
  }
149
158
  export function plainDateFromInstant(instant, timezoneID) {
150
159
  const parts = getTimeZoneParts(instant, timezoneID);
package/locales/en.json CHANGED
@@ -409,7 +409,7 @@
409
409
  },
410
410
  "@astryx.commandPalette.noResultsFor": {
411
411
  "defaultMessage": "No results for {query}",
412
- "description": "Screen-reader-only announcement when a CommandPalette query matches nothing. `{query}` is the user's verbatim search text; keep it last if your language allows so truncation-by-AT still conveys the outcome."
412
+ "description": "Not read by any component: CommandPalette announces its rendered empty-search message (`emptySearchText`) instead. Formerly the screen-reader-only announcement when a query matched nothing; `{query}` was the user's verbatim search text."
413
413
  },
414
414
  "@astryx.commandPalette.loading": {
415
415
  "defaultMessage": "Loading",
@@ -863,6 +863,10 @@
863
863
  "defaultMessage": "Search…",
864
864
  "description": "Grey placeholder inside the CommandPalette's search input. Imperative verb; trailing `…` is one character."
865
865
  },
866
+ "@astryx.commandPalette.input.label": {
867
+ "defaultMessage": "Search commands",
868
+ "description": "Screen-reader-only accessible name for the CommandPalette query input. Distinguish it from the visible placeholder; verb followed by the app actions being searched."
869
+ },
866
870
  "@astryx.commandPalette.list.label": {
867
871
  "defaultMessage": "Commands",
868
872
  "description": "\"Command\" = an app action a user can invoke (metaphor from CLI), not a Unix command. Screen-reader-only name for the matching-commands list."
@@ -647,6 +647,9 @@
647
647
  "@astryx.commandPalette.input.placeholder": {
648
648
  "defaultMessage": "⟦Šéàřçĥ…⟧"
649
649
  },
650
+ "@astryx.commandPalette.input.label": {
651
+ "defaultMessage": "⟦Šéàřçĥ çóɱɱàñðš⟧"
652
+ },
650
653
  "@astryx.commandPalette.list.label": {
651
654
  "defaultMessage": "⟦Çóɱɱàñðš⟧"
652
655
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astryxdesign/core",
3
- "version": "0.7.1-canary.e199fa4",
3
+ "version": "0.7.1-canary.e71c4e9",
4
4
  "displayName": "Astryx Core",
5
5
  "description": "The component library. Accessible, themeable React components with built-in spacing, dark mode, and StyleX styling.",
6
6
  "author": "Meta Open Source",
@@ -787,8 +787,8 @@
787
787
  "react-dom": ">=19.0.0"
788
788
  },
789
789
  "devDependencies": {
790
- "@astryxdesign/a11y-spec": "0.7.1-canary.e199fa4",
791
- "@astryxdesign/cli": "0.7.1-canary.e199fa4",
790
+ "@astryxdesign/a11y-spec": "0.7.1-canary.e71c4e9",
791
+ "@astryxdesign/cli": "0.7.1-canary.e71c4e9",
792
792
  "@babel/cli": "^7.29.7",
793
793
  "@babel/core": "^7.29.7",
794
794
  "@babel/preset-react": "^7.29.7",