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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (517) hide show
  1. package/CHANGELOG.md +520 -21
  2. package/COMPONENT-GOTCHAS.md +187 -95
  3. package/DESIGN-GUIDE.md +54 -10
  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 +4 -1
  56. package/dist/Components/CopyButton/CopyButton.js +5 -8
  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 +3 -1
  73. package/dist/Components/Drawer/Drawer.js +28 -26
  74. package/dist/Components/Drawer/DrawerProps.d.ts +4 -0
  75. package/dist/Components/Dropdown/DropDown.js +6 -21
  76. package/dist/Components/Editor/Editor.js +6 -2
  77. package/dist/Components/Editor/EditorProps.d.ts +17 -1
  78. package/dist/Components/Editor/editorLabels.js +1 -0
  79. package/dist/Components/Editor/editorTokenStyles.d.ts +8 -0
  80. package/dist/Components/Editor/editorTokenStyles.js +9 -1
  81. package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.d.ts +1 -1
  82. package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +9 -2
  83. package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtpProps.d.ts +15 -1
  84. package/dist/Components/EmptyState/EmptyStateProps.d.ts +21 -0
  85. package/dist/Components/EmptyState/FilteredEmptyState.d.ts +5 -0
  86. package/dist/Components/EmptyState/FilteredEmptyState.js +23 -0
  87. package/dist/Components/FieldSelectModal/FieldSelectModal.d.ts +1 -0
  88. package/dist/Components/FilePreview/FilePreview.js +7 -3
  89. package/dist/Components/FilePreview/FilePreviewProps.d.ts +2 -1
  90. package/dist/Components/FileUpload/FileUpload.js +8 -9
  91. package/dist/Components/FileUpload/FileUploadProps.d.ts +2 -2
  92. package/dist/Components/FileUploader/FileUploader.js +5 -6
  93. package/dist/Components/FilterSidebar/FilterSidebar.d.ts +7 -9
  94. package/dist/Components/FilterSidebar/FilterSidebar.js +90 -233
  95. package/dist/Components/FilterSidebar/OptionsSection.d.ts +14 -0
  96. package/dist/Components/FilterSidebar/OptionsSection.js +46 -0
  97. package/dist/Components/FilterSidebar/RangeSection.d.ts +17 -0
  98. package/dist/Components/FilterSidebar/RangeSection.js +80 -0
  99. package/dist/Components/FilterSidebar/SectionHeader.d.ts +13 -0
  100. package/dist/Components/FilterSidebar/SectionHeader.js +29 -0
  101. package/dist/Components/FilterSidebar/useStableCallback.d.ts +1 -0
  102. package/dist/Components/FilterSidebar/useStableCallback.js +12 -0
  103. package/dist/Components/Form/FormWrapper.d.ts +7 -7
  104. package/dist/Components/Form/FormWrapper.js +5 -3
  105. package/dist/Components/FormDrawer/FormDrawer.d.ts +1 -1
  106. package/dist/Components/FormDrawer/FormDrawer.js +3 -3
  107. package/dist/Components/FormDrawer/FormDrawerProps.d.ts +2 -0
  108. package/dist/Components/FormField/FormField.js +1 -1
  109. package/dist/Components/Header/Header.js +1 -1
  110. package/dist/Components/Header/HeaderActions.js +4 -2
  111. package/dist/Components/IconButton/IconButtonProps.d.ts +2 -1
  112. package/dist/Components/Input/TextInput.js +2 -2
  113. package/dist/Components/Input/TextInputProps.d.ts +3 -1
  114. package/dist/Components/KanbanBoard/AccountCard.js +1 -1
  115. package/dist/Components/KanbanBoard/KanbanBoard.d.ts +1 -1
  116. package/dist/Components/KanbanBoard/KanbanBoard.js +11 -7
  117. package/dist/Components/LauncherTrigger/LauncherTrigger.js +1 -1
  118. package/dist/Components/LazyWrapper/LazyWrapper.d.ts +2 -1
  119. package/dist/Components/LazyWrapper/LazyWrapper.js +1 -1
  120. package/dist/Components/MediaViewer/MediaViewer.js +4 -3
  121. package/dist/Components/MediaViewer/components/MediaAudioPlayer.js +5 -1
  122. package/dist/Components/MediaViewer/components/MediaImageViewer.js +19 -8
  123. package/dist/Components/MediaViewer/components/MediaScrubber.js +7 -2
  124. package/dist/Components/MediaViewer/components/MediaVideoPlayer.js +3 -1
  125. package/dist/Components/MediaViewer/components/ViewerIconButton.js +3 -1
  126. package/dist/Components/MediaViewer/hooks/useFileViewer.d.ts +1 -0
  127. package/dist/Components/MediaViewer/mediaItems.d.ts +1 -0
  128. package/dist/Components/MediaViewer/mediaItems.js +5 -0
  129. package/dist/Components/Modal/Modal.d.ts +1 -0
  130. package/dist/Components/Modal/Modal.js +7 -25
  131. package/dist/Components/Modal/dialogNaming.d.ts +8 -0
  132. package/dist/Components/Modal/dialogNaming.js +21 -0
  133. package/dist/Components/Modal/warnDroppedSlotChildren.d.ts +1 -1
  134. package/dist/Components/Modal/warnDroppedSlotChildren.js +7 -3
  135. package/dist/Components/NavLauncher/LauncherTabs.js +4 -3
  136. package/dist/Components/NavLauncher/NavLauncher.d.ts +1 -1
  137. package/dist/Components/NavLauncher/NavLauncher.js +288 -56
  138. package/dist/Components/NavLauncher/NavLauncherProps.d.ts +83 -5
  139. package/dist/Components/NavLauncher/ScopeBar.d.ts +14 -0
  140. package/dist/Components/NavLauncher/ScopeBar.js +139 -0
  141. package/dist/Components/NavLauncher/engine/distance.d.ts +4 -0
  142. package/dist/Components/NavLauncher/engine/distance.js +41 -0
  143. package/dist/Components/NavLauncher/engine/engine.d.ts +84 -0
  144. package/dist/Components/NavLauncher/engine/engine.js +472 -0
  145. package/dist/Components/NavLauncher/engine/fold.d.ts +15 -0
  146. package/dist/Components/NavLauncher/engine/fold.js +84 -0
  147. package/dist/Components/NavLauncher/engine/index.d.ts +21 -0
  148. package/dist/Components/NavLauncher/engine/index.js +17 -0
  149. package/dist/Components/NavLauncher/launcherParts.d.ts +14 -0
  150. package/dist/Components/NavLauncher/launcherParts.js +51 -13
  151. package/dist/Components/NavLauncher/match.d.ts +13 -2
  152. package/dist/Components/NavLauncher/match.js +26 -12
  153. package/dist/Components/NavLauncher/searchLayout.d.ts +61 -0
  154. package/dist/Components/NavLauncher/searchLayout.js +110 -0
  155. package/dist/Components/NavLauncher/spotlight.d.ts +39 -0
  156. package/dist/Components/NavLauncher/spotlight.js +202 -0
  157. package/dist/Components/NavLauncher/spotlightParts.d.ts +53 -0
  158. package/dist/Components/NavLauncher/spotlightParts.js +121 -0
  159. package/dist/Components/NavLauncher/useCopiedFlash.d.ts +6 -0
  160. package/dist/Components/NavLauncher/useCopiedFlash.js +21 -0
  161. package/dist/Components/NavigationBar/NavigationBar.js +6 -5
  162. package/dist/Components/NoteTextArea/NoteTextArea.js +12 -17
  163. package/dist/Components/NoteTextArea/NoteTextAreaProps.d.ts +5 -3
  164. package/dist/Components/Notification/Notification.js +19 -21
  165. package/dist/Components/Notification/NotificationProps.d.ts +1 -1
  166. package/dist/Components/NotificationBell/notificationHelpers.d.ts +16 -1
  167. package/dist/Components/NotificationBell/notificationHelpers.js +13 -7
  168. package/dist/Components/OffersList/OffersList.js +4 -2
  169. package/dist/Components/OptionChip/OptionChip.js +3 -2
  170. package/dist/Components/OptionChip/optionInk.js +4 -2
  171. package/dist/Components/OrderStatusTimeline/OrderStatusTimeline.js +2 -1
  172. package/dist/Components/OrgSwitcher/OrgSwitcher.js +13 -6
  173. package/dist/Components/OrgSwitcher/OrgSwitcherProps.d.ts +1 -1
  174. package/dist/Components/OrganizationDetails/OrganizationDetails.js +4 -7
  175. package/dist/Components/OrganizationDetails/OrganizationDetailsProps.d.ts +4 -2
  176. package/dist/Components/PdfViewer/PdfViewer.d.ts +1 -0
  177. package/dist/Components/PlanBadge/PlanBadgeProps.d.ts +1 -1
  178. package/dist/Components/PlanPill/PlanPill.js +4 -2
  179. package/dist/Components/PlanPill/PlanPillProps.d.ts +1 -1
  180. package/dist/Components/ProductCard/ProductCardAction.js +2 -1
  181. package/dist/Components/ProductCard/ProductCardSwatches.js +2 -1
  182. package/dist/Components/ProductDetails/ProductDetails.js +2 -1
  183. package/dist/Components/ProfileCard/ProfileCard.d.ts +1 -0
  184. package/dist/Components/ProfileCard/ProfileCard.js +12 -26
  185. package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +4 -2
  186. package/dist/Components/ProgressBar/ProgressBar.js +2 -1
  187. package/dist/Components/QuantityStepper/QuantityStepper.js +5 -2
  188. package/dist/Components/QueryState/QueryStateBoundary.d.ts +1 -1
  189. package/dist/Components/QueryState/QueryStateBoundary.js +5 -1
  190. package/dist/Components/QueryState/QueryStateProps.d.ts +6 -2
  191. package/dist/Components/RadioButton/RadioButton.js +2 -3
  192. package/dist/Components/RolesPermission/RolesPermission.js +12 -8
  193. package/dist/Components/ScrollToTop/ScrollToTop.d.ts +1 -0
  194. package/dist/Components/ScrollbarBox/ScrollbarBox.d.ts +4 -1
  195. package/dist/Components/ScrollbarBox/ScrollbarBox.js +10 -4
  196. package/dist/Components/SearchSelect/SearchSelect.d.ts +1 -1
  197. package/dist/Components/SearchSelect/SearchSelect.js +8 -5
  198. package/dist/Components/SearchSelect/SearchSelectProps.d.ts +3 -3
  199. package/dist/Components/SegmentedControl/SegmentedControl.d.ts +1 -1
  200. package/dist/Components/SegmentedControl/SegmentedControl.js +1 -1
  201. package/dist/Components/Select/Select.js +6 -0
  202. package/dist/Components/Select/SelectNative.d.ts +16 -0
  203. package/dist/Components/Select/SelectPopup.js +170 -63
  204. package/dist/Components/Select/SelectProps.d.ts +30 -2
  205. package/dist/Components/Select/groupedWindow.d.ts +21 -0
  206. package/dist/Components/Select/groupedWindow.js +50 -0
  207. package/dist/Components/SelectSearch/SelectSearch.d.ts +1 -1
  208. package/dist/Components/SelectSearch/SelectSearch.js +48 -38
  209. package/dist/Components/SelectSearch/SelectSearchProps.d.ts +3 -3
  210. package/dist/Components/SelectV2/SelectV2.d.ts +1 -1
  211. package/dist/Components/SelectV2/SelectV2.js +1 -1
  212. package/dist/Components/SelectV2/SelectV2Props.d.ts +3 -3
  213. package/dist/Components/SideBar/SecondaryBar.js +3 -2
  214. package/dist/Components/SideBar/components/MenuItemBox.js +3 -2
  215. package/dist/Components/SideBar/components/MenuItems.js +1 -1
  216. package/dist/Components/SideBar/components/OtherApps.js +2 -2
  217. package/dist/Components/SideBar/components/PinnedSection.js +1 -1
  218. package/dist/Components/SideBar/sidebarScale.d.ts +2 -2
  219. package/dist/Components/SideBar/sidebarScale.js +2 -2
  220. package/dist/Components/SignInActivityTable/SignInActivityTable.js +7 -2
  221. package/dist/Components/SignInActivityTable/SignInActivityTableProps.d.ts +1 -1
  222. package/dist/Components/SignInActivityTable/scrollRegionRing.d.ts +10 -0
  223. package/dist/Components/SignInActivityTable/scrollRegionRing.js +14 -0
  224. package/dist/Components/Skeletons/SkeletonProps.d.ts +5 -1
  225. package/dist/Components/Slider/Slider.d.ts +2 -0
  226. package/dist/Components/Slider/Slider.js +5 -4
  227. package/dist/Components/StageProgress/StageItem.js +2 -1
  228. package/dist/Components/StageProgress/StageProgress.js +8 -2
  229. package/dist/Components/StageProgress/StageProgressProps.d.ts +2 -0
  230. package/dist/Components/StageProgress/StepperStage.js +2 -1
  231. package/dist/Components/StickyBuyBar/StickyBuyBar.js +2 -1
  232. package/dist/Components/Table/Table.js +5 -3
  233. package/dist/Components/Table/components/HeaderActions.js +5 -3
  234. package/dist/Components/Table/components/TableBody.js +13 -8
  235. package/dist/Components/Table/components/TableGroupRow.js +2 -1
  236. package/dist/Components/Table/components/TableHeader.js +17 -21
  237. package/dist/Components/Table/components/TableLoading.js +8 -2
  238. package/dist/Components/Table/components/rowDetail.js +3 -2
  239. package/dist/Components/Table/filters/ActiveFilters.js +6 -3
  240. package/dist/Components/Table/filters/CompactSelect.js +2 -1
  241. package/dist/Components/Table/filters/FilterDatePicker.d.ts +6 -0
  242. package/dist/Components/Table/filters/FilterDatePicker.js +61 -0
  243. package/dist/Components/Table/filters/LeftFilterPane.d.ts +1 -0
  244. package/dist/Components/Table/filters/LeftFilterPane.js +14 -6
  245. package/dist/Components/Table/hooks/useTable.js +11 -7
  246. package/dist/Components/Table/settings/ManageColumns.js +4 -3
  247. package/dist/Components/Table/settings/TableSettings.js +4 -4
  248. package/dist/Components/Tabs/Tabs.d.ts +1 -0
  249. package/dist/Components/Tabs/Tabs.js +1 -0
  250. package/dist/Components/Tabs/components/CountBadge.d.ts +1 -0
  251. package/dist/Components/Tabs/components/TabList.d.ts +1 -0
  252. package/dist/Components/Tabs/components/TabList.js +1 -0
  253. package/dist/Components/Tabs/components/TabPanel.d.ts +1 -0
  254. package/dist/Components/Tabs/components/TabPanel.js +1 -0
  255. package/dist/Components/Tabs/tabStyles.js +4 -2
  256. package/dist/Components/Tag/Tag.js +5 -4
  257. package/dist/Components/Tag/Tag.styles.js +5 -4
  258. package/dist/Components/Tag/TagProps.d.ts +4 -1
  259. package/dist/Components/Tag/tagDot.js +10 -3
  260. package/dist/Components/TagInput/TagInput.js +6 -5
  261. package/dist/Components/TagInput/TagInputProps.d.ts +15 -0
  262. package/dist/Components/TagInput/tagEntries.d.ts +7 -1
  263. package/dist/Components/TagInput/tagEntries.js +18 -5
  264. package/dist/Components/TimePicker/TimePicker.js +7 -3
  265. package/dist/Components/TimePicker/TimePickerProps.d.ts +2 -0
  266. package/dist/Components/Timeline/Timeline.js +13 -9
  267. package/dist/Components/Toaster/Toaster.js +2 -1
  268. package/dist/Components/Toggle/TableToggle.d.ts +1 -1
  269. package/dist/Components/Toggle/TableToggle.js +1 -1
  270. package/dist/Components/UpgradeButton/UpgradeButton.js +3 -2
  271. package/dist/Components/UpgradeButton/UpgradeButtonProps.d.ts +1 -1
  272. package/dist/Components/UserDetails/UserDetails.js +5 -7
  273. package/dist/Components/WishlistToggle/WishlistToggle.js +2 -1
  274. package/dist/Components/WizardDialog/WizardDialog.d.ts +1 -1
  275. package/dist/Components/WizardDialog/WizardDialog.js +15 -3
  276. package/dist/Components/WizardDialog/WizardDialogProps.d.ts +5 -3
  277. package/dist/Components/WorkspaceWindow/WorkspaceTrayPreview.js +11 -1
  278. package/dist/Components/WorkspaceWindow/WorkspaceWindow.js +6 -3
  279. package/dist/Components/WorkspaceWindow/WorkspaceWindowProps.d.ts +16 -15
  280. package/dist/Hooks/useOutsideMouseDown.d.ts +11 -0
  281. package/dist/Hooks/useOutsideMouseDown.js +30 -0
  282. package/dist/Hooks/usePreferences.js +30 -12
  283. package/dist/Hooks/useScrollableRegion.d.ts +17 -0
  284. package/dist/Hooks/useScrollableRegion.js +36 -0
  285. package/dist/Hooks/useSidebarPrefs.d.ts +1 -0
  286. package/dist/Theme/chakra/Menu.styles.d.ts +4 -0
  287. package/dist/Theme/chakra/Menu.styles.js +6 -0
  288. package/dist/Theme/chakra/componentStyles.d.ts +4 -0
  289. package/dist/Theme/chakra/componentStyles.js +1 -1
  290. package/dist/Theme/chakra/createBrandTheme.d.ts +1 -0
  291. package/dist/Theme/chakra/focusRing.styles.d.ts +1 -1
  292. package/dist/Theme/chakra/focusRing.styles.js +3 -3
  293. package/dist/Theme/chakra/paletteFromTheme.d.ts +2 -1
  294. package/dist/Theme/chakra/paletteFromTheme.js +18 -4
  295. package/dist/Theme/chakra/ringShadow.d.ts +3 -0
  296. package/dist/Theme/chakra/ringShadow.js +7 -0
  297. package/dist/Theme/provider/PixelizeThemeProvider.d.ts +1 -0
  298. package/dist/Theme/provider/ThemeSwitcher.d.ts +1 -0
  299. package/dist/Theme/provider/ThemeSwitcher.js +1 -1
  300. package/dist/Theme/testing/testPalette.d.ts +1 -0
  301. package/dist/Theme/tokens/builders/buildDarkPalette.d.ts +2 -1
  302. package/dist/Theme/tokens/builders/buildDarkPalette.js +5 -5
  303. package/dist/Theme/tokens/builders/filledSurface.js +3 -2
  304. package/dist/Theme/tokens/builders/focusRing.js +4 -1
  305. package/dist/Theme/tokens/builders/paletteScale.d.ts +2 -0
  306. package/dist/Theme/tokens/builders/paletteScale.js +10 -0
  307. package/dist/Theme/tokens/types.d.ts +1 -0
  308. package/dist/Utils/accountHandoff.d.ts +3 -0
  309. package/dist/Utils/price.d.ts +1 -0
  310. package/dist/Utils/tabular.d.ts +30 -0
  311. package/dist/Utils/tabular.js +61 -0
  312. package/dist/esm/Components/Accordion/Accordion.js +11 -8
  313. package/dist/esm/Components/Accordion/accordionColors.js +2 -3
  314. package/dist/esm/Components/Apexcharts/ApexLineChart/ApexLineChart.js +2 -1
  315. package/dist/esm/Components/Apexcharts/ApexPieChart/ApexPieChart.js +6 -5
  316. package/dist/esm/Components/Apexcharts/ApexPieChart/pieImageTexture.js +10 -0
  317. package/dist/esm/Components/AppSwitcher/AppSwitcher.js +6 -3
  318. package/dist/esm/Components/AppSwitcher/AppSwitcherProps.js +18 -11
  319. package/dist/esm/Components/AppSwitcher/pixelizeSuite.js +67 -0
  320. package/dist/esm/Components/AppearanceSettings/AppearanceSettings.js +3 -3
  321. package/dist/esm/Components/Avatar/avatarColorway.js +4 -4
  322. package/dist/esm/Components/Button/Button.styles.js +5 -2
  323. package/dist/esm/Components/ButtonGroupIcon/ButtonGroupIcon.js +3 -1
  324. package/dist/esm/Components/CalendarGrid/CalendarGrid.js +5 -3
  325. package/dist/esm/Components/Card/Card.js +1 -0
  326. package/dist/esm/Components/Checkbox/Checkbox.styles.js +3 -1
  327. package/dist/esm/Components/CheckoutKit/selectable.js +10 -7
  328. package/dist/esm/Components/CheckoutKit/tonalHover.js +2 -0
  329. package/dist/esm/Components/ChoiceCard/ChoiceCard.js +2 -1
  330. package/dist/esm/Components/Common/FormLabel.js +4 -3
  331. package/dist/esm/Components/Common/HelperText.js +1 -2
  332. package/dist/esm/Components/Common/activationKey.js +7 -0
  333. package/dist/esm/Components/Common/fieldMessageStyles.js +2 -1
  334. package/dist/esm/Components/Common/findSlot.js +17 -0
  335. package/dist/esm/Components/Common/surfaceFocusRing.js +3 -0
  336. package/dist/esm/Components/ConfirmDialog/ConfirmDialog.js +18 -6
  337. package/dist/esm/Components/CopyButton/CopyButton.js +5 -8
  338. package/dist/esm/Components/CouponField/CouponField.js +5 -2
  339. package/dist/esm/Components/CustomModulesTable/CustomModulesTable.js +3 -1
  340. package/dist/esm/Components/DatePicker/CalendarPanel.js +3 -1
  341. package/dist/esm/Components/DatePicker/DatePicker.js +25 -27
  342. package/dist/esm/Components/DatePicker/PickerPortal.js +2 -2
  343. package/dist/esm/Components/DatePicker/RangeDatePicker.js +10 -29
  344. package/dist/esm/Components/DatePicker/SingleDatePicker.js +5 -21
  345. package/dist/esm/Components/DatePicker/TimeOnlyPicker.js +2 -20
  346. package/dist/esm/Components/DescriptionList/DescriptionList.js +1 -1
  347. package/dist/esm/Components/DetailSections/DetailSections.js +2 -1
  348. package/dist/esm/Components/Divider/Divider.js +3 -3
  349. package/dist/esm/Components/Drawer/Drawer.js +24 -19
  350. package/dist/esm/Components/Dropdown/DropDown.js +7 -22
  351. package/dist/esm/Components/Editor/Editor.js +7 -3
  352. package/dist/esm/Components/Editor/editorLabels.js +1 -0
  353. package/dist/esm/Components/Editor/editorTokenStyles.js +7 -0
  354. package/dist/esm/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +8 -4
  355. package/dist/esm/Components/EmptyState/FilteredEmptyState.js +18 -0
  356. package/dist/esm/Components/FilePreview/FilePreview.js +8 -4
  357. package/dist/esm/Components/FileUpload/FileUpload.js +8 -9
  358. package/dist/esm/Components/FileUploader/FileUploader.js +6 -7
  359. package/dist/esm/Components/FilterSidebar/FilterSidebar.js +94 -237
  360. package/dist/esm/Components/FilterSidebar/OptionsSection.js +41 -0
  361. package/dist/esm/Components/FilterSidebar/RangeSection.js +78 -0
  362. package/dist/esm/Components/FilterSidebar/SectionHeader.js +23 -0
  363. package/dist/esm/Components/FilterSidebar/useStableCallback.js +8 -0
  364. package/dist/esm/Components/Form/FormWrapper.js +5 -3
  365. package/dist/esm/Components/FormDrawer/FormDrawer.js +3 -3
  366. package/dist/esm/Components/FormField/FormField.js +1 -1
  367. package/dist/esm/Components/Header/Header.js +1 -1
  368. package/dist/esm/Components/Header/HeaderActions.js +6 -4
  369. package/dist/esm/Components/Input/TextInput.js +2 -2
  370. package/dist/esm/Components/KanbanBoard/AccountCard.js +1 -1
  371. package/dist/esm/Components/KanbanBoard/KanbanActions/KanbanActions.js +2 -2
  372. package/dist/esm/Components/KanbanBoard/KanbanBoard.js +11 -7
  373. package/dist/esm/Components/LauncherTrigger/LauncherTrigger.js +1 -1
  374. package/dist/esm/Components/LazyWrapper/LazyWrapper.js +1 -1
  375. package/dist/esm/Components/MediaViewer/MediaViewer.js +5 -4
  376. package/dist/esm/Components/MediaViewer/components/MediaAudioPlayer.js +5 -1
  377. package/dist/esm/Components/MediaViewer/components/MediaImageViewer.js +19 -8
  378. package/dist/esm/Components/MediaViewer/components/MediaScrubber.js +7 -2
  379. package/dist/esm/Components/MediaViewer/components/MediaVideoPlayer.js +3 -1
  380. package/dist/esm/Components/MediaViewer/components/ViewerIconButton.js +3 -1
  381. package/dist/esm/Components/MediaViewer/mediaItems.js +4 -0
  382. package/dist/esm/Components/Modal/Modal.js +2 -17
  383. package/dist/esm/Components/Modal/dialogNaming.js +18 -0
  384. package/dist/esm/Components/Modal/warnDroppedSlotChildren.js +7 -3
  385. package/dist/esm/Components/NavLauncher/LauncherTabs.js +4 -3
  386. package/dist/esm/Components/NavLauncher/NavLauncher.js +291 -59
  387. package/dist/esm/Components/NavLauncher/ScopeBar.js +136 -0
  388. package/dist/esm/Components/NavLauncher/engine/distance.js +37 -0
  389. package/dist/esm/Components/NavLauncher/engine/engine.js +459 -0
  390. package/dist/esm/Components/NavLauncher/engine/fold.js +75 -0
  391. package/dist/esm/Components/NavLauncher/engine/index.js +14 -0
  392. package/dist/esm/Components/NavLauncher/launcherParts.js +46 -10
  393. package/dist/esm/Components/NavLauncher/match.js +25 -12
  394. package/dist/esm/Components/NavLauncher/searchLayout.js +101 -0
  395. package/dist/esm/Components/NavLauncher/spotlight.js +194 -0
  396. package/dist/esm/Components/NavLauncher/spotlightParts.js +108 -0
  397. package/dist/esm/Components/NavLauncher/useCopiedFlash.js +17 -0
  398. package/dist/esm/Components/NavigationBar/NavigationBar.js +6 -5
  399. package/dist/esm/Components/NoteTextArea/NoteTextArea.js +12 -17
  400. package/dist/esm/Components/Notification/Notification.js +20 -22
  401. package/dist/esm/Components/NotificationBell/notificationHelpers.js +12 -6
  402. package/dist/esm/Components/OffersList/OffersList.js +4 -2
  403. package/dist/esm/Components/OptionChip/OptionChip.js +3 -2
  404. package/dist/esm/Components/OptionChip/optionInk.js +4 -2
  405. package/dist/esm/Components/OrderStatusTimeline/OrderStatusTimeline.js +2 -1
  406. package/dist/esm/Components/OrgSwitcher/OrgSwitcher.js +14 -7
  407. package/dist/esm/Components/OrganizationDetails/OrganizationDetails.js +5 -8
  408. package/dist/esm/Components/PlanPill/PlanPill.js +4 -2
  409. package/dist/esm/Components/ProductCard/ProductCardAction.js +2 -1
  410. package/dist/esm/Components/ProductCard/ProductCardSwatches.js +2 -1
  411. package/dist/esm/Components/ProductDetails/ProductDetails.js +2 -1
  412. package/dist/esm/Components/ProfileCard/ProfileCard.js +6 -17
  413. package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +4 -2
  414. package/dist/esm/Components/ProgressBar/ProgressBar.js +2 -1
  415. package/dist/esm/Components/QuantityStepper/QuantityStepper.js +5 -2
  416. package/dist/esm/Components/QueryState/QueryStateBoundary.js +5 -1
  417. package/dist/esm/Components/RadioButton/RadioButton.js +2 -3
  418. package/dist/esm/Components/RolesPermission/RolesPermission.js +12 -8
  419. package/dist/esm/Components/ScrollbarBox/ScrollbarBox.js +9 -3
  420. package/dist/esm/Components/SearchSelect/SearchSelect.js +8 -5
  421. package/dist/esm/Components/SegmentedControl/SegmentedControl.js +1 -1
  422. package/dist/esm/Components/Select/Select.js +6 -0
  423. package/dist/esm/Components/Select/SelectPopup.js +171 -64
  424. package/dist/esm/Components/Select/groupedWindow.js +44 -0
  425. package/dist/esm/Components/SelectSearch/SelectSearch.js +49 -39
  426. package/dist/esm/Components/SelectV2/SelectV2.js +1 -1
  427. package/dist/esm/Components/SideBar/SecondaryBar.js +3 -2
  428. package/dist/esm/Components/SideBar/components/MenuItemBox.js +3 -2
  429. package/dist/esm/Components/SideBar/components/MenuItems.js +1 -1
  430. package/dist/esm/Components/SideBar/components/OtherApps.js +2 -2
  431. package/dist/esm/Components/SideBar/components/PinnedSection.js +1 -1
  432. package/dist/esm/Components/SideBar/sidebarScale.js +2 -2
  433. package/dist/esm/Components/SignInActivityTable/SignInActivityTable.js +8 -3
  434. package/dist/esm/Components/SignInActivityTable/scrollRegionRing.js +9 -0
  435. package/dist/esm/Components/Slider/Slider.js +6 -5
  436. package/dist/esm/Components/StageProgress/StageItem.js +2 -1
  437. package/dist/esm/Components/StageProgress/StageProgress.js +8 -2
  438. package/dist/esm/Components/StageProgress/StepperStage.js +2 -1
  439. package/dist/esm/Components/StickyBuyBar/StickyBuyBar.js +2 -1
  440. package/dist/esm/Components/Table/Table.js +8 -6
  441. package/dist/esm/Components/Table/components/HeaderActions.js +7 -5
  442. package/dist/esm/Components/Table/components/TableBody.js +13 -8
  443. package/dist/esm/Components/Table/components/TableGroupRow.js +2 -1
  444. package/dist/esm/Components/Table/components/TableHeader.js +19 -23
  445. package/dist/esm/Components/Table/components/TableLoading.js +6 -3
  446. package/dist/esm/Components/Table/components/rowDetail.js +3 -2
  447. package/dist/esm/Components/Table/filters/ActiveFilters.js +8 -5
  448. package/dist/esm/Components/Table/filters/CompactSelect.js +2 -1
  449. package/dist/esm/Components/Table/filters/FilterDatePicker.js +20 -0
  450. package/dist/esm/Components/Table/filters/LeftFilterPane.js +14 -6
  451. package/dist/esm/Components/Table/hooks/useTable.js +11 -7
  452. package/dist/esm/Components/Table/settings/ManageColumns.js +4 -3
  453. package/dist/esm/Components/Table/settings/TableSettings.js +4 -4
  454. package/dist/esm/Components/Tabs/Tabs.js +1 -0
  455. package/dist/esm/Components/Tabs/components/TabList.js +1 -0
  456. package/dist/esm/Components/Tabs/components/TabPanel.js +1 -0
  457. package/dist/esm/Components/Tabs/tabStyles.js +5 -3
  458. package/dist/esm/Components/Tag/Tag.js +5 -4
  459. package/dist/esm/Components/Tag/Tag.styles.js +5 -4
  460. package/dist/esm/Components/Tag/tagDot.js +10 -3
  461. package/dist/esm/Components/TagInput/TagInput.js +8 -7
  462. package/dist/esm/Components/TagInput/tagEntries.js +16 -4
  463. package/dist/esm/Components/TimePicker/TimePicker.js +7 -3
  464. package/dist/esm/Components/Timeline/Timeline.js +14 -10
  465. package/dist/esm/Components/Toaster/Toaster.js +2 -1
  466. package/dist/esm/Components/Toggle/TableToggle.js +1 -1
  467. package/dist/esm/Components/UpgradeButton/UpgradeButton.js +3 -2
  468. package/dist/esm/Components/UserDetails/UserDetails.js +5 -7
  469. package/dist/esm/Components/WishlistToggle/WishlistToggle.js +2 -1
  470. package/dist/esm/Components/WizardDialog/WizardDialog.js +15 -3
  471. package/dist/esm/Components/WorkspaceWindow/WorkspaceTrayPreview.js +12 -2
  472. package/dist/esm/Components/WorkspaceWindow/WorkspaceWindow.js +7 -4
  473. package/dist/esm/Hooks/useOutsideMouseDown.js +26 -0
  474. package/dist/esm/Hooks/usePreferences.js +30 -12
  475. package/dist/esm/Hooks/useScrollableRegion.js +33 -0
  476. package/dist/esm/Theme/chakra/Menu.styles.js +6 -0
  477. package/dist/esm/Theme/chakra/componentStyles.js +1 -1
  478. package/dist/esm/Theme/chakra/focusRing.styles.js +3 -3
  479. package/dist/esm/Theme/chakra/paletteFromTheme.js +16 -3
  480. package/dist/esm/Theme/chakra/ringShadow.js +3 -0
  481. package/dist/esm/Theme/provider/ThemeSwitcher.js +1 -1
  482. package/dist/esm/Theme/tokens/builders/buildDarkPalette.js +5 -5
  483. package/dist/esm/Theme/tokens/builders/filledSurface.js +3 -2
  484. package/dist/esm/Theme/tokens/builders/focusRing.js +4 -1
  485. package/dist/esm/Theme/tokens/builders/paletteScale.js +6 -0
  486. package/dist/esm/Utils/tabular.js +56 -0
  487. package/dist/esm/index.js +18 -25
  488. package/dist/index.d.ts +59 -5
  489. package/dist/index.js +36 -29
  490. package/package.json +3 -1
  491. package/dist/Components/Buttons/Buttons.d.ts +0 -3
  492. package/dist/Components/Buttons/Buttons.js +0 -9
  493. package/dist/Components/Buttons/ButtonsProps.d.ts +0 -12
  494. package/dist/Components/Common/ErrorComponent.d.ts +0 -7
  495. package/dist/Components/Common/ErrorComponent.js +0 -16
  496. package/dist/Components/Common/FormattedDescription.d.ts +0 -7
  497. package/dist/Components/Common/FormattedDescription.js +0 -62
  498. package/dist/Components/Common/Label.d.ts +0 -9
  499. package/dist/Components/Common/Label.js +0 -12
  500. package/dist/Components/Input/Input/Input.d.ts +0 -4
  501. package/dist/Components/Input/Input/Input.js +0 -75
  502. package/dist/Components/Input/Input/InputProps.d.ts +0 -24
  503. package/dist/Components/Input/Input/InputProps.js +0 -2
  504. package/dist/Components/ProductCard/productCardFixtures.d.ts +0 -7
  505. package/dist/Components/ProductCard/productCardFixtures.js +0 -61
  506. package/dist/esm/Components/Buttons/Buttons.js +0 -4
  507. package/dist/esm/Components/Common/ErrorComponent.js +0 -14
  508. package/dist/esm/Components/Common/FormattedDescription.js +0 -60
  509. package/dist/esm/Components/Common/Label.js +0 -10
  510. package/dist/esm/Components/Input/Input/Input.js +0 -37
  511. package/dist/esm/Components/Input/Input/InputProps.js +0 -1
  512. package/dist/esm/Components/ProductCard/productCardFixtures.js +0 -58
  513. package/dist/esm/services/feedback.js +0 -15
  514. package/dist/services/feedback.d.ts +0 -12
  515. package/dist/services/feedback.js +0 -18
  516. /package/dist/Components/{Buttons/ButtonsProps.js → Common/dataAttributes.js} +0 -0
  517. /package/dist/esm/Components/{Buttons/ButtonsProps.js → Common/dataAttributes.js} +0 -0
@@ -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;
@@ -0,0 +1,41 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { memo, useMemo } from "react";
3
+ import { Box, Flex, Text, VStack, HStack, Badge, Input, Radio, RadioGroup } from "@chakra-ui/react";
4
+ import { Star } from "lucide-react";
5
+ import CheckBox from "../Checkbox/Checkbox.js";
6
+ import { useCustomTheme } from "../../Theme/useCustomTheme.js";
7
+ import { accentTextOnCanvas } from "../../Theme/tokens/builders/accentText.js";
8
+ import { bandOn } from "../../Theme/tokens/builders/planeStep.js";
9
+ import { getFilterHoverBg } from "./filterHoverStyle.js";
10
+ import { fieldFocusVisible, insetFocusRingShadow } from "../../Theme/chakra/focusRing.styles.js";
11
+ import { onActivationKey } from "../Common/activationKey.js";
12
+ const RATINGS = [4, 3, 2, 1];
13
+ const STARS = [0, 1, 2, 3, 4];
14
+ const OptionsSection = memo(({ section, value, searchTerm, isExpanded, maxVisible, onToggle, onValue, onSearch, onToggleExpanded, }) => {
15
+ const theme = useCustomTheme();
16
+ const hoverBg = useMemo(() => getFilterHoverBg(theme.colors), [theme.colors]);
17
+ const ratingPick = useMemo(() => bandOn(theme.colors.primary[50], theme.colors.background[50]), [theme.colors]);
18
+ const insetFocusRing = useMemo(() => ({ outline: "2px solid transparent", boxShadow: insetFocusRingShadow(theme.colors) }), [theme.colors]);
19
+ const options = section.options || [];
20
+ const selectedIds = Array.isArray(value) ? value : [];
21
+ const isRadio = section.type === "radio" || section.radio;
22
+ const visible = (isExpanded ? options : options.slice(0, maxVisible)).filter((opt) => !section.searchable || !searchTerm || opt.label.toLowerCase().includes(searchTerm.toLowerCase()));
23
+ const renderList = () => {
24
+ if (visible.length === 0 && searchTerm) {
25
+ return (_jsx(Box, { p: 2, w: "full", textAlign: "center", children: _jsx(Text, { fontSize: "xs", color: theme.colors.textMuted, children: "No Data Found" }) }));
26
+ }
27
+ if (isRadio) {
28
+ return (_jsx(RadioGroup, { w: "full", value: value || "", onChange: (val) => onValue(section.id, val), children: _jsx(VStack, { align: "start", spacing: 1, w: "full", children: visible.map((opt) => (_jsx(Radio, { value: opt.id, size: "sm", children: _jsx(Text, { fontSize: "xs", color: theme.colors.text[500], children: opt.label }) }, opt.id))) }) }));
29
+ }
30
+ return visible.map((opt) => (_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) => onToggle(section.id, opt.id, e.target.checked), size: "sm" }), _jsx(Text, { fontSize: "xs", color: theme.colors.text[500], cursor: "pointer", onClick: () => onToggle(section.id, opt.id, !selectedIds.includes(opt.id)), children: opt.label })] }), typeof opt.count === "number" && (_jsx(Badge, { fontSize: "xs", colorScheme: "gray", borderRadius: "full", px: 2, children: opt.count }))] }, opt.id)));
31
+ };
32
+ return (_jsxs(_Fragment, { children: [section.id === "rating" ? (_jsx(VStack, { align: "start", spacing: 1, w: "full", children: RATINGS.map((r) => {
33
+ const isRowSelected = String(value || "") === String(r);
34
+ // NOTE: orange[500] is ~2.2:1 on background[50]; walk the scale for 3:1.
35
+ const starColor = accentTextOnCanvas(theme.colors.orange, isRowSelected ? ratingPick : theme.colors.background[50]);
36
+ return (_jsx(Flex, { as: "button", type: "button", "aria-pressed": isRowSelected, "aria-label": `${section.label}: ${r} stars & up`, align: "center", justify: "space-between", w: "full", p: 1, borderRadius: "md", cursor: "pointer", bg: isRowSelected ? ratingPick : "transparent", border: isRowSelected ? `1px solid ${theme.colors.primary[200]}` : "none", _hover: { bg: hoverBg }, _focusVisible: insetFocusRing, onClick: () => onValue(section.id, String(r)), children: _jsxs(HStack, { spacing: 2, align: "center", children: [_jsx(HStack, { spacing: 1, children: STARS.map((i) => (_jsx(Box, { children: _jsx(Star, { size: 16, color: starColor, fill: i < r ? starColor : "none" }) }, `star-${r}-${i}`))) }), _jsx(Text, { fontSize: "sm", color: theme.colors.text[500], children: "& Up" })] }) }, `rating-${r}`));
37
+ }) })) : 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",
38
+ // NOTE: boxborder[500] not gray[200]; WCAG 1.4.11 needs 3:1 for a control boundary.
39
+ borderColor: theme.colors.boxborder[500], _focus: { borderColor: theme.colors.primary[500], ...fieldFocusVisible(theme.colors) }, value: searchTerm, onChange: (e) => onSearch(section.id, e.target.value) })), section.id !== "rating" && renderList(), 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: () => onToggleExpanded(section.id), onKeyDown: onActivationKey(() => onToggleExpanded(section.id)), children: isExpanded ? "Show less" : `+ ${options.length - maxVisible} more` }))] }));
40
+ });
41
+ export default OptionsSection;
@@ -0,0 +1,78 @@
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ import { memo, useMemo, useState } from "react";
3
+ import { Box, Flex, Text, VStack, SimpleGrid, Popover, PopoverTrigger, PopoverContent, PopoverBody, Portal } from "@chakra-ui/react";
4
+ import { Check } from "lucide-react";
5
+ import { useCustomTheme } from "../../Theme/useCustomTheme.js";
6
+ import { onFilled } from "../../Theme/tokens/builders/accentText.js";
7
+ import { bandOn, cardRule } from "../../Theme/tokens/builders/planeStep.js";
8
+ import { getFilterHoverBg } from "./filterHoverStyle.js";
9
+ import { focusVisibleRing, insetFocusRingShadow } from "../../Theme/chakra/focusRing.styles.js";
10
+ const SLIDER_CSS = `
11
+ .custom-range-slider::-webkit-slider-thumb {
12
+ pointer-events: auto;
13
+ width: 24px;
14
+ height: 24px;
15
+ -webkit-appearance: none;
16
+ cursor: pointer;
17
+ }
18
+ .custom-range-slider::-moz-range-thumb {
19
+ pointer-events: auto;
20
+ width: 24px;
21
+ height: 24px;
22
+ border: none;
23
+ cursor: pointer;
24
+ }
25
+ `;
26
+ const NATIVE_INPUT_STYLE = {
27
+ position: "absolute",
28
+ width: "100%",
29
+ height: "100%",
30
+ opacity: 0,
31
+ appearance: "none",
32
+ pointerEvents: "none",
33
+ zIndex: 3,
34
+ margin: 0,
35
+ };
36
+ const TICKS = [0, 25, 50, 75, 100];
37
+ const BoundPicker = ({ bound, sectionId, label, values, current, unit, isOpen, onOpen, onClose, onPick }) => {
38
+ const theme = useCustomTheme();
39
+ const hoverBg = useMemo(() => getFilterHoverBg(theme.colors), [theme.colors]);
40
+ const pickFill = useMemo(() => bandOn(theme.colors.primary[50], theme.colors.surfaceRaised), [theme.colors]);
41
+ const focusRing = useMemo(() => focusVisibleRing(theme.colors), [theme.colors]);
42
+ const insetFocusRing = useMemo(() => ({ outline: "2px solid transparent", boxShadow: insetFocusRingShadow(theme.colors) }), [theme.colors]);
43
+ const unitSuffix = unit ? ` ${unit}` : "";
44
+ const boundName = bound === "min" ? "minimum" : "maximum";
45
+ // NOTE: raw scale ink can miss 3:1 on its own fill; onFilled matches it.
46
+ const checkInk = onFilled(theme.colors.primary[100], theme.colors.white, theme.colors.black);
47
+ return (_jsxs(Popover, { isOpen: isOpen, onClose: onClose, placement: "bottom-start", closeOnBlur: true, children: [_jsx(PopoverTrigger, { children: _jsx(Flex, { as: "button", type: "button", "aria-label": `${label} ${boundName}: ${current}${unitSuffix}`, borderWidth: "0", borderRadius: "md", alignItems: "center", px: 3, py: 2, bg: theme.colors.background[50], borderColor: theme.colors.boxborder[500], cursor: "pointer", _focusVisible: focusRing, "data-testid": `range-trigger-${bound}-${sectionId}`, onClick: onOpen, gap: 2, overflow: "hidden", children: _jsx(Box, { ml: "auto", children: _jsxs(Text, { fontSize: "xs", color: theme.colors.text[500], whiteSpace: "nowrap", children: [current, unitSuffix] }) }) }) }), _jsx(Portal, { children: _jsx(PopoverContent, { width: "6rem", p: 0, zIndex: 1600, bg: theme.colors.surfaceRaised, "aria-label": `${label} ${boundName}`, children: _jsx(PopoverBody, { p: 0, children: _jsx(VStack, { align: "stretch", spacing: 0, maxH: "12rem", overflowY: "auto", children: values.map((v) => (_jsxs(Flex, { as: "button", type: "button", "aria-pressed": current === v, px: 2, py: 1, align: "center", justify: "space-between", cursor: "pointer", bg: current === v ? pickFill : theme.colors.surfaceRaised, borderLeftWidth: current === v ? 3 : 0, borderLeftStyle: "solid", borderLeftColor: current === v ? theme.colors.primary[400] : "transparent", _hover: { bg: hoverBg }, _focusVisible: insetFocusRing, "data-testid": `range-option-${bound}-${sectionId}-${v}`, onClick: () => onPick(v), children: [_jsxs(Text, { fontSize: "sm", color: theme.colors.text[500], children: [v, unitSuffix] }), current === v ? (_jsx(Box, { bg: theme.colors.primary[100], borderRadius: "full", p: 1, display: "flex", alignItems: "center", children: _jsx(Check, { size: 9, color: checkInk }) })) : null] }, `${bound}-${v}`))) }) }) }) })] }));
48
+ };
49
+ const RangeSection = memo(({ sectionId, label, range, value, onChange }) => {
50
+ var _a, _b;
51
+ const theme = useCustomTheme();
52
+ const [openBound, setOpenBound] = useState(null);
53
+ const step = range.step || 1;
54
+ const rangeArr = Array.isArray(value) ? value : [];
55
+ const currentMin = (_a = rangeArr[0]) !== null && _a !== void 0 ? _a : range.min;
56
+ const currentMax = (_b = rangeArr[1]) !== null && _b !== void 0 ? _b : range.max;
57
+ const values = useMemo(() => range.values || Array.from({ length: Math.floor((range.max - range.min) / step) + 1 }, (_, i) => range.min + i * step), [range.values, range.min, range.max, step]);
58
+ const unitSuffix = range.unit ? ` ${range.unit}` : "";
59
+ const minPercent = ((currentMin - range.min) / (range.max - range.min)) * 100;
60
+ const maxPercent = ((currentMax - range.min) / (range.max - range.min)) * 100;
61
+ const primaryColor = theme.colors.primary[300];
62
+ const secondaryColor = theme.colors.primary[600];
63
+ const trackColor = cardRule(theme.colors);
64
+ const chipBorder = `1px solid ${trackColor}`;
65
+ const thumbSize = { base: "16px", md: "20px" };
66
+ const chipTop = { base: "-18px", md: "-22px" };
67
+ const pick = (bound, v) => {
68
+ const other = bound === "min" ? currentMax : currentMin;
69
+ onChange(sectionId, [Math.min(v, other), Math.max(v, other)]);
70
+ setOpenBound(null);
71
+ };
72
+ return (_jsxs(Box, { w: "full", px: 3, children: [_jsx("style", { children: SLIDER_CSS }), _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: trackColor, borderRadius: "full" }), _jsx(Box, { position: "absolute", height: "6px", style: {
73
+ left: `${minPercent}%`,
74
+ width: `${maxPercent - minPercent}%`,
75
+ background: `linear-gradient(to right, ${primaryColor}, ${secondaryColor})`,
76
+ }, borderRadius: "full", boxShadow: `0 0 8px ${theme.colors.primary.opacity[32]}` }), [[minPercent, primaryColor], [maxPercent, secondaryColor]].map(([percent, color], i) => (_jsx(Box, { position: "absolute", style: { left: `${percent}%` }, transform: "translate(-50%, 0)", w: thumbSize, h: thumbSize, borderRadius: "full", bg: theme.colors.background[50], border: "3px solid", borderColor: color, boxShadow: theme.shadows.md, zIndex: 2 }, i))), [[minPercent, currentMin], [maxPercent, currentMax]].map(([percent, current], i) => (_jsxs(Box, { position: "absolute", style: { left: `${percent}%` }, top: chipTop, transform: "translate(-50%, -100%)", px: 2, py: 1, bg: theme.colors.background[50], border: chipBorder, borderRadius: "lg", fontSize: "xs-minus", color: theme.colors.text[500], boxShadow: "sm", zIndex: 3, children: [current, unitSuffix] }, i))), TICKS.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": `${label}: minimum`, min: range.min, max: range.max, step: step, value: currentMin, className: "custom-range-slider", onChange: (e) => onChange(sectionId, [Math.min(Number(e.target.value), currentMax - step), currentMax]), style: NATIVE_INPUT_STYLE }), _jsx("input", { type: "range", "aria-label": `${label}: maximum`, min: range.min, max: range.max, step: step, value: currentMax, className: "custom-range-slider", onChange: (e) => onChange(sectionId, [currentMin, Math.max(Number(e.target.value), currentMin + step)]), style: NATIVE_INPUT_STYLE })] }), _jsx(SimpleGrid, { columns: 2, spacing: 2, pt: 2, w: "full", children: ["min", "max"].map((bound) => (_jsx(BoundPicker, { bound: bound, sectionId: sectionId, label: label, values: values, current: bound === "min" ? currentMin : currentMax, unit: range.unit, isOpen: openBound === bound, onOpen: () => setOpenBound(bound), onClose: () => setOpenBound(null), onPick: (v) => pick(bound, v) }, bound))) })] }));
77
+ });
78
+ export default RangeSection;
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { memo } from "react";
3
+ import { Badge, Flex, Text } from "@chakra-ui/react";
4
+ import { ChevronDownIcon } from "lucide-react";
5
+ import ToolTip from "../ToolTip/ToolTip.js";
6
+ import { useCustomTheme } from "../../Theme/useCustomTheme.js";
7
+ import { focusVisibleRing } from "../../Theme/chakra/focusRing.styles.js";
8
+ import { onActivationKey } from "../Common/activationKey.js";
9
+ const CLEAR_BADGE = {
10
+ colorScheme: "red",
11
+ variant: "solid",
12
+ fontSize: "xs",
13
+ borderRadius: "full",
14
+ px: 2,
15
+ };
16
+ export const SectionHeader = memo(({ label, hasValue }) => {
17
+ const theme = useCustomTheme();
18
+ return (_jsxs(Flex, { justify: "space-between", align: "center", w: "full", py: 1, children: [_jsx(ToolTip, { label: 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: label }) }), hasValue ? (_jsx(Badge, { ...CLEAR_BADGE, "aria-hidden": true, visibility: "hidden", _after: { content: '"Clear"' } })) : (_jsx(ChevronDownIcon, { size: 10 }))] }));
19
+ });
20
+ export const SectionClear = memo(({ sectionId, label, onClear }) => {
21
+ const theme = useCustomTheme();
22
+ return (_jsx(Badge, { ...CLEAR_BADGE, cursor: "pointer", role: "button", tabIndex: 0, "aria-label": `Clear ${label}`, _focusVisible: focusVisibleRing(theme.colors), onClick: (e) => onClear(sectionId, e.currentTarget), onKeyDown: onActivationKey((e) => onClear(sectionId, e.currentTarget)), children: "Clear" }));
23
+ });
@@ -0,0 +1,8 @@
1
+ import { useCallback, useLayoutEffect, useRef } from "react";
2
+ export const useStableCallback = (fn) => {
3
+ const latest = useRef(fn);
4
+ useLayoutEffect(() => {
5
+ latest.current = fn;
6
+ });
7
+ return useCallback((...args) => latest.current(...args), []);
8
+ };
@@ -1,9 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box, Icon } from "@chakra-ui/react";
3
+ import { isValidElement } from "react";
3
4
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
4
- /** Renders an icon+label header above a bordered card — not an HTML form; no submit/validation, just a section wrapper. */
5
- const FormWrapper = ({ icon, text, children, }) => {
5
+ const isElement = (icon) => isValidElement(icon);
6
+ /** Renders an icon+label header above a bordered card — not an HTML form; no submit/validation, just a section wrapper. id, data-* and aria-* land on the outer wrapper. */
7
+ const FormWrapper = ({ icon, text, children, ...rest }) => {
6
8
  const { colors } = useCustomTheme();
7
- return (_jsxs(Box, { children: [_jsxs(Box, { display: "flex", alignItems: "center", gap: 2, mb: 2, children: [icon && _jsx(Icon, { as: icon, boxSize: "1rem", color: colors.header[500] }), text && (_jsx(Box, { fontWeight: 600, fontSize: "xs", lineHeight: "1", textTransform: "uppercase", color: colors.header[500], children: text }))] }), _jsx(Box, { borderRadius: "xl", bg: colors.background[50], borderWidth: "1px", borderStyle: "solid", borderColor: colors.boxborder[200], p: "1.5rem", children: children })] }));
9
+ return (_jsxs(Box, { ...rest, children: [_jsxs(Box, { display: "flex", alignItems: "center", gap: 2, mb: 2, children: [isElement(icon) ? (_jsx(Box, { display: "inline-flex", boxSize: "1rem", color: colors.header[500], sx: { "& > svg": { width: "100%", height: "100%" } }, children: icon })) : (icon && _jsx(Icon, { as: icon, boxSize: "1rem", color: colors.header[500] })), text && (_jsx(Box, { fontWeight: 600, fontSize: "xs", lineHeight: "1", textTransform: "uppercase", color: colors.header[500], children: text }))] }), _jsx(Box, { borderRadius: "xl", bg: colors.background[50], borderWidth: "1px", borderStyle: "solid", borderColor: colors.boxborder[200], p: "1.5rem", children: children })] }));
8
10
  };
9
11
  export default FormWrapper;
@@ -12,7 +12,7 @@ const DEFAULT_LABELS = {
12
12
  discard: "Discard",
13
13
  keepEditing: "Keep editing",
14
14
  };
15
- export default function FormDrawer({ isOpen, onClose, title, description, sections, errors = [], isDirty, onSubmit, isSubmitting = false, submitLabel = "Save", cancelLabel = "Cancel", secondaryAction, size = "md", labels, "data-testid": testId = "form-drawer", }) {
15
+ export default function FormDrawer({ isOpen, onClose, title, description, sections, errors = [], isDirty, onSubmit, isSubmitting = false, isSubmitDisabled = false, submitLabel = "Save", cancelLabel = "Cancel", secondaryAction, size = "md", labels, "data-testid": testId = "form-drawer", }) {
16
16
  const { colors } = useCustomTheme();
17
17
  const uid = useId();
18
18
  const formId = `${uid}-form`;
@@ -45,7 +45,7 @@ export default function FormDrawer({ isOpen, onClose, title, description, sectio
45
45
  };
46
46
  const submit = (event) => {
47
47
  event.preventDefault();
48
- if (isSubmitting)
48
+ if (isSubmitting || isSubmitDisabled)
49
49
  return;
50
50
  focusPending.current = true;
51
51
  setAttempt((n) => n + 1);
@@ -54,5 +54,5 @@ export default function FormDrawer({ isOpen, onClose, title, description, sectio
54
54
  return (_jsxs(Drawer, { isOpen: isOpen, onClose: requestClose, size: size, closeOnEsc: !isSubmitting, closeOnOverlayClick: !isSubmitting, portalChildren: _jsx(AlertDialog, { isOpen: confirmDiscard, onClose: () => setConfirmDiscard(false), leastDestructiveRef: keepEditingRef, isCentered: true, tone: "danger", title: text.discardTitle, content: _jsx(Text, { fontSize: "sm", color: colors.text[800], children: text.discardBody }), cancelButtonText: text.keepEditing, confirmButtonText: text.discard, onConfirm: () => {
55
55
  setConfirmDiscard(false);
56
56
  onClose();
57
- } }), children: [_jsxs(DrawerHeader, { children: [_jsx(Heading, { id: titleId, as: "h2", fontSize: "md", fontWeight: 600, color: colors.header[900], children: title }), description ? (_jsx(Text, { mt: 0.5, fontSize: "sm", fontWeight: 400, color: colors.textMuted, children: description })) : null] }), _jsx(DrawerBody, { children: _jsx(Box, { as: "form", id: formId, "aria-labelledby": titleId, onSubmit: submit, noValidate: true, "data-testid": testId, children: _jsxs(Flex, { direction: "column", gap: 5, pt: 2, children: [errors.length ? (_jsxs(Alert, { ref: summaryRef, tabIndex: -1, status: "error", variant: "subtle", borderRadius: "md", alignItems: "flex-start", "data-testid": `${testId}-errors`, children: [_jsx(AlertIcon, {}), _jsxs(Box, { children: [_jsx(AlertTitle, { fontSize: "sm", children: text.fixErrors }), _jsx(AlertDescription, { fontSize: "sm", children: _jsx(UnorderedList, { mt: 1, children: errors.map((message) => (_jsx(ListItem, { children: message }, message))) }) })] })] })) : null, sections.map((section, index) => (_jsxs(Fragment, { children: [index > 0 ? _jsx(Divider, { borderColor: colors.boxborder[200] }) : null, _jsxs(Flex, { as: "section", direction: "column", gap: 4, "aria-label": section.title, children: [section.title ? (_jsxs(Box, { children: [_jsx(Heading, { as: "h3", fontSize: "sm", fontWeight: 600, color: colors.header[900], children: section.title }), section.description ? (_jsx(Text, { mt: 0.5, fontSize: "xs", color: colors.textMuted, children: section.description })) : null] })) : null, section.content] })] }, section.id)))] }) }) }), _jsx(DrawerFooter, { children: _jsxs(Flex, { gap: 2, w: "100%", justify: "flex-end", wrap: "wrap", children: [secondaryAction, _jsx(Button, { variant: "ghost", colorScheme: "gray", onClick: requestClose, isDisabled: isSubmitting, label: cancelLabel }), _jsx(Button, { variant: "solid", colorScheme: "primary", type: "submit", form: formId, isLoading: isSubmitting, loadingText: submitLabel, label: submitLabel, "data-testid": `${testId}-submit` })] }) })] }));
57
+ } }), children: [_jsxs(DrawerHeader, { children: [_jsx(Heading, { id: titleId, as: "h2", fontSize: "md", fontWeight: 600, color: colors.header[900], children: title }), description ? (_jsx(Text, { mt: 0.5, fontSize: "sm", fontWeight: 400, color: colors.textMuted, children: description })) : null] }), _jsx(DrawerBody, { children: _jsx(Box, { as: "form", id: formId, "aria-labelledby": titleId, onSubmit: submit, noValidate: true, "data-testid": testId, children: _jsxs(Flex, { direction: "column", gap: 5, pt: 2, children: [errors.length ? (_jsxs(Alert, { ref: summaryRef, tabIndex: -1, status: "error", variant: "subtle", borderRadius: "md", alignItems: "flex-start", "data-testid": `${testId}-errors`, children: [_jsx(AlertIcon, {}), _jsxs(Box, { children: [_jsx(AlertTitle, { fontSize: "sm", children: text.fixErrors }), _jsx(AlertDescription, { fontSize: "sm", children: _jsx(UnorderedList, { mt: 1, children: errors.map((message) => (_jsx(ListItem, { children: message }, message))) }) })] })] })) : null, sections.map((section, index) => (_jsxs(Fragment, { children: [index > 0 ? _jsx(Divider, { borderColor: colors.boxborder[200] }) : null, _jsxs(Flex, { as: "section", direction: "column", gap: 4, "aria-label": section.title, children: [section.title ? (_jsxs(Box, { children: [_jsx(Heading, { as: "h3", fontSize: "sm", fontWeight: 600, color: colors.header[900], children: section.title }), section.description ? (_jsx(Text, { mt: 0.5, fontSize: "xs", color: colors.textMuted, children: section.description })) : null] })) : null, section.content] })] }, section.id)))] }) }) }), _jsx(DrawerFooter, { children: _jsxs(Flex, { gap: 2, w: "100%", justify: "flex-end", wrap: "wrap", children: [secondaryAction, _jsx(Button, { variant: "ghost", colorScheme: "gray", onClick: requestClose, isDisabled: isSubmitting, label: cancelLabel }), _jsx(Button, { variant: "solid", colorScheme: "primary", type: "submit", form: formId, isLoading: isSubmitting, isDisabled: isSubmitDisabled, loadingText: submitLabel, label: submitLabel, "data-testid": `${testId}-submit` })] }) })] }));
58
58
  }