pixelize-design-library 2.4.2-beta.65 → 2.4.2-beta.66

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 (482) hide show
  1. package/CHANGELOG.md +437 -13
  2. package/COMPONENT-GOTCHAS.md +150 -91
  3. package/DESIGN-GUIDE.md +47 -7
  4. package/README.md +37 -3
  5. package/dist/Components/Accordion/Accordion.js +11 -8
  6. package/dist/Components/Accordion/AccordionProps.d.ts +4 -0
  7. package/dist/Components/Accordion/accordionColors.js +1 -2
  8. package/dist/Components/Apexcharts/ApexLineChart/ApexLineChart.js +1 -0
  9. package/dist/Components/Apexcharts/ApexLineChart/ApexLineChartProps.d.ts +2 -2
  10. package/dist/Components/Apexcharts/ApexPieChart/ApexPieChart.d.ts +1 -1
  11. package/dist/Components/Apexcharts/ApexPieChart/ApexPieChart.js +6 -5
  12. package/dist/Components/Apexcharts/ApexPieChart/ApexPieChartProps.d.ts +3 -1
  13. package/dist/Components/Apexcharts/ApexPieChart/pieImageTexture.d.ts +2 -0
  14. package/dist/Components/Apexcharts/ApexPieChart/pieImageTexture.js +13 -0
  15. package/dist/Components/AppSwitcher/AppSwitcher.js +6 -3
  16. package/dist/Components/AppSwitcher/AppSwitcherProps.d.ts +3 -1
  17. package/dist/Components/AppSwitcher/AppSwitcherProps.js +18 -11
  18. package/dist/Components/AppSwitcher/pixelizeSuite.d.ts +24 -0
  19. package/dist/Components/AppSwitcher/pixelizeSuite.js +71 -0
  20. package/dist/Components/AppearanceSettings/AppearanceSettings.js +3 -3
  21. package/dist/Components/AppearanceSettings/AppearanceSettingsProps.d.ts +2 -2
  22. package/dist/Components/Avatar/avatarColorway.d.ts +2 -2
  23. package/dist/Components/Avatar/avatarColorway.js +7 -6
  24. package/dist/Components/Breadcrumbs/BreadcrumbsProps.d.ts +1 -1
  25. package/dist/Components/Button/Button.styles.js +5 -2
  26. package/dist/Components/Button/ButtonProps.d.ts +2 -4
  27. package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.js +3 -1
  28. package/dist/Components/CalendarGrid/CalendarGrid.js +5 -3
  29. package/dist/Components/CalendarGrid/CalendarGridProps.d.ts +1 -1
  30. package/dist/Components/Card/Card.d.ts +1 -0
  31. package/dist/Components/Card/Card.js +1 -0
  32. package/dist/Components/Checkbox/Checkbox.styles.js +3 -1
  33. package/dist/Components/CheckoutKit/selectable.d.ts +3 -1
  34. package/dist/Components/CheckoutKit/selectable.js +10 -7
  35. package/dist/Components/CheckoutKit/tonalHover.d.ts +2 -0
  36. package/dist/Components/CheckoutKit/tonalHover.js +6 -0
  37. package/dist/Components/ChoiceCard/ChoiceCard.d.ts +1 -1
  38. package/dist/Components/ChoiceCard/ChoiceCard.js +2 -1
  39. package/dist/Components/ChoiceCard/ChoiceCardProps.d.ts +6 -0
  40. package/dist/Components/Common/FieldMessage.d.ts +1 -0
  41. package/dist/Components/Common/FormLabel.d.ts +1 -1
  42. package/dist/Components/Common/FormLabel.js +4 -3
  43. package/dist/Components/Common/HelperText.d.ts +2 -2
  44. package/dist/Components/Common/HelperText.js +1 -2
  45. package/dist/Components/Common/activationKey.d.ts +5 -0
  46. package/dist/Components/Common/activationKey.js +12 -0
  47. package/dist/Components/Common/dataAttributes.d.ts +4 -0
  48. package/dist/Components/Common/fieldMessageStyles.js +2 -1
  49. package/dist/Components/Common/findSlot.d.ts +2 -0
  50. package/dist/Components/Common/findSlot.js +24 -0
  51. package/dist/Components/Common/surfaceFocusRing.d.ts +1 -0
  52. package/dist/Components/Common/surfaceFocusRing.js +7 -0
  53. package/dist/Components/ConfirmDialog/ConfirmDialog.js +17 -5
  54. package/dist/Components/ConfirmDialog/ConfirmDialogProps.d.ts +38 -10
  55. package/dist/Components/CopyButton/CopyButton.d.ts +1 -0
  56. package/dist/Components/CopyButton/CopyButton.js +3 -6
  57. package/dist/Components/CouponField/CouponField.js +5 -2
  58. package/dist/Components/CustomModulesTable/CustomModulesTable.js +3 -1
  59. package/dist/Components/DatePicker/CalendarPanel.d.ts +1 -0
  60. package/dist/Components/DatePicker/CalendarPanel.js +3 -1
  61. package/dist/Components/DatePicker/DatePicker.js +24 -26
  62. package/dist/Components/DatePicker/DatePickerProps.d.ts +8 -0
  63. package/dist/Components/DatePicker/PickerPortal.js +1 -1
  64. package/dist/Components/DatePicker/RangeDatePicker.d.ts +7 -0
  65. package/dist/Components/DatePicker/RangeDatePicker.js +10 -29
  66. package/dist/Components/DatePicker/SingleDatePicker.js +5 -21
  67. package/dist/Components/DatePicker/TimeOnlyPicker.js +2 -20
  68. package/dist/Components/DescriptionList/DescriptionList.js +1 -1
  69. package/dist/Components/DetailSections/DetailSections.js +2 -1
  70. package/dist/Components/Divider/Divider.d.ts +3 -3
  71. package/dist/Components/Divider/Divider.js +3 -3
  72. package/dist/Components/Drawer/Drawer.d.ts +2 -0
  73. package/dist/Components/Drawer/Drawer.js +23 -25
  74. package/dist/Components/Dropdown/DropDown.js +6 -21
  75. package/dist/Components/Editor/Editor.js +6 -2
  76. package/dist/Components/Editor/EditorProps.d.ts +17 -1
  77. package/dist/Components/Editor/editorLabels.js +1 -0
  78. package/dist/Components/Editor/editorTokenStyles.d.ts +8 -0
  79. package/dist/Components/Editor/editorTokenStyles.js +9 -1
  80. package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.d.ts +1 -1
  81. package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +9 -2
  82. package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtpProps.d.ts +15 -1
  83. package/dist/Components/EmptyState/EmptyStateProps.d.ts +21 -0
  84. package/dist/Components/EmptyState/FilteredEmptyState.d.ts +5 -0
  85. package/dist/Components/EmptyState/FilteredEmptyState.js +23 -0
  86. package/dist/Components/FieldSelectModal/FieldSelectModal.d.ts +1 -0
  87. package/dist/Components/FilePreview/FilePreview.js +7 -3
  88. package/dist/Components/FilePreview/FilePreviewProps.d.ts +2 -1
  89. package/dist/Components/FileUpload/FileUpload.js +8 -9
  90. package/dist/Components/FileUpload/FileUploadProps.d.ts +2 -2
  91. package/dist/Components/FileUploader/FileUploader.js +5 -6
  92. package/dist/Components/FilterSidebar/FilterSidebar.d.ts +7 -9
  93. package/dist/Components/FilterSidebar/FilterSidebar.js +90 -233
  94. package/dist/Components/FilterSidebar/OptionsSection.d.ts +14 -0
  95. package/dist/Components/FilterSidebar/OptionsSection.js +46 -0
  96. package/dist/Components/FilterSidebar/RangeSection.d.ts +17 -0
  97. package/dist/Components/FilterSidebar/RangeSection.js +80 -0
  98. package/dist/Components/FilterSidebar/SectionHeader.d.ts +13 -0
  99. package/dist/Components/FilterSidebar/SectionHeader.js +29 -0
  100. package/dist/Components/FilterSidebar/useStableCallback.d.ts +1 -0
  101. package/dist/Components/FilterSidebar/useStableCallback.js +12 -0
  102. package/dist/Components/Form/FormWrapper.d.ts +7 -7
  103. package/dist/Components/Form/FormWrapper.js +5 -3
  104. package/dist/Components/FormField/FormField.js +1 -1
  105. package/dist/Components/Header/Header.js +1 -1
  106. package/dist/Components/Header/HeaderActions.js +4 -2
  107. package/dist/Components/IconButton/IconButtonProps.d.ts +2 -1
  108. package/dist/Components/Input/TextInput.js +2 -2
  109. package/dist/Components/Input/TextInputProps.d.ts +3 -1
  110. package/dist/Components/KanbanBoard/AccountCard.js +1 -1
  111. package/dist/Components/KanbanBoard/KanbanBoard.d.ts +1 -1
  112. package/dist/Components/KanbanBoard/KanbanBoard.js +11 -7
  113. package/dist/Components/LauncherTrigger/LauncherTrigger.js +1 -1
  114. package/dist/Components/LazyWrapper/LazyWrapper.d.ts +2 -1
  115. package/dist/Components/LazyWrapper/LazyWrapper.js +1 -1
  116. package/dist/Components/MediaViewer/MediaViewer.js +4 -3
  117. package/dist/Components/MediaViewer/components/MediaAudioPlayer.js +5 -1
  118. package/dist/Components/MediaViewer/components/MediaImageViewer.js +19 -8
  119. package/dist/Components/MediaViewer/components/MediaScrubber.js +7 -2
  120. package/dist/Components/MediaViewer/components/MediaVideoPlayer.js +3 -1
  121. package/dist/Components/MediaViewer/components/ViewerIconButton.js +3 -1
  122. package/dist/Components/MediaViewer/hooks/useFileViewer.d.ts +1 -0
  123. package/dist/Components/MediaViewer/mediaItems.d.ts +1 -0
  124. package/dist/Components/MediaViewer/mediaItems.js +5 -0
  125. package/dist/Components/Modal/Modal.d.ts +1 -0
  126. package/dist/Components/Modal/Modal.js +7 -25
  127. package/dist/Components/Modal/warnDroppedSlotChildren.d.ts +1 -1
  128. package/dist/Components/Modal/warnDroppedSlotChildren.js +7 -3
  129. package/dist/Components/NavLauncher/LauncherTabs.js +2 -1
  130. package/dist/Components/NavLauncher/NavLauncher.js +44 -22
  131. package/dist/Components/NavLauncher/NavLauncherProps.d.ts +6 -4
  132. package/dist/Components/NavLauncher/ScopeBar.js +4 -2
  133. package/dist/Components/NavLauncher/engine/engine.js +2 -1
  134. package/dist/Components/NavLauncher/engine/fold.js +2 -1
  135. package/dist/Components/NavLauncher/launcherParts.d.ts +12 -0
  136. package/dist/Components/NavLauncher/launcherParts.js +45 -11
  137. package/dist/Components/NavLauncher/searchLayout.d.ts +1 -0
  138. package/dist/Components/NavLauncher/searchLayout.js +3 -1
  139. package/dist/Components/NavLauncher/spotlightParts.d.ts +6 -2
  140. package/dist/Components/NavLauncher/spotlightParts.js +22 -9
  141. package/dist/Components/NavLauncher/useCopiedFlash.d.ts +6 -0
  142. package/dist/Components/NavLauncher/useCopiedFlash.js +21 -0
  143. package/dist/Components/NavigationBar/NavigationBar.js +6 -5
  144. package/dist/Components/NoteTextArea/NoteTextArea.js +12 -17
  145. package/dist/Components/NoteTextArea/NoteTextAreaProps.d.ts +5 -3
  146. package/dist/Components/Notification/Notification.js +19 -21
  147. package/dist/Components/Notification/NotificationProps.d.ts +1 -1
  148. package/dist/Components/NotificationBell/notificationHelpers.d.ts +16 -1
  149. package/dist/Components/NotificationBell/notificationHelpers.js +13 -7
  150. package/dist/Components/OffersList/OffersList.js +4 -2
  151. package/dist/Components/OptionChip/OptionChip.js +3 -2
  152. package/dist/Components/OptionChip/optionInk.js +4 -2
  153. package/dist/Components/OrderStatusTimeline/OrderStatusTimeline.js +2 -1
  154. package/dist/Components/OrgSwitcher/OrgSwitcher.js +13 -6
  155. package/dist/Components/OrgSwitcher/OrgSwitcherProps.d.ts +1 -1
  156. package/dist/Components/OrganizationDetails/OrganizationDetails.js +4 -7
  157. package/dist/Components/OrganizationDetails/OrganizationDetailsProps.d.ts +4 -2
  158. package/dist/Components/PdfViewer/PdfViewer.d.ts +1 -0
  159. package/dist/Components/PlanBadge/PlanBadgeProps.d.ts +1 -1
  160. package/dist/Components/PlanPill/PlanPill.js +4 -2
  161. package/dist/Components/PlanPill/PlanPillProps.d.ts +1 -1
  162. package/dist/Components/ProductCard/ProductCardAction.js +2 -1
  163. package/dist/Components/ProductCard/ProductCardSwatches.js +2 -1
  164. package/dist/Components/ProductDetails/ProductDetails.js +2 -1
  165. package/dist/Components/ProfileCard/ProfileCard.d.ts +1 -0
  166. package/dist/Components/ProfileCard/ProfileCard.js +12 -26
  167. package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +4 -2
  168. package/dist/Components/ProgressBar/ProgressBar.js +2 -1
  169. package/dist/Components/QuantityStepper/QuantityStepper.js +5 -2
  170. package/dist/Components/QueryState/QueryStateBoundary.d.ts +1 -1
  171. package/dist/Components/QueryState/QueryStateBoundary.js +5 -1
  172. package/dist/Components/QueryState/QueryStateProps.d.ts +6 -2
  173. package/dist/Components/RadioButton/RadioButton.js +2 -3
  174. package/dist/Components/RolesPermission/RolesPermission.js +12 -8
  175. package/dist/Components/ScrollToTop/ScrollToTop.d.ts +1 -0
  176. package/dist/Components/ScrollbarBox/ScrollbarBox.d.ts +4 -1
  177. package/dist/Components/ScrollbarBox/ScrollbarBox.js +10 -4
  178. package/dist/Components/SearchSelect/SearchSelect.d.ts +1 -1
  179. package/dist/Components/SearchSelect/SearchSelect.js +8 -5
  180. package/dist/Components/SearchSelect/SearchSelectProps.d.ts +3 -3
  181. package/dist/Components/SegmentedControl/SegmentedControl.d.ts +1 -1
  182. package/dist/Components/SegmentedControl/SegmentedControl.js +1 -1
  183. package/dist/Components/Select/Select.js +6 -0
  184. package/dist/Components/Select/SelectNative.d.ts +16 -0
  185. package/dist/Components/Select/SelectPopup.js +170 -63
  186. package/dist/Components/Select/SelectProps.d.ts +30 -2
  187. package/dist/Components/Select/groupedWindow.d.ts +21 -0
  188. package/dist/Components/Select/groupedWindow.js +50 -0
  189. package/dist/Components/SelectSearch/SelectSearch.d.ts +1 -1
  190. package/dist/Components/SelectSearch/SelectSearch.js +48 -38
  191. package/dist/Components/SelectSearch/SelectSearchProps.d.ts +3 -3
  192. package/dist/Components/SelectV2/SelectV2.d.ts +1 -1
  193. package/dist/Components/SelectV2/SelectV2.js +1 -1
  194. package/dist/Components/SelectV2/SelectV2Props.d.ts +3 -3
  195. package/dist/Components/SideBar/SecondaryBar.js +3 -2
  196. package/dist/Components/SideBar/components/MenuItemBox.js +3 -2
  197. package/dist/Components/SideBar/components/MenuItems.js +1 -1
  198. package/dist/Components/SideBar/components/OtherApps.js +2 -2
  199. package/dist/Components/SideBar/components/PinnedSection.js +1 -1
  200. package/dist/Components/SideBar/sidebarScale.d.ts +2 -2
  201. package/dist/Components/SideBar/sidebarScale.js +2 -2
  202. package/dist/Components/SignInActivityTable/SignInActivityTable.js +7 -2
  203. package/dist/Components/SignInActivityTable/SignInActivityTableProps.d.ts +1 -1
  204. package/dist/Components/SignInActivityTable/scrollRegionRing.d.ts +10 -0
  205. package/dist/Components/SignInActivityTable/scrollRegionRing.js +14 -0
  206. package/dist/Components/Skeletons/SkeletonProps.d.ts +5 -1
  207. package/dist/Components/Slider/Slider.d.ts +2 -0
  208. package/dist/Components/Slider/Slider.js +5 -4
  209. package/dist/Components/StageProgress/StageItem.js +2 -1
  210. package/dist/Components/StageProgress/StageProgress.js +8 -2
  211. package/dist/Components/StageProgress/StageProgressProps.d.ts +2 -0
  212. package/dist/Components/StageProgress/StepperStage.js +2 -1
  213. package/dist/Components/StickyBuyBar/StickyBuyBar.js +2 -1
  214. package/dist/Components/Table/Table.js +5 -3
  215. package/dist/Components/Table/components/HeaderActions.js +5 -3
  216. package/dist/Components/Table/components/TableBody.js +13 -8
  217. package/dist/Components/Table/components/TableGroupRow.js +2 -1
  218. package/dist/Components/Table/components/TableHeader.js +14 -20
  219. package/dist/Components/Table/components/rowDetail.js +3 -2
  220. package/dist/Components/Table/filters/ActiveFilters.js +6 -3
  221. package/dist/Components/Table/filters/CompactSelect.js +2 -1
  222. package/dist/Components/Table/filters/FilterDatePicker.d.ts +6 -0
  223. package/dist/Components/Table/filters/FilterDatePicker.js +61 -0
  224. package/dist/Components/Table/filters/LeftFilterPane.d.ts +1 -0
  225. package/dist/Components/Table/filters/LeftFilterPane.js +14 -6
  226. package/dist/Components/Table/hooks/useTable.js +11 -7
  227. package/dist/Components/Table/settings/ManageColumns.js +4 -3
  228. package/dist/Components/Table/settings/TableSettings.js +4 -4
  229. package/dist/Components/Tabs/Tabs.d.ts +1 -0
  230. package/dist/Components/Tabs/Tabs.js +1 -0
  231. package/dist/Components/Tabs/components/CountBadge.d.ts +1 -0
  232. package/dist/Components/Tabs/components/TabList.d.ts +1 -0
  233. package/dist/Components/Tabs/components/TabList.js +1 -0
  234. package/dist/Components/Tabs/components/TabPanel.d.ts +1 -0
  235. package/dist/Components/Tabs/components/TabPanel.js +1 -0
  236. package/dist/Components/Tabs/tabStyles.js +4 -2
  237. package/dist/Components/Tag/Tag.js +5 -4
  238. package/dist/Components/Tag/Tag.styles.js +5 -4
  239. package/dist/Components/Tag/TagProps.d.ts +4 -1
  240. package/dist/Components/Tag/tagDot.js +10 -3
  241. package/dist/Components/TagInput/TagInput.js +6 -5
  242. package/dist/Components/TagInput/TagInputProps.d.ts +15 -0
  243. package/dist/Components/TagInput/tagEntries.d.ts +7 -1
  244. package/dist/Components/TagInput/tagEntries.js +18 -5
  245. package/dist/Components/TimePicker/TimePicker.js +7 -3
  246. package/dist/Components/TimePicker/TimePickerProps.d.ts +2 -0
  247. package/dist/Components/Timeline/Timeline.js +13 -9
  248. package/dist/Components/Toaster/Toaster.js +2 -1
  249. package/dist/Components/Toggle/TableToggle.d.ts +1 -1
  250. package/dist/Components/Toggle/TableToggle.js +1 -1
  251. package/dist/Components/UpgradeButton/UpgradeButton.js +3 -2
  252. package/dist/Components/UpgradeButton/UpgradeButtonProps.d.ts +1 -1
  253. package/dist/Components/UserDetails/UserDetails.js +5 -7
  254. package/dist/Components/WishlistToggle/WishlistToggle.js +2 -1
  255. package/dist/Components/WorkspaceWindow/WorkspaceTrayPreview.js +11 -1
  256. package/dist/Components/WorkspaceWindow/WorkspaceWindow.js +3 -1
  257. package/dist/Components/WorkspaceWindow/WorkspaceWindowProps.d.ts +14 -7
  258. package/dist/Hooks/useOutsideMouseDown.d.ts +11 -0
  259. package/dist/Hooks/useOutsideMouseDown.js +30 -0
  260. package/dist/Hooks/usePreferences.js +30 -12
  261. package/dist/Hooks/useScrollableRegion.d.ts +17 -0
  262. package/dist/Hooks/useScrollableRegion.js +36 -0
  263. package/dist/Hooks/useSidebarPrefs.d.ts +1 -0
  264. package/dist/Theme/chakra/Menu.styles.d.ts +4 -0
  265. package/dist/Theme/chakra/Menu.styles.js +6 -0
  266. package/dist/Theme/chakra/componentStyles.d.ts +4 -0
  267. package/dist/Theme/chakra/componentStyles.js +1 -1
  268. package/dist/Theme/chakra/createBrandTheme.d.ts +1 -0
  269. package/dist/Theme/chakra/focusRing.styles.d.ts +1 -1
  270. package/dist/Theme/chakra/focusRing.styles.js +3 -3
  271. package/dist/Theme/chakra/paletteFromTheme.d.ts +2 -1
  272. package/dist/Theme/chakra/paletteFromTheme.js +18 -4
  273. package/dist/Theme/provider/PixelizeThemeProvider.d.ts +1 -0
  274. package/dist/Theme/provider/ThemeSwitcher.d.ts +1 -0
  275. package/dist/Theme/provider/ThemeSwitcher.js +1 -1
  276. package/dist/Theme/testing/testPalette.d.ts +1 -0
  277. package/dist/Theme/tokens/builders/buildDarkPalette.d.ts +1 -0
  278. package/dist/Theme/tokens/builders/filledSurface.js +3 -2
  279. package/dist/Theme/tokens/builders/focusRing.js +4 -1
  280. package/dist/Theme/tokens/builders/paletteScale.d.ts +2 -0
  281. package/dist/Theme/tokens/builders/paletteScale.js +10 -0
  282. package/dist/Theme/tokens/types.d.ts +1 -0
  283. package/dist/Utils/accountHandoff.d.ts +3 -0
  284. package/dist/Utils/price.d.ts +1 -0
  285. package/dist/Utils/tabular.d.ts +30 -0
  286. package/dist/Utils/tabular.js +61 -0
  287. package/dist/esm/Components/Accordion/Accordion.js +11 -8
  288. package/dist/esm/Components/Accordion/accordionColors.js +2 -3
  289. package/dist/esm/Components/Apexcharts/ApexLineChart/ApexLineChart.js +2 -1
  290. package/dist/esm/Components/Apexcharts/ApexPieChart/ApexPieChart.js +6 -5
  291. package/dist/esm/Components/Apexcharts/ApexPieChart/pieImageTexture.js +10 -0
  292. package/dist/esm/Components/AppSwitcher/AppSwitcher.js +6 -3
  293. package/dist/esm/Components/AppSwitcher/AppSwitcherProps.js +18 -11
  294. package/dist/esm/Components/AppSwitcher/pixelizeSuite.js +67 -0
  295. package/dist/esm/Components/AppearanceSettings/AppearanceSettings.js +3 -3
  296. package/dist/esm/Components/Avatar/avatarColorway.js +4 -4
  297. package/dist/esm/Components/Button/Button.styles.js +5 -2
  298. package/dist/esm/Components/ButtonGroupIcon/ButtonGroupIcon.js +3 -1
  299. package/dist/esm/Components/CalendarGrid/CalendarGrid.js +5 -3
  300. package/dist/esm/Components/Card/Card.js +1 -0
  301. package/dist/esm/Components/Checkbox/Checkbox.styles.js +3 -1
  302. package/dist/esm/Components/CheckoutKit/selectable.js +10 -7
  303. package/dist/esm/Components/CheckoutKit/tonalHover.js +2 -0
  304. package/dist/esm/Components/ChoiceCard/ChoiceCard.js +2 -1
  305. package/dist/esm/Components/Common/FormLabel.js +4 -3
  306. package/dist/esm/Components/Common/HelperText.js +1 -2
  307. package/dist/esm/Components/Common/activationKey.js +7 -0
  308. package/dist/esm/Components/Common/fieldMessageStyles.js +2 -1
  309. package/dist/esm/Components/Common/findSlot.js +17 -0
  310. package/dist/esm/Components/Common/surfaceFocusRing.js +3 -0
  311. package/dist/esm/Components/ConfirmDialog/ConfirmDialog.js +18 -6
  312. package/dist/esm/Components/CopyButton/CopyButton.js +3 -6
  313. package/dist/esm/Components/CouponField/CouponField.js +5 -2
  314. package/dist/esm/Components/CustomModulesTable/CustomModulesTable.js +3 -1
  315. package/dist/esm/Components/DatePicker/CalendarPanel.js +3 -1
  316. package/dist/esm/Components/DatePicker/DatePicker.js +25 -27
  317. package/dist/esm/Components/DatePicker/PickerPortal.js +2 -2
  318. package/dist/esm/Components/DatePicker/RangeDatePicker.js +10 -29
  319. package/dist/esm/Components/DatePicker/SingleDatePicker.js +5 -21
  320. package/dist/esm/Components/DatePicker/TimeOnlyPicker.js +2 -20
  321. package/dist/esm/Components/DescriptionList/DescriptionList.js +1 -1
  322. package/dist/esm/Components/DetailSections/DetailSections.js +2 -1
  323. package/dist/esm/Components/Divider/Divider.js +3 -3
  324. package/dist/esm/Components/Drawer/Drawer.js +19 -18
  325. package/dist/esm/Components/Dropdown/DropDown.js +7 -22
  326. package/dist/esm/Components/Editor/Editor.js +7 -3
  327. package/dist/esm/Components/Editor/editorLabels.js +1 -0
  328. package/dist/esm/Components/Editor/editorTokenStyles.js +7 -0
  329. package/dist/esm/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +8 -4
  330. package/dist/esm/Components/EmptyState/FilteredEmptyState.js +18 -0
  331. package/dist/esm/Components/FilePreview/FilePreview.js +8 -4
  332. package/dist/esm/Components/FileUpload/FileUpload.js +8 -9
  333. package/dist/esm/Components/FileUploader/FileUploader.js +6 -7
  334. package/dist/esm/Components/FilterSidebar/FilterSidebar.js +94 -237
  335. package/dist/esm/Components/FilterSidebar/OptionsSection.js +41 -0
  336. package/dist/esm/Components/FilterSidebar/RangeSection.js +78 -0
  337. package/dist/esm/Components/FilterSidebar/SectionHeader.js +23 -0
  338. package/dist/esm/Components/FilterSidebar/useStableCallback.js +8 -0
  339. package/dist/esm/Components/Form/FormWrapper.js +5 -3
  340. package/dist/esm/Components/FormField/FormField.js +1 -1
  341. package/dist/esm/Components/Header/Header.js +1 -1
  342. package/dist/esm/Components/Header/HeaderActions.js +6 -4
  343. package/dist/esm/Components/Input/TextInput.js +2 -2
  344. package/dist/esm/Components/KanbanBoard/AccountCard.js +1 -1
  345. package/dist/esm/Components/KanbanBoard/KanbanActions/KanbanActions.js +2 -2
  346. package/dist/esm/Components/KanbanBoard/KanbanBoard.js +11 -7
  347. package/dist/esm/Components/LauncherTrigger/LauncherTrigger.js +1 -1
  348. package/dist/esm/Components/LazyWrapper/LazyWrapper.js +1 -1
  349. package/dist/esm/Components/MediaViewer/MediaViewer.js +5 -4
  350. package/dist/esm/Components/MediaViewer/components/MediaAudioPlayer.js +5 -1
  351. package/dist/esm/Components/MediaViewer/components/MediaImageViewer.js +19 -8
  352. package/dist/esm/Components/MediaViewer/components/MediaScrubber.js +7 -2
  353. package/dist/esm/Components/MediaViewer/components/MediaVideoPlayer.js +3 -1
  354. package/dist/esm/Components/MediaViewer/components/ViewerIconButton.js +3 -1
  355. package/dist/esm/Components/MediaViewer/mediaItems.js +4 -0
  356. package/dist/esm/Components/Modal/Modal.js +2 -17
  357. package/dist/esm/Components/Modal/warnDroppedSlotChildren.js +7 -3
  358. package/dist/esm/Components/NavLauncher/LauncherTabs.js +2 -1
  359. package/dist/esm/Components/NavLauncher/NavLauncher.js +47 -25
  360. package/dist/esm/Components/NavLauncher/ScopeBar.js +4 -2
  361. package/dist/esm/Components/NavLauncher/engine/engine.js +2 -1
  362. package/dist/esm/Components/NavLauncher/engine/fold.js +2 -1
  363. package/dist/esm/Components/NavLauncher/launcherParts.js +40 -8
  364. package/dist/esm/Components/NavLauncher/searchLayout.js +1 -0
  365. package/dist/esm/Components/NavLauncher/spotlightParts.js +23 -10
  366. package/dist/esm/Components/NavLauncher/useCopiedFlash.js +17 -0
  367. package/dist/esm/Components/NavigationBar/NavigationBar.js +6 -5
  368. package/dist/esm/Components/NoteTextArea/NoteTextArea.js +12 -17
  369. package/dist/esm/Components/Notification/Notification.js +20 -22
  370. package/dist/esm/Components/NotificationBell/notificationHelpers.js +12 -6
  371. package/dist/esm/Components/OffersList/OffersList.js +4 -2
  372. package/dist/esm/Components/OptionChip/OptionChip.js +3 -2
  373. package/dist/esm/Components/OptionChip/optionInk.js +4 -2
  374. package/dist/esm/Components/OrderStatusTimeline/OrderStatusTimeline.js +2 -1
  375. package/dist/esm/Components/OrgSwitcher/OrgSwitcher.js +14 -7
  376. package/dist/esm/Components/OrganizationDetails/OrganizationDetails.js +5 -8
  377. package/dist/esm/Components/PlanPill/PlanPill.js +4 -2
  378. package/dist/esm/Components/ProductCard/ProductCardAction.js +2 -1
  379. package/dist/esm/Components/ProductCard/ProductCardSwatches.js +2 -1
  380. package/dist/esm/Components/ProductDetails/ProductDetails.js +2 -1
  381. package/dist/esm/Components/ProfileCard/ProfileCard.js +6 -17
  382. package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +4 -2
  383. package/dist/esm/Components/ProgressBar/ProgressBar.js +2 -1
  384. package/dist/esm/Components/QuantityStepper/QuantityStepper.js +5 -2
  385. package/dist/esm/Components/QueryState/QueryStateBoundary.js +5 -1
  386. package/dist/esm/Components/RadioButton/RadioButton.js +2 -3
  387. package/dist/esm/Components/RolesPermission/RolesPermission.js +12 -8
  388. package/dist/esm/Components/ScrollbarBox/ScrollbarBox.js +9 -3
  389. package/dist/esm/Components/SearchSelect/SearchSelect.js +8 -5
  390. package/dist/esm/Components/SegmentedControl/SegmentedControl.js +1 -1
  391. package/dist/esm/Components/Select/Select.js +6 -0
  392. package/dist/esm/Components/Select/SelectPopup.js +171 -64
  393. package/dist/esm/Components/Select/groupedWindow.js +44 -0
  394. package/dist/esm/Components/SelectSearch/SelectSearch.js +49 -39
  395. package/dist/esm/Components/SelectV2/SelectV2.js +1 -1
  396. package/dist/esm/Components/SideBar/SecondaryBar.js +3 -2
  397. package/dist/esm/Components/SideBar/components/MenuItemBox.js +3 -2
  398. package/dist/esm/Components/SideBar/components/MenuItems.js +1 -1
  399. package/dist/esm/Components/SideBar/components/OtherApps.js +2 -2
  400. package/dist/esm/Components/SideBar/components/PinnedSection.js +1 -1
  401. package/dist/esm/Components/SideBar/sidebarScale.js +2 -2
  402. package/dist/esm/Components/SignInActivityTable/SignInActivityTable.js +8 -3
  403. package/dist/esm/Components/SignInActivityTable/scrollRegionRing.js +9 -0
  404. package/dist/esm/Components/Slider/Slider.js +6 -5
  405. package/dist/esm/Components/StageProgress/StageItem.js +2 -1
  406. package/dist/esm/Components/StageProgress/StageProgress.js +8 -2
  407. package/dist/esm/Components/StageProgress/StepperStage.js +2 -1
  408. package/dist/esm/Components/StickyBuyBar/StickyBuyBar.js +2 -1
  409. package/dist/esm/Components/Table/Table.js +8 -6
  410. package/dist/esm/Components/Table/components/HeaderActions.js +7 -5
  411. package/dist/esm/Components/Table/components/TableBody.js +13 -8
  412. package/dist/esm/Components/Table/components/TableGroupRow.js +2 -1
  413. package/dist/esm/Components/Table/components/TableHeader.js +15 -21
  414. package/dist/esm/Components/Table/components/rowDetail.js +3 -2
  415. package/dist/esm/Components/Table/filters/ActiveFilters.js +8 -5
  416. package/dist/esm/Components/Table/filters/CompactSelect.js +2 -1
  417. package/dist/esm/Components/Table/filters/FilterDatePicker.js +20 -0
  418. package/dist/esm/Components/Table/filters/LeftFilterPane.js +14 -6
  419. package/dist/esm/Components/Table/hooks/useTable.js +11 -7
  420. package/dist/esm/Components/Table/settings/ManageColumns.js +4 -3
  421. package/dist/esm/Components/Table/settings/TableSettings.js +4 -4
  422. package/dist/esm/Components/Tabs/Tabs.js +1 -0
  423. package/dist/esm/Components/Tabs/components/TabList.js +1 -0
  424. package/dist/esm/Components/Tabs/components/TabPanel.js +1 -0
  425. package/dist/esm/Components/Tabs/tabStyles.js +5 -3
  426. package/dist/esm/Components/Tag/Tag.js +5 -4
  427. package/dist/esm/Components/Tag/Tag.styles.js +5 -4
  428. package/dist/esm/Components/Tag/tagDot.js +10 -3
  429. package/dist/esm/Components/TagInput/TagInput.js +8 -7
  430. package/dist/esm/Components/TagInput/tagEntries.js +16 -4
  431. package/dist/esm/Components/TimePicker/TimePicker.js +7 -3
  432. package/dist/esm/Components/Timeline/Timeline.js +14 -10
  433. package/dist/esm/Components/Toaster/Toaster.js +2 -1
  434. package/dist/esm/Components/Toggle/TableToggle.js +1 -1
  435. package/dist/esm/Components/UpgradeButton/UpgradeButton.js +3 -2
  436. package/dist/esm/Components/UserDetails/UserDetails.js +5 -7
  437. package/dist/esm/Components/WishlistToggle/WishlistToggle.js +2 -1
  438. package/dist/esm/Components/WorkspaceWindow/WorkspaceTrayPreview.js +12 -2
  439. package/dist/esm/Components/WorkspaceWindow/WorkspaceWindow.js +3 -1
  440. package/dist/esm/Hooks/useOutsideMouseDown.js +26 -0
  441. package/dist/esm/Hooks/usePreferences.js +30 -12
  442. package/dist/esm/Hooks/useScrollableRegion.js +33 -0
  443. package/dist/esm/Theme/chakra/Menu.styles.js +6 -0
  444. package/dist/esm/Theme/chakra/componentStyles.js +1 -1
  445. package/dist/esm/Theme/chakra/focusRing.styles.js +3 -3
  446. package/dist/esm/Theme/chakra/paletteFromTheme.js +16 -3
  447. package/dist/esm/Theme/provider/ThemeSwitcher.js +1 -1
  448. package/dist/esm/Theme/tokens/builders/filledSurface.js +3 -2
  449. package/dist/esm/Theme/tokens/builders/focusRing.js +4 -1
  450. package/dist/esm/Theme/tokens/builders/paletteScale.js +6 -0
  451. package/dist/esm/Utils/tabular.js +56 -0
  452. package/dist/esm/index.js +16 -24
  453. package/dist/index.d.ts +54 -2
  454. package/dist/index.js +33 -29
  455. package/package.json +3 -1
  456. package/dist/Components/Buttons/Buttons.d.ts +0 -3
  457. package/dist/Components/Buttons/Buttons.js +0 -9
  458. package/dist/Components/Buttons/ButtonsProps.d.ts +0 -12
  459. package/dist/Components/Common/ErrorComponent.d.ts +0 -7
  460. package/dist/Components/Common/ErrorComponent.js +0 -16
  461. package/dist/Components/Common/FormattedDescription.d.ts +0 -7
  462. package/dist/Components/Common/FormattedDescription.js +0 -62
  463. package/dist/Components/Common/Label.d.ts +0 -9
  464. package/dist/Components/Common/Label.js +0 -12
  465. package/dist/Components/Input/Input/Input.d.ts +0 -4
  466. package/dist/Components/Input/Input/Input.js +0 -75
  467. package/dist/Components/Input/Input/InputProps.d.ts +0 -24
  468. package/dist/Components/Input/Input/InputProps.js +0 -2
  469. package/dist/Components/ProductCard/productCardFixtures.d.ts +0 -7
  470. package/dist/Components/ProductCard/productCardFixtures.js +0 -61
  471. package/dist/esm/Components/Buttons/Buttons.js +0 -4
  472. package/dist/esm/Components/Common/ErrorComponent.js +0 -14
  473. package/dist/esm/Components/Common/FormattedDescription.js +0 -60
  474. package/dist/esm/Components/Common/Label.js +0 -10
  475. package/dist/esm/Components/Input/Input/Input.js +0 -37
  476. package/dist/esm/Components/Input/Input/InputProps.js +0 -1
  477. package/dist/esm/Components/ProductCard/productCardFixtures.js +0 -58
  478. package/dist/esm/services/feedback.js +0 -15
  479. package/dist/services/feedback.d.ts +0 -12
  480. package/dist/services/feedback.js +0 -18
  481. /package/dist/Components/{Buttons/ButtonsProps.js → Common/dataAttributes.js} +0 -0
  482. /package/dist/esm/Components/{Buttons/ButtonsProps.js → Common/dataAttributes.js} +0 -0
@@ -1,9 +1,7 @@
1
1
  import { ButtonProps as ChakraButtonProps } from "@chakra-ui/react";
2
+ import type { DataAttributes } from "../Common/dataAttributes";
2
3
  type LayoutProps = Pick<ChakraButtonProps, "as" | "m" | "mt" | "mb" | "ml" | "mr" | "mx" | "my" | "p" | "pt" | "pb" | "pl" | "pr" | "px" | "py" | "w" | "minW" | "maxW" | "h" | "minH" | "maxH" | "boxSize" | "flex" | "flexShrink" | "flexGrow" | "alignSelf" | "justifyContent" | "cursor" | "fontWeight" | "fontSize" | "textAlign" | "whiteSpace" | "_hover" | "_active" | "_focus" | "_focusVisible" | "_disabled" | "isActive" | "onKeyDown" | "onFocus" | "onBlur" | "onPointerDown" | "tabIndex" | "form" | "name" | "value" | "autoFocus" | "role">;
3
- type DataAttributes = {
4
- [key: `data-${string}`]: string | number | boolean | undefined;
5
- };
6
- /** Themed Chakra Button (default size "sm"); loading shows a spinner and keeps the width — for a plain unthemed <button>, see the separate Buttons component. */
4
+ /** Themed Chakra Button (default size "sm"); loading shows a spinner and keeps the width. */
7
5
  export type ButtonProps = LayoutProps & DataAttributes & Pick<ChakraButtonProps, "onClick" | "leftIcon" | "rightIcon" | "isDisabled" | "isLoading" | "spinner" | "sx" | "border" | "borderRadius" | "onMouseEnter" | "onMouseLeave" | "aria-label" | "aria-labelledby" | "aria-describedby" | "aria-expanded" | "aria-haspopup" | "aria-controls" | "aria-pressed" | "aria-current" | "id" | "title"> & {
8
6
  /** Button text; ignored when `children` is passed. No label or children plus an icon = icon-only. */
9
7
  label?: string;
@@ -8,6 +8,8 @@ const useCustomTheme_1 = require("../../Theme/useCustomTheme");
8
8
  const gradientInk_1 = require("../../Theme/tokens/builders/gradientInk");
9
9
  const color_1 = require("../../Theme/tokens/builders/color");
10
10
  const rafThrottle_1 = require("../../Utils/rafThrottle");
11
+ const motion_1 = require("../../Theme/tokens/primitives/motion");
12
+ const BACKGROUND_TRANSITION = (0, motion_1.transitionFor)(["background"]);
11
13
  function ButtonGroupIcon({ leftIcon, rightIcon, onLeftIconClick, onRightIconClick, buttonText, onButtonClick, onButtongroupClick, size, variant, color, buttonGroupStyle, buttonGroupLeftIconStyle, buttonGroupRightIconStyle, buttonStyle, onBlurLeftIcon, onBlurRightIcon, dropdownOptions, // New prop for dropdown options
12
14
  onDropdownOptionClick, // New prop to handle option clicks
13
15
  rightIconDropdown, menulistStyle, menuItemStyle, isLoading, divider = true, leftIconLoading, RightIconLoading, }) {
@@ -76,7 +78,7 @@ rightIconDropdown, menulistStyle, menuItemStyle, isLoading, divider = true, left
76
78
  fontSize: "xs-plus",
77
79
  fontWeight: 500,
78
80
  color: theme.colors.text[700],
79
- transition: "background 0.12s",
81
+ transition: BACKGROUND_TRANSITION,
80
82
  "& svg": { width: "16px", height: "16px" },
81
83
  ...(divider
82
84
  ? {
@@ -9,10 +9,12 @@ const react_2 = require("@chakra-ui/react");
9
9
  const lucide_react_1 = require("lucide-react");
10
10
  const Button_1 = __importDefault(require("../Button/Button"));
11
11
  const Skeletons_1 = __importDefault(require("../Skeletons/Skeletons"));
12
+ const VisuallyHidden_1 = __importDefault(require("../VisuallyHidden/VisuallyHidden"));
12
13
  const useCustomTheme_1 = require("../../Theme/useCustomTheme");
13
14
  const focusRing_styles_1 = require("../../Theme/chakra/focusRing.styles");
14
15
  const tone_1 = require("../../Theme/tokens/builders/tone");
15
16
  const calendarMath_1 = require("./calendarMath");
17
+ const activationKey_1 = require("../Common/activationKey");
16
18
  const plural = (n, one, many) => `${n} ${n === 1 ? one : many}`;
17
19
  const DEFAULT_LABELS = {
18
20
  today: "Today",
@@ -118,7 +120,7 @@ const CalendarGrid = ({ view, date, events, onViewChange, onDateChange, onEventC
118
120
  onDateChange === null || onDateChange === void 0 ? void 0 : onDateChange(next);
119
121
  return;
120
122
  }
121
- if ((e.key === "Enter" || e.key === " ") && onDateChange) {
123
+ if ((0, activationKey_1.isActivationKey)(e) && onDateChange) {
122
124
  e.preventDefault();
123
125
  onDateChange(cellDate);
124
126
  }
@@ -161,9 +163,9 @@ const CalendarGrid = ({ view, date, events, onViewChange, onDateChange, onEventC
161
163
  cellRefs.current.set(key, el);
162
164
  else
163
165
  cellRefs.current.delete(key);
164
- }, "data-date": key, "aria-label": label, "aria-current": isToday ? "date" : undefined, tabIndex: active ? 0 : -1, onFocus: () => setFocusedKey(key), onKeyDown: (e) => handleCellKeyDown(e, day), position: "relative", minH: MIN_CELL_HEIGHT[view], p: 1, bg: surface, borderRight: "1px solid", borderBottom: "1px solid", borderColor: border, outline: "none", _focusVisible: {
166
+ }, "data-date": key, "aria-current": isToday ? "date" : undefined, tabIndex: active ? 0 : -1, onFocus: () => setFocusedKey(key), onKeyDown: (e) => handleCellKeyDown(e, day), position: "relative", minH: MIN_CELL_HEIGHT[view], p: 1, bg: surface, borderRight: "1px solid", borderBottom: "1px solid", borderColor: border, outline: "none", _focusVisible: {
165
167
  boxShadow: (0, focusRing_styles_1.insetFocusRingShadow)(colors),
166
- }, children: [(0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", display: "inline-flex", alignItems: "center", justifyContent: "center", minW: "1.5rem", h: "1.5rem", px: 1, borderRadius: "full", fontSize: "xs-plus", fontWeight: isToday ? 700 : 500, color: isToday ? colors.accentText : inMonth ? colors.header[900] : colors.textMuted, boxShadow: isToday ? `inset 0 0 0 1.5px ${colors.accentText}` : undefined, "aria-hidden": true, children: day.getDate() }), body] }, key));
168
+ }, children: [(0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", display: "inline-flex", alignItems: "center", justifyContent: "center", minW: "1.5rem", h: "1.5rem", px: 1, borderRadius: "full", fontSize: "xs-plus", fontWeight: isToday ? 700 : 500, color: isToday ? colors.accentText : inMonth ? colors.header[900] : colors.textMuted, boxShadow: isToday ? `inset 0 0 0 1.5px ${colors.accentText}` : undefined, "aria-hidden": true, children: day.getDate() }), (0, jsx_runtime_1.jsx)(VisuallyHidden_1.default, { position: "absolute", children: label }), body] }, key));
167
169
  };
168
170
  return ((0, jsx_runtime_1.jsxs)(react_2.Box, { children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", justify: "space-between", wrap: "wrap", gap: 2, mb: 3, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: 2, children: [onDateChange ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Button_1.default, { label: text.today, size: "sm", variant: "outline", onClick: () => onDateChange((0, calendarMath_1.startOfDay)(new Date())) }), (0, jsx_runtime_1.jsx)(Button_1.default, { "aria-label": text.previous, size: "sm", variant: "ghost", leftIcon: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronLeft, { size: 16, "aria-hidden": true }), onClick: () => onDateChange((0, calendarMath_1.shiftAnchor)(view, anchor, -1)) }), (0, jsx_runtime_1.jsx)(Button_1.default, { "aria-label": text.next, size: "sm", variant: "ghost", leftIcon: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { size: 16, "aria-hidden": true }), onClick: () => onDateChange((0, calendarMath_1.shiftAnchor)(view, anchor, 1)) })] })) : null, (0, jsx_runtime_1.jsx)(react_2.Text, { as: "h2", fontSize: "md", fontWeight: 600, color: colors.header[900], children: title })] }), onViewChange ? ((0, jsx_runtime_1.jsx)(react_2.Flex, { role: "group", "aria-label": text[view], gap: 1, children: VIEWS.map((v) => ((0, jsx_runtime_1.jsx)(Button_1.default, { label: text[v], size: "sm", variant: v === view ? "solid" : "outline", "aria-pressed": v === view, onClick: () => onViewChange(v) }, v))) })) : null] }), (0, jsx_runtime_1.jsx)(react_2.Box, { overflowX: "auto", children: (0, jsx_runtime_1.jsxs)(react_2.Box, { role: "grid", "aria-label": title, "aria-busy": isLoading || undefined, "data-view": view, minW: view === "day" ? undefined : "42rem", borderTop: "1px solid", borderLeft: "1px solid", borderColor: border, borderRadius: "lg", overflow: "hidden", children: [(0, jsx_runtime_1.jsx)(react_2.Grid, { role: "row", templateColumns: template, children: headerDays.map((i) => ((0, jsx_runtime_1.jsx)(react_2.Box, { role: "columnheader", "aria-label": weekdayLong[i], px: 2, py: 1, fontSize: "xs", fontWeight: 600, color: colors.textMuted, bg: colors.backgroundColor.main, borderRight: "1px solid", borderBottom: "1px solid", borderColor: border, children: weekdayShort[i] }, i))) }), weeks.map((week, weekIndex) => {
169
171
  const layout = (0, calendarMath_1.layoutWeek)(week, shownEvents, maxLanes);
@@ -27,7 +27,7 @@ export type CalendarGridLabels = {
27
27
  more: (count: number) => string;
28
28
  /** Accessible name of the "more" button, e.g. "3 more events on Tuesday, 14 October 2026". */
29
29
  moreLabel: (count: number, date: string) => string;
30
- /** Appended to a day cell's accessible name, e.g. "3 events". */
30
+ /** Follows the date in a day cell's accessible name, e.g. "3 events"; the cell's own content comes after it. */
31
31
  eventCount: (count: number) => string;
32
32
  };
33
33
  /** Props for the month/week/day event grid; fully controlled through `view` and `date`. */
@@ -1,4 +1,5 @@
1
1
  import { CardPadding } from "./CardProps";
2
+ /** Themed card; `header` and `footer` render outside the body, `padding` sets density. */
2
3
  declare const Card: import("react").ForwardRefExoticComponent<Omit<import("@chakra-ui/react").CardProps, "color" | "colorScheme" | "direction" | "padding" | "size" | "justify" | "children" | "variant" | "align"> & {
3
4
  dividercolor?: "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "cyan" | "purple" | "pink" | "whiteAlpha" | "blackAlpha";
4
5
  dividersize?: string;
@@ -12,6 +12,7 @@ const PADDING_VALUES = {
12
12
  md: "1rem 1.25rem",
13
13
  lg: "1.25rem 1.5rem",
14
14
  };
15
+ /** Themed card; `header` and `footer` render outside the body, `padding` sets density. */
15
16
  const Card = (0, react_1.forwardRef)(function Card({ header, footer, children, color, colorScheme, direction = "column", align, justify, bodyProps, padding, ...rest }, ref) {
16
17
  const cardProps = { ...rest };
17
18
  delete cardProps.dividercolor;
@@ -6,6 +6,8 @@ const outlineRung_1 = require("../../Theme/tokens/builders/outlineRung");
6
6
  const accentText_1 = require("../../Theme/tokens/builders/accentText");
7
7
  const focusRing_styles_1 = require("../../Theme/chakra/focusRing.styles");
8
8
  const fieldStyles_1 = require("../Common/fieldStyles");
9
+ const motion_1 = require("../../Theme/tokens/primitives/motion");
10
+ const BACKGROUND_BORDER_COLOR_BOX_SHADOW_TRANSITION = (0, motion_1.transitionFor)(["background", "border-color", "box-shadow"]);
9
11
  // One fill rule for every colour scheme, via resolveFilledSurface — was a flat [600].
10
12
  exports.Checkbox = {
11
13
  baseStyle: ({ theme, colorScheme = "primary" }) => {
@@ -22,7 +24,7 @@ exports.Checkbox = {
22
24
  borderWidth: "1px",
23
25
  borderRadius: "base",
24
26
  borderColor: (0, fieldStyles_1.fieldHoverBorder)(theme.colors),
25
- transition: "background 0.15s, border-color 0.15s, box-shadow 0.15s",
27
+ transition: BACKGROUND_BORDER_COLOR_BOX_SHADOW_TRANSITION,
26
28
  _invalid: {
27
29
  borderColor: theme.colors.semanticText.error,
28
30
  },
@@ -7,18 +7,20 @@ type GroupState = {
7
7
  select: (value: string) => void;
8
8
  };
9
9
  export declare const useSelectableGroup: () => GroupState | null;
10
+ /** Single-select radio group; controlled via `value`, uncontrolled via `defaultValue`. */
10
11
  export type SelectableGroupProps = {
11
12
  value?: string;
12
13
  defaultValue?: string;
13
14
  onValueChange?: (value: string) => void;
14
15
  gap?: number;
16
+ columns?: number;
15
17
  children: ReactNode;
16
18
  "aria-label"?: string;
17
19
  "aria-labelledby"?: string;
18
20
  "data-testid"?: string;
19
21
  };
20
22
  /** Radiogroup with a roving tab stop; arrows move focus and selection together, like native radios. */
21
- export declare const SelectableGroup: ({ value, defaultValue, onValueChange, gap, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "data-testid": testId, }: SelectableGroupProps) => import("react/jsx-runtime").JSX.Element;
23
+ export declare const SelectableGroup: ({ value, defaultValue, onValueChange, gap, columns, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "data-testid": testId, }: SelectableGroupProps) => import("react/jsx-runtime").JSX.Element;
22
24
  /** Tonal card surface; selection is a 2px ink ring plus a check, never colour alone. */
23
25
  export declare const selectableSurface: (colors: PaletteProps, { selected, disabled, interactive, ringed }: {
24
26
  selected: boolean;
@@ -6,10 +6,13 @@ const react_1 = require("react");
6
6
  const react_2 = require("@chakra-ui/react");
7
7
  const lucide_react_1 = require("lucide-react");
8
8
  const useCustomTheme_1 = require("../../Theme/useCustomTheme");
9
+ const states_1 = require("../../Theme/tokens/primitives/states");
9
10
  const motion_1 = require("../../Theme/tokens/primitives/motion");
10
11
  const motion_2 = require("../../Theme/chakra/motion");
11
12
  const focusRing_styles_1 = require("../../Theme/chakra/focusRing.styles");
12
13
  const accentText_1 = require("../../Theme/tokens/builders/accentText");
14
+ const tonalHover_1 = require("./tonalHover");
15
+ const activationKey_1 = require("../Common/activationKey");
13
16
  const GroupContext = (0, react_1.createContext)(null);
14
17
  const useSelectableGroup = () => (0, react_1.useContext)(GroupContext);
15
18
  exports.useSelectableGroup = useSelectableGroup;
@@ -17,15 +20,15 @@ const firstEnabledValue = (children) => {
17
20
  for (const child of react_1.Children.toArray(children)) {
18
21
  if (!(0, react_1.isValidElement)(child))
19
22
  continue;
20
- const { value, disabled } = child.props;
21
- if (typeof value === "string" && !disabled)
23
+ const { value, disabled, isDisabled } = child.props;
24
+ if (typeof value === "string" && !disabled && !isDisabled)
22
25
  return value;
23
26
  }
24
27
  return undefined;
25
28
  };
26
29
  const STEP = { ArrowDown: 1, ArrowRight: 1, ArrowUp: -1, ArrowLeft: -1 };
27
30
  /** Radiogroup with a roving tab stop; arrows move focus and selection together, like native radios. */
28
- const SelectableGroup = ({ value, defaultValue, onValueChange, gap = 3, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "data-testid": testId, }) => {
31
+ const SelectableGroup = ({ value, defaultValue, onValueChange, gap = 3, columns = 1, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "data-testid": testId, }) => {
29
32
  const [inner, setInner] = (0, react_1.useState)(defaultValue);
30
33
  const current = value !== null && value !== void 0 ? value : inner;
31
34
  const state = (0, react_1.useMemo)(() => ({
@@ -55,7 +58,7 @@ const SelectableGroup = ({ value, defaultValue, onValueChange, gap = 3, children
55
58
  if (next !== null)
56
59
  state.select(next);
57
60
  };
58
- return ((0, jsx_runtime_1.jsx)(GroupContext.Provider, { value: state, children: (0, jsx_runtime_1.jsx)(react_2.Flex, { role: "radiogroup", "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, direction: "column", gap: gap, onKeyDown: onKeyDown, "data-testid": testId, children: children }) }));
61
+ return ((0, jsx_runtime_1.jsx)(GroupContext.Provider, { value: state, children: (0, jsx_runtime_1.jsx)(react_2.Flex, { role: "radiogroup", "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, direction: "column", gap: gap, ...(columns > 1 ? { display: "grid", gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))` } : {}), onKeyDown: onKeyDown, "data-testid": testId, children: children }) }));
59
62
  };
60
63
  exports.SelectableGroup = SelectableGroup;
61
64
  /** Tonal card surface; selection is a 2px ink ring plus a check, never colour alone. */
@@ -63,9 +66,9 @@ const selectableSurface = (colors, { selected, disabled, interactive, ringed })
63
66
  bg: colors.background[100],
64
67
  borderRadius: "2xl",
65
68
  boxShadow: selected ? `inset 0 0 0 2px ${colors.header[900]}` : "none",
66
- opacity: disabled ? 0.6 : 1,
69
+ opacity: disabled ? states_1.DISABLED_OPACITY : 1,
67
70
  transition: (0, motion_1.transitionFor)(["background-color", "box-shadow"]),
68
- _hover: interactive && !selected && !disabled ? { bg: colors.background[200] } : undefined,
71
+ _hover: interactive && !selected && !disabled ? { bg: (0, tonalHover_1.tonalHover)(colors) } : undefined,
69
72
  sx: { ...(ringed ? (0, focusRing_styles_1.focusVisibleRing)(colors) : {}), ...(0, motion_2.reducedMotionSx)() },
70
73
  });
71
74
  exports.selectableSurface = selectableSurface;
@@ -100,7 +103,7 @@ const useSelectable = ({ value, selected, disabled, onSelect, }) => {
100
103
  onKeyDown: (event) => {
101
104
  if (event.target !== event.currentTarget)
102
105
  return;
103
- if (event.key === " " || event.key === "Enter") {
106
+ if ((0, activationKey_1.isActivationKey)(event)) {
104
107
  event.preventDefault();
105
108
  choose();
106
109
  }
@@ -0,0 +1,2 @@
1
+ import type { PaletteProps } from "../../Theme/tokens/types";
2
+ export declare const tonalHover: (colors: PaletteProps, rest?: string, fill?: string) => string;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.tonalHover = void 0;
4
+ const planeStep_1 = require("../../Theme/tokens/builders/planeStep");
5
+ const tonalHover = (colors, rest = colors.background[100], fill = colors.background[200]) => (0, planeStep_1.bandOn)(fill, rest);
6
+ exports.tonalHover = tonalHover;
@@ -1,3 +1,3 @@
1
1
  import type { ChoiceCardProps } from "./ChoiceCardProps";
2
- declare const ChoiceCard: ({ value, label, description, icon, disabled, "data-testid": testId }: ChoiceCardProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const ChoiceCard: ({ value, label, description, icon, disabled: disabledProp, isDisabled, "data-testid": testId }: ChoiceCardProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default ChoiceCard;
@@ -5,7 +5,8 @@ const react_1 = require("react");
5
5
  const react_2 = require("@chakra-ui/react");
6
6
  const useCustomTheme_1 = require("../../Theme/useCustomTheme");
7
7
  const selectable_1 = require("../CheckoutKit/selectable");
8
- const ChoiceCard = ({ value, label, description, icon, disabled = false, "data-testid": testId }) => {
8
+ const ChoiceCard = ({ value, label, description, icon, disabled: disabledProp = false, isDisabled = false, "data-testid": testId }) => {
9
+ const disabled = disabledProp || isDisabled;
9
10
  const { colors } = (0, useCustomTheme_1.useCustomTheme)();
10
11
  const uid = (0, react_1.useId)();
11
12
  const labelId = `${uid}-label`;
@@ -11,6 +11,8 @@ export interface ChoiceCardProps {
11
11
  icon?: ReactNode;
12
12
  /** Dims the card and skips it for clicks, arrow keys and the tab stop. */
13
13
  disabled?: boolean;
14
+ /** Alias of `disabled` for the library's `is*` prop convention; either one disables the card. */
15
+ isDisabled?: boolean;
14
16
  "data-testid"?: string;
15
17
  }
16
18
  /** Radiogroup of `ChoiceCard`s: one tab stop; arrows, Home and End move focus and selection together. */
@@ -19,6 +21,10 @@ export interface ChoiceCardGroupProps {
19
21
  /** Seeds an uncontrolled selection; ignored once `value` is passed. */
20
22
  defaultValue?: string;
21
23
  onValueChange?: (value: string) => void;
24
+ /** Cards per row; `1` (default) stacks them in a column, more lays them out in an equal-width grid. */
25
+ columns?: number;
26
+ /** Space between cards in theme space units (`3` = 0.75rem). */
27
+ gap?: number;
22
28
  /** Direct `ChoiceCard` children; a wrapper component hides their `value` from the tab stop. */
23
29
  children: ReactNode;
24
30
  /** Name the group with this or `aria-labelledby`. */
@@ -1,4 +1,5 @@
1
1
  import { type FieldMessageState } from "./fieldMessageStyles";
2
+ /** Error and helper text state plus the ids that wire it to the control. */
2
3
  export type FieldMessageProps = FieldMessageState & {
3
4
  /** From `useFieldIds` — must match the control's `aria-describedby`. */
4
5
  helperId?: string;
@@ -7,7 +7,7 @@ export declare const fieldLabelStyles: (colors: PaletteProps) => {
7
7
  lineHeight: string;
8
8
  mb: string;
9
9
  };
10
- /** Renders a real `<label htmlFor>` only when `id` is given, else a `<span>` — not a substitute for `Label` (Common/Label.tsx), which always renders a `FormLabel`. */
10
+ /** Renders a real `<label htmlFor>` only when `id` is given, else a `<span>`. */
11
11
  export declare const TextLabel: ({ label, id, isRequired, isInformation, informationMessage, fontSize, showTooltip, tooltipLabel, clampLines, inline, }: {
12
12
  label: string;
13
13
  /** Omit only when this sits inside another element's own `<label>` (e.g. Checkbox) — otherwise the visible text has no accessible association. */
@@ -9,16 +9,17 @@ const react_1 = require("@chakra-ui/react");
9
9
  const useCustomTheme_1 = require("../../Theme/useCustomTheme");
10
10
  const lucide_react_1 = require("lucide-react");
11
11
  const ToolTip_1 = __importDefault(require("../ToolTip/ToolTip"));
12
+ const typography_1 = require("../../Theme/tokens/primitives/typography");
12
13
  /** The one field-label look (13px / 500 / `text[700]`); `Label` and `TextLabel` both read it. */
13
14
  const fieldLabelStyles = (colors) => ({
14
15
  color: colors.text[700],
15
16
  fontWeight: 500,
16
- fontSize: "0.8125rem",
17
+ fontSize: typography_1.fontSizes["xs-plus"],
17
18
  lineHeight: "1.2",
18
19
  mb: "0.375rem",
19
20
  });
20
21
  exports.fieldLabelStyles = fieldLabelStyles;
21
- /** Renders a real `<label htmlFor>` only when `id` is given, else a `<span>` — not a substitute for `Label` (Common/Label.tsx), which always renders a `FormLabel`. */
22
+ /** Renders a real `<label htmlFor>` only when `id` is given, else a `<span>`. */
22
23
  const TextLabel = ({ label, id, isRequired = false, isInformation = false, informationMessage = "", fontSize, showTooltip, tooltipLabel, clampLines, inline = false, }) => {
23
24
  const theme = (0, useCustomTheme_1.useCustomTheme)();
24
25
  const clampStyles = clampLines ? {
@@ -37,7 +38,7 @@ const TextLabel = ({ label, id, isRequired = false, isInformation = false, infor
37
38
  mb: inline ? 0 : base.mb,
38
39
  fontSize: fontSize !== null && fontSize !== void 0 ? fontSize : base.fontSize,
39
40
  };
40
- const content = ((0, jsx_runtime_1.jsxs)(react_1.Box, { as: "span", display: "inline-flex", alignItems: "center", gap: "0.35rem", children: [showTooltip ? ((0, jsx_runtime_1.jsx)(ToolTip_1.default, { label: tooltipLabel !== null && tooltipLabel !== void 0 ? tooltipLabel : label, hasArrow: true, placement: "top", fontSize: "xs", children: (0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", sx: clampStyles, children: label }) })) : ((0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", sx: clampStyles, children: label })), isRequired && ((0, jsx_runtime_1.jsx)("span", { style: { color: theme.colors.semanticText.error, marginLeft: "0.125rem" }, children: "*" })), isInformation && informationMessage && ((0, jsx_runtime_1.jsx)(ToolTip_1.default, { label: informationMessage, hasArrow: true, placement: "top", fontSize: "xs", children: (0, jsx_runtime_1.jsx)(react_1.Icon, { as: lucide_react_1.InfoIcon, color: theme.colors.text[700], boxSize: 3.5 }) }))] }));
41
+ const content = ((0, jsx_runtime_1.jsxs)(react_1.Box, { as: "span", display: "inline-flex", alignItems: "center", gap: "0.35rem", children: [showTooltip ? ((0, jsx_runtime_1.jsx)(ToolTip_1.default, { label: tooltipLabel !== null && tooltipLabel !== void 0 ? tooltipLabel : label, hasArrow: true, placement: "top", fontSize: "xs", children: (0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", sx: clampStyles, children: label }) })) : ((0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", sx: clampStyles, children: label })), isRequired && ((0, jsx_runtime_1.jsx)("span", { "aria-hidden": "true", style: { color: theme.colors.semanticText.error, marginLeft: "0.125rem" }, children: "*" })), isInformation && informationMessage && ((0, jsx_runtime_1.jsx)(ToolTip_1.default, { label: informationMessage, hasArrow: true, placement: "top", fontSize: "xs", children: (0, jsx_runtime_1.jsx)(react_1.Icon, { as: lucide_react_1.InfoIcon, color: theme.colors.text[700], boxSize: 3.5 }) }))] }));
41
42
  // NOTE: real <label> only with a control id — Checkbox/Radio render this inline inside their own <label>.
42
43
  return id ? ((0, jsx_runtime_1.jsx)(react_1.Box, { as: "label", htmlFor: id, ...wrapperStyles, children: content })) : ((0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", ...wrapperStyles, children: content }));
43
44
  };
@@ -1,8 +1,8 @@
1
+ /** `id` is optional; omitted, a FormControl wires its own aria-describedby. */
1
2
  type HelperTextProps = {
2
3
  helperText: string;
3
4
  id?: string;
4
5
  };
5
- /** `id` is optional — pass one to own aria-describedby; omitted, a FormControl wires its own. */
6
- /** Renders `helperText` unconditionally; prefer `FieldMessage`, which swaps it for the error. */
6
+ /** Always renders `helperText`; prefer `FieldMessage`, which swaps it for the error. */
7
7
  declare const HelperText: ({ helperText, id }: HelperTextProps) => import("react/jsx-runtime").JSX.Element;
8
8
  export default HelperText;
@@ -8,8 +8,7 @@ const UnregisteredHelperText = ({ helperText, id, style }) => {
8
8
  const styles = (0, react_1.useFormControlStyles)();
9
9
  return ((0, jsx_runtime_1.jsx)(react_1.chakra.div, { id: id, ...style, __css: styles.helperText, className: "chakra-form__helper-text", children: helperText }));
10
10
  };
11
- /** `id` is optional — pass one to own aria-describedby; omitted, a FormControl wires its own. */
12
- /** Renders `helperText` unconditionally; prefer `FieldMessage`, which swaps it for the error. */
11
+ /** Always renders `helperText`; prefer `FieldMessage`, which swaps it for the error. */
13
12
  const HelperText = ({ helperText, id }) => {
14
13
  const theme = (0, useCustomTheme_1.useCustomTheme)();
15
14
  const field = (0, react_1.useFormControlContext)();
@@ -0,0 +1,5 @@
1
+ import type { KeyboardEvent } from "react";
2
+ export declare const isActivationKey: (event: {
3
+ key: string;
4
+ }) => boolean;
5
+ export declare const onActivationKey: <E extends KeyboardEvent>(activate: (event: E) => void) => (event: E) => void;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.onActivationKey = exports.isActivationKey = void 0;
4
+ const isActivationKey = (event) => event.key === "Enter" || event.key === " ";
5
+ exports.isActivationKey = isActivationKey;
6
+ const onActivationKey = (activate) => (event) => {
7
+ if (!(0, exports.isActivationKey)(event))
8
+ return;
9
+ event.preventDefault();
10
+ activate(event);
11
+ };
12
+ exports.onActivationKey = onActivationKey;
@@ -0,0 +1,4 @@
1
+ /** Any `data-*` attribute; lets a closed prop type accept test and analytics hooks. */
2
+ export type DataAttributes = {
3
+ [key: `data-${string}`]: string | number | boolean | undefined;
4
+ };
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.fieldMessageVisibility = exports.fieldMessageStyles = exports.FIELD_MESSAGE_GAP = void 0;
4
+ const typography_1 = require("../../Theme/tokens/primitives/typography");
4
5
  exports.FIELD_MESSAGE_GAP = "0.25rem";
5
6
  /** Shared type for helper and error text, so switching between them never shifts the row. */
6
7
  const fieldMessageStyles = (colors) => ({
7
8
  mt: exports.FIELD_MESSAGE_GAP,
8
- fontSize: "0.75rem",
9
+ fontSize: typography_1.fontSizes.xs,
9
10
  lineHeight: "1.125rem",
10
11
  color: colors.textMuted,
11
12
  });
@@ -0,0 +1,2 @@
1
+ import React, { type ReactElement } from "react";
2
+ export declare const findSlot: <P>(children: React.ReactNode, slot: React.FC<P>) => ReactElement<P> | undefined;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.findSlot = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const isReactElement = (child) => child !== null && typeof child === "object" && "type" in child;
9
+ // NOTE: matches by element type through nested Fragments, so `<>{cond && <Footer />}</>` is not dropped.
10
+ const findSlot = (children, slot) => {
11
+ for (const child of react_1.default.Children.toArray(children)) {
12
+ if (!isReactElement(child))
13
+ continue;
14
+ if (child.type === slot)
15
+ return child;
16
+ if (child.type === react_1.default.Fragment) {
17
+ const nested = (0, exports.findSlot)(child.props.children, slot);
18
+ if (nested)
19
+ return nested;
20
+ }
21
+ }
22
+ return undefined;
23
+ };
24
+ exports.findSlot = findSlot;
@@ -0,0 +1 @@
1
+ export declare const surfaceFocusRing: (surface: string, ring: string) => string;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.surfaceFocusRing = void 0;
4
+ const focusRing_styles_1 = require("../../Theme/chakra/focusRing.styles");
5
+ // NOTE: for chrome painted on a fixed dark surface, where the palette's focusRing pair is tuned for the page canvas instead.
6
+ const surfaceFocusRing = (surface, ring) => `0 0 0 ${focusRing_styles_1.FOCUS_HALO_WIDTH}px ${surface}, 0 0 0 ${focusRing_styles_1.FOCUS_RING_WIDTH}px ${ring}`;
7
+ exports.surfaceFocusRing = surfaceFocusRing;
@@ -9,16 +9,28 @@ const react_2 = require("@chakra-ui/react");
9
9
  const lucide_react_1 = require("lucide-react");
10
10
  const useCustomTheme_1 = require("../../Theme/useCustomTheme");
11
11
  const surfaceRaised_1 = require("../../Theme/tokens/builders/surfaceRaised");
12
+ const tone_1 = require("../../Theme/tokens/builders/tone");
12
13
  const Button_1 = __importDefault(require("../Button/Button"));
13
14
  const TextInput_1 = __importDefault(require("../Input/TextInput"));
14
- const ConfirmDialog = ({ isOpen, onClose, onConfirm, title, children, icon, iconBg, iconColor, tone = "destructive", cancelLabel = "Cancel", confirmLabel = "Confirm", confirmIcon, isConfirmLoading = false, disableCancelWhilePending = true, confirmationText, confirmationLabel, bodyLayout = "flush", bodySpacing = 4, actionsPt = 0, focusCancelOnOpen = true, isCentered = true, closeOnEsc, closeOnOverlayClick, }) => {
15
+ const ConfirmDialog = ({ isOpen, onClose, onConfirm, title, children, icon, iconBg, iconColor, entityName, entityKind, dependents, consequence, alternative, isConfirmDisabled: isConfirmHeld = false, tone = "destructive", cancelLabel = "Cancel", confirmLabel = "Confirm", confirmIcon, isConfirmLoading = false, disableCancelWhilePending = true, confirmationText, confirmationLabel, bodyLayout = "flush", bodySpacing = 4, actionsPt = 0, focusCancelOnOpen = true, isCentered = true, closeOnEsc, closeOnOverlayClick, }) => {
15
16
  const { colors } = (0, useCustomTheme_1.useCustomTheme)();
16
17
  const cancelRef = (0, react_1.useRef)(null);
17
18
  const [typedText, setTypedText] = (0, react_1.useState)("");
18
19
  const requiresTypedConfirmation = confirmationText !== undefined;
19
- const isConfirmDisabled = isConfirmLoading || (requiresTypedConfirmation && typedText !== confirmationText);
20
- const actions = ((0, jsx_runtime_1.jsxs)(react_2.HStack, { justifyContent: "flex-end", spacing: 3, pt: actionsPt, children: [(0, jsx_runtime_1.jsx)(Button_1.default, { ref: cancelRef, label: cancelLabel, onClick: onClose, variant: "outline", colorScheme: "gray", size: "sm", isDisabled: disableCancelWhilePending && isConfirmLoading }), (0, jsx_runtime_1.jsx)(Button_1.default, { label: confirmLabel, onClick: onConfirm, colorScheme: tone === "destructive" ? "red" : "primary", size: "sm", isLoading: isConfirmLoading, isDisabled: isConfirmDisabled, leftIcon: confirmIcon })] }));
21
- const body = requiresTypedConfirmation ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [children, (0, jsx_runtime_1.jsx)(TextInput_1.default, { label: confirmationLabel, value: typedText, onChange: (event) => setTypedText(event.target.value) })] })) : (children);
22
- return ((0, jsx_runtime_1.jsxs)(react_2.Modal, { isOpen: isOpen, onClose: onClose, isCentered: isCentered, closeOnEsc: closeOnEsc, closeOnOverlayClick: closeOnOverlayClick, initialFocusRef: focusCancelOnOpen ? cancelRef : undefined, children: [(0, jsx_runtime_1.jsx)(react_2.ModalOverlay, { backdropFilter: "blur(4px)" }), (0, jsx_runtime_1.jsxs)(react_2.ModalContent, { bg: colors.surfaceRaised, borderRadius: "xl", overflow: "hidden", children: [(0, jsx_runtime_1.jsxs)(react_2.ModalHeader, { borderBottom: "1px solid", borderColor: (0, surfaceRaised_1.raisedRule)(colors), display: "flex", alignItems: "center", gap: 3, children: [(0, jsx_runtime_1.jsx)(react_2.Flex, { align: "center", justify: "center", boxSize: "36px", borderRadius: "full", bg: iconBg, color: iconColor, children: icon !== null && icon !== void 0 ? icon : (0, jsx_runtime_1.jsx)(lucide_react_1.AlertTriangle, { size: 18 }) }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "1.05rem", fontWeight: 600, children: title })] }), (0, jsx_runtime_1.jsx)(react_2.ModalCloseButton, {}), (0, jsx_runtime_1.jsx)(react_2.ModalBody, { py: 6, children: bodyLayout === "stack" ? ((0, jsx_runtime_1.jsxs)(react_2.VStack, { spacing: bodySpacing, align: "stretch", children: [body, actions] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [body, actions] })) })] })] }));
20
+ const isAlternativeLoading = (alternative === null || alternative === void 0 ? void 0 : alternative.isLoading) === true;
21
+ const isConfirmDisabled = isConfirmLoading ||
22
+ isAlternativeLoading ||
23
+ isConfirmHeld ||
24
+ (requiresTypedConfirmation && typedText !== confirmationText);
25
+ const swatch = (0, tone_1.resolveSoftTone)(colors, tone === "destructive" ? colors.semantic.error : colors.primary, colors.surfaceRaised);
26
+ const isEntityPrompt = entityName !== undefined;
27
+ const resolvedTitle = title !== null && title !== void 0 ? title : `Delete ${entityKind ? `${entityKind} ` : ""}"${entityName}"?`;
28
+ const dependentFacts = dependents ? dependents.filter(Boolean) : [];
29
+ const resolvedConsequence = consequence !== null && consequence !== void 0 ? consequence : (isEntityPrompt ? "This cannot be undone." : undefined);
30
+ const hasFacts = dependentFacts.length > 0 || resolvedConsequence !== undefined || (alternative === null || alternative === void 0 ? void 0 : alternative.description) !== undefined;
31
+ const actions = ((0, jsx_runtime_1.jsxs)(react_2.HStack, { justifyContent: "flex-end", spacing: 3, pt: actionsPt, children: [(0, jsx_runtime_1.jsx)(Button_1.default, { ref: cancelRef, label: cancelLabel, onClick: onClose, variant: "outline", colorScheme: "gray", size: "sm", isDisabled: disableCancelWhilePending && (isConfirmLoading || isAlternativeLoading) }), alternative && ((0, jsx_runtime_1.jsx)(Button_1.default, { label: alternative.label, onClick: alternative.onSelect, colorScheme: "primary", size: "sm", isLoading: alternative.isLoading, loadingText: alternative.label, isDisabled: isConfirmLoading })), (0, jsx_runtime_1.jsx)(Button_1.default, { label: confirmLabel, onClick: onConfirm, variant: alternative ? "outline" : undefined, colorScheme: tone === "destructive" ? "red" : "primary", size: "sm", isLoading: isConfirmLoading, isDisabled: isConfirmDisabled, leftIcon: confirmIcon })] }));
32
+ const facts = hasFacts && ((0, jsx_runtime_1.jsxs)(react_2.VStack, { spacing: 3, align: "stretch", mt: bodyLayout === "flush" && children ? 3 : 0, mb: bodyLayout === "flush" ? 4 : 0, children: [dependentFacts.length > 0 && ((0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "sm", fontWeight: 500, children: dependentFacts.join(" · ") })), resolvedConsequence !== undefined && ((0, jsx_runtime_1.jsx)(react_2.Box, { fontSize: "sm", color: colors.textMuted, children: resolvedConsequence })), (alternative === null || alternative === void 0 ? void 0 : alternative.description) !== undefined && ((0, jsx_runtime_1.jsx)(react_2.Box, { fontSize: "sm", p: 3, borderRadius: "md", border: "1px solid", borderColor: (0, surfaceRaised_1.raisedRule)(colors), children: alternative.description }))] }));
33
+ const body = requiresTypedConfirmation ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [children, facts, (0, jsx_runtime_1.jsx)(TextInput_1.default, { label: confirmationLabel, value: typedText, onChange: (event) => setTypedText(event.target.value) })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [children, facts] }));
34
+ return ((0, jsx_runtime_1.jsxs)(react_2.Modal, { isOpen: isOpen, onClose: onClose, isCentered: isCentered, closeOnEsc: closeOnEsc, closeOnOverlayClick: closeOnOverlayClick, initialFocusRef: focusCancelOnOpen ? cancelRef : undefined, children: [(0, jsx_runtime_1.jsx)(react_2.ModalOverlay, { backdropFilter: "blur(4px)" }), (0, jsx_runtime_1.jsxs)(react_2.ModalContent, { bg: colors.surfaceRaised, borderRadius: "xl", overflow: "hidden", children: [(0, jsx_runtime_1.jsxs)(react_2.ModalHeader, { borderBottom: "1px solid", borderColor: (0, surfaceRaised_1.raisedRule)(colors), display: "flex", alignItems: "center", gap: 3, children: [(0, jsx_runtime_1.jsx)(react_2.Flex, { align: "center", justify: "center", boxSize: "36px", borderRadius: "full", bg: iconBg !== null && iconBg !== void 0 ? iconBg : swatch.bg, color: iconColor !== null && iconColor !== void 0 ? iconColor : swatch.fg, children: icon !== null && icon !== void 0 ? icon : (0, jsx_runtime_1.jsx)(lucide_react_1.AlertTriangle, { size: 18 }) }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "1.05rem", fontWeight: 600, children: resolvedTitle })] }), (0, jsx_runtime_1.jsx)(react_2.ModalCloseButton, {}), (0, jsx_runtime_1.jsx)(react_2.ModalBody, { py: 6, children: bodyLayout === "stack" ? ((0, jsx_runtime_1.jsxs)(react_2.VStack, { spacing: bodySpacing, align: "stretch", children: [body, actions] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [body, actions] })) })] })] }));
23
35
  };
24
36
  exports.default = ConfirmDialog;
@@ -1,19 +1,39 @@
1
1
  import type { ReactElement, ReactNode } from "react";
2
- /** Reusable Cancel/Confirm modal for delete/deactivate-style prompts — the shared shape behind the library's confirm modals. */
3
- export interface ConfirmDialogProps {
2
+ /** The reversible route offered beside Cancel and the destructive Confirm. */
3
+ export interface ConfirmDialogAlternative {
4
+ /** Button text, e.g. "Deactivate instead". */
5
+ label: string;
6
+ /** What choosing it keeps, shown in a hint box above the buttons. */
7
+ description?: ReactNode;
8
+ onSelect: () => void;
9
+ /** Spinner on the alternative; Cancel and Confirm are disabled meanwhile. */
10
+ isLoading?: boolean;
11
+ }
12
+ interface ConfirmDialogBaseProps {
4
13
  isOpen: boolean;
5
14
  onClose: () => void;
6
15
  /** Fires on Confirm click; does not close the dialog — call onClose yourself. */
7
16
  onConfirm: () => void;
8
- title: string;
9
- /** Body content rendered above the action row (a Text, a description + quote block, ...). */
10
- children: ReactNode;
17
+ /** Body content rendered above the action row (a Text, a description + quote block, ...). Optional when `entityName` builds the body. */
18
+ children?: ReactNode;
11
19
  /** Rendered inside the header swatch. Defaults to a warning triangle. */
12
20
  icon?: ReactNode;
13
- /** Header swatch background; callers resolve their own tone (soft tint vs solid scale). */
14
- iconBg: string;
15
- /** Header swatch icon/text color, paired with `iconBg`. */
16
- iconColor: string;
21
+ /** Header swatch background; derived from `tone` (a soft tint) when omitted. */
22
+ iconBg?: string;
23
+ /** Header swatch icon/text color; derived from `tone` when omitted, so pass it together with `iconBg`. */
24
+ iconColor?: string;
25
+ /** The exact record being destroyed, e.g. "Sabbatical". Switches on the consequence-first body and builds the default title. */
26
+ entityName?: string;
27
+ /** What kind of record, e.g. "leave type"; the default title reads Delete leave type "Sabbatical"? */
28
+ entityKind?: string;
29
+ /** Dependents already counted by the caller ("4 people hold a balance"), joined with " · " on one line. */
30
+ dependents?: string[];
31
+ /** What survives and what stays broken. With `entityName` it defaults to "This cannot be undone."; otherwise it renders only when passed. */
32
+ consequence?: ReactNode;
33
+ /** A calmer reversible choice, drawn as the solid button while Confirm turns outline. Focus still opens on Cancel. */
34
+ alternative?: ConfirmDialogAlternative;
35
+ /** Holds Confirm disabled until a precondition in `children` (an acknowledgement checkbox) is met. */
36
+ isConfirmDisabled?: boolean;
17
37
  /** "destructive" fills Confirm red; "neutral" leaves it primary. Defaults to "destructive". */
18
38
  tone?: "destructive" | "neutral";
19
39
  /** Defaults to "Cancel". */
@@ -36,10 +56,18 @@ export interface ConfirmDialogProps {
36
56
  bodySpacing?: number;
37
57
  /** Extra top padding on the action row. Defaults to 0. */
38
58
  actionsPt?: number;
39
- /** Pins initial focus to Cancel via Chakra's `initialFocusRef`. Defaults to true. */
59
+ /** Pins initial focus to Cancel (never the destructive button) via Chakra's `initialFocusRef`. Defaults to true. */
40
60
  focusCancelOnOpen?: boolean;
41
61
  /** Defaults to true. */
42
62
  isCentered?: boolean;
43
63
  closeOnEsc?: boolean;
44
64
  closeOnOverlayClick?: boolean;
45
65
  }
66
+ /** Reusable Cancel/Confirm modal for delete/deactivate-style prompts; pass `title`, or `entityName` to get a title and a consequence body. */
67
+ export type ConfirmDialogProps = ConfirmDialogBaseProps & ({
68
+ title: string;
69
+ } | {
70
+ title?: string;
71
+ entityName: string;
72
+ });
73
+ export {};
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ /** Copies `value` to the clipboard and briefly confirms with `copiedLabel`. */
2
3
  export interface CopyButtonProps {
3
4
  /** Text to write to the clipboard. */
4
5
  value: string;
@@ -14,6 +14,8 @@ const outlineRung_1 = require("../../Theme/tokens/builders/outlineRung");
14
14
  const primitives_1 = require("../../Theme/tokens/primitives");
15
15
  const focusRing_styles_1 = require("../../Theme/chakra/focusRing.styles");
16
16
  const ToolTip_1 = __importDefault(require("../ToolTip/ToolTip"));
17
+ const activationKey_1 = require("../Common/activationKey");
18
+ const BACKGROUND_TRANSITION = (0, primitives_1.transitionFor)(["background"]);
17
19
  /** Copies `value` to the clipboard in 3 layouts (icon/button/menu-item) — not a full share/export action. */
18
20
  const CopyButton = ({ value, variant = "icon", label = "Copy", copiedLabel = "Copied!", tooltip = "Copy", feedbackDuration = 1500, iconSize = 16, size = "sm", onCopy, onCopyError, }) => {
19
21
  const theme = (0, useCustomTheme_1.useCustomTheme)();
@@ -41,12 +43,7 @@ const CopyButton = ({ value, variant = "icon", label = "Copy", copiedLabel = "Co
41
43
  if (variant === "menu-item") {
42
44
  const hoverAccent = (0, accentText_1.accentTextOnCanvas)(theme.colors.primary, rowBackgrounds.active);
43
45
  const hoverSuccess = (0, outlineRung_1.liftToContrast)(theme.colors.semantic.success[500], rowBackgrounds.active, accentText_1.AA_NORMAL_TEXT);
44
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { role: "button", tabIndex: 0, align: "center", gap: "0.5rem", px: "12px", py: "8px", width: "100%", cursor: "pointer", borderRadius: "md", transition: "background 0.15s ease", _hover: { bg: rowBackgrounds.active }, _focusVisible: (0, focusRing_styles_1.focusVisibleRing)(theme.colors), onClick: handleCopy, onKeyDown: (e) => {
45
- if (e.key !== "Enter" && e.key !== " ")
46
- return;
47
- e.preventDefault();
48
- handleCopy(e);
49
- }, children: [copied ? ((0, jsx_runtime_1.jsx)(lucide_react_1.Check, { size: iconSize, color: hoverSuccess })) : ((0, jsx_runtime_1.jsx)(lucide_react_1.Copy, { size: iconSize, color: hoverAccent })), (0, jsx_runtime_1.jsx)(react_2.Box, { fontSize: "sm", fontWeight: 500, color: copied ? hoverSuccess : hoverAccent, children: copied ? copiedLabel : label })] }), announcement] }));
46
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { role: "button", tabIndex: 0, align: "center", gap: "0.5rem", px: "12px", py: "8px", width: "100%", cursor: "pointer", borderRadius: "md", transition: BACKGROUND_TRANSITION, _hover: { bg: rowBackgrounds.active }, _focusVisible: (0, focusRing_styles_1.focusVisibleRing)(theme.colors), onClick: handleCopy, onKeyDown: (0, activationKey_1.onActivationKey)(handleCopy), children: [copied ? ((0, jsx_runtime_1.jsx)(lucide_react_1.Check, { size: iconSize, color: hoverSuccess })) : ((0, jsx_runtime_1.jsx)(lucide_react_1.Copy, { size: iconSize, color: hoverAccent })), (0, jsx_runtime_1.jsx)(react_2.Box, { fontSize: "sm", fontWeight: 500, color: copied ? hoverSuccess : hoverAccent, children: copied ? copiedLabel : label })] }), announcement] }));
50
47
  }
51
48
  if (variant === "button") {
52
49
  return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { as: "button", align: "center", gap: "6px", px: "12px", py: "6px", borderRadius: "lg", border: "1px solid",