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

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 (489) hide show
  1. package/CHANGELOG.md +447 -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 +47 -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/launcherMotion.d.ts +19 -0
  136. package/dist/Components/NavLauncher/launcherMotion.js +15 -0
  137. package/dist/Components/NavLauncher/launcherParts.d.ts +12 -0
  138. package/dist/Components/NavLauncher/launcherParts.js +45 -11
  139. package/dist/Components/NavLauncher/searchLayout.d.ts +1 -0
  140. package/dist/Components/NavLauncher/searchLayout.js +3 -1
  141. package/dist/Components/NavLauncher/spotlightParts.d.ts +6 -2
  142. package/dist/Components/NavLauncher/spotlightParts.js +22 -9
  143. package/dist/Components/NavLauncher/useCopiedFlash.d.ts +6 -0
  144. package/dist/Components/NavLauncher/useCopiedFlash.js +21 -0
  145. package/dist/Components/NavigationBar/NavigationBar.js +6 -5
  146. package/dist/Components/NoteTextArea/NoteTextArea.js +12 -17
  147. package/dist/Components/NoteTextArea/NoteTextAreaProps.d.ts +5 -3
  148. package/dist/Components/Notification/Notification.js +19 -21
  149. package/dist/Components/Notification/NotificationProps.d.ts +1 -1
  150. package/dist/Components/NotificationBell/notificationHelpers.d.ts +16 -1
  151. package/dist/Components/NotificationBell/notificationHelpers.js +13 -7
  152. package/dist/Components/OffersList/OffersList.js +4 -2
  153. package/dist/Components/OptionChip/OptionChip.js +3 -2
  154. package/dist/Components/OptionChip/optionInk.js +4 -2
  155. package/dist/Components/OrderStatusTimeline/OrderStatusTimeline.js +2 -1
  156. package/dist/Components/OrgSwitcher/OrgSwitcher.js +13 -6
  157. package/dist/Components/OrgSwitcher/OrgSwitcherProps.d.ts +1 -1
  158. package/dist/Components/OrganizationDetails/OrganizationDetails.js +4 -7
  159. package/dist/Components/OrganizationDetails/OrganizationDetailsProps.d.ts +4 -2
  160. package/dist/Components/PdfViewer/PdfViewer.d.ts +1 -0
  161. package/dist/Components/PlanBadge/PlanBadgeProps.d.ts +1 -1
  162. package/dist/Components/PlanPill/PlanPill.js +4 -2
  163. package/dist/Components/PlanPill/PlanPillProps.d.ts +1 -1
  164. package/dist/Components/ProductCard/ProductCardAction.js +2 -1
  165. package/dist/Components/ProductCard/ProductCardSwatches.js +2 -1
  166. package/dist/Components/ProductDetails/ProductDetails.js +2 -1
  167. package/dist/Components/ProfileCard/ProfileCard.d.ts +1 -0
  168. package/dist/Components/ProfileCard/ProfileCard.js +12 -26
  169. package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +4 -2
  170. package/dist/Components/ProgressBar/ProgressBar.js +2 -1
  171. package/dist/Components/QuantityStepper/QuantityStepper.js +5 -2
  172. package/dist/Components/QueryState/QueryStateBoundary.d.ts +1 -1
  173. package/dist/Components/QueryState/QueryStateBoundary.js +5 -1
  174. package/dist/Components/QueryState/QueryStateProps.d.ts +6 -2
  175. package/dist/Components/RadioButton/RadioButton.js +2 -3
  176. package/dist/Components/RolesPermission/RolesPermission.js +12 -8
  177. package/dist/Components/ScrollToTop/ScrollToTop.d.ts +1 -0
  178. package/dist/Components/ScrollbarBox/ScrollbarBox.d.ts +4 -1
  179. package/dist/Components/ScrollbarBox/ScrollbarBox.js +10 -4
  180. package/dist/Components/SearchSelect/SearchSelect.d.ts +1 -1
  181. package/dist/Components/SearchSelect/SearchSelect.js +8 -5
  182. package/dist/Components/SearchSelect/SearchSelectProps.d.ts +3 -3
  183. package/dist/Components/SegmentedControl/SegmentedControl.d.ts +1 -1
  184. package/dist/Components/SegmentedControl/SegmentedControl.js +1 -1
  185. package/dist/Components/Select/Select.js +6 -0
  186. package/dist/Components/Select/SelectNative.d.ts +16 -0
  187. package/dist/Components/Select/SelectPopup.js +170 -63
  188. package/dist/Components/Select/SelectProps.d.ts +30 -2
  189. package/dist/Components/Select/groupedWindow.d.ts +21 -0
  190. package/dist/Components/Select/groupedWindow.js +50 -0
  191. package/dist/Components/SelectSearch/SelectSearch.d.ts +1 -1
  192. package/dist/Components/SelectSearch/SelectSearch.js +48 -38
  193. package/dist/Components/SelectSearch/SelectSearchProps.d.ts +3 -3
  194. package/dist/Components/SelectV2/SelectV2.d.ts +1 -1
  195. package/dist/Components/SelectV2/SelectV2.js +1 -1
  196. package/dist/Components/SelectV2/SelectV2Props.d.ts +3 -3
  197. package/dist/Components/SideBar/SecondaryBar.js +3 -2
  198. package/dist/Components/SideBar/components/MenuItemBox.js +3 -2
  199. package/dist/Components/SideBar/components/MenuItems.js +1 -1
  200. package/dist/Components/SideBar/components/OtherApps.js +2 -2
  201. package/dist/Components/SideBar/components/PinnedSection.js +1 -1
  202. package/dist/Components/SideBar/sidebarScale.d.ts +2 -2
  203. package/dist/Components/SideBar/sidebarScale.js +2 -2
  204. package/dist/Components/SignInActivityTable/SignInActivityTable.js +7 -2
  205. package/dist/Components/SignInActivityTable/SignInActivityTableProps.d.ts +1 -1
  206. package/dist/Components/SignInActivityTable/scrollRegionRing.d.ts +10 -0
  207. package/dist/Components/SignInActivityTable/scrollRegionRing.js +14 -0
  208. package/dist/Components/Skeletons/SkeletonProps.d.ts +5 -1
  209. package/dist/Components/Slider/Slider.d.ts +2 -0
  210. package/dist/Components/Slider/Slider.js +5 -4
  211. package/dist/Components/StageProgress/StageItem.js +2 -1
  212. package/dist/Components/StageProgress/StageProgress.js +8 -2
  213. package/dist/Components/StageProgress/StageProgressProps.d.ts +2 -0
  214. package/dist/Components/StageProgress/StepperStage.js +2 -1
  215. package/dist/Components/StickyBuyBar/StickyBuyBar.js +2 -1
  216. package/dist/Components/Table/Table.js +5 -3
  217. package/dist/Components/Table/TableProps.d.ts +1 -1
  218. package/dist/Components/Table/components/HeaderActions.js +5 -3
  219. package/dist/Components/Table/components/TableBody.js +22 -8
  220. package/dist/Components/Table/components/TableGroupRow.js +2 -1
  221. package/dist/Components/Table/components/TableHeader.js +14 -20
  222. package/dist/Components/Table/components/rowDetail.js +3 -2
  223. package/dist/Components/Table/components/rowFocusRing.d.ts +21 -0
  224. package/dist/Components/Table/components/rowFocusRing.js +20 -0
  225. package/dist/Components/Table/filters/ActiveFilters.js +6 -3
  226. package/dist/Components/Table/filters/CompactSelect.js +2 -1
  227. package/dist/Components/Table/filters/FilterDatePicker.d.ts +6 -0
  228. package/dist/Components/Table/filters/FilterDatePicker.js +61 -0
  229. package/dist/Components/Table/filters/LeftFilterPane.d.ts +1 -0
  230. package/dist/Components/Table/filters/LeftFilterPane.js +14 -6
  231. package/dist/Components/Table/hooks/useTable.js +11 -7
  232. package/dist/Components/Table/settings/ManageColumns.js +4 -3
  233. package/dist/Components/Table/settings/TableSettings.js +4 -4
  234. package/dist/Components/Tabs/Tabs.d.ts +1 -0
  235. package/dist/Components/Tabs/Tabs.js +1 -0
  236. package/dist/Components/Tabs/components/CountBadge.d.ts +1 -0
  237. package/dist/Components/Tabs/components/TabList.d.ts +1 -0
  238. package/dist/Components/Tabs/components/TabList.js +1 -0
  239. package/dist/Components/Tabs/components/TabPanel.d.ts +1 -0
  240. package/dist/Components/Tabs/components/TabPanel.js +1 -0
  241. package/dist/Components/Tabs/tabStyles.js +4 -2
  242. package/dist/Components/Tag/Tag.js +5 -4
  243. package/dist/Components/Tag/Tag.styles.js +5 -4
  244. package/dist/Components/Tag/TagProps.d.ts +4 -1
  245. package/dist/Components/Tag/tagDot.js +10 -3
  246. package/dist/Components/TagInput/TagInput.js +6 -5
  247. package/dist/Components/TagInput/TagInputProps.d.ts +15 -0
  248. package/dist/Components/TagInput/tagEntries.d.ts +7 -1
  249. package/dist/Components/TagInput/tagEntries.js +18 -5
  250. package/dist/Components/TimePicker/TimePicker.js +7 -3
  251. package/dist/Components/TimePicker/TimePickerProps.d.ts +2 -0
  252. package/dist/Components/Timeline/Timeline.js +13 -9
  253. package/dist/Components/Toaster/Toaster.js +2 -1
  254. package/dist/Components/Toggle/TableToggle.d.ts +1 -1
  255. package/dist/Components/Toggle/TableToggle.js +1 -1
  256. package/dist/Components/UpgradeButton/UpgradeButton.js +3 -2
  257. package/dist/Components/UpgradeButton/UpgradeButtonProps.d.ts +1 -1
  258. package/dist/Components/UserDetails/UserDetails.js +5 -7
  259. package/dist/Components/WishlistToggle/WishlistToggle.js +2 -1
  260. package/dist/Components/WorkspaceWindow/WorkspaceTrayPreview.js +11 -1
  261. package/dist/Components/WorkspaceWindow/WorkspaceWindow.js +3 -1
  262. package/dist/Components/WorkspaceWindow/WorkspaceWindowProps.d.ts +14 -7
  263. package/dist/Hooks/useOutsideMouseDown.d.ts +11 -0
  264. package/dist/Hooks/useOutsideMouseDown.js +30 -0
  265. package/dist/Hooks/usePreferences.js +30 -12
  266. package/dist/Hooks/useScrollableRegion.d.ts +17 -0
  267. package/dist/Hooks/useScrollableRegion.js +36 -0
  268. package/dist/Hooks/useSidebarPrefs.d.ts +1 -0
  269. package/dist/Theme/chakra/Menu.styles.d.ts +4 -0
  270. package/dist/Theme/chakra/Menu.styles.js +6 -0
  271. package/dist/Theme/chakra/componentStyles.d.ts +4 -0
  272. package/dist/Theme/chakra/componentStyles.js +1 -1
  273. package/dist/Theme/chakra/createBrandTheme.d.ts +1 -0
  274. package/dist/Theme/chakra/focusRing.styles.d.ts +1 -1
  275. package/dist/Theme/chakra/focusRing.styles.js +3 -3
  276. package/dist/Theme/chakra/paletteFromTheme.d.ts +2 -1
  277. package/dist/Theme/chakra/paletteFromTheme.js +18 -4
  278. package/dist/Theme/provider/PixelizeThemeProvider.d.ts +1 -0
  279. package/dist/Theme/provider/ThemeSwitcher.d.ts +1 -0
  280. package/dist/Theme/provider/ThemeSwitcher.js +1 -1
  281. package/dist/Theme/testing/testPalette.d.ts +1 -0
  282. package/dist/Theme/tokens/builders/buildDarkPalette.d.ts +1 -0
  283. package/dist/Theme/tokens/builders/filledSurface.js +3 -2
  284. package/dist/Theme/tokens/builders/focusRing.js +4 -1
  285. package/dist/Theme/tokens/builders/paletteScale.d.ts +2 -0
  286. package/dist/Theme/tokens/builders/paletteScale.js +10 -0
  287. package/dist/Theme/tokens/types.d.ts +1 -0
  288. package/dist/Utils/accountHandoff.d.ts +3 -0
  289. package/dist/Utils/price.d.ts +1 -0
  290. package/dist/Utils/tabular.d.ts +30 -0
  291. package/dist/Utils/tabular.js +61 -0
  292. package/dist/esm/Components/Accordion/Accordion.js +11 -8
  293. package/dist/esm/Components/Accordion/accordionColors.js +2 -3
  294. package/dist/esm/Components/Apexcharts/ApexLineChart/ApexLineChart.js +2 -1
  295. package/dist/esm/Components/Apexcharts/ApexPieChart/ApexPieChart.js +6 -5
  296. package/dist/esm/Components/Apexcharts/ApexPieChart/pieImageTexture.js +10 -0
  297. package/dist/esm/Components/AppSwitcher/AppSwitcher.js +6 -3
  298. package/dist/esm/Components/AppSwitcher/AppSwitcherProps.js +18 -11
  299. package/dist/esm/Components/AppSwitcher/pixelizeSuite.js +67 -0
  300. package/dist/esm/Components/AppearanceSettings/AppearanceSettings.js +3 -3
  301. package/dist/esm/Components/Avatar/avatarColorway.js +4 -4
  302. package/dist/esm/Components/Button/Button.styles.js +5 -2
  303. package/dist/esm/Components/ButtonGroupIcon/ButtonGroupIcon.js +3 -1
  304. package/dist/esm/Components/CalendarGrid/CalendarGrid.js +5 -3
  305. package/dist/esm/Components/Card/Card.js +1 -0
  306. package/dist/esm/Components/Checkbox/Checkbox.styles.js +3 -1
  307. package/dist/esm/Components/CheckoutKit/selectable.js +10 -7
  308. package/dist/esm/Components/CheckoutKit/tonalHover.js +2 -0
  309. package/dist/esm/Components/ChoiceCard/ChoiceCard.js +2 -1
  310. package/dist/esm/Components/Common/FormLabel.js +4 -3
  311. package/dist/esm/Components/Common/HelperText.js +1 -2
  312. package/dist/esm/Components/Common/activationKey.js +7 -0
  313. package/dist/esm/Components/Common/fieldMessageStyles.js +2 -1
  314. package/dist/esm/Components/Common/findSlot.js +17 -0
  315. package/dist/esm/Components/Common/surfaceFocusRing.js +3 -0
  316. package/dist/esm/Components/ConfirmDialog/ConfirmDialog.js +18 -6
  317. package/dist/esm/Components/CopyButton/CopyButton.js +3 -6
  318. package/dist/esm/Components/CouponField/CouponField.js +5 -2
  319. package/dist/esm/Components/CustomModulesTable/CustomModulesTable.js +3 -1
  320. package/dist/esm/Components/DatePicker/CalendarPanel.js +3 -1
  321. package/dist/esm/Components/DatePicker/DatePicker.js +25 -27
  322. package/dist/esm/Components/DatePicker/PickerPortal.js +2 -2
  323. package/dist/esm/Components/DatePicker/RangeDatePicker.js +10 -29
  324. package/dist/esm/Components/DatePicker/SingleDatePicker.js +5 -21
  325. package/dist/esm/Components/DatePicker/TimeOnlyPicker.js +2 -20
  326. package/dist/esm/Components/DescriptionList/DescriptionList.js +1 -1
  327. package/dist/esm/Components/DetailSections/DetailSections.js +2 -1
  328. package/dist/esm/Components/Divider/Divider.js +3 -3
  329. package/dist/esm/Components/Drawer/Drawer.js +19 -18
  330. package/dist/esm/Components/Dropdown/DropDown.js +7 -22
  331. package/dist/esm/Components/Editor/Editor.js +7 -3
  332. package/dist/esm/Components/Editor/editorLabels.js +1 -0
  333. package/dist/esm/Components/Editor/editorTokenStyles.js +7 -0
  334. package/dist/esm/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +8 -4
  335. package/dist/esm/Components/EmptyState/FilteredEmptyState.js +18 -0
  336. package/dist/esm/Components/FilePreview/FilePreview.js +8 -4
  337. package/dist/esm/Components/FileUpload/FileUpload.js +8 -9
  338. package/dist/esm/Components/FileUploader/FileUploader.js +6 -7
  339. package/dist/esm/Components/FilterSidebar/FilterSidebar.js +94 -237
  340. package/dist/esm/Components/FilterSidebar/OptionsSection.js +41 -0
  341. package/dist/esm/Components/FilterSidebar/RangeSection.js +78 -0
  342. package/dist/esm/Components/FilterSidebar/SectionHeader.js +23 -0
  343. package/dist/esm/Components/FilterSidebar/useStableCallback.js +8 -0
  344. package/dist/esm/Components/Form/FormWrapper.js +5 -3
  345. package/dist/esm/Components/FormField/FormField.js +1 -1
  346. package/dist/esm/Components/Header/Header.js +1 -1
  347. package/dist/esm/Components/Header/HeaderActions.js +6 -4
  348. package/dist/esm/Components/Input/TextInput.js +2 -2
  349. package/dist/esm/Components/KanbanBoard/AccountCard.js +1 -1
  350. package/dist/esm/Components/KanbanBoard/KanbanActions/KanbanActions.js +2 -2
  351. package/dist/esm/Components/KanbanBoard/KanbanBoard.js +11 -7
  352. package/dist/esm/Components/LauncherTrigger/LauncherTrigger.js +1 -1
  353. package/dist/esm/Components/LazyWrapper/LazyWrapper.js +1 -1
  354. package/dist/esm/Components/MediaViewer/MediaViewer.js +5 -4
  355. package/dist/esm/Components/MediaViewer/components/MediaAudioPlayer.js +5 -1
  356. package/dist/esm/Components/MediaViewer/components/MediaImageViewer.js +19 -8
  357. package/dist/esm/Components/MediaViewer/components/MediaScrubber.js +7 -2
  358. package/dist/esm/Components/MediaViewer/components/MediaVideoPlayer.js +3 -1
  359. package/dist/esm/Components/MediaViewer/components/ViewerIconButton.js +3 -1
  360. package/dist/esm/Components/MediaViewer/mediaItems.js +4 -0
  361. package/dist/esm/Components/Modal/Modal.js +2 -17
  362. package/dist/esm/Components/Modal/warnDroppedSlotChildren.js +7 -3
  363. package/dist/esm/Components/NavLauncher/LauncherTabs.js +2 -1
  364. package/dist/esm/Components/NavLauncher/NavLauncher.js +51 -26
  365. package/dist/esm/Components/NavLauncher/ScopeBar.js +4 -2
  366. package/dist/esm/Components/NavLauncher/engine/engine.js +2 -1
  367. package/dist/esm/Components/NavLauncher/engine/fold.js +2 -1
  368. package/dist/esm/Components/NavLauncher/launcherMotion.js +11 -0
  369. package/dist/esm/Components/NavLauncher/launcherParts.js +40 -8
  370. package/dist/esm/Components/NavLauncher/searchLayout.js +1 -0
  371. package/dist/esm/Components/NavLauncher/spotlightParts.js +23 -10
  372. package/dist/esm/Components/NavLauncher/useCopiedFlash.js +17 -0
  373. package/dist/esm/Components/NavigationBar/NavigationBar.js +6 -5
  374. package/dist/esm/Components/NoteTextArea/NoteTextArea.js +12 -17
  375. package/dist/esm/Components/Notification/Notification.js +20 -22
  376. package/dist/esm/Components/NotificationBell/notificationHelpers.js +12 -6
  377. package/dist/esm/Components/OffersList/OffersList.js +4 -2
  378. package/dist/esm/Components/OptionChip/OptionChip.js +3 -2
  379. package/dist/esm/Components/OptionChip/optionInk.js +4 -2
  380. package/dist/esm/Components/OrderStatusTimeline/OrderStatusTimeline.js +2 -1
  381. package/dist/esm/Components/OrgSwitcher/OrgSwitcher.js +14 -7
  382. package/dist/esm/Components/OrganizationDetails/OrganizationDetails.js +5 -8
  383. package/dist/esm/Components/PlanPill/PlanPill.js +4 -2
  384. package/dist/esm/Components/ProductCard/ProductCardAction.js +2 -1
  385. package/dist/esm/Components/ProductCard/ProductCardSwatches.js +2 -1
  386. package/dist/esm/Components/ProductDetails/ProductDetails.js +2 -1
  387. package/dist/esm/Components/ProfileCard/ProfileCard.js +6 -17
  388. package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +4 -2
  389. package/dist/esm/Components/ProgressBar/ProgressBar.js +2 -1
  390. package/dist/esm/Components/QuantityStepper/QuantityStepper.js +5 -2
  391. package/dist/esm/Components/QueryState/QueryStateBoundary.js +5 -1
  392. package/dist/esm/Components/RadioButton/RadioButton.js +2 -3
  393. package/dist/esm/Components/RolesPermission/RolesPermission.js +12 -8
  394. package/dist/esm/Components/ScrollbarBox/ScrollbarBox.js +9 -3
  395. package/dist/esm/Components/SearchSelect/SearchSelect.js +8 -5
  396. package/dist/esm/Components/SegmentedControl/SegmentedControl.js +1 -1
  397. package/dist/esm/Components/Select/Select.js +6 -0
  398. package/dist/esm/Components/Select/SelectPopup.js +171 -64
  399. package/dist/esm/Components/Select/groupedWindow.js +44 -0
  400. package/dist/esm/Components/SelectSearch/SelectSearch.js +49 -39
  401. package/dist/esm/Components/SelectV2/SelectV2.js +1 -1
  402. package/dist/esm/Components/SideBar/SecondaryBar.js +3 -2
  403. package/dist/esm/Components/SideBar/components/MenuItemBox.js +3 -2
  404. package/dist/esm/Components/SideBar/components/MenuItems.js +1 -1
  405. package/dist/esm/Components/SideBar/components/OtherApps.js +2 -2
  406. package/dist/esm/Components/SideBar/components/PinnedSection.js +1 -1
  407. package/dist/esm/Components/SideBar/sidebarScale.js +2 -2
  408. package/dist/esm/Components/SignInActivityTable/SignInActivityTable.js +8 -3
  409. package/dist/esm/Components/SignInActivityTable/scrollRegionRing.js +9 -0
  410. package/dist/esm/Components/Slider/Slider.js +6 -5
  411. package/dist/esm/Components/StageProgress/StageItem.js +2 -1
  412. package/dist/esm/Components/StageProgress/StageProgress.js +8 -2
  413. package/dist/esm/Components/StageProgress/StepperStage.js +2 -1
  414. package/dist/esm/Components/StickyBuyBar/StickyBuyBar.js +2 -1
  415. package/dist/esm/Components/Table/Table.js +8 -6
  416. package/dist/esm/Components/Table/components/HeaderActions.js +7 -5
  417. package/dist/esm/Components/Table/components/TableBody.js +22 -8
  418. package/dist/esm/Components/Table/components/TableGroupRow.js +2 -1
  419. package/dist/esm/Components/Table/components/TableHeader.js +15 -21
  420. package/dist/esm/Components/Table/components/rowDetail.js +3 -2
  421. package/dist/esm/Components/Table/components/rowFocusRing.js +16 -0
  422. package/dist/esm/Components/Table/filters/ActiveFilters.js +8 -5
  423. package/dist/esm/Components/Table/filters/CompactSelect.js +2 -1
  424. package/dist/esm/Components/Table/filters/FilterDatePicker.js +20 -0
  425. package/dist/esm/Components/Table/filters/LeftFilterPane.js +14 -6
  426. package/dist/esm/Components/Table/hooks/useTable.js +11 -7
  427. package/dist/esm/Components/Table/settings/ManageColumns.js +4 -3
  428. package/dist/esm/Components/Table/settings/TableSettings.js +4 -4
  429. package/dist/esm/Components/Tabs/Tabs.js +1 -0
  430. package/dist/esm/Components/Tabs/components/TabList.js +1 -0
  431. package/dist/esm/Components/Tabs/components/TabPanel.js +1 -0
  432. package/dist/esm/Components/Tabs/tabStyles.js +5 -3
  433. package/dist/esm/Components/Tag/Tag.js +5 -4
  434. package/dist/esm/Components/Tag/Tag.styles.js +5 -4
  435. package/dist/esm/Components/Tag/tagDot.js +10 -3
  436. package/dist/esm/Components/TagInput/TagInput.js +8 -7
  437. package/dist/esm/Components/TagInput/tagEntries.js +16 -4
  438. package/dist/esm/Components/TimePicker/TimePicker.js +7 -3
  439. package/dist/esm/Components/Timeline/Timeline.js +14 -10
  440. package/dist/esm/Components/Toaster/Toaster.js +2 -1
  441. package/dist/esm/Components/Toggle/TableToggle.js +1 -1
  442. package/dist/esm/Components/UpgradeButton/UpgradeButton.js +3 -2
  443. package/dist/esm/Components/UserDetails/UserDetails.js +5 -7
  444. package/dist/esm/Components/WishlistToggle/WishlistToggle.js +2 -1
  445. package/dist/esm/Components/WorkspaceWindow/WorkspaceTrayPreview.js +12 -2
  446. package/dist/esm/Components/WorkspaceWindow/WorkspaceWindow.js +3 -1
  447. package/dist/esm/Hooks/useOutsideMouseDown.js +26 -0
  448. package/dist/esm/Hooks/usePreferences.js +30 -12
  449. package/dist/esm/Hooks/useScrollableRegion.js +33 -0
  450. package/dist/esm/Theme/chakra/Menu.styles.js +6 -0
  451. package/dist/esm/Theme/chakra/componentStyles.js +1 -1
  452. package/dist/esm/Theme/chakra/focusRing.styles.js +3 -3
  453. package/dist/esm/Theme/chakra/paletteFromTheme.js +16 -3
  454. package/dist/esm/Theme/provider/ThemeSwitcher.js +1 -1
  455. package/dist/esm/Theme/tokens/builders/filledSurface.js +3 -2
  456. package/dist/esm/Theme/tokens/builders/focusRing.js +4 -1
  457. package/dist/esm/Theme/tokens/builders/paletteScale.js +6 -0
  458. package/dist/esm/Utils/tabular.js +56 -0
  459. package/dist/esm/index.js +16 -24
  460. package/dist/index.d.ts +54 -2
  461. package/dist/index.js +33 -29
  462. package/package.json +3 -1
  463. package/dist/Components/Buttons/Buttons.d.ts +0 -3
  464. package/dist/Components/Buttons/Buttons.js +0 -9
  465. package/dist/Components/Buttons/ButtonsProps.d.ts +0 -12
  466. package/dist/Components/Common/ErrorComponent.d.ts +0 -7
  467. package/dist/Components/Common/ErrorComponent.js +0 -16
  468. package/dist/Components/Common/FormattedDescription.d.ts +0 -7
  469. package/dist/Components/Common/FormattedDescription.js +0 -62
  470. package/dist/Components/Common/Label.d.ts +0 -9
  471. package/dist/Components/Common/Label.js +0 -12
  472. package/dist/Components/Input/Input/Input.d.ts +0 -4
  473. package/dist/Components/Input/Input/Input.js +0 -75
  474. package/dist/Components/Input/Input/InputProps.d.ts +0 -24
  475. package/dist/Components/Input/Input/InputProps.js +0 -2
  476. package/dist/Components/ProductCard/productCardFixtures.d.ts +0 -7
  477. package/dist/Components/ProductCard/productCardFixtures.js +0 -61
  478. package/dist/esm/Components/Buttons/Buttons.js +0 -4
  479. package/dist/esm/Components/Common/ErrorComponent.js +0 -14
  480. package/dist/esm/Components/Common/FormattedDescription.js +0 -60
  481. package/dist/esm/Components/Common/Label.js +0 -10
  482. package/dist/esm/Components/Input/Input/Input.js +0 -37
  483. package/dist/esm/Components/Input/Input/InputProps.js +0 -1
  484. package/dist/esm/Components/ProductCard/productCardFixtures.js +0 -58
  485. package/dist/esm/services/feedback.js +0 -15
  486. package/dist/services/feedback.d.ts +0 -12
  487. package/dist/services/feedback.js +0 -18
  488. /package/dist/Components/{Buttons/ButtonsProps.js → Common/dataAttributes.js} +0 -0
  489. /package/dist/esm/Components/{Buttons/ButtonsProps.js → Common/dataAttributes.js} +0 -0
