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

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 (299) hide show
  1. package/CHANGELOG.md +61 -4
  2. package/COMPONENT-GOTCHAS.md +98 -59
  3. package/DESIGN-GUIDE.md +18 -6
  4. package/README.md +14 -11
  5. package/dist/Components/Accordion/AccordionProps.d.ts +10 -0
  6. package/dist/Components/AddressCard/AddressCardProps.d.ts +15 -0
  7. package/dist/Components/Apexcharts/ApexAreaChart/ApexAreaChartProps.d.ts +11 -0
  8. package/dist/Components/Apexcharts/ApexBarChart/ApexBarChartProps.d.ts +17 -1
  9. package/dist/Components/Apexcharts/ApexLineChart/ApexLineChartProps.d.ts +10 -0
  10. package/dist/Components/Apexcharts/ApexPieChart/ApexPieChartProps.d.ts +14 -0
  11. package/dist/Components/Apexcharts/ApexPolarCharts/ApexPolarChartsProps.d.ts +9 -0
  12. package/dist/Components/Apexcharts/ApexRadialChart/ApexRadialChartProps.d.ts +10 -0
  13. package/dist/Components/AppSwitcher/AppSwitcher.d.ts +1 -0
  14. package/dist/Components/AppSwitcher/AppSwitcher.js +1 -0
  15. package/dist/Components/AppSwitcher/AppSwitcherProps.d.ts +23 -0
  16. package/dist/Components/AppSwitcher/pixelizeSuite.d.ts +1 -0
  17. package/dist/Components/AppearanceSettings/AppearanceSettings.d.ts +1 -0
  18. package/dist/Components/AppearanceSettings/AppearanceSettings.js +1 -0
  19. package/dist/Components/AppearanceSettings/AppearanceSettingsProps.d.ts +11 -0
  20. package/dist/Components/AudioRecorder/AudioRecorder.d.ts +1 -0
  21. package/dist/Components/AudioRecorder/AudioRecorder.js +1 -0
  22. package/dist/Components/AudioRecorder/AudioRecorderProps.d.ts +6 -0
  23. package/dist/Components/Avatar/AvatarGroup.d.ts +1 -0
  24. package/dist/Components/Avatar/AvatarGroup.js +1 -0
  25. package/dist/Components/Avatar/AvatarGroupProps.d.ts +2 -0
  26. package/dist/Components/Avatar/AvatarProps.d.ts +2 -2
  27. package/dist/Components/Avatar/avatarColorway.d.ts +1 -0
  28. package/dist/Components/BagBar/BagBarProps.d.ts +8 -0
  29. package/dist/Components/BulkSelectionBar/BulkSelectionBar.d.ts +1 -0
  30. package/dist/Components/BulkSelectionBar/BulkSelectionBar.js +1 -0
  31. package/dist/Components/BulkSelectionBar/BulkSelectionBarProps.d.ts +6 -0
  32. package/dist/Components/Button/Button.js +1 -0
  33. package/dist/Components/Button/ButtonProps.d.ts +3 -0
  34. package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.d.ts +1 -0
  35. package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.js +1 -0
  36. package/dist/Components/ButtonGroupIcon/ButtonGroupIconProps.d.ts +19 -0
  37. package/dist/Components/CalendarGrid/CalendarGrid.d.ts +1 -0
  38. package/dist/Components/CalendarGrid/CalendarGrid.js +1 -0
  39. package/dist/Components/CalendarGrid/CalendarGridProps.d.ts +11 -0
  40. package/dist/Components/CalendarGrid/calendarMath.d.ts +13 -0
  41. package/dist/Components/Card/CardProps.d.ts +4 -0
  42. package/dist/Components/Card/PaymentCard/PaymentCard.d.ts +1 -0
  43. package/dist/Components/Card/PaymentCard/PaymentCard.js +1 -0
  44. package/dist/Components/Card/PaymentCard/PaymentCardProps.d.ts +19 -0
  45. package/dist/Components/CartItem/CartItemProps.d.ts +10 -0
  46. package/dist/Components/Checkbox/CheckboxProps.d.ts +1 -0
  47. package/dist/Components/ChoiceCard/ChoiceCard.d.ts +1 -0
  48. package/dist/Components/ChoiceCard/ChoiceCard.js +1 -0
  49. package/dist/Components/ChoiceCard/ChoiceCardGroup.d.ts +1 -0
  50. package/dist/Components/ChoiceCard/ChoiceCardGroup.js +1 -0
  51. package/dist/Components/ChoiceCard/ChoiceCardProps.d.ts +3 -0
  52. package/dist/Components/ConfirmDialog/ConfirmDialog.d.ts +1 -0
  53. package/dist/Components/ConfirmDialog/ConfirmDialog.js +1 -0
  54. package/dist/Components/ConfirmDialog/ConfirmDialogProps.d.ts +5 -0
  55. package/dist/Components/ContactForm/ContactFormProps.d.ts +13 -0
  56. package/dist/Components/CouponField/CouponFieldProps.d.ts +16 -0
  57. package/dist/Components/CustomModulesTable/CustomModulesTable.d.ts +1 -0
  58. package/dist/Components/CustomModulesTable/CustomModulesTable.js +1 -0
  59. package/dist/Components/CustomModulesTable/CustomModulesTableProps.d.ts +17 -0
  60. package/dist/Components/CustomModulesTable/DeleteModuleModal.d.ts +1 -0
  61. package/dist/Components/CustomModulesTable/DeleteModuleModal.js +1 -0
  62. package/dist/Components/CustomModulesTable/EditModuleModal.d.ts +1 -0
  63. package/dist/Components/CustomModulesTable/EditModuleModal.js +1 -0
  64. package/dist/Components/DatePicker/DatePickerProps.d.ts +7 -1
  65. package/dist/Components/DetailSections/DetailSectionsProps.d.ts +22 -0
  66. package/dist/Components/Drawer/DrawerProps.d.ts +1 -1
  67. package/dist/Components/Dropdown/DropdownProps.d.ts +1 -0
  68. package/dist/Components/Editor/EditorProps.d.ts +33 -0
  69. package/dist/Components/Editor/editorTokens.d.ts +3 -0
  70. package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtpProps.d.ts +8 -0
  71. package/dist/Components/FilePreview/FilePreviewProps.d.ts +4 -0
  72. package/dist/Components/FileUploader/FileUploaderProps.d.ts +1 -0
  73. package/dist/Components/FilterBar/FilterBarProps.d.ts +2 -0
  74. package/dist/Components/FormDrawer/FormDrawer.d.ts +1 -0
  75. package/dist/Components/FormDrawer/FormDrawer.js +1 -0
  76. package/dist/Components/FormDrawer/FormDrawerProps.d.ts +3 -0
  77. package/dist/Components/FormField/FormField.d.ts +1 -0
  78. package/dist/Components/FormField/FormField.js +1 -0
  79. package/dist/Components/FormField/FormFieldProps.d.ts +4 -0
  80. package/dist/Components/Header/Header.d.ts +1 -0
  81. package/dist/Components/Header/Header.js +1 -0
  82. package/dist/Components/Header/HeaderActions.d.ts +16 -0
  83. package/dist/Components/Header/HeaderActions.js +1 -0
  84. package/dist/Components/Header/HeaderProps.d.ts +22 -0
  85. package/dist/Components/Header/components/desktopMenu.d.ts +1 -0
  86. package/dist/Components/Header/components/desktopMenu.js +1 -0
  87. package/dist/Components/Header/components/mobileMenu.d.ts +1 -0
  88. package/dist/Components/Header/components/mobileMenu.js +1 -0
  89. package/dist/Components/KanbanBoard/KanbanActions/KanbanActions.d.ts +1 -1
  90. package/dist/Components/KanbanBoard/KanbanActions/KanbanActions.js +1 -1
  91. package/dist/Components/KanbanBoard/KanbanBoardProps.d.ts +11 -0
  92. package/dist/Components/Kbd/Kbd.d.ts +1 -0
  93. package/dist/Components/Kbd/Kbd.js +1 -0
  94. package/dist/Components/Kbd/KbdProps.d.ts +4 -0
  95. package/dist/Components/LauncherTrigger/LauncherTrigger.d.ts +1 -0
  96. package/dist/Components/LauncherTrigger/LauncherTrigger.js +1 -0
  97. package/dist/Components/LauncherTrigger/LauncherTriggerProps.d.ts +1 -0
  98. package/dist/Components/LimitReachedModal/LimitReachedModal.d.ts +1 -0
  99. package/dist/Components/LimitReachedModal/LimitReachedModal.js +1 -0
  100. package/dist/Components/LimitReachedModal/LimitReachedModalProps.d.ts +7 -0
  101. package/dist/Components/Loading/LoadingProps.d.ts +2 -0
  102. package/dist/Components/MediaGallery/MediaGalleryProps.d.ts +7 -1
  103. package/dist/Components/MediaGallery/MediaLightboxProps.d.ts +5 -0
  104. package/dist/Components/MediaViewer/components/MediaAudioPlayer.d.ts +1 -0
  105. package/dist/Components/MediaViewer/components/MediaAudioPlayer.js +1 -0
  106. package/dist/Components/MediaViewer/components/MediaDocumentStage.d.ts +1 -0
  107. package/dist/Components/MediaViewer/components/MediaDocumentStage.js +1 -0
  108. package/dist/Components/MediaViewer/components/MediaImageViewer.d.ts +1 -0
  109. package/dist/Components/MediaViewer/components/MediaImageViewer.js +1 -0
  110. package/dist/Components/MediaViewer/components/MediaVideoPlayer.d.ts +1 -0
  111. package/dist/Components/MediaViewer/components/MediaVideoPlayer.js +1 -0
  112. package/dist/Components/MediaViewer/components/MediaVideoPlayerProps.d.ts +1 -0
  113. package/dist/Components/MediaViewer/hooks/useFileViewer.d.ts +1 -0
  114. package/dist/Components/MediaViewer/mediaItems.d.ts +25 -0
  115. package/dist/Components/MediaViewer/mediaItems.js +5 -0
  116. package/dist/Components/Modal/Modal.d.ts +3 -0
  117. package/dist/Components/Modal/Modal.js +3 -0
  118. package/dist/Components/Modal/ModalProps.d.ts +6 -1
  119. package/dist/Components/MoreItems/MoreItemsProps.d.ts +2 -0
  120. package/dist/Components/MultiSelect/MultiSelect.d.ts +1 -0
  121. package/dist/Components/MultiSelect/MultiSelect.js +1 -0
  122. package/dist/Components/MultiSelect/MultiSelectProps.d.ts +13 -0
  123. package/dist/Components/NavLauncher/NavLauncherProps.d.ts +58 -0
  124. package/dist/Components/NavLauncher/engine/engine.d.ts +19 -0
  125. package/dist/Components/NavLauncher/match.d.ts +34 -0
  126. package/dist/Components/NavigationBar/NavigationBar.d.ts +1 -0
  127. package/dist/Components/NavigationBar/NavigationBar.js +1 -0
  128. package/dist/Components/NavigationBar/NavigationBarProps.d.ts +15 -0
  129. package/dist/Components/NoteTextArea/NoteTextAreaProps.d.ts +2 -1
  130. package/dist/Components/NotificationBell/NotificationBellProps.d.ts +27 -0
  131. package/dist/Components/NotificationBell/notificationHelpers.d.ts +13 -0
  132. package/dist/Components/NumberInput/NumberInputProps.d.ts +1 -1
  133. package/dist/Components/OffersList/OffersListProps.d.ts +12 -1
  134. package/dist/Components/OptionChip/OptionChipProps.d.ts +5 -0
  135. package/dist/Components/OrderStatusTimeline/OrderStatusTimelineProps.d.ts +10 -0
  136. package/dist/Components/OrderSummary/OrderSummaryProps.d.ts +10 -0
  137. package/dist/Components/OrgSwitcher/OrgSwitcher.d.ts +1 -0
  138. package/dist/Components/OrgSwitcher/OrgSwitcher.js +11 -3
  139. package/dist/Components/OrgSwitcher/OrgSwitcherProps.d.ts +1 -0
  140. package/dist/Components/OrganizationDetails/OrganizationDetailsProps.d.ts +52 -0
  141. package/dist/Components/PageHeader/PageHeaderProps.d.ts +1 -0
  142. package/dist/Components/Pagination/PaginationProps.d.ts +4 -0
  143. package/dist/Components/PaymentOption/PaymentOptionProps.d.ts +9 -0
  144. package/dist/Components/PincodeChecker/PincodeCheckerProps.d.ts +13 -0
  145. package/dist/Components/PlanPill/PlanPill.d.ts +1 -0
  146. package/dist/Components/PlanPill/PlanPill.js +1 -0
  147. package/dist/Components/PlanPill/PlanPillProps.d.ts +1 -0
  148. package/dist/Components/PriceBlock/PriceBlockProps.d.ts +6 -0
  149. package/dist/Components/ProductBadges/ProductBadgesProps.d.ts +3 -0
  150. package/dist/Components/ProductCard/ProductCardProps.d.ts +10 -0
  151. package/dist/Components/ProductCard/QuickAddSheetProps.d.ts +8 -0
  152. package/dist/Components/ProductDetails/ProductDetailsProps.d.ts +25 -1
  153. package/dist/Components/ProfileCard/ProfileCardProps.d.ts +1 -1
  154. package/dist/Components/QuantityStepper/QuantityStepperProps.d.ts +9 -0
  155. package/dist/Components/QueryState/QueryStateProps.d.ts +2 -0
  156. package/dist/Components/RadioButton/RadioButtonProps.d.ts +1 -1
  157. package/dist/Components/Rating/RatingProps.d.ts +2 -0
  158. package/dist/Components/Reorder/ReorderProps.d.ts +6 -0
  159. package/dist/Components/ReviewList/ReviewListProps.d.ts +21 -0
  160. package/dist/Components/ReviewSummary/ReviewSummaryProps.d.ts +8 -1
  161. package/dist/Components/RolesPermission/RolesPermissionProps.d.ts +59 -1
  162. package/dist/Components/SearchSelect/SearchSelect.js +17 -5
  163. package/dist/Components/SearchSelect/SearchSelectProps.d.ts +12 -0
  164. package/dist/Components/SectionRail/SectionRail.d.ts +1 -0
  165. package/dist/Components/SectionRail/SectionRail.js +1 -0
  166. package/dist/Components/SectionRail/SectionRailProps.d.ts +4 -0
  167. package/dist/Components/SegmentedControl/SegmentedControlProps.d.ts +4 -0
  168. package/dist/Components/Select/Select.styles.js +25 -0
  169. package/dist/Components/Select/SelectNative.d.ts +10 -0
  170. package/dist/Components/Select/SelectNative.js +11 -4
  171. package/dist/Components/Select/SelectPopup.js +45 -14
  172. package/dist/Components/Select/SelectProps.d.ts +46 -2
  173. package/dist/Components/Select/selectKeyboardRing.d.ts +2 -0
  174. package/dist/Components/Select/selectKeyboardRing.js +7 -0
  175. package/dist/Components/Select/selectRowInk.d.ts +14 -0
  176. package/dist/Components/Select/selectRowInk.js +41 -0
  177. package/dist/Components/SelectSearch/SelectSearch.js +8 -2
  178. package/dist/Components/SelectSearch/SelectSearchProps.d.ts +9 -0
  179. package/dist/Components/SelectV2/SelectV2Props.d.ts +7 -0
  180. package/dist/Components/SideBar/SecondaryBar.d.ts +1 -0
  181. package/dist/Components/SideBar/SecondaryBar.js +1 -0
  182. package/dist/Components/SideBar/SideBar.d.ts +1 -0
  183. package/dist/Components/SideBar/SideBar.js +1 -0
  184. package/dist/Components/SideBar/SideBarProps.d.ts +32 -0
  185. package/dist/Components/SideBar/sidebarAccentColors.d.ts +2 -0
  186. package/dist/Components/SignInActivityTable/SignInActivityTable.d.ts +1 -0
  187. package/dist/Components/SignInActivityTable/SignInActivityTable.js +1 -0
  188. package/dist/Components/SignInActivityTable/SignInActivityTableProps.d.ts +2 -0
  189. package/dist/Components/SpecTable/SpecTableProps.d.ts +9 -0
  190. package/dist/Components/StageProgress/StageProgressProps.d.ts +2 -0
  191. package/dist/Components/StageProgress/StepperStage.d.ts +1 -0
  192. package/dist/Components/StageProgress/StepperStage.js +1 -0
  193. package/dist/Components/StatCard/StatCardProps.d.ts +1 -0
  194. package/dist/Components/StatusTag/StatusTagProps.d.ts +4 -0
  195. package/dist/Components/StickyBuyBar/StickyBuyBar.d.ts +1 -0
  196. package/dist/Components/StickyBuyBar/StickyBuyBar.js +1 -0
  197. package/dist/Components/StickyBuyBar/StickyBuyBarProps.d.ts +6 -0
  198. package/dist/Components/StockStatus/StockStatusProps.d.ts +2 -0
  199. package/dist/Components/Switch/SwitchProps.d.ts +4 -0
  200. package/dist/Components/Table/TableProps.d.ts +19 -0
  201. package/dist/Components/Table/variants/tokens.d.ts +4 -0
  202. package/dist/Components/Tabs/TabsContext.d.ts +14 -0
  203. package/dist/Components/Tabs/TabsProps.d.ts +18 -0
  204. package/dist/Components/Tabs/components/CountBadge.d.ts +4 -0
  205. package/dist/Components/Tabs/components/TabPanels.d.ts +1 -0
  206. package/dist/Components/Tabs/components/TabPanels.js +1 -0
  207. package/dist/Components/Tabs/tabStyles.d.ts +4 -0
  208. package/dist/Components/Tag/TagProps.d.ts +3 -0
  209. package/dist/Components/TagInput/TagInput.d.ts +1 -0
  210. package/dist/Components/TagInput/TagInput.js +1 -0
  211. package/dist/Components/TagInput/TagInputProps.d.ts +2 -0
  212. package/dist/Components/TimePicker/TimePicker.d.ts +1 -0
  213. package/dist/Components/TimePicker/TimePicker.js +1 -0
  214. package/dist/Components/TimePicker/TimePickerProps.d.ts +2 -0
  215. package/dist/Components/Timeline/TimelineProps.d.ts +7 -1
  216. package/dist/Components/Toggle/TableToggleProps.d.ts +2 -0
  217. package/dist/Components/ToggleSwitch/ToggleSwitchProps.d.ts +2 -0
  218. package/dist/Components/ToolTip/OverflowToolTip.d.ts +1 -0
  219. package/dist/Components/ToolTip/OverflowToolTip.js +1 -1
  220. package/dist/Components/ToolTip/ToolTipProps.d.ts +1 -0
  221. package/dist/Components/TrustBadges/TrustBadgesProps.d.ts +4 -0
  222. package/dist/Components/UpgradeButton/UpgradeButton.d.ts +1 -0
  223. package/dist/Components/UpgradeButton/UpgradeButton.js +1 -0
  224. package/dist/Components/UpgradeButton/UpgradeButtonProps.d.ts +4 -1
  225. package/dist/Components/UserDetails/UserDetailsProps.d.ts +58 -0
  226. package/dist/Components/VariantSelector/VariantSelectorProps.d.ts +4 -0
  227. package/dist/Components/WishlistToggle/WishlistToggleProps.d.ts +4 -0
  228. package/dist/Components/WizardDialog/WizardDialogProps.d.ts +15 -0
  229. package/dist/Components/WizardDialog/wizardSteps.d.ts +17 -5
  230. package/dist/Components/WorkspaceWindow/WorkspaceTrayPreview.d.ts +1 -0
  231. package/dist/Components/WorkspaceWindow/WorkspaceTrayPreview.js +1 -1
  232. package/dist/Components/WorkspaceWindow/WorkspaceWindow.d.ts +2 -0
  233. package/dist/Components/WorkspaceWindow/WorkspaceWindow.js +2 -1
  234. package/dist/Components/WorkspaceWindow/WorkspaceWindowProps.d.ts +13 -0
  235. package/dist/Theme/tokens/brands/index.d.ts +1 -1
  236. package/dist/Theme/tokens/brands/index.js +1 -1
  237. package/dist/Theme/tokens/builders/rowStates.d.ts +6 -0
  238. package/dist/Theme/tokens/builders/rowStates.js +14 -1
  239. package/dist/Theme/tokens/builders/scrollShadow.d.ts +1 -0
  240. package/dist/Theme/tokens/builders/scrollShadow.js +16 -0
  241. package/dist/esm/Components/AppSwitcher/AppSwitcher.js +1 -0
  242. package/dist/esm/Components/AppearanceSettings/AppearanceSettings.js +1 -0
  243. package/dist/esm/Components/AudioRecorder/AudioRecorder.js +1 -0
  244. package/dist/esm/Components/Avatar/AvatarGroup.js +1 -0
  245. package/dist/esm/Components/BulkSelectionBar/BulkSelectionBar.js +1 -0
  246. package/dist/esm/Components/Button/Button.js +1 -0
  247. package/dist/esm/Components/ButtonGroupIcon/ButtonGroupIcon.js +1 -0
  248. package/dist/esm/Components/CalendarGrid/CalendarGrid.js +1 -0
  249. package/dist/esm/Components/Card/PaymentCard/PaymentCard.js +1 -0
  250. package/dist/esm/Components/ChoiceCard/ChoiceCard.js +1 -0
  251. package/dist/esm/Components/ChoiceCard/ChoiceCardGroup.js +1 -0
  252. package/dist/esm/Components/ConfirmDialog/ConfirmDialog.js +1 -0
  253. package/dist/esm/Components/CustomModulesTable/CustomModulesTable.js +1 -0
  254. package/dist/esm/Components/CustomModulesTable/DeleteModuleModal.js +1 -0
  255. package/dist/esm/Components/CustomModulesTable/EditModuleModal.js +1 -0
  256. package/dist/esm/Components/FormDrawer/FormDrawer.js +1 -0
  257. package/dist/esm/Components/FormField/FormField.js +1 -0
  258. package/dist/esm/Components/Header/Header.js +1 -0
  259. package/dist/esm/Components/Header/HeaderActions.js +1 -0
  260. package/dist/esm/Components/Header/components/desktopMenu.js +1 -0
  261. package/dist/esm/Components/Header/components/mobileMenu.js +1 -0
  262. package/dist/esm/Components/KanbanBoard/KanbanActions/KanbanActions.js +1 -1
  263. package/dist/esm/Components/Kbd/Kbd.js +1 -0
  264. package/dist/esm/Components/LauncherTrigger/LauncherTrigger.js +1 -0
  265. package/dist/esm/Components/LimitReachedModal/LimitReachedModal.js +1 -0
  266. package/dist/esm/Components/MediaViewer/components/MediaAudioPlayer.js +1 -0
  267. package/dist/esm/Components/MediaViewer/components/MediaDocumentStage.js +1 -0
  268. package/dist/esm/Components/MediaViewer/components/MediaImageViewer.js +1 -0
  269. package/dist/esm/Components/MediaViewer/components/MediaVideoPlayer.js +1 -0
  270. package/dist/esm/Components/MediaViewer/mediaItems.js +5 -0
  271. package/dist/esm/Components/Modal/Modal.js +3 -0
  272. package/dist/esm/Components/MultiSelect/MultiSelect.js +1 -0
  273. package/dist/esm/Components/NavigationBar/NavigationBar.js +1 -0
  274. package/dist/esm/Components/OrgSwitcher/OrgSwitcher.js +13 -5
  275. package/dist/esm/Components/PlanPill/PlanPill.js +1 -0
  276. package/dist/esm/Components/SearchSelect/SearchSelect.js +19 -7
  277. package/dist/esm/Components/SectionRail/SectionRail.js +1 -0
  278. package/dist/esm/Components/Select/Select.styles.js +26 -1
  279. package/dist/esm/Components/Select/SelectNative.js +12 -5
  280. package/dist/esm/Components/Select/SelectPopup.js +47 -16
  281. package/dist/esm/Components/Select/selectKeyboardRing.js +3 -0
  282. package/dist/esm/Components/Select/selectRowInk.js +33 -0
  283. package/dist/esm/Components/SelectSearch/SelectSearch.js +10 -4
  284. package/dist/esm/Components/SideBar/SecondaryBar.js +1 -0
  285. package/dist/esm/Components/SideBar/SideBar.js +1 -0
  286. package/dist/esm/Components/SignInActivityTable/SignInActivityTable.js +1 -0
  287. package/dist/esm/Components/StageProgress/StepperStage.js +1 -0
  288. package/dist/esm/Components/StickyBuyBar/StickyBuyBar.js +1 -0
  289. package/dist/esm/Components/Tabs/components/TabPanels.js +1 -0
  290. package/dist/esm/Components/TagInput/TagInput.js +1 -0
  291. package/dist/esm/Components/TimePicker/TimePicker.js +1 -0
  292. package/dist/esm/Components/ToolTip/OverflowToolTip.js +1 -1
  293. package/dist/esm/Components/UpgradeButton/UpgradeButton.js +1 -0
  294. package/dist/esm/Components/WorkspaceWindow/WorkspaceTrayPreview.js +1 -1
  295. package/dist/esm/Components/WorkspaceWindow/WorkspaceWindow.js +2 -1
  296. package/dist/esm/Theme/tokens/brands/index.js +1 -1
  297. package/dist/esm/Theme/tokens/builders/rowStates.js +13 -1
  298. package/dist/esm/Theme/tokens/builders/scrollShadow.js +15 -0
  299. package/package.json +1 -1
@@ -5,27 +5,42 @@ export type PermissionKey = "read" | "create" | "edit" | "delete" | "import" | "
5
5
  export type Permission = {
6
6
  /** "Automation" (case-insensitive) is special-cased: every column collapses to the single automation flag below, only the Read cell renders. */
7
7
  module: string;
8
+ /** Read cell; for the Automation module it is the only cell shown and reflects `automation`. */
8
9
  read: boolean;
10
+ /** Whether the Create cell is checked. */
9
11
  create: boolean;
12
+ /** Whether the Edit cell is checked. */
10
13
  edit: boolean;
14
+ /** Whether the Delete cell is checked. */
11
15
  delete: boolean;
16
+ /** Whether the Import cell is checked; only rendered when `permissionKeys` includes it. */
12
17
  import?: boolean;
18
+ /** Whether the Export cell is checked; only rendered when `permissionKeys` includes it. */
13
19
  export?: boolean;
20
+ /** Flag the Automation module row reads and toggles instead of the per-column booleans. */
14
21
  automation?: boolean;
15
22
  };
16
23
  /** One row in the roles list — the same shape is passed back into onEditRole/onViewRole as the selected role. */
17
24
  export type RoleData = {
25
+ /** Shown in the list, truncated with an ellipsis when long. */
18
26
  roleName: string;
27
+ /** Shown as given in the Created By column. */
19
28
  createdBy: string;
29
+ /** Shown as given, unformatted, in the Created Time column. */
20
30
  created_at: string;
31
+ /** The role's matrix rows; not rendered in the list, handed back via `onEditRole`/`onViewRole` to prefill `permissions`. */
21
32
  permission: Permission[];
22
33
  /** Coerced via Number() before reaching onDeleteRole — a non-numeric id silently becomes NaN with no error. */
23
34
  roles_id: string;
24
35
  /** designation/makeSuperAdmin/automation/trackLocation/show_records: never read by this component — pass-through only, for the consumer to prefill its own form state on edit/view. */
25
36
  designation: string;
37
+ /** Pass-through for the consumer to prefill its form. */
26
38
  makeSuperAdmin?: boolean;
39
+ /** Pass-through for the consumer to prefill its form. */
27
40
  automation?: boolean;
41
+ /** Pass-through for the consumer to prefill its form. */
28
42
  trackLocation?: boolean;
43
+ /** Pass-through for the consumer to prefill its form. */
29
44
  show_records?: boolean;
30
45
  };
31
46
  /** Top-level switch: "list" renders the roles table, "form" renders the create/edit/view role form. */
@@ -37,38 +52,71 @@ export type RolesPermissionMode = "create" | "edit" | "view";
37
52
  * key has a sensible English default so the component works standalone.
38
53
  */
39
54
  export type RolesPermissionLabels = {
55
+ /** Heading of the roles list. */
40
56
  title?: string;
57
+ /** Prefix of the role-count badge ("Total Roles: 4"). */
41
58
  totalRoles?: string;
59
+ /** Text of the new-role button. */
42
60
  newRole?: string;
61
+ /** Serial-number column header. */
43
62
  sNo?: string;
63
+ /** Role name column header. */
44
64
  roleNameColumn?: string;
65
+ /** Created-by column header. */
45
66
  createdBy?: string;
67
+ /** Created-time column header. */
46
68
  createdTime?: string;
69
+ /** Actions column header. */
47
70
  actions?: string;
71
+ /** Empty-state title when there are no roles. */
48
72
  noRoles?: string;
73
+ /** Name and tooltip of the row View icon. */
49
74
  view?: string;
75
+ /** Name and tooltip of the row Edit icon. */
50
76
  edit?: string;
77
+ /** Name and tooltip of the row Delete icon, and the confirm button of the delete dialog. */
51
78
  delete?: string;
79
+ /** Heading of the role details card in the form. */
52
80
  roleInformation?: string;
81
+ /** Label of the role name input. */
53
82
  roleName?: string;
83
+ /** Placeholder of the role name input. */
54
84
  roleNamePlaceholder?: string;
85
+ /** Label of the super-admin checkbox. */
55
86
  enableAllPermissions?: string;
87
+ /** Label of the track-location checkbox. */
56
88
  trackLocation?: string;
89
+ /** Label of the show-all-records checkbox. */
57
90
  showAllUserRecords?: string;
91
+ /** Heading of the permission matrix card. */
58
92
  permissionSettings?: string;
93
+ /** Module column header of the matrix. */
59
94
  moduleName?: string;
95
+ /** Read column header. */
60
96
  read?: string;
97
+ /** Create column header. */
61
98
  create?: string;
99
+ /** Edit column header. */
62
100
  editPermission?: string;
101
+ /** Delete column header. */
63
102
  deletePermission?: string;
103
+ /** Import column header. */
64
104
  importPermission?: string;
105
+ /** Export column header. */
65
106
  exportPermission?: string;
107
+ /** Shown in the matrix when `permissions` is empty. */
66
108
  noPermissions?: string;
109
+ /** Text of the form Cancel button and the delete dialog cancel button. */
67
110
  cancel?: string;
111
+ /** Save button text when not `isEditing`. */
68
112
  saveChanges?: string;
113
+ /** Save button text when `isEditing`. */
69
114
  updateChanges?: string;
115
+ /** Tooltip on the disabled role name input in view mode. */
70
116
  readOnly?: string;
117
+ /** Title of the delete confirmation dialog. */
71
118
  deleteRole?: string;
119
+ /** Body text of the delete confirmation dialog. */
72
120
  deleteRoleConfirm?: string;
73
121
  };
74
122
  /** Role list + role/permission-matrix form in one component (switch via `view`) — manages role definitions only, not user-to-role assignment (that's UserDetails' Change Role). */
@@ -79,6 +127,7 @@ export interface RolesPermissionProps {
79
127
  mode?: RolesPermissionMode;
80
128
  /** Roles list data. */
81
129
  roles: RoleData[];
130
+ /** Shows skeleton rows instead of the table and hides the role-count badge. */
82
131
  isRolesLoading?: boolean;
83
132
  /** Permission matrix rows for the form view. */
84
133
  permissions: Permission[];
@@ -86,10 +135,13 @@ export interface RolesPermissionProps {
86
135
  permissionKeys?: PermissionKey[];
87
136
  /** Form field values — fully controlled, no internal state; edits are invisible without the matching handler below. */
88
137
  roleName: string;
138
+ /** Error text under the role name input; any non-empty value also marks it invalid. */
89
139
  roleNameError?: string;
90
140
  /** Toggling this does not itself grant matrix permissions — it's cosmetic until the consumer applies that logic. */
91
141
  isSuperAdmin: boolean;
142
+ /** Checked state of the track-location checkbox. */
92
143
  isTrackLocation: boolean;
144
+ /** Checked state of the show-all-records checkbox. */
93
145
  isShowRecords: boolean;
94
146
  /** Whether the role is being edited (changes the Save button label). */
95
147
  isEditing?: boolean;
@@ -97,7 +149,9 @@ export interface RolesPermissionProps {
97
149
  isSaving?: boolean;
98
150
  /** List actions. */
99
151
  onNewRole?: () => void;
152
+ /** Fires with the role when its View icon is pressed. */
100
153
  onViewRole?: (role: RoleData) => void;
154
+ /** Fires with the role when its Edit icon is pressed. */
101
155
  onEditRole?: (role: RoleData) => void;
102
156
  /** Called synchronously right before the modal closes — no await, no loading state; errors must be surfaced outside this flow. */
103
157
  onDeleteRole?: (roleId: number) => void;
@@ -105,13 +159,17 @@ export interface RolesPermissionProps {
105
159
  onBack?: () => void;
106
160
  /** Form actions. */
107
161
  onRoleNameChange?: (value: string) => void;
162
+ /** Fires with the new checked state of the enable-all-permissions checkbox. */
108
163
  onToggleSuperAdmin?: (checked: boolean) => void;
164
+ /** Fires with the new checked state of the track-location checkbox. */
109
165
  onToggleTrackLocation?: (checked: boolean) => void;
166
+ /** Fires with the new checked state of the show-all-records checkbox. */
110
167
  onToggleShowRecords?: (checked: boolean) => void;
111
168
  /** Fires with key "automation" (not "read") for a module named "automation" — see Permission.module. */
112
169
  onPermissionChange?: (module: string, key: PermissionKey) => void;
170
+ /** Fires when the Save or Update button is pressed; the footer is hidden in view mode. */
113
171
  onSave?: () => void;
114
- /** Header back icon renders only when set; the footer Cancel button always renders and no-ops without it. */
172
+ /** Header back icon renders only when set; the footer Cancel button renders outside view mode and no-ops without it. */
115
173
  onCancelForm?: () => void;
116
174
  /** App-specific sections rendered under the roles list (e.g. ModuleDelete, SignInActivity). */
117
175
  footerSlot?: ReactNode;
@@ -48,6 +48,8 @@ const planeStep_1 = require("../../Theme/tokens/builders/planeStep");
48
48
  const rowStates_1 = require("../../Theme/tokens/builders/rowStates");
49
49
  const optionRowSizes_1 = require("../../Theme/tokens/primitives/optionRowSizes");
50
50
  const optionRowInk_1 = require("../Select/optionRowInk");
51
+ const selectKeyboardRing_1 = require("../Select/selectKeyboardRing");
52
+ const selectRowInk_1 = require("../Select/selectRowInk");
51
53
  const useExclusiveOverlay_1 = require("../../Hooks/useExclusiveOverlay");
52
54
  const FieldMessage_1 = __importDefault(require("../Common/FieldMessage"));
53
55
  const useFieldIds_1 = require("../Common/useFieldIds");
@@ -79,9 +81,9 @@ const normalizeMultiValue = (val) => {
79
81
  return [];
80
82
  };
81
83
  const DECORATIVE_CHECKBOX_SX = { pointerEvents: "none", "& input": { visibility: "hidden" } };
82
- const OptionRow = react_1.default.memo(function OptionRow({ option, index, optionId, isSelected, isActive, isMultiple, spec, colors, rowBackgrounds, checkboxSize, onSelect, onActivate, }) {
84
+ const OptionRow = react_1.default.memo(function OptionRow({ option, index, optionId, isSelected, isActive, showRing, isMultiple, spec, colors, rowBackgrounds, checkboxSize, onSelect, onActivate, }) {
83
85
  const singleSelected = isSelected && !isMultiple;
84
- return ((0, jsx_runtime_1.jsxs)(react_2.Box, { id: optionId, "data-index": index, role: "option", "aria-selected": isSelected, mx: spec.mx, py: spec.py, px: spec.px, minH: spec.minH, borderRadius: optionRowSizes_1.OPTION_ROW_RADIUS, cursor: "pointer", bg: (0, optionRowInk_1.optionRowFill)(rowBackgrounds, isActive), onClick: () => onSelect(option), onMouseEnter: () => onActivate(index), display: "flex", alignItems: "center", gap: spec.gap, color: (0, optionRowInk_1.optionRowInk)(colors, singleSelected),
86
+ return ((0, jsx_runtime_1.jsxs)(react_2.Box, { id: optionId, "data-index": index, role: "option", "aria-selected": isSelected, mx: spec.mx, py: spec.py, px: spec.px, minH: spec.minH, borderRadius: optionRowSizes_1.OPTION_ROW_RADIUS, cursor: "pointer", bg: (0, selectRowInk_1.selectRowFill)(rowBackgrounds, { isSelected, isActive }), boxShadow: showRing ? (0, selectKeyboardRing_1.keyboardRingShadow)(rowBackgrounds.keyboardRing) : undefined, onClick: () => onSelect(option), onMouseEnter: () => onActivate(index), display: "flex", alignItems: "center", gap: spec.gap, color: (0, selectRowInk_1.selectRowInk)(colors, singleSelected),
85
87
  // `view` is consumer JSX with no size of its own; it inherited the 16px body font.
86
88
  fontSize: spec.fontSize, fontWeight: (0, optionRowInk_1.optionRowWeight)(singleSelected), children: [isMultiple && ((0, jsx_runtime_1.jsx)(Checkbox_1.default, { isChecked: isSelected, sx: DECORATIVE_CHECKBOX_SX, size: checkboxSize })), option.view ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: option.view })) : ((0, jsx_runtime_1.jsx)(react_2.Text, { flex: 1, minW: 0, isTruncated: true, children: option.label })), singleSelected && ((0, jsx_runtime_1.jsx)(react_2.Box, { as: lucide_react_1.Check, size: spec.iconSize, color: colors.accentText, flexShrink: 0 }))] }));
87
89
  });
@@ -117,7 +119,8 @@ const SearchSelect = ({ id, label, options, onChange, onSelect, onSearch, isOpti
117
119
  width: 0,
118
120
  });
119
121
  const theme = (0, useCustomTheme_1.useCustomTheme)();
120
- const rowBackgrounds = (0, react_1.useMemo)(() => (0, rowStates_1.listRowBackgrounds)(theme.colors), [theme.colors]);
122
+ const rowBackgrounds = (0, react_1.useMemo)(() => (0, rowStates_1.selectRowBackgrounds)(theme.colors), [theme.colors]);
123
+ const insideRowBackgrounds = (0, react_1.useMemo)(() => (0, rowStates_1.listRowBackgrounds)(theme.colors), [theme.colors]);
121
124
  // NOTE: inset — the trigger sits flush in the field and the menu clips overflow.
122
125
  const insideFocusRing = {
123
126
  outline: "2px solid transparent",
@@ -131,6 +134,7 @@ const SearchSelect = ({ id, label, options, onChange, onSelect, onSearch, isOpti
131
134
  const selectAllId = `${baseId}-select-all`;
132
135
  const addNewId = `${baseId}-add-new`;
133
136
  const [activeIndex, setActiveIndex] = (0, react_1.useState)(searchSelectNav_1.NO_ROW);
137
+ const [isKeyboardNav, setIsKeyboardNav] = (0, react_1.useState)(false);
134
138
  const pendingFocusRestoreRef = (0, react_1.useRef)(false);
135
139
  // NOTE: the ARIA host follows real focus; opening from a button doesn't move it.
136
140
  const [focusedTrigger, setFocusedTrigger] = (0, react_1.useState)(null);
@@ -284,7 +288,12 @@ const SearchSelect = ({ id, label, options, onChange, onSelect, onSearch, isOpti
284
288
  setCustomSelectOpen(false);
285
289
  setIsOpen(true);
286
290
  };
291
+ const handlePointerActivate = (0, react_1.useCallback)((index) => {
292
+ setIsKeyboardNav(false);
293
+ setActiveIndex(index);
294
+ }, []);
287
295
  const moveActive = (delta) => {
296
+ setIsKeyboardNav(true);
288
297
  setActiveIndex((prev) => (0, searchSelectNav_1.stepRow)(rowLayout, prev, delta));
289
298
  };
290
299
  const restoreFocus = () => {
@@ -322,12 +331,14 @@ const SearchSelect = ({ id, label, options, onChange, onSelect, onSearch, isOpti
322
331
  case "Home":
323
332
  if (isOpen && (0, searchSelectNav_1.firstRow)(rowLayout) !== searchSelectNav_1.NO_ROW && !isTextInputTarget) {
324
333
  e.preventDefault();
334
+ setIsKeyboardNav(true);
325
335
  setActiveIndex((0, searchSelectNav_1.firstRow)(rowLayout));
326
336
  }
327
337
  break;
328
338
  case "End":
329
339
  if (isOpen && (0, searchSelectNav_1.lastRow)(rowLayout) !== searchSelectNav_1.NO_ROW && !isTextInputTarget) {
330
340
  e.preventDefault();
341
+ setIsKeyboardNav(true);
331
342
  setActiveIndex((0, searchSelectNav_1.lastRow)(rowLayout));
332
343
  }
333
344
  break;
@@ -375,6 +386,7 @@ const SearchSelect = ({ id, label, options, onChange, onSelect, onSearch, isOpti
375
386
  (0, react_1.useEffect)(() => {
376
387
  if (!isOpen) {
377
388
  setActiveIndex(searchSelectNav_1.NO_ROW);
389
+ setIsKeyboardNav(false);
378
390
  return;
379
391
  }
380
392
  const layout = { optionCount: filteredOptions.length, hasSelectAll: hasSelectAllRow, hasAddNew: hasAddNewRow };
@@ -651,7 +663,7 @@ const SearchSelect = ({ id, label, options, onChange, onSelect, onSearch, isOpti
651
663
  }, children: [(0, jsx_runtime_1.jsxs)(react_2.Box, { minW: "4.5rem", cursor: "pointer", display: "flex", justifyContent: "space-between", alignItems: "center", gap: 1, width: insideSelect.width, height: insideSelectBoxHeight, pl: "0.5rem", pr: "0.375rem", children: [insideLabel ? ((0, jsx_runtime_1.jsx)(SelectTruncatedLabel_1.default, { label: insideLabel, maxWidth: insideSelect.width || "6rem", fontSize: s.fieldFontSize })) : ((0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: s.fieldFontSize, fontWeight: 500, color: theme.colors.textMuted, isTruncated: true, maxW: insideSelect.width || "6rem", children: insidePlaceholder })), (0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", display: "inline-flex", flexShrink: 0, color: customSelectOpen ? theme.colors.accentText : theme.colors.textMuted, transition: CHEVRON_TRANSITION, transform: customSelectOpen ? "rotate(180deg)" : "rotate(0deg)", children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { size: s.chevronSize }) })] }), customSelectOpen && ((0, jsx_runtime_1.jsx)(react_2.Portal, { children: (0, jsx_runtime_1.jsx)(react_2.Box, { ref: setInsideSelectMenuRef, id: insideSelectPortalId, role: "listbox", "aria-label": insidePlaceholder, onKeyDown: handleInsideMenuKeyDown, onFocus: stopFocusBubbling, onBlur: stopFocusBubbling, position: "fixed", style: { top: `${customSelectPos.top}px`, left: `${customSelectPos.left}px` }, zIndex: zIndices_1.default.popoverNested, bg: theme.colors.surfaceRaised, border: `${borderWidths_1.BORDER_WIDTHS.hairline} solid`, borderColor: theme.colors.boxborder[200], borderRadius: "xl", boxShadow: theme.shadows.lg, minW: `${customSelectPos.width}px`, maxW: "20rem", py: 1, overflow: "hidden", children: (_c = insideSelect.option) === null || _c === void 0 ? void 0 : _c.map((item) => {
652
664
  var _a;
653
665
  const selected = ((_a = insideSelect.value) === null || _a === void 0 ? void 0 : _a.id) === item.id;
654
- return ((0, jsx_runtime_1.jsxs)(react_2.Box, { display: "flex", alignItems: "center", justifyContent: "space-between", gap: spec.gap, minH: spec.minH, py: spec.py, px: spec.px, fontSize: spec.fontSize, fontWeight: (0, optionRowInk_1.optionRowWeight)(selected), color: (0, optionRowInk_1.optionRowInk)(theme.colors, selected), bg: "transparent", ...(0, optionRowInk_1.optionRowCursorSx)(rowBackgrounds), cursor: "pointer", role: "option", "aria-selected": selected, tabIndex: -1, _focusVisible: insideFocusRing, onClick: (e) => {
666
+ return ((0, jsx_runtime_1.jsxs)(react_2.Box, { display: "flex", alignItems: "center", justifyContent: "space-between", gap: spec.gap, minH: spec.minH, py: spec.py, px: spec.px, fontSize: spec.fontSize, fontWeight: (0, optionRowInk_1.optionRowWeight)(selected), color: (0, optionRowInk_1.optionRowInk)(theme.colors, selected), bg: "transparent", ...(0, optionRowInk_1.optionRowCursorSx)(insideRowBackgrounds), cursor: "pointer", role: "option", "aria-selected": selected, tabIndex: -1, _focusVisible: insideFocusRing, onClick: (e) => {
655
667
  e.stopPropagation();
656
668
  handleCustomSelect(item);
657
669
  }, children: [(0, jsx_runtime_1.jsx)(react_2.Text, { isTruncated: true, children: item.label }), selected && ((0, jsx_runtime_1.jsx)(lucide_react_1.Check, { size: spec.iconSize, color: theme.colors.accentText }))] }, item.id));
@@ -690,6 +702,6 @@ const SearchSelect = ({ id, label, options, onChange, onSelect, onSearch, isOpti
690
702
  top: `${dropdownPos.top}px`,
691
703
  left: `${dropdownPos.left}px`,
692
704
  width: `${dropdownPos.width}px`,
693
- }, zIndex: zIndices_1.default.popover, maxH: "20rem", borderWidth: 1, borderColor: theme.colors.boxborder[200], borderRadius: "xl", overflow: "hidden", bg: theme.colors.surfaceRaised, boxShadow: theme.shadows.lg, display: "flex", flexDirection: "column", children: [hasSelectAllRow && ((0, jsx_runtime_1.jsxs)(react_2.Box, { id: selectAllId, role: "option", "aria-selected": allFilteredSelected, bg: activeIndex === searchSelectNav_1.SELECT_ALL_ROW ? rowBackgrounds.active : undefined, py: spec.py, px: spec.px, minH: spec.minH, cursor: "pointer", onClick: handleSelectAll, display: "flex", alignItems: "center", gap: spec.gap, color: theme.colors.text[700], borderBottom: `${borderWidths_1.BORDER_WIDTHS.hairline} solid ${(0, surfaceRaised_1.raisedRule)(theme.colors)}`, children: [(0, jsx_runtime_1.jsx)(Checkbox_1.default, { isChecked: allFilteredSelected, sx: DECORATIVE_CHECKBOX_SX, size: s.checkboxSize }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: spec.fontSize, children: allFilteredSelected ? "Unselect All" : "Select All" })] })), (0, jsx_runtime_1.jsx)(react_2.Box, { ref: optionsListRef, flex: "1", overflowY: "auto", onScroll: handleScroll, maxH: "15rem", py: 1, borderBottom: `${borderWidths_1.BORDER_WIDTHS.hairline} solid`, borderColor: (0, surfaceRaised_1.raisedRule)(theme.colors), children: isOptionLoading && filteredOptions.length === 0 ? ((0, jsx_runtime_1.jsxs)(react_2.Box, { py: spec.py, px: spec.px, display: "flex", alignItems: "center", gap: spec.gap, minH: spec.minH, color: theme.colors.textMuted, children: [(0, jsx_runtime_1.jsx)(react_2.Spinner, { size: s.spinnerSize }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: spec.fontSize, children: loadingText })] })) : !isOptionLoading && filteredOptions.length === 0 ? ((0, jsx_runtime_1.jsx)(react_2.Text, { p: 3, fontSize: spec.fontSize, color: theme.colors.textMuted, children: "No results found" })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [filteredOptions.map((option, index) => ((0, jsx_runtime_1.jsx)(OptionRow, { option: option, index: index, optionId: getOptionId(index), isSelected: isSelected(option.id), isActive: index === activeIndex, isMultiple: isMultiple, spec: spec, colors: theme.colors, rowBackgrounds: rowBackgrounds, checkboxSize: s.checkboxSize, onSelect: selectOption, onActivate: setActiveIndex }, option.id))), ((pagination === null || pagination === void 0 ? void 0 : pagination.scrollLoading) || (isOptionLoading && filteredOptions.length > 0)) && ((0, jsx_runtime_1.jsxs)(react_2.Box, { py: spec.py, px: spec.px, display: "flex", alignItems: "center", justifyContent: "center", gap: spec.gap, minH: spec.minH, color: theme.colors.textMuted, children: [(0, jsx_runtime_1.jsx)(react_2.Spinner, { size: s.spinnerSize }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: spec.fontSize, children: loadingText })] }))] })) }), (addNew === null || addNew === void 0 ? void 0 : addNew.enabled) && ((0, jsx_runtime_1.jsxs)(react_2.Box, { id: addNewId, role: "option", "aria-selected": false, py: spec.py, px: spec.px, borderTop: `${borderWidths_1.BORDER_WIDTHS.hairline} solid`, borderColor: (0, surfaceRaised_1.raisedRule)(theme.colors), bg: activeIndex === searchSelectNav_1.ADD_NEW_ROW ? rowBackgrounds.active : theme.colors.surfaceRaised, display: "flex", alignItems: "center", gap: spec.gap, color: theme.colors.accentText, fontWeight: 500, minH: spec.minH, cursor: "pointer", onClick: addNew.onClick, _hover: { bg: rowBackgrounds.active }, children: [addNew.icon || (0, jsx_runtime_1.jsx)(lucide_react_1.Plus, { size: s.addNewIconSize }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: spec.fontSize, children: addNew.text || "Add New" })] }))] }) })), (0, jsx_runtime_1.jsx)(FieldMessage_1.default, { error: error, errorMessage: errorMessage, helperText: helperText, helperId: ids.helperId, errorId: ids.errorId })] }));
705
+ }, zIndex: zIndices_1.default.popover, maxH: "20rem", borderWidth: 1, borderColor: theme.colors.boxborder[200], borderRadius: "xl", overflow: "hidden", bg: theme.colors.surfaceRaised, boxShadow: theme.shadows.lg, display: "flex", flexDirection: "column", children: [hasSelectAllRow && ((0, jsx_runtime_1.jsxs)(react_2.Box, { id: selectAllId, role: "option", "aria-selected": allFilteredSelected, bg: (0, selectRowInk_1.selectRowFill)(rowBackgrounds, { isSelected: false, isActive: activeIndex === searchSelectNav_1.SELECT_ALL_ROW }), boxShadow: isKeyboardNav && activeIndex === searchSelectNav_1.SELECT_ALL_ROW ? (0, selectKeyboardRing_1.keyboardRingShadow)(rowBackgrounds.keyboardRing) : undefined, py: spec.py, px: spec.px, minH: spec.minH, cursor: "pointer", onClick: handleSelectAll, onMouseEnter: () => handlePointerActivate(searchSelectNav_1.SELECT_ALL_ROW), display: "flex", alignItems: "center", gap: spec.gap, color: (0, selectRowInk_1.selectRowInk)(theme.colors, false), borderBottom: `${borderWidths_1.BORDER_WIDTHS.hairline} solid ${(0, surfaceRaised_1.raisedRule)(theme.colors)}`, children: [(0, jsx_runtime_1.jsx)(Checkbox_1.default, { isChecked: allFilteredSelected, sx: DECORATIVE_CHECKBOX_SX, size: s.checkboxSize }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: spec.fontSize, children: allFilteredSelected ? "Unselect All" : "Select All" })] })), (0, jsx_runtime_1.jsx)(react_2.Box, { ref: optionsListRef, flex: "1", overflowY: "auto", onScroll: handleScroll, maxH: "15rem", py: 1, borderBottom: `${borderWidths_1.BORDER_WIDTHS.hairline} solid`, borderColor: (0, surfaceRaised_1.raisedRule)(theme.colors), children: isOptionLoading && filteredOptions.length === 0 ? ((0, jsx_runtime_1.jsxs)(react_2.Box, { py: spec.py, px: spec.px, display: "flex", alignItems: "center", gap: spec.gap, minH: spec.minH, color: theme.colors.textMuted, children: [(0, jsx_runtime_1.jsx)(react_2.Spinner, { size: s.spinnerSize }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: spec.fontSize, children: loadingText })] })) : !isOptionLoading && filteredOptions.length === 0 ? ((0, jsx_runtime_1.jsx)(react_2.Text, { p: 3, fontSize: spec.fontSize, color: theme.colors.textMuted, children: "No results found" })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [filteredOptions.map((option, index) => ((0, jsx_runtime_1.jsx)(OptionRow, { option: option, index: index, optionId: getOptionId(index), isSelected: isSelected(option.id), isActive: index === activeIndex, showRing: isKeyboardNav && index === activeIndex, isMultiple: isMultiple, spec: spec, colors: theme.colors, rowBackgrounds: rowBackgrounds, checkboxSize: s.checkboxSize, onSelect: selectOption, onActivate: handlePointerActivate }, option.id))), ((pagination === null || pagination === void 0 ? void 0 : pagination.scrollLoading) || (isOptionLoading && filteredOptions.length > 0)) && ((0, jsx_runtime_1.jsxs)(react_2.Box, { py: spec.py, px: spec.px, display: "flex", alignItems: "center", justifyContent: "center", gap: spec.gap, minH: spec.minH, color: theme.colors.textMuted, children: [(0, jsx_runtime_1.jsx)(react_2.Spinner, { size: s.spinnerSize }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: spec.fontSize, children: loadingText })] }))] })) }), (addNew === null || addNew === void 0 ? void 0 : addNew.enabled) && ((0, jsx_runtime_1.jsxs)(react_2.Box, { id: addNewId, role: "option", "aria-selected": false, py: spec.py, px: spec.px, borderTop: `${borderWidths_1.BORDER_WIDTHS.hairline} solid`, borderColor: (0, surfaceRaised_1.raisedRule)(theme.colors), bg: activeIndex === searchSelectNav_1.ADD_NEW_ROW ? rowBackgrounds.active : theme.colors.surfaceRaised, boxShadow: isKeyboardNav && activeIndex === searchSelectNav_1.ADD_NEW_ROW ? (0, selectKeyboardRing_1.keyboardRingShadow)(rowBackgrounds.keyboardRing) : undefined, display: "flex", alignItems: "center", gap: spec.gap, color: theme.colors.accentText, fontWeight: 500, minH: spec.minH, cursor: "pointer", onClick: addNew.onClick, _hover: { bg: rowBackgrounds.active }, children: [addNew.icon || (0, jsx_runtime_1.jsx)(lucide_react_1.Plus, { size: s.addNewIconSize }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: spec.fontSize, children: addNew.text || "Add New" })] }))] }) })), (0, jsx_runtime_1.jsx)(FieldMessage_1.default, { error: error, errorMessage: errorMessage, helperText: helperText, helperId: ids.helperId, errorId: ids.errorId })] }));
694
706
  };
695
707
  exports.default = SearchSelect;
@@ -1,7 +1,9 @@
1
1
  /** value's shape must match isMultiple (array vs single object) — a mismatch normalizes to no selection, not an error. */
2
2
  /** Prefer `Select` with `native={false}` for new work — not yet a drop-in; see COMPONENT-GOTCHAS.md ("Which select component"). */
3
3
  export type SearchSelectProps = {
4
+ /** Base DOM id of the trigger; listbox and option ids derive from it. Auto-generated when omitted. */
4
5
  id?: string;
6
+ /** Visible label above the field; omit it and set `aria-label` for a labelless field. */
5
7
  label?: string;
6
8
  /** Accessible name for a labelless field; falls back to the visible label when both are set. */
7
9
  "aria-label"?: string;
@@ -29,6 +31,7 @@ export type SearchSelectProps = {
29
31
  isMultiple?: boolean;
30
32
  /** Visual-only — shows the required asterisk on the label; doesn't block selection or submission. */
31
33
  isRequired?: boolean;
34
+ /** Marks the field invalid with the error border and ring; `errorMessage` text shows only while true. */
32
35
  error?: boolean;
33
36
  /** Only rendered when `error` is true — setting this alone shows nothing. */
34
37
  errorMessage?: string;
@@ -42,6 +45,7 @@ export type SearchSelectProps = {
42
45
  size?: "xs" | "sm" | "md" | "lg";
43
46
  /** Blocks opening, typing, chip removal and clearing; renders the shared disabled field look. */
44
47
  isDisabled?: boolean;
48
+ /** Tuning for selected-value chips; only applies when `isMultiple` is true. */
45
49
  chip?: {
46
50
  /** Chips shown before a "+N" chip; `0` shows only the count. */
47
51
  maxChips?: number;
@@ -57,13 +61,16 @@ export type SearchSelectProps = {
57
61
  };
58
62
  /** Wins over `information.isInformation` when both are set; both this and informationMessage must be truthy to show the icon. */
59
63
  isInformation?: boolean;
64
+ /** Tooltip text on the label info icon; needs `isInformation` and a `label` to appear. */
60
65
  informationMessage?: string;
66
+ /** Replaces the trailing toggle chevron with a custom icon; ignored while `isLoading` shows the spinner. */
61
67
  rightIcon?: {
62
68
  /** Must be a rendered element (`<Icon />`); anything else fails isValidElement and falls back to the toggle chevron. */
63
69
  icon?: React.ReactNode;
64
70
  /** Fires on custom-icon click; the click also bubbles to the field and opens the menu. */
65
71
  onClick?: () => void;
66
72
  };
73
+ /** Adds a footer "add new" row below the options; nothing renders unless `enabled` is true. */
67
74
  addNew?: {
68
75
  /** Must be explicitly true — icon/text/onClick alone render nothing. */
69
76
  enabled: boolean;
@@ -78,6 +85,7 @@ export type SearchSelectProps = {
78
85
  isRemoveAllIcon?: boolean;
79
86
  /** Ignored entirely unless `isMultiple` is also true. */
80
87
  isSelectAll?: boolean;
88
+ /** Infinite-scroll paging: `onScroll` fires near the list end while more rows are expected. */
81
89
  pagination?: {
82
90
  /** startIndex is 1-based (current options.length + 1), not a 0-based offset. */
83
91
  onScroll?: (startIndex: number, limit: number, query: string) => void;
@@ -92,6 +100,7 @@ export type SearchSelectProps = {
92
100
  };
93
101
  /** @deprecated Not implemented — the option list never virtualizes; page large datasets with `pagination` instead. */
94
102
  virtualization?: boolean;
103
+ /** Renders a second nested picker inside the field (e.g. a country code) beside the main input. */
95
104
  insideSelect?: {
96
105
  /** Fires with the picked nested option; the nested picker is controlled via `insideSelect.value`. */
97
106
  onSelect?: (options: Options) => void;
@@ -108,7 +117,10 @@ export type SearchSelectProps = {
108
117
  /** One selectable option; view, when set, fully replaces the default label rendering for that option's row. */
109
118
  /** Prefer `Select` with `native={false}` for new work — not yet a drop-in; see COMPONENT-GOTCHAS.md ("Which select component"). */
110
119
  export type Options = {
120
+ /** Unique key; selected state and chip removal are matched by it. */
111
121
  id: string | number;
122
+ /** Text shown in the row and chip, and the only text the search box filters on. */
112
123
  label: string;
124
+ /** Custom row content replacing the label text; search still uses `label`. */
113
125
  view?: React.ReactNode;
114
126
  };
@@ -1,3 +1,4 @@
1
1
  import type { SectionRailProps } from "./SectionRailProps";
2
+ /** Section navigation for a long screen: a vertical rail from `collapseBelow` up, a Select below it; dirty sections are flagged. */
2
3
  declare const SectionRail: ({ sections, activeId, onSelect, "aria-label": ariaLabel, dirtyHint, collapseBelow, }: SectionRailProps) => import("react/jsx-runtime").JSX.Element;
3
4
  export default SectionRail;
@@ -29,6 +29,7 @@ const useMinWidth = (minWidth) => {
29
29
  }, [query]);
30
30
  return matches;
31
31
  };
32
+ /** Section navigation for a long screen: a vertical rail from `collapseBelow` up, a Select below it; dirty sections are flagged. */
32
33
  const SectionRail = ({ sections, activeId, onSelect, "aria-label": ariaLabel, dirtyHint, collapseBelow = "md", }) => {
33
34
  var _a;
34
35
  const { colors } = (0, useCustomTheme_1.useCustomTheme)();
@@ -1,7 +1,9 @@
1
1
  import type { ReactNode } from "react";
2
2
  /** One entry in a SectionRail. */
3
3
  export interface RailSection {
4
+ /** Unique key, matched against `activeId` and passed to `onSelect`. */
4
5
  id: string;
6
+ /** Section name. */
5
7
  label: string;
6
8
  /** Decorative leading icon, hidden from assistive tech; the label carries the name. */
7
9
  icon?: ReactNode;
@@ -10,9 +12,11 @@ export interface RailSection {
10
12
  }
11
13
  /** Props for the section navigation of a long settings screen: a rail on wide viewports, a Select below `collapseBelow`. */
12
14
  export interface SectionRailProps {
15
+ /** Entries in display order. */
13
16
  sections: RailSection[];
14
17
  /** Id of the current section; marked `aria-current="true"` (and selected in the Select). */
15
18
  activeId: string;
19
+ /** Called with a section's `id` when it is chosen in the rail or the Select. */
16
20
  onSelect: (id: string) => void;
17
21
  /** Accessible name of the nav and of the collapsed Select. */
18
22
  "aria-label": string;
@@ -7,12 +7,15 @@ export type SegmentedControlVariant = "default" | "brandSlide" | "underlineSlide
7
7
  export type SegmentedControlOrientation = "horizontal" | "vertical";
8
8
  /** One selectable segment; disabled options are skipped by keyboard nav (arrows/Home/End). */
9
9
  export type SegmentedControlOption<T extends string = string> = {
10
+ /** Identity of the option; compared to the top-level `value` to mark it selected and passed to `onChange`. */
10
11
  value: T;
12
+ /** Visible segment text and its accessible name; `shortLabel` may replace it on narrow screens. */
11
13
  label: string;
12
14
  /** Shown instead of label below the "md" breakpoint, when set; the full label stays the segment's accessible name. */
13
15
  shortLabel?: string;
14
16
  /** Rendered before the label. */
15
17
  icon?: JSX.Element;
18
+ /** Dims the segment to 50%, blocks clicks and removes it from keyboard navigation. */
16
19
  isDisabled?: boolean;
17
20
  /** Badge after the label, capped at 99+; omit or pass null/undefined to hide it. */
18
21
  count?: number | null;
@@ -35,5 +38,6 @@ export type SegmentedControlProps<T extends string = string> = {
35
38
  orientation?: SegmentedControlOrientation;
36
39
  /** Background this sits on. Optional: the track is opaque on any backdrop; pass it only to aim the plate's hairline edge at the real backdrop. */
37
40
  surface?: string;
41
+ /** Required accessible name of the radiogroup, e.g. "View mode". */
38
42
  "aria-label": string;
39
43
  };
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Select = void 0;
4
4
  const placeholderInk_1 = require("../../Theme/tokens/builders/placeholderInk");
5
5
  const controlSizes_1 = require("../../Theme/tokens/primitives/controlSizes");
6
+ const focusRing_styles_1 = require("../../Theme/chakra/focusRing.styles");
6
7
  const fieldStyles_1 = require("../Common/fieldStyles");
7
8
  const sizeField = (size) => {
8
9
  const { h, minH, fontSize, px } = (0, fieldStyles_1.controlSizeStyles)(size);
@@ -31,6 +32,30 @@ exports.Select = {
31
32
  sizes: Object.fromEntries(controlSizes_1.CONTROL_SIZE_NAMES.map((size) => [size, sizeField(size)])),
32
33
  variants: {
33
34
  outline: ({ theme }) => ({ field: (0, fieldStyles_1.fieldControlStyles)(theme.colors) }),
35
+ filled: ({ theme }) => ({
36
+ field: {
37
+ borderRadius: fieldStyles_1.FIELD_RADIUS,
38
+ _focusVisible: { borderColor: theme.colors.primary[500], ...(0, focusRing_styles_1.fieldFocusVisible)(theme.colors) },
39
+ },
40
+ }),
41
+ flushed: ({ theme }) => {
42
+ const { colors } = theme;
43
+ return {
44
+ field: {
45
+ borderColor: colors.boxborder[500],
46
+ _hover: { borderColor: (0, fieldStyles_1.fieldHoverBorder)(colors) },
47
+ _focusVisible: {
48
+ borderColor: colors.primary[500],
49
+ borderBottomWidth: "2px",
50
+ ...(0, focusRing_styles_1.fieldFocusVisible)(colors),
51
+ },
52
+ _invalid: { borderColor: colors.semanticText.error, borderBottomWidth: "2px", boxShadow: "none" },
53
+ },
54
+ };
55
+ },
56
+ unstyled: ({ theme }) => ({
57
+ field: { borderRadius: fieldStyles_1.FIELD_RADIUS, _focusVisible: (0, focusRing_styles_1.focusVisibleRing)(theme.colors) },
58
+ }),
34
59
  },
35
60
  defaultProps: {
36
61
  variant: "outline",
@@ -60,6 +60,16 @@ declare const SelectNative: React.ForwardRefExoticComponent<{
60
60
  isSelected: boolean;
61
61
  isActive: boolean;
62
62
  }) => React.ReactNode;
63
+ renderOptionEnd?: (option: OptionProp, state: {
64
+ isSelected: boolean;
65
+ isActive: boolean;
66
+ }) => React.ReactNode;
67
+ optionAction?: {
68
+ icon: React.ReactNode;
69
+ label: string;
70
+ onAction: (option: OptionProp) => void;
71
+ };
72
+ checkPlacement?: "end" | "start";
63
73
  renderValue?: (selected: OptionProp[]) => React.ReactNode;
64
74
  onCreate?: (label: string) => void;
65
75
  createLabel?: (query: string) => React.ReactNode;
@@ -24,8 +24,13 @@ const optionGroups = (options) => {
24
24
  return segments;
25
25
  };
26
26
  /** Native `<select>` renderer — today's `Select`, unchanged, plus optgroup/disabled from `option.group`/`isDisabled`. */
27
- const SelectNative = (0, react_1.forwardRef)(function SelectNative({ placeholder = "Select Option", size = controlSizes_1.DEFAULT_CONTROL_SIZE, variant = "outline", icon, onChange, onBlur, onFocus, errorBorderColor, isDisabled, isReadOnly, isRequired = false, value = "", colorScheme, label, id, name, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, error = false, errorMessage, helperText, options = [], width, height, formControlStyle, isInformation = false, informationMessage, selectStyle, noOptionsMessage, }, ref) {
27
+ const SelectNative = (0, react_1.forwardRef)(function SelectNative({ placeholder = "Select Option", size = controlSizes_1.DEFAULT_CONTROL_SIZE, variant = "outline", icon, onChange, onBlur, onFocus, errorBorderColor, isDisabled, isReadOnly, isRequired = false, value, defaultValue, colorScheme, label, id, name, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, error = false, errorMessage, helperText, options = [], width, height, formControlStyle, isInformation = false, informationMessage, selectStyle, noOptionsMessage, }, ref) {
28
28
  const ids = (0, useFieldIds_1.useFieldIds)(id, { error, errorMessage, helperText });
29
+ const [internalValue, setInternalValue] = (0, react_1.useState)(defaultValue !== null && defaultValue !== void 0 ? defaultValue : "");
30
+ const wasControlledRef = (0, react_1.useRef)(false);
31
+ if (value !== undefined)
32
+ wasControlledRef.current = true;
33
+ const shownValue = value !== null && value !== void 0 ? value : (wasControlledRef.current ? "" : internalValue);
29
34
  const getOptionsList = (0, react_1.useCallback)(() => {
30
35
  if (!options.length) {
31
36
  return (0, jsx_runtime_1.jsx)("option", { value: "", children: String(noOptionsMessage !== null && noOptionsMessage !== void 0 ? noOptionsMessage : "No Options") });
@@ -41,9 +46,11 @@ const SelectNative = (0, react_1.forwardRef)(function SelectNative({ placeholder
41
46
  if (isReadOnly)
42
47
  return;
43
48
  const selectedOption = options.find((option) => option.id.toString() === event.target.value.toString());
44
- if (selectedOption)
45
- onChange(selectedOption);
49
+ if (!selectedOption)
50
+ return;
51
+ setInternalValue(selectedOption.id);
52
+ onChange(selectedOption);
46
53
  };
47
- return ((0, jsx_runtime_1.jsxs)(react_2.FormControl, { isInvalid: error, style: formControlStyle, width: width, children: [label && ((0, jsx_runtime_1.jsx)(FormLabel_1.TextLabel, { label: label, id: ids.inputId, isRequired: isRequired, isInformation: isInformation, informationMessage: informationMessage })), (0, jsx_runtime_1.jsx)(react_2.Select, { ref: ref, ...ids.controlProps, name: name, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, placeholder: placeholder, size: size, variant: variant, icon: icon, iconSize: `${controlSizes_1.CONTROL_SIZES[size].iconSize}px`, isInvalid: error, isRequired: isRequired, value: value, onChange: handleOnChange, onBlur: onBlur, onFocus: onFocus, isDisabled: isDisabled, isReadOnly: isReadOnly, colorScheme: colorScheme, errorBorderColor: errorBorderColor, style: selectStyle, ...(height != null && height !== "" ? { minH: height, h: height } : {}), children: getOptionsList() }), (0, jsx_runtime_1.jsx)(FieldMessage_1.default, { error: error, errorMessage: errorMessage, helperText: helperText, helperId: ids.helperId, errorId: ids.errorId })] }));
54
+ return ((0, jsx_runtime_1.jsxs)(react_2.FormControl, { isInvalid: error, style: formControlStyle, width: width, children: [label && ((0, jsx_runtime_1.jsx)(FormLabel_1.TextLabel, { label: label, id: ids.inputId, isRequired: isRequired, isInformation: isInformation, informationMessage: informationMessage })), (0, jsx_runtime_1.jsx)(react_2.Select, { ref: ref, ...ids.controlProps, name: name, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, placeholder: placeholder, size: size, variant: variant, icon: icon, iconSize: `${controlSizes_1.CONTROL_SIZES[size].iconSize}px`, isInvalid: error, isRequired: isRequired, value: shownValue, onChange: handleOnChange, onBlur: onBlur, onFocus: onFocus, isDisabled: isDisabled, isReadOnly: isReadOnly, colorScheme: colorScheme, errorBorderColor: errorBorderColor, style: selectStyle, ...(height != null && height !== "" ? { minH: height, h: height } : {}), children: getOptionsList() }), (0, jsx_runtime_1.jsx)(FieldMessage_1.default, { error: error, errorMessage: errorMessage, helperText: helperText, helperId: ids.helperId, errorId: ids.errorId })] }));
48
55
  });
49
56
  exports.default = SelectNative;