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
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box } from "@chakra-ui/react";
3
+ import { SearchX } from "lucide-react";
4
+ import Button from "../Button/Button.js";
5
+ import EmptyState from "./EmptyState.js";
6
+ const plural = (count, one, many) => (count === 1 ? one : many);
7
+ /** Empty because filters excluded everything: announces itself (`role="status"`) and offers Clear / Remove-last. */
8
+ const FilteredEmptyState = ({ title = "Nothing matched these filters", description, scale = "page", filterCount, onClearFilters, clearLabel, onRemoveLastFilter, removeLastFilterLabel = "Remove last filter", minH, }) => {
9
+ const hasCount = filterCount !== undefined && filterCount > 0;
10
+ const resolvedDescription = description !== null && description !== void 0 ? description : (hasCount
11
+ ? `${filterCount} ${plural(filterCount, "filter is", "filters are")} active. Remove or clear ${plural(filterCount, "it", "them")} to see more results.`
12
+ : undefined);
13
+ const resolvedClearLabel = clearLabel !== null && clearLabel !== void 0 ? clearLabel : (hasCount ? `Clear ${filterCount} ${plural(filterCount, "filter", "filters")}` : "Clear filters");
14
+ const buttonSize = scale === "card" ? "sm" : "md";
15
+ const actions = onRemoveLastFilter || onClearFilters ? (_jsxs(_Fragment, { children: [onRemoveLastFilter && (_jsx(Button, { size: buttonSize, label: removeLastFilterLabel, onClick: onRemoveLastFilter })), onClearFilters && (_jsx(Button, { size: buttonSize, variant: "outline", colorScheme: "gray", label: resolvedClearLabel, onClick: onClearFilters }))] })) : undefined;
16
+ return (_jsx(Box, { role: "status", w: "100%", children: _jsx(EmptyState, { icon: SearchX, colorScheme: "gray", variant: "subtle", size: scale === "card" ? "sm" : "md", minH: minH !== null && minH !== void 0 ? minH : (scale === "card" ? "6rem" : undefined), title: title, description: resolvedDescription, action: actions }) }));
17
+ };
18
+ export default FilteredEmptyState;
@@ -1,13 +1,17 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useState } from "react";
3
3
  import { Box, Flex, IconButton, Image, Modal, ModalBody, ModalCloseButton, ModalContent, ModalOverlay, Text, useDisclosure, } from "@chakra-ui/react";
4
- import { motion } from "framer-motion";
4
+ import { MotionConfig, motion } from "framer-motion";
5
5
  import { Download, Eye, FileQuestion, Minus, Plus, RotateCw, } from "lucide-react";
6
6
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
7
7
  import { resolveFilledSurface } from "../../Theme/tokens/builders/filledSurface.js";
8
8
  import { hexToRgb } from "../../Theme/tokens/builders/color.js";
9
9
  import { overlayScrimStyles } from "../../Theme/chakra/overlay.styles.js";
10
+ import { focusVisibleRing } from "../../Theme/chakra/focusRing.styles.js";
10
11
  import ToolTip from "../ToolTip/ToolTip.js";
12
+ import { transitionFor } from "../../Theme/tokens/primitives/motion.js";
13
+ const BASE_TRANSFORM_TRANSITION = transitionFor(["transform"], "base");
14
+ const OPACITY_TRANSITION = transitionFor(["opacity"]);
11
15
  const MotionContent = motion(ModalContent);
12
16
  const blackScrim = (black, opacity) => {
13
17
  const { r, g, b } = hexToRgb(black);
@@ -57,7 +61,7 @@ export const FilePreview = ({ isOpen, onClose, fileUrl, fileName, fileType, hide
57
61
  };
58
62
  const renderBody = () => {
59
63
  if (kind === "image") {
60
- return (_jsx(Flex, { justify: "center", align: "center", minH: "200px", overflow: "hidden", children: _jsx(Image, { src: fileUrl, alt: fileName || "preview", maxW: "100%", transform: `scale(${zoom}) rotate(${rotation}deg)`, transition: "transform 0.2s ease", objectFit: "contain" }) }));
64
+ return (_jsx(Flex, { justify: "center", align: "center", minH: "200px", overflow: "hidden", children: _jsx(Image, { src: fileUrl, alt: fileName || "preview", maxW: "100%", transform: `scale(${zoom}) rotate(${rotation}deg)`, transition: BASE_TRANSFORM_TRANSITION, objectFit: "contain" }) }));
61
65
  }
62
66
  if (kind === "pdf") {
63
67
  return (_jsx(Box, { as: "embed", src: fileUrl, type: "application/pdf", width: "100%", height: "70vh", borderRadius: "lg" }));
@@ -67,13 +71,13 @@ export const FilePreview = ({ isOpen, onClose, fileUrl, fileName, fileType, hide
67
71
  }
68
72
  return (_jsxs(Flex, { direction: "column", align: "center", justify: "center", py: 12, gap: 3, children: [_jsx(FileQuestion, { size: 48, color: theme.colors.textMuted }), _jsx(Text, { color: theme.colors.textMuted, fontSize: "sm", children: "Preview isn't available for this file type." }), !hideDownload && (_jsxs(Flex, { as: "button", align: "center", gap: 2, px: 4, py: 2, borderRadius: "lg", bg: downloadFill.fill, color: downloadFill.color, fontSize: "sm", fontWeight: 500, onClick: () => downloadFile(fileUrl, fileName), children: [_jsx(Download, { size: 16 }), " Download file"] }))] }));
69
73
  };
70
- return (_jsxs(Modal, { isOpen: isOpen, onClose: handleClose, size: size, isCentered: true, children: [_jsx(ModalOverlay, { ...overlayScrimStyles(theme.colors) }), _jsxs(MotionContent, { bg: theme.colors.surfaceRaised, borderRadius: "xl", overflow: "hidden", initial: { opacity: 0, scale: 0.96, y: 8 }, animate: { opacity: 1, scale: 1, y: 0 }, transition: { duration: 0.2, ease: "easeOut" }, children: [_jsxs(Flex, { align: "center", justify: "space-between", px: 4, py: 3, borderBottom: "1px solid", borderColor: theme.colors.boxborder[200], children: [_jsx(ToolTip, { label: fileName || "File", placement: "bottom", children: _jsx(Text, { fontSize: "sm", fontWeight: 600, maxW: "60%", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", children: fileName || "Preview" }) }), _jsxs(Flex, { align: "center", gap: 1, children: [kind === "image" && (_jsxs(_Fragment, { children: [_jsx(ToolTip, { label: "Zoom out", placement: "bottom", children: _jsx(IconButton, { "aria-label": "Zoom out", size: "sm", variant: "ghost", icon: _jsx(Minus, { size: 16 }), onClick: () => setZoom((z) => Math.max(0.25, z - 0.25)) }) }), _jsx(ToolTip, { label: "Zoom in", placement: "bottom", children: _jsx(IconButton, { "aria-label": "Zoom in", size: "sm", variant: "ghost", icon: _jsx(Plus, { size: 16 }), onClick: () => setZoom((z) => Math.min(4, z + 0.25)) }) }), _jsx(ToolTip, { label: "Rotate", placement: "bottom", children: _jsx(IconButton, { "aria-label": "Rotate", size: "sm", variant: "ghost", icon: _jsx(RotateCw, { size: 16 }), onClick: () => setRotation((r) => (r + 90) % 360) }) })] })), !hideDownload && (_jsx(ToolTip, { label: "Download", placement: "bottom", children: _jsx(IconButton, { "aria-label": "Download", size: "sm", variant: "ghost", color: theme.colors.semanticText.success, icon: _jsx(Download, { size: 18 }), onClick: () => downloadFile(fileUrl, fileName) }) })), _jsx(ModalCloseButton, { position: "static" })] })] }), _jsx(ModalBody, { p: 5, children: renderBody() })] })] }));
74
+ return (_jsx(MotionConfig, { reducedMotion: "user", children: _jsxs(Modal, { isOpen: isOpen, onClose: handleClose, size: size, isCentered: true, children: [_jsx(ModalOverlay, { ...overlayScrimStyles(theme.colors) }), _jsxs(MotionContent, { bg: theme.colors.surfaceRaised, borderRadius: "xl", overflow: "hidden", initial: { opacity: 0, scale: 0.96, y: 8 }, animate: { opacity: 1, scale: 1, y: 0 }, transition: { duration: 0.2, ease: "easeOut" }, children: [_jsxs(Flex, { align: "center", justify: "space-between", px: 4, py: 3, borderBottom: "1px solid", borderColor: theme.colors.boxborder[200], children: [_jsx(ToolTip, { label: fileName || "File", placement: "bottom", children: _jsx(Text, { fontSize: "sm", fontWeight: 600, maxW: "60%", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", children: fileName || "Preview" }) }), _jsxs(Flex, { align: "center", gap: 1, children: [kind === "image" && (_jsxs(_Fragment, { children: [_jsx(ToolTip, { label: "Zoom out", placement: "bottom", children: _jsx(IconButton, { "aria-label": "Zoom out", size: "sm", variant: "ghost", icon: _jsx(Minus, { size: 16 }), onClick: () => setZoom((z) => Math.max(0.25, z - 0.25)) }) }), _jsx(ToolTip, { label: "Zoom in", placement: "bottom", children: _jsx(IconButton, { "aria-label": "Zoom in", size: "sm", variant: "ghost", icon: _jsx(Plus, { size: 16 }), onClick: () => setZoom((z) => Math.min(4, z + 0.25)) }) }), _jsx(ToolTip, { label: "Rotate", placement: "bottom", children: _jsx(IconButton, { "aria-label": "Rotate", size: "sm", variant: "ghost", icon: _jsx(RotateCw, { size: 16 }), onClick: () => setRotation((r) => (r + 90) % 360) }) })] })), !hideDownload && (_jsx(ToolTip, { label: "Download", placement: "bottom", children: _jsx(IconButton, { "aria-label": "Download", size: "sm", variant: "ghost", color: theme.colors.semanticText.success, icon: _jsx(Download, { size: 18 }), onClick: () => downloadFile(fileUrl, fileName) }) })), _jsx(ModalCloseButton, { position: "static" })] })] }), _jsx(ModalBody, { p: 5, children: renderBody() })] })] }) }));
71
75
  };
72
76
  /** Thumbnail with a hover "preview" affordance that opens {@link FilePreview}. */
73
77
  export const FilePreviewTrigger = ({ fileUrl, fileName, fileType, thumbWidth = "100px", thumbHeight = "60px", hideDownload = false, }) => {
74
78
  const theme = useCustomTheme();
75
79
  const { isOpen, onOpen, onClose } = useDisclosure();
76
80
  const kind = fileType || inferKind(fileUrl, fileName);
77
- return (_jsxs(_Fragment, { children: [_jsxs(Box, { position: "relative", display: "inline-flex", alignItems: "center", justifyContent: "center", role: "group", maxW: thumbWidth, minW: "40px", minH: thumbHeight, borderRadius: "lg", overflow: "hidden", cursor: "pointer", onClick: onOpen, children: [kind === "image" ? (_jsx(Image, { src: fileUrl, alt: fileName || "file", maxH: thumbHeight, maxW: thumbWidth, objectFit: "contain", borderRadius: "lg" })) : (_jsx(Flex, { align: "center", justify: "center", boxSize: thumbHeight, bg: theme.colors.gray[100], borderRadius: "lg", children: _jsx(Eye, { size: 18 }) })), _jsx(Flex, { position: "absolute", inset: 0, align: "center", justify: "center", bg: blackScrim(theme.colors.black, 0.5), color: theme.colors.white, opacity: 0, transition: "opacity 0.15s ease", _groupHover: { opacity: 1 }, children: _jsx(Eye, { size: 18 }) })] }), _jsx(FilePreview, { isOpen: isOpen, onClose: onClose, fileUrl: fileUrl, fileName: fileName, fileType: fileType, hideDownload: hideDownload })] }));
81
+ return (_jsxs(_Fragment, { children: [_jsxs(Box, { as: "button", type: "button", "aria-label": `Preview ${fileName || "file"}`, "data-group": true, position: "relative", display: "inline-flex", alignItems: "center", justifyContent: "center", maxW: thumbWidth, minW: "40px", minH: thumbHeight, borderRadius: "lg", overflow: "hidden", cursor: "pointer", _focusVisible: focusVisibleRing(theme.colors), onClick: onOpen, children: [kind === "image" ? (_jsx(Image, { src: fileUrl, alt: fileName || "file", maxH: thumbHeight, maxW: thumbWidth, objectFit: "contain", borderRadius: "lg" })) : (_jsx(Flex, { as: "span", align: "center", justify: "center", boxSize: thumbHeight, bg: theme.colors.gray[100], borderRadius: "lg", children: _jsx(Eye, { size: 18 }) })), _jsx(Flex, { as: "span", position: "absolute", inset: 0, align: "center", justify: "center", bg: blackScrim(theme.colors.black, 0.5), color: theme.colors.white, opacity: 0, transition: OPACITY_TRANSITION, _groupHover: { opacity: 1 }, _groupFocusVisible: { opacity: 1 }, children: _jsx(Eye, { size: 18 }) })] }), _jsx(FilePreview, { isOpen: isOpen, onClose: onClose, fileUrl: fileUrl, fileName: fileName, fileType: fileType, hideDownload: hideDownload })] }));
78
82
  };
79
83
  export default FilePreview;
@@ -14,6 +14,8 @@ import { useFieldIds } from "../Common/useFieldIds.js";
14
14
  import { FIELD_RADIUS, FIELD_TRANSITION } from "../Common/fieldStyles.js";
15
15
  import { focusVisibleRing, focusVisibleStyles } from "../../Theme/chakra/focusRing.styles.js";
16
16
  import { BORDER_WIDTHS } from "../../Theme/tokens/primitives/borderWidths.js";
17
+ import { onActivationKey } from "../Common/activationKey.js";
18
+ const DROP_PROMPT = "Drag and drop files here";
17
19
  const FileThumbnail = ({ file, radius, onPreview, }) => {
18
20
  const url = useObjectUrl(file);
19
21
  const { colors } = useCustomTheme();
@@ -23,12 +25,7 @@ const FileThumbnail = ({ file, radius, onPreview, }) => {
23
25
  opacity: 1,
24
26
  bg: "blackAlpha.500",
25
27
  },
26
- }, onClick: preview, onKeyDown: (event) => {
27
- if (event.key !== "Enter" && event.key !== " ")
28
- return;
29
- event.preventDefault();
30
- preview();
31
- }, children: [_jsx("img", { src: url, alt: file.name, style: {
28
+ }, onClick: preview, onKeyDown: onActivationKey(() => preview()), children: [_jsx("img", { src: url, alt: file.name, style: {
32
29
  width: "100%",
33
30
  height: "100%",
34
31
  objectFit: "cover",
@@ -45,6 +42,8 @@ const FileUpload = ({ onFilesUploaded, uploadedFiles, onRemoveFile, acceptTypes
45
42
  const [previewTitle, setPreviewTitle] = React.useState(null);
46
43
  const [errors, setErrors] = React.useState([]);
47
44
  const border = error ? colors.semanticText.error : colors.boxborder[500];
45
+ const limitParts = [acceptTypes.join(", "), " up to ", toMB(maxSizeKB), " ", maxFiles ? `- ${maxFiles} file(s) max` : ""];
46
+ const limits = limitParts.join("").trim();
48
47
  const mappedAccept = acceptTypes.reduce((acc, ext) => {
49
48
  const mime = mimeMap[ext];
50
49
  if (mime) {
@@ -86,10 +85,10 @@ const FileUpload = ({ onFilesUploaded, uploadedFiles, onRemoveFile, acceptTypes
86
85
  });
87
86
  return (_jsxs(_Fragment, { children: [_jsxs(VStack, { spacing: 4, align: "stretch", children: [_jsxs(Box, { children: [label && (_jsx(TextLabel, { label: label, id: ids.inputId, isRequired: isRequired })), _jsx(Box, { ...getRootProps({
88
87
  role: "button",
89
- "aria-label": label !== null && label !== void 0 ? label : inputAriaLabel,
88
+ "aria-label": `${label !== null && label !== void 0 ? label : inputAriaLabel}, ${DROP_PROMPT} ${limits}`,
90
89
  "aria-describedby": ids.describedBy,
91
90
  "aria-disabled": isDisabled || undefined,
92
- }), border: "1px dashed", borderColor: border, borderRadius: FIELD_RADIUS, p: compact ? 3 : 10, textAlign: "center", bg: isDisabled ? colors.background[100] : colors.background[50], color: isDisabled ? colors.textMuted : undefined, cursor: isDisabled ? "not-allowed" : "pointer", transition: FIELD_TRANSITION, _hover: isDisabled ? undefined : { bg: colors.background[100] }, sx: focusVisibleStyles(colors), position: "relative", children: _jsxs(Stack, { direction: compact ? "row" : "column", spacing: compact ? 3 : 2, align: "center", justify: "center", children: [_jsx(Icon, { as: Upload, boxSize: compact ? 4 : 6 }), _jsxs(Stack, { spacing: 0, align: compact ? "start" : "center", children: [_jsx(Text, { fontWeight: 500, fontSize: compact ? "sm" : "md", color: colors.textMuted, children: "Drag and drop files here" }), _jsxs(Text, { fontSize: compact ? "xs" : "sm", color: colors.textMuted, children: [acceptTypes.join(", "), " up to ", toMB(maxSizeKB), " ", maxFiles ? `- ${maxFiles} file(s) max` : ""] })] })] }) }), _jsx("input", { ...getInputProps({
91
+ }), border: "1px dashed", borderColor: border, borderRadius: FIELD_RADIUS, p: compact ? 3 : 10, textAlign: "center", bg: isDisabled ? colors.background[100] : colors.background[50], color: isDisabled ? colors.textMuted : undefined, cursor: isDisabled ? "not-allowed" : "pointer", transition: FIELD_TRANSITION, _hover: isDisabled ? undefined : { bg: colors.background[100] }, sx: focusVisibleStyles(colors), position: "relative", children: _jsxs(Stack, { direction: compact ? "row" : "column", spacing: compact ? 3 : 2, align: "center", justify: "center", children: [_jsx(Icon, { as: Upload, boxSize: compact ? 4 : 6 }), _jsxs(Stack, { spacing: 0, align: compact ? "start" : "center", children: [_jsx(Text, { fontWeight: 500, fontSize: compact ? "sm" : "md", color: colors.textMuted, children: DROP_PROMPT }), _jsx(Text, { fontSize: compact ? "xs" : "sm", color: colors.textMuted, children: limitParts })] })] }) }), _jsx("input", { ...getInputProps({
93
92
  id: ids.inputId,
94
93
  disabled: isDisabled,
95
94
  "aria-label": label ? undefined : inputAriaLabel,
@@ -98,7 +97,7 @@ const FileUpload = ({ onFilesUploaded, uploadedFiles, onRemoveFile, acceptTypes
98
97
  setPreviewUrl(url);
99
98
  setPreviewTitle(file.name);
100
99
  onOpen();
101
- } })) : (_jsx(ListIcon, { as: FileText, color: accentTextOnCanvas(colors.blue, colors.background[50]), boxSize: 8 })), _jsxs(VStack, { align: "start", spacing: 0, flex: "1", children: [_jsx(Text, { fontSize: "sm", noOfLines: 1, children: file.name }), _jsxs(Text, { fontSize: "xs", color: colors.textMuted, children: [toMB(file.size / 1024), " \u2022", " ", file.type || "Unknown type"] })] })] }), onRemoveFile && (_jsx(CloseButton, { onClick: () => onRemoveFile(file), size: "sm", color: colors.semanticText.error }))] }), (progress === null || progress === void 0 ? void 0 : progress[file.name]) !== undefined && (_jsx(Progress, { value: progress === null || progress === void 0 ? void 0 : progress[file.name], size: "xs", mt: 1, hasStripe: (progress === null || progress === void 0 ? void 0 : progress[file.name]) < 100, isAnimated: (progress === null || progress === void 0 ? void 0 : progress[file.name]) < 100, colorScheme: (progress === null || progress === void 0 ? void 0 : progress[file.name]) >= 100 ? "green" : "blue", borderRadius: "md" }))] }, index))) })] }))] }), _jsxs(Modal, { isOpen: isOpen, onClose: () => {
100
+ } })) : (_jsx(ListIcon, { as: FileText, color: accentTextOnCanvas(colors.blue, colors.background[50]), boxSize: 8 })), _jsxs(VStack, { align: "start", spacing: 0, flex: "1", children: [_jsx(Text, { fontSize: "sm", noOfLines: 1, children: file.name }), _jsxs(Text, { fontSize: "xs", color: colors.textMuted, children: [toMB(file.size / 1024), " \u2022", " ", file.type || "Unknown type"] })] })] }), onRemoveFile && (_jsx(CloseButton, { onClick: () => onRemoveFile(file), size: "sm", color: colors.semanticText.error }))] }), (progress === null || progress === void 0 ? void 0 : progress[file.name]) !== undefined && (_jsx(Progress, { "aria-label": `Upload progress for ${file.name}`, value: progress === null || progress === void 0 ? void 0 : progress[file.name], size: "xs", mt: 1, hasStripe: (progress === null || progress === void 0 ? void 0 : progress[file.name]) < 100, isAnimated: (progress === null || progress === void 0 ? void 0 : progress[file.name]) < 100, colorScheme: (progress === null || progress === void 0 ? void 0 : progress[file.name]) >= 100 ? "green" : "blue", borderRadius: "md" }))] }, index))) })] }))] }), _jsxs(Modal, { isOpen: isOpen, onClose: () => {
102
101
  onClose();
103
102
  setPreviewUrl(null);
104
103
  setPreviewTitle(null);
@@ -1,5 +1,5 @@
1
1
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
- import { useState, useRef } from "react";
2
+ import { useState, useRef, useEffect } from "react";
3
3
  import { Box, Text, Grid, Flex, HStack, Image, IconButton, Tooltip, } from "@chakra-ui/react";
4
4
  import { X } from "lucide-react";
5
5
  import { useToaster } from "../Toaster/Toaster.js";
@@ -8,6 +8,7 @@ import { accentTextOnCanvas } from "../../Theme/tokens/builders/accentText.js";
8
8
  import { FIELD_RADIUS } from "../Common/fieldStyles.js";
9
9
  import { transitionFor } from "../../Theme/tokens/primitives/motion.js";
10
10
  import { focusVisibleRing } from "../../Theme/chakra/focusRing.styles.js";
11
+ import { onActivationKey } from "../Common/activationKey.js";
11
12
  const revokePreviews = (files) => files.forEach((f) => f.previewUrl && URL.revokeObjectURL(f.previewUrl));
12
13
  /** Self-contained widget; onFilesChange returns {id,name,size,previewUrl} metadata, never real File objects — cannot be used to upload bytes. */
13
14
  const FileUploader = ({ maxFiles = 10, maxTotalSize = 20, onFilesChange, acceptTypes = ["jpeg", "jpg", "png"], }) => {
@@ -17,6 +18,9 @@ const FileUploader = ({ maxFiles = 10, maxTotalSize = 20, onFilesChange, acceptT
17
18
  const [uploadedFiles, setUploadedFiles] = useState([]);
18
19
  const [isDragOver, setIsDragOver] = useState(false);
19
20
  const fileInputRef = useRef(null);
21
+ const filesRef = useRef(uploadedFiles);
22
+ filesRef.current = uploadedFiles;
23
+ useEffect(() => () => revokePreviews(filesRef.current), []);
20
24
  const totalSize = uploadedFiles.reduce((acc, f) => acc + f.size, 0);
21
25
  const maxTotalBytes = maxTotalSize * 1024 * 1024;
22
26
  const formatFileSize = (bytes) => {
@@ -79,11 +83,6 @@ const FileUploader = ({ maxFiles = 10, maxTotalSize = 20, onFilesChange, acceptT
79
83
  return (_jsxs(Box, { maxW: "500px", mx: "auto", p: 6, children: [_jsxs(Text, { fontSize: "sm", color: colors.textMuted, mb: 4, children: ["Files Uploaded:", " ", _jsxs(Text, { as: "span", fontWeight: 500, color: accentColor, children: [uploadedFiles.length, " / ", maxFiles] }), " ", "| Total size:", " ", _jsxs(Text, { as: "span", fontWeight: 500, children: [formatFileSize(totalSize), " / ", maxTotalSize, " MB"] })] }), _jsxs(Box, { "data-testid": "file-uploader-dropzone", border: "1px dashed", borderColor: isDragOver ? colors.primary[500] : colors.boxborder[500], bg: isDragOver ? colors.backgroundColor.muted : undefined, borderRadius: FIELD_RADIUS, transition: transitionFor(["border-color", "background-color"]), p: 1, mt: 1, mb: 1, children: [uploadedFiles.length > 0 && (_jsx(Box, { children: _jsx(Grid, { templateColumns: "repeat(2, 1fr)", gap: 3, children: uploadedFiles.map((file) => {
80
84
  var _a;
81
85
  return (_jsxs(Flex, { align: "center", justify: "space-between", border: "1px solid", borderColor: colors.boxborder[500], borderRadius: "md", pl: 1, bg: colors.backgroundColor.secondary, children: [_jsxs(HStack, { spacing: 3, flex: "1", minW: "0", children: [file.previewUrl ? (_jsx(Image, { src: file.previewUrl, alt: file.name, boxSize: "28px", borderRadius: "sm", objectFit: "cover" })) : (_jsx(Box, { boxSize: "28px", borderRadius: "sm", bg: colors.backgroundColor.muted, display: "flex", alignItems: "center", justifyContent: "center", fontSize: "xs", color: colors.textMuted, children: (_a = file.name.split(".").pop()) === null || _a === void 0 ? void 0 : _a.toUpperCase() })), _jsxs(Box, { minW: "0", children: [_jsx(Text, { fontSize: "sm", fontWeight: 500, noOfLines: 1, children: file.name }), _jsxs(Text, { fontSize: "xs", color: colors.textMuted, children: ["(", formatFileSize(file.size), ")"] })] })] }), _jsx(HStack, { spacing: 1, children: _jsx(Tooltip, { label: "Remove", children: _jsx(IconButton, { "aria-label": "Remove", icon: _jsx(X, { size: 14 }), size: "xs", variant: "ghost", colorScheme: "red", onClick: () => removeFile(file.id) }) }) })] }, file.id));
82
- }) }) })), _jsx("input", { ref: fileInputRef, type: "file", multiple: true, accept: acceptString, onChange: handleFileInput, style: { display: "none" } }), _jsxs(Box, { "data-testid": "file-uploader-drop-target", p: uploadedFiles.length ? 0 : 5, mb: 2, textAlign: uploadedFiles.length ? "left" : "center", pt: uploadedFiles.length ? 5 : 5, onDrop: handleDrop, onDragOver: handleDragOver, onDragLeave: handleDragLeave, cursor: "pointer", role: "button", tabIndex: 0, _focusVisible: focusVisibleRing(colors), onClick: handleBrowseClick, onKeyDown: (e) => {
83
- if (e.key !== "Enter" && e.key !== " ")
84
- return;
85
- e.preventDefault();
86
- handleBrowseClick();
87
- }, children: [_jsx(Box, { children: _jsxs(Text, { fontWeight: 500, fontSize: "md", children: ["Drag and drop the files here, or", _jsx(Box, { as: "span", color: accentColor, ml: 1, children: "Click here" })] }) }), _jsxs(Text, { fontSize: "xs", color: colors.textMuted, children: ["Supported formats: ", acceptTypes.map((t) => t.toUpperCase()).join(", "), "."] })] })] })] }));
86
+ }) }) })), _jsx("input", { ref: fileInputRef, type: "file", multiple: true, accept: acceptString, onChange: handleFileInput, style: { display: "none" } }), _jsxs(Box, { "data-testid": "file-uploader-drop-target", p: uploadedFiles.length ? 0 : 5, mb: 2, textAlign: uploadedFiles.length ? "left" : "center", pt: uploadedFiles.length ? 5 : 5, onDrop: handleDrop, onDragOver: handleDragOver, onDragLeave: handleDragLeave, cursor: "pointer", role: "button", tabIndex: 0, _focusVisible: focusVisibleRing(colors), onClick: handleBrowseClick, onKeyDown: onActivationKey(() => handleBrowseClick()), children: [_jsx(Box, { children: _jsxs(Text, { fontWeight: 500, fontSize: "md", children: ["Drag and drop the files here, or", _jsx(Box, { as: "span", color: accentColor, ml: 1, children: "Click here" })] }) }), _jsxs(Text, { fontSize: "xs", color: colors.textMuted, children: ["Supported formats: ", acceptTypes.map((t) => t.toUpperCase()).join(", "), "."] })] })] })] }));
88
87
  };
89
88
  export default FileUploader;
@@ -1,256 +1,113 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useMemo, useState } from "react";
3
- import { Box, Flex, Text, VStack, HStack, Badge, Input, Radio, RadioGroup, Button, SimpleGrid, Popover, PopoverTrigger, PopoverContent, PopoverBody, Portal } from "@chakra-ui/react";
4
- import { Star, X, Check, ChevronDownIcon } from "lucide-react";
3
+ import { Box, Flex, Text, VStack, Button } from "@chakra-ui/react";
4
+ import { X } from "lucide-react";
5
5
  import Accordion from "../Accordion/Accordion.js";
6
- import CheckBox from "../Checkbox/Checkbox.js";
7
- import ToolTip from "../ToolTip/ToolTip.js";
8
6
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
9
- import { accentTextOnCanvas, onFilled } from "../../Theme/tokens/builders/accentText.js";
10
- import { bandOn } from "../../Theme/tokens/builders/planeStep.js";
7
+ import { cardRule } from "../../Theme/tokens/builders/planeStep.js";
11
8
  import { getFilterHoverBg } from "./filterHoverStyle.js";
12
- import { fieldFocusVisible } from "../../Theme/chakra/focusRing.styles.js";
13
- const FilterSidebar = ({ sidebarOptions, selected, onChange, maxVisible = 10, width = 280, variant = "minimal", containerPadding, containerHeight,
14
- // headerPadding = 2,
15
- panelPadding = 3, clearAllButton = true, onClearAllHandler,
16
- // sliderMode = "native",
17
- }) => {
9
+ import RangeSection from "./RangeSection.js";
10
+ import OptionsSection from "./OptionsSection.js";
11
+ import { SectionHeader, SectionClear } from "./SectionHeader.js";
12
+ import { useStableCallback } from "./useStableCallback.js";
13
+ const CLEAR_RIGHT = "2.25rem";
14
+ const FilterSidebar = ({ sidebarOptions, selected, onChange, maxVisible = 10, width = 280, variant = "minimal", containerPadding, containerHeight, panelPadding = 3, clearAllButton = true, onClearAllHandler, }) => {
18
15
  const theme = useCustomTheme();
19
16
  const hoverBg = useMemo(() => getFilterHoverBg(theme.colors), [theme.colors]);
20
- const rangePick = useMemo(() => bandOn(theme.colors.primary[50], theme.colors.surfaceRaised), [theme.colors]);
21
- const ratingPick = useMemo(() => bandOn(theme.colors.primary[50], theme.colors.background[50]), [theme.colors]);
22
- const [openPrice, setOpenPrice] = useState({});
23
- // Determine if the component is controlled (prop provided) or uncontrolled (internal state)
17
+ const rule = useMemo(() => cardRule(theme.colors), [theme.colors]);
24
18
  const isControlled = selected !== undefined;
25
- // Local state for uncontrolled mode
26
19
  const [localSelected, setLocalSelected] = useState(() => ({ ...(selected || {}) }));
27
- // Derived state: use prop if controlled, otherwise local state
28
- const internalSelected = (selected !== undefined ? selected : localSelected);
29
- // Wrapper for state updates to handle both modes
30
- const setInternalSelected = (updater) => {
31
- const next = typeof updater === 'function' ? (updater)(internalSelected) : updater;
32
- // In the existing code, the updater function often handles calling onChange.
33
- // However, for safety in uncontrolled mode, we update local state.
34
- if (!isControlled) {
35
- setLocalSelected(next);
36
- }
37
- };
20
+ const internalSelected = selected !== undefined ? selected : localSelected;
38
21
  const [expanded, setExpanded] = useState(() => {
39
22
  const initial = {};
40
23
  sidebarOptions.forEach((s) => (initial[s.id] = !!s.initiallyExpanded));
41
24
  return initial;
42
25
  });
43
26
  const [searchTerms, setSearchTerms] = useState({});
44
- const activeCount = useMemo(() => {
45
- return Object.values(internalSelected).reduce((acc, v) => acc + (Array.isArray(v) ? v.length : 0), 0);
46
- }, [internalSelected]);
47
- const toggleOption = (sectionId, optionId, checked) => {
48
- setInternalSelected((prev) => {
49
- const raw = prev[sectionId];
50
- const current = new Set(Array.isArray(raw) ? raw : []);
51
- if (checked)
52
- current.add(optionId);
53
- else
54
- current.delete(optionId);
55
- const next = { ...prev, [sectionId]: Array.from(current) };
56
- onChange === null || onChange === void 0 ? void 0 : onChange(next);
57
- return next;
58
- });
59
- };
60
- const clearFilter = (sectionId, optionId) => {
61
- setInternalSelected((prev) => {
62
- const next = { ...prev };
63
- if (optionId) {
64
- const list = (next[sectionId] || []);
65
- next[sectionId] = list.filter((id) => id !== optionId);
66
- }
67
- else {
68
- delete next[sectionId];
69
- }
70
- onChange === null || onChange === void 0 ? void 0 : onChange(next);
71
- return next;
72
- });
73
- };
27
+ const activeCount = useMemo(() => Object.values(internalSelected).reduce((acc, v) => acc + (Array.isArray(v) ? v.length : 0), 0), [internalSelected]);
28
+ const commit = useStableCallback((next) => {
29
+ if (!isControlled)
30
+ setLocalSelected(next);
31
+ onChange === null || onChange === void 0 ? void 0 : onChange(next);
32
+ });
33
+ const setValue = useStableCallback((sectionId, value) => {
34
+ commit({ ...internalSelected, [sectionId]: value });
35
+ });
36
+ const toggleOption = useStableCallback((sectionId, optionId, checked) => {
37
+ const raw = internalSelected[sectionId];
38
+ const current = new Set(Array.isArray(raw) ? raw : []);
39
+ if (checked)
40
+ current.add(optionId);
41
+ else
42
+ current.delete(optionId);
43
+ setValue(sectionId, Array.from(current));
44
+ });
45
+ const clearSection = useStableCallback((sectionId, control) => {
46
+ var _a, _b;
47
+ (_b = (_a = control.closest("h2")) === null || _a === void 0 ? void 0 : _a.querySelector("button")) === null || _b === void 0 ? void 0 : _b.focus();
48
+ const next = { ...internalSelected };
49
+ delete next[sectionId];
50
+ commit(next);
51
+ });
74
52
  const clearAll = () => {
75
53
  onClearAllHandler === null || onClearAllHandler === void 0 ? void 0 : onClearAllHandler();
76
- setInternalSelected(() => {
77
- const next = {};
78
- onChange === null || onChange === void 0 ? void 0 : onChange(next);
79
- return next;
80
- });
54
+ commit({});
81
55
  };
82
- const items = sidebarOptions.map((section) => ({
83
- header: (_jsxs(Flex, { justify: "space-between", align: "center", w: "full", py: 1, children: [_jsx(ToolTip, { label: section.label, hasArrow: true, placement: "top", fontSize: "xs", children: _jsx(Text, { fontWeight: 700, fontSize: "md", color: theme.colors.text[500], textAlign: "left", isTruncated: true, flex: "1", minW: 0, children: section.label }) }), (() => {
84
- const sel = internalSelected[section.id];
85
- const hasValue = Array.isArray(sel) ? sel.length > 0 : !!sel;
86
- return hasValue;
87
- })() ? (_jsx(Badge, { colorScheme: "red", variant: "solid", fontSize: "xs", cursor: "pointer", onClick: (e) => {
88
- e.stopPropagation();
89
- clearFilter(section.id);
90
- }, borderRadius: "full", px: 2, children: "Clear" })) : _jsx(ChevronDownIcon, { size: 10 })] })),
91
- content: (_jsx(VStack, { align: "start", spacing: 1, py: 0, children: section.range ? ((() => {
92
- var _a, _b;
93
- const range = section.range;
94
- const step = range.step || 1;
95
- const rangeVal = internalSelected[section.id];
96
- const rangeArr = Array.isArray(rangeVal) ? rangeVal : [];
97
- const currentMin = (_a = rangeArr[0]) !== null && _a !== void 0 ? _a : range.min;
98
- const currentMax = (_b = rangeArr[1]) !== null && _b !== void 0 ? _b : range.max;
99
- const values = range.values || Array.from({ length: Math.floor((range.max - range.min) / (step || 1)) + 1 }, (_, i) => range.min + i * (step || 1));
100
- // Calculate percentages
101
- const minPercent = ((currentMin - range.min) / (range.max - range.min)) * 100;
102
- const maxPercent = ((currentMax - range.min) / (range.max - range.min)) * 100;
103
- const primaryColor = theme.colors.primary[300];
104
- const secondaryColor = theme.colors.primary[600];
105
- const primaryGlowColor = theme.colors.primary.opacity[32];
106
- const thumbShadow = theme.shadows.md;
107
- return (_jsxs(Box, { w: "full", px: 3, children: [_jsx("style", { children: `
108
- .custom-range-slider::-webkit-slider-thumb {
109
- pointer-events: auto;
110
- width: 24px;
111
- height: 24px;
112
- -webkit-appearance: none;
113
- cursor: pointer;
114
- }
115
- .custom-range-slider::-moz-range-thumb {
116
- pointer-events: auto;
117
- width: 24px;
118
- height: 24px;
119
- border: none;
120
- cursor: pointer;
121
- }
122
- ` }), _jsxs(Box, { w: "full", position: "relative", h: { base: "24px", md: "30px" }, display: "flex", alignItems: "center", children: [_jsx(Box, { position: "absolute", left: "0", right: "0", height: "6px", bg: theme.colors.boxborder[200], borderRadius: "full" }), _jsx(Box, { position: "absolute", height: "6px", style: {
123
- left: `${minPercent}%`,
124
- width: `${maxPercent - minPercent}%`,
125
- background: `linear-gradient(to right, ${primaryColor}, ${secondaryColor})`,
126
- }, borderRadius: "full", boxShadow: `0 0 8px ${primaryGlowColor}` }), _jsx(Box, { position: "absolute", style: { left: `${minPercent}%` }, transform: "translate(-50%, 0)", w: { base: "16px", md: "20px" }, h: { base: "16px", md: "20px" }, borderRadius: "full", bg: theme.colors.background[50], border: "3px solid", borderColor: primaryColor, boxShadow: thumbShadow, zIndex: 2 }), _jsx(Box, { position: "absolute", style: { left: `${maxPercent}%` }, transform: "translate(-50%, 0)", w: { base: "16px", md: "20px" }, h: { base: "16px", md: "20px" }, borderRadius: "full", bg: theme.colors.background[50], border: "3px solid", borderColor: secondaryColor, boxShadow: thumbShadow, zIndex: 2 }), _jsxs(Box, { position: "absolute", style: { left: `${minPercent}%` }, top: { base: "-18px", md: "-22px" }, transform: "translate(-50%, -100%)", px: 2, py: 1, bg: theme.colors.background[50], border: `1px solid ${theme.colors.boxborder[200]}`, borderRadius: "lg", fontSize: "xs-minus", color: theme.colors.text[500], boxShadow: "sm", zIndex: 3, children: [currentMin, range.unit ? ` ${range.unit}` : ""] }), _jsxs(Box, { position: "absolute", style: { left: `${maxPercent}%` }, top: { base: "-18px", md: "-22px" }, transform: "translate(-50%, -100%)", px: 2, py: 1, bg: theme.colors.background[50], border: `1px solid ${theme.colors.boxborder[200]}`, borderRadius: "lg", fontSize: "xs-minus", color: theme.colors.text[500], boxShadow: "sm", zIndex: 3, children: [currentMax, range.unit ? ` ${range.unit}` : ""] }), [0, 25, 50, 75, 100].map((p) => (_jsx(Box, { position: "absolute", left: `${p}%`, bottom: "-8px", transform: "translateX(-50%)", w: "1px", h: "8px", bg: theme.colors.boxborder[500] }, `tick-${p}`))), _jsx("input", { type: "range", "aria-label": `${section.label}: minimum`, min: range.min, max: range.max, step: step, value: currentMin, className: "custom-range-slider", onChange: (e) => {
127
- const min = Math.min(Number(e.target.value), currentMax - (step || 1));
128
- const nextVal = [min, currentMax];
129
- setInternalSelected((prev) => { const next = { ...prev, [section.id]: nextVal }; onChange === null || onChange === void 0 ? void 0 : onChange(next); return next; });
130
- }, style: {
131
- position: 'absolute',
132
- width: '100%',
133
- height: '100%',
134
- opacity: 0,
135
- appearance: 'none',
136
- pointerEvents: 'none', // Allow clicks to pass through track
137
- zIndex: 3,
138
- margin: 0,
139
- } }), _jsx("input", { type: "range", "aria-label": `${section.label}: maximum`, min: range.min, max: range.max, step: step, value: currentMax, className: "custom-range-slider", onChange: (e) => {
140
- const max = Math.max(Number(e.target.value), currentMin + (step || 1));
141
- const nextVal = [currentMin, max];
142
- setInternalSelected((prev) => { const next = { ...prev, [section.id]: nextVal }; onChange === null || onChange === void 0 ? void 0 : onChange(next); return next; });
143
- }, style: {
144
- position: 'absolute',
145
- width: '100%',
146
- height: '100%',
147
- opacity: 0,
148
- appearance: 'none',
149
- pointerEvents: 'none', // Allow clicks to pass through track
150
- zIndex: 3,
151
- margin: 0,
152
- } })] }), _jsxs(SimpleGrid, { columns: 2, spacing: 2, pt: 2, w: "full", children: [_jsxs(Popover, { isOpen: openPrice.id === section.id && openPrice.target === "min", onClose: () => setOpenPrice({}), placement: "bottom-start", closeOnBlur: true, children: [_jsx(PopoverTrigger, { children: _jsx(Flex, { borderWidth: "0", borderRadius: "md", alignItems: "center", px: 3, py: 2, bg: theme.colors.background[50], borderColor: theme.colors.boxborder[500], cursor: "pointer", "data-testid": `range-trigger-min-${section.id}`, onClick: () => setOpenPrice({ id: section.id, target: "min" }), gap: 2, overflow: "hidden", children: _jsx(Box, { ml: "auto", children: _jsxs(Text, { fontSize: "xs", color: theme.colors.text[500], whiteSpace: "nowrap", children: [currentMin, range.unit ? ` ${range.unit}` : ""] }) }) }) }), _jsx(Portal, { children: _jsx(PopoverContent, { width: "6rem", p: 0, zIndex: 1600, bg: theme.colors.surfaceRaised, children: _jsx(PopoverBody, { p: 0, children: _jsx(VStack, { align: "stretch", spacing: 0, maxH: "12rem", overflowY: "auto", children: values.map((v) => (_jsxs(Flex, { px: 2, py: 1, align: "center", justify: "space-between", cursor: "pointer", bg: currentMin === v ? rangePick : theme.colors.surfaceRaised, borderLeftWidth: currentMin === v ? 3 : 0, borderLeftStyle: "solid", borderLeftColor: currentMin === v ? theme.colors.primary[400] : "transparent", _hover: { bg: hoverBg }, "data-testid": `range-option-min-${section.id}-${v}`, onClick: () => {
153
- const min = v;
154
- const max = currentMax;
155
- const nextVal = [Math.min(min, max), Math.max(min, max)];
156
- setInternalSelected((prev) => { const next = { ...prev, [section.id]: nextVal }; onChange === null || onChange === void 0 ? void 0 : onChange(next); return next; });
157
- setOpenPrice({});
158
- }, children: [_jsxs(Text, { fontSize: "sm", color: theme.colors.text[500], children: [v, range.unit ? ` ${range.unit}` : ""] }), currentMin === v ? (_jsx(Box, { bg: theme.colors.primary[100], borderRadius: "full", p: 1, display: "flex", alignItems: "center", children: _jsx(Check, { size: 9, color: onFilled(theme.colors.primary[100], theme.colors.white, theme.colors.black) }) })) : null] }, `min-${v}`))) }) }) }) })] }), _jsxs(Popover, { isOpen: openPrice.id === section.id && openPrice.target === "max", onClose: () => setOpenPrice({}), placement: "bottom-start", closeOnBlur: true, children: [_jsx(PopoverTrigger, { children: _jsx(Flex, { borderWidth: "0", borderRadius: "md", alignItems: "center", px: 3, py: 2, bg: theme.colors.background[50], borderColor: theme.colors.boxborder[500], cursor: "pointer", "data-testid": `range-trigger-max-${section.id}`, onClick: () => setOpenPrice({ id: section.id, target: "max" }), gap: 2, overflow: "hidden", children: _jsx(Box, { ml: "auto", children: _jsxs(Text, { fontSize: "xs", color: theme.colors.text[500], whiteSpace: "nowrap", children: [currentMax, range.unit ? ` ${range.unit}` : ""] }) }) }) }), _jsx(PopoverContent, { width: "6rem", p: 0, bg: theme.colors.surfaceRaised, children: _jsx(PopoverBody, { p: 0, children: _jsx(VStack, { align: "stretch", spacing: 0, maxH: "12rem", overflowY: "auto", children: values.map((v) => (_jsxs(Flex, { px: 2, py: 1, align: "center", justify: "space-between", cursor: "pointer", bg: currentMax === v ? rangePick : theme.colors.surfaceRaised, borderLeftWidth: currentMax === v ? 3 : 0, borderLeftStyle: "solid", borderLeftColor: currentMax === v ? theme.colors.primary[400] : "transparent", _hover: { bg: hoverBg }, "data-testid": `range-option-max-${section.id}-${v}`, onClick: () => {
159
- const max = v;
160
- const min = currentMin;
161
- const nextVal = [Math.min(min, max), Math.max(min, max)];
162
- setInternalSelected((prev) => { const next = { ...prev, [section.id]: nextVal }; onChange === null || onChange === void 0 ? void 0 : onChange(next); return next; });
163
- setOpenPrice({});
164
- }, children: [_jsxs(Text, { fontSize: "sm", color: theme.colors.text[500], children: [v, range.unit ? ` ${range.unit}` : ""] }), currentMax === v ? (_jsx(Box, { bg: theme.colors.primary[100], borderRadius: "full", p: 1, display: "flex", alignItems: "center", children: _jsx(Check, { size: 9, color: onFilled(theme.colors.primary[100], theme.colors.white, theme.colors.black) }) })) : null] }, `max-${v}`))) }) }) })] })] })] }));
165
- })()) : (_jsxs(_Fragment, { children: [section.id === "rating" ? (_jsx(VStack, { align: "start", spacing: 1, w: "full", children: [4, 3, 2, 1].map((r) => (_jsx(Flex, { align: "center", justify: "space-between", w: "full", p: 1, borderRadius: "md", cursor: "pointer", bg: String(internalSelected[section.id] || "") === String(r) ? ratingPick : "transparent", border: String(internalSelected[section.id] || "") === String(r) ? `1px solid ${theme.colors.primary[200]}` : "none", _hover: { bg: hoverBg }, onClick: () => {
166
- setInternalSelected((prev) => {
167
- const next = { ...prev, [section.id]: String(r) };
168
- onChange === null || onChange === void 0 ? void 0 : onChange(next);
169
- return next;
170
- });
171
- }, children: _jsxs(HStack, { spacing: 2, align: "center", children: [_jsx(HStack, { spacing: 1, children: (() => {
172
- // orange[500] on background[50] ~2.2:1, fails the 3:1 icon bar — walk the scale like
173
- // Notification's clock icon. Canvas mirrors this row's own bg ternary (red[50] when selected).
174
- const isRowSelected = String(internalSelected[section.id] || "") === String(r);
175
- const starColor = accentTextOnCanvas(theme.colors.orange, isRowSelected ? ratingPick : theme.colors.background[50]);
176
- return Array.from({ length: 5 }, (_, i) => (_jsx(Box, { children: _jsx(Star, { size: 16, color: starColor, fill: i < r ? starColor : "none" }) }, `star-${r}-${i}`)));
177
- })() }), _jsx(Text, { fontSize: "sm", color: theme.colors.text[500], children: "& Up" })] }) }, `rating-${r}`))) })) : null, section.searchable && (_jsx(Input, { size: "xs", h: "26px", fontSize: "xs", "aria-label": `Search ${section.label}`, placeholder: `Search ${section.label}...`, borderRadius: "md", bg: theme.colors.background[50], border: "1px solid",
178
- // NOTE: boxborder[500] not gray[200] — WCAG 1.4.11 needs >=3:1 for a control boundary; gray[200] fails in dark.
179
- borderColor: theme.colors.boxborder[500], _focus: { borderColor: theme.colors.primary[500], ...fieldFocusVisible(theme.colors) }, value: searchTerms[section.id] || "", onChange: (e) => {
180
- const v = e.target.value;
181
- setSearchTerms((prev) => ({ ...prev, [section.id]: v }));
182
- if (v)
183
- setExpanded((prev) => ({ ...prev, [section.id]: true }));
184
- } })), section.id !== "rating" && (() => {
185
- const filteredOptions = (expanded[section.id] ? (section.options || []) : (section.options || []).slice(0, maxVisible))
186
- .filter((opt) => !section.searchable || !(searchTerms[section.id]) || opt.label.toLowerCase().includes((searchTerms[section.id] || "").toLowerCase()));
187
- if (filteredOptions.length === 0 && searchTerms[section.id]) {
188
- return (_jsx(Box, { p: 2, w: "full", textAlign: "center", children: _jsx(Text, { fontSize: "xs", color: theme.colors.textMuted, children: "No Data Found" }) }));
189
- }
190
- return ((section.type === "radio") || section.radio) ? (_jsx(RadioGroup, { w: "full", value: internalSelected[section.id] || "", onChange: (val) => {
191
- setInternalSelected((prev) => {
192
- const next = { ...prev, [section.id]: val };
193
- onChange === null || onChange === void 0 ? void 0 : onChange(next);
194
- return next;
195
- });
196
- }, children: _jsx(VStack, { align: "start", spacing: 1, w: "full", children: filteredOptions.map((opt) => (_jsx(Radio, { value: opt.id, size: "sm", children: _jsx(Text, { fontSize: "xs", color: theme.colors.text[500], children: opt.label }) }, opt.id))) }) })) : (filteredOptions.map((opt) => {
197
- const selectedForSection = internalSelected[section.id];
198
- const selectedIds = Array.isArray(selectedForSection)
199
- ? selectedForSection
200
- : [];
201
- return (_jsxs(Flex, { align: "center", justify: "space-between", w: "full", _hover: { bg: hoverBg, borderRadius: "md" }, p: 0, children: [_jsxs(Flex, { align: "center", gap: 1, children: [_jsx(CheckBox, { "aria-label": `${section.label}: ${opt.label}`, isChecked: selectedIds.includes(opt.id), onChange: (e) => {
202
- toggleOption(section.id, opt.id, e.target.checked);
203
- }, size: "sm" }), _jsx(Text, { fontSize: "xs", color: theme.colors.text[500], cursor: "pointer", onClick: () => {
204
- const isChecked = selectedIds.includes(opt.id);
205
- toggleOption(section.id, opt.id, !isChecked);
206
- }, children: opt.label })] }), typeof opt.count === "number" && (_jsx(Badge, { fontSize: "xs", colorScheme: "gray", borderRadius: "full", px: 2, children: opt.count }))] }, opt.id));
207
- }));
208
- })(), (section.options && section.options.length > maxVisible) && (_jsx(Text, { as: "span", role: "button", tabIndex: 0, fontSize: "sm", fontWeight: 500, color: theme.colors.accentText, cursor: "pointer", _hover: { textDecoration: "underline" }, onClick: () => setExpanded((prev) => ({ ...prev, [section.id]: !prev[section.id] })), onKeyDown: (e) => {
209
- if (e.key === "Enter" || e.key === " ") {
210
- e.preventDefault();
211
- setExpanded((prev) => ({ ...prev, [section.id]: !prev[section.id] }));
212
- }
213
- }, children: expanded[section.id] ? "Show less" : `+ ${(section.options.length - maxVisible)} more` }))] })) })),
214
- itemProps: {
215
- borderTop: "none",
216
- borderBottom: `1px solid ${theme.colors.boxborder[200]}`,
217
- _last: { borderBottom: "none" }
218
- },
219
- buttonProps: {
220
- _hover: { bg: hoverBg }
221
- },
222
- panelProps: {},
223
- customStyles: {
224
- buttonStyle: variant === "minimal"
225
- ? {
226
- justifyContent: "space-between",
227
- padding: 0,
228
- background: "transparent",
229
- }
230
- : {
231
- justifyContent: "space-between",
232
- padding: 0,
233
- background: theme.colors.background[50],
234
- borderRadius: theme.radii.lg,
235
- border: `1px solid ${theme.colors.boxborder[200]}`,
236
- marginBottom: 6,
237
- },
238
- // Reasserts the same hover fill via the `sx` path (belt-and-suspenders alongside
239
- // `buttonProps._hover` above) so the header hover doesn't depend on a single merge path.
240
- hoverbuttonStyle: { background: hoverBg },
241
- panelStyle: variant === "minimal"
242
- ? {
243
- padding: "10px 0 12px 0",
244
- overflow: "visible",
245
- }
246
- : {
247
- padding: panelPadding,
248
- background: theme.colors.background[50],
249
- borderRadius: theme.radii.lg,
250
- overflow: "visible",
251
- },
252
- },
253
- }));
254
- return (_jsxs(Box, { w: width, bg: theme.colors.background[50], p: containerPadding !== undefined ? containerPadding : (variant === "minimal" ? 3 : 2), borderRadius: variant === "minimal" ? "lg" : "none", boxShadow: variant === "minimal" ? "sm" : "none", border: variant === "minimal" ? `1px solid ${theme.colors.boxborder[200]}` : "none", h: "fit-content", maxH: containerHeight !== undefined ? containerHeight : undefined, overflowY: containerHeight !== undefined ? "auto" : "visible", children: [_jsxs(Flex, { className: "filters-header", align: "center", justify: "space-between", mb: 2, borderBottom: "2px solid", borderColor: theme.colors.boxborder[200], children: [_jsx(Text, { fontSize: "lg", fontWeight: 700, color: theme.colors.text[500], children: "Filters" }), activeCount > 0 && clearAllButton && (_jsx(_Fragment, { children: _jsx(Button, { size: "xs", variant: "outline", leftIcon: _jsx(X, { size: 12 }), onClick: clearAll, "aria-label": "Clear All", className: "clear-all-btn", colorScheme: "red", children: "Clear All" }) }))] }), _jsx(Accordion, { allowMultiple: true, defaultIndex: sidebarOptions.map((_, i) => i), items: items })] }));
56
+ const setSearchTerm = useStableCallback((sectionId, term) => {
57
+ setSearchTerms((prev) => ({ ...prev, [sectionId]: term }));
58
+ if (term)
59
+ setExpanded((prev) => ({ ...prev, [sectionId]: true }));
60
+ });
61
+ const toggleExpanded = useStableCallback((sectionId) => {
62
+ setExpanded((prev) => ({ ...prev, [sectionId]: !prev[sectionId] }));
63
+ });
64
+ const items = sidebarOptions.map((section) => {
65
+ const sel = internalSelected[section.id];
66
+ const hasValue = Array.isArray(sel) ? sel.length > 0 : !!sel;
67
+ return {
68
+ header: (_jsx(SectionHeader, { label: section.label, hasValue: hasValue })),
69
+ headerAction: hasValue ? (_jsx(SectionClear, { sectionId: section.id, label: section.label, onClear: clearSection })) : undefined,
70
+ content: (_jsx(VStack, { align: "start", spacing: 1, py: 0, children: section.range ? (_jsx(RangeSection, { sectionId: section.id, label: section.label, range: section.range, value: sel, onChange: setValue })) : (_jsx(OptionsSection, { section: section, value: sel, searchTerm: searchTerms[section.id] || "", isExpanded: !!expanded[section.id], maxVisible: maxVisible, onToggle: toggleOption, onValue: setValue, onSearch: setSearchTerm, onToggleExpanded: toggleExpanded })) })),
71
+ itemProps: {
72
+ borderTop: "none",
73
+ borderBottom: `1px solid ${rule}`,
74
+ _last: { borderBottom: "none" },
75
+ },
76
+ buttonProps: {
77
+ _hover: { bg: hoverBg },
78
+ },
79
+ panelProps: {},
80
+ customStyles: {
81
+ buttonStyle: variant === "minimal"
82
+ ? {
83
+ justifyContent: "space-between",
84
+ padding: 0,
85
+ background: "transparent",
86
+ }
87
+ : {
88
+ justifyContent: "space-between",
89
+ padding: 0,
90
+ background: theme.colors.background[50],
91
+ borderRadius: theme.radii.lg,
92
+ border: `1px solid ${rule}`,
93
+ marginBottom: 6,
94
+ },
95
+ hoverbuttonStyle: { background: hoverBg },
96
+ headerActionStyle: { right: CLEAR_RIGHT },
97
+ panelStyle: variant === "minimal"
98
+ ? {
99
+ padding: "10px 0 12px 0",
100
+ overflow: "visible",
101
+ }
102
+ : {
103
+ padding: panelPadding,
104
+ background: theme.colors.background[50],
105
+ borderRadius: theme.radii.lg,
106
+ overflow: "visible",
107
+ },
108
+ },
109
+ };
110
+ });
111
+ return (_jsxs(Box, { w: width, bg: theme.colors.background[50], p: containerPadding !== undefined ? containerPadding : (variant === "minimal" ? 3 : 2), borderRadius: variant === "minimal" ? "lg" : "none", boxShadow: variant === "minimal" ? "sm" : "none", border: variant === "minimal" ? `1px solid ${theme.colors.boxborder[200]}` : "none", h: "fit-content", maxH: containerHeight !== undefined ? containerHeight : undefined, overflowY: containerHeight !== undefined ? "auto" : "visible", children: [_jsxs(Flex, { className: "filters-header", align: "center", justify: "space-between", mb: 2, borderBottom: "2px solid", borderColor: rule, children: [_jsx(Text, { fontSize: "lg", fontWeight: 700, color: theme.colors.text[500], children: "Filters" }), activeCount > 0 && clearAllButton && (_jsx(_Fragment, { children: _jsx(Button, { size: "xs", variant: "outline", leftIcon: _jsx(X, { size: 12 }), onClick: clearAll, "aria-label": "Clear All", className: "clear-all-btn", colorScheme: "red", children: "Clear All" }) }))] }), _jsx(Accordion, { allowMultiple: true, defaultIndex: sidebarOptions.map((_, i) => i), items: items })] }));
255
112
  };
256
113
  export default FilterSidebar;