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
@@ -15,8 +15,10 @@ const Avatar_1 = __importDefault(require("../Avatar/Avatar"));
15
15
  const focusRing_styles_1 = require("../../Theme/chakra/focusRing.styles");
16
16
  const motion_1 = require("../../Theme/chakra/motion");
17
17
  const motion_2 = require("../../Theme/tokens/primitives/motion");
18
+ const activationKey_1 = require("../Common/activationKey");
18
19
  const CARD_TRANSITION = (0, motion_2.transitionFor)(["box-shadow", "background-color", "border-color"], "base");
19
20
  const DISMISS_TRANSITION = (0, motion_2.transitionFor)(["background-color", "color", "transform"], "base");
21
+ const TICK_MS = 60000;
20
22
  /** Date-driven countdown card ("due in 3 days" / "overdue by 2 hours"). For inbox-style rows use `NotificationItem`, which cannot render a future date. */
21
23
  const Notification = ({ notification, onClose, showStatus, onClick, isLoading = false, colors, }) => {
22
24
  var _a, _b, _c, _d, _e, _f, _g;
@@ -36,6 +38,15 @@ const Notification = ({ notification, onClose, showStatus, onClick, isLoading =
36
38
  const startDate = (0, react_1.useMemo)(() => notification.startDate
37
39
  ? new Date(notification.startDate)
38
40
  : null, [notification.startDate]);
41
+ const hasTarget = Boolean(notification.dueDate || notification.endDate);
42
+ const [now, setNow] = (0, react_1.useState)(() => Date.now());
43
+ (0, react_1.useEffect)(() => {
44
+ if (!hasTarget || isLoading)
45
+ return;
46
+ setNow(Date.now());
47
+ const timer = setInterval(() => setNow(Date.now()), TICK_MS);
48
+ return () => clearInterval(timer);
49
+ }, [hasTarget, isLoading, notification.dueDate, notification.endDate]);
39
50
  const { timeLabel, diffDays } = (0, react_1.useMemo)(() => {
40
51
  const targetDate = notification.dueDate
41
52
  ? new Date(notification.dueDate)
@@ -44,8 +55,7 @@ const Notification = ({ notification, onClose, showStatus, onClick, isLoading =
44
55
  : null;
45
56
  if (!targetDate)
46
57
  return { timeLabel: "", diffDays: null };
47
- const now = new Date();
48
- const diffMs = targetDate.getTime() - now.getTime();
58
+ const diffMs = targetDate.getTime() - now;
49
59
  const diffMinutes = Math.floor(diffMs / (1000 * 60));
50
60
  const diffHours = diffMinutes / 60;
51
61
  const diffDays = diffHours / 24;
@@ -59,11 +69,11 @@ const Notification = ({ notification, onClose, showStatus, onClick, isLoading =
59
69
  if (diffMs < 0) {
60
70
  const overdueMinutes = Math.abs(diffMinutes);
61
71
  if (overdueMinutes < 60)
62
- label = `${typeLabel} overdue by ${overdueMinutes} minute${overdueMinutes === 1 ? "" : "s"} ago`;
72
+ label = `${typeLabel} overdue by ${overdueMinutes} minute${overdueMinutes === 1 ? "" : "s"}`;
63
73
  else if (overdueMinutes < 1440)
64
- label = `${typeLabel} overdue by ${Math.floor(overdueMinutes / 60)} hour${Math.floor(overdueMinutes / 60) === 1 ? "" : "s"} ago`;
74
+ label = `${typeLabel} overdue by ${Math.floor(overdueMinutes / 60)} hour${Math.floor(overdueMinutes / 60) === 1 ? "" : "s"}`;
65
75
  else
66
- label = `${typeLabel} overdue by ${Math.floor(overdueMinutes / 1440)} day${Math.floor(overdueMinutes / 1440) === 1 ? "" : "s"} ago`;
76
+ label = `${typeLabel} overdue by ${Math.floor(overdueMinutes / 1440)} day${Math.floor(overdueMinutes / 1440) === 1 ? "" : "s"}`;
67
77
  }
68
78
  else {
69
79
  if (diffMinutes < 60)
@@ -74,7 +84,7 @@ const Notification = ({ notification, onClose, showStatus, onClick, isLoading =
74
84
  label = `${typeLabel} due in ${Math.ceil(diffDays)} day${Math.ceil(diffDays) === 1 ? "" : "s"}`;
75
85
  }
76
86
  return { timeLabel: label, diffDays };
77
- }, [notification.dueDate, notification.endDate, notification.type]);
87
+ }, [notification.dueDate, notification.endDate, notification.type, now]);
78
88
  const getStatusColor = () => {
79
89
  if (diffDays === null)
80
90
  return theme.colors.textMuted;
@@ -104,29 +114,17 @@ const Notification = ({ notification, onClose, showStatus, onClick, isLoading =
104
114
  };
105
115
  return startDate.toLocaleString("en-US", options);
106
116
  }, [startDate, notification.type]);
107
- // 🔄 If loading, show skeleton
108
117
  if (isLoading) {
109
118
  return ((0, jsx_runtime_1.jsx)(react_2.Box, { bg: bgColor, border: "1px solid", borderColor: borderColor, borderRadius: "xl", p: 4, w: "100%", maxW: "400px", boxShadow: "sm", children: (0, jsx_runtime_1.jsxs)(react_2.VStack, { align: "start", spacing: 3, w: "100%", children: [(0, jsx_runtime_1.jsxs)(react_2.HStack, { spacing: 2, children: [(0, jsx_runtime_1.jsx)(react_2.SkeletonCircle, { size: "4" }), (0, jsx_runtime_1.jsx)(react_2.Skeleton, { height: "14px", width: "60%" })] }), (0, jsx_runtime_1.jsxs)(react_2.HStack, { align: "center", spacing: 3, w: "100%", children: [(0, jsx_runtime_1.jsx)(react_2.SkeletonCircle, { size: "8" }), (0, jsx_runtime_1.jsxs)(react_2.VStack, { align: "start", spacing: 1, flex: "1", children: [(0, jsx_runtime_1.jsx)(react_2.Skeleton, { height: "16px", width: "70%" }), (0, jsx_runtime_1.jsx)(react_2.Skeleton, { height: "12px", width: "50%" })] })] }), (0, jsx_runtime_1.jsx)(react_2.Divider, { borderColor: borderColor }), (0, jsx_runtime_1.jsxs)(react_2.HStack, { justify: "space-between", w: "100%", children: [(0, jsx_runtime_1.jsx)(react_2.Skeleton, { height: "12px", width: "40%" }), (0, jsx_runtime_1.jsx)(react_2.Skeleton, { height: "12px", width: "30%" })] })] }) }));
110
119
  }
111
- // 🧩 Normal render
112
- return ((0, jsx_runtime_1.jsxs)(react_2.Box, { bg: bgColor, border: "1px solid", borderColor: borderColor, borderRadius: "xl", p: 4, w: "100%", maxW: "400px", boxShadow: "sm", _hover: { boxShadow: "md" }, transition: CARD_TRANSITION, sx: (0, motion_1.reducedMotionSx)(), position: "relative", children: [onClose && ((0, jsx_runtime_1.jsx)(react_2.Box, { position: "absolute", top: "2", right: "2", cursor: "pointer", onClick: onClose, onKeyDown: (e) => {
113
- if (e.key === "Enter" || e.key === " ") {
114
- e.preventDefault();
115
- onClose();
116
- }
117
- }, role: "button", "aria-label": "Dismiss notification", tabIndex: 0, p: 1, borderRadius: "md", _hover: {
120
+ return ((0, jsx_runtime_1.jsxs)(react_2.Box, { bg: bgColor, border: "1px solid", borderColor: borderColor, borderRadius: "xl", p: 4, w: "100%", maxW: "400px", boxShadow: "sm", _hover: { boxShadow: "md" }, transition: CARD_TRANSITION, sx: (0, motion_1.reducedMotionSx)(), position: "relative", children: [onClose && ((0, jsx_runtime_1.jsx)(react_2.Box, { position: "absolute", top: "2", right: "2", cursor: "pointer", onClick: onClose, onKeyDown: (0, activationKey_1.onActivationKey)(() => onClose()), role: "button", "aria-label": "Dismiss notification", tabIndex: 0, p: 1, borderRadius: "md", _hover: {
118
121
  bg: closeTone.bg,
119
122
  color: closeTone.fg,
120
123
  transform: "scale(1.1)",
121
- }, transition: DISMISS_TRANSITION, sx: (0, motion_1.reducedMotionSx)(), children: (0, jsx_runtime_1.jsx)(lucide_react_1.X, { size: 16 }) })), (0, jsx_runtime_1.jsxs)(react_2.VStack, { align: "start", spacing: 3, w: "100%", children: [(0, jsx_runtime_1.jsxs)(react_2.HStack, { spacing: 2, children: [(0, jsx_runtime_1.jsx)(react_2.Icon, { as: TimeIcon, color: dueLabelColor, boxSize: 4 }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "sm", color: dueLabelColor, fontWeight: 600, children: timeLabel })] }), (0, jsx_runtime_1.jsxs)(react_2.HStack, { align: "center", spacing: 3, w: "100%", children: [(0, jsx_runtime_1.jsx)(Avatar_1.default, { size: "sm", name: notification.host || notification.title, src: notification.avatarUrl || undefined }), (0, jsx_runtime_1.jsxs)(react_2.VStack, { align: "start", spacing: 0, flex: "1", children: [(0, jsx_runtime_1.jsx)(react_2.Text, { fontWeight: 700, fontSize: "md", color: titleColor, cursor: "pointer", _hover: { textColor: theme.colors.accentText }, onClick: () => onClick === null || onClick === void 0 ? void 0 : onClick(notification.id, notification.type), ...(onClick && {
124
+ }, _focusVisible: (0, focusRing_styles_1.focusVisibleRing)(theme.colors), transition: DISMISS_TRANSITION, sx: (0, motion_1.reducedMotionSx)(), children: (0, jsx_runtime_1.jsx)(lucide_react_1.X, { size: 16 }) })), (0, jsx_runtime_1.jsxs)(react_2.VStack, { align: "start", spacing: 3, w: "100%", children: [(0, jsx_runtime_1.jsxs)(react_2.HStack, { spacing: 2, children: [(0, jsx_runtime_1.jsx)(react_2.Icon, { as: TimeIcon, color: dueLabelColor, boxSize: 4 }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "sm", color: dueLabelColor, fontWeight: 600, children: timeLabel })] }), (0, jsx_runtime_1.jsxs)(react_2.HStack, { align: "center", spacing: 3, w: "100%", children: [(0, jsx_runtime_1.jsx)(Avatar_1.default, { size: "sm", name: notification.host || notification.title, src: notification.avatarUrl || undefined }), (0, jsx_runtime_1.jsxs)(react_2.VStack, { align: "start", spacing: 0, flex: "1", children: [(0, jsx_runtime_1.jsx)(react_2.Text, { fontWeight: 700, fontSize: "md", color: titleColor, cursor: "pointer", _hover: { textColor: theme.colors.accentText }, onClick: () => onClick === null || onClick === void 0 ? void 0 : onClick(notification.id, notification.type), ...(onClick && {
122
125
  role: "button",
123
126
  tabIndex: 0,
124
- onKeyDown: (e) => {
125
- if (e.key !== "Enter" && e.key !== " ")
126
- return;
127
- e.preventDefault();
128
- onClick(notification.id, notification.type);
129
- },
127
+ onKeyDown: (0, activationKey_1.onActivationKey)(() => onClick(notification.id, notification.type)),
130
128
  _focusVisible: (0, focusRing_styles_1.focusVisibleRing)(theme.colors),
131
129
  }), children: notification.title }), notification.description && ((0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "sm", color: textColor, children: notification.description }))] })] }), (0, jsx_runtime_1.jsx)(react_2.Divider, { borderColor: borderColor }), (0, jsx_runtime_1.jsxs)(react_2.HStack, { justify: "space-between", w: "100%", children: [(0, jsx_runtime_1.jsxs)(react_2.HStack, { spacing: 2, children: [(0, jsx_runtime_1.jsx)(react_2.Icon, { as: lucide_react_1.Calendar, color: metaColor, boxSize: 4 }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "sm", color: metaColor, children: formattedStartDateTime })] }), (0, jsx_runtime_1.jsxs)(react_2.HStack, { spacing: 2, children: [(0, jsx_runtime_1.jsx)(react_2.Icon, { as: lucide_react_1.User, color: metaColor, boxSize: 4 }), notification.host && ((0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "sm", color: metaColor, children: notification.host }))] }), showStatus && ((0, jsx_runtime_1.jsx)(react_2.Box, { boxSize: "3", bg: getStatusColor(), borderRadius: "full" }))] })] })] }));
132
130
  };
@@ -8,7 +8,7 @@ export type NotificationData = {
8
8
  avatarUrl?: string;
9
9
  /** Date-parsable string shown in en-US; meetings add the time, others the year. */
10
10
  startDate: string;
11
- /** Countdown target, preferred over endDate; the label only recomputes when the dates change. */
11
+ /** Countdown target, preferred over endDate; the label refreshes every minute. */
12
12
  dueDate?: string;
13
13
  /** Countdown target used only when dueDate is absent. */
14
14
  endDate?: string;
@@ -22,8 +22,23 @@ export declare function sectionizeByDay<T>(rows: T[], getTime: (row: T) => numbe
22
22
  export declare function groupConsecutive<T>(rows: T[], getKey: (row: T) => string | null | undefined): ConsecutiveGroup<T>[];
23
23
  /** 5 -> "5"; 150 with max 99 -> "99+". Negative/NaN input is clamped to 0. */
24
24
  export declare function formatCount(value: number, max?: number): string;
25
+ export interface RelativeTimeLabels {
26
+ justNow: string;
27
+ minutesAgo: (count: number) => string;
28
+ hoursAgo: (count: number) => string;
29
+ daysAgo: (count: number) => string;
30
+ }
31
+ export declare const DEFAULT_RELATIVE_TIME_LABELS: RelativeTimeLabels;
32
+ /** Overrides for the English wording and the date locale of `formatRelativeTime`. */
33
+ export interface RelativeTimeOptions {
34
+ /** Replaces the English "Just now" / "5m ago" / "3h ago" / "2d ago" wording. */
35
+ labels?: RelativeTimeLabels;
36
+ /** BCP 47 tag for the short date shown past a week; defaults to "en-US". */
37
+ locale?: string;
38
+ }
25
39
  /** "Just now" / "5m ago" / "3h ago" / "2d ago"; falls back to a short date past a week. */
26
- export declare function formatRelativeTime(value: number | string | Date, now?: number | Date): string;
40
+ export declare function formatRelativeTime(value: number | string | Date, now?: number | Date, { labels, locale }?: RelativeTimeOptions): string;
41
+ /** Minimum panel height and bottom gutter for `useAnchoredPanelHeight`. */
27
42
  export interface AnchoredPanelHeightOptions {
28
43
  min?: number;
29
44
  gutter?: number;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DEFAULT_DAY_LABELS = void 0;
3
+ exports.DEFAULT_RELATIVE_TIME_LABELS = exports.DEFAULT_DAY_LABELS = void 0;
4
4
  exports.sectionizeByDay = sectionizeByDay;
5
5
  exports.groupConsecutive = groupConsecutive;
6
6
  exports.formatCount = formatCount;
@@ -80,20 +80,26 @@ const MINUTE = 60;
80
80
  const HOUR = MINUTE * 60;
81
81
  const DAY = HOUR * 24;
82
82
  const WEEK = DAY * 7;
83
+ exports.DEFAULT_RELATIVE_TIME_LABELS = {
84
+ justNow: "Just now",
85
+ minutesAgo: (count) => `${count}m ago`,
86
+ hoursAgo: (count) => `${count}h ago`,
87
+ daysAgo: (count) => `${count}d ago`,
88
+ };
83
89
  /** "Just now" / "5m ago" / "3h ago" / "2d ago"; falls back to a short date past a week. */
84
- function formatRelativeTime(value, now = Date.now()) {
90
+ function formatRelativeTime(value, now = Date.now(), { labels = exports.DEFAULT_RELATIVE_TIME_LABELS, locale = "en-US" } = {}) {
85
91
  const then = toDate(value);
86
92
  const nowMs = typeof now === "number" ? now : now.getTime();
87
93
  const diffSec = Math.max(0, Math.round((nowMs - then.getTime()) / 1000));
88
94
  if (diffSec < MINUTE)
89
- return "Just now";
95
+ return labels.justNow;
90
96
  if (diffSec < HOUR)
91
- return `${Math.floor(diffSec / MINUTE)}m ago`;
97
+ return labels.minutesAgo(Math.floor(diffSec / MINUTE));
92
98
  if (diffSec < DAY)
93
- return `${Math.floor(diffSec / HOUR)}h ago`;
99
+ return labels.hoursAgo(Math.floor(diffSec / HOUR));
94
100
  if (diffSec < WEEK)
95
- return `${Math.floor(diffSec / DAY)}d ago`;
96
- return then.toLocaleDateString("en-US", { day: "2-digit", month: "short" });
101
+ return labels.daysAgo(Math.floor(diffSec / DAY));
102
+ return then.toLocaleDateString(locale, { day: "2-digit", month: "short" });
97
103
  }
98
104
  /** The tickets/hrms formula: max(min, viewport bottom edge - panel top - gutter), remeasured on resize. */
99
105
  function useAnchoredPanelHeight(ref, options) {
@@ -9,6 +9,7 @@ const motion_1 = require("../../Theme/tokens/primitives/motion");
9
9
  const typography_1 = require("../../Theme/tokens/primitives/typography");
10
10
  const motion_2 = require("../../Theme/chakra/motion");
11
11
  const focusRing_styles_1 = require("../../Theme/chakra/focusRing.styles");
12
+ const tonalHover_1 = require("../CheckoutKit/tonalHover");
12
13
  const COPIED_MS = 1600;
13
14
  const DEFAULT_LABELS = {
14
15
  summary: (count, best) => `Offers (${count}) · Best: ${best}`,
@@ -32,6 +33,7 @@ const writeToClipboard = (code) => {
32
33
  const OffersList = ({ offers, bestOfferId, isOpen, defaultOpen = false, onOpenChange, onCopy, labels, "data-testid": testId, }) => {
33
34
  var _a;
34
35
  const { colors } = (0, useCustomTheme_1.useCustomTheme)();
36
+ const hoverFill = (0, tonalHover_1.tonalHover)(colors);
35
37
  const panelId = (0, react_1.useId)();
36
38
  const [innerOpen, setInnerOpen] = (0, react_1.useState)(defaultOpen);
37
39
  const [copiedId, setCopiedId] = (0, react_1.useState)(null);
@@ -65,7 +67,7 @@ const OffersList = ({ offers, bestOfferId, isOpen, defaultOpen = false, onOpenCh
65
67
  }, COPIED_MS);
66
68
  onCopy === null || onCopy === void 0 ? void 0 : onCopy(offer);
67
69
  };
68
- return ((0, jsx_runtime_1.jsxs)(react_2.Box, { bg: colors.background[100], borderRadius: "xl", overflow: "hidden", "data-testid": testId, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { as: "button", type: "button", w: "100%", minH: "3rem", px: 4, py: 3, align: "center", gap: 3, textAlign: "left", borderRadius: "xl", color: colors.header[900], "aria-expanded": open, "aria-controls": panelId, onClick: toggle, transition: (0, motion_1.transitionFor)(["background-color"]), _hover: { bg: colors.background[200] }, sx: { ...(0, focusRing_styles_1.focusVisibleStyles)(colors), ...(0, motion_2.reducedMotionSx)() }, children: [(0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", "aria-hidden": true, display: "inline-flex", flexShrink: 0, color: colors.accentText, children: (0, jsx_runtime_1.jsx)(lucide_react_1.Tag, { size: 18 }) }), (0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", flex: "1", minW: 0, fontSize: "sm", fontWeight: 600, noOfLines: open ? undefined : 1, children: summary }), (0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", "aria-hidden": true, display: "inline-flex", flexShrink: 0, color: colors.textMuted, transform: open ? "rotate(180deg)" : "rotate(0deg)", transition: (0, motion_1.transitionFor)(["transform"]), sx: (0, motion_2.reducedMotionSx)(), children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { size: 18 }) })] }), (0, jsx_runtime_1.jsx)(react_2.Box, { id: panelId, hidden: !open, children: (0, jsx_runtime_1.jsx)(react_2.Box, { as: "ul", listStyleType: "none", m: 0, px: 4, pb: 2, children: offers.map((offer) => {
70
+ return ((0, jsx_runtime_1.jsxs)(react_2.Box, { bg: colors.background[100], borderRadius: "xl", overflow: "hidden", "data-testid": testId, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { as: "button", type: "button", w: "100%", minH: "3rem", px: 4, py: 3, align: "center", gap: 3, textAlign: "left", borderRadius: "xl", color: colors.header[900], "aria-expanded": open, "aria-controls": panelId, onClick: toggle, transition: (0, motion_1.transitionFor)(["background-color"]), _hover: { bg: hoverFill }, sx: { ...(0, focusRing_styles_1.focusVisibleStyles)(colors), ...(0, motion_2.reducedMotionSx)() }, children: [(0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", "aria-hidden": true, display: "inline-flex", flexShrink: 0, color: colors.accentText, children: (0, jsx_runtime_1.jsx)(lucide_react_1.Tag, { size: 18 }) }), (0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", flex: "1", minW: 0, fontSize: "sm", fontWeight: 600, noOfLines: open ? undefined : 1, children: summary }), (0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", "aria-hidden": true, display: "inline-flex", flexShrink: 0, color: colors.textMuted, transform: open ? "rotate(180deg)" : "rotate(0deg)", transition: (0, motion_1.transitionFor)(["transform"]), sx: (0, motion_2.reducedMotionSx)(), children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { size: 18 }) })] }), (0, jsx_runtime_1.jsx)(react_2.Box, { id: panelId, hidden: !open, children: (0, jsx_runtime_1.jsx)(react_2.Box, { as: "ul", listStyleType: "none", m: 0, px: 4, pb: 2, children: offers.map((offer) => {
69
71
  const copied = copiedId === offer.id;
70
72
  const { code } = offer;
71
73
  return ((0, jsx_runtime_1.jsxs)(react_2.Flex, { as: "li", position: "relative", align: "center", justify: "space-between", gap: 3, py: 3, sx: {
@@ -78,7 +80,7 @@ const OffersList = ({ offers, bestOfferId, isOpen, defaultOpen = false, onOpenCh
78
80
  height: "1px",
79
81
  background: colors.background[200],
80
82
  },
81
- }, children: [(0, jsx_runtime_1.jsxs)(react_2.Box, { minW: 0, children: [(0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "sm", fontWeight: 600, color: colors.header[900], children: offer.title }), (0, jsx_runtime_1.jsx)(react_2.Text, { mt: 0.5, fontSize: "sm", lineHeight: 1.45, color: colors.textMuted, children: offer.detail })] }), code ? ((0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: 1, flexShrink: 0, children: [(0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", px: 2.5, py: 1, borderRadius: "md", bg: colors.background[200], color: colors.header[900], fontSize: "xs", fontWeight: 700, letterSpacing: "0.06em", sx: typography_1.NUMERIC_TEXT, children: code }), (0, jsx_runtime_1.jsxs)(react_2.Flex, { as: "button", type: "button", align: "center", gap: 1.5, minH: "2.75rem", px: 3, borderRadius: "lg", fontSize: "sm", fontWeight: 600, color: colors.accentText, "aria-label": copied ? undefined : copy.copyCode(code), onClick: () => copyCode(offer, code), transition: (0, motion_1.transitionFor)(["background-color"]), _hover: { bg: colors.background[200] }, sx: { ...(0, focusRing_styles_1.focusVisibleStyles)(colors), ...(0, motion_2.reducedMotionSx)() }, children: [copied ? (0, jsx_runtime_1.jsx)(lucide_react_1.Check, { size: 16, "aria-hidden": true }) : null, (0, jsx_runtime_1.jsx)("span", { children: copied ? copy.copied : copy.copy })] })] })) : null] }, offer.id));
83
+ }, children: [(0, jsx_runtime_1.jsxs)(react_2.Box, { minW: 0, children: [(0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "sm", fontWeight: 600, color: colors.header[900], children: offer.title }), (0, jsx_runtime_1.jsx)(react_2.Text, { mt: 0.5, fontSize: "sm", lineHeight: 1.45, color: colors.textMuted, children: offer.detail })] }), code ? ((0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: 1, flexShrink: 0, children: [(0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", px: 2.5, py: 1, borderRadius: "md", bg: colors.background[200], color: colors.header[900], fontSize: "xs", fontWeight: 700, letterSpacing: "0.06em", sx: typography_1.NUMERIC_TEXT, children: code }), (0, jsx_runtime_1.jsxs)(react_2.Flex, { as: "button", type: "button", align: "center", gap: 1.5, minH: "2.75rem", px: 3, borderRadius: "lg", fontSize: "sm", fontWeight: 600, color: colors.accentText, "aria-label": copied ? undefined : copy.copyCode(code), onClick: () => copyCode(offer, code), transition: (0, motion_1.transitionFor)(["background-color"]), _hover: { bg: hoverFill }, sx: { ...(0, focusRing_styles_1.focusVisibleStyles)(colors), ...(0, motion_2.reducedMotionSx)() }, children: [copied ? (0, jsx_runtime_1.jsx)(lucide_react_1.Check, { size: 16, "aria-hidden": true }) : null, (0, jsx_runtime_1.jsx)("span", { children: copied ? copy.copied : copy.copy })] })] })) : null] }, offer.id));
82
84
  }) }) }), (0, jsx_runtime_1.jsx)(react_2.VisuallyHidden, { "aria-live": "polite", children: message })] }));
83
85
  };
84
86
  exports.default = OffersList;
@@ -9,6 +9,7 @@ const motion_1 = require("../../Theme/tokens/primitives/motion");
9
9
  const typography_1 = require("../../Theme/tokens/primitives/typography");
10
10
  const motion_2 = require("../../Theme/chakra/motion");
11
11
  const focusRing_styles_1 = require("../../Theme/chakra/focusRing.styles");
12
+ const borderWidths_1 = require("../../Theme/tokens/primitives/borderWidths");
12
13
  const optionInk_1 = require("./optionInk");
13
14
  const CHIP_HEIGHT = { md: "2.75rem", lg: "3.25rem" };
14
15
  const PACK_HEIGHT = { md: "3.5rem", lg: "4rem" };
@@ -64,7 +65,7 @@ const OptionChip = (0, react_1.forwardRef)(function OptionChip({ label, selected
64
65
  return ((0, jsx_runtime_1.jsxs)(react_2.Box, { ...base, display: "inline-flex", flexDirection: "column", alignItems: "center", justifyContent: "center", gap: "0.25rem", minW: CHIP_HEIGHT[size], minH: CHIP_HEIGHT[size], borderRadius: "xl", bg: "transparent", color: colors.text[800], title: showLabel ? undefined : label, sx: {
65
66
  ...motion,
66
67
  "&:hover:not(:disabled) [data-ring]:not([data-selected])": { borderColor: colors.boxborder[500] },
67
- }, children: [(0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", "data-ring": true, "data-selected": selected ? "" : undefined, display: "inline-flex", p: "0.125rem", borderWidth: "2px", borderStyle: "solid", borderRadius: "full", borderColor: selected ? colors.header[900] : invalid ? colors.semanticText.error : "transparent", transition: (0, motion_1.transitionFor)(["border-color"]), sx: (0, motion_2.reducedMotionSx)(), children: (0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", position: "relative", display: "block", boxSize: dot, borderRadius: "full", backgroundColor: swatch !== null && swatch !== void 0 ? swatch : colors.background[200], boxShadow: `inset 0 0 0 1px ${colors.boxborder[200]}`, sx: unavailable ? { "&::after": { content: '""', ...strikeLayer(strikeBackground) } } : undefined }) }), showLabel ? ((0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", fontSize: "xs", fontWeight: selected ? 600 : 500, color: selected ? colors.header[900] : rest.ink, lineHeight: "short", children: label })) : null] }));
68
+ }, children: [(0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", "data-ring": true, "data-selected": selected ? "" : undefined, display: "inline-flex", p: "0.125rem", borderWidth: "2px", borderStyle: "solid", borderRadius: "full", borderColor: selected ? colors.header[900] : invalid ? colors.semanticText.error : "transparent", transition: (0, motion_1.transitionFor)(["border-color"]), sx: (0, motion_2.reducedMotionSx)(), children: (0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", position: "relative", display: "block", boxSize: dot, borderRadius: "full", backgroundColor: swatch !== null && swatch !== void 0 ? swatch : colors.background[200], boxShadow: `inset 0 0 0 ${borderWidths_1.BORDER_WIDTHS.hairline} ${colors.boxborder[200]}`, sx: unavailable ? { "&::after": { content: '""', ...strikeLayer(strikeBackground) } } : undefined }) }), showLabel ? ((0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", fontSize: "xs", fontWeight: selected ? 600 : 500, color: selected ? colors.header[900] : rest.ink, lineHeight: "short", children: label })) : null] }));
68
69
  }
69
70
  if (variant === "image-tile") {
70
71
  const tile = TILE[size];
@@ -93,6 +94,6 @@ const OptionChip = (0, react_1.forwardRef)(function OptionChip({ label, selected
93
94
  ...motion,
94
95
  "&:hover:not(:disabled):not([aria-checked=true])": unavailable ? undefined : { backgroundColor: tone.hoverFill },
95
96
  ...(unavailable ? { "&::after": { content: '""', ...strikeLayer(band("currentColor", "0.5px")) } } : {}),
96
- }, children: [content, isPack && hint ? ((0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", mt: "0.125rem", fontSize: "xs-minus", fontWeight: 500, color: tone.hint, sx: typography_1.NUMERIC_TEXT, children: hint })) : null, !isPack && hint ? ((0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", position: "absolute", top: "-0.375rem", right: "-0.25rem", px: "0.375rem", py: "px", borderRadius: "full", bg: colors.surfaceRaised, color: colors.text[800], fontSize: "0.625rem", fontWeight: 600, lineHeight: "1rem", boxShadow: `0 0 0 1px ${colors.boxborder[200]}`, pointerEvents: "none", children: hint })) : null] }));
97
+ }, children: [content, isPack && hint ? ((0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", mt: "0.125rem", fontSize: "xs-minus", fontWeight: 500, color: tone.hint, sx: typography_1.NUMERIC_TEXT, children: hint })) : null, !isPack && hint ? ((0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", position: "absolute", top: "-0.375rem", right: "-0.25rem", px: "0.375rem", py: "px", borderRadius: "full", bg: colors.surfaceRaised, color: colors.text[800], fontSize: "0.625rem", fontWeight: 600, lineHeight: "1rem", boxShadow: `0 0 0 ${borderWidths_1.BORDER_WIDTHS.hairline} ${colors.boxborder[200]}`, pointerEvents: "none", children: hint })) : null] }));
97
98
  });
98
99
  exports.default = OptionChip;
@@ -4,15 +4,17 @@ exports.optionInk = void 0;
4
4
  const color_1 = require("../../Theme/tokens/builders/color");
5
5
  const accentText_1 = require("../../Theme/tokens/builders/accentText");
6
6
  const outlineRung_1 = require("../../Theme/tokens/builders/outlineRung");
7
+ const planeStep_1 = require("../../Theme/tokens/builders/planeStep");
7
8
  /** Resting and selected fills for an option; selection is the neutral ink fill, never the brand. */
8
9
  const optionInk = (colors) => {
9
10
  const selectedFill = colors.header[900];
11
+ const restHover = (0, planeStep_1.bandOn)(colors.background[400], colors.background[300]);
10
12
  const selectedInk = (0, accentText_1.onFilled)(selectedFill, colors.white, colors.black);
11
13
  const rest = {
12
14
  fill: colors.background[300],
13
- hoverFill: colors.background[400],
15
+ hoverFill: restHover,
14
16
  ink: colors.text[800],
15
- hint: (0, outlineRung_1.liftToContrast)(colors.text[700], colors.background[400], accentText_1.AA_NORMAL_TEXT),
17
+ hint: (0, outlineRung_1.liftToContrast)(colors.text[700], restHover, accentText_1.AA_NORMAL_TEXT),
16
18
  };
17
19
  const selected = {
18
20
  fill: selectedFill,
@@ -8,6 +8,7 @@ const motion_1 = require("../../Theme/tokens/primitives/motion");
8
8
  const typography_1 = require("../../Theme/tokens/primitives/typography");
9
9
  const motion_2 = require("../../Theme/chakra/motion");
10
10
  const accentText_1 = require("../../Theme/tokens/builders/accentText");
11
+ const borderWidths_1 = require("../../Theme/tokens/primitives/borderWidths");
11
12
  const DEFAULT_LABELS = { done: "Completed", current: "In progress", upcoming: "Upcoming" };
12
13
  const MARKER = "1.5rem";
13
14
  const RULE = "2px";
@@ -29,7 +30,7 @@ const Marker = ({ state, colors }) => {
29
30
  return ((0, jsx_runtime_1.jsx)(react_1.Box, { ...base, bg: ink, color: (0, accentText_1.onFilled)(ink, colors.white, colors.black), children: (0, jsx_runtime_1.jsx)(lucide_react_1.Check, { size: 14, strokeWidth: 3 }) }));
30
31
  }
31
32
  if (state === "current") {
32
- return ((0, jsx_runtime_1.jsx)(react_1.Box, { ...base, bg: "transparent", boxShadow: `inset 0 0 0 2px ${ink}`, children: (0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", boxSize: "0.5rem", borderRadius: "full", bg: ink }) }));
33
+ return ((0, jsx_runtime_1.jsx)(react_1.Box, { ...base, bg: "transparent", boxShadow: `inset 0 0 0 ${borderWidths_1.BORDER_WIDTHS.thick} ${ink}`, children: (0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", boxSize: "0.5rem", borderRadius: "full", bg: ink }) }));
33
34
  }
34
35
  return (0, jsx_runtime_1.jsx)(react_1.Box, { ...base, bg: "transparent", boxShadow: `inset 0 0 0 1.5px ${colors.textMuted}` });
35
36
  };
@@ -11,12 +11,15 @@ const useCustomTheme_1 = require("../../Theme/useCustomTheme");
11
11
  const accentText_1 = require("../../Theme/tokens/builders/accentText");
12
12
  const chartColorsFromTheme_1 = require("../../Theme/tokens/builders/chartColorsFromTheme");
13
13
  const outlineRung_1 = require("../../Theme/tokens/builders/outlineRung");
14
+ const surfaceRaised_1 = require("../../Theme/tokens/builders/surfaceRaised");
14
15
  const rowStates_1 = require("../../Theme/tokens/builders/rowStates");
15
16
  const optionRowInk_1 = require("../Select/optionRowInk");
16
17
  const useExclusiveOverlay_1 = require("../../Hooks/useExclusiveOverlay");
17
18
  const useMatchMedia_1 = require("../../Hooks/useMatchMedia");
18
19
  const ToolTip_1 = __importDefault(require("../ToolTip/ToolTip"));
19
20
  const OrgSwitcherProps_1 = require("./OrgSwitcherProps");
21
+ const motion_1 = require("../../Theme/tokens/primitives/motion");
22
+ const BACKGROUND_TRANSITION = (0, motion_1.transitionFor)(["background"]);
20
23
  const sizeMap = {
21
24
  sm: { h: "32px", avatarH: "32px", avatar: "22px", font: "0.8rem", sub: "0.65rem", px: 2 },
22
25
  md: { h: "40px", avatarH: "36px", avatar: "28px", font: "0.9rem", sub: "0.7rem", px: 3 },
@@ -29,10 +32,10 @@ const Avatar = ({ org, boxSize, fontSize, }) => {
29
32
  return ((0, jsx_runtime_1.jsx)(react_2.Image, { src: org.logoUrl, alt: org.name, boxSize: boxSize, borderRadius: "lg", objectFit: "cover", flexShrink: 0 }));
30
33
  }
31
34
  const fill = (0, OrgSwitcherProps_1.avatarColor)(org.name, (0, chartColorsFromTheme_1.chartMode)(colors));
32
- return ((0, jsx_runtime_1.jsx)(react_2.Flex, { align: "center", justify: "center", boxSize: boxSize, borderRadius: "lg", flexShrink: 0, bg: fill, color: (0, accentText_1.onFilled)(fill, colors.white, colors.black), fontSize: fontSize, fontWeight: 700, children: (0, OrgSwitcherProps_1.orgInitial)(org.name) }));
35
+ return ((0, jsx_runtime_1.jsx)(react_2.Flex, { "aria-hidden": "true", "data-initials": (0, OrgSwitcherProps_1.orgInitial)(org.name), _before: { content: "attr(data-initials)" }, align: "center", justify: "center", boxSize: boxSize, borderRadius: "lg", flexShrink: 0, bg: fill, color: (0, accentText_1.onFilled)(fill, colors.white, colors.black), fontSize: fontSize, fontWeight: 700 }));
33
36
  };
34
37
  const OrgSwitcher = ({ organizations, value, onChange, isLoading = false, isSearchable, searchThreshold = 6, triggerVariant = "ghost", size = "md", maxWidth = "200px", menuMinWidth = "280px", placeholder = "Select organization", ariaLabel = "Switch organization", showRole = true, display = "full", }) => {
35
- var _a, _b;
38
+ var _a, _b, _c;
36
39
  const theme = (0, useCustomTheme_1.useCustomTheme)();
37
40
  const isMd = (0, useMatchMedia_1.useMatchMedia)(MD_QUERY, true);
38
41
  const avatarOnly = display === "avatar" || (display === "auto" && !isMd);
@@ -90,6 +93,9 @@ const OrgSwitcher = ({ organizations, value, onChange, isLoading = false, isSear
90
93
  : { bg: "transparent" };
91
94
  // NOTE: hover reads against backgroundColor.light (the navbar shell) — for zinc the two measured near-1.0, invisible.
92
95
  const triggerHoverBg = (0, outlineRung_1.resolveHoverTint)(theme.colors.gray[100], theme.colors.backgroundColor.light);
96
+ const searchRule = (0, accentText_1.isDarkCanvas)(theme.colors.surfaceRaised)
97
+ ? (0, surfaceRaised_1.raisedRule)(theme.colors)
98
+ : theme.colors.gray[100];
93
99
  const handleSelect = (org) => {
94
100
  onClose();
95
101
  setQuery("");
@@ -99,13 +105,14 @@ const OrgSwitcher = ({ organizations, value, onChange, isLoading = false, isSear
99
105
  const avatarNode = selected ? ((0, jsx_runtime_1.jsx)(Avatar, { org: selected, boxSize: s.avatar, fontSize: s.sub })) : ((0, jsx_runtime_1.jsx)(react_2.Flex, { align: "center", justify: "center", boxSize: s.avatar, borderRadius: "lg", bg: theme.colors.gray[100], color: (0, accentText_1.accentTextOnCanvas)(theme.colors.gray, theme.colors.gray[100]), flexShrink: 0, children: (0, jsx_runtime_1.jsx)(lucide_react_1.Building2, { size: 14 }) }));
100
106
  const labelGap = s.px === 2 ? 8 : 10;
101
107
  const squeezedWidth = `calc(${s.px * 8 + labelGap * 2 + 16}px + ${s.avatar})`;
102
- const trigger = ((0, jsx_runtime_1.jsxs)(react_2.Flex, { as: "button", type: "button", "aria-label": avatarOnly && selected ? `${ariaLabel}, ${selected.name}` : ariaLabel, align: "center", justify: avatarOnly ? "center" : undefined, gap: avatarOnly ? "4px" : `${labelGap}px`, h: avatarOnly ? s.avatarH : s.h, px: avatarOnly ? "6px" : s.px, minW: avatarOnly ? undefined : squeezedWidth, flexShrink: avatarOnly ? 0 : 1, borderRadius: "lg", cursor: isLoading ? "default" : "pointer", opacity: isLoading ? 0.6 : 1, pointerEvents: isLoading ? "none" : "auto", transition: "background 0.15s ease", _hover: { bg: triggerVariant === "ghost" ? triggerHoverBg : undefined }, ...triggerStyles, children: [avatarNode, !avatarOnly && ((0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: s.font, fontWeight: 600, color: theme.colors.gray[700], maxW: maxWidth, minW: 0, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", textAlign: "left", children: (_a = selected === null || selected === void 0 ? void 0 : selected.name) !== null && _a !== void 0 ? _a : placeholder })), isLoading ? ((0, jsx_runtime_1.jsx)(react_2.Spinner, { size: "xs", thickness: "1.5px", color: theme.colors.accentText, flexShrink: 0 })) : avatarOnly ? ((0, jsx_runtime_1.jsx)(react_2.Box, { as: lucide_react_1.ChevronDown, size: 12, color: theme.colors.textMuted, flexShrink: 0, "aria-hidden": "true" })) : ((0, jsx_runtime_1.jsx)(react_2.Box, { as: lucide_react_1.ChevronsUpDown, size: 16, color: theme.colors.textMuted, flexShrink: 0 }))] }));
108
+ const shownName = avatarOnly ? selected === null || selected === void 0 ? void 0 : selected.name : ((_a = selected === null || selected === void 0 ? void 0 : selected.name) !== null && _a !== void 0 ? _a : placeholder);
109
+ const trigger = ((0, jsx_runtime_1.jsxs)(react_2.Flex, { as: "button", type: "button", "aria-label": shownName ? `${ariaLabel}, ${shownName}` : ariaLabel, align: "center", justify: avatarOnly ? "center" : undefined, gap: avatarOnly ? "4px" : `${labelGap}px`, h: avatarOnly ? s.avatarH : s.h, px: avatarOnly ? "6px" : s.px, minW: avatarOnly ? undefined : squeezedWidth, flexShrink: avatarOnly ? 0 : 1, borderRadius: "lg", cursor: isLoading ? "default" : "pointer", opacity: isLoading ? 0.6 : 1, pointerEvents: isLoading ? "none" : "auto", transition: BACKGROUND_TRANSITION, _hover: { bg: triggerVariant === "ghost" ? triggerHoverBg : undefined }, ...triggerStyles, children: [avatarNode, !avatarOnly && ((0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: s.font, fontWeight: 600, color: theme.colors.gray[700], maxW: maxWidth, minW: 0, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", textAlign: "left", children: (_b = selected === null || selected === void 0 ? void 0 : selected.name) !== null && _b !== void 0 ? _b : placeholder })), isLoading ? ((0, jsx_runtime_1.jsx)(react_2.Spinner, { size: "xs", thickness: "1.5px", color: theme.colors.accentText, flexShrink: 0 })) : avatarOnly ? ((0, jsx_runtime_1.jsx)(react_2.Box, { as: lucide_react_1.ChevronDown, size: 12, color: theme.colors.textMuted, flexShrink: 0, "aria-hidden": "true" })) : ((0, jsx_runtime_1.jsx)(react_2.Box, { as: lucide_react_1.ChevronsUpDown, size: 16, color: theme.colors.textMuted, flexShrink: 0 }))] }));
103
110
  return ((0, jsx_runtime_1.jsxs)(react_2.Popover, { isOpen: isOpen, onOpen: handlePopoverOpen, onClose: () => {
104
111
  onClose();
105
112
  setQuery("");
106
- }, placement: "bottom-start", initialFocusRef: showSearch ? searchRef : firstOptionRef, isLazy: true, children: [avatarOnly ? ((0, jsx_runtime_1.jsx)(ToolTip_1.default, { label: (_b = selected === null || selected === void 0 ? void 0 : selected.name) !== null && _b !== void 0 ? _b : placeholder, placement: "bottom", isDisabled: isOpen, children: (0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", display: "inline-flex", flexShrink: 0, children: (0, jsx_runtime_1.jsx)(react_2.PopoverTrigger, { children: trigger }) }) })) : ((0, jsx_runtime_1.jsx)(react_2.PopoverTrigger, { children: trigger })), (0, jsx_runtime_1.jsx)(react_2.PopoverContent, { minW: menuMinWidth, maxW: "calc(100vw - 32px)", w: "auto",
113
+ }, placement: "bottom-start", initialFocusRef: showSearch ? searchRef : firstOptionRef, isLazy: true, children: [avatarOnly ? ((0, jsx_runtime_1.jsx)(ToolTip_1.default, { label: (_c = selected === null || selected === void 0 ? void 0 : selected.name) !== null && _c !== void 0 ? _c : placeholder, placement: "bottom", isDisabled: isOpen, children: (0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", display: "inline-flex", flexShrink: 0, children: (0, jsx_runtime_1.jsx)(react_2.PopoverTrigger, { children: trigger }) }) })) : ((0, jsx_runtime_1.jsx)(react_2.PopoverTrigger, { children: trigger })), (0, jsx_runtime_1.jsx)(react_2.PopoverContent, { minW: menuMinWidth, maxW: "calc(100vw - 32px)", w: "auto",
107
114
  // NOTE: Chakra's --popper-bg is hardcoded white via dead _dark — without an explicit bg the panel stayed white.
108
- bg: theme.colors.surfaceRaised, borderRadius: "xl", overflow: "hidden", boxShadow: `0 10px 30px ${theme.colors.boxShadow.default}`, _focus: { outline: "none", boxShadow: `0 10px 30px ${theme.colors.boxShadow.default}` }, children: (0, jsx_runtime_1.jsxs)(react_2.PopoverBody, { p: 0, children: [showSearch && ((0, jsx_runtime_1.jsx)(react_2.Box, { p: 2, borderBottom: "1px solid", borderColor: theme.colors.gray[100], children: (0, jsx_runtime_1.jsxs)(react_2.InputGroup, { size: "sm", children: [(0, jsx_runtime_1.jsx)(react_2.InputLeftElement, { pointerEvents: "none", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Search, { size: 15, color: theme.colors.textMuted }) }), (0, jsx_runtime_1.jsx)(react_2.Input, { ref: searchRef, placeholder: "Search organizations", value: query, onChange: (e) => setQuery(e.target.value), onKeyDown: (e) => {
115
+ bg: theme.colors.surfaceRaised, borderRadius: "xl", overflow: "hidden", boxShadow: "float", _focus: { outline: "none", boxShadow: "float" }, children: (0, jsx_runtime_1.jsxs)(react_2.PopoverBody, { p: 0, children: [showSearch && ((0, jsx_runtime_1.jsx)(react_2.Box, { p: 2, borderBottom: "1px solid", borderColor: searchRule, children: (0, jsx_runtime_1.jsxs)(react_2.InputGroup, { size: "sm", children: [(0, jsx_runtime_1.jsx)(react_2.InputLeftElement, { pointerEvents: "none", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Search, { size: 15, color: theme.colors.textMuted }) }), (0, jsx_runtime_1.jsx)(react_2.Input, { ref: searchRef, placeholder: "Search organizations", value: query, onChange: (e) => setQuery(e.target.value), onKeyDown: (e) => {
109
116
  if (e.key === "ArrowDown" && filtered.length > 0) {
110
117
  e.preventDefault();
111
118
  focusOption(0);
@@ -116,7 +123,7 @@ const OrgSwitcher = ({ organizations, value, onChange, isLoading = false, isSear
116
123
  optionRefs.current[idx] = el;
117
124
  if (idx === 0)
118
125
  firstOptionRef.current = el;
119
- }, tabIndex: idx === activeIndex ? 0 : -1, align: "center", gap: "10px", w: "100%", textAlign: "left", border: "none", fontFamily: "inherit", px: 3, py: 2, cursor: "pointer", bg: "transparent", transition: "background 0.12s ease", ...(0, optionRowInk_1.optionRowCursorSx)(rowBackgrounds), onClick: () => handleSelect(org), children: [(0, jsx_runtime_1.jsx)(Avatar, { org: org, boxSize: s.avatar, fontSize: s.sub }), (0, jsx_runtime_1.jsxs)(react_2.Box, { flex: "1", minW: 0, children: [(0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: s.font, fontWeight: isActive ? 600 : 500, color: theme.colors.text[900], overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", children: org.name }), showRole && org.role && ((0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: s.sub, color: theme.colors.text[500], overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", children: org.role }))] }), isActive && ((0, jsx_runtime_1.jsx)(react_2.Box, { as: lucide_react_1.Check, size: 16, color: theme.colors.accentText, flexShrink: 0 }))] }, org.id));
126
+ }, tabIndex: idx === activeIndex ? 0 : -1, align: "center", gap: "10px", w: "100%", textAlign: "left", border: "none", fontFamily: "inherit", px: 3, py: 2, cursor: "pointer", bg: "transparent", transition: BACKGROUND_TRANSITION, ...(0, optionRowInk_1.optionRowCursorSx)(rowBackgrounds), onClick: () => handleSelect(org), children: [(0, jsx_runtime_1.jsx)(Avatar, { org: org, boxSize: s.avatar, fontSize: s.sub }), (0, jsx_runtime_1.jsxs)(react_2.Box, { flex: "1", minW: 0, children: [(0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: s.font, fontWeight: isActive ? 600 : 500, color: theme.colors.text[900], overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", children: org.name }), showRole && org.role && ((0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: s.sub, color: theme.colors.text[500], overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", children: org.role }))] }), isActive && ((0, jsx_runtime_1.jsx)(react_2.Box, { as: lucide_react_1.Check, size: 16, color: theme.colors.accentText, flexShrink: 0 }))] }, org.id));
120
127
  }), filtered.length === 0 && ((0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "sm", color: theme.colors.textMuted, textAlign: "center", py: 6, children: "No organizations found" }))] })] }) })] }));
121
128
  };
122
129
  exports.default = OrgSwitcher;
@@ -37,7 +37,7 @@ export interface OrgSwitcherProps {
37
37
  menuMinWidth?: string;
38
38
  /** Shown when no org is selected. */
39
39
  placeholder?: string;
40
- /** Accessible label for the trigger. */
40
+ /** Names the trigger; the shown organization (or placeholder) is appended, so the name always holds the visible text. */
41
41
  ariaLabel?: string;
42
42
  /** Show the role subtitle inside the dropdown rows. Default true. */
43
43
  showRole?: boolean;
@@ -15,11 +15,13 @@ const tone_1 = require("../../Theme/tokens/builders/tone");
15
15
  const motion_1 = require("../../Theme/tokens/primitives/motion");
16
16
  const motion_2 = require("../../Theme/chakra/motion");
17
17
  const focusRing_styles_1 = require("../../Theme/chakra/focusRing.styles");
18
+ const Avatar_1 = __importDefault(require("../Avatar/Avatar"));
18
19
  const Button_1 = __importDefault(require("../Button/Button"));
19
20
  const EmptyState_1 = __importDefault(require("../EmptyState/EmptyState"));
20
21
  const Tag_1 = __importDefault(require("../Tag/Tag"));
21
22
  const CreateOrgModal_1 = __importDefault(require("./CreateOrgModal"));
22
23
  const DeleteOrgModal_1 = __importDefault(require("./DeleteOrgModal"));
24
+ const activationKey_1 = require("../Common/activationKey");
23
25
  const DEFAULT_LABELS = {
24
26
  greeting: "Hello, User!",
25
27
  manageSubtitle: "Manage your organizations",
@@ -133,12 +135,7 @@ const OrganizationDetails = ({ activeOrganizations, invitedOrganizations, isLoad
133
135
  borderColor: colors.primary[300],
134
136
  boxShadow: "lg",
135
137
  transform: "translateY(-3px)",
136
- }, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { justifyContent: "space-between", alignItems: "center", mb: 2, children: [(0, jsx_runtime_1.jsx)(react_2.Flex, { align: "center", justify: "center", boxSize: "36px", borderRadius: "lg", bg: primaryTile, color: onPrimaryTile, children: (0, jsx_runtime_1.jsx)(lucide_react_1.Building2, { size: 18 }) }), (0, jsx_runtime_1.jsxs)(react_2.HStack, { spacing: 1, children: [item.default === 1 ? ((0, jsx_runtime_1.jsxs)(react_2.Badge, { colorScheme: "green", borderRadius: "full", px: 2, py: 0.5, display: "flex", alignItems: "center", gap: 1, fontSize: "0.7rem", fontWeight: 600, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.CheckCircle2, { size: 12 }), labels.default] })) : isSwitching ? ((0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: 2, color: colors.accentText, children: [(0, jsx_runtime_1.jsx)(react_2.Spinner, { size: "sm" }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "xs", children: labels.settingDefault })] })) : ((0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: 1, fontSize: "xs", color: colors.accentText, fontWeight: 600, cursor: "pointer", _hover: { color: colors.primary[700], gap: 2 }, transition: (0, motion_1.transitionFor)(["color", "gap"]), sx: (0, motion_2.reducedMotionSx)(), role: "button", tabIndex: 0, _focusVisible: (0, focusRing_styles_1.focusVisibleRing)(colors), onClick: () => onSetDefault === null || onSetDefault === void 0 ? void 0 : onSetDefault(item.orgId), onKeyDown: (e) => {
137
- if (e.key !== "Enter" && e.key !== " ")
138
- return;
139
- e.preventDefault();
140
- onSetDefault === null || onSetDefault === void 0 ? void 0 : onSetDefault(item.orgId);
141
- }, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.CheckCircle2, { size: 12 }), (0, jsx_runtime_1.jsx)(react_2.Text, { children: labels.setAsDefault })] })), canEdit && ((0, jsx_runtime_1.jsx)(react_2.Tooltip, { label: labels.editOrganization, hasArrow: true, children: (0, jsx_runtime_1.jsx)(react_2.IconButton, { "aria-label": labels.editOrganization, icon: (0, jsx_runtime_1.jsx)(lucide_react_1.Pencil, { size: 12 }), size: "xs", variant: "ghost", color: muted, borderRadius: "full", _hover: { color: onPrimaryTile, bg: primaryTile }, onClick: () => startEditing(item) }) })), (0, jsx_runtime_1.jsx)(react_2.Tooltip, { label: isProtected
138
+ }, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { justifyContent: "space-between", alignItems: "center", mb: 2, children: [(0, jsx_runtime_1.jsx)(react_2.Flex, { align: "center", justify: "center", boxSize: "36px", borderRadius: "lg", bg: primaryTile, color: onPrimaryTile, children: (0, jsx_runtime_1.jsx)(lucide_react_1.Building2, { size: 18 }) }), (0, jsx_runtime_1.jsxs)(react_2.HStack, { spacing: 1, children: [item.default === 1 ? ((0, jsx_runtime_1.jsxs)(react_2.Badge, { colorScheme: "green", borderRadius: "full", px: 2, py: 0.5, display: "flex", alignItems: "center", gap: 1, fontSize: "0.7rem", fontWeight: 600, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.CheckCircle2, { size: 12 }), labels.default] })) : isSwitching ? ((0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: 2, color: colors.accentText, children: [(0, jsx_runtime_1.jsx)(react_2.Spinner, { size: "sm" }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "xs", children: labels.settingDefault })] })) : ((0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: 1, fontSize: "xs", color: colors.accentText, fontWeight: 600, cursor: "pointer", _hover: { color: colors.primary[700], gap: 2 }, transition: (0, motion_1.transitionFor)(["color", "gap"]), sx: (0, motion_2.reducedMotionSx)(), role: "button", tabIndex: 0, _focusVisible: (0, focusRing_styles_1.focusVisibleRing)(colors), onClick: () => onSetDefault === null || onSetDefault === void 0 ? void 0 : onSetDefault(item.orgId), onKeyDown: (0, activationKey_1.onActivationKey)(() => onSetDefault === null || onSetDefault === void 0 ? void 0 : onSetDefault(item.orgId)), children: [(0, jsx_runtime_1.jsx)(lucide_react_1.CheckCircle2, { size: 12 }), (0, jsx_runtime_1.jsx)(react_2.Text, { children: labels.setAsDefault })] })), canEdit && ((0, jsx_runtime_1.jsx)(react_2.Tooltip, { label: labels.editOrganization, hasArrow: true, children: (0, jsx_runtime_1.jsx)(react_2.IconButton, { "aria-label": labels.editOrganization, icon: (0, jsx_runtime_1.jsx)(lucide_react_1.Pencil, { size: 12 }), size: "xs", variant: "ghost", color: muted, borderRadius: "full", _hover: { color: onPrimaryTile, bg: primaryTile }, onClick: () => startEditing(item) }) })), (0, jsx_runtime_1.jsx)(react_2.Tooltip, { label: isProtected
142
139
  ? ((_d = item.deleteDisabledReason) !== null && _d !== void 0 ? _d : labels.protectedOrganization)
143
140
  : labels.deleteOrganization, hasArrow: true, children: isProtected ? ((0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", display: "inline-flex", children: deleteButton })) : (deleteButton) })] })] }), isEditingThis ? ((0, jsx_runtime_1.jsxs)(react_2.Box, { children: [(0, jsx_runtime_1.jsxs)(react_2.HStack, { spacing: 1, children: [(0, jsx_runtime_1.jsx)(react_2.Input, { value: editValue, onChange: (e) => {
144
141
  setEditValue(e.target.value);
@@ -171,7 +168,7 @@ const OrganizationDetails = ({ activeOrganizations, invitedOrganizations, isLoad
171
168
  const hasOrganizations = activeOrganizations.length > 0 || invitedOrganizations.length > 0;
172
169
  return ((0, jsx_runtime_1.jsxs)(react_2.Box, { backgroundColor: pageBg, minHeight: "100%", p: { base: 2, md: 3 }, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { ...cardSx, px: 3, py: 2.5, mb: 3, alignItems: "center", justifyContent: "space-between", flexWrap: "wrap", gap: 3, bgGradient: `linear(135deg, ${primary50} 0%, ${primary100} 100%)`, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { alignItems: "center", gap: 3, children: [onBack && ((0, jsx_runtime_1.jsx)(react_2.IconButton, { "aria-label": "Go back", icon: (0, jsx_runtime_1.jsx)(lucide_react_1.ArrowLeft, { size: 18 }), variant: "ghost", size: "sm", color: subtle, onClick: onBack })), (0, jsx_runtime_1.jsx)(react_2.Flex, { align: "center", justify: "center", boxSize: "36px", borderRadius: "full", bg: primarySolid.fill, color: primarySolid.color, children: (0, jsx_runtime_1.jsx)(lucide_react_1.Building2, { size: 18 }) }), (0, jsx_runtime_1.jsxs)(react_2.Box, { children: [(0, jsx_runtime_1.jsxs)(react_2.HStack, { spacing: 2, children: [(0, jsx_runtime_1.jsx)(react_2.Heading, { size: "sm", color: heading, fontWeight: 700, children: userName
173
170
  ? `${labels.greeting.replace(/User!?/, "")}${userName}!`.trim()
174
- : labels.greeting }), (0, jsx_runtime_1.jsx)(react_2.Avatar, { size: "xs", name: userName, src: userAvatarUrl })] }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "xs", color: subtle, mt: 0.5, children: labels.manageSubtitle })] })] }), (0, jsx_runtime_1.jsx)(Button_1.default, { label: labels.createNewOrganization, onClick: () => setCreateOpen(true), leftIcon: (0, jsx_runtime_1.jsx)(lucide_react_1.Plus, { size: 16 }), colorScheme: "primary", size: "sm" })] }), isLoading ? ((0, jsx_runtime_1.jsx)(react_2.Box, { ...gridSx, children: Array.from({ length: 6 }).map((_, idx) => ((0, jsx_runtime_1.jsxs)(react_2.Box, { ...cardSx, p: 3, children: [(0, jsx_runtime_1.jsx)(react_2.Skeleton, { boxSize: "36px", borderRadius: "lg", mb: 2 }), (0, jsx_runtime_1.jsx)(react_2.SkeletonText, { noOfLines: 2, spacing: 2 })] }, idx))) })) : !hasOrganizations ? ((0, jsx_runtime_1.jsx)(EmptyState_1.default, { icon: lucide_react_1.Building2, title: labels.noOrganizationsTitle, description: labels.noOrganizationsDescription, minH: "40vh", action: (0, jsx_runtime_1.jsx)(Button_1.default, { label: labels.createOrganization, onClick: () => setCreateOpen(true), leftIcon: (0, jsx_runtime_1.jsx)(lucide_react_1.Plus, { size: 16 }), colorScheme: "primary", size: "sm" }) })) : ((0, jsx_runtime_1.jsxs)(react_2.VStack, { align: "stretch", spacing: 4, children: [activeOrganizations.length > 0 && ((0, jsx_runtime_1.jsxs)(react_2.Box, { children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: 2, mb: 2, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Users, { size: 16, color: colors.accentText }), (0, jsx_runtime_1.jsx)(react_2.Heading, { size: "sm", color: heading, fontWeight: 600, children: labels.activeOrganizations }), sectionBadge(activeOrganizations.length, "blue")] }), (0, jsx_runtime_1.jsx)(react_2.Box, { ...gridSx, children: activeOrganizations.map(renderActiveCard) })] })), invitedOrganizations.length > 0 && ((0, jsx_runtime_1.jsxs)(react_2.Box, { children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: 2, mb: 2, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Mail, { size: 16, color: colors.semanticText.warning }), (0, jsx_runtime_1.jsx)(react_2.Heading, { size: "sm", color: heading, fontWeight: 600, children: labels.invitedOrganizations }), sectionBadge(invitedOrganizations.length, "yellow")] }), (0, jsx_runtime_1.jsx)(react_2.Box, { ...gridSx, children: invitedOrganizations.map(renderInvitedCard) })] }))] })), footerSlot, (0, jsx_runtime_1.jsx)(CreateOrgModal_1.default, { isOpen: isCreateOpen, onClose: () => setCreateOpen(false), isLoading: isCreating, onSubmit: async (values) => {
171
+ : labels.greeting }), userName ? (0, jsx_runtime_1.jsx)(Avatar_1.default, { size: "xs", name: userName, src: userAvatarUrl }) : null] }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "xs", color: subtle, mt: 0.5, children: labels.manageSubtitle })] })] }), (0, jsx_runtime_1.jsx)(Button_1.default, { label: labels.createNewOrganization, onClick: () => setCreateOpen(true), leftIcon: (0, jsx_runtime_1.jsx)(lucide_react_1.Plus, { size: 16 }), colorScheme: "primary", size: "sm" })] }), isLoading ? ((0, jsx_runtime_1.jsx)(react_2.Box, { ...gridSx, children: Array.from({ length: 6 }).map((_, idx) => ((0, jsx_runtime_1.jsxs)(react_2.Box, { ...cardSx, p: 3, children: [(0, jsx_runtime_1.jsx)(react_2.Skeleton, { boxSize: "36px", borderRadius: "lg", mb: 2 }), (0, jsx_runtime_1.jsx)(react_2.SkeletonText, { noOfLines: 2, spacing: 2 })] }, idx))) })) : !hasOrganizations ? ((0, jsx_runtime_1.jsx)(EmptyState_1.default, { icon: lucide_react_1.Building2, title: labels.noOrganizationsTitle, description: labels.noOrganizationsDescription, minH: "40vh", action: (0, jsx_runtime_1.jsx)(Button_1.default, { label: labels.createOrganization, onClick: () => setCreateOpen(true), leftIcon: (0, jsx_runtime_1.jsx)(lucide_react_1.Plus, { size: 16 }), colorScheme: "primary", size: "sm" }) })) : ((0, jsx_runtime_1.jsxs)(react_2.VStack, { align: "stretch", spacing: 4, children: [activeOrganizations.length > 0 && ((0, jsx_runtime_1.jsxs)(react_2.Box, { children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: 2, mb: 2, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Users, { size: 16, color: colors.accentText }), (0, jsx_runtime_1.jsx)(react_2.Heading, { size: "sm", color: heading, fontWeight: 600, children: labels.activeOrganizations }), sectionBadge(activeOrganizations.length, "blue")] }), (0, jsx_runtime_1.jsx)(react_2.Box, { ...gridSx, children: activeOrganizations.map(renderActiveCard) })] })), invitedOrganizations.length > 0 && ((0, jsx_runtime_1.jsxs)(react_2.Box, { children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: 2, mb: 2, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Mail, { size: 16, color: colors.semanticText.warning }), (0, jsx_runtime_1.jsx)(react_2.Heading, { size: "sm", color: heading, fontWeight: 600, children: labels.invitedOrganizations }), sectionBadge(invitedOrganizations.length, "yellow")] }), (0, jsx_runtime_1.jsx)(react_2.Box, { ...gridSx, children: invitedOrganizations.map(renderInvitedCard) })] }))] })), footerSlot, (0, jsx_runtime_1.jsx)(CreateOrgModal_1.default, { isOpen: isCreateOpen, onClose: () => setCreateOpen(false), isLoading: isCreating, onSubmit: async (values) => {
175
172
  await (onCreateOrganization === null || onCreateOrganization === void 0 ? void 0 : onCreateOrganization(values));
176
173
  setCreateOpen(false);
177
174
  }, labels: labels }), (0, jsx_runtime_1.jsx)(DeleteOrgModal_1.default, { isOpen: deleteOrgId !== null, onClose: () => setDeleteOrgId(null), onConfirm: async () => {
@@ -6,8 +6,8 @@ export type OrganizationItem = {
6
6
  company_url?: string;
7
7
  /** 1 when this org is the user's default org. */
8
8
  default: number;
9
- /** Not read by OrganizationDetails — active vs. invited comes from which array the item is placed in. */
10
- uiInvite: number;
9
+ /** @deprecated Ignored; kept so existing callers still compile. Active vs. invited comes from which array the item is in. */
10
+ uiInvite?: number;
11
11
  /** Distinct from `default` above — only gates delete-protection, not the Default badge/set-default flow. */
12
12
  defaultOrg: number;
13
13
  roleName?: string;
@@ -89,7 +89,9 @@ export interface OrganizationDetailsProps {
89
89
  respondingOrgIds?: number[];
90
90
  /** orgIds currently saving a renamed organization (shows a spinner on that card) */
91
91
  editingOrgIds?: number[];
92
+ /** Greets the signed-in user in the header and names their avatar; no avatar renders without it. */
92
93
  userName?: string;
94
+ /** Avatar photo; initials from `userName` show when it is missing or fails to load. */
93
95
  userAvatarUrl?: string;
94
96
  /** Not awaited internally despite the Promise signature — drive switchingOrgIds yourself. */
95
97
  onSetDefault?: (orgId: number) => void | Promise<void>;
@@ -6,6 +6,7 @@ export type PdfViewerLabels = Partial<{
6
6
  unsupported: string;
7
7
  failed: string;
8
8
  }>;
9
+ /** Inline PDF viewer fed by a URL or an authed blob getter. */
9
10
  export interface PdfViewerProps {
10
11
  /** URL of the PDF, rendered via a native browser <embed>; pass exactly one of `pdfUrl` / `getBlob`. */
11
12
  pdfUrl?: string;
@@ -5,7 +5,7 @@ export interface PlanBadgeProps {
5
5
  input: PlanBadgeInput;
6
6
  /** Truncate the label beyond this width. */
7
7
  maxLabelWidth?: string;
8
- /** Accessible label (falls back to `label — status`). */
8
+ /** Replaces the name read from the visible label and status; it must contain that text, or voice control cannot match it. */
9
9
  ariaLabel?: string;
10
10
  /** Passed straight through to the underlying PlanPill button — same always-interactive caveat applies. */
11
11
  onClick?: React.MouseEventHandler<HTMLButtonElement>;
@@ -8,6 +8,8 @@ const gradientInk_1 = require("../../Theme/tokens/builders/gradientInk");
8
8
  const focusRing_styles_1 = require("../../Theme/chakra/focusRing.styles");
9
9
  const typography_1 = require("../../Theme/tokens/primitives/typography");
10
10
  const planPillGradient_1 = require("./planPillGradient");
11
+ const motion_1 = require("../../Theme/tokens/primitives/motion");
12
+ const BASE_TRANSFORM_BOX_SHADOW_TRANSITION = (0, motion_1.transitionFor)(["transform", "box-shadow"], "base");
11
13
  const TONE_ICON = {
12
14
  normal: lucide_react_1.Sparkles,
13
15
  warning: lucide_react_1.Clock,
@@ -25,7 +27,7 @@ const PlanPill = ({ label, mobileLabel, status, tone = "normal", icon, gradient,
25
27
  const ink = resolved.ink;
26
28
  const Icon = icon === undefined ? TONE_ICON[tone] : icon;
27
29
  const hasMobile = !!mobileLabel && mobileLabel !== label;
28
- return ((0, jsx_runtime_1.jsxs)(react_1.Box, { as: "button", type: "button", "aria-label": ariaLabel || (status ? `${label} — ${status}` : label), onClick: onClick, display: "inline-flex", alignItems: "center", gap: "7px", pl: "12px", pr: status ? "5px" : "12px", py: "3px", bgImage: (0, gradientInk_1.gradientCss)(resolved), color: ink, borderRadius: "full", whiteSpace: "nowrap", cursor: "pointer", transition: "transform 0.2s ease, box-shadow 0.2s ease", _hover: {
30
+ return ((0, jsx_runtime_1.jsxs)(react_1.Box, { as: "button", type: "button", "aria-label": ariaLabel, onClick: onClick, display: "inline-flex", alignItems: "center", gap: "7px", pl: "12px", pr: status ? "5px" : "12px", py: "3px", bgImage: (0, gradientInk_1.gradientCss)(resolved), color: ink, borderRadius: "full", whiteSpace: "nowrap", cursor: "pointer", transition: BASE_TRANSFORM_BOX_SHADOW_TRANSITION, _hover: {
29
31
  transform: "translateY(-1px)",
30
32
  boxShadow: `0 6px 18px ${resolved.from}59`,
31
33
  }, sx: {
@@ -34,6 +36,6 @@ const PlanPill = ({ label, mobileLabel, status, tone = "normal", icon, gradient,
34
36
  transition: "none",
35
37
  _hover: { transform: "none" },
36
38
  },
37
- }, children: [Icon ? (0, jsx_runtime_1.jsx)(Icon, { size: 12, strokeWidth: 2.5, "aria-hidden": true }) : null, (0, jsx_runtime_1.jsx)(react_1.Text, { as: "span", fontSize: "12.5px", fontWeight: "600", lineHeight: "18px", overflow: "hidden", textOverflow: "ellipsis", maxW: maxLabelWidth, display: hasMobile ? { base: "none", md: "block" } : "block", children: label }), hasMobile ? ((0, jsx_runtime_1.jsx)(react_1.Text, { as: "span", fontSize: "12.5px", fontWeight: "600", lineHeight: "18px", display: { base: "block", md: "none" }, children: mobileLabel })) : null, status ? ((0, jsx_runtime_1.jsx)(react_1.Flex, { as: "span", align: "center", px: "8px", borderRadius: "full", bg: (0, planPillGradient_1.chipFill)(resolved), border: "1px solid", borderColor: (0, planPillGradient_1.chipBorder)(resolved), fontSize: "xs-minus", fontWeight: "700", lineHeight: "18px", sx: typography_1.NUMERIC_TEXT, children: status })) : null] }));
39
+ }, children: [Icon ? (0, jsx_runtime_1.jsx)(Icon, { size: 12, strokeWidth: 2.5, "aria-hidden": true }) : null, (0, jsx_runtime_1.jsx)(react_1.Text, { as: "span", fontSize: "xs-plus", fontWeight: "600", lineHeight: "18px", overflow: "hidden", textOverflow: "ellipsis", maxW: maxLabelWidth, display: hasMobile ? { base: "none", md: "block" } : "block", children: label }), hasMobile ? ((0, jsx_runtime_1.jsx)(react_1.Text, { as: "span", fontSize: "xs-plus", fontWeight: "600", lineHeight: "18px", display: { base: "block", md: "none" }, children: mobileLabel })) : null, status ? ((0, jsx_runtime_1.jsx)(react_1.Flex, { as: "span", align: "center", px: "8px", borderRadius: "full", bg: (0, planPillGradient_1.chipFill)(resolved), border: "1px solid", borderColor: (0, planPillGradient_1.chipBorder)(resolved), fontSize: "xs-minus", fontWeight: "700", lineHeight: "18px", sx: typography_1.NUMERIC_TEXT, children: status })) : null] }));
38
40
  };
39
41
  exports.default = PlanPill;
@@ -22,7 +22,7 @@ export interface PlanPillProps {
22
22
  };
23
23
  /** Truncate the label beyond this width. */
24
24
  maxLabelWidth?: string;
25
- /** Accessible label (falls back to `label — status`). */
25
+ /** Replaces the name read from the visible label and status; it must contain that text, or voice control cannot match it. */
26
26
  ariaLabel?: string;
27
27
  /** Renders as a real <button> (hover-lift, pointer cursor, tabbable) even when omitted — there is no static/non-interactive mode. */
28
28
  onClick?: React.MouseEventHandler<HTMLButtonElement>;
@@ -14,6 +14,7 @@ const motion_2 = require("../../Theme/chakra/motion");
14
14
  const focusRing_styles_1 = require("../../Theme/chakra/focusRing.styles");
15
15
  const QuantityStepper_1 = __importDefault(require("../QuantityStepper/QuantityStepper"));
16
16
  const cardMetrics_1 = require("./cardMetrics");
17
+ const tonalHover_1 = require("../CheckoutKit/tonalHover");
17
18
  const morphIn = (0, react_2.keyframes) `
18
19
  0% { opacity: 0; transform: scale(0.85); }
19
20
  100% { opacity: 1; transform: scale(1); }
@@ -37,7 +38,7 @@ const ProductCardAction = ({ kind, title, labels, placement, inset, hoverBar, qu
37
38
  const bar = onMedia && hoverBar && !isNotify;
38
39
  const look = onMedia
39
40
  ? { bg: (0, scrim_1.overlayScrim)(colors), hoverBg: (0, scrim_1.overlayScrim)(colors), color: colors.white }
40
- : { bg: colors.background[100], hoverBg: colors.background[200], color: colors.header[900] };
41
+ : { bg: colors.background[100], hoverBg: (0, tonalHover_1.tonalHover)(colors), color: colors.header[900] };
41
42
  return ((0, jsx_runtime_1.jsxs)(react_1.Box, { as: "button", type: "button", "data-control": true, "data-bar": bar || undefined, "data-action": kind, "aria-label": name, onClick: onPress, ...place, display: "inline-flex", alignItems: "center", justifyContent: "center", gap: 1.5, h: DISC, minW: DISC, px: isNotify ? 3 : 0, borderRadius: "full", bg: look.bg, color: look.color, cursor: "pointer", transition: (0, motion_1.transitionFor)(["background-color", "opacity", "transform"], "base"), _hover: { bg: look.hoverBg }, _active: reduced ? undefined : { transform: "scale(0.9)" }, sx: {
42
43
  outline: "none",
43
44
  ...(onMedia ? { backdropFilter: "blur(8px)", WebkitBackdropFilter: "blur(8px)" } : {}),
@@ -8,6 +8,7 @@ const typography_1 = require("../../Theme/tokens/primitives/typography");
8
8
  const motion_1 = require("../../Theme/tokens/primitives/motion");
9
9
  const motion_2 = require("../../Theme/chakra/motion");
10
10
  const focusRing_styles_1 = require("../../Theme/chakra/focusRing.styles");
11
+ const borderWidths_1 = require("../../Theme/tokens/primitives/borderWidths");
11
12
  const TARGET = "1.5rem";
12
13
  const UNAVAILABLE_OPACITY = 0.45;
13
14
  /** Colour dots for the first swatch axis: hover or focus previews the image, a press keeps it. */
@@ -32,7 +33,7 @@ const ProductCardSwatches = ({ axis, limit, dot, activeId, soldOutIds, labels, o
32
33
  const soldOut = soldOutIds.has(value.id);
33
34
  return ((0, jsx_runtime_1.jsx)(react_2.Box, { as: "button", type: "button", role: "radio", ref: (el) => {
34
35
  cells.current[index] = el;
35
- }, "aria-checked": selected, "aria-label": soldOut ? `${value.label}, ${labels.soldOut.toLowerCase()}` : value.label, tabIndex: index === activeIndex ? 0 : -1, title: value.label, onClick: () => onPick(value.id), onMouseEnter: () => onPreview(value.id), onFocus: () => onPreview(value.id), onBlur: () => onPreview(null), display: "inline-flex", alignItems: "center", justifyContent: "center", boxSize: TARGET, flexShrink: 0, borderRadius: "full", cursor: "pointer", sx: { outline: "none", ...(0, focusRing_styles_1.focusVisibleStyles)(colors) }, children: (0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", display: "inline-flex", p: "2px", borderWidth: "2px", borderStyle: "solid", borderRadius: "full", borderColor: selected ? colors.header[900] : "transparent", transition: (0, motion_1.transitionFor)(["border-color"]), sx: (0, motion_2.reducedMotionSx)(), children: (0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", display: "block", boxSize: `${dot}px`, borderRadius: "full", backgroundColor: value.swatch, opacity: soldOut ? UNAVAILABLE_OPACITY : 1, boxShadow: `inset 0 0 0 1px ${colors.boxborder[200]}` }) }) }, value.id));
36
+ }, "aria-checked": selected, "aria-label": soldOut ? `${value.label}, ${labels.soldOut.toLowerCase()}` : value.label, tabIndex: index === activeIndex ? 0 : -1, title: value.label, onClick: () => onPick(value.id), onMouseEnter: () => onPreview(value.id), onFocus: () => onPreview(value.id), onBlur: () => onPreview(null), display: "inline-flex", alignItems: "center", justifyContent: "center", boxSize: TARGET, flexShrink: 0, borderRadius: "full", cursor: "pointer", sx: { outline: "none", ...(0, focusRing_styles_1.focusVisibleStyles)(colors) }, children: (0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", display: "inline-flex", p: "2px", borderWidth: "2px", borderStyle: "solid", borderRadius: "full", borderColor: selected ? colors.header[900] : "transparent", transition: (0, motion_1.transitionFor)(["border-color"]), sx: (0, motion_2.reducedMotionSx)(), children: (0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", display: "block", boxSize: `${dot}px`, borderRadius: "full", backgroundColor: value.swatch, opacity: soldOut ? UNAVAILABLE_OPACITY : 1, boxShadow: `inset 0 0 0 ${borderWidths_1.BORDER_WIDTHS.hairline} ${colors.boxborder[200]}` }) }) }, value.id));
36
37
  }) }), rest > 0 ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_2.Text, { as: "span", "aria-hidden": true, ml: 1, fontSize: "xs", fontWeight: 500, color: colors.textMuted, sx: typography_1.NUMERIC_TEXT, children: ["+", rest] }), (0, jsx_runtime_1.jsx)(react_2.VisuallyHidden, { children: labels.moreColours(rest) })] })) : null] }));
37
38
  };
38
39
  exports.default = ProductCardSwatches;