@@ -14,6 +14,9 @@ import PersonChip from "../PersonChip/PersonChip.js";
14
14
  import AddUserModal from "./AddUserModal.js";
15
15
  import ChangeRoleModal from "./ChangeRoleModal.js";
16
16
  import DeactivateConfirmModal from "./DeactivateConfirmModal.js";
17
+ import { transitionFor } from "../../Theme/tokens/primitives/motion.js";
18
+ import { onActivationKey } from "../Common/activationKey.js";
19
+ const BACKGROUND_TRANSITION = transitionFor(["background"]);
17
20
  const DEFAULT_LABELS = {
18
21
  teamMembers: "Team Members",
19
22
  refreshList: "Refresh list",
@@ -79,12 +82,7 @@ const UserDetails = ({ users, selectedUser, selectedUserId, roleOptions = [], ca
79
82
  background: isSelected
80
83
  ? rowBackgrounds.selectedActive
81
84
  : rowBackgrounds.active,
82
- }, transition: "background 0.15s ease", borderRadius: "lg", position: "relative", role: "button", tabIndex: 0, "aria-current": isSelected ? true : undefined, _focusVisible: focusVisibleRing(colors), onClick: () => onSelectUser === null || onSelectUser === void 0 ? void 0 : onSelectUser(user), onKeyDown: (e) => {
83
- if (e.key !== "Enter" && e.key !== " ")
84
- return;
85
- e.preventDefault();
86
- onSelectUser === null || onSelectUser === void 0 ? void 0 : onSelectUser(user);
87
- }, children: [isSelected && (_jsx(Box, { position: "absolute", left: 0, top: "20%", bottom: "20%", width: "3px", borderRadius: "full", bg: colors.primary[500] })), _jsx(PersonChip, { size: "sm", name: `${user.firstName} ${user.lastName}`, imageUrl: user.profile, secondary: user.email }), renderStatusBadge(user.isActive)] }, user.id));
85
+ }, transition: BACKGROUND_TRANSITION, borderRadius: "lg", position: "relative", role: "button", tabIndex: 0, "aria-current": isSelected ? true : undefined, _focusVisible: focusVisibleRing(colors), onClick: () => onSelectUser === null || onSelectUser === void 0 ? void 0 : onSelectUser(user), onKeyDown: onActivationKey(() => onSelectUser === null || onSelectUser === void 0 ? void 0 : onSelectUser(user)), children: [isSelected && (_jsx(Box, { position: "absolute", left: 0, top: "20%", bottom: "20%", width: "3px", borderRadius: "full", bg: colors.primary[500] })), _jsx(PersonChip, { size: "sm", name: `${user.firstName} ${user.lastName}`, imageUrl: user.profile, secondary: user.email }), renderStatusBadge(user.isActive)] }, user.id));
88
86
  }) })) })] }), _jsxs(Box, { flex: 1, backgroundColor: surface, borderRadius: "xl", boxShadow: "sm", border: "1px solid", borderColor: border, display: "flex", flexDirection: "column", order: { base: 1, lg: 2 }, overflow: "hidden", children: [_jsxs(Flex, { justifyContent: "space-between", alignItems: "center", px: 4, py: 3, borderBottom: "1px solid", borderColor: border, children: [_jsx(Heading, { size: "sm", fontWeight: 600, color: heading, children: selectedUser ? labels.userDetails : labels.selectTeamMember }), canManageUsers && (_jsx(Button, { size: "sm", colorScheme: "primary", fontSize: "xs", leftIcon: _jsx(UserPlus, { size: 15 }), onClick: onAddUserOpen, children: labels.addUser }))] }), _jsx(Box, { flex: 1, overflowY: "auto", tabIndex: 0, role: "region", "aria-label": selectedUser ? labels.userDetails : labels.selectTeamMember, children: isUsersLoading ? (_jsxs(VStack, { spacing: 4, p: 4, align: "stretch", children: [_jsxs(Flex, { align: "center", gap: 4, children: [_jsx(SkeletonCircle, { size: "16" }), _jsxs(Box, { flex: 1, children: [_jsx(Skeleton, { height: "18px", width: "50%", mb: 2 }), _jsx(Skeleton, { height: "12px", width: "35%" })] })] }), Array.from({ length: 4 }).map((_, idx) => (_jsxs(Box, { w: "100%", children: [_jsx(Skeleton, { height: "12px", width: "30%", mb: 2 }), _jsx(Skeleton, { height: "10px", width: "80%" })] }, idx)))] })) : selectedUser ? (_jsxs(_Fragment, { children: [_jsxs(Flex, { direction: { base: "column", md: "row" }, alignItems: { base: "flex-start", md: "center" }, justifyContent: "space-between", gap: 4, p: 4, borderBottom: "1px solid", borderColor: border, children: [_jsxs(Flex, { alignItems: "center", gap: 4, children: [_jsxs(Box, { position: "relative", children: [_jsx(Avatar, { size: "lg", name: selectedUser.name, src: selectedUser.profilePhoto }), selectedUser.isCurrent && (_jsx(Badge, { position: "absolute", bottom: -1, right: -1, colorScheme: "blue", variant: "solid", fontSize: "xs", borderRadius: "full", px: 2, py: 0.5, boxShadow: "sm", textTransform: "none", children: labels.you }))] }), _jsxs(Box, { children: [_jsx(Heading, { size: "md", mb: 1, color: heading, children: selectedUser.name }), _jsx(Text, { fontSize: "sm", color: muted, mb: 2, children: selectedUser.role }), _jsxs(HStack, { spacing: 2, children: [renderStatusBadge(selectedUser.isActive), selectedUser.isPending && (_jsx(Badge, { variant: "subtle", borderRadius: "full", px: 2, py: 0.5, fontSize: "xs", fontWeight: 600, colorScheme: "orange", textTransform: "none", children: labels.pendingInvitation }))] })] })] }), canManageUsers &&
89
87
  !selectedUser.isSuperAdmin && (_jsxs(HStack, { spacing: 2, flexWrap: "wrap", children: [!selectedUser.isCurrent && !selectedUser.isActive && (_jsx(Button, { size: "xs", variant: "outline", colorScheme: "blue", fontSize: "xs", leftIcon: _jsx(Send, { size: 13 }), isLoading: isInviteLoading, onClick: () => selectedUser.userId != null &&
90
88
  (onReinvite === null || onReinvite === void 0 ? void 0 : onReinvite(selectedUser.userId)), children: labels.resendInvitation })), _jsx(Button, { size: "xs", variant: "outline", colorScheme: "gray", fontSize: "xs", leftIcon: _jsx(Shield, { size: 13 }), onClick: () => {
@@ -102,7 +100,7 @@ const UserDetails = ({ users, selectedUser, selectedUserId, roleOptions = [], ca
102
100
  const Icon = (_a = detail.icon) !== null && _a !== void 0 ? _a : UserRound;
103
101
  return (_jsxs(React.Fragment, { children: [_jsxs(Flex, { gap: 3, px: 3, py: 2.5, _hover: {
104
102
  bg: resolveHoverTint(colors.gray[50], surface),
105
- }, alignItems: "center", transition: "background 0.15s ease", children: [_jsx(Flex, { align: "center", justify: "center", boxSize: "30px", bg: detailTile, borderRadius: "lg", color: accentTextOnCanvas(colors.primary, detailTile), flexShrink: 0, children: _jsx(Icon, { size: 15 }) }), _jsx(Box, { minWidth: "110px", children: _jsx(Text, { fontSize: "xs", fontWeight: 600, color: muted, children: detail.label }) }), _jsx(Box, { flex: 1, children: _jsx(Text, { fontSize: "sm", color: heading, fontWeight: 500, children: detail.value }) })] }), index < selectedUser.details.length - 1 && (_jsx(Divider, { borderColor: border }))] }, index));
103
+ }, alignItems: "center", transition: BACKGROUND_TRANSITION, children: [_jsx(Flex, { align: "center", justify: "center", boxSize: "30px", bg: detailTile, borderRadius: "lg", color: accentTextOnCanvas(colors.primary, detailTile), flexShrink: 0, children: _jsx(Icon, { size: 15 }) }), _jsx(Box, { minWidth: "110px", children: _jsx(Text, { fontSize: "xs", fontWeight: 600, color: muted, children: detail.label }) }), _jsx(Box, { flex: 1, children: _jsx(Text, { fontSize: "sm", color: heading, fontWeight: 500, children: detail.value }) })] }), index < selectedUser.details.length - 1 && (_jsx(Divider, { borderColor: border }))] }, index));
106
104
  }) })] })] })) : (_jsx(EmptyState, { icon: UserRound, title: labels.selectTeamMember, description: labels.noUserSelected, minH: "300px" })) })] }), _jsx(AddUserModal, { isOpen: isAddUserOpen, onClose: onAddUserClose, roleOptions: roleOptions, isLoading: isAddUserLoading, onSubmit: async (values) => {
107
105
  await (onAddUserSubmit === null || onAddUserSubmit === void 0 ? void 0 : onAddUserSubmit(values));
108
106
  onAddUserClose();
@@ -10,6 +10,7 @@ import { reducedMotionSx, usePrefersReducedMotion } from "../../Theme/chakra/mot
10
10
  import { focusVisibleRing } from "../../Theme/chakra/focusRing.styles.js";
11
11
  import { resolveFilledSurface } from "../../Theme/tokens/builders/filledSurface.js";
12
12
  import { overlayScrim } from "../../Theme/tokens/builders/scrim.js";
13
+ import { tonalHover } from "../CheckoutKit/tonalHover.js";
13
14
  const HIT_PX = { sm: 32, md: 44, lg: 48 };
14
15
  const POP_MS = 320;
15
16
  const pop = keyframes `
@@ -46,7 +47,7 @@ const WishlistToggle = ({ selected, defaultSelected = false, onSelectedChange, s
46
47
  const ink = on ? colors.semanticText.error : variant === "soft" ? colors.header[900] : colors.textMuted;
47
48
  return {
48
49
  bg: variant === "soft" ? colors.background[100] : colors.transparent,
49
- hoverBg: variant === "soft" ? colors.background[200] : colors.background[100],
50
+ hoverBg: variant === "soft" ? tonalHover(colors) : tonalHover(colors, colors.background[50], colors.background[100]),
50
51
  color: ink,
51
52
  };
52
53
  })();
@@ -1,8 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useCallback, useEffect, useRef, useState } from "react";
2
+ import { useCallback, useEffect, useId, useRef, useState } from "react";
3
3
  import { Box } from "@chakra-ui/react";
4
4
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
5
5
  import zIndices from "../../Theme/tokens/primitives/zIndices.js";
6
+ import { raisedRule } from "../../Theme/tokens/builders/surfaceRaised.js";
6
7
  const PLACEMENT_STYLE = {
7
8
  "top-end": { bottom: "100%", right: 0, marginBottom: "6px" },
8
9
  "top-start": { bottom: "100%", left: 0, marginBottom: "6px" },
@@ -12,6 +13,7 @@ const PLACEMENT_STYLE = {
12
13
  // Presentational, app-agnostic hover-preview (intent-safe: open delay, close grace, Escape dismisses).
13
14
  export default function WorkspaceTrayPreview({ children, preview, enabled = true, openDelayMs = 350, closeDelayMs = 200, placement = "top-end", onOpenChange, width = "340px", testId = "workspace-tray-preview", }) {
14
15
  const theme = useCustomTheme();
16
+ const cardId = useId();
15
17
  const [open, setOpen] = useState(false);
16
18
  const openTimer = useRef(null);
17
19
  const closeTimer = useRef(null);
@@ -69,7 +71,15 @@ export default function WorkspaceTrayPreview({ children, preview, enabled = true
69
71
  e.stopPropagation();
70
72
  closeNow();
71
73
  }
72
- }, children: [children, open && (_jsx(Box, { position: "absolute", ...PLACEMENT_STYLE[placement], w: typeof width === "number" ? `${width}px` : width, maxW: "min(360px, calc(100vw - 2rem))", bg: theme.colors.surfaceRaised, borderWidth: "1px", borderColor: theme.colors.boxborder[200], borderRadius: "lg", boxShadow: "xl", zIndex: zIndices.popover, pointerEvents: "auto", p: 3, textAlign: "left", color: theme.colors.text[700], cursor: "default", onMouseEnter: clearCloseTimer, onMouseLeave: scheduleClose, "data-testid": testId, children: typeof preview === "function"
74
+ }, children: [typeof children === "function"
75
+ ? children({
76
+ triggerProps: {
77
+ "aria-expanded": open,
78
+ "aria-controls": open ? cardId : undefined,
79
+ "aria-describedby": open ? cardId : undefined,
80
+ },
81
+ })
82
+ : children, open && (_jsx(Box, { id: cardId, position: "absolute", ...PLACEMENT_STYLE[placement], w: typeof width === "number" ? `${width}px` : width, maxW: "min(360px, calc(100vw - 2rem))", bg: theme.colors.surfaceRaised, borderWidth: "1px", borderColor: raisedRule(theme.colors), borderRadius: "lg", boxShadow: "xl", zIndex: zIndices.popover, pointerEvents: "auto", p: 3, textAlign: "left", color: theme.colors.text[700], cursor: "default", "data-testid": testId, children: typeof preview === "function"
73
83
  ? preview({ close: closeNow })
74
84
  : preview }))] }));
75
85
  }
@@ -5,6 +5,8 @@ import { ExternalLink, Minus, X } from "lucide-react";
5
5
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
6
6
  import zIndices from "../../Theme/tokens/primitives/zIndices.js";
7
7
  import { accentTextOnCanvas } from "../../Theme/tokens/builders/accentText.js";
8
+ import { bandOn } from "../../Theme/tokens/builders/planeStep.js";
9
+ import { raisedRule } from "../../Theme/tokens/builders/surfaceRaised.js";
8
10
  // NOTE: no maximize/restore toggle (removed by product decision); onMedium/onMaximize stay as deprecated no-ops.
9
11
  const WINDOW_SIZE = { maxW: "88rem", h: "92vh" };
10
12
  const WindowTitle = ({ testId, color, children }) => {
@@ -32,7 +34,7 @@ export default function WorkspaceWindow({ title, state, children, onMinimize, on
32
34
  onMouseDown: (e) => {
33
35
  if (e.target === e.currentTarget)
34
36
  onOverlayClick === null || onOverlayClick === void 0 ? void 0 : onOverlayClick();
35
- }, "data-testid": `${testId}-backdrop`, children: _jsxs(Box, { bg: theme.colors.surfaceRaised, borderRadius: "xl", boxShadow: "2xl", overflow: "hidden", w: "100%", maxW: size.maxW, h: size.h, display: "flex", flexDirection: "column", "data-testid": testId, "data-window-state": state, children: [_jsxs(Flex, { align: "center", justify: "space-between", px: 3, py: 2, borderBottomWidth: "1px", borderColor: theme.colors.boxborder[200], bg: theme.colors.background[100], flexShrink: 0, children: [_jsx(WindowTitle, { testId: testId, color: theme.colors.text[700], children: title }), _jsxs(HStack, { spacing: 1, children: [headerActions, onOpenFullPage ? (_jsx(IconButton, { "aria-label": (_a = labels === null || labels === void 0 ? void 0 : labels.openFullPage) !== null && _a !== void 0 ? _a : "Open full page", size: "xs", variant: "ghost", icon: _jsx(ExternalLink, { size: 14 }), onClick: onOpenFullPage, "data-testid": `${testId}-fullpage` })) : null, onMinimize ? (_jsx(IconButton, { "aria-label": (_b = labels === null || labels === void 0 ? void 0 : labels.minimize) !== null && _b !== void 0 ? _b : "Minimize", size: "xs", variant: "ghost", icon: _jsx(Minus, { size: 15 }), onClick: onMinimize, "data-testid": `${testId}-minimize` })) : null, onClose ? (_jsx(IconButton, { "aria-label": (_c = labels === null || labels === void 0 ? void 0 : labels.close) !== null && _c !== void 0 ? _c : "Close", size: "xs", variant: "ghost", colorScheme: "red", icon: _jsx(X, { size: 15 }), onClick: onClose, "data-testid": `${testId}-close` })) : null] })] }), _jsx(Box, { flex: "1", overflow: "auto", px: { base: 3, md: 5 }, py: 4, children: children })] }) })] }));
37
+ }, "data-testid": `${testId}-backdrop`, children: _jsxs(Box, { bg: theme.colors.surfaceRaised, borderRadius: "xl", boxShadow: "2xl", overflow: "hidden", w: "100%", maxW: size.maxW, h: size.h, display: "flex", flexDirection: "column", "data-testid": testId, "data-window-state": state, children: [_jsxs(Flex, { align: "center", justify: "space-between", px: 3, py: 2, borderBottomWidth: "1px", borderColor: raisedRule(theme.colors), bg: bandOn(theme.colors.background[100], theme.colors.surfaceRaised), flexShrink: 0, children: [_jsx(WindowTitle, { testId: testId, color: theme.colors.text[700], children: title }), _jsxs(HStack, { spacing: 1, children: [headerActions, onOpenFullPage ? (_jsx(IconButton, { "aria-label": (_a = labels === null || labels === void 0 ? void 0 : labels.openFullPage) !== null && _a !== void 0 ? _a : "Open full page", size: "xs", variant: "ghost", icon: _jsx(ExternalLink, { size: 14 }), onClick: onOpenFullPage, "data-testid": `${testId}-fullpage` })) : null, onMinimize ? (_jsx(IconButton, { "aria-label": (_b = labels === null || labels === void 0 ? void 0 : labels.minimize) !== null && _b !== void 0 ? _b : "Minimize", size: "xs", variant: "ghost", icon: _jsx(Minus, { size: 15 }), onClick: onMinimize, "data-testid": `${testId}-minimize` })) : null, onClose ? (_jsx(IconButton, { "aria-label": (_c = labels === null || labels === void 0 ? void 0 : labels.close) !== null && _c !== void 0 ? _c : "Close", size: "xs", variant: "ghost", colorScheme: "red", icon: _jsx(X, { size: 15 }), onClick: onClose, "data-testid": `${testId}-close` })) : null] })] }), _jsx(Box, { flex: "1", overflow: "auto", px: { base: 3, md: 5 }, py: 4, children: children })] }) })] }));
36
38
  }
37
39
  const cssLength = (value) => (typeof value === "number" ? `${value}px` : value);
38
40
  // Portalled above modal overlays; aria-live keeps Chakra's modal aria-hidden off it, data-no-focus-lock keeps the focus trap off it.
@@ -0,0 +1,26 @@
1
+ import { useEffect, useRef } from "react";
2
+ /** Calls `onOutside` for a document `mousedown` outside every ref; a null ref contains nothing. Unlike Chakra's `useOutsideClick` it never waits for `mouseup`. */
3
+ export const useOutsideMouseDown = (refs, onOutside, { enabled = true, capture = false, includeClick = false } = {}) => {
4
+ const latest = useRef({ refs, onOutside });
5
+ useEffect(() => {
6
+ latest.current = { refs, onOutside };
7
+ });
8
+ useEffect(() => {
9
+ if (!enabled)
10
+ return;
11
+ const handle = (event) => {
12
+ const target = event.target;
13
+ if (latest.current.refs.some((ref) => { var _a; return (_a = ref.current) === null || _a === void 0 ? void 0 : _a.contains(target); }))
14
+ return;
15
+ latest.current.onOutside(event);
16
+ };
17
+ document.addEventListener("mousedown", handle, capture);
18
+ if (includeClick)
19
+ document.addEventListener("click", handle, capture);
20
+ return () => {
21
+ document.removeEventListener("mousedown", handle, capture);
22
+ if (includeClick)
23
+ document.removeEventListener("click", handle, capture);
24
+ };
25
+ }, [enabled, capture, includeClick]);
26
+ };
@@ -16,28 +16,45 @@ const constructUrl = ({ baseUrl, key, page, name, orgId }) => {
16
16
  const queryString = params.toString();
17
17
  return `${baseUrl}${queryString ? `?${queryString}` : ""}`;
18
18
  };
19
+ const NO_PREFERENCES = [];
19
20
  const useGetPreferences = ({ baseUrl = "", key = "", page = "", name = "", authToken = "", orgId = "", }) => {
20
- const [preferences, setPreferences] = useState([]);
21
- // NOTE: must start true — KanbanBoard's hydration effect reads this before this hook's mount effect runs.
22
- const [loading, setLoading] = useState(() => Boolean(baseUrl));
21
+ const url = baseUrl ? constructUrl({ baseUrl, key, page, name, orgId }) : "";
22
+ const requestKey = url ? JSON.stringify([url, authToken]) : "";
23
+ const [settled, setSettled] = useState({
24
+ requestKey: "",
25
+ preferences: NO_PREFERENCES,
26
+ });
23
27
  useEffect(() => {
24
- if (!baseUrl) {
28
+ if (!url) {
25
29
  return;
26
30
  }
27
- setLoading(true);
28
- const url = constructUrl({ baseUrl, key, page, name, orgId });
31
+ let cancelled = false;
29
32
  fetch(url, {
30
33
  headers: {
31
34
  Authorization: authToken,
32
35
  },
33
36
  })
34
37
  .then((response) => response.json())
35
- .then((data) => setPreferences(data))
36
- .catch((error) => console.error(error))
37
- .finally(() => setLoading(false));
38
- /* eslint-disable */
39
- }, [baseUrl]);
40
- return { preferences, loading };
38
+ .then((data) => {
39
+ if (!cancelled)
40
+ setSettled({ requestKey, preferences: data });
41
+ })
42
+ .catch((error) => {
43
+ if (cancelled)
44
+ return;
45
+ console.error(error);
46
+ setSettled({ requestKey, preferences: NO_PREFERENCES });
47
+ });
48
+ return () => {
49
+ cancelled = true;
50
+ };
51
+ }, [url, authToken, requestKey]);
52
+ const isSettled = settled.requestKey === requestKey;
53
+ return {
54
+ preferences: isSettled ? settled.preferences : NO_PREFERENCES,
55
+ // NOTE: derived so KanbanBoard never reads a stale loading=false, on mount or re-key.
56
+ loading: Boolean(baseUrl) && !isSettled,
57
+ };
41
58
  };
42
59
  const useSavePreferences = ({ baseUrl = "", key = "", page = "", name = "", authToken = "", orgId = "", }) => {
43
60
  const [loading, setLoading] = useState(false);
@@ -55,6 +72,7 @@ const useSavePreferences = ({ baseUrl = "", key = "", page = "", name = "", auth
55
72
  body: JSON.stringify({ key, page, name, json: data }),
56
73
  })
57
74
  .then((r) => r.json())
75
+ .then(() => setError(null))
58
76
  .catch((e) => setError(e))
59
77
  .finally(() => setLoading(false));
60
78
  }, [baseUrl, orgId, authToken, key, page, name]);
@@ -0,0 +1,33 @@
1
+ import { useCallback, useEffect, useState } from "react";
2
+ import { observeResize } from "./sharedResizeObserver.js";
3
+ const FOCUSABLE_CONTENT = 'a[href], area[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), summary, iframe, [contenteditable]:not([contenteditable="false"]), [tabindex]:not([tabindex="-1"])';
4
+ const USER_SCROLLABLE = /auto|scroll/;
5
+ const SLACK_PX = 1;
6
+ const needsFocusStop = (el) => {
7
+ const { overflowX, overflowY } = getComputedStyle(el);
8
+ const scrollsX = USER_SCROLLABLE.test(overflowX) && el.scrollWidth > el.clientWidth + SLACK_PX;
9
+ const scrollsY = USER_SCROLLABLE.test(overflowY) && el.scrollHeight > el.clientHeight + SLACK_PX;
10
+ return (scrollsX || scrollsY) && !el.querySelector(FOCUSABLE_CONTENT);
11
+ };
12
+ export function useScrollableRegion({ label, labelledBy, keepRole = false, } = {}) {
13
+ const [element, setElement] = useState(null);
14
+ const [isStop, setIsStop] = useState(false);
15
+ const measure = useCallback(() => setIsStop(element !== null && needsFocusStop(element)), [element]);
16
+ useEffect(() => {
17
+ if (!element)
18
+ return undefined;
19
+ return observeResize(element, measure);
20
+ }, [element, measure]);
21
+ // NOTE: also runs after every commit; an equal state bails out, so no loop.
22
+ useEffect(measure);
23
+ const named = Boolean(label || labelledBy);
24
+ const props = isStop
25
+ ? {
26
+ tabIndex: 0,
27
+ role: named && !keepRole ? "region" : undefined,
28
+ "aria-label": label,
29
+ "aria-labelledby": labelledBy,
30
+ }
31
+ : {};
32
+ return { ref: setElement, props };
33
+ }
@@ -5,6 +5,8 @@ import { optionRowInk, optionRowWeight } from "../../Components/Select/optionRow
5
5
  import { OPTION_ROW_SIZES, OPTION_ROW_RADIUS } from "../tokens/primitives/optionRowSizes.js";
6
6
  import { paletteOf } from "./paletteFromTheme.js";
7
7
  import { POPUP_SURFACE } from "./overlay.styles.js";
8
+ import { isDarkCanvas } from "../tokens/builders/accentText.js";
9
+ import { raisedRule } from "../tokens/builders/surfaceRaised.js";
8
10
  const itemRowSpec = OPTION_ROW_SIZES.sm;
9
11
  const { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(menuAnatomy.keys);
10
12
  const $bg = cssVar("menu-bg");
@@ -25,6 +27,10 @@ const baseStyle = definePartsStyle(({ theme }) => {
25
27
  borderColor: colors.boxborder[200],
26
28
  ...POPUP_SURFACE,
27
29
  },
30
+ divider: {
31
+ borderColor: raisedRule(colors),
32
+ ...(isDarkCanvas(colors.surfaceRaised) && { opacity: 1 }),
33
+ },
28
34
  item: {
29
35
  color: optionRowInk(colors, false),
30
36
  minH: itemRowSpec.minH,
@@ -74,7 +74,7 @@ const Badge = {
74
74
  size: "sm",
75
75
  },
76
76
  };
77
- // NOTE: fixes Chakra's FormErrorMessage/Icon hardcoding red.500 — same AA gap as our ErrorComponent.
77
+ // NOTE: fixes Chakra's FormErrorMessage/Icon hardcoding red.500, which misses AA on the canvas.
78
78
  const FormError = {
79
79
  baseStyle: ({ theme }) => {
80
80
  const palette = paletteOf(theme);
@@ -6,9 +6,9 @@ export const FOCUS_RING_WIDTH = 4;
6
6
  // NOTE: a box-shadow, not an outline — drawn outside the border box so it never resizes the control.
7
7
  export const focusRingShadow = (colors) => `0 0 0 ${FOCUS_HALO_WIDTH}px ${colors.focusRing.halo}, ` +
8
8
  `0 0 0 ${FOCUS_RING_WIDTH}px ${colors.focusRing.ring}`;
9
- /** For controls whose rounded shell clips overflow: the same halo and ring, drawn inside the border box. */
10
- export const insetFocusRingShadow = (colors) => `inset 0 0 0 ${FOCUS_HALO_WIDTH}px ${colors.focusRing.halo}, ` +
11
- `inset 0 0 0 ${FOCUS_RING_WIDTH}px ${colors.focusRing.ring}`;
9
+ /** For controls whose shell clips overflow: ring on the edge, halo inside, so an opaque child leaves the ring. */
10
+ export const insetFocusRingShadow = (colors) => `inset 0 0 0 ${FOCUS_RING_WIDTH - FOCUS_HALO_WIDTH}px ${colors.focusRing.ring}, ` +
11
+ `inset 0 0 0 ${FOCUS_RING_WIDTH}px ${colors.focusRing.halo}`;
12
12
  // NOTE: stacked pseudo-classes raise specificity above Chakra's _hover, so a hovered+focused button keeps its ring.
13
13
  export const FOCUS_VISIBLE_OVER_STATE = "&:hover:focus-visible, &:active:focus-visible, &[data-active]:focus-visible";
14
14
  // NOTE: transparent outline isn't decorative — forced-colors mode drops box-shadow but repaints an outline.
@@ -1,6 +1,19 @@
1
1
  import { assertPixelizePalette } from "../assertPalette.js";
2
+ import { scaleNamed } from "../tokens/builders/paletteScale.js";
2
3
  /** Chakra hands style functions an untyped theme; this is the boundary that makes it typed. */
3
4
  export const paletteOf = (theme) => assertPixelizePalette(theme);
4
- const asScale = (value) => typeof value === "object" && value !== null ? value : undefined;
5
- // NOTE: colorScheme is consumer-supplied and can name a built-in we never themed — unknowns resolve to gray.
6
- export const scaleFor = (palette, colorScheme) => { var _a; return (_a = asScale(palette[colorScheme])) !== null && _a !== void 0 ? _a : palette.gray; };
5
+ const warned = new Set();
6
+ export const warnUnknownColorScheme = (colorScheme) => {
7
+ if (process.env.NODE_ENV === "production" || warned.has(colorScheme))
8
+ return;
9
+ warned.add(colorScheme);
10
+ console.warn(`[pixelize-design-library] colorScheme "${colorScheme}" is not a themed colour scale; using the fallback scale.`);
11
+ };
12
+ // NOTE: colorScheme is consumer-supplied and can name a built-in we never themed — unknowns use the fallback.
13
+ export const scaleFor = (palette, colorScheme, fallback = palette.gray) => {
14
+ const scale = scaleNamed(palette, colorScheme);
15
+ if (scale)
16
+ return scale;
17
+ warnUnknownColorScheme(colorScheme);
18
+ return fallback;
19
+ };
@@ -78,7 +78,7 @@ const SegmentedVariant = ({ size, label, showBrandPicker, }) => {
78
78
  const isSelected = mode === value;
79
79
  return (_jsx(Button, { ref: (node) => {
80
80
  optionRefs.current[index] = node;
81
- }, role: "radio", "aria-checked": isSelected, "aria-label": optionLabel, onClick: () => setMode(value), onKeyDown: (event) => handleKeyDown(event, index), size: SIZES[size].control, variant: "ghost", borderRadius: "full", bg: isSelected ? activeBg : "transparent", color: isSelected ? activeColor : mutedColor, boxShadow: isSelected ? "sm" : "none", _hover: { color: activeColor }, _focusVisible: { outline: "2px solid transparent", outlineOffset: "2px" }, children: _jsx(Icon, { size: SIZES[size].icon, "aria-hidden": true }) }, value));
81
+ }, role: "radio", "aria-checked": isSelected, "aria-label": optionLabel, tabIndex: isSelected ? 0 : -1, onClick: () => setMode(value), onKeyDown: (event) => handleKeyDown(event, index), size: SIZES[size].control, variant: "ghost", borderRadius: "full", bg: isSelected ? activeBg : "transparent", color: isSelected ? activeColor : mutedColor, boxShadow: isSelected ? "sm" : "none", _hover: { color: activeColor }, _focusVisible: { outline: "2px solid transparent", outlineOffset: "2px" }, children: _jsx(Icon, { size: SIZES[size].icon, "aria-hidden": true }) }, value));
82
82
  }), showBrandPicker && _jsx(BrandMenu, { size: size })] }));
83
83
  };
84
84
  const MenuVariant = ({ size, label, showBrandPicker, }) => {
@@ -37,8 +37,9 @@ export const solidFillRung = (scale, white, canvas) => {
37
37
  return rungAwayFromCanvas(scale, canvas);
38
38
  };
39
39
  const steppedRung = (base, canvas, step) => {
40
- const dir = isDarkCanvas(canvas) ? -100 : 100;
41
- return Math.min(900, Math.max(50, base + dir * step));
40
+ const dir = isDarkCanvas(canvas) ? -1 : 1;
41
+ const index = RUNGS.indexOf(base) + dir * step;
42
+ return RUNGS[Math.min(RUNGS.length - 1, Math.max(0, index))];
42
43
  };
43
44
  const steppedTowardBase = (from, base) => RUNGS[RUNGS.indexOf(from) + (from > base ? -1 : 1)];
44
45
  /**
@@ -1,5 +1,6 @@
1
1
  import { contrastRatio, hexToHsl, withLightness } from "./color.js";
2
2
  import { AA_NON_TEXT } from "./outlineRung.js";
3
+ import { bandOn } from "./planeStep.js";
3
4
  /** Same lightness granularity `buildDarkPalette` walks its accents at. */
4
5
  const LIGHTNESS_STEP = 0.5;
5
6
  // NOTE: not settleAcross — a ring squeezed between a light canvas and a dark fill needs the closest color that clears both, not a per-surface lift.
@@ -21,10 +22,12 @@ export function settleBetween(hex, backdrops, target = AA_NON_TEXT) {
21
22
  const worst = (candidate) => Math.min(...backdrops.map((backdrop) => contrastRatio(candidate, backdrop)));
22
23
  return worst(ends[0]) >= worst(ends[1]) ? ends[0] : ends[1];
23
24
  }
24
- // NOTE: only canvas + card surface — including the fill or every named surface leaves no solvable hue.
25
+ // NOTE: canvas, card and the table header band — including the fill or every named surface leaves no solvable hue.
25
26
  export const focusRingBackdrops = (source) => [
26
27
  source.backgroundColor.main,
27
28
  source.background[50],
29
+ source.backgroundColor.tableHeader,
30
+ bandOn(source.backgroundColor.tableHeader, source.background[50]),
28
31
  ];
29
32
  // NOTE: replaces Chakra's stock ring (a fixed blue that measured under 2:1 on every brand).
30
33
  export const buildFocusRing = (source) => {
@@ -0,0 +1,6 @@
1
+ const isColorScale = (value) => typeof value === "object" && value !== null && "500" in value;
2
+ export const scaleNamed = (colors, name) => {
3
+ const entries = colors;
4
+ const value = entries[name];
5
+ return isColorScale(value) ? value : undefined;
6
+ };
@@ -0,0 +1,56 @@
1
+ const NEEDS_QUOTES = /[",\r\n]/;
2
+ const FORMULA_TRIGGER = /^[=+\-@\t\r]/;
3
+ const PLAIN_NUMBER = /^[+-]?(?:\d[\d,]*(?:\.\d*)?|\.\d+)%?$/;
4
+ const BOM = "";
5
+ const RESERVED_FILE_CHARS = /[\\/:*?"<>|\p{Cc}]/gu;
6
+ const MAX_FILE_NAME = 80;
7
+ const REVOKE_DELAY_MS = 1000;
8
+ const quote = (text) => (NEEDS_QUOTES.test(text) ? `"${text.replace(/"/g, '""')}"` : text);
9
+ const looksLikeFormula = (text) => FORMULA_TRIGGER.test(text) && !PLAIN_NUMBER.test(text);
10
+ function cellText(value, escapeFormulas) {
11
+ if (value === null || value === undefined)
12
+ return "";
13
+ if (typeof value === "number")
14
+ return Number.isFinite(value) ? String(value) : "";
15
+ const text = String(value);
16
+ if (typeof value !== "string" || !escapeFormulas)
17
+ return text;
18
+ return looksLikeFormula(text) ? `'${text}` : text;
19
+ }
20
+ function readCell(row, column) {
21
+ const field = row[column.key];
22
+ const format = column.format;
23
+ return format === undefined ? field : format(field, row);
24
+ }
25
+ /** RFC 4180 CSV: header line, then one CRLF-separated line per row. */
26
+ export function toCsv(rows, columns, { bom = false } = {}) {
27
+ if (columns.length === 0)
28
+ return "";
29
+ const lines = [columns.map((column) => quote(column.header)).join(",")];
30
+ for (const row of rows) {
31
+ lines.push(columns.map((column) => quote(cellText(readCell(row, column), column.escapeFormulas !== false))).join(","));
32
+ }
33
+ return (bom ? BOM : "") + lines.join("\r\n");
34
+ }
35
+ /** Replaces path and reserved characters with `-`; caps at 80 characters, keeping the extension. */
36
+ export function safeFileName(fileName) {
37
+ const cleaned = fileName.replace(RESERVED_FILE_CHARS, "-").trim().replace(/^[.\s]+/, "");
38
+ if (cleaned === "")
39
+ return "export";
40
+ if (cleaned.length <= MAX_FILE_NAME)
41
+ return cleaned;
42
+ const dot = cleaned.lastIndexOf(".");
43
+ const extension = dot > 0 && cleaned.length - dot <= 8 ? cleaned.slice(dot) : "";
44
+ return cleaned.slice(0, MAX_FILE_NAME - extension.length).replace(/[\uD800-\uDBFF]$/, "") + extension;
45
+ }
46
+ /** Saves `blob` as `safeFileName(fileName)`, then revokes its object URL. */
47
+ export function downloadBlob(blob, fileName) {
48
+ const url = URL.createObjectURL(blob);
49
+ const link = document.createElement("a");
50
+ link.href = url;
51
+ link.download = safeFileName(fileName);
52
+ document.body.appendChild(link);
53
+ link.click();
54
+ link.remove();
55
+ setTimeout(() => URL.revokeObjectURL(url), REVOKE_DELAY_MS);
56
+ }
package/dist/esm/index.js CHANGED
@@ -111,12 +111,8 @@ debounce,
111
111
  // account handoff
112
112
  isAllowedReturnUrl, resolveReturnUrl, createAccountHandoff, };
113
113
  export default withTheme;
114
- // ---------------------------------------------------------------------------
115
- // Theme switching (added in 2.4.0) — additive only.
116
- //
117
- // Opt-in: `withTheme` is unchanged and stays light-only, so existing apps render
118
- // exactly as before. Wrap an app in `PixelizeThemeProvider` to get light/dark/system.
119
- // ---------------------------------------------------------------------------
114
+ // Theme switching (2.4.0), opt-in: `withTheme` stays light-only.
115
+ // Wrap an app in `PixelizeThemeProvider` to get light/dark/system.
120
116
  export { PixelizeThemeProvider, useThemeMode, ThemeSwitcher, DEFAULT_FONT_SIZE, FONT_SIZE_OPTIONS, isFontSize, resolveFontSize, useFontSizeSync, } from "./Theme/provider/index.js";
121
117
  export { AppearanceSettings } from "./Components/AppearanceSettings/AppearanceSettings.js";
122
118
  /** Light + dark Chakra theme per brand. `ThemesList` remains the light-only list. */
@@ -124,17 +120,14 @@ export { brandThemes } from "./Theme/index.js";
124
120
  // Pure, platform-agnostic tokens — also consumed by the Pixelize mobile design library.
125
121
  export { lightPalettes, darkPalettes, palettes, themeNames, } from "./Theme/tokens/brands/index.js";
126
122
  export { buildDarkPalette } from "./Theme/tokens/builders/buildDarkPalette.js";
127
- // Contrast-resolved recipes for the two surfaces apps kept hand-rolling (and failing AA on):
128
- // status chips and generated avatars. Consumers pass a scale/seed and get tokens that already
129
- // clear the bar, instead of pinning hexes that go stale when a palette moves.
123
+ // Contrast-resolved recipes for status chips and generated avatars.
124
+ // They already clear AA, unlike hexes a consumer pins by hand.
130
125
  export { AA_NON_TEXT, liftToContrast, withOutlineRung, } from "./Theme/tokens/builders/outlineRung.js";
131
126
  // The three backgrounds a selectable row rests on, for a consumer's own list. Neutral by
132
127
  // construction, so the canvas ink stays readable on every one of them.
133
128
  export { listRowBackgrounds } from "./Theme/tokens/builders/rowStates.js";
134
- // The two-tone `:focus-visible` indicator, derived per brand per mode. `buildFocusRing` resolves
135
- // the pair from a palette; `focusVisibleStyles` is the ready-made Chakra pseudo-selector block a
136
- // consumer's own control can spread to get the same ring Button draws. Both exist because Chakra's
137
- // `shadows.outline` is one hardcoded blue that fails WCAG 1.4.11 on every Pixelize palette.
129
+ // Two-tone `:focus-visible` ring per brand and mode, matching Button's.
130
+ // Chakra's `shadows.outline` fails WCAG 1.4.11 on every palette.
138
131
  export { buildFocusRing, settleBetween, withFocusRing } from "./Theme/tokens/builders/focusRing.js";
139
132
  export { focusRingShadow, focusVisibleRing, focusVisibleStyles, FOCUS_VISIBLE_OVER_STATE, FOCUS_HALO_WIDTH, FOCUS_RING_WIDTH, } from "./Theme/chakra/focusRing.styles.js";
140
133
  export { AVATAR_SEEDS, avatarFillFor, meetsBodyText, resolveAvatarFill, resolveStatusTone, } from "./Theme/tokens/builders/statusTone.js";
@@ -144,10 +137,8 @@ export { toWords } from "./Utils/functions.js";
144
137
  export { useDebouncedCallback, useDebouncedValue } from "./Hooks/useDebounce.js";
145
138
  export { CATEGORICAL_SERIES, chartAxisLabelColor, chartInk, chartMode, getCategoricalSeriesColors, getDefaultSeriesColors, labelOnSeries, } from "./Theme/tokens/builders/chartColorsFromTheme.js";
146
139
  export { useChartTheme } from "./Theme/useChartTheme.js";
147
- // WCAG contrast + accent-picking helpers this library uses internally to keep text readable
148
- // against any canvas/fill a palette produces. Pure and dependency-free — consumers building
149
- // custom components against `ColorScale`/`PaletteProps` tokens can reuse the same logic instead
150
- // of re-deriving contrast math themselves.
140
+ // WCAG contrast and accent-picking helpers, pure and dependency-free.
141
+ // For custom components built on `ColorScale`/`PaletteProps` tokens.
151
142
  export { statusGradient, inkSafeGradient, chipFill, chipBorder, ACCENT_GRADIENT, STATUS_INK, } from "./Components/PlanPill/planPillGradient.js";
152
143
  export { isDarkCanvas, onFilled, onGradient, accentTextOnCanvas, accentTextOnPlanes, pickAccentText, AA_NORMAL_TEXT, DARK_CANVAS_LUMINANCE, } from "./Theme/tokens/builders/accentText.js";
153
144
  // Filled-surface helpers — use whenever you paint a `bg` from a ColorScale (buttons, badges,
@@ -155,16 +146,14 @@ export { isDarkCanvas, onFilled, onGradient, accentTextOnCanvas, accentTextOnPla
155
146
  export { solidFillRung, darkerFillRung, labelOnFill, resolveFilledSurface, } from "./Theme/tokens/builders/filledSurface.js";
156
147
  // Ink for a custom option row (a `SearchSelect` `option.view` or `Select` `renderOption` node).
157
148
  export { optionRowInk, optionRowWeight, optionRowDescriptionInk, optionRowFill, optionRowCursorSx, } from "./Components/Select/optionRowInk.js";
158
- // Pure color math backing the helpers above (and `buildDarkPalette`) — no Chakra/React/DOM
159
- // dependency, safe for the mobile port. `relativeLuminance`/`contrastRatio` are the WCAG 2.1
160
- // primitives; `compositeOver` flattens a translucent color onto a backdrop first (an alpha
161
- // color has no defined luminance on its own, so measure the composited result, not the tint).
149
+ // Pure color math behind the helpers above, with no Chakra, React or DOM.
150
+ // NOTE: composite an alpha color onto its backdrop before measuring luminance.
162
151
  export { hexToRgb, hexToRgba, compositeOver, rgbToHex, rgbToHsl, hslToRgb, hexToHsl, hslToHex, withLightness, mix, relativeLuminance, contrastRatio, } from "./Theme/tokens/builders/color.js";
163
- // Calendar day marking (`DatePicker` + `isRange`). Exported so a consumer can build a legend,
164
- // or a summary line, from the SAME keys, tokens and phrasing the calendar itself paints and
165
- // announces — a hand-copied legend is how a legend goes stale.
152
+ // Calendar day marking (`DatePicker` + `isRange`): build a legend from the keys,
153
+ // tokens and phrasing the calendar itself uses.
166
154
  export { DAY_STATE_KEYS, DAY_CLASS as CALENDAR_DAY_CLASS, isDayStateKey, resolveDayStateVisual, describeDayStates, } from "./Components/DatePicker/dayStates.js";
167
155
  export { appInitials, filterApps, matchesShortcut, formatShortcut, buildSuiteApps, } from "./Components/AppSwitcher/AppSwitcherProps.js";
156
+ export { PIXELIZE_SUITE, resolveSuiteApps } from "./Components/AppSwitcher/pixelizeSuite.js";
168
157
  export { useAppSwitcherShortcut } from "./Components/AppSwitcher/useAppSwitcherShortcut.js";
169
158
  export { scrollbarStyles, globalScrollbarStyles, SCROLLBAR_WIDTH, } from "./Theme/tokens/builders/scrollbar.js";
170
159
  export { placeholderInk, placeholderInkOn, fieldSurfaces } from "./Theme/tokens/builders/placeholderInk.js";
@@ -215,6 +204,7 @@ export { default as AudioRecorder } from "./Components/AudioRecorder/AudioRecord
215
204
  export { default as Accordian } from "./Components/Accordion/Accordion.js";
216
205
  export { Tabs, TabList, Tab, TabPanels, TabPanel } from "./Components/Tabs/index.js";
217
206
  export { default as ConfirmDialog } from "./Components/ConfirmDialog/ConfirmDialog.js";
207
+ export { default as FilteredEmptyState } from "./Components/EmptyState/FilteredEmptyState.js";
218
208
  export { default as NotificationBell } from "./Components/NotificationBell/NotificationBell.js";
219
209
  export { default as NotificationPanel } from "./Components/NotificationBell/NotificationPanel.js";
220
210
  export { default as NotificationList } from "./Components/NotificationBell/NotificationList.js";
@@ -283,6 +273,8 @@ export { default as NewTabLink } from "./Components/NavLauncher/NewTabLink.js";
283
273
  export { searchLauncher, searchLauncherSections, flattenScreens, highlightSegments } from "./Components/NavLauncher/match.js";
284
274
  export { LauncherSearchEngine } from "./Components/NavLauncher/engine/index.js";
285
275
  export { default as WizardDialog, Wizard, wizardTransition, firstInvalidStep, } from "./Components/WizardDialog/WizardDialog.js";
276
+ export { chipHtml, chipify, extractTokens, fieldToken, serializeChips, unknownTokens, } from "./Components/Editor/editorTokens.js";
277
+ export { downloadBlob, safeFileName, toCsv } from "./Utils/tabular.js";
286
278
  export { default as Pagination } from "./Components/Pagination/Pagination.js";
287
279
  export { defaultPaginationLabels } from "./Components/Pagination/PaginationProps.js";
288
280
  export { default as ChoiceCard } from "./Components/ChoiceCard/ChoiceCard.js";