pixelize-design-library 2.4.2-beta.61 → 2.4.2-beta.63

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 (582) hide show
  1. package/CHANGELOG.md +228 -2
  2. package/COMPONENT-GOTCHAS.md +144 -7
  3. package/DESIGN-GUIDE.md +12 -5
  4. package/dist/Components/Accordion/Accordion.js +2 -2
  5. package/dist/Components/AddressCard/AddressCard.js +2 -1
  6. package/dist/Components/Apexcharts/ApexLineChart/ApexLineChart.js +1 -1
  7. package/dist/Components/AppSwitcher/AppSwitcher.js +1 -1
  8. package/dist/Components/AppearanceSettings/AppearanceSettings.js +1 -1
  9. package/dist/Components/AudioRecorder/AudioRecorder.js +2 -1
  10. package/dist/Components/Avatar/Avatar.d.ts +2 -1
  11. package/dist/Components/Avatar/Avatar.js +5 -3
  12. package/dist/Components/Backdrop/Backdrop.js +1 -1
  13. package/dist/Components/BagBar/BagBar.js +2 -1
  14. package/dist/Components/Button/Button.styles.js +51 -21
  15. package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.js +1 -1
  16. package/dist/Components/CalendarGrid/CalendarGrid.js +5 -5
  17. package/dist/Components/CalendarGrid/calendarMath.js +18 -6
  18. package/dist/Components/Card/CardProps.d.ts +2 -2
  19. package/dist/Components/Card/PaymentCard/PaymentCard.js +6 -5
  20. package/dist/Components/CartItem/CartItem.js +2 -1
  21. package/dist/Components/Checkbox/Checkbox.d.ts +18 -3
  22. package/dist/Components/Checkbox/Checkbox.js +9 -7
  23. package/dist/Components/CheckoutKit/selectable.js +1 -1
  24. package/dist/Components/ChoiceCard/ChoiceCard.d.ts +3 -0
  25. package/dist/Components/ChoiceCard/ChoiceCard.js +16 -0
  26. package/dist/Components/ChoiceCard/ChoiceCardGroup.d.ts +3 -0
  27. package/dist/Components/ChoiceCard/ChoiceCardGroup.js +6 -0
  28. package/dist/Components/ChoiceCard/ChoiceCardProps.d.ts +28 -0
  29. package/dist/Components/ChoiceCard/ChoiceCardProps.js +2 -0
  30. package/dist/Components/CircularProgress/CircularProgress.js +4 -8
  31. package/dist/Components/CircularProgress/CircularProgressProps.d.ts +5 -3
  32. package/dist/Components/CircularProgress/arc.d.ts +9 -1
  33. package/dist/Components/CircularProgress/arc.js +15 -1
  34. package/dist/Components/Common/FormLabel.js +1 -1
  35. package/dist/Components/Common/FormattedDescription.js +1 -1
  36. package/dist/Components/Common/HelperText.d.ts +5 -4
  37. package/dist/Components/Common/HelperText.js +10 -7
  38. package/dist/Components/Common/fieldStyles.d.ts +4 -4
  39. package/dist/Components/Common/fieldStyles.js +2 -1
  40. package/dist/Components/ConfirmDialog/ConfirmDialog.js +2 -1
  41. package/dist/Components/ContactForm/ContactForm.js +1 -1
  42. package/dist/Components/CopyButton/CopyButton.js +12 -5
  43. package/dist/Components/CouponField/CouponField.js +4 -3
  44. package/dist/Components/CustomModulesTable/CustomModulesTable.js +6 -4
  45. package/dist/Components/CustomModulesTable/CustomModulesTableProps.d.ts +18 -0
  46. package/dist/Components/CustomModulesTable/EditModuleModal.js +2 -1
  47. package/dist/Components/DatePicker/CalendarPanel.js +2 -2
  48. package/dist/Components/DatePicker/DatePicker.js +8 -2
  49. package/dist/Components/DatePicker/RangeDatePicker.d.ts +9 -3
  50. package/dist/Components/DatePicker/RangeDatePicker.js +8 -6
  51. package/dist/Components/DatePicker/SingleDatePicker.d.ts +9 -5
  52. package/dist/Components/DatePicker/SingleDatePicker.js +9 -5
  53. package/dist/Components/DatePicker/ThemeDatePicker.d.ts +8 -4
  54. package/dist/Components/DatePicker/ThemeDatePicker.js +9 -6
  55. package/dist/Components/DatePicker/TimeOnlyPicker.d.ts +9 -5
  56. package/dist/Components/DatePicker/TimeOnlyPicker.js +8 -5
  57. package/dist/Components/DatePicker/TimePickerInput.d.ts +2 -2
  58. package/dist/Components/DatePicker/TimePickerInput.js +6 -5
  59. package/dist/Components/DatePicker/dayStates.js +2 -1
  60. package/dist/Components/DescriptionList/DescriptionList.d.ts +1 -1
  61. package/dist/Components/DescriptionList/DescriptionList.js +3 -3
  62. package/dist/Components/DescriptionList/DescriptionListProps.d.ts +3 -3
  63. package/dist/Components/Drawer/Drawer.js +2 -1
  64. package/dist/Components/Dropdown/DropDown.js +13 -4
  65. package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +2 -1
  66. package/dist/Components/EmptyState/EmptyState.js +2 -2
  67. package/dist/Components/EmptyState/EmptyStateProps.d.ts +3 -3
  68. package/dist/Components/FileUpload/FileUpload.js +28 -15
  69. package/dist/Components/FileUpload/useObjectUrl.d.ts +1 -0
  70. package/dist/Components/FileUpload/useObjectUrl.js +14 -0
  71. package/dist/Components/FileUploader/FileUploader.js +9 -3
  72. package/dist/Components/FileUploader/FileUploaderProps.d.ts +8 -0
  73. package/dist/Components/FilterBar/FilterBar.d.ts +1 -1
  74. package/dist/Components/FilterBar/FilterBar.js +2 -2
  75. package/dist/Components/FilterBar/FilterBarProps.d.ts +3 -3
  76. package/dist/Components/FilterSidebar/FilterSidebar.js +15 -8
  77. package/dist/Components/Form/FormWrapper.js +1 -1
  78. package/dist/Components/FormField/FormField.d.ts +3 -0
  79. package/dist/Components/FormField/FormField.js +57 -0
  80. package/dist/Components/FormField/FormFieldProps.d.ts +33 -0
  81. package/dist/Components/FormField/FormFieldProps.js +2 -0
  82. package/dist/Components/Header/HeaderActions.js +2 -2
  83. package/dist/Components/Header/components/mobileMenu.js +1 -1
  84. package/dist/Components/IconButton/IconButton.d.ts +5 -0
  85. package/dist/Components/IconButton/IconButton.js +24 -0
  86. package/dist/Components/IconButton/IconButtonProps.d.ts +10 -0
  87. package/dist/Components/IconButton/IconButtonProps.js +2 -0
  88. package/dist/Components/Input/PhoneNumberInput.js +14 -0
  89. package/dist/Components/Input/PhoneNumberInputProps.d.ts +1 -0
  90. package/dist/Components/KanbanBoard/AccountCard.js +7 -4
  91. package/dist/Components/KanbanBoard/AccountRow.js +1 -1
  92. package/dist/Components/KanbanBoard/KanbanBoard.js +56 -39
  93. package/dist/Components/KanbanBoard/MeasuredItem.js +6 -14
  94. package/dist/Components/KanbanBoard/boardStore.d.ts +8 -0
  95. package/dist/Components/KanbanBoard/boardStore.js +27 -0
  96. package/dist/Components/Kbd/Kbd.js +1 -1
  97. package/dist/Components/LimitReachedModal/LimitReachedModal.js +1 -1
  98. package/dist/Components/Loading/Loading.js +1 -1
  99. package/dist/Components/MediaGallery/MediaGallery.js +1 -1
  100. package/dist/Components/MediaGallery/MediaLightbox.js +2 -1
  101. package/dist/Components/MediaGallery/glass.js +2 -1
  102. package/dist/Components/MediaViewer/MediaViewer.js +1 -1
  103. package/dist/Components/MediaViewer/components/MediaAudioPlayer.js +7 -7
  104. package/dist/Components/MediaViewer/components/MediaImageViewer.js +1 -1
  105. package/dist/Components/MediaViewer/components/MediaScrubber.js +5 -1
  106. package/dist/Components/MediaViewer/components/MediaVideoPlayer.js +7 -7
  107. package/dist/Components/MediaViewer/components/PlaybackTimeline.d.ts +20 -0
  108. package/dist/Components/MediaViewer/components/PlaybackTimeline.js +47 -0
  109. package/dist/Components/MediaViewer/components/TileChip.js +1 -1
  110. package/dist/Components/Modal/Modal.js +1 -1
  111. package/dist/Components/MoreItems/MoreItems.js +2 -2
  112. package/dist/Components/NavigationBar/NavigationBar.js +5 -4
  113. package/dist/Components/NoteTextArea/NoteTextArea.js +18 -4
  114. package/dist/Components/NoteTextArea/NoteTextAreaProps.d.ts +12 -0
  115. package/dist/Components/Notification/Notification.js +18 -3
  116. package/dist/Components/Notification/NotificationProps.d.ts +17 -1
  117. package/dist/Components/NotificationBell/NotificationBell.js +5 -1
  118. package/dist/Components/NotificationBell/NotificationItem.js +1 -1
  119. package/dist/Components/NotificationBell/NotificationList.js +1 -1
  120. package/dist/Components/NotificationBell/NotificationPanel.js +4 -3
  121. package/dist/Components/OffersList/OffersList.js +2 -1
  122. package/dist/Components/OptionChip/OptionChip.js +3 -2
  123. package/dist/Components/OrderStatusTimeline/OrderStatusTimeline.js +2 -1
  124. package/dist/Components/OrderSummary/OrderSummary.js +5 -5
  125. package/dist/Components/OrganizationDetails/CreateOrgModal.js +2 -1
  126. package/dist/Components/OrganizationDetails/OrganizationDetails.js +10 -2
  127. package/dist/Components/PageHeader/PageHeader.d.ts +1 -1
  128. package/dist/Components/PageHeader/PageHeader.js +2 -2
  129. package/dist/Components/PageHeader/PageHeaderProps.d.ts +3 -3
  130. package/dist/Components/Pagination/Pagination.d.ts +5 -0
  131. package/dist/Components/Pagination/Pagination.js +48 -0
  132. package/dist/Components/Pagination/PaginationProps.d.ts +46 -0
  133. package/dist/Components/Pagination/PaginationProps.js +9 -0
  134. package/dist/Components/Pagination/pageWindow.d.ts +4 -0
  135. package/dist/Components/Pagination/pageWindow.js +22 -0
  136. package/dist/Components/PaymentOption/PaymentOption.js +1 -1
  137. package/dist/Components/PersonChip/PersonChip.js +2 -2
  138. package/dist/Components/PinInput/PinInput.d.ts +1 -1
  139. package/dist/Components/PinInput/PinInput.js +17 -2
  140. package/dist/Components/PinInput/PinInputProps.d.ts +9 -1
  141. package/dist/Components/PincodeChecker/PincodeChecker.js +4 -4
  142. package/dist/Components/PlanPill/PlanPill.js +2 -1
  143. package/dist/Components/PriceBlock/PriceBlock.js +3 -3
  144. package/dist/Components/Primitives/Primitives.d.ts +2 -2
  145. package/dist/Components/Primitives/Primitives.js +2 -3
  146. package/dist/Components/ProductBadges/ProductBadges.js +2 -1
  147. package/dist/Components/ProductCard/ProductCard.js +1 -1
  148. package/dist/Components/ProductCard/ProductCardAction.js +2 -2
  149. package/dist/Components/ProductCard/ProductCardSwatches.js +2 -1
  150. package/dist/Components/ProductCard/cardMetrics.d.ts +1 -1
  151. package/dist/Components/ProductCard/cardMetrics.js +5 -1
  152. package/dist/Components/ProfileCard/ProfileCardProps.d.ts +11 -0
  153. package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +9 -4
  154. package/dist/Components/QuantityStepper/QuantityStepper.js +2 -1
  155. package/dist/Components/RadioButton/RadioButton.d.ts +11 -2
  156. package/dist/Components/RadioButton/RadioButton.js +9 -6
  157. package/dist/Components/RangeSlider/RangeSlider.js +3 -3
  158. package/dist/Components/Rating/Rating.js +2 -1
  159. package/dist/Components/Reorder/Reorder.js +3 -2
  160. package/dist/Components/ReviewList/ReviewList.js +3 -3
  161. package/dist/Components/ReviewSummary/ReviewSummary.js +3 -3
  162. package/dist/Components/SaveBar/SaveBar.d.ts +1 -1
  163. package/dist/Components/SaveBar/SaveBar.js +2 -2
  164. package/dist/Components/SaveBar/SaveBarProps.d.ts +3 -3
  165. package/dist/Components/Search/Search.js +2 -9
  166. package/dist/Components/Search/ctrlShortcut.d.ts +1 -0
  167. package/dist/Components/Search/ctrlShortcut.js +29 -0
  168. package/dist/Components/SearchSelect/SearchSelect.js +157 -49
  169. package/dist/Components/SearchSelect/searchSelectNav.d.ts +13 -0
  170. package/dist/Components/SearchSelect/searchSelectNav.js +40 -0
  171. package/dist/Components/SegmentedControl/SegmentedControl.d.ts +8 -2
  172. package/dist/Components/SegmentedControl/SegmentedControl.js +9 -5
  173. package/dist/Components/Select/SelectPopup.js +7 -4
  174. package/dist/Components/SelectSearch/SelectSearch.js +6 -4
  175. package/dist/Components/SettingRow/SettingRow.js +2 -1
  176. package/dist/Components/SettingRow/SettingsSection.js +2 -1
  177. package/dist/Components/SideBar/SecondaryBar.js +5 -3
  178. package/dist/Components/SideBar/SideBar.js +96 -32
  179. package/dist/Components/SideBar/SideBarProps.d.ts +1 -1
  180. package/dist/Components/SideBar/components/MenuItemBox.d.ts +2 -2
  181. package/dist/Components/SideBar/components/MenuItemBox.js +11 -7
  182. package/dist/Components/SideBar/components/MenuItems.d.ts +2 -2
  183. package/dist/Components/SideBar/components/MenuItems.js +3 -3
  184. package/dist/Components/SideBar/components/MenuPopoverContent.js +2 -1
  185. package/dist/Components/SideBar/components/OtherApps.js +7 -2
  186. package/dist/Components/SideBar/components/OverflowTooltipText.js +4 -5
  187. package/dist/Components/SideBar/components/PinnedSection.js +8 -5
  188. package/dist/Components/SideBar/components/TextTruncation.js +11 -6
  189. package/dist/Components/SideBar/sidebarMotion.d.ts +2 -0
  190. package/dist/Components/SideBar/sidebarMotion.js +6 -0
  191. package/dist/Components/SideBar/sidebarScale.d.ts +1 -1
  192. package/dist/Components/SideBar/sidebarScale.js +2 -1
  193. package/dist/Components/SignInActivityTable/SignInActivityTable.js +6 -4
  194. package/dist/Components/SignInActivityTable/SignInActivityTableProps.d.ts +8 -0
  195. package/dist/Components/Skeletons/SkeletonProps.d.ts +5 -2
  196. package/dist/Components/Skeletons/Skeletons.d.ts +1 -1
  197. package/dist/Components/Skeletons/Skeletons.js +4 -2
  198. package/dist/Components/SkipLink/SkipLink.d.ts +4 -0
  199. package/dist/Components/SkipLink/SkipLink.js +54 -0
  200. package/dist/Components/SkipLink/SkipLinkProps.d.ts +8 -0
  201. package/dist/Components/SkipLink/SkipLinkProps.js +2 -0
  202. package/dist/Components/Slider/Slider.d.ts +2 -2
  203. package/dist/Components/Slider/Slider.js +11 -4
  204. package/dist/Components/SpecTable/SpecTable.js +2 -1
  205. package/dist/Components/StageProgress/StageItem.js +7 -7
  206. package/dist/Components/StageProgress/StageProgress.js +2 -1
  207. package/dist/Components/StageProgress/StageProgressProps.d.ts +1 -1
  208. package/dist/Components/StageProgress/StepperStage.js +4 -8
  209. package/dist/Components/StageProgress/centerInStrip.d.ts +2 -0
  210. package/dist/Components/StageProgress/centerInStrip.js +15 -0
  211. package/dist/Components/StatCard/StatCard.d.ts +1 -1
  212. package/dist/Components/StatCard/StatCard.js +6 -4
  213. package/dist/Components/StatCard/StatCardProps.d.ts +3 -3
  214. package/dist/Components/StickyBuyBar/StickyBuyBar.js +1 -1
  215. package/dist/Components/Table/Table.js +6 -2
  216. package/dist/Components/Table/components/TableActions.js +41 -24
  217. package/dist/Components/Table/components/TableBody.js +25 -40
  218. package/dist/Components/Table/components/rowMeasurer.d.ts +8 -0
  219. package/dist/Components/Table/components/rowMeasurer.js +71 -0
  220. package/dist/Components/Table/filters/CompactSelect.js +2 -1
  221. package/dist/Components/Table/filters/TableFilters.js +2 -13
  222. package/dist/Components/Table/hooks/useTable.js +12 -9
  223. package/dist/Components/Table/settings/TableSettings.js +7 -2
  224. package/dist/Components/Table/variants/classic.js +3 -2
  225. package/dist/Components/Tabs/components/CountBadge.js +3 -3
  226. package/dist/Components/Tabs/components/Tab.d.ts +2 -1
  227. package/dist/Components/Tabs/components/Tab.js +4 -3
  228. package/dist/Components/Tabs/components/TabList.js +16 -1
  229. package/dist/Components/Tag/Tag.d.ts +2 -2
  230. package/dist/Components/Tag/Tag.js +15 -12
  231. package/dist/Components/Tag/Tag.styles.js +6 -4
  232. package/dist/Components/TagInput/TagInput.d.ts +3 -0
  233. package/dist/Components/TagInput/TagInput.js +99 -0
  234. package/dist/Components/TagInput/TagInputProps.d.ts +46 -0
  235. package/dist/Components/TagInput/TagInputProps.js +2 -0
  236. package/dist/Components/TagInput/tagEntries.d.ts +15 -0
  237. package/dist/Components/TagInput/tagEntries.js +45 -0
  238. package/dist/Components/TimePicker/TimePicker.d.ts +3 -0
  239. package/dist/Components/TimePicker/TimePicker.js +50 -0
  240. package/dist/Components/TimePicker/TimePickerProps.d.ts +44 -0
  241. package/dist/Components/TimePicker/TimePickerProps.js +2 -0
  242. package/dist/Components/TimePicker/timeParts.d.ts +10 -0
  243. package/dist/Components/TimePicker/timeParts.js +36 -0
  244. package/dist/Components/Timeline/Timeline.js +21 -12
  245. package/dist/Components/Toaster/Toaster.js +20 -8
  246. package/dist/Components/Toggle/TableToggle.js +8 -4
  247. package/dist/Components/ToggleSwitch/ToggleSwitch.d.ts +3 -2
  248. package/dist/Components/ToggleSwitch/ToggleSwitch.js +6 -5
  249. package/dist/Components/ToolTip/ToolTip.js +86 -8
  250. package/dist/Components/UpgradeButton/UpgradeButton.js +4 -2
  251. package/dist/Components/UserDetails/AddUserModal.js +2 -1
  252. package/dist/Components/UserDetails/ChangeRoleModal.js +2 -1
  253. package/dist/Components/UserDetails/UserDetails.js +10 -2
  254. package/dist/Components/VisuallyHidden/VisuallyHidden.d.ts +15 -0
  255. package/dist/Components/VisuallyHidden/VisuallyHidden.js +21 -0
  256. package/dist/Components/VisuallyHidden/VisuallyHiddenProps.d.ts +3 -0
  257. package/dist/Components/VisuallyHidden/VisuallyHiddenProps.js +2 -0
  258. package/dist/Components/WizardDialog/WizardDialog.js +10 -5
  259. package/dist/Components/WizardDialog/WizardDialogProps.d.ts +4 -0
  260. package/dist/Components/WorkspaceWindow/WorkspaceTrayPreview.js +5 -1
  261. package/dist/Components/WorkspaceWindow/WorkspaceWindow.js +15 -2
  262. package/dist/Components/WorkspaceWindow/WorkspaceWindowProps.d.ts +2 -1
  263. package/dist/Hooks/sharedResizeObserver.d.ts +6 -0
  264. package/dist/Hooks/sharedResizeObserver.js +77 -0
  265. package/dist/Hooks/useIsTruncated.js +3 -4
  266. package/dist/Theme/chakra/Card.styles.d.ts +7 -1
  267. package/dist/Theme/chakra/Card.styles.js +4 -1
  268. package/dist/Theme/chakra/Menu.styles.d.ts +4 -6
  269. package/dist/Theme/chakra/Menu.styles.js +3 -0
  270. package/dist/Theme/chakra/Popover.styles.d.ts +2 -11
  271. package/dist/Theme/chakra/Popover.styles.js +2 -0
  272. package/dist/Theme/chakra/common.web.d.ts +5 -0
  273. package/dist/Theme/chakra/componentStyles.d.ts +12 -4
  274. package/dist/Theme/chakra/componentStyles.js +10 -6
  275. package/dist/Theme/chakra/createBrandTheme.d.ts +3 -0
  276. package/dist/Theme/chakra/createBrandTheme.js +34 -4
  277. package/dist/Theme/chakra/focusRing.styles.d.ts +2 -0
  278. package/dist/Theme/chakra/focusRing.styles.js +5 -1
  279. package/dist/Theme/chakra/fonts.web.d.ts +2 -0
  280. package/dist/Theme/chakra/motion.d.ts +15 -0
  281. package/dist/Theme/chakra/motion.js +27 -1
  282. package/dist/Theme/chakra/overlay.styles.d.ts +5 -0
  283. package/dist/Theme/chakra/overlay.styles.js +4 -1
  284. package/dist/Theme/index.d.ts +2 -1
  285. package/dist/Theme/index.js +12 -9
  286. package/dist/Theme/provider/PixelizeThemeProvider.d.ts +4 -1
  287. package/dist/Theme/provider/PixelizeThemeProvider.js +21 -12
  288. package/dist/Theme/provider/ThemeSwitcher.js +3 -2
  289. package/dist/Theme/themeProps.d.ts +7 -0
  290. package/dist/Theme/tokens/brands/emerald/palette.dark.js +2 -1
  291. package/dist/Theme/tokens/brands/index.d.ts +2 -1
  292. package/dist/Theme/tokens/brands/index.js +31 -14
  293. package/dist/Theme/tokens/brands/lavender/palette.dark.js +2 -1
  294. package/dist/Theme/tokens/brands/meadow/palette.dark.js +2 -1
  295. package/dist/Theme/tokens/brands/radiant/palette.dark.js +2 -1
  296. package/dist/Theme/tokens/brands/radiant/palette.light.js +15 -0
  297. package/dist/Theme/tokens/brands/rosewood/palette.dark.js +2 -1
  298. package/dist/Theme/tokens/brands/rosewood/palette.light.js +10 -10
  299. package/dist/Theme/tokens/brands/skyline/palette.dark.js +2 -1
  300. package/dist/Theme/tokens/brands/slate/palette.dark.js +2 -1
  301. package/dist/Theme/tokens/brands/storefront/palette.dark.js +2 -1
  302. package/dist/Theme/tokens/brands/zinc/palette.dark.d.ts +7 -29
  303. package/dist/Theme/tokens/brands/zinc/palette.dark.js +27 -55
  304. package/dist/Theme/tokens/builders/buildDarkPalette.d.ts +6 -1
  305. package/dist/Theme/tokens/builders/buildDarkPalette.js +37 -8
  306. package/dist/Theme/tokens/builders/color.js +11 -7
  307. package/dist/Theme/tokens/builders/filledSurface.d.ts +3 -1
  308. package/dist/Theme/tokens/builders/filledSurface.js +7 -7
  309. package/dist/Theme/tokens/builders/lazy.d.ts +5 -0
  310. package/dist/Theme/tokens/builders/lazy.js +55 -0
  311. package/dist/Theme/tokens/builders/memo.d.ts +9 -0
  312. package/dist/Theme/tokens/builders/memo.js +28 -0
  313. package/dist/Theme/tokens/builders/memoByReads.d.ts +2 -0
  314. package/dist/Theme/tokens/builders/memoByReads.js +50 -0
  315. package/dist/Theme/tokens/builders/mutedText.d.ts +1 -1
  316. package/dist/Theme/tokens/builders/mutedText.js +13 -3
  317. package/dist/Theme/tokens/builders/outlineRung.js +10 -2
  318. package/dist/Theme/tokens/builders/planeStep.d.ts +4 -0
  319. package/dist/Theme/tokens/builders/planeStep.js +20 -0
  320. package/dist/Theme/tokens/builders/planes.d.ts +4 -0
  321. package/dist/Theme/tokens/builders/planes.js +33 -0
  322. package/dist/Theme/tokens/builders/skeletonShimmer.d.ts +9 -0
  323. package/dist/Theme/tokens/builders/skeletonShimmer.js +25 -0
  324. package/dist/Theme/tokens/builders/surfaceRaised.d.ts +3 -1
  325. package/dist/Theme/tokens/builders/surfaceRaised.js +18 -8
  326. package/dist/Theme/tokens/builders/surfaceRungs.js +3 -1
  327. package/dist/Theme/tokens/builders/tone.js +5 -4
  328. package/dist/Theme/tokens/primitives/borderWidths.d.ts +6 -0
  329. package/dist/Theme/tokens/primitives/borderWidths.js +5 -0
  330. package/dist/Theme/tokens/primitives/index.d.ts +8 -3
  331. package/dist/Theme/tokens/primitives/index.js +11 -1
  332. package/dist/Theme/tokens/primitives/motion.d.ts +26 -2
  333. package/dist/Theme/tokens/primitives/motion.js +24 -5
  334. package/dist/Theme/tokens/primitives/optionRowSizes.d.ts +1 -1
  335. package/dist/Theme/tokens/primitives/optionRowSizes.js +2 -1
  336. package/dist/Theme/tokens/primitives/radii.d.ts +15 -0
  337. package/dist/Theme/tokens/primitives/radii.js +14 -0
  338. package/dist/Theme/tokens/primitives/shadows.d.ts +21 -1
  339. package/dist/Theme/tokens/primitives/shadows.js +59 -5
  340. package/dist/Theme/tokens/primitives/states.d.ts +1 -0
  341. package/dist/Theme/tokens/primitives/states.js +4 -0
  342. package/dist/Theme/tokens/primitives/typography.d.ts +17 -0
  343. package/dist/Theme/tokens/primitives/typography.js +22 -2
  344. package/dist/Theme/tokens/primitives/zIndices.d.ts +1 -0
  345. package/dist/Theme/tokens/primitives/zIndices.js +1 -0
  346. package/dist/Utils/formatDate.d.ts +25 -0
  347. package/dist/Utils/formatDate.js +144 -0
  348. package/dist/esm/Components/Accordion/Accordion.js +2 -2
  349. package/dist/esm/Components/AddressCard/AddressCard.js +2 -1
  350. package/dist/esm/Components/Apexcharts/ApexLineChart/ApexLineChart.js +1 -1
  351. package/dist/esm/Components/AppSwitcher/AppSwitcher.js +1 -1
  352. package/dist/esm/Components/AppearanceSettings/AppearanceSettings.js +1 -1
  353. package/dist/esm/Components/AudioRecorder/AudioRecorder.js +2 -1
  354. package/dist/esm/Components/Avatar/Avatar.js +6 -4
  355. package/dist/esm/Components/Backdrop/Backdrop.js +1 -1
  356. package/dist/esm/Components/BagBar/BagBar.js +2 -1
  357. package/dist/esm/Components/Button/Button.styles.js +54 -24
  358. package/dist/esm/Components/ButtonGroupIcon/ButtonGroupIcon.js +1 -1
  359. package/dist/esm/Components/CalendarGrid/CalendarGrid.js +6 -6
  360. package/dist/esm/Components/CalendarGrid/calendarMath.js +18 -6
  361. package/dist/esm/Components/Card/PaymentCard/PaymentCard.js +6 -5
  362. package/dist/esm/Components/CartItem/CartItem.js +2 -1
  363. package/dist/esm/Components/Checkbox/Checkbox.js +8 -5
  364. package/dist/esm/Components/CheckoutKit/selectable.js +1 -1
  365. package/dist/esm/Components/ChoiceCard/ChoiceCard.js +14 -0
  366. package/dist/esm/Components/ChoiceCard/ChoiceCardGroup.js +4 -0
  367. package/dist/esm/Components/ChoiceCard/ChoiceCardProps.js +1 -0
  368. package/dist/esm/Components/CircularProgress/CircularProgress.js +5 -9
  369. package/dist/esm/Components/CircularProgress/arc.js +13 -0
  370. package/dist/esm/Components/Common/FormLabel.js +1 -1
  371. package/dist/esm/Components/Common/FormattedDescription.js +1 -1
  372. package/dist/esm/Components/Common/HelperText.js +11 -8
  373. package/dist/esm/Components/Common/fieldStyles.js +2 -1
  374. package/dist/esm/Components/ConfirmDialog/ConfirmDialog.js +2 -1
  375. package/dist/esm/Components/ContactForm/ContactForm.js +1 -1
  376. package/dist/esm/Components/CopyButton/CopyButton.js +14 -7
  377. package/dist/esm/Components/CouponField/CouponField.js +4 -3
  378. package/dist/esm/Components/CustomModulesTable/CustomModulesTable.js +6 -4
  379. package/dist/esm/Components/CustomModulesTable/EditModuleModal.js +2 -1
  380. package/dist/esm/Components/DatePicker/CalendarPanel.js +2 -2
  381. package/dist/esm/Components/DatePicker/DatePicker.js +8 -2
  382. package/dist/esm/Components/DatePicker/RangeDatePicker.js +10 -7
  383. package/dist/esm/Components/DatePicker/SingleDatePicker.js +9 -5
  384. package/dist/esm/Components/DatePicker/ThemeDatePicker.js +7 -4
  385. package/dist/esm/Components/DatePicker/TimeOnlyPicker.js +7 -4
  386. package/dist/esm/Components/DatePicker/TimePickerInput.js +8 -6
  387. package/dist/esm/Components/DatePicker/dayStates.js +2 -1
  388. package/dist/esm/Components/DescriptionList/DescriptionList.js +3 -3
  389. package/dist/esm/Components/Drawer/Drawer.js +2 -1
  390. package/dist/esm/Components/Dropdown/DropDown.js +13 -4
  391. package/dist/esm/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +2 -1
  392. package/dist/esm/Components/EmptyState/EmptyState.js +2 -2
  393. package/dist/esm/Components/FileUpload/FileUpload.js +29 -16
  394. package/dist/esm/Components/FileUpload/useObjectUrl.js +10 -0
  395. package/dist/esm/Components/FileUploader/FileUploader.js +9 -3
  396. package/dist/esm/Components/FilterBar/FilterBar.js +2 -2
  397. package/dist/esm/Components/FilterSidebar/FilterSidebar.js +15 -8
  398. package/dist/esm/Components/Form/FormWrapper.js +1 -1
  399. package/dist/esm/Components/FormField/FormField.js +52 -0
  400. package/dist/esm/Components/FormField/FormFieldProps.js +1 -0
  401. package/dist/esm/Components/Header/HeaderActions.js +2 -2
  402. package/dist/esm/Components/Header/components/mobileMenu.js +1 -1
  403. package/dist/esm/Components/IconButton/IconButton.js +21 -0
  404. package/dist/esm/Components/IconButton/IconButtonProps.js +1 -0
  405. package/dist/esm/Components/Input/PhoneNumberInput.js +15 -1
  406. package/dist/esm/Components/KanbanBoard/AccountCard.js +7 -4
  407. package/dist/esm/Components/KanbanBoard/AccountRow.js +1 -1
  408. package/dist/esm/Components/KanbanBoard/KanbanBoard.js +56 -39
  409. package/dist/esm/Components/KanbanBoard/MeasuredItem.js +6 -14
  410. package/dist/esm/Components/KanbanBoard/boardStore.js +22 -0
  411. package/dist/esm/Components/Kbd/Kbd.js +1 -1
  412. package/dist/esm/Components/LimitReachedModal/LimitReachedModal.js +1 -1
  413. package/dist/esm/Components/Loading/Loading.js +1 -1
  414. package/dist/esm/Components/MediaGallery/MediaGallery.js +2 -2
  415. package/dist/esm/Components/MediaGallery/MediaLightbox.js +2 -1
  416. package/dist/esm/Components/MediaGallery/glass.js +2 -1
  417. package/dist/esm/Components/MediaViewer/MediaViewer.js +1 -1
  418. package/dist/esm/Components/MediaViewer/components/MediaAudioPlayer.js +7 -7
  419. package/dist/esm/Components/MediaViewer/components/MediaImageViewer.js +1 -1
  420. package/dist/esm/Components/MediaViewer/components/MediaScrubber.js +5 -1
  421. package/dist/esm/Components/MediaViewer/components/MediaVideoPlayer.js +7 -7
  422. package/dist/esm/Components/MediaViewer/components/PlaybackTimeline.js +38 -0
  423. package/dist/esm/Components/MediaViewer/components/TileChip.js +1 -1
  424. package/dist/esm/Components/Modal/Modal.js +1 -1
  425. package/dist/esm/Components/MoreItems/MoreItems.js +2 -2
  426. package/dist/esm/Components/NavigationBar/NavigationBar.js +5 -4
  427. package/dist/esm/Components/NoteTextArea/NoteTextArea.js +18 -4
  428. package/dist/esm/Components/Notification/Notification.js +18 -3
  429. package/dist/esm/Components/NotificationBell/NotificationBell.js +2 -1
  430. package/dist/esm/Components/NotificationBell/NotificationItem.js +1 -1
  431. package/dist/esm/Components/NotificationBell/NotificationList.js +1 -1
  432. package/dist/esm/Components/NotificationBell/NotificationPanel.js +4 -3
  433. package/dist/esm/Components/OffersList/OffersList.js +2 -1
  434. package/dist/esm/Components/OptionChip/OptionChip.js +3 -2
  435. package/dist/esm/Components/OrderStatusTimeline/OrderStatusTimeline.js +2 -1
  436. package/dist/esm/Components/OrderSummary/OrderSummary.js +5 -5
  437. package/dist/esm/Components/OrganizationDetails/CreateOrgModal.js +2 -1
  438. package/dist/esm/Components/OrganizationDetails/OrganizationDetails.js +10 -2
  439. package/dist/esm/Components/PageHeader/PageHeader.js +2 -2
  440. package/dist/esm/Components/Pagination/Pagination.js +42 -0
  441. package/dist/esm/Components/Pagination/PaginationProps.js +6 -0
  442. package/dist/esm/Components/Pagination/pageWindow.js +16 -0
  443. package/dist/esm/Components/PaymentOption/PaymentOption.js +1 -1
  444. package/dist/esm/Components/PersonChip/PersonChip.js +2 -2
  445. package/dist/esm/Components/PinInput/PinInput.js +14 -2
  446. package/dist/esm/Components/PincodeChecker/PincodeChecker.js +4 -4
  447. package/dist/esm/Components/PlanPill/PlanPill.js +2 -1
  448. package/dist/esm/Components/PriceBlock/PriceBlock.js +3 -3
  449. package/dist/esm/Components/Primitives/Primitives.js +1 -1
  450. package/dist/esm/Components/ProductBadges/ProductBadges.js +2 -1
  451. package/dist/esm/Components/ProductCard/ProductCard.js +1 -1
  452. package/dist/esm/Components/ProductCard/ProductCardAction.js +3 -3
  453. package/dist/esm/Components/ProductCard/ProductCardSwatches.js +2 -1
  454. package/dist/esm/Components/ProductCard/cardMetrics.js +2 -1
  455. package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +9 -4
  456. package/dist/esm/Components/QuantityStepper/QuantityStepper.js +2 -1
  457. package/dist/esm/Components/RadioButton/RadioButton.js +7 -4
  458. package/dist/esm/Components/RangeSlider/RangeSlider.js +3 -3
  459. package/dist/esm/Components/Rating/Rating.js +2 -1
  460. package/dist/esm/Components/Reorder/Reorder.js +3 -2
  461. package/dist/esm/Components/ReviewList/ReviewList.js +3 -3
  462. package/dist/esm/Components/ReviewSummary/ReviewSummary.js +3 -3
  463. package/dist/esm/Components/SaveBar/SaveBar.js +2 -2
  464. package/dist/esm/Components/Search/Search.js +2 -9
  465. package/dist/esm/Components/Search/ctrlShortcut.js +25 -0
  466. package/dist/esm/Components/SearchSelect/SearchSelect.js +160 -52
  467. package/dist/esm/Components/SearchSelect/searchSelectNav.js +32 -0
  468. package/dist/esm/Components/SegmentedControl/SegmentedControl.js +11 -6
  469. package/dist/esm/Components/Select/SelectPopup.js +7 -4
  470. package/dist/esm/Components/SelectSearch/SelectSearch.js +6 -4
  471. package/dist/esm/Components/SettingRow/SettingRow.js +2 -1
  472. package/dist/esm/Components/SettingRow/SettingsSection.js +2 -1
  473. package/dist/esm/Components/SideBar/SecondaryBar.js +5 -3
  474. package/dist/esm/Components/SideBar/SideBar.js +98 -34
  475. package/dist/esm/Components/SideBar/components/MenuItemBox.js +11 -7
  476. package/dist/esm/Components/SideBar/components/MenuItems.js +4 -4
  477. package/dist/esm/Components/SideBar/components/MenuPopoverContent.js +2 -1
  478. package/dist/esm/Components/SideBar/components/OtherApps.js +4 -2
  479. package/dist/esm/Components/SideBar/components/OverflowTooltipText.js +4 -5
  480. package/dist/esm/Components/SideBar/components/PinnedSection.js +8 -5
  481. package/dist/esm/Components/SideBar/components/TextTruncation.js +9 -7
  482. package/dist/esm/Components/SideBar/sidebarMotion.js +3 -0
  483. package/dist/esm/Components/SideBar/sidebarScale.js +2 -1
  484. package/dist/esm/Components/SignInActivityTable/SignInActivityTable.js +6 -4
  485. package/dist/esm/Components/Skeletons/Skeletons.js +4 -2
  486. package/dist/esm/Components/SkipLink/SkipLink.js +50 -0
  487. package/dist/esm/Components/SkipLink/SkipLinkProps.js +1 -0
  488. package/dist/esm/Components/Slider/Slider.js +11 -4
  489. package/dist/esm/Components/SpecTable/SpecTable.js +2 -1
  490. package/dist/esm/Components/StageProgress/StageItem.js +7 -7
  491. package/dist/esm/Components/StageProgress/StageProgress.js +2 -1
  492. package/dist/esm/Components/StageProgress/StepperStage.js +4 -8
  493. package/dist/esm/Components/StageProgress/centerInStrip.js +11 -0
  494. package/dist/esm/Components/StatCard/StatCard.js +6 -4
  495. package/dist/esm/Components/StickyBuyBar/StickyBuyBar.js +2 -2
  496. package/dist/esm/Components/Table/Table.js +8 -4
  497. package/dist/esm/Components/Table/components/TableActions.js +43 -26
  498. package/dist/esm/Components/Table/components/TableBody.js +25 -40
  499. package/dist/esm/Components/Table/components/rowMeasurer.js +66 -0
  500. package/dist/esm/Components/Table/filters/CompactSelect.js +2 -1
  501. package/dist/esm/Components/Table/filters/TableFilters.js +3 -14
  502. package/dist/esm/Components/Table/hooks/useTable.js +12 -9
  503. package/dist/esm/Components/Table/settings/TableSettings.js +8 -3
  504. package/dist/esm/Components/Table/variants/classic.js +3 -2
  505. package/dist/esm/Components/Tabs/components/CountBadge.js +3 -3
  506. package/dist/esm/Components/Tabs/components/Tab.js +5 -4
  507. package/dist/esm/Components/Tabs/components/TabList.js +16 -1
  508. package/dist/esm/Components/Tag/Tag.js +11 -8
  509. package/dist/esm/Components/Tag/Tag.styles.js +6 -4
  510. package/dist/esm/Components/TagInput/TagInput.js +94 -0
  511. package/dist/esm/Components/TagInput/TagInputProps.js +1 -0
  512. package/dist/esm/Components/TagInput/tagEntries.js +39 -0
  513. package/dist/esm/Components/TimePicker/TimePicker.js +45 -0
  514. package/dist/esm/Components/TimePicker/TimePickerProps.js +1 -0
  515. package/dist/esm/Components/TimePicker/timeParts.js +26 -0
  516. package/dist/esm/Components/Timeline/Timeline.js +21 -12
  517. package/dist/esm/Components/Toaster/Toaster.js +21 -9
  518. package/dist/esm/Components/Toggle/TableToggle.js +8 -4
  519. package/dist/esm/Components/ToggleSwitch/ToggleSwitch.js +7 -5
  520. package/dist/esm/Components/ToolTip/ToolTip.js +89 -11
  521. package/dist/esm/Components/UpgradeButton/UpgradeButton.js +4 -2
  522. package/dist/esm/Components/UserDetails/AddUserModal.js +2 -1
  523. package/dist/esm/Components/UserDetails/ChangeRoleModal.js +2 -1
  524. package/dist/esm/Components/UserDetails/UserDetails.js +10 -2
  525. package/dist/esm/Components/VisuallyHidden/VisuallyHidden.js +18 -0
  526. package/dist/esm/Components/VisuallyHidden/VisuallyHiddenProps.js +1 -0
  527. package/dist/esm/Components/WizardDialog/WizardDialog.js +11 -6
  528. package/dist/esm/Components/WorkspaceWindow/WorkspaceTrayPreview.js +2 -1
  529. package/dist/esm/Components/WorkspaceWindow/WorkspaceWindow.js +13 -3
  530. package/dist/esm/Hooks/sharedResizeObserver.js +73 -0
  531. package/dist/esm/Hooks/useIsTruncated.js +3 -4
  532. package/dist/esm/Theme/chakra/Card.styles.js +4 -1
  533. package/dist/esm/Theme/chakra/Menu.styles.js +3 -0
  534. package/dist/esm/Theme/chakra/Popover.styles.js +2 -0
  535. package/dist/esm/Theme/chakra/componentStyles.js +10 -6
  536. package/dist/esm/Theme/chakra/createBrandTheme.js +34 -4
  537. package/dist/esm/Theme/chakra/focusRing.styles.js +3 -0
  538. package/dist/esm/Theme/chakra/motion.js +26 -0
  539. package/dist/esm/Theme/chakra/overlay.styles.js +3 -0
  540. package/dist/esm/Theme/index.js +12 -9
  541. package/dist/esm/Theme/provider/PixelizeThemeProvider.js +22 -13
  542. package/dist/esm/Theme/provider/ThemeSwitcher.js +3 -2
  543. package/dist/esm/Theme/tokens/brands/emerald/palette.dark.js +2 -1
  544. package/dist/esm/Theme/tokens/brands/index.js +30 -13
  545. package/dist/esm/Theme/tokens/brands/lavender/palette.dark.js +2 -1
  546. package/dist/esm/Theme/tokens/brands/meadow/palette.dark.js +2 -1
  547. package/dist/esm/Theme/tokens/brands/radiant/palette.dark.js +2 -1
  548. package/dist/esm/Theme/tokens/brands/radiant/palette.light.js +15 -0
  549. package/dist/esm/Theme/tokens/brands/rosewood/palette.dark.js +2 -1
  550. package/dist/esm/Theme/tokens/brands/rosewood/palette.light.js +10 -10
  551. package/dist/esm/Theme/tokens/brands/skyline/palette.dark.js +2 -1
  552. package/dist/esm/Theme/tokens/brands/slate/palette.dark.js +2 -1
  553. package/dist/esm/Theme/tokens/brands/storefront/palette.dark.js +2 -1
  554. package/dist/esm/Theme/tokens/brands/zinc/palette.dark.js +27 -55
  555. package/dist/esm/Theme/tokens/builders/buildDarkPalette.js +38 -9
  556. package/dist/esm/Theme/tokens/builders/color.js +10 -6
  557. package/dist/esm/Theme/tokens/builders/filledSurface.js +7 -7
  558. package/dist/esm/Theme/tokens/builders/lazy.js +49 -0
  559. package/dist/esm/Theme/tokens/builders/memo.js +21 -0
  560. package/dist/esm/Theme/tokens/builders/memoByReads.js +46 -0
  561. package/dist/esm/Theme/tokens/builders/mutedText.js +12 -2
  562. package/dist/esm/Theme/tokens/builders/outlineRung.js +10 -2
  563. package/dist/esm/Theme/tokens/builders/planeStep.js +14 -0
  564. package/dist/esm/Theme/tokens/builders/planes.js +28 -0
  565. package/dist/esm/Theme/tokens/builders/skeletonShimmer.js +21 -0
  566. package/dist/esm/Theme/tokens/builders/surfaceRaised.js +16 -7
  567. package/dist/esm/Theme/tokens/builders/surfaceRungs.js +3 -1
  568. package/dist/esm/Theme/tokens/builders/tone.js +5 -4
  569. package/dist/esm/Theme/tokens/primitives/borderWidths.js +2 -0
  570. package/dist/esm/Theme/tokens/primitives/index.js +5 -3
  571. package/dist/esm/Theme/tokens/primitives/motion.js +21 -4
  572. package/dist/esm/Theme/tokens/primitives/optionRowSizes.js +2 -1
  573. package/dist/esm/Theme/tokens/primitives/radii.js +13 -0
  574. package/dist/esm/Theme/tokens/primitives/shadows.js +56 -5
  575. package/dist/esm/Theme/tokens/primitives/states.js +1 -0
  576. package/dist/esm/Theme/tokens/primitives/typography.js +21 -1
  577. package/dist/esm/Theme/tokens/primitives/zIndices.js +1 -0
  578. package/dist/esm/Utils/formatDate.js +138 -0
  579. package/dist/esm/index.js +19 -2
  580. package/dist/index.d.ts +34 -5
  581. package/dist/index.js +51 -4
  582. package/package.json +1 -1
@@ -9,7 +9,7 @@ import { formatClock, isTypingTarget, isUnsupportedVideoSrc, PLAYBACK_SPEEDS, SE
9
9
  import { useAutoHideChrome } from "../hooks/useAutoHideChrome.js";
10
10
  import { usePrefersReducedMotion } from "../../../Theme/chakra/motion.js";
11
11
  import { useViewerChrome } from "../useViewerChrome.js";
12
- import MediaScrubber from "./MediaScrubber.js";
12
+ import { TimelineClock, TimelineScrubber, usePlaybackTimeline } from "./PlaybackTimeline.js";
13
13
  import MediaStatusPanel from "./MediaStatusPanel.js";
14
14
  import ViewerIconButton from "./ViewerIconButton.js";
15
15
  import { defaultMediaVideoPlayerLabels } from "./MediaVideoPlayerProps.js";
@@ -30,7 +30,7 @@ const MediaVideoPlayer = ({ item, label, onTimeChange, onPrevious, onNext, label
30
30
  const shellRef = useRef(null);
31
31
  const videoRef = useRef(null);
32
32
  const [playing, setPlaying] = useState(false);
33
- const [current, setCurrent] = useState(0);
33
+ const timeline = usePlaybackTimeline();
34
34
  const [duration, setDuration] = useState(0);
35
35
  const [volume, setVolume] = useState(1);
36
36
  const [muted, setMuted] = useState(false);
@@ -65,7 +65,7 @@ const MediaVideoPlayer = ({ item, label, onTimeChange, onPrevious, onNext, label
65
65
  return;
66
66
  const max = Number.isFinite(v.duration) ? v.duration : seconds;
67
67
  v.currentTime = Math.min(max, Math.max(0, seconds));
68
- setCurrent(v.currentTime);
68
+ timeline.set(v.currentTime);
69
69
  };
70
70
  const seekBy = (delta) => { var _a, _b; return seekTo(((_b = (_a = video()) === null || _a === void 0 ? void 0 : _a.currentTime) !== null && _b !== void 0 ? _b : 0) + delta); };
71
71
  const toggleMute = () => {
@@ -174,7 +174,7 @@ const MediaVideoPlayer = ({ item, label, onTimeChange, onPrevious, onNext, label
174
174
  }, []);
175
175
  useEffect(() => {
176
176
  setPlaying(false);
177
- setCurrent(0);
177
+ timeline.set(0);
178
178
  setDuration(0);
179
179
  setRate(1);
180
180
  setHasCaptions(false);
@@ -184,7 +184,7 @@ const MediaVideoPlayer = ({ item, label, onTimeChange, onPrevious, onNext, label
184
184
  setBuffered([]);
185
185
  if (videoRef.current)
186
186
  videoRef.current.playbackRate = 1;
187
- }, [item.key]);
187
+ }, [item.key, timeline]);
188
188
  useEffect(() => {
189
189
  if (!ripple)
190
190
  return undefined;
@@ -230,7 +230,7 @@ const MediaVideoPlayer = ({ item, label, onTimeChange, onPrevious, onNext, label
230
230
  const ranges = e.currentTarget.buffered;
231
231
  setBuffered(Array.from({ length: ranges.length }, (_, i) => ({ start: ranges.start(i), end: ranges.end(i) })));
232
232
  }, onTimeUpdate: (e) => {
233
- setCurrent(e.currentTarget.currentTime);
233
+ timeline.set(e.currentTarget.currentTime);
234
234
  onTimeChange === null || onTimeChange === void 0 ? void 0 : onTimeChange(e.currentTarget.currentTime);
235
235
  }, onLoadedMetadata: (e) => {
236
236
  setDuration(e.currentTarget.duration);
@@ -238,6 +238,6 @@ const MediaVideoPlayer = ({ item, label, onTimeChange, onPrevious, onNext, label
238
238
  }, onDurationChange: (e) => setDuration(e.currentTarget.duration), onVolumeChange: (e) => {
239
239
  setVolume(e.currentTarget.volume);
240
240
  setMuted(e.currentTarget.muted);
241
- }, "data-testid": "media-video" })) }), buffering && !failed ? (_jsx(Box, { position: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)", pointerEvents: "none", "data-testid": "media-video-buffering", children: _jsx(Box, { as: Loader2, boxSize: "40px", color: chrome.ink, sx: reducedMotion ? undefined : { animation: `${spin} 0.9s linear infinite` } }) })) : null, ripple ? (_jsx(Flex, { position: "absolute", top: 0, bottom: 0, left: ripple.side === "left" ? 0 : undefined, right: ripple.side === "right" ? 0 : undefined, w: "40%", align: "center", justify: "center", pointerEvents: "none", opacity: reducedMotion ? 1 : undefined, sx: reducedMotion ? undefined : { animation: `${rippleFade} ${RIPPLE_LIFETIME_MS}ms ease-out` }, children: _jsxs(Flex, { direction: "column", align: "center", gap: 1, color: chrome.ink, bg: chrome.scrim(0.35), borderRadius: "full", boxSize: "72px", justify: "center", children: [ripple.side === "left" ? _jsx(SkipBack, { size: 22, "aria-hidden": true }) : _jsx(SkipForward, { size: 22, "aria-hidden": true }), _jsx(Text, { fontSize: "xs", fontWeight: 600, children: `${SKIP_SECONDS}s` })] }) }, ripple.nonce)) : null, !playing && !failed ? (_jsx(IconButton, { "aria-label": labels.play, "aria-hidden": true, icon: _jsx(Play, { size: 36 }), onClick: togglePlay, position: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)", boxSize: { base: "64px", md: "88px" }, isRound: true, variant: "ghost", bg: chrome.raised, color: chrome.accent, _hover: { bg: chrome.hover }, _focusVisible: { boxShadow: `0 0 0 2px ${ring}` }, tabIndex: -1, transition: fadeTransition, zIndex: 3, "data-testid": "media-video-big-play" })) : null, _jsx(Box, { position: "absolute", top: 0, left: 0, right: 0, h: "72px", bgImage: scrimTop, pointerEvents: "none", opacity: showChrome ? 1 : 0, transition: fadeTransition, "aria-hidden": true }), _jsxs(Box, { position: "absolute", bottom: 0, left: 0, right: 0, zIndex: 3, bgImage: scrimBottom, pt: failed || duration <= 0 ? 2 : 10, px: 3, pb: 2, opacity: showChrome ? 1 : 0, visibility: showChrome ? "visible" : "hidden", transition: fadeTransition, children: [_jsx(MediaScrubber, { value: Math.min(current, duration || current), max: duration > 0 ? duration : 0, buffered: buffered, onSeek: seekTo, ariaLabel: labels.seek, ariaValueText: (v) => labels.seekValue(clock(v), clock(duration)), formatTime: clock, isDisabled: failed || duration <= 0, testId: "media-video-seek" }), _jsxs(Flex, { role: "toolbar", "aria-label": labels.videoControls, align: "center", justify: "space-between", gap: 2, wrap: "wrap", mt: 1, children: [_jsxs(Flex, { align: "center", gap: 1, wrap: "wrap", children: [_jsx(ViewerIconButton, { label: playing ? labels.pause : labels.play, hint: "K", icon: playing ? _jsx(Pause, { size: 18 }) : _jsx(Play, { size: 18 }), onClick: togglePlay, testId: "media-video-toggle" }), _jsx(ViewerIconButton, { label: labels.rewind, hint: "J", icon: seekIcon(_jsx(SkipBack, { size: 16 })), onClick: () => seekBy(-SEEK_STEP_SECONDS), testId: "media-video-rewind" }), _jsx(ViewerIconButton, { label: labels.forward, hint: "L", icon: seekIcon(_jsx(SkipForward, { size: 16 })), onClick: () => seekBy(SEEK_STEP_SECONDS), testId: "media-video-forward" }), onPrevious ? (_jsx(ViewerIconButton, { label: labels.previous, icon: _jsx(ChevronLeft, { size: 18 }), onClick: onPrevious, testId: "media-video-previous" })) : null, onNext ? (_jsx(ViewerIconButton, { label: labels.next, icon: _jsx(ChevronRight, { size: 18 }), onClick: onNext, testId: "media-video-next" })) : null, _jsxs(Flex, { align: "center", onMouseEnter: () => setVolumeHover(true), onMouseLeave: () => setVolumeHover(false), sx: { "&:focus-within": { "--volume-w": "88px" } }, children: [_jsx(ViewerIconButton, { label: muted || volume === 0 ? labels.unmute : labels.mute, hint: "M", icon: muted || volume === 0 ? _jsx(VolumeX, { size: 18 }) : _jsx(Volume2, { size: 18 }), onClick: toggleMute, pressed: muted, testId: "media-video-mute" }), _jsx(Box, { w: volumeHover ? { base: "64px", md: "88px" } : { base: "64px", md: "0px" }, overflow: "hidden", px: volumeHover ? 1 : 0, transition: fadeTransition, sx: { "&:focus-within": { width: "88px", paddingInline: "4px" } }, children: _jsxs(Slider, { "aria-label": labels.volume, min: 0, max: 100, step: 5, value: effectiveVolume, onChange: changeVolume, focusThumbOnChange: false, getAriaValueText: (v) => `${v}%`, children: [_jsx(SliderTrack, { bg: chrome.track, h: "4px", borderRadius: "full", children: _jsx(SliderFilledTrack, { bg: chrome.ink }) }), _jsx(SliderThumb, { bg: chrome.ink, boxSize: "12px", _focusVisible: { boxShadow: `0 0 0 2px ${ring}` } })] }) })] }), _jsxs(Text, { as: "span", ml: 2, fontSize: "sm", fontWeight: 500, color: chrome.ink, sx: { fontVariantNumeric: "tabular-nums" }, "data-testid": "media-video-time", children: [clock(current), _jsx(Text, { as: "span", color: chrome.muted, children: ` / ${clock(duration)}` })] })] }), _jsxs(Flex, { align: "center", gap: 1, children: [_jsxs(Menu, { placement: "top-end", children: [_jsx(MenuButton, { "aria-label": labels.speed, h: "32px", px: 3, borderRadius: "full", borderWidth: "1px", borderColor: chrome.track, bg: chrome.raised, color: chrome.ink, fontSize: "sm", fontWeight: 600, _hover: { bg: chrome.hover }, _focusVisible: { boxShadow: `0 0 0 2px ${ring}` }, "data-testid": "media-video-speed", children: _jsxs(Flex, { as: "span", align: "center", gap: 1, children: [`${rate}x`, _jsx(ChevronDown, { size: 14, "aria-hidden": true })] }) }), _jsx(MenuList, { minW: "160px", bg: chrome.raised, zIndex: 1500, children: _jsx(MenuOptionGroup, { type: "radio", title: labels.speed, value: String(rate), onChange: (value) => changeRate(Number(value)), children: PLAYBACK_SPEEDS.map((speed) => (_jsx(MenuItemOption, { value: String(speed), bg: chrome.raised, color: chrome.ink, _hover: { bg: chrome.hover }, _focus: { bg: chrome.hover }, children: speed === 1 ? `1x - ${labels.normalSpeed}` : `${speed}x` }, speed))) }) })] }), hasCaptions ? (_jsx(ViewerIconButton, { label: labels.captions, hint: "C", icon: _jsx(Captions, { size: 18 }), onClick: toggleCaptions, pressed: captionsOn, testId: "media-video-captions" })) : null, pipSupported ? (_jsx(ViewerIconButton, { label: labels.pip, hint: "P", icon: _jsx(PictureInPicture2, { size: 18 }), onClick: () => void togglePip(), testId: "media-video-pip" })) : null, _jsx(ViewerIconButton, { label: labels.download, icon: _jsx(Download, { size: 18 }), href: item.src, testId: "media-video-download" }), shellFullscreen || iosFullscreen ? (_jsx(ViewerIconButton, { label: isFullscreen ? labels.exitFullscreen : labels.fullscreen, hint: "F", icon: isFullscreen ? _jsx(Minimize, { size: 18 }) : _jsx(Maximize, { size: 18 }), onClick: () => void toggleFullscreen(), pressed: isFullscreen, testId: "media-video-fullscreen" })) : null] })] })] })] }));
241
+ }, "data-testid": "media-video" })) }), buffering && !failed ? (_jsx(Box, { position: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)", pointerEvents: "none", "data-testid": "media-video-buffering", children: _jsx(Box, { as: Loader2, boxSize: "40px", color: chrome.ink, sx: reducedMotion ? undefined : { animation: `${spin} 0.9s linear infinite` } }) })) : null, ripple ? (_jsx(Flex, { position: "absolute", top: 0, bottom: 0, left: ripple.side === "left" ? 0 : undefined, right: ripple.side === "right" ? 0 : undefined, w: "40%", align: "center", justify: "center", pointerEvents: "none", opacity: reducedMotion ? 1 : undefined, sx: reducedMotion ? undefined : { animation: `${rippleFade} ${RIPPLE_LIFETIME_MS}ms ease-out` }, children: _jsxs(Flex, { direction: "column", align: "center", gap: 1, color: chrome.ink, bg: chrome.scrim(0.35), borderRadius: "full", boxSize: "72px", justify: "center", children: [ripple.side === "left" ? _jsx(SkipBack, { size: 22, "aria-hidden": true }) : _jsx(SkipForward, { size: 22, "aria-hidden": true }), _jsx(Text, { fontSize: "xs", fontWeight: 600, children: `${SKIP_SECONDS}s` })] }) }, ripple.nonce)) : null, !playing && !failed ? (_jsx(IconButton, { "aria-label": labels.play, "aria-hidden": true, icon: _jsx(Play, { size: 36 }), onClick: togglePlay, position: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)", boxSize: { base: "64px", md: "88px" }, isRound: true, variant: "ghost", bg: chrome.raised, color: chrome.accent, _hover: { bg: chrome.hover }, _focusVisible: { boxShadow: `0 0 0 2px ${ring}` }, tabIndex: -1, transition: fadeTransition, zIndex: 3, "data-testid": "media-video-big-play" })) : null, _jsx(Box, { position: "absolute", top: 0, left: 0, right: 0, h: "72px", bgImage: scrimTop, pointerEvents: "none", opacity: showChrome ? 1 : 0, transition: fadeTransition, "aria-hidden": true }), _jsxs(Box, { position: "absolute", bottom: 0, left: 0, right: 0, zIndex: 3, bgImage: scrimBottom, pt: failed || duration <= 0 ? 2 : 10, px: 3, pb: 2, opacity: showChrome ? 1 : 0, visibility: showChrome ? "visible" : "hidden", transition: fadeTransition, children: [_jsx(TimelineScrubber, { timeline: timeline, duration: duration, buffered: buffered, onSeek: seekTo, ariaLabel: labels.seek, ariaValueText: (v) => labels.seekValue(clock(v), clock(duration)), formatTime: clock, isDisabled: failed || duration <= 0, testId: "media-video-seek" }), _jsxs(Flex, { role: "toolbar", "aria-label": labels.videoControls, align: "center", justify: "space-between", gap: 2, wrap: "wrap", mt: 1, children: [_jsxs(Flex, { align: "center", gap: 1, wrap: "wrap", children: [_jsx(ViewerIconButton, { label: playing ? labels.pause : labels.play, hint: "K", icon: playing ? _jsx(Pause, { size: 18 }) : _jsx(Play, { size: 18 }), onClick: togglePlay, testId: "media-video-toggle" }), _jsx(ViewerIconButton, { label: labels.rewind, hint: "J", icon: seekIcon(_jsx(SkipBack, { size: 16 })), onClick: () => seekBy(-SEEK_STEP_SECONDS), testId: "media-video-rewind" }), _jsx(ViewerIconButton, { label: labels.forward, hint: "L", icon: seekIcon(_jsx(SkipForward, { size: 16 })), onClick: () => seekBy(SEEK_STEP_SECONDS), testId: "media-video-forward" }), onPrevious ? (_jsx(ViewerIconButton, { label: labels.previous, icon: _jsx(ChevronLeft, { size: 18 }), onClick: onPrevious, testId: "media-video-previous" })) : null, onNext ? (_jsx(ViewerIconButton, { label: labels.next, icon: _jsx(ChevronRight, { size: 18 }), onClick: onNext, testId: "media-video-next" })) : null, _jsxs(Flex, { align: "center", onMouseEnter: () => setVolumeHover(true), onMouseLeave: () => setVolumeHover(false), sx: { "&:focus-within": { "--volume-w": "88px" } }, children: [_jsx(ViewerIconButton, { label: muted || volume === 0 ? labels.unmute : labels.mute, hint: "M", icon: muted || volume === 0 ? _jsx(VolumeX, { size: 18 }) : _jsx(Volume2, { size: 18 }), onClick: toggleMute, pressed: muted, testId: "media-video-mute" }), _jsx(Box, { w: volumeHover ? { base: "64px", md: "88px" } : { base: "64px", md: "0px" }, overflow: "hidden", px: volumeHover ? 1 : 0, transition: fadeTransition, sx: { "&:focus-within": { width: "88px", paddingInline: "4px" } }, children: _jsxs(Slider, { "aria-label": labels.volume, min: 0, max: 100, step: 5, value: effectiveVolume, onChange: changeVolume, focusThumbOnChange: false, getAriaValueText: (v) => `${v}%`, children: [_jsx(SliderTrack, { bg: chrome.track, h: "4px", borderRadius: "full", children: _jsx(SliderFilledTrack, { bg: chrome.ink }) }), _jsx(SliderThumb, { bg: chrome.ink, boxSize: "12px", _focusVisible: { boxShadow: `0 0 0 2px ${ring}` } })] }) })] }), _jsx(TimelineClock, { timeline: timeline, duration: duration, testId: "media-video-time" })] }), _jsxs(Flex, { align: "center", gap: 1, children: [_jsxs(Menu, { placement: "top-end", children: [_jsx(MenuButton, { "aria-label": labels.speed, h: "32px", px: 3, borderRadius: "full", borderWidth: "1px", borderColor: chrome.track, bg: chrome.raised, color: chrome.ink, fontSize: "sm", fontWeight: 600, _hover: { bg: chrome.hover }, _focusVisible: { boxShadow: `0 0 0 2px ${ring}` }, "data-testid": "media-video-speed", children: _jsxs(Flex, { as: "span", align: "center", gap: 1, children: [`${rate}x`, _jsx(ChevronDown, { size: 14, "aria-hidden": true })] }) }), _jsx(MenuList, { minW: "160px", bg: chrome.raised, zIndex: "popover", children: _jsx(MenuOptionGroup, { type: "radio", title: labels.speed, value: String(rate), onChange: (value) => changeRate(Number(value)), children: PLAYBACK_SPEEDS.map((speed) => (_jsx(MenuItemOption, { value: String(speed), bg: chrome.raised, color: chrome.ink, _hover: { bg: chrome.hover }, _focus: { bg: chrome.hover }, children: speed === 1 ? `1x - ${labels.normalSpeed}` : `${speed}x` }, speed))) }) })] }), hasCaptions ? (_jsx(ViewerIconButton, { label: labels.captions, hint: "C", icon: _jsx(Captions, { size: 18 }), onClick: toggleCaptions, pressed: captionsOn, testId: "media-video-captions" })) : null, pipSupported ? (_jsx(ViewerIconButton, { label: labels.pip, hint: "P", icon: _jsx(PictureInPicture2, { size: 18 }), onClick: () => void togglePip(), testId: "media-video-pip" })) : null, _jsx(ViewerIconButton, { label: labels.download, icon: _jsx(Download, { size: 18 }), href: item.src, testId: "media-video-download" }), shellFullscreen || iosFullscreen ? (_jsx(ViewerIconButton, { label: isFullscreen ? labels.exitFullscreen : labels.fullscreen, hint: "F", icon: isFullscreen ? _jsx(Minimize, { size: 18 }) : _jsx(Maximize, { size: 18 }), onClick: () => void toggleFullscreen(), pressed: isFullscreen, testId: "media-video-fullscreen" })) : null] })] })] })] }));
242
242
  };
243
243
  export default MediaVideoPlayer;
@@ -0,0 +1,38 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState, useSyncExternalStore } from "react";
3
+ import { Text } from "@chakra-ui/react";
4
+ import { formatClock } from "../mediaItems.js";
5
+ import { NUMERIC_TEXT } from "../../../Theme/tokens/primitives/typography.js";
6
+ import { useViewerChrome } from "../useViewerChrome.js";
7
+ import MediaScrubber from "./MediaScrubber.js";
8
+ const createPlaybackTimeline = () => {
9
+ let seconds = 0;
10
+ const listeners = new Set();
11
+ return {
12
+ get: () => seconds,
13
+ set: (next) => {
14
+ if (next === seconds)
15
+ return;
16
+ seconds = next;
17
+ listeners.forEach((listener) => listener());
18
+ },
19
+ subscribe: (listener) => {
20
+ listeners.add(listener);
21
+ return () => {
22
+ listeners.delete(listener);
23
+ };
24
+ },
25
+ };
26
+ };
27
+ /** Playback position held outside React state, so a time tick re-renders only its subscribers. */
28
+ export const usePlaybackTimeline = () => useState(createPlaybackTimeline)[0];
29
+ export const TimelineScrubber = ({ timeline, duration, ...scrubberProps }) => {
30
+ const current = useSyncExternalStore(timeline.subscribe, timeline.get, timeline.get);
31
+ return _jsx(MediaScrubber, { value: Math.min(current, duration || current), max: duration > 0 ? duration : 0, ...scrubberProps });
32
+ };
33
+ export const TimelineClock = ({ timeline, duration, testId, }) => {
34
+ const chrome = useViewerChrome();
35
+ const readClock = () => formatClock(timeline.get());
36
+ const clock = useSyncExternalStore(timeline.subscribe, readClock, readClock);
37
+ return (_jsxs(Text, { as: "span", ml: 2, fontSize: "sm", fontWeight: 500, color: chrome.ink, sx: NUMERIC_TEXT, "data-testid": testId, children: [clock, _jsx(Text, { as: "span", color: chrome.muted, children: ` / ${formatClock(duration)}` })] }));
38
+ };
@@ -5,6 +5,6 @@ import { useViewerChrome } from "../useViewerChrome.js";
5
5
  const TileChip = ({ children, place }) => {
6
6
  const chrome = useViewerChrome();
7
7
  const corner = place === "tl" ? { left: "6px", top: "6px" } : { right: "6px", bottom: "6px" };
8
- return (_jsx(Text, { as: "span", position: "absolute", ...corner, h: "18px", px: "6px", borderRadius: "4px", bg: chrome.stage, color: chrome.ink, fontSize: "11px", fontWeight: 600, display: "inline-flex", alignItems: "center", "aria-hidden": true, children: children }));
8
+ return (_jsx(Text, { as: "span", position: "absolute", ...corner, h: "18px", px: "6px", borderRadius: "base", bg: chrome.stage, color: chrome.ink, fontSize: "xs-minus", fontWeight: 600, display: "inline-flex", alignItems: "center", "aria-hidden": true, children: children }));
9
9
  };
10
10
  export default TileChip;
@@ -36,5 +36,5 @@ export default function Modal({ size, isOpen = false, onClose, overlaybg, overla
36
36
  const footerSlot = findSlot(children, ModalFooter);
37
37
  warnDroppedSlotChildren("Modal", children, [ModalHeader, ModalBody, ModalFooter]);
38
38
  const headerContent = headerSlot !== null && headerSlot !== void 0 ? headerSlot : title;
39
- return (_jsxs(ChakraModal, { isOpen: isOpen, onClose: onClose, size: size, isCentered: isCentered, finalFocusRef: finalFocusRef, blockScrollOnMount: blockScrollOnMount, initialFocusRef: initialFocusRef, closeOnOverlayClick: closeOnOverlayClick, closeOnEsc: closeOnEsc, trapFocus: trapFocus, motionPreset: motionPreset, scrollBehavior: scrollBehavior, children: [_jsx(ModalOverlay, { bg: overlaybg, backdropFilter: overlaybackdropFilter, backdropInvert: overlaybackdropInvert, backdropBlur: overlaybackdropBlur }), _jsxs(ModalContent, { "aria-busy": isLoading || undefined, ...contentProps, children: [(headerContent || subtitle) && (_jsxs(ChakraModalHeader, { ...((_a = headerSlot === null || headerSlot === void 0 ? void 0 : headerSlot.props) !== null && _a !== void 0 ? _a : {}), children: [headerContent, subtitle && (_jsx(Text, { as: "div", mt: 0.5, fontSize: "0.875rem", fontWeight: 400, color: colors.textMuted, children: subtitle }))] })), !hideCloseButton && _jsx(ModalCloseButton, {}), isLoading ? (_jsx(Flex, { role: "status", "aria-label": "Loading", justify: "center", align: "center", py: 16, children: _jsx(Spinner, { thickness: "4px", speed: "0.65s", emptyColor: colors.boxborder[200], color: colors.accentText, size: "xl" }) })) : (_jsxs(_Fragment, { children: [_jsx(ChakraModalBody, { ...((_b = bodySlot === null || bodySlot === void 0 ? void 0 : bodySlot.props) !== null && _b !== void 0 ? _b : {}), children: bodySlot }), footerSlot && (_jsx(ChakraModalFooter, { ...footerSlot.props, children: footerSlot }))] })), portalChildren] })] }));
39
+ return (_jsxs(ChakraModal, { isOpen: isOpen, onClose: onClose, size: size, isCentered: isCentered, finalFocusRef: finalFocusRef, blockScrollOnMount: blockScrollOnMount, initialFocusRef: initialFocusRef, closeOnOverlayClick: closeOnOverlayClick, closeOnEsc: closeOnEsc, trapFocus: trapFocus, motionPreset: motionPreset, scrollBehavior: scrollBehavior, children: [_jsx(ModalOverlay, { bg: overlaybg, backdropFilter: overlaybackdropFilter, backdropInvert: overlaybackdropInvert, backdropBlur: overlaybackdropBlur }), _jsxs(ModalContent, { "aria-busy": isLoading || undefined, ...contentProps, children: [(headerContent || subtitle) && (_jsxs(ChakraModalHeader, { ...((_a = headerSlot === null || headerSlot === void 0 ? void 0 : headerSlot.props) !== null && _a !== void 0 ? _a : {}), children: [headerContent, subtitle && (_jsx(Text, { as: "div", mt: 0.5, fontSize: "sm", fontWeight: 400, color: colors.textMuted, children: subtitle }))] })), !hideCloseButton && _jsx(ModalCloseButton, {}), isLoading ? (_jsx(Flex, { role: "status", "aria-label": "Loading", justify: "center", align: "center", py: 16, children: _jsx(Spinner, { thickness: "4px", speed: "0.65s", emptyColor: colors.boxborder[200], color: colors.accentText, size: "xl" }) })) : (_jsxs(_Fragment, { children: [_jsx(ChakraModalBody, { ...((_b = bodySlot === null || bodySlot === void 0 ? void 0 : bodySlot.props) !== null && _b !== void 0 ? _b : {}), children: bodySlot }), footerSlot && (_jsx(ChakraModalFooter, { ...footerSlot.props, children: footerSlot }))] })), portalChildren] })] }));
40
40
  }
@@ -11,13 +11,13 @@ const MoreItems = ({ items, moreCount, triggerText, colorResolver, hideDots = fa
11
11
  const count = moreCount !== null && moreCount !== void 0 ? moreCount : items.length;
12
12
  if (count <= 0)
13
13
  return triggerText ? _jsx(_Fragment, { children: triggerText }) : null;
14
- return (_jsxs(Popover, { trigger: trigger, placement: placement, isLazy: true, children: [_jsx(PopoverTrigger, { children: _jsxs(Box, { display: "inline-flex", alignItems: "center", maxW: triggerMaxWidth, cursor: "pointer", tabIndex: 0, role: "button", borderRadius: "lg", sx: focusVisibleStyles(theme.colors), children: [triggerText !== undefined && (_jsx(Box, { as: "span", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", children: triggerText })), _jsxs(Box, { as: "span", ml: "6px", px: "8px", py: "1px", fontSize: "12px", fontWeight: 600, lineHeight: "1.4", borderRadius: "full", color: theme.colors.accentText, bg: countBadgeBg, transition: transitionFor(["background-color"]), _hover: { bg: listRowBackgrounds(theme.colors).selectedActive }, children: ["+", count, " more"] })] }) }), _jsxs(PopoverContent, { width: "auto", minWidth: minWidth, maxH: "280px", overflowY: "auto", borderRadius: "xl",
14
+ return (_jsxs(Popover, { trigger: trigger, placement: placement, isLazy: true, children: [_jsx(PopoverTrigger, { children: _jsxs(Box, { display: "inline-flex", alignItems: "center", maxW: triggerMaxWidth, cursor: "pointer", tabIndex: 0, role: "button", borderRadius: "lg", sx: focusVisibleStyles(theme.colors), children: [triggerText !== undefined && (_jsx(Box, { as: "span", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", children: triggerText })), _jsxs(Box, { as: "span", ml: "6px", px: "8px", py: "1px", fontSize: "xs", fontWeight: 600, lineHeight: "1.4", borderRadius: "full", color: theme.colors.accentText, bg: countBadgeBg, transition: transitionFor(["background-color"]), _hover: { bg: listRowBackgrounds(theme.colors).selectedActive }, children: ["+", count, " more"] })] }) }), _jsxs(PopoverContent, { width: "auto", minWidth: minWidth, maxH: "280px", overflowY: "auto", borderRadius: "xl",
15
15
  // Chakra defaults this surface to `colors.gray.700` in dark, which against the
16
16
  // swapped (dark-inverted) palette is a *light* grey — wrong for a popover bg. Pin it.
17
17
  bg: theme.colors.surfaceRaised, boxShadow: "lg", _focus: { outline: "none", boxShadow: "lg" }, children: [_jsx(PopoverArrow, { bg: theme.colors.surfaceRaised }), _jsx(PopoverBody, { p: 3, children: _jsx(SimpleGrid, { columns: columns, spacingX: 4, spacingY: 2, children: items === null || items === void 0 ? void 0 : items.map((item, index) => {
18
18
  var _a, _b, _c;
19
19
  const color = (_b = (_a = item.color) !== null && _a !== void 0 ? _a : colorResolver === null || colorResolver === void 0 ? void 0 : colorResolver(item)) !== null && _b !== void 0 ? _b : theme.colors.textMuted;
20
- return (_jsxs(Box, { display: "flex", alignItems: "center", gap: "8px", minW: 0, children: [!hideDots && (_jsx(Box, { flexShrink: 0, width: "8px", height: "8px", borderRadius: "full", bg: color })), _jsx(Text, { fontSize: "13px", color: theme.colors.textMuted, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", children: item.label })] }, (_c = item.id) !== null && _c !== void 0 ? _c : index));
20
+ return (_jsxs(Box, { display: "flex", alignItems: "center", gap: "8px", minW: 0, children: [!hideDots && (_jsx(Box, { flexShrink: 0, width: "8px", height: "8px", borderRadius: "full", bg: color })), _jsx(Text, { fontSize: "xs-plus", color: theme.colors.textMuted, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", children: item.label })] }, (_c = item.id) !== null && _c !== void 0 ? _c : index));
21
21
  }) }) })] })] }));
22
22
  };
23
23
  export default MoreItems;
@@ -2,6 +2,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
2
2
  import { Box, Button, Flex, Menu, MenuButton, MenuDivider, MenuItem, MenuList, Stack, Text, } from "@chakra-ui/react";
3
3
  import Avatar from "../Avatar/Avatar.js";
4
4
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
5
+ import { raisedRule } from "../../Theme/tokens/builders/surfaceRaised.js";
5
6
  import { accentTextOnCanvas, isDarkCanvas } from "../../Theme/tokens/builders/accentText.js";
6
7
  import { resolveHoverTint } from "../../Theme/tokens/builders/outlineRung.js";
7
8
  import { listRowBackgrounds } from "../../Theme/tokens/builders/rowStates.js";
@@ -39,7 +40,7 @@ export default function NavBar({ userAvathar, userName, userRole, navMenu, moreI
39
40
  px: "0.625rem",
40
41
  py: "0.5rem",
41
42
  fontWeight: 500,
42
- fontSize: "13px",
43
+ fontSize: "xs-plus",
43
44
  color: theme.colors.text[900],
44
45
  gap: theme.space["2"],
45
46
  transition: "background 0.12s",
@@ -47,14 +48,14 @@ export default function NavBar({ userAvathar, userName, userRole, navMenu, moreI
47
48
  _focus: { bg: menuHoverBg },
48
49
  _active: { bg: rowBackgrounds.selectedActive },
49
50
  };
50
- return (_jsx(Box, { bg: theme.colors.backgroundColor.light, px: 4, borderBottom: "1px solid", borderColor: theme.colors.boxborder[200], children: _jsxs(Flex, { h: 16, alignItems: "center", justifyContent: "space-between", gap: 2, children: [_jsxs(Box, { display: "flex", gap: 1.5, alignItems: "center", flex: "1 1 0%", children: [_jsx(Box, { as: "button", type: "button", onClick: () => onSideBarToggole === null || onSideBarToggole === void 0 ? void 0 : onSideBarToggole(), onMouseEnter: onSideBarPeek, onFocus: onSideBarPeek, "aria-label": sideBarToggole ? "Close navigation menu" : "Open navigation menu", "aria-expanded": !!sideBarToggole, ...iconButtonStyle, flexShrink: 0, display: forceSideBarToggle ? "flex" : { base: "flex", lg: "none" }, w: SIDEBAR_TOGGLE_HIT, h: SIDEBAR_TOGGLE_HIT, children: sideBarToggole ? (_jsx(PanelLeftClose, { size: "1.25rem" })) : (_jsx(PanelRightClose, { size: "1.25rem" })) }), (navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.onIconClick) && (_jsx(Box, { ...iconButtonStyle, as: "button", type: "button", "aria-label": "Go back", display: "flex", flexShrink: 0, onClick: () => { var _a; return (_a = navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.onIconClick) === null || _a === void 0 ? void 0 : _a.call(navigationBarText); }, children: _jsx(CircleArrowLeft, { size: "1.25rem", color: theme.colors.text[500] }) })), leading && (_jsxs(_Fragment, { children: [leading, _jsx(Box, { as: "span", "aria-hidden": "true", mx: 2, w: "1px", h: "1.625rem", flexShrink: 0, bg: theme.colors.boxborder[200] })] })), (navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.text) && (_jsx(ToolTip, { label: typeof navigationBarText.text === "string" ? navigationBarText.text : "", overflowOnly: true, placement: "bottom", children: _jsx(Text, { flex: "1 1 0%", w: 0, minW: 0, isTruncated: true, color: accentTextOnCanvas(theme.colors.secondary, theme.colors.backgroundColor.light), fontSize: "1.25rem", fontWeight: 600, fontFamily: "open-sans, sans-serif", letterSpacing: "-0.013rem", children: navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.text }) }))] }), _jsx(Flex, { minW: 0, flexShrink: 1, children: _jsxs(Stack, { direction: "row", alignItems: "center", spacing: 4, minW: 0, children: [moreIcon && (_jsx(Box, { display: "flex", alignItems: "center", minW: 0, sx: { "& > *": { minW: 0 } }, children: moreIcon })), _jsxs(Menu, { children: [_jsx(MenuButton, { as: Button, rounded: "full", variant: "link", cursor: "pointer", minW: 0, flexShrink: 0, children: _jsx(Avatar, { size: "sm", name: userName, src: userAvathar }) }), _jsx(MenuList, { alignItems: "center", zIndex: 5, p: 0, py: "0.375rem",
51
+ return (_jsx(Box, { bg: theme.colors.backgroundColor.light, px: 4, borderBottom: "1px solid", borderColor: theme.colors.boxborder[200], children: _jsxs(Flex, { h: 16, alignItems: "center", justifyContent: "space-between", gap: 2, children: [_jsxs(Box, { display: "flex", gap: 1.5, alignItems: "center", flex: "1 1 0%", children: [_jsx(Box, { as: "button", type: "button", onClick: () => onSideBarToggole === null || onSideBarToggole === void 0 ? void 0 : onSideBarToggole(), onMouseEnter: onSideBarPeek, onFocus: onSideBarPeek, "aria-label": sideBarToggole ? "Close navigation menu" : "Open navigation menu", "aria-expanded": !!sideBarToggole, ...iconButtonStyle, flexShrink: 0, display: forceSideBarToggle ? "flex" : { base: "flex", lg: "none" }, w: SIDEBAR_TOGGLE_HIT, h: SIDEBAR_TOGGLE_HIT, children: sideBarToggole ? (_jsx(PanelLeftClose, { size: "1.25rem" })) : (_jsx(PanelRightClose, { size: "1.25rem" })) }), (navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.onIconClick) && (_jsx(Box, { ...iconButtonStyle, as: "button", type: "button", "aria-label": "Go back", display: "flex", flexShrink: 0, onClick: () => { var _a; return (_a = navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.onIconClick) === null || _a === void 0 ? void 0 : _a.call(navigationBarText); }, children: _jsx(CircleArrowLeft, { size: "1.25rem", color: theme.colors.text[500] }) })), leading && (_jsxs(_Fragment, { children: [leading, _jsx(Box, { as: "span", "aria-hidden": "true", mx: 2, w: "1px", h: "1.625rem", flexShrink: 0, bg: theme.colors.boxborder[200] })] })), (navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.text) && (_jsx(ToolTip, { label: typeof navigationBarText.text === "string" ? navigationBarText.text : "", overflowOnly: true, placement: "bottom", children: _jsx(Text, { flex: "1 1 0%", w: 0, minW: 0, isTruncated: true, color: accentTextOnCanvas(theme.colors.secondary, theme.colors.backgroundColor.light), fontSize: "xl", fontWeight: 600, fontFamily: "open-sans, sans-serif", letterSpacing: "-0.013rem", children: navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.text }) }))] }), _jsx(Flex, { minW: 0, flexShrink: 1, children: _jsxs(Stack, { direction: "row", alignItems: "center", spacing: 4, minW: 0, children: [moreIcon && (_jsx(Box, { display: "flex", alignItems: "center", minW: 0, sx: { "& > *": { minW: 0 } }, children: moreIcon })), _jsxs(Menu, { children: [_jsx(MenuButton, { as: Button, rounded: "full", variant: "link", cursor: "pointer", minW: 0, flexShrink: 0, children: _jsx(Avatar, { size: "sm", name: userName, src: userAvathar }) }), _jsx(MenuList, { alignItems: "center", zIndex: 5, p: 0, py: "0.375rem",
51
52
  // Without a cap one long title stretches the whole dropdown; titles truncate instead.
52
53
  maxW: "18rem", bg: theme.colors.surfaceRaised,
53
54
  // NOTE: Chakra's MenuItem inherits --menu-bg hardcoded to #fff via dead _dark — set it or items stay white.
54
- sx: { "--menu-bg": theme.colors.backgroundColor.light }, borderRadius: "xl", boxShadow: "lg", color: theme.colors.text[900], overflow: "hidden", children: _jsxs(Box, { display: "flex", flexDirection: "column", maxH: "90vh", children: [_jsx(Box, { pt: 4, pb: 2, px: 4, children: _jsx(PersonChip, { name: userName, imageUrl: userAvathar, secondary: userRole, orientation: "vertical", size: "xl", maxW: "100%" }) }), _jsx(MenuDivider, { borderColor: theme.colors.boxborder[200] }), _jsx(Box, { flex: 1, overflowY: "auto", overflowX: "hidden", children: navMenu === null || navMenu === void 0 ? void 0 : navMenu.map((menu, idx) => {
55
+ sx: { "--menu-bg": theme.colors.backgroundColor.light }, borderRadius: "xl", boxShadow: "lg", color: theme.colors.text[900], overflow: "hidden", children: _jsxs(Box, { display: "flex", flexDirection: "column", maxH: "90vh", children: [_jsx(Box, { pt: 4, pb: 2, px: 4, children: _jsx(PersonChip, { name: userName, imageUrl: userAvathar, secondary: userRole, orientation: "vertical", size: "xl", maxW: "100%" }) }), _jsx(MenuDivider, { borderColor: raisedRule(theme.colors) }), _jsx(Box, { flex: 1, overflowY: "auto", overflowX: "hidden", children: navMenu === null || navMenu === void 0 ? void 0 : navMenu.map((menu, idx) => {
55
56
  var _a, _b, _c, _d;
56
57
  return (_jsxs(MenuItem, { onClick: () => handleNavOnClick(menu.url), sx: menuItemStyle, children: [menu.icon && (_jsx(Box, { display: "flex", alignItems: "center", flexShrink: 0, sx: { "& svg": { width: "16px", height: "16px" } }, children: menu === null || menu === void 0 ? void 0 : menu.icon })), _jsx(Box, { minW: 0, isTruncated: true, title: String((_a = menu.title) !== null && _a !== void 0 ? _a : ""), children: menu.title })] }, `${String((_d = (_c = (_b = menu.id) !== null && _b !== void 0 ? _b : menu.url) !== null && _c !== void 0 ? _c : menu.title) !== null && _d !== void 0 ? _d : idx)}-${idx}`));
57
- }) }), _jsx(MenuDivider, { borderColor: theme.colors.boxborder[200] }), _jsxs(MenuItem, { onClick: handleLogout, sx: {
58
+ }) }), _jsx(MenuDivider, { borderColor: raisedRule(theme.colors) }), _jsxs(MenuItem, { onClick: handleLogout, sx: {
58
59
  ...menuItemStyle,
59
60
  color: theme.colors.semanticText.error,
60
61
  _hover: { bg: dangerTone.bg, color: dangerTone.fg },
@@ -7,6 +7,13 @@ import { placeholderInk } from "../../Theme/tokens/builders/placeholderInk.js";
7
7
  import { resolveHoverTint } from "../../Theme/tokens/builders/outlineRung.js";
8
8
  import { FIELD_RADIUS } from "../Common/fieldStyles.js";
9
9
  import { transitionFor } from "../../Theme/tokens/primitives/motion.js";
10
+ import { focusVisibleRing, insetFocusRingShadow } from "../../Theme/chakra/focusRing.styles.js";
11
+ const onActivationKey = (activate) => (e) => {
12
+ if (e.key !== "Enter" && e.key !== " ")
13
+ return;
14
+ e.preventDefault();
15
+ activate();
16
+ };
10
17
  const countWords = (text = "") => {
11
18
  const t = text.trim();
12
19
  if (!t)
@@ -17,6 +24,7 @@ const countWords = (text = "") => {
17
24
  const NoteTextArea = forwardRef(function NoteTextArea({ width = "100%", handleSubmit, handleCancel, value, title, file, isEditable = false, saveButtonLoading, maxFileSize = 1 * 1024 * 1024, maxFilesSizeError = "Some files are too large. Maximum allowed size is", maxNoteWordCount = 15, onChange, customPlaceholder = "Add a note...", cancelButtonHide = false, titleAriaLabel = "Note title", noteAriaLabel = customPlaceholder, }, ref) {
18
25
  const theme = useCustomTheme();
19
26
  const noteAreaRef = useRef(null);
27
+ const fileInputRef = useRef(null);
20
28
  const mergedNoteRef = useMergeRefs(noteAreaRef, ref);
21
29
  const fileInputId = `note-text-area-file-${useId().replace(/:/g, "")}`;
22
30
  const [isActive, setIsActive] = useState(false);
@@ -81,6 +89,7 @@ const NoteTextArea = forwardRef(function NoteTextArea({ width = "100%", handleSu
81
89
  setFiles([]);
82
90
  }
83
91
  };
92
+ const openFilePicker = () => { var _a; return (_a = fileInputRef.current) === null || _a === void 0 ? void 0 : _a.click(); };
84
93
  const handleCloseTextArea = () => {
85
94
  setIsActive(false);
86
95
  handleCancel === null || handleCancel === void 0 ? void 0 : handleCancel(!isActive);
@@ -122,15 +131,20 @@ const NoteTextArea = forwardRef(function NoteTextArea({ width = "100%", handleSu
122
131
  const isOverLimit = noteWordCount > maxNoteWordCount;
123
132
  const collapsedHoverBg = resolveHoverTint(theme.colors.gray[50], theme.colors.background[50]);
124
133
  const activeControlHoverBg = resolveHoverTint(theme.colors.gray[100], theme.colors.gray[50]);
125
- return (_jsxs(Box, { w: width, borderRadius: FIELD_RADIUS, overflow: "hidden", border: "1px solid", borderColor: isActive ? theme.colors.primary[500] : theme.colors.boxborder[500], bg: isActive ? theme.colors.gray[50] : theme.colors.background[50], transition: transitionFor(["border-color"]), children: [!isActive && (_jsxs(Flex, { px: 3, gap: 2, align: "center", cursor: "text", onClick: handleTextArea, bg: theme.colors.background[50], borderRadius: FIELD_RADIUS, minH: "2.5rem", transition: transitionFor(["background-color"]), _hover: { bg: collapsedHoverBg }, children: [_jsx(SquarePen, { size: 16, color: theme.colors.textMuted }), _jsx(Text, { color: theme.colors.textMuted, fontSize: "sm", children: customPlaceholder })] })), isActive && (_jsxs(_Fragment, { children: [_jsxs(Box, { bg: theme.colors.background[50], children: [titleShow && (_jsxs(_Fragment, { children: [_jsx(Input, { value: titleValue, onChange: (e) => {
134
+ // NOTE: drawn inset because the rounded shell clips overflow.
135
+ const placeholderFocusRing = {
136
+ outline: "2px solid transparent",
137
+ boxShadow: insetFocusRingShadow(theme.colors),
138
+ };
139
+ return (_jsxs(Box, { w: width, borderRadius: FIELD_RADIUS, overflow: "hidden", border: "1px solid", borderColor: isActive ? theme.colors.primary[500] : theme.colors.boxborder[500], bg: isActive ? theme.colors.gray[50] : theme.colors.background[50], transition: transitionFor(["border-color"]), children: [!isActive && (_jsxs(Flex, { px: 3, gap: 2, align: "center", cursor: "text", role: "button", tabIndex: 0, onClick: handleTextArea, onKeyDown: onActivationKey(handleTextArea), _focusVisible: placeholderFocusRing, bg: theme.colors.background[50], borderRadius: FIELD_RADIUS, minH: "2.5rem", transition: transitionFor(["background-color"]), _hover: { bg: collapsedHoverBg }, children: [_jsx(SquarePen, { size: 16, color: theme.colors.textMuted }), _jsx(Text, { color: theme.colors.textMuted, fontSize: "sm", children: customPlaceholder })] })), isActive && (_jsxs(_Fragment, { children: [_jsxs(Box, { bg: theme.colors.background[50], children: [titleShow && (_jsxs(_Fragment, { children: [_jsx(Input, { value: titleValue, onChange: (e) => {
126
140
  if (e.target.value.length === 0)
127
141
  setTitleShow(false);
128
142
  setTitleValue(e.target.value);
129
- }, placeholder: "Add a title...", "aria-label": titleAriaLabel, variant: "unstyled", px: 3, pt: 2.5, pb: 1.5, fontWeight: 600, fontSize: "0.875rem", color: theme.colors.text[700], _placeholder: {
143
+ }, placeholder: "Add a title...", "aria-label": titleAriaLabel, variant: "unstyled", px: 3, pt: 2.5, pb: 1.5, fontWeight: 600, fontSize: "sm", color: theme.colors.text[700], _placeholder: {
130
144
  color: placeholderInk(theme.colors),
131
- } }), _jsx(Divider, { borderColor: theme.colors.gray[200] })] })), _jsx(Box, { bg: theme.colors.background[50], minH: "76px", px: 3, pt: 2.5, position: "relative", children: _jsx(Textarea, { ref: mergedNoteRef, value: noteValue, onChange: handleNoteChange, placeholder: customPlaceholder, "aria-label": noteAriaLabel, variant: "unstyled", resize: "none", minH: "76px", fontSize: "0.75rem", color: theme.colors.text[700], _placeholder: {
145
+ } }), _jsx(Divider, { borderColor: theme.colors.gray[200] })] })), _jsx(Box, { bg: theme.colors.background[50], minH: "76px", px: 3, pt: 2.5, position: "relative", children: _jsx(Textarea, { ref: mergedNoteRef, value: noteValue, onChange: handleNoteChange, placeholder: customPlaceholder, "aria-label": noteAriaLabel, variant: "unstyled", resize: "none", minH: "76px", fontSize: "xs", color: theme.colors.text[700], _placeholder: {
132
146
  color: placeholderInk(theme.colors),
133
- }, style: { overflow: "hidden" }, p: 0 }) })] }), _jsx(Divider, { borderColor: theme.colors.gray[200] }), _jsxs(Box, { px: 3, py: 2.5, children: [_jsxs(Flex, { align: "center", justify: "space-between", w: "100%", gap: 3, children: [_jsxs(Flex, { align: "center", gap: 2, minW: 0, children: [_jsx(Tooltip, { label: "Attach files", hasArrow: true, placement: "top", children: _jsx(Box, { as: "label", htmlFor: fileInputId, cursor: "pointer", display: "flex", alignItems: "center", justifyContent: "center", w: "1.75rem", h: "1.75rem", borderRadius: "md", color: theme.colors.textMuted, transition: transitionFor(["background-color"]), _hover: { bg: activeControlHoverBg }, children: _jsx(Paperclip, { size: 16 }) }) }), _jsx(Box, { h: "1rem", w: "1px", bg: theme.colors.gray[200] }), !titleShow ? (_jsx(Box, { as: "button", type: "button", onClick: () => setTitleShow(true), px: 2, py: 1, borderRadius: "md", color: theme.colors.textMuted, fontWeight: 500, fontSize: "sm", transition: transitionFor(["background-color"]), _hover: { bg: activeControlHoverBg }, children: "+ Add a title" })) : (_jsx(Tooltip, { label: titleValue, hasArrow: true, isDisabled: !titleValue, children: _jsx(Text, { color: theme.colors.textMuted, fontSize: "sm", fontWeight: 500, isTruncated: true, maxW: "180px", children: titleValue || "Title" }) }))] }), _jsxs(Flex, { gap: 2.5, align: "center", ml: "auto", flexShrink: 0, children: [_jsxs(Text, { fontSize: "xs", fontWeight: 500, color: isOverLimit ? theme.colors.semanticText.error : theme.colors.textMuted, whiteSpace: "nowrap", children: [noteWordCount, "/", maxNoteWordCount] }), cancelButtonHide ? null : (_jsx(Button, { size: "sm", variant: "ghost", colorScheme: "gray", onClick: handleCloseTextArea, children: "Cancel" })), _jsxs(Button, { size: "sm", variant: "solid", isLoading: !!saveButtonLoading, isDisabled: !noteValue || isSaveDisabled, onClick: () => handleSubmit(noteValue, titleValue, files), children: [saveButtonLoading ? (_jsx(Spinner, { size: "xs", thickness: "2px", mr: 2 })) : null, "Save"] })] })] }), _jsx("input", { id: fileInputId, type: "file", style: { display: "none" }, onChange: (e) => {
147
+ }, style: { overflow: "hidden" }, p: 0 }) })] }), _jsx(Divider, { borderColor: theme.colors.gray[200] }), _jsxs(Box, { px: 3, py: 2.5, children: [_jsxs(Flex, { align: "center", justify: "space-between", w: "100%", gap: 3, children: [_jsxs(Flex, { align: "center", gap: 2, minW: 0, children: [_jsx(Tooltip, { label: "Attach files", hasArrow: true, placement: "top", children: _jsx(Box, { as: "span", role: "button", tabIndex: 0, "aria-label": "Attach files", onClick: openFilePicker, onKeyDown: onActivationKey(openFilePicker), _focusVisible: focusVisibleRing(theme.colors), cursor: "pointer", display: "flex", alignItems: "center", justifyContent: "center", w: "1.75rem", h: "1.75rem", borderRadius: "md", color: theme.colors.textMuted, transition: transitionFor(["background-color"]), _hover: { bg: activeControlHoverBg }, children: _jsx(Paperclip, { size: 16 }) }) }), _jsx(Box, { h: "1rem", w: "1px", bg: theme.colors.gray[200] }), !titleShow ? (_jsx(Box, { as: "button", type: "button", onClick: () => setTitleShow(true), px: 2, py: 1, borderRadius: "md", color: theme.colors.textMuted, fontWeight: 500, fontSize: "sm", transition: transitionFor(["background-color"]), _hover: { bg: activeControlHoverBg }, children: "+ Add a title" })) : (_jsx(Tooltip, { label: titleValue, hasArrow: true, isDisabled: !titleValue, children: _jsx(Text, { color: theme.colors.textMuted, fontSize: "sm", fontWeight: 500, isTruncated: true, maxW: "180px", children: titleValue || "Title" }) }))] }), _jsxs(Flex, { gap: 2.5, align: "center", ml: "auto", flexShrink: 0, children: [_jsxs(Text, { fontSize: "xs", fontWeight: 500, color: isOverLimit ? theme.colors.semanticText.error : theme.colors.textMuted, whiteSpace: "nowrap", children: [noteWordCount, "/", maxNoteWordCount] }), cancelButtonHide ? null : (_jsx(Button, { size: "sm", variant: "ghost", colorScheme: "gray", onClick: handleCloseTextArea, children: "Cancel" })), _jsxs(Button, { size: "sm", variant: "solid", isLoading: !!saveButtonLoading, isDisabled: !noteValue || isSaveDisabled, onClick: () => handleSubmit(noteValue, titleValue, files), children: [saveButtonLoading ? (_jsx(Spinner, { size: "xs", thickness: "2px", mr: 2 })) : null, "Save"] })] })] }), _jsx("input", { ref: fileInputRef, id: fileInputId, type: "file", style: { display: "none" }, onChange: (e) => {
134
148
  const newFiles = Array.from(e.target.files || []);
135
149
  const validFiles = newFiles.filter((f) => f.size <= maxFileSize);
136
150
  const invalidFiles = newFiles.filter((f) => f.size > maxFileSize);
@@ -7,6 +7,11 @@ import { accentTextOnCanvas, isDarkCanvas, AA_NORMAL_TEXT } from "../../Theme/to
7
7
  import { resolveStatusTone } from "../../Theme/tokens/builders/statusTone.js";
8
8
  import { liftToContrast } from "../../Theme/tokens/builders/outlineRung.js";
9
9
  import Avatar from "../Avatar/Avatar.js";
10
+ import { focusVisibleRing } from "../../Theme/chakra/focusRing.styles.js";
11
+ import { reducedMotionSx } from "../../Theme/chakra/motion.js";
12
+ import { transitionFor } from "../../Theme/tokens/primitives/motion.js";
13
+ const CARD_TRANSITION = transitionFor(["box-shadow", "background-color", "border-color"], "base");
14
+ const DISMISS_TRANSITION = transitionFor(["background-color", "color", "transform"], "base");
10
15
  /** Date-driven countdown card ("due in 3 days" / "overdue by 2 hours"). For inbox-style rows use `NotificationItem`, which cannot render a future date. */
11
16
  const Notification = ({ notification, onClose, showStatus, onClick, isLoading = false, colors, }) => {
12
17
  var _a, _b, _c, _d, _e, _f, _g;
@@ -99,15 +104,25 @@ const Notification = ({ notification, onClose, showStatus, onClick, isLoading =
99
104
  return (_jsx(Box, { bg: bgColor, border: "1px solid", borderColor: borderColor, borderRadius: "xl", p: 4, w: "100%", maxW: "400px", boxShadow: "sm", children: _jsxs(VStack, { align: "start", spacing: 3, w: "100%", children: [_jsxs(HStack, { spacing: 2, children: [_jsx(SkeletonCircle, { size: "4" }), _jsx(Skeleton, { height: "14px", width: "60%" })] }), _jsxs(HStack, { align: "center", spacing: 3, w: "100%", children: [_jsx(SkeletonCircle, { size: "8" }), _jsxs(VStack, { align: "start", spacing: 1, flex: "1", children: [_jsx(Skeleton, { height: "16px", width: "70%" }), _jsx(Skeleton, { height: "12px", width: "50%" })] })] }), _jsx(Divider, { borderColor: borderColor }), _jsxs(HStack, { justify: "space-between", w: "100%", children: [_jsx(Skeleton, { height: "12px", width: "40%" }), _jsx(Skeleton, { height: "12px", width: "30%" })] })] }) }));
100
105
  }
101
106
  // 🧩 Normal render
102
- return (_jsxs(Box, { bg: bgColor, border: "1px solid", borderColor: borderColor, borderRadius: "xl", p: 4, w: "100%", maxW: "400px", boxShadow: "sm", _hover: { boxShadow: "md", transform: "translateY(-2px)" }, transition: "all 0.2s ease", position: "relative", children: [onClose && (_jsx(Box, { position: "absolute", top: "2", right: "2", cursor: "pointer", onClick: onClose, onKeyDown: (e) => {
107
+ return (_jsxs(Box, { bg: bgColor, border: "1px solid", borderColor: borderColor, borderRadius: "xl", p: 4, w: "100%", maxW: "400px", boxShadow: "sm", _hover: { boxShadow: "md" }, transition: CARD_TRANSITION, sx: reducedMotionSx(), position: "relative", children: [onClose && (_jsx(Box, { position: "absolute", top: "2", right: "2", cursor: "pointer", onClick: onClose, onKeyDown: (e) => {
103
108
  if (e.key === "Enter" || e.key === " ") {
104
109
  e.preventDefault();
105
110
  onClose();
106
111
  }
107
- }, tabIndex: 0, p: 1, borderRadius: "md", _hover: {
112
+ }, role: "button", "aria-label": "Dismiss notification", tabIndex: 0, p: 1, borderRadius: "md", _hover: {
108
113
  bg: closeTone.bg,
109
114
  color: closeTone.fg,
110
115
  transform: "scale(1.1)",
111
- }, transition: "all 0.2s ease", children: _jsx(X, { size: 16 }) })), _jsxs(VStack, { align: "start", spacing: 3, w: "100%", children: [_jsxs(HStack, { spacing: 2, children: [_jsx(Icon, { as: TimeIcon, color: dueLabelColor, boxSize: 4 }), _jsx(Text, { fontSize: "sm", color: dueLabelColor, fontWeight: "semibold", children: timeLabel })] }), _jsxs(HStack, { align: "center", spacing: 3, w: "100%", children: [_jsx(Avatar, { size: "sm", name: notification.host || notification.title, src: notification.avatarUrl || undefined }), _jsxs(VStack, { align: "start", spacing: 0, flex: "1", children: [_jsx(Text, { fontWeight: "bold", fontSize: "md", color: titleColor, cursor: "pointer", _hover: { textColor: theme.colors.accentText }, onClick: () => onClick === null || onClick === void 0 ? void 0 : onClick(notification.id, notification.type), children: notification.title }), notification.description && (_jsx(Text, { fontSize: "sm", color: textColor, children: notification.description }))] })] }), _jsx(Divider, { borderColor: borderColor }), _jsxs(HStack, { justify: "space-between", w: "100%", children: [_jsxs(HStack, { spacing: 2, children: [_jsx(Icon, { as: Calendar, color: metaColor, boxSize: 4 }), _jsx(Text, { fontSize: "sm", color: metaColor, children: formattedStartDateTime })] }), _jsxs(HStack, { spacing: 2, children: [_jsx(Icon, { as: User, color: metaColor, boxSize: 4 }), notification.host && (_jsx(Text, { fontSize: "sm", color: metaColor, children: notification.host }))] }), showStatus && (_jsx(Box, { boxSize: "3", bg: getStatusColor(), borderRadius: "full" }))] })] })] }));
116
+ }, transition: DISMISS_TRANSITION, sx: reducedMotionSx(), children: _jsx(X, { size: 16 }) })), _jsxs(VStack, { align: "start", spacing: 3, w: "100%", children: [_jsxs(HStack, { spacing: 2, children: [_jsx(Icon, { as: TimeIcon, color: dueLabelColor, boxSize: 4 }), _jsx(Text, { fontSize: "sm", color: dueLabelColor, fontWeight: 600, children: timeLabel })] }), _jsxs(HStack, { align: "center", spacing: 3, w: "100%", children: [_jsx(Avatar, { size: "sm", name: notification.host || notification.title, src: notification.avatarUrl || undefined }), _jsxs(VStack, { align: "start", spacing: 0, flex: "1", children: [_jsx(Text, { fontWeight: 700, fontSize: "md", color: titleColor, cursor: "pointer", _hover: { textColor: theme.colors.accentText }, onClick: () => onClick === null || onClick === void 0 ? void 0 : onClick(notification.id, notification.type), ...(onClick && {
117
+ role: "button",
118
+ tabIndex: 0,
119
+ onKeyDown: (e) => {
120
+ if (e.key !== "Enter" && e.key !== " ")
121
+ return;
122
+ e.preventDefault();
123
+ onClick(notification.id, notification.type);
124
+ },
125
+ _focusVisible: focusVisibleRing(theme.colors),
126
+ }), children: notification.title }), notification.description && (_jsx(Text, { fontSize: "sm", color: textColor, children: notification.description }))] })] }), _jsx(Divider, { borderColor: borderColor }), _jsxs(HStack, { justify: "space-between", w: "100%", children: [_jsxs(HStack, { spacing: 2, children: [_jsx(Icon, { as: Calendar, color: metaColor, boxSize: 4 }), _jsx(Text, { fontSize: "sm", color: metaColor, children: formattedStartDateTime })] }), _jsxs(HStack, { spacing: 2, children: [_jsx(Icon, { as: User, color: metaColor, boxSize: 4 }), notification.host && (_jsx(Text, { fontSize: "sm", color: metaColor, children: notification.host }))] }), showStatus && (_jsx(Box, { boxSize: "3", bg: getStatusColor(), borderRadius: "full" }))] })] })] }));
112
127
  };
113
128
  export default Notification;
@@ -1,7 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
3
  import { Bell } from "lucide-react";
4
- import { Box, Icon, IconButton } from "../Primitives/Primitives.js";
4
+ import { Box, Icon } from "../Primitives/Primitives.js";
5
+ import IconButton from "../IconButton/IconButton.js";
5
6
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
6
7
  import { resolveFilledSurface } from "../../Theme/tokens/builders/filledSurface.js";
7
8
  import { toneInk, toneScale } from "../../Theme/tokens/builders/tone.js";
@@ -23,7 +23,7 @@ const NotificationItem = ({ item, onClick, actions, actionsAlwaysVisible = false
23
23
  const rowShadow = unreadIndicator === "bar" && unread ? `inset 2px 0 0 ${ink}` : undefined;
24
24
  const hasTile = Boolean(item.icon) || Boolean(item.actor);
25
25
  // Never nested inside the row's own clickable button — a real <button> can't contain another.
26
- const tileAndText = (_jsxs(Flex, { align: "flex-start", gap: 3, flex: "1", minW: 0, textAlign: "left", children: [hasTile ? (_jsxs(Box, { position: "relative", flexShrink: 0, boxSize: TILE_SIZE, children: [_jsx(Flex, { boxSize: TILE_SIZE, align: "center", justify: "center", borderRadius: "lg", bg: tile.bg, border: "1px solid", borderColor: tile.border, children: item.icon ? _jsx(Icon, { as: item.icon, boxSize: "0.875rem", color: tile.fg, "aria-hidden": true }) : null }), item.actor ? (_jsx(Box, { position: "absolute", bottom: "-2px", right: "-2px", borderRadius: "full", border: "2px solid", borderColor: colors.background[50], children: _jsx(Avatar, { name: (_b = item.actor.name) !== null && _b !== void 0 ? _b : "?", src: (_c = item.actor.avatarUrl) !== null && _c !== void 0 ? _c : undefined, size: "2xs" }) })) : null] })) : null, _jsxs(Box, { flex: "1", minW: 0, children: [item.eyebrow ? (_jsx(Text, { fontSize: "0.6875rem", fontWeight: 600, color: colors.text[500], textTransform: "uppercase", children: item.eyebrow })) : null, _jsxs(Flex, { align: "center", gap: 1.5, children: [unreadIndicator === "dot" && unread ? _jsx(Box, { boxSize: "0.375rem", borderRadius: "full", bg: ink, flexShrink: 0 }) : null, _jsx(Text, { fontSize: "0.875rem", fontWeight: unread ? 700 : 500, color: colors.header[900], noOfLines: 2, children: item.title })] }), item.body ? (_jsx(Text, { mt: 0.5, fontSize: "0.8125rem", color: colors.text[600], noOfLines: 2, children: item.body })) : null, preview, _jsx(Text, { mt: 1, fontSize: "0.75rem", color: colors.text[500], children: formatRelativeTime(item.timestamp) })] })] }));
26
+ const tileAndText = (_jsxs(Flex, { align: "flex-start", gap: 3, flex: "1", minW: 0, textAlign: "left", children: [hasTile ? (_jsxs(Box, { position: "relative", flexShrink: 0, boxSize: TILE_SIZE, children: [_jsx(Flex, { boxSize: TILE_SIZE, align: "center", justify: "center", borderRadius: "lg", bg: tile.bg, border: "1px solid", borderColor: tile.border, children: item.icon ? _jsx(Icon, { as: item.icon, boxSize: "0.875rem", color: tile.fg, "aria-hidden": true }) : null }), item.actor ? (_jsx(Box, { position: "absolute", bottom: "-2px", right: "-2px", borderRadius: "full", border: "2px solid", borderColor: colors.background[50], children: _jsx(Avatar, { name: (_b = item.actor.name) !== null && _b !== void 0 ? _b : "?", src: (_c = item.actor.avatarUrl) !== null && _c !== void 0 ? _c : undefined, size: "2xs" }) })) : null] })) : null, _jsxs(Box, { flex: "1", minW: 0, children: [item.eyebrow ? (_jsx(Text, { fontSize: "xs-minus", fontWeight: 600, color: colors.text[500], textTransform: "uppercase", children: item.eyebrow })) : null, _jsxs(Flex, { align: "center", gap: 1.5, children: [unreadIndicator === "dot" && unread ? _jsx(Box, { boxSize: "0.375rem", borderRadius: "full", bg: ink, flexShrink: 0 }) : null, _jsx(Text, { fontSize: "sm", fontWeight: unread ? 700 : 500, color: colors.header[900], noOfLines: 2, children: item.title })] }), item.body ? (_jsx(Text, { mt: 0.5, fontSize: "xs-plus", color: colors.text[600], noOfLines: 2, children: item.body })) : null, preview, _jsx(Text, { mt: 1, fontSize: "xs", color: colors.text[500], children: formatRelativeTime(item.timestamp) })] })] }));
27
27
  return (_jsxs(Flex, { role: "group", position: "relative", align: "flex-start", gap: 2, px: 3, py: 2.5, bg: rowTint, boxShadow: rowShadow, _hover: { bg: rowTint !== null && rowTint !== void 0 ? rowTint : colors.backgroundColor.secondary }, children: [_jsxs(Box, { flex: "1", minW: 0, children: [onClick ? (_jsx(Box, { as: "button", type: "button", onClick: onClick, display: "flex", w: "100%", textAlign: "left", borderRadius: "md", sx: focusVisibleStyles(colors), children: tileAndText })) : (tileAndText), groupCount && groupCount > 1 ? (_jsx(Button, { label: `Show ${groupCount} updates`, variant: "link", size: "xs", colorScheme: "primary", mt: 1, pl: hasTile ? `calc(${TILE_SIZE} + 0.75rem)` : 0, onClick: onExpandGroup })) : null] }), trailing, actions ? (_jsx(Box, { opacity: actionsAlwaysVisible ? 1 : 0, _groupHover: { opacity: 1 }, _groupFocusWithin: { opacity: 1 }, flexShrink: 0, children: actions })) : null] }));
28
28
  };
29
29
  export default NotificationItem;
@@ -15,7 +15,7 @@ function NotificationList({ items, toItem, groupBy = "day", collapseGroups = fal
15
15
  const sections = groupBy === "day" ? sectionizeByDay(items, (row) => toItem(row).timestamp, dayLabels) : [{ label: "", rows: items }];
16
16
  return (_jsx(Box, { "aria-label": ariaLabel, role: ariaLabel ? "region" : undefined, children: sections.map((section, sectionIndex) => {
17
17
  const groups = groupConsecutive(section.rows, (row) => (collapseGroups ? toItem(row).groupKey : undefined));
18
- return (_jsxs(Box, { children: [section.label ? (renderSectionHeader ? (renderSectionHeader(section.label)) : (_jsx(Text, { position: "sticky", top: 0, zIndex: 1, px: 3, py: 1.5, fontSize: "0.6875rem", fontWeight: 700, textTransform: "uppercase", letterSpacing: "0.04em", color: colors.text[500], bg: colors.backgroundColor.main, children: section.label }))) : null, groups.map((group, groupIndex) => {
18
+ return (_jsxs(Box, { children: [section.label ? (renderSectionHeader ? (renderSectionHeader(section.label)) : (_jsx(Text, { position: "sticky", top: 0, zIndex: 1, px: 3, py: 1.5, fontSize: "xs-minus", fontWeight: 700, textTransform: "uppercase", letterSpacing: "0.04em", color: colors.text[500], bg: colors.backgroundColor.main, children: section.label }))) : null, groups.map((group, groupIndex) => {
19
19
  var _a;
20
20
  const groupId = `${section.label}-${(_a = group.key) !== null && _a !== void 0 ? _a : `__row${groupIndex}`}`;
21
21
  const isCollapsedRun = collapseGroups && group.rows.length > 1 && !expandedGroups.has(groupId);
@@ -7,6 +7,7 @@ import EmptyState from "../EmptyState/EmptyState.js";
7
7
  import Skeletons from "../Skeletons/Skeletons.js";
8
8
  import NotificationList from "./NotificationList.js";
9
9
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
10
+ import { raisedRule } from "../../Theme/tokens/builders/surfaceRaised.js";
10
11
  import { formatCount, useAnchoredPanelHeight } from "./notificationHelpers.js";
11
12
  const DEFAULT_EMPTY = { title: "No notifications yet", description: "You're all caught up.", size: "sm" };
12
13
  /** The panel shell: header, zone/filter row, scroll body with loading/empty/error, footer. */
@@ -18,14 +19,14 @@ function NotificationPanel({ items, toItem, zones, activeZone, onZoneChange, fil
18
19
  const measuredHeight = useAnchoredPanelHeight(ref);
19
20
  const resolvedMaxH = maxH !== null && maxH !== void 0 ? maxH : (isPopover ? measuredHeight : undefined);
20
21
  const activeZoneConfig = zones === null || zones === void 0 ? void 0 : zones.find((zone) => zone.id === activeZone);
21
- return (_jsxs(Flex, { ref: ref, direction: "column", w: "100%", maxH: isPopover ? resolvedMaxH : undefined, overflow: isPopover ? "hidden" : "visible", bg: colors.surfaceRaised, borderRadius: "xl", children: [_jsxs(Flex, { align: "center", justify: "space-between", gap: 2, px: 4, py: 3, borderBottom: "1px solid", borderColor: colors.boxborder[200], flexShrink: 0, children: [header !== null && header !== void 0 ? header : (_jsx(Text, { fontWeight: 700, fontSize: "0.9375rem", color: colors.header[900], children: "Notifications" })), headerAction] }), zones && zones.length ? (_jsx(Flex, { role: "group", "aria-label": "Notification zones", gap: 2, px: 4, py: 2, borderBottom: "1px solid", borderColor: colors.boxborder[200], flexShrink: 0, children: zones.map((zone) => {
22
+ return (_jsxs(Flex, { ref: ref, direction: "column", w: "100%", maxH: isPopover ? resolvedMaxH : undefined, overflow: isPopover ? "hidden" : "visible", bg: colors.surfaceRaised, borderRadius: "xl", children: [_jsxs(Flex, { align: "center", justify: "space-between", gap: 2, px: 4, py: 3, borderBottom: "1px solid", borderColor: raisedRule(colors), flexShrink: 0, children: [header !== null && header !== void 0 ? header : (_jsx(Text, { fontWeight: 700, fontSize: "0.9375rem", color: colors.header[900], children: "Notifications" })), headerAction] }), zones && zones.length ? (_jsx(Flex, { role: "group", "aria-label": "Notification zones", gap: 2, px: 4, py: 2, borderBottom: "1px solid", borderColor: raisedRule(colors), flexShrink: 0, children: zones.map((zone) => {
22
23
  const isActive = zone.id === activeZone;
23
24
  const label = zone.count ? `${zone.label} (${formatCount(zone.count)})` : zone.label;
24
25
  return (_jsx(Button, { label: label, size: "xs", variant: isActive ? "solid" : "ghost", colorScheme: "primary", "aria-pressed": isActive, onClick: () => onZoneChange === null || onZoneChange === void 0 ? void 0 : onZoneChange(zone.id) }, zone.id));
25
- }) })) : null, filters && filters.length ? (_jsx(Flex, { role: "group", "aria-label": "Notification filters", gap: 2, px: 4, py: 2, borderBottom: "1px solid", borderColor: colors.boxborder[200], flexShrink: 0, children: filters.map((filter) => {
26
+ }) })) : null, filters && filters.length ? (_jsx(Flex, { role: "group", "aria-label": "Notification filters", gap: 2, px: 4, py: 2, borderBottom: "1px solid", borderColor: raisedRule(colors), flexShrink: 0, children: filters.map((filter) => {
26
27
  const isActive = filter.id === activeFilter;
27
28
  const label = typeof filter.count === "number" ? `${filter.label} (${formatCount(filter.count)})` : filter.label;
28
29
  return (_jsx(Button, { label: label, size: "xs", variant: isActive ? "solid" : "ghost", colorScheme: "secondary", "aria-pressed": isActive, onClick: () => onFilterChange === null || onFilterChange === void 0 ? void 0 : onFilterChange(filter.id) }, filter.id));
29
- }) })) : null, _jsx(Box, { flex: "1", minH: 0, overflowY: isPopover ? "auto" : "visible", children: (activeZoneConfig === null || activeZoneConfig === void 0 ? void 0 : activeZoneConfig.render) ? (activeZoneConfig.render()) : isLoading ? (_jsx(Box, { p: 4, role: "status", "aria-live": "polite", "aria-label": "Loading notifications", children: [0, 1, 2, 3].map((rowIndex) => (_jsxs(Flex, { gap: 3, mt: rowIndex ? 4 : 0, align: "center", children: [_jsx(Skeletons, { type: "circle", size: "7" }), _jsxs(Box, { flex: "1", children: [_jsx(Skeletons, { type: "skeleton", height: "0.75rem", width: "70%" }), _jsx(Box, { mt: 1.5, children: _jsx(Skeletons, { type: "skeleton", height: "0.625rem", width: "45%" }) })] })] }, rowIndex))) })) : error ? (_jsx(EmptyState, { title: "Couldn't load notifications", description: error instanceof Error ? error.message : "Something went wrong. Try again.", icon: AlertCircle, colorScheme: "error", size: "sm", action: onRetry ? _jsx(Button, { label: "Retry", size: "sm", variant: "outline", colorScheme: "red", onClick: onRetry }) : undefined })) : items.length === 0 ? (_jsx(EmptyState, { ...(empty !== null && empty !== void 0 ? empty : DEFAULT_EMPTY) })) : (_jsxs(_Fragment, { children: [_jsx(NotificationList, { items: items, toItem: toItem, groupBy: groupBy, collapseGroups: collapseGroups, dayLabels: dayLabels, onItemClick: onItemClick, itemActions: itemActions, renderItem: renderItem, renderSectionHeader: renderSectionHeader, unreadIndicator: unreadIndicator, actionsAlwaysVisible: actionsAlwaysVisible, "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : "Notifications" }), hasMore ? (_jsx(Flex, { justify: "center", py: 3, children: _jsx(Button, { label: "Load more", size: "sm", variant: "ghost", colorScheme: "primary", isLoading: isLoadingMore, onClick: onLoadMore }) })) : null] })) }), footer ? (_jsx(Box, { px: 4, py: 2.5, borderTop: "1px solid", borderColor: colors.boxborder[200], flexShrink: 0, children: footer })) : null] }));
30
+ }) })) : null, _jsx(Box, { flex: "1", minH: 0, overflowY: isPopover ? "auto" : "visible", children: (activeZoneConfig === null || activeZoneConfig === void 0 ? void 0 : activeZoneConfig.render) ? (activeZoneConfig.render()) : isLoading ? (_jsx(Box, { p: 4, role: "status", "aria-live": "polite", "aria-label": "Loading notifications", children: [0, 1, 2, 3].map((rowIndex) => (_jsxs(Flex, { gap: 3, mt: rowIndex ? 4 : 0, align: "center", children: [_jsx(Skeletons, { type: "circle", size: "7" }), _jsxs(Box, { flex: "1", children: [_jsx(Skeletons, { type: "skeleton", height: "0.75rem", width: "70%" }), _jsx(Box, { mt: 1.5, children: _jsx(Skeletons, { type: "skeleton", height: "0.625rem", width: "45%" }) })] })] }, rowIndex))) })) : error ? (_jsx(EmptyState, { title: "Couldn't load notifications", description: error instanceof Error ? error.message : "Something went wrong. Try again.", icon: AlertCircle, colorScheme: "error", size: "sm", action: onRetry ? _jsx(Button, { label: "Retry", size: "sm", variant: "outline", colorScheme: "red", onClick: onRetry }) : undefined })) : items.length === 0 ? (_jsx(EmptyState, { ...(empty !== null && empty !== void 0 ? empty : DEFAULT_EMPTY) })) : (_jsxs(_Fragment, { children: [_jsx(NotificationList, { items: items, toItem: toItem, groupBy: groupBy, collapseGroups: collapseGroups, dayLabels: dayLabels, onItemClick: onItemClick, itemActions: itemActions, renderItem: renderItem, renderSectionHeader: renderSectionHeader, unreadIndicator: unreadIndicator, actionsAlwaysVisible: actionsAlwaysVisible, "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : "Notifications" }), hasMore ? (_jsx(Flex, { justify: "center", py: 3, children: _jsx(Button, { label: "Load more", size: "sm", variant: "ghost", colorScheme: "primary", isLoading: isLoadingMore, onClick: onLoadMore }) })) : null] })) }), footer ? (_jsx(Box, { px: 4, py: 2.5, borderTop: "1px solid", borderColor: raisedRule(colors), flexShrink: 0, children: footer })) : null] }));
30
31
  }
31
32
  export default NotificationPanel;
@@ -4,6 +4,7 @@ import { Box, Flex, Text, VisuallyHidden } from "@chakra-ui/react";
4
4
  import { Check, ChevronDown, Tag } from "lucide-react";
5
5
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
6
6
  import { transitionFor } from "../../Theme/tokens/primitives/motion.js";
7
+ import { NUMERIC_TEXT } from "../../Theme/tokens/primitives/typography.js";
7
8
  import { reducedMotionSx } from "../../Theme/chakra/motion.js";
8
9
  import { focusVisibleStyles } from "../../Theme/chakra/focusRing.styles.js";
9
10
  const COPIED_MS = 1600;
@@ -75,7 +76,7 @@ const OffersList = ({ offers, bestOfferId, isOpen, defaultOpen = false, onOpenCh
75
76
  height: "1px",
76
77
  background: colors.background[200],
77
78
  },
78
- }, children: [_jsxs(Box, { minW: 0, children: [_jsx(Text, { fontSize: "sm", fontWeight: 600, color: colors.header[900], children: offer.title }), _jsx(Text, { mt: 0.5, fontSize: "sm", lineHeight: 1.45, color: colors.textMuted, children: offer.detail })] }), code ? (_jsxs(Flex, { align: "center", gap: 1, flexShrink: 0, children: [_jsx(Text, { as: "span", px: 2.5, py: 1, borderRadius: "md", bg: colors.background[200], color: colors.header[900], fontSize: "xs", fontWeight: 700, letterSpacing: "0.06em", sx: { fontVariantNumeric: "tabular-nums" }, children: code }), _jsxs(Flex, { as: "button", type: "button", align: "center", gap: 1.5, minH: "2.75rem", px: 3, borderRadius: "lg", fontSize: "sm", fontWeight: 600, color: colors.accentText, "aria-label": copied ? undefined : copy.copyCode(code), onClick: () => copyCode(offer, code), transition: transitionFor(["background-color"]), _hover: { bg: colors.background[200] }, sx: { ...focusVisibleStyles(colors), ...reducedMotionSx() }, children: [copied ? _jsx(Check, { size: 16, "aria-hidden": true }) : null, _jsx("span", { children: copied ? copy.copied : copy.copy })] })] })) : null] }, offer.id));
79
+ }, children: [_jsxs(Box, { minW: 0, children: [_jsx(Text, { fontSize: "sm", fontWeight: 600, color: colors.header[900], children: offer.title }), _jsx(Text, { mt: 0.5, fontSize: "sm", lineHeight: 1.45, color: colors.textMuted, children: offer.detail })] }), code ? (_jsxs(Flex, { align: "center", gap: 1, flexShrink: 0, children: [_jsx(Text, { as: "span", px: 2.5, py: 1, borderRadius: "md", bg: colors.background[200], color: colors.header[900], fontSize: "xs", fontWeight: 700, letterSpacing: "0.06em", sx: NUMERIC_TEXT, children: code }), _jsxs(Flex, { as: "button", type: "button", align: "center", gap: 1.5, minH: "2.75rem", px: 3, borderRadius: "lg", fontSize: "sm", fontWeight: 600, color: colors.accentText, "aria-label": copied ? undefined : copy.copyCode(code), onClick: () => copyCode(offer, code), transition: transitionFor(["background-color"]), _hover: { bg: colors.background[200] }, sx: { ...focusVisibleStyles(colors), ...reducedMotionSx() }, children: [copied ? _jsx(Check, { size: 16, "aria-hidden": true }) : null, _jsx("span", { children: copied ? copy.copied : copy.copy })] })] })) : null] }, offer.id));
79
80
  }) }) }), _jsx(VisuallyHidden, { "aria-live": "polite", children: message })] }));
80
81
  };
81
82
  export default OffersList;
@@ -4,6 +4,7 @@ import { Box, Text } from "@chakra-ui/react";
4
4
  import { Check } from "lucide-react";
5
5
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
6
6
  import { transitionFor } from "../../Theme/tokens/primitives/motion.js";
7
+ import { NUMERIC_TEXT } from "../../Theme/tokens/primitives/typography.js";
7
8
  import { reducedMotionSx } from "../../Theme/chakra/motion.js";
8
9
  import { focusVisibleStyles } from "../../Theme/chakra/focusRing.styles.js";
9
10
  import { optionInk } from "./optionInk.js";
@@ -85,11 +86,11 @@ const OptionChip = forwardRef(function OptionChip({ label, selected = false, dis
85
86
  whiteSpace: "nowrap",
86
87
  boxShadow: invalid && !selected ? errorRing(colors) : "none",
87
88
  };
88
- const content = (_jsxs(Box, { as: "span", display: "inline-flex", alignItems: "center", children: [_jsx(CheckGrow, { selected: selected }), _jsx(Box, { as: "span", sx: { fontVariantNumeric: "tabular-nums" }, children: label })] }));
89
+ const content = (_jsxs(Box, { as: "span", display: "inline-flex", alignItems: "center", children: [_jsx(CheckGrow, { selected: selected }), _jsx(Box, { as: "span", sx: NUMERIC_TEXT, children: label })] }));
89
90
  return (_jsxs(Box, { ...base, ...surface, sx: {
90
91
  ...motion,
91
92
  "&:hover:not(:disabled):not([aria-checked=true])": unavailable ? undefined : { backgroundColor: tone.hoverFill },
92
93
  ...(unavailable ? { "&::after": { content: '""', ...strikeLayer(band("currentColor", "0.5px")) } } : {}),
93
- }, children: [content, isPack && hint ? (_jsx(Text, { as: "span", mt: "0.125rem", fontSize: "0.6875rem", fontWeight: 500, color: tone.hint, sx: { fontVariantNumeric: "tabular-nums" }, children: hint })) : null, !isPack && hint ? (_jsx(Text, { as: "span", position: "absolute", top: "-0.375rem", right: "-0.25rem", px: "0.375rem", py: "0.0625rem", borderRadius: "full", bg: colors.surfaceRaised, color: colors.text[800], fontSize: "0.625rem", fontWeight: 600, lineHeight: "1rem", boxShadow: `0 0 0 1px ${colors.boxborder[200]}`, pointerEvents: "none", children: hint })) : null] }));
94
+ }, children: [content, isPack && hint ? (_jsx(Text, { as: "span", mt: "0.125rem", fontSize: "xs-minus", fontWeight: 500, color: tone.hint, sx: NUMERIC_TEXT, children: hint })) : null, !isPack && hint ? (_jsx(Text, { as: "span", position: "absolute", top: "-0.375rem", right: "-0.25rem", px: "0.375rem", py: "px", borderRadius: "full", bg: colors.surfaceRaised, color: colors.text[800], fontSize: "0.625rem", fontWeight: 600, lineHeight: "1rem", boxShadow: `0 0 0 1px ${colors.boxborder[200]}`, pointerEvents: "none", children: hint })) : null] }));
94
95
  });
95
96
  export default OptionChip;
@@ -3,6 +3,7 @@ import { Box, Flex, Text, VisuallyHidden } from "@chakra-ui/react";
3
3
  import { Check } from "lucide-react";
4
4
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
5
5
  import { transitionFor } from "../../Theme/tokens/primitives/motion.js";
6
+ import { NUMERIC_TEXT } from "../../Theme/tokens/primitives/typography.js";
6
7
  import { reducedMotionSx } from "../../Theme/chakra/motion.js";
7
8
  import { onFilled } from "../../Theme/tokens/builders/accentText.js";
8
9
  const DEFAULT_LABELS = { done: "Completed", current: "In progress", upcoming: "Upcoming" };
@@ -32,7 +33,7 @@ const Marker = ({ state, colors }) => {
32
33
  };
33
34
  const StepText = ({ step, copy, align, colors, }) => {
34
35
  const active = step.state !== "upcoming";
35
- return (_jsxs(Box, { textAlign: align, minW: 0, children: [_jsxs(Text, { as: "span", display: "block", fontSize: "sm", fontWeight: active ? 700 : 500, lineHeight: 1.4, color: active ? colors.header[900] : colors.textMuted, children: [_jsxs(VisuallyHidden, { children: [copy[step.state], ": "] }), step.label] }), step.date && (_jsx(Text, { as: "span", display: "block", fontSize: "xs", lineHeight: 1.4, color: colors.textMuted, sx: { fontVariantNumeric: "tabular-nums" }, children: step.date })), step.detail && (_jsx(Text, { as: "span", display: "block", fontSize: "xs", lineHeight: 1.4, color: colors.textMuted, children: step.detail }))] }));
36
+ return (_jsxs(Box, { textAlign: align, minW: 0, children: [_jsxs(Text, { as: "span", display: "block", fontSize: "sm", fontWeight: active ? 700 : 500, lineHeight: 1.4, color: active ? colors.header[900] : colors.textMuted, children: [_jsxs(VisuallyHidden, { children: [copy[step.state], ": "] }), step.label] }), step.date && (_jsx(Text, { as: "span", display: "block", fontSize: "xs", lineHeight: 1.4, color: colors.textMuted, sx: NUMERIC_TEXT, children: step.date })), step.detail && (_jsx(Text, { as: "span", display: "block", fontSize: "xs", lineHeight: 1.4, color: colors.textMuted, children: step.detail }))] }));
36
37
  };
37
38
  /** Order tracking steps: filled check, ringed dot and hollow ring markers, each backed by spoken state text. */
38
39
  const OrderStatusTimeline = ({ steps, orientation = "vertical", labels, "aria-label": ariaLabel = "Order status", "data-testid": testId, }) => {
@@ -4,6 +4,7 @@ import { Box, Flex, Text } from "@chakra-ui/react";
4
4
  import { PartyPopper } from "lucide-react";
5
5
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
6
6
  import { resolveSoftTone, toneScale } from "../../Theme/tokens/builders/tone.js";
7
+ import { NUMERIC_TEXT } from "../../Theme/tokens/primitives/typography.js";
7
8
  import { formatPrice } from "../../Utils/price.js";
8
9
  import ProgressBar from "../ProgressBar/ProgressBar.js";
9
10
  import Skeletons from "../Skeletons/Skeletons.js";
@@ -17,8 +18,7 @@ const DEFAULT_LABELS = {
17
18
  progressLabel: "Progress to free delivery",
18
19
  };
19
20
  const MINUS = "−";
20
- const tabular = { fontVariantNumeric: "tabular-nums" };
21
- const SummarySkeleton = () => (_jsxs(Flex, { direction: "column", gap: 4, p: 5, borderRadius: "1.5rem", "aria-busy": "true", "data-testid": "order-summary-skeleton", children: [_jsx(Skeletons, { type: "skeleton", height: 4, width: "40%" }), [0, 1, 2].map((row) => (_jsxs(Flex, { justify: "space-between", children: [_jsx(Skeletons, { type: "skeleton", height: 3, width: "30%" }), _jsx(Skeletons, { type: "skeleton", height: 3, width: "20%" })] }, row))), _jsxs(Flex, { justify: "space-between", pt: 2, children: [_jsx(Skeletons, { type: "skeleton", height: 5, width: "25%" }), _jsx(Skeletons, { type: "skeleton", height: 5, width: "30%" })] })] }));
21
+ const SummarySkeleton = () => (_jsxs(Flex, { direction: "column", gap: 4, p: 5, borderRadius: "3xl", "aria-busy": "true", "data-testid": "order-summary-skeleton", children: [_jsx(Skeletons, { type: "skeleton", height: 4, width: "40%" }), [0, 1, 2].map((row) => (_jsxs(Flex, { justify: "space-between", children: [_jsx(Skeletons, { type: "skeleton", height: 3, width: "30%" }), _jsx(Skeletons, { type: "skeleton", height: 3, width: "20%" })] }, row))), _jsxs(Flex, { justify: "space-between", pt: 2, children: [_jsx(Skeletons, { type: "skeleton", height: 5, width: "25%" }), _jsx(Skeletons, { type: "skeleton", height: 5, width: "30%" })] })] }));
22
22
  /** Tonal price panel: label/amount rows, a large tabular total, a calm savings banner and free-delivery progress. */
23
23
  const OrderSummary = ({ lines, total, savings, taxNote, freeShippingProgress, hideTitle = false, isLoading = false, currency, locale, labels, "data-testid": testId, }) => {
24
24
  const { colors } = useCustomTheme();
@@ -48,11 +48,11 @@ const OrderSummary = ({ lines, total, savings, taxNote, freeShippingProgress, hi
48
48
  const unlocked = !!progress && remaining === 0;
49
49
  const percent = progress && progress.threshold > 0 ? Math.min(100, Math.round((progress.current / progress.threshold) * 100)) : 0;
50
50
  const progressText = unlocked ? copy.unlocked : copy.addMore(formatPrice(remaining, fmt));
51
- return (_jsxs(Flex, { direction: "column", gap: 3, "data-testid": testId, children: [progress && (_jsxs(Flex, { direction: "column", gap: 2, px: 1, "data-testid": "order-summary-progress", children: [_jsx(Text, { as: "p", fontSize: "sm", fontWeight: 600, lineHeight: 1.4, color: unlocked ? colors.semanticText.success : colors.header[900], sx: tabular, children: progressText }), _jsx(ProgressBar, { size: "xs", value: percent, colorScheme: unlocked ? "green" : "primary", borderRadius: "full", "aria-label": copy.progressLabel, "aria-valuetext": progressText })] })), _jsxs(Box, { as: "section", "aria-labelledby": hideTitle ? undefined : headingId, "aria-label": hideTitle ? copy.title : undefined, bg: panel, borderRadius: "1.5rem", p: 5, children: [!hideTitle && (_jsx(Text, { as: "h2", id: headingId, fontSize: "md", fontWeight: 700, lineHeight: 1.4, color: colors.header[900], mb: 4, children: copy.title })), _jsx(Flex, { as: "dl", direction: "column", gap: 3, m: 0, children: lines.map((line) => {
51
+ return (_jsxs(Flex, { direction: "column", gap: 3, "data-testid": testId, children: [progress && (_jsxs(Flex, { direction: "column", gap: 2, px: 1, "data-testid": "order-summary-progress", children: [_jsx(Text, { as: "p", fontSize: "sm", fontWeight: 600, lineHeight: 1.4, color: unlocked ? colors.semanticText.success : colors.header[900], sx: NUMERIC_TEXT, children: progressText }), _jsx(ProgressBar, { size: "xs", value: percent, colorScheme: unlocked ? "green" : "primary", borderRadius: "full", "aria-label": copy.progressLabel, "aria-valuetext": progressText })] })), _jsxs(Box, { as: "section", "aria-labelledby": hideTitle ? undefined : headingId, "aria-label": hideTitle ? copy.title : undefined, bg: panel, borderRadius: "3xl", p: 5, children: [!hideTitle && (_jsx(Text, { as: "h2", id: headingId, fontSize: "md", fontWeight: 700, lineHeight: 1.4, color: colors.header[900], mb: 4, children: copy.title })), _jsx(Flex, { as: "dl", direction: "column", gap: 3, m: 0, children: lines.map((line) => {
52
52
  var _a;
53
53
  const { text, isFree, isDeduction } = amountText(line);
54
54
  const ink = inkFor(line, isFree, isDeduction);
55
- return (_jsxs(Flex, { justify: "space-between", align: "flex-start", gap: 4, children: [_jsxs(Box, { as: "dt", minW: 0, children: [_jsx(Text, { as: "span", fontSize: "sm", lineHeight: 1.45, color: line.tone === "muted" ? colors.textMuted : colors.text[800], children: line.label }), line.hint && (_jsx(Text, { as: "span", display: "block", fontSize: "xs", lineHeight: 1.4, color: colors.textMuted, children: line.hint }))] }), _jsx(Box, { as: "dd", m: 0, flexShrink: 0, textAlign: "right", fontSize: "sm", fontWeight: isFree || isDeduction ? 600 : 500, lineHeight: 1.45, color: ink, sx: tabular, children: text })] }, (_a = line.id) !== null && _a !== void 0 ? _a : line.label));
56
- }) }), _jsxs(Flex, { justify: "space-between", align: "baseline", gap: 4, mt: 6, children: [_jsx(Text, { as: "span", fontSize: "md", fontWeight: 700, color: colors.header[900], children: copy.total }), _jsxs(Box, { textAlign: "right", children: [_jsx(Text, { as: "span", display: "block", fontSize: "1.5rem", fontWeight: 700, lineHeight: 1.2, letterSpacing: "-0.02em", color: colors.header[900], sx: tabular, "data-testid": "order-summary-total", children: formatPrice(total, fmt) }), taxNote && (_jsx(Text, { as: "span", display: "block", fontSize: "xs", lineHeight: 1.4, color: colors.textMuted, children: taxNote }))] })] }), savings !== undefined && savings > 0 && (_jsxs(Flex, { align: "center", gap: 2, mt: 4, px: 3, py: 2.5, borderRadius: "0.75rem", bg: success.bg, color: success.fg, "data-testid": "order-summary-savings", children: [_jsx(PartyPopper, { size: 16, "aria-hidden": true }), _jsx(Text, { as: "span", fontSize: "sm", fontWeight: 600, lineHeight: 1.4, sx: tabular, children: copy.savings(formatPrice(savings, fmt)) })] }))] })] }));
55
+ return (_jsxs(Flex, { justify: "space-between", align: "flex-start", gap: 4, children: [_jsxs(Box, { as: "dt", minW: 0, children: [_jsx(Text, { as: "span", fontSize: "sm", lineHeight: 1.45, color: line.tone === "muted" ? colors.textMuted : colors.text[800], children: line.label }), line.hint && (_jsx(Text, { as: "span", display: "block", fontSize: "xs", lineHeight: 1.4, color: colors.textMuted, children: line.hint }))] }), _jsx(Box, { as: "dd", m: 0, flexShrink: 0, textAlign: "right", fontSize: "sm", fontWeight: isFree || isDeduction ? 600 : 500, lineHeight: 1.45, color: ink, sx: NUMERIC_TEXT, children: text })] }, (_a = line.id) !== null && _a !== void 0 ? _a : line.label));
56
+ }) }), _jsxs(Flex, { justify: "space-between", align: "baseline", gap: 4, mt: 6, children: [_jsx(Text, { as: "span", fontSize: "md", fontWeight: 700, color: colors.header[900], children: copy.total }), _jsxs(Box, { textAlign: "right", children: [_jsx(Text, { as: "span", display: "block", fontSize: "2xl", fontWeight: 700, lineHeight: 1.2, letterSpacing: "-0.02em", color: colors.header[900], sx: NUMERIC_TEXT, "data-testid": "order-summary-total", children: formatPrice(total, fmt) }), taxNote && (_jsx(Text, { as: "span", display: "block", fontSize: "xs", lineHeight: 1.4, color: colors.textMuted, children: taxNote }))] })] }), savings !== undefined && savings > 0 && (_jsxs(Flex, { align: "center", gap: 2, mt: 4, px: 3, py: 2.5, borderRadius: "xl", bg: success.bg, color: success.fg, "data-testid": "order-summary-savings", children: [_jsx(PartyPopper, { size: 16, "aria-hidden": true }), _jsx(Text, { as: "span", fontSize: "sm", fontWeight: 600, lineHeight: 1.4, sx: NUMERIC_TEXT, children: copy.savings(formatPrice(savings, fmt)) })] }))] })] }));
57
57
  };
58
58
  export default OrderSummary;
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useState } from "react";
3
3
  import { Modal, ModalOverlay, ModalContent, ModalHeader, ModalCloseButton, ModalBody, HStack, VStack, } from "@chakra-ui/react";
4
4
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
5
+ import { raisedRule } from "../../Theme/tokens/builders/surfaceRaised.js";
5
6
  import Button from "../Button/Button.js";
6
7
  import TextInput from "../Input/TextInput.js";
7
8
  const EMPTY = {
@@ -51,6 +52,6 @@ const CreateOrgModal = ({ isOpen, onClose, isLoading, onSubmit, labels, }) => {
51
52
  phone: (_a = values === null || values === void 0 ? void 0 : values.phone) === null || _a === void 0 ? void 0 : _a.trim(),
52
53
  });
53
54
  };
54
- return (_jsxs(Modal, { isOpen: isOpen, onClose: onClose, isCentered: true, autoFocus: false, children: [_jsx(ModalOverlay, { backdropFilter: "blur(4px)" }), _jsxs(ModalContent, { bg: colors.surfaceRaised, borderRadius: "xl", overflow: "hidden", children: [_jsx(ModalHeader, { borderBottom: "1px solid", borderColor: colors.boxborder[200], fontSize: "1.05rem", fontWeight: 600, children: labels.createOrganization }), _jsx(ModalCloseButton, {}), _jsxs(ModalBody, { py: 6, children: [_jsxs(VStack, { spacing: 4, align: "stretch", children: [_jsx(TextInput, { label: labels.companyName, value: values.company_name, onChange: (e) => setField("company_name", e.target.value), isRequired: true, width: "100%", placeholder: "Enter Company Name", error: !!errors.company_name, errorMessage: errors.company_name }), _jsx(TextInput, { label: labels.companyAddress, value: values.company_address, onChange: (e) => setField("company_address", e.target.value), isRequired: true, width: "100%", placeholder: "Enter Company Address", error: !!errors.company_address, errorMessage: errors.company_address }), _jsx(TextInput, { label: labels.phone, value: values.phone, onChange: (e) => setField("phone", e.target.value), isRequired: true, width: "100%", placeholder: "Enter Phone Number", error: !!errors.phone, errorMessage: errors.phone })] }), _jsxs(HStack, { justifyContent: "center", spacing: 4, mt: 6, children: [_jsx(Button, { label: labels.cancel, onClick: onClose, variant: "outline", colorScheme: "red", size: "sm" }), _jsx(Button, { label: labels.submit, onClick: handleSubmit, colorScheme: "primary", size: "sm", isLoading: isLoading })] })] })] })] }));
55
+ return (_jsxs(Modal, { isOpen: isOpen, onClose: onClose, isCentered: true, autoFocus: false, children: [_jsx(ModalOverlay, { backdropFilter: "blur(4px)" }), _jsxs(ModalContent, { bg: colors.surfaceRaised, borderRadius: "xl", overflow: "hidden", children: [_jsx(ModalHeader, { borderBottom: "1px solid", borderColor: raisedRule(colors), fontSize: "1.05rem", fontWeight: 600, children: labels.createOrganization }), _jsx(ModalCloseButton, {}), _jsxs(ModalBody, { py: 6, children: [_jsxs(VStack, { spacing: 4, align: "stretch", children: [_jsx(TextInput, { label: labels.companyName, value: values.company_name, onChange: (e) => setField("company_name", e.target.value), isRequired: true, width: "100%", placeholder: "Enter Company Name", error: !!errors.company_name, errorMessage: errors.company_name }), _jsx(TextInput, { label: labels.companyAddress, value: values.company_address, onChange: (e) => setField("company_address", e.target.value), isRequired: true, width: "100%", placeholder: "Enter Company Address", error: !!errors.company_address, errorMessage: errors.company_address }), _jsx(TextInput, { label: labels.phone, value: values.phone, onChange: (e) => setField("phone", e.target.value), isRequired: true, width: "100%", placeholder: "Enter Phone Number", error: !!errors.phone, errorMessage: errors.phone })] }), _jsxs(HStack, { justifyContent: "center", spacing: 4, mt: 6, children: [_jsx(Button, { label: labels.cancel, onClick: onClose, variant: "outline", colorScheme: "red", size: "sm" }), _jsx(Button, { label: labels.submit, onClick: handleSubmit, colorScheme: "primary", size: "sm", isLoading: isLoading })] })] })] })] }));
55
56
  };
56
57
  export default CreateOrgModal;