@astryxdesign/core 0.5.1 → 0.5.2-canary.1917581

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 (111) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
  3. package/dist/BottomSheet/BottomSheet.js +1 -1
  4. package/dist/BottomSheet/BottomSheetEdgeTint.d.ts +2 -2
  5. package/dist/BottomSheet/BottomSheetEdgeTint.d.ts.map +1 -1
  6. package/dist/BottomSheet/BottomSheetEdgeTint.js +7 -10
  7. package/dist/BottomSheet/BottomSheetSwitcher.d.ts.map +1 -1
  8. package/dist/BottomSheet/BottomSheetSwitcher.js +1 -1
  9. package/dist/Button/Button.d.ts +2 -1
  10. package/dist/Button/Button.d.ts.map +1 -1
  11. package/dist/Button/Button.js +11 -4
  12. package/dist/Chat/ChatToolCalls.d.ts.map +1 -1
  13. package/dist/Chat/ChatToolCalls.js +34 -17
  14. package/dist/Popover/Popover.d.ts +10 -6
  15. package/dist/Popover/Popover.d.ts.map +1 -1
  16. package/dist/Popover/Popover.js +141 -16
  17. package/dist/Popover/usePopover.d.ts +4 -0
  18. package/dist/Popover/usePopover.d.ts.map +1 -1
  19. package/dist/Popover/usePopover.js +52 -5
  20. package/dist/Toast/useToastGesture.d.ts.map +1 -1
  21. package/dist/Toast/useToastGesture.js +46 -9
  22. package/dist/astryx.css +10 -0
  23. package/dist/hooks/useFocusTrap.d.ts.map +1 -1
  24. package/dist/hooks/useFocusTrap.js +12 -0
  25. package/dist/i18n/InternationalizationContext.d.ts +2 -0
  26. package/dist/i18n/InternationalizationContext.d.ts.map +1 -1
  27. package/dist/i18n/InternationalizationContext.js +3 -1
  28. package/dist/i18n/InternationalizationProvider.d.ts.map +1 -1
  29. package/dist/i18n/InternationalizationProvider.js +3 -1
  30. package/dist/i18n/resolve.d.ts +1 -1
  31. package/dist/i18n/resolve.d.ts.map +1 -1
  32. package/dist/i18n/resolve.js +37 -38
  33. package/dist/i18n/useTranslator.d.ts.map +1 -1
  34. package/dist/i18n/useTranslator.js +2 -3
  35. package/locales/af-ZA.json +0 -4
  36. package/locales/ar-SA.json +0 -4
  37. package/locales/ca-ES.json +0 -4
  38. package/locales/cs-CZ.json +0 -4
  39. package/locales/da-DK.json +0 -4
  40. package/locales/de-DE.json +0 -4
  41. package/locales/el-GR.json +0 -4
  42. package/locales/en.json +16 -0
  43. package/locales/es-ES.json +0 -4
  44. package/locales/fi-FI.json +0 -4
  45. package/locales/fr-FR.json +0 -4
  46. package/locales/he-IL.json +0 -4
  47. package/locales/hu-HU.json +0 -4
  48. package/locales/it-IT.json +0 -4
  49. package/locales/ja-JP.json +0 -4
  50. package/locales/ko-KR.json +0 -4
  51. package/locales/nl-NL.json +0 -4
  52. package/locales/no-NO.json +0 -4
  53. package/locales/pl-PL.json +0 -4
  54. package/locales/pseudo.json +12 -0
  55. package/locales/pt-BR.json +0 -4
  56. package/locales/pt-PT.json +0 -4
  57. package/locales/ro-RO.json +0 -4
  58. package/locales/ru-RU.json +0 -4
  59. package/locales/sr-SP.json +0 -4
  60. package/locales/sv-SE.json +0 -4
  61. package/locales/tr-TR.json +0 -4
  62. package/locales/uk-UA.json +0 -4
  63. package/locales/vi-VN.json +0 -4
  64. package/locales/zh-CN.json +0 -4
  65. package/locales/zh-TW.json +0 -4
  66. package/package.json +3 -3
  67. package/src/BottomSheet/BottomSheet.tsx +1 -2
  68. package/src/BottomSheet/BottomSheetEdgeTint.test.tsx +4 -6
  69. package/src/BottomSheet/BottomSheetEdgeTint.tsx +7 -10
  70. package/src/BottomSheet/BottomSheetSwitcher.tsx +1 -2
  71. package/src/Button/Button.test.tsx +10 -0
  72. package/src/Button/Button.tsx +13 -5
  73. package/src/Calendar/Calendar.doc.mjs +1 -1
  74. package/src/Chat/ChatToolCalls.test.tsx +44 -0
  75. package/src/Chat/ChatToolCalls.tsx +36 -15
  76. package/src/CheckboxInput/CheckboxInput.doc.mjs +1 -1
  77. package/src/CheckboxList/CheckboxList.doc.mjs +1 -1
  78. package/src/ComplexSelector/ComplexSelector.doc.mjs +2 -2
  79. package/src/DateInput/DateInput.doc.mjs +1 -1
  80. package/src/DateRangeInput/DateRangeInput.doc.mjs +1 -1
  81. package/src/DateTimeInput/DateTimeInput.doc.mjs +1 -1
  82. package/src/Field/Field.doc.mjs +1 -1
  83. package/src/FieldStatus/FieldStatus.doc.mjs +1 -1
  84. package/src/FileInput/FileInput.doc.mjs +1 -1
  85. package/src/Indicator/Indicator.doc.mjs +1 -1
  86. package/src/InputGroup/InputGroup.doc.mjs +1 -1
  87. package/src/MultiSelector/MultiSelector.doc.mjs +1 -1
  88. package/src/NumberInput/NumberInput.doc.mjs +1 -1
  89. package/src/Popover/Popover.doc.mjs +11 -11
  90. package/src/Popover/Popover.test.tsx +397 -2
  91. package/src/Popover/Popover.tsx +228 -21
  92. package/src/Popover/usePopover.tsx +92 -15
  93. package/src/PowerSearch/PowerSearch.doc.mjs +1 -1
  94. package/src/RadioList/RadioList.doc.mjs +1 -1
  95. package/src/Selector/Selector.doc.mjs +1 -1
  96. package/src/Slider/Slider.doc.mjs +2 -2
  97. package/src/Switch/Switch.doc.mjs +1 -1
  98. package/src/TextArea/TextArea.doc.mjs +1 -1
  99. package/src/TextInput/TextInput.doc.mjs +1 -1
  100. package/src/TimeInput/TimeInput.doc.mjs +1 -1
  101. package/src/Toast/ToastViewport.test.tsx +118 -4
  102. package/src/Toast/useToastGesture.ts +61 -8
  103. package/src/Tokenizer/Tokenizer.doc.mjs +1 -1
  104. package/src/Typeahead/Typeahead.doc.mjs +1 -1
  105. package/src/hooks/useFocusTrap.test.tsx +40 -0
  106. package/src/hooks/useFocusTrap.ts +13 -0
  107. package/src/i18n/InternationalizationContext.ts +3 -0
  108. package/src/i18n/InternationalizationProvider.tsx +8 -1
  109. package/src/i18n/__tests__/resolve.test.ts +23 -1
  110. package/src/i18n/resolve.ts +46 -49
  111. package/src/i18n/useTranslator.ts +2 -7
@@ -639,10 +639,6 @@
639
639
  "defaultMessage": "Datum auswählen",
640
640
  "description": "Grey placeholder inside an empty DateTimeInput field. Note: the English says only \"date\" though the field is date+time — do not add \"and time\" unless natural."
641
641
  },
642
- "@astryx.dateTimeInput.dialogLabel": {
643
- "defaultMessage": "Datum auswählen",
644
- "description": "Screen-reader-only accessible name for the DateTimeInput picker dialog. Same English-only \"date\" phrasing as the placeholder — don't add \"and time\" unless natural."
645
- },
646
642
  "@astryx.link.newTab": {
647
643
  "defaultMessage": "(wird in neuem Tab geöffnet)",
648
644
  "description": "Visually-hidden (screen-reader-only) suffix appended to a Link's accessible name when it opens in a new tab. Example: `Documentation (opens in new tab)`."
@@ -647,10 +647,6 @@
647
647
  "defaultMessage": "Επιλέξτε ημερομηνία",
648
648
  "description": "Grey placeholder inside an empty DateTimeInput field. Note: the English says only \"date\" though the field is date+time — do not add \"and time\" unless natural."
649
649
  },
650
- "@astryx.dateTimeInput.dialogLabel": {
651
- "defaultMessage": "Επιλογή ημερομηνίας",
652
- "description": "Screen-reader-only accessible name for the DateTimeInput picker dialog. Same English-only \"date\" phrasing as the placeholder — don't add \"and time\" unless natural."
653
- },
654
650
  "@astryx.link.newTab": {
655
651
  "defaultMessage": "(ανοίγει σε νέα καρτέλα)",
656
652
  "description": "Visually-hidden (screen-reader-only) suffix appended to a Link's accessible name when it opens in a new tab. Example: `Documentation (opens in new tab)`."
package/locales/en.json CHANGED
@@ -951,6 +951,22 @@
951
951
  "defaultMessage": "Error: {message}",
952
952
  "description": "Screen-reader text for a tool call that failed. {message} is the error detail."
953
953
  },
954
+ "@astryx.chatToolCalls.status.pending": {
955
+ "defaultMessage": "Pending",
956
+ "description": "Screen-reader-only status label for a tool call that is waiting to begin."
957
+ },
958
+ "@astryx.chatToolCalls.status.running": {
959
+ "defaultMessage": "Running",
960
+ "description": "Screen-reader-only status label for a tool call that is currently running."
961
+ },
962
+ "@astryx.chatToolCalls.status.complete": {
963
+ "defaultMessage": "Complete",
964
+ "description": "Screen-reader-only status label for a tool call that completed successfully."
965
+ },
966
+ "@astryx.chatToolCalls.status.error": {
967
+ "defaultMessage": "Failed",
968
+ "description": "Screen-reader-only status label for a failed tool call when no error detail is supplied."
969
+ },
954
970
  "@astryx.chatToolCalls.groupLabel": {
955
971
  "defaultMessage": "{count} tool calls",
956
972
  "description": "Summary label shown in the group header when multiple tool calls are expanded. {count} is the number of calls."
@@ -647,10 +647,6 @@
647
647
  "defaultMessage": "Selecciona una fecha",
648
648
  "description": "Grey placeholder inside an empty DateTimeInput field. Note: the English says only \"date\" though the field is date+time — do not add \"and time\" unless natural."
649
649
  },
650
- "@astryx.dateTimeInput.dialogLabel": {
651
- "defaultMessage": "Elige una fecha",
652
- "description": "Screen-reader-only accessible name for the DateTimeInput picker dialog. Same English-only \"date\" phrasing as the placeholder — don't add \"and time\" unless natural."
653
- },
654
650
  "@astryx.link.newTab": {
655
651
  "defaultMessage": "(se abre en una pestaña nueva)",
656
652
  "description": "Visually-hidden (screen-reader-only) suffix appended to a Link's accessible name when it opens in a new tab. Example: `Documentation (opens in new tab)`."
@@ -647,10 +647,6 @@
647
647
  "defaultMessage": "Valitse päivämäärä",
648
648
  "description": "Grey placeholder inside an empty DateTimeInput field. Note: the English says only \"date\" though the field is date+time — do not add \"and time\" unless natural."
649
649
  },
650
- "@astryx.dateTimeInput.dialogLabel": {
651
- "defaultMessage": "Valitse päivämäärä",
652
- "description": "Screen-reader-only accessible name for the DateTimeInput picker dialog. Same English-only \"date\" phrasing as the placeholder — don't add \"and time\" unless natural."
653
- },
654
650
  "@astryx.link.newTab": {
655
651
  "defaultMessage": "(avautuu uuteen välilehteen)",
656
652
  "description": "Visually-hidden (screen-reader-only) suffix appended to a Link's accessible name when it opens in a new tab. Example: `Documentation (opens in new tab)`."
@@ -615,10 +615,6 @@
615
615
  "defaultMessage": "Sélectionner une date",
616
616
  "description": "Grey placeholder inside an empty DateTimeInput field. Note: the English says only \"date\" though the field is date+time — do not add \"and time\" unless natural."
617
617
  },
618
- "@astryx.dateTimeInput.dialogLabel": {
619
- "defaultMessage": "Choisir une date",
620
- "description": "Screen-reader-only accessible name for the DateTimeInput picker dialog. Same English-only \"date\" phrasing as the placeholder — don't add \"and time\" unless natural."
621
- },
622
618
  "@astryx.link.newTab": {
623
619
  "defaultMessage": "(ouvre un nouvel onglet)",
624
620
  "description": "Visually-hidden (screen-reader-only) suffix appended to a Link's accessible name when it opens in a new tab. Example: `Documentation (opens in new tab)`."
@@ -647,10 +647,6 @@
647
647
  "defaultMessage": "בחירת תאריך",
648
648
  "description": "Grey placeholder inside an empty DateTimeInput field. Note: the English says only \"date\" though the field is date+time — do not add \"and time\" unless natural."
649
649
  },
650
- "@astryx.dateTimeInput.dialogLabel": {
651
- "defaultMessage": "בחירת תאריך",
652
- "description": "Screen-reader-only accessible name for the DateTimeInput picker dialog. Same English-only \"date\" phrasing as the placeholder — don't add \"and time\" unless natural."
653
- },
654
650
  "@astryx.link.newTab": {
655
651
  "defaultMessage": "(נפתח בכרטיסייה חדשה)",
656
652
  "description": "Visually-hidden (screen-reader-only) suffix appended to a Link's accessible name when it opens in a new tab. Example: `Documentation (opens in new tab)`."
@@ -647,10 +647,6 @@
647
647
  "defaultMessage": "Válasszon dátumot",
648
648
  "description": "Grey placeholder inside an empty DateTimeInput field. Note: the English says only \"date\" though the field is date+time — do not add \"and time\" unless natural."
649
649
  },
650
- "@astryx.dateTimeInput.dialogLabel": {
651
- "defaultMessage": "Dátum kiválasztása",
652
- "description": "Screen-reader-only accessible name for the DateTimeInput picker dialog. Same English-only \"date\" phrasing as the placeholder — don't add \"and time\" unless natural."
653
- },
654
650
  "@astryx.link.newTab": {
655
651
  "defaultMessage": "(új lapon nyílik meg)",
656
652
  "description": "Visually-hidden (screen-reader-only) suffix appended to a Link's accessible name when it opens in a new tab. Example: `Documentation (opens in new tab)`."
@@ -639,10 +639,6 @@
639
639
  "defaultMessage": "Seleziona una data",
640
640
  "description": "Grey placeholder inside an empty DateTimeInput field. Note: the English says only \"date\" though the field is date+time — do not add \"and time\" unless natural."
641
641
  },
642
- "@astryx.dateTimeInput.dialogLabel": {
643
- "defaultMessage": "Scegli una data",
644
- "description": "Screen-reader-only accessible name for the DateTimeInput picker dialog. Same English-only \"date\" phrasing as the placeholder — don't add \"and time\" unless natural."
645
- },
646
642
  "@astryx.link.newTab": {
647
643
  "defaultMessage": "(si apre in una nuova scheda)",
648
644
  "description": "Visually-hidden (screen-reader-only) suffix appended to a Link's accessible name when it opens in a new tab. Example: `Documentation (opens in new tab)`."
@@ -651,10 +651,6 @@
651
651
  "defaultMessage": "日付を選択",
652
652
  "description": "Grey placeholder inside an empty DateTimeInput field. Note: the English says only \"date\" though the field is date+time — do not add \"and time\" unless natural."
653
653
  },
654
- "@astryx.dateTimeInput.dialogLabel": {
655
- "defaultMessage": "日付を選択",
656
- "description": "Screen-reader-only accessible name for the DateTimeInput picker dialog. Same English-only \"date\" phrasing as the placeholder — don't add \"and time\" unless natural."
657
- },
658
654
  "@astryx.link.newTab": {
659
655
  "defaultMessage": "(新しいタブで開く)",
660
656
  "description": "Visually-hidden (screen-reader-only) suffix appended to a Link's accessible name when it opens in a new tab. Example: `Documentation (opens in new tab)`."
@@ -647,10 +647,6 @@
647
647
  "defaultMessage": "날짜 선택",
648
648
  "description": "Grey placeholder inside an empty DateTimeInput field. Note: the English says only \"date\" though the field is date+time — do not add \"and time\" unless natural."
649
649
  },
650
- "@astryx.dateTimeInput.dialogLabel": {
651
- "defaultMessage": "날짜 선택",
652
- "description": "Screen-reader-only accessible name for the DateTimeInput picker dialog. Same English-only \"date\" phrasing as the placeholder — don't add \"and time\" unless natural."
653
- },
654
650
  "@astryx.link.newTab": {
655
651
  "defaultMessage": "(새 탭에서 열림)",
656
652
  "description": "Visually-hidden (screen-reader-only) suffix appended to a Link's accessible name when it opens in a new tab. Example: `Documentation (opens in new tab)`."
@@ -615,10 +615,6 @@
615
615
  "defaultMessage": "Selecteer een datum",
616
616
  "description": "Grey placeholder inside an empty DateTimeInput field. Note: the English says only \"date\" though the field is date+time — do not add \"and time\" unless natural."
617
617
  },
618
- "@astryx.dateTimeInput.dialogLabel": {
619
- "defaultMessage": "Datum kiezen",
620
- "description": "Screen-reader-only accessible name for the DateTimeInput picker dialog. Same English-only \"date\" phrasing as the placeholder — don't add \"and time\" unless natural."
621
- },
622
618
  "@astryx.link.newTab": {
623
619
  "defaultMessage": "(opent in nieuw tabblad)",
624
620
  "description": "Visually-hidden (screen-reader-only) suffix appended to a Link's accessible name when it opens in a new tab. Example: `Documentation (opens in new tab)`."
@@ -643,10 +643,6 @@
643
643
  "defaultMessage": "Velg en dato",
644
644
  "description": "Grey placeholder inside an empty DateTimeInput field. Note: the English says only \"date\" though the field is date+time — do not add \"and time\" unless natural."
645
645
  },
646
- "@astryx.dateTimeInput.dialogLabel": {
647
- "defaultMessage": "Velg dato",
648
- "description": "Screen-reader-only accessible name for the DateTimeInput picker dialog. Same English-only \"date\" phrasing as the placeholder — don't add \"and time\" unless natural."
649
- },
650
646
  "@astryx.link.newTab": {
651
647
  "defaultMessage": "(åpnes i ny fane)",
652
648
  "description": "Visually-hidden (screen-reader-only) suffix appended to a Link's accessible name when it opens in a new tab. Example: `Documentation (opens in new tab)`."
@@ -639,10 +639,6 @@
639
639
  "defaultMessage": "Wybierz datę",
640
640
  "description": "Grey placeholder inside an empty DateTimeInput field. Note: the English says only \"date\" though the field is date+time — do not add \"and time\" unless natural."
641
641
  },
642
- "@astryx.dateTimeInput.dialogLabel": {
643
- "defaultMessage": "Wybierz datę",
644
- "description": "Screen-reader-only accessible name for the DateTimeInput picker dialog. Same English-only \"date\" phrasing as the placeholder — don't add \"and time\" unless natural."
645
- },
646
642
  "@astryx.link.newTab": {
647
643
  "defaultMessage": "(otwiera się w nowej karcie)",
648
644
  "description": "Visually-hidden (screen-reader-only) suffix appended to a Link's accessible name when it opens in a new tab. Example: `Documentation (opens in new tab)`."
@@ -713,6 +713,18 @@
713
713
  "@astryx.chatToolCalls.error": {
714
714
  "defaultMessage": "⟦Éřřóř: {message}⟧"
715
715
  },
716
+ "@astryx.chatToolCalls.status.pending": {
717
+ "defaultMessage": "⟦Þéñðíñĝ⟧"
718
+ },
719
+ "@astryx.chatToolCalls.status.running": {
720
+ "defaultMessage": "⟦Řúññíñĝ⟧"
721
+ },
722
+ "@astryx.chatToolCalls.status.complete": {
723
+ "defaultMessage": "⟦Çóɱþłéţé⟧"
724
+ },
725
+ "@astryx.chatToolCalls.status.error": {
726
+ "defaultMessage": "⟦Ƒàíłéð⟧"
727
+ },
716
728
  "@astryx.chatToolCalls.groupLabel": {
717
729
  "defaultMessage": "⟦{count} ţóół çàłłš⟧"
718
730
  },
@@ -643,10 +643,6 @@
643
643
  "defaultMessage": "Selecione uma data",
644
644
  "description": "Grey placeholder inside an empty DateTimeInput field. Note: the English says only \"date\" though the field is date+time — do not add \"and time\" unless natural."
645
645
  },
646
- "@astryx.dateTimeInput.dialogLabel": {
647
- "defaultMessage": "Escolha uma data",
648
- "description": "Screen-reader-only accessible name for the DateTimeInput picker dialog. Same English-only \"date\" phrasing as the placeholder — don't add \"and time\" unless natural."
649
- },
650
646
  "@astryx.link.newTab": {
651
647
  "defaultMessage": "(abre em uma nova guia)",
652
648
  "description": "Visually-hidden (screen-reader-only) suffix appended to a Link's accessible name when it opens in a new tab. Example: `Documentation (opens in new tab)`."
@@ -643,10 +643,6 @@
643
643
  "defaultMessage": "Selecione uma data",
644
644
  "description": "Grey placeholder inside an empty DateTimeInput field. Note: the English says only \"date\" though the field is date+time — do not add \"and time\" unless natural."
645
645
  },
646
- "@astryx.dateTimeInput.dialogLabel": {
647
- "defaultMessage": "Escolha uma data",
648
- "description": "Screen-reader-only accessible name for the DateTimeInput picker dialog. Same English-only \"date\" phrasing as the placeholder — don't add \"and time\" unless natural."
649
- },
650
646
  "@astryx.link.newTab": {
651
647
  "defaultMessage": "(abre num novo separador)",
652
648
  "description": "Visually-hidden (screen-reader-only) suffix appended to a Link's accessible name when it opens in a new tab. Example: `Documentation (opens in new tab)`."
@@ -643,10 +643,6 @@
643
643
  "defaultMessage": "Selectează o dată",
644
644
  "description": "Grey placeholder inside an empty DateTimeInput field. Note: the English says only \"date\" though the field is date+time — do not add \"and time\" unless natural."
645
645
  },
646
- "@astryx.dateTimeInput.dialogLabel": {
647
- "defaultMessage": "Alege data",
648
- "description": "Screen-reader-only accessible name for the DateTimeInput picker dialog. Same English-only \"date\" phrasing as the placeholder — don't add \"and time\" unless natural."
649
- },
650
646
  "@astryx.link.newTab": {
651
647
  "defaultMessage": "(se deschide într-o filă nouă)",
652
648
  "description": "Visually-hidden (screen-reader-only) suffix appended to a Link's accessible name when it opens in a new tab. Example: `Documentation (opens in new tab)`."
@@ -647,10 +647,6 @@
647
647
  "defaultMessage": "Выберите дату",
648
648
  "description": "Grey placeholder inside an empty DateTimeInput field. Note: the English says only \"date\" though the field is date+time — do not add \"and time\" unless natural."
649
649
  },
650
- "@astryx.dateTimeInput.dialogLabel": {
651
- "defaultMessage": "Выбор даты",
652
- "description": "Screen-reader-only accessible name for the DateTimeInput picker dialog. Same English-only \"date\" phrasing as the placeholder — don't add \"and time\" unless natural."
653
- },
654
650
  "@astryx.link.newTab": {
655
651
  "defaultMessage": "(откроется в новой вкладке)",
656
652
  "description": "Visually-hidden (screen-reader-only) suffix appended to a Link's accessible name when it opens in a new tab. Example: `Documentation (opens in new tab)`."
@@ -647,10 +647,6 @@
647
647
  "defaultMessage": "Изаберите датум",
648
648
  "description": "Grey placeholder inside an empty DateTimeInput field. Note: the English says only \"date\" though the field is date+time — do not add \"and time\" unless natural."
649
649
  },
650
- "@astryx.dateTimeInput.dialogLabel": {
651
- "defaultMessage": "Изаберите датум",
652
- "description": "Screen-reader-only accessible name for the DateTimeInput picker dialog. Same English-only \"date\" phrasing as the placeholder — don't add \"and time\" unless natural."
653
- },
654
650
  "@astryx.link.newTab": {
655
651
  "defaultMessage": "(отвара се у новој картици)",
656
652
  "description": "Visually-hidden (screen-reader-only) suffix appended to a Link's accessible name when it opens in a new tab. Example: `Documentation (opens in new tab)`."
@@ -643,10 +643,6 @@
643
643
  "defaultMessage": "Välj ett datum",
644
644
  "description": "Grey placeholder inside an empty DateTimeInput field. Note: the English says only \"date\" though the field is date+time — do not add \"and time\" unless natural."
645
645
  },
646
- "@astryx.dateTimeInput.dialogLabel": {
647
- "defaultMessage": "Välj datum",
648
- "description": "Screen-reader-only accessible name for the DateTimeInput picker dialog. Same English-only \"date\" phrasing as the placeholder — don't add \"and time\" unless natural."
649
- },
650
646
  "@astryx.link.newTab": {
651
647
  "defaultMessage": "(öppnas i ny flik)",
652
648
  "description": "Visually-hidden (screen-reader-only) suffix appended to a Link's accessible name when it opens in a new tab. Example: `Documentation (opens in new tab)`."
@@ -647,10 +647,6 @@
647
647
  "defaultMessage": "Bir tarih seçin",
648
648
  "description": "Grey placeholder inside an empty DateTimeInput field. Note: the English says only \"date\" though the field is date+time — do not add \"and time\" unless natural."
649
649
  },
650
- "@astryx.dateTimeInput.dialogLabel": {
651
- "defaultMessage": "Tarih seçin",
652
- "description": "Screen-reader-only accessible name for the DateTimeInput picker dialog. Same English-only \"date\" phrasing as the placeholder — don't add \"and time\" unless natural."
653
- },
654
650
  "@astryx.link.newTab": {
655
651
  "defaultMessage": "(yeni sekmede açılır)",
656
652
  "description": "Visually-hidden (screen-reader-only) suffix appended to a Link's accessible name when it opens in a new tab. Example: `Documentation (opens in new tab)`."
@@ -647,10 +647,6 @@
647
647
  "defaultMessage": "Виберіть дату",
648
648
  "description": "Grey placeholder inside an empty DateTimeInput field. Note: the English says only \"date\" though the field is date+time — do not add \"and time\" unless natural."
649
649
  },
650
- "@astryx.dateTimeInput.dialogLabel": {
651
- "defaultMessage": "Виберіть дату",
652
- "description": "Screen-reader-only accessible name for the DateTimeInput picker dialog. Same English-only \"date\" phrasing as the placeholder — don't add \"and time\" unless natural."
653
- },
654
650
  "@astryx.link.newTab": {
655
651
  "defaultMessage": "(відкривається в новій вкладці)",
656
652
  "description": "Visually-hidden (screen-reader-only) suffix appended to a Link's accessible name when it opens in a new tab. Example: `Documentation (opens in new tab)`."
@@ -643,10 +643,6 @@
643
643
  "defaultMessage": "Chọn ngày",
644
644
  "description": "Grey placeholder inside an empty DateTimeInput field. Note: the English says only \"date\" though the field is date+time — do not add \"and time\" unless natural."
645
645
  },
646
- "@astryx.dateTimeInput.dialogLabel": {
647
- "defaultMessage": "Chọn ngày",
648
- "description": "Screen-reader-only accessible name for the DateTimeInput picker dialog. Same English-only \"date\" phrasing as the placeholder — don't add \"and time\" unless natural."
649
- },
650
646
  "@astryx.link.newTab": {
651
647
  "defaultMessage": "(mở trong tab mới)",
652
648
  "description": "Visually-hidden (screen-reader-only) suffix appended to a Link's accessible name when it opens in a new tab. Example: `Documentation (opens in new tab)`."
@@ -651,10 +651,6 @@
651
651
  "defaultMessage": "选择日期",
652
652
  "description": "Grey placeholder inside an empty DateTimeInput field. Note: the English says only \"date\" though the field is date+time — do not add \"and time\" unless natural."
653
653
  },
654
- "@astryx.dateTimeInput.dialogLabel": {
655
- "defaultMessage": "选择日期",
656
- "description": "Screen-reader-only accessible name for the DateTimeInput picker dialog. Same English-only \"date\" phrasing as the placeholder — don't add \"and time\" unless natural."
657
- },
658
654
  "@astryx.link.newTab": {
659
655
  "defaultMessage": "(在新标签页中打开)",
660
656
  "description": "Visually-hidden (screen-reader-only) suffix appended to a Link's accessible name when it opens in a new tab. Example: `Documentation (opens in new tab)`."
@@ -651,10 +651,6 @@
651
651
  "defaultMessage": "選擇日期",
652
652
  "description": "Grey placeholder inside an empty DateTimeInput field. Note: the English says only \"date\" though the field is date+time — do not add \"and time\" unless natural."
653
653
  },
654
- "@astryx.dateTimeInput.dialogLabel": {
655
- "defaultMessage": "選擇日期",
656
- "description": "Screen-reader-only accessible name for the DateTimeInput picker dialog. Same English-only \"date\" phrasing as the placeholder — don't add \"and time\" unless natural."
657
- },
658
654
  "@astryx.link.newTab": {
659
655
  "defaultMessage": "(在新分頁中開啟)",
660
656
  "description": "Visually-hidden (screen-reader-only) suffix appended to a Link's accessible name when it opens in a new tab. Example: `Documentation (opens in new tab)`."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astryxdesign/core",
3
- "version": "0.5.1",
3
+ "version": "0.5.2-canary.1917581",
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",
@@ -661,6 +661,7 @@
661
661
  "react-dom": ">=19.0.0"
662
662
  },
663
663
  "devDependencies": {
664
+ "@astryxdesign/cli": "0.5.2-canary.1917581",
664
665
  "@babel/cli": "^8.0.4",
665
666
  "@babel/core": "^7.29.7",
666
667
  "@babel/preset-react": "^8.0.1",
@@ -668,8 +669,7 @@
668
669
  "@stylexjs/babel-plugin": "^0.19.0",
669
670
  "@testing-library/dom": "^10.0.0",
670
671
  "@testing-library/jest-dom": "^6.6.0",
671
- "@testing-library/react": "^16.3.2",
672
- "@astryxdesign/cli": "0.5.1"
672
+ "@testing-library/react": "^16.3.2"
673
673
  },
674
674
  "dependencies": {
675
675
  "intl-messageformat": "^11.2.9"
@@ -385,8 +385,7 @@ function StandaloneBottomSheet({
385
385
  {children}
386
386
  </BottomSheetPanel>
387
387
  </div>
388
- {/* A modal sheet's ::backdrop already answers Safari's edge sampler. */}
389
- {hasScrim ? null : <BottomSheetEdgeTint />}
388
+ <BottomSheetEdgeTint />
390
389
  </dialog>
391
390
  );
392
391
  }
@@ -101,15 +101,13 @@ describe('BottomSheetEdgeTint', () => {
101
101
  expect(tints()).toHaveLength(1);
102
102
  });
103
103
 
104
- // A modal sheet's ::backdrop is a case WebKit's sampler handles on its own,
105
- // so a second sampling target there would only fight it.
106
- it('leaves a modal sheet to its ::backdrop', () => {
104
+ it('gives a modal sheet the same surface-coloured edge tint', () => {
107
105
  render(
108
106
  <BottomSheet isOpen onOpenChange={() => {}} label="Place details">
109
107
  Content
110
108
  </BottomSheet>,
111
109
  );
112
- expect(tints()).toHaveLength(0);
110
+ expect(tints()).toHaveLength(1);
113
111
  });
114
112
 
115
113
  it('renders the tint inside the dialog, so it unmounts with the sheet', () => {
@@ -148,7 +146,7 @@ describe('BottomSheetEdgeTint', () => {
148
146
  expect(tints()).toHaveLength(1);
149
147
  });
150
148
 
151
- it('leaves a modal switcher flow to its ::backdrop', () => {
149
+ it('gives a modal switcher flow exactly one tint', () => {
152
150
  render(
153
151
  <BottomSheetSwitcher activeSheet="comment" onActiveSheetChange={() => {}}>
154
152
  <BottomSheet sheetId="comment" label="Add a comment">
@@ -156,7 +154,7 @@ describe('BottomSheetEdgeTint', () => {
156
154
  </BottomSheet>
157
155
  </BottomSheetSwitcher>,
158
156
  );
159
- expect(tints()).toHaveLength(0);
157
+ expect(tints()).toHaveLength(1);
160
158
  });
161
159
 
162
160
  it('keeps the tint out of the accessibility tree and out of hit testing', async () => {
@@ -6,7 +6,7 @@
6
6
  * @file BottomSheetEdgeTint.tsx
7
7
  * @input Uses StyleX and core color tokens
8
8
  * @output Exports BottomSheetEdgeTint, an internal decorative element
9
- * @position Private helper rendered inside a non-modal BottomSheet dialog
9
+ * @position Private helper rendered inside every BottomSheet dialog
10
10
  *
11
11
  * iOS 26 Safari dropped `<meta name="theme-color">` and instead derives the
12
12
  * colour it paints behind its translucent toolbars by sampling the page: it
@@ -14,13 +14,10 @@
14
14
  * `fixed`/`sticky` ancestor, and extends that element's declared
15
15
  * `background-color` into the browser chrome.
16
16
  *
17
- * A modal sheet is served by that heuristic already — WebKit has a dedicated
18
- * branch for a dialog's `::backdrop`. A non-modal sheet is not: the nearest
19
- * fixed ancestor of the panel is the sheet's own full-viewport `<dialog>`,
20
- * which is transparent and viewport-sized, and WebKit answers a viewport-sized
21
- * candidate by *keeping the colour it already had* — the host page's. The page
22
- * then shows through behind the address bar while the sheet covers the screen
23
- * above it.
17
+ * WebKit may otherwise extend either the dialog backdrop or the host page into
18
+ * the browser chrome. Which one wins varies with dialog mode and the page's
19
+ * own fixed or sticky edge content, so relying on the backdrop makes otherwise
20
+ * identical BottomSheets produce different toolbar colours.
24
21
  *
25
22
  * This element gives the heuristic something unambiguous to sample: fixed,
26
23
  * full width, flush with the bottom edge, taller than WebKit's 10px minimum
@@ -68,8 +65,8 @@ const styles = stylex.create({
68
65
  });
69
66
 
70
67
  /**
71
- * Colours the iOS Safari toolbar strip below a non-modal sheet. Renders
72
- * nothing visible; see the file header for why it exists.
68
+ * Colours the iOS Safari toolbar strip below a sheet. Renders nothing visible;
69
+ * see the file header for why it exists.
73
70
  */
74
71
  export function BottomSheetEdgeTint() {
75
72
  return (
@@ -632,8 +632,7 @@ export function BottomSheetSwitcher({
632
632
  ? {role: 'alertdialog'}
633
633
  : undefined)}>
634
634
  {children}
635
- {/* A modal flow's ::backdrop already answers Safari's edge sampler. */}
636
- {hasScrim ? null : <BottomSheetEdgeTint />}
635
+ <BottomSheetEdgeTint />
637
636
  </dialog>
638
637
  </BottomSheetSwitcherContext>
639
638
  );
@@ -70,6 +70,16 @@ describe('Button', () => {
70
70
  const button = screen.getByRole('button');
71
71
  // Button should be disabled when loading
72
72
  expect(button).toBeDisabled();
73
+ expect(button.className).toContain('styles.inactive');
74
+ expect(button.className).not.toContain('styles.disabled');
75
+ });
76
+
77
+ it('keeps the dimmed treatment for explicitly disabled buttons', () => {
78
+ render(<Button label="Submit" isDisabled />);
79
+ const button = screen.getByRole('button');
80
+ expect(button).toBeDisabled();
81
+ expect(button.className).toContain('styles.inactive');
82
+ expect(button.className).toContain('styles.disabled');
73
83
  });
74
84
 
75
85
  it('sets aria-busy synchronously while clickAction is pending', async () => {
@@ -99,18 +99,20 @@ const styles = stylex.create({
99
99
  pressable: {
100
100
  transform: {
101
101
  default: 'scale(1)',
102
- ':active': 'scale(0.98)',
102
+ ':active:where(:not(:disabled,[aria-disabled="true"]))': 'scale(0.98)',
103
103
  },
104
104
  },
105
- disabled: {
105
+ inactive: {
106
106
  cursor: 'default',
107
- opacity: 0.5,
108
107
  backgroundImage: 'none',
109
108
  transform: {
110
109
  default: 'none',
111
110
  ':active': 'none',
112
111
  },
113
112
  },
113
+ disabled: {
114
+ opacity: 0.5,
115
+ },
114
116
  ariaDisabled: {
115
117
  // The variants' hover treatment already steps aside for
116
118
  // `[aria-disabled]`; `:active` still matches a press on an aria-disabled
@@ -270,7 +272,8 @@ export interface ButtonProps extends BaseProps<HTMLButtonElement> {
270
272
  */
271
273
  isDisabled?: boolean;
272
274
  /**
273
- * Whether the button is in a loading state.
275
+ * Whether the button is in a loading state. Loading prevents interaction
276
+ * without dimming the spinner; explicit disabled states remain dimmed.
274
277
  * @default false
275
278
  */
276
279
  isLoading?: boolean;
@@ -573,6 +576,10 @@ export function Button({
573
576
  // not disabled, so clicks keep landing and can interrupt the in-flight action.
574
577
  const buttonDisabled =
575
578
  isDisabled || groupDisabled || (isLoadingState && !isInterruptible);
579
+ // A loading button remains non-interactive, but its spinner communicates an
580
+ // active state and must retain contrast. Only explicitly disabled controls
581
+ // receive the visually dimmed treatment.
582
+ const visuallyDisabled = isDisabled || groupDisabled;
576
583
  // isIconOnly prop is the source of truth for icon-only rendering.
577
584
  // When false (default), label is always rendered as visible text.
578
585
 
@@ -639,7 +646,8 @@ export function Button({
639
646
  sizeStyles[size],
640
647
  isIconOnly && styles.iconOnly,
641
648
  interactionOverlayStyles.backgroundImage,
642
- buttonDisabled && styles.disabled,
649
+ buttonDisabled && styles.inactive,
650
+ visuallyDisabled && styles.disabled,
643
651
  useAriaDisabled && styles.ariaDisabled,
644
652
  renderAsLink && styles.link,
645
653
  !buttonGroup && styles.pressable,
@@ -5,7 +5,7 @@
5
5
  export const docs = {
6
6
  name: 'Calendar',
7
7
  displayName: 'Calendar',
8
- category: 'Data Input',
8
+ category: 'Form Controls',
9
9
  keywords: ["calendar","datepicker","date picker","rangepicker","date range","monthview","daypicker"],
10
10
  usage: {
11
11
  description:
@@ -46,6 +46,50 @@ describe('ChatToolCalls', () => {
46
46
  expect(screen.queryByText('1.2s')).not.toBeInTheDocument();
47
47
  });
48
48
 
49
+ it.each([
50
+ ['pending', 'Pending'],
51
+ ['running', 'Running'],
52
+ ['complete', 'Complete'],
53
+ ['error', 'Failed'],
54
+ ] as const)(
55
+ 'names the %s status for assistive technology',
56
+ (status, label) => {
57
+ render(<ChatToolCalls calls={[{name: 'bash', status}]} />);
58
+ expect(screen.getByText(label)).toBeInTheDocument();
59
+ },
60
+ );
61
+
62
+ it('includes the status in an expandable row accessible name', () => {
63
+ render(
64
+ <ChatToolCalls
65
+ calls={[
66
+ {
67
+ name: 'readFile',
68
+ status: 'running',
69
+ resultDetail: <div>file contents</div>,
70
+ },
71
+ ]}
72
+ />,
73
+ );
74
+ expect(
75
+ screen.getByRole('button', {name: /Running.*readFile/}),
76
+ ).toBeInTheDocument();
77
+ });
78
+
79
+ it('includes the latest status in a collapsed group accessible name', () => {
80
+ render(
81
+ <ChatToolCalls
82
+ calls={[
83
+ {name: 'searchCode', status: 'complete'},
84
+ {name: 'editFile', status: 'running'},
85
+ ]}
86
+ />,
87
+ );
88
+ expect(
89
+ screen.getByRole('button', {name: /Running.*editFile/}),
90
+ ).toBeInTheDocument();
91
+ });
92
+
49
93
  it('defaults to collapsed', () => {
50
94
  render(
51
95
  <ChatToolCalls