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

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 (503) hide show
  1. package/CHANGELOG.md +153 -0
  2. package/COMPONENT-GOTCHAS.md +119 -1
  3. package/dist/Components/Accordion/Accordion.js +2 -2
  4. package/dist/Components/AddressCard/AddressCard.js +2 -1
  5. package/dist/Components/Apexcharts/ApexLineChart/ApexLineChart.js +1 -1
  6. package/dist/Components/AppSwitcher/AppSwitcher.js +1 -1
  7. package/dist/Components/AppearanceSettings/AppearanceSettings.js +1 -1
  8. package/dist/Components/AudioRecorder/AudioRecorder.js +2 -1
  9. package/dist/Components/Avatar/Avatar.d.ts +2 -1
  10. package/dist/Components/Avatar/Avatar.js +5 -3
  11. package/dist/Components/Backdrop/Backdrop.js +1 -1
  12. package/dist/Components/BagBar/BagBar.js +2 -1
  13. package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.js +1 -1
  14. package/dist/Components/CalendarGrid/CalendarGrid.js +5 -5
  15. package/dist/Components/CalendarGrid/calendarMath.js +18 -6
  16. package/dist/Components/Card/PaymentCard/PaymentCard.js +6 -5
  17. package/dist/Components/CartItem/CartItem.js +2 -1
  18. package/dist/Components/Checkbox/Checkbox.d.ts +18 -3
  19. package/dist/Components/Checkbox/Checkbox.js +9 -7
  20. package/dist/Components/CheckoutKit/selectable.js +1 -1
  21. package/dist/Components/ChoiceCard/ChoiceCard.d.ts +3 -0
  22. package/dist/Components/ChoiceCard/ChoiceCard.js +16 -0
  23. package/dist/Components/ChoiceCard/ChoiceCardGroup.d.ts +3 -0
  24. package/dist/Components/ChoiceCard/ChoiceCardGroup.js +6 -0
  25. package/dist/Components/ChoiceCard/ChoiceCardProps.d.ts +28 -0
  26. package/dist/Components/ChoiceCard/ChoiceCardProps.js +2 -0
  27. package/dist/Components/CircularProgress/CircularProgress.js +4 -8
  28. package/dist/Components/CircularProgress/CircularProgressProps.d.ts +5 -3
  29. package/dist/Components/CircularProgress/arc.d.ts +9 -1
  30. package/dist/Components/CircularProgress/arc.js +15 -1
  31. package/dist/Components/Common/FormLabel.js +1 -1
  32. package/dist/Components/Common/FormattedDescription.js +1 -1
  33. package/dist/Components/Common/HelperText.d.ts +5 -4
  34. package/dist/Components/Common/HelperText.js +10 -7
  35. package/dist/Components/Common/fieldStyles.d.ts +4 -4
  36. package/dist/Components/Common/fieldStyles.js +2 -1
  37. package/dist/Components/ContactForm/ContactForm.js +1 -1
  38. package/dist/Components/CopyButton/CopyButton.js +12 -5
  39. package/dist/Components/CouponField/CouponField.js +4 -3
  40. package/dist/Components/CustomModulesTable/CustomModulesTableProps.d.ts +18 -0
  41. package/dist/Components/CustomModulesTable/EditModuleModal.js +1 -1
  42. package/dist/Components/DatePicker/CalendarPanel.js +2 -2
  43. package/dist/Components/DatePicker/DatePicker.js +8 -2
  44. package/dist/Components/DatePicker/RangeDatePicker.d.ts +9 -3
  45. package/dist/Components/DatePicker/RangeDatePicker.js +6 -5
  46. package/dist/Components/DatePicker/SingleDatePicker.d.ts +9 -5
  47. package/dist/Components/DatePicker/SingleDatePicker.js +7 -4
  48. package/dist/Components/DatePicker/ThemeDatePicker.d.ts +8 -4
  49. package/dist/Components/DatePicker/ThemeDatePicker.js +9 -6
  50. package/dist/Components/DatePicker/TimeOnlyPicker.d.ts +9 -5
  51. package/dist/Components/DatePicker/TimeOnlyPicker.js +6 -4
  52. package/dist/Components/DatePicker/TimePickerInput.d.ts +2 -2
  53. package/dist/Components/DatePicker/TimePickerInput.js +6 -5
  54. package/dist/Components/DescriptionList/DescriptionList.d.ts +1 -1
  55. package/dist/Components/DescriptionList/DescriptionList.js +3 -3
  56. package/dist/Components/DescriptionList/DescriptionListProps.d.ts +3 -3
  57. package/dist/Components/Dropdown/DropDown.js +12 -4
  58. package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +2 -1
  59. package/dist/Components/EmptyState/EmptyState.js +2 -2
  60. package/dist/Components/EmptyState/EmptyStateProps.d.ts +3 -3
  61. package/dist/Components/FileUpload/FileUpload.js +21 -15
  62. package/dist/Components/FileUpload/useObjectUrl.d.ts +1 -0
  63. package/dist/Components/FileUpload/useObjectUrl.js +14 -0
  64. package/dist/Components/FileUploader/FileUploader.js +9 -3
  65. package/dist/Components/FileUploader/FileUploaderProps.d.ts +8 -0
  66. package/dist/Components/FilterBar/FilterBar.d.ts +1 -1
  67. package/dist/Components/FilterBar/FilterBar.js +2 -2
  68. package/dist/Components/FilterBar/FilterBarProps.d.ts +3 -3
  69. package/dist/Components/FilterSidebar/FilterSidebar.js +10 -6
  70. package/dist/Components/Form/FormWrapper.js +1 -1
  71. package/dist/Components/FormField/FormField.d.ts +3 -0
  72. package/dist/Components/FormField/FormField.js +57 -0
  73. package/dist/Components/FormField/FormFieldProps.d.ts +33 -0
  74. package/dist/Components/FormField/FormFieldProps.js +2 -0
  75. package/dist/Components/Header/HeaderActions.js +2 -2
  76. package/dist/Components/Header/components/mobileMenu.js +1 -1
  77. package/dist/Components/IconButton/IconButton.d.ts +5 -0
  78. package/dist/Components/IconButton/IconButton.js +24 -0
  79. package/dist/Components/IconButton/IconButtonProps.d.ts +10 -0
  80. package/dist/Components/IconButton/IconButtonProps.js +2 -0
  81. package/dist/Components/Input/PhoneNumberInput.js +14 -0
  82. package/dist/Components/Input/PhoneNumberInputProps.d.ts +1 -0
  83. package/dist/Components/KanbanBoard/AccountCard.js +3 -2
  84. package/dist/Components/KanbanBoard/AccountRow.js +1 -1
  85. package/dist/Components/KanbanBoard/KanbanBoard.js +56 -39
  86. package/dist/Components/KanbanBoard/MeasuredItem.js +6 -14
  87. package/dist/Components/KanbanBoard/boardStore.d.ts +8 -0
  88. package/dist/Components/KanbanBoard/boardStore.js +27 -0
  89. package/dist/Components/Kbd/Kbd.js +1 -1
  90. package/dist/Components/LimitReachedModal/LimitReachedModal.js +1 -1
  91. package/dist/Components/Loading/Loading.js +1 -1
  92. package/dist/Components/MediaGallery/MediaGallery.js +1 -1
  93. package/dist/Components/MediaGallery/MediaLightbox.js +2 -1
  94. package/dist/Components/MediaGallery/glass.js +2 -1
  95. package/dist/Components/MediaViewer/MediaViewer.js +1 -1
  96. package/dist/Components/MediaViewer/components/MediaAudioPlayer.js +7 -7
  97. package/dist/Components/MediaViewer/components/MediaImageViewer.js +1 -1
  98. package/dist/Components/MediaViewer/components/MediaScrubber.js +5 -1
  99. package/dist/Components/MediaViewer/components/MediaVideoPlayer.js +7 -7
  100. package/dist/Components/MediaViewer/components/PlaybackTimeline.d.ts +20 -0
  101. package/dist/Components/MediaViewer/components/PlaybackTimeline.js +47 -0
  102. package/dist/Components/MediaViewer/components/TileChip.js +1 -1
  103. package/dist/Components/Modal/Modal.js +1 -1
  104. package/dist/Components/MoreItems/MoreItems.js +2 -2
  105. package/dist/Components/NavigationBar/NavigationBar.js +2 -2
  106. package/dist/Components/NoteTextArea/NoteTextArea.js +18 -4
  107. package/dist/Components/NoteTextArea/NoteTextAreaProps.d.ts +12 -0
  108. package/dist/Components/Notification/Notification.js +17 -3
  109. package/dist/Components/Notification/NotificationProps.d.ts +17 -1
  110. package/dist/Components/NotificationBell/NotificationBell.js +5 -1
  111. package/dist/Components/NotificationBell/NotificationItem.js +1 -1
  112. package/dist/Components/NotificationBell/NotificationList.js +1 -1
  113. package/dist/Components/OffersList/OffersList.js +2 -1
  114. package/dist/Components/OptionChip/OptionChip.js +3 -2
  115. package/dist/Components/OrderStatusTimeline/OrderStatusTimeline.js +2 -1
  116. package/dist/Components/OrderSummary/OrderSummary.js +5 -5
  117. package/dist/Components/OrganizationDetails/OrganizationDetails.js +7 -1
  118. package/dist/Components/PageHeader/PageHeader.d.ts +1 -1
  119. package/dist/Components/PageHeader/PageHeader.js +2 -2
  120. package/dist/Components/PageHeader/PageHeaderProps.d.ts +3 -3
  121. package/dist/Components/Pagination/Pagination.d.ts +5 -0
  122. package/dist/Components/Pagination/Pagination.js +48 -0
  123. package/dist/Components/Pagination/PaginationProps.d.ts +46 -0
  124. package/dist/Components/Pagination/PaginationProps.js +9 -0
  125. package/dist/Components/Pagination/pageWindow.d.ts +4 -0
  126. package/dist/Components/Pagination/pageWindow.js +22 -0
  127. package/dist/Components/PaymentOption/PaymentOption.js +1 -1
  128. package/dist/Components/PersonChip/PersonChip.js +2 -2
  129. package/dist/Components/PinInput/PinInput.d.ts +1 -1
  130. package/dist/Components/PinInput/PinInput.js +17 -2
  131. package/dist/Components/PinInput/PinInputProps.d.ts +9 -1
  132. package/dist/Components/PincodeChecker/PincodeChecker.js +4 -4
  133. package/dist/Components/PlanPill/PlanPill.js +2 -1
  134. package/dist/Components/PriceBlock/PriceBlock.js +3 -3
  135. package/dist/Components/Primitives/Primitives.d.ts +2 -2
  136. package/dist/Components/Primitives/Primitives.js +2 -3
  137. package/dist/Components/ProductBadges/ProductBadges.js +2 -1
  138. package/dist/Components/ProductCard/ProductCard.js +1 -1
  139. package/dist/Components/ProductCard/ProductCardAction.js +2 -2
  140. package/dist/Components/ProductCard/ProductCardSwatches.js +2 -1
  141. package/dist/Components/ProductCard/cardMetrics.d.ts +1 -1
  142. package/dist/Components/ProductCard/cardMetrics.js +5 -1
  143. package/dist/Components/ProfileCard/ProfileCardProps.d.ts +11 -0
  144. package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +3 -2
  145. package/dist/Components/QuantityStepper/QuantityStepper.js +2 -1
  146. package/dist/Components/RadioButton/RadioButton.d.ts +11 -2
  147. package/dist/Components/RadioButton/RadioButton.js +9 -6
  148. package/dist/Components/RangeSlider/RangeSlider.js +3 -3
  149. package/dist/Components/Rating/Rating.js +2 -1
  150. package/dist/Components/Reorder/Reorder.js +3 -2
  151. package/dist/Components/ReviewList/ReviewList.js +3 -3
  152. package/dist/Components/ReviewSummary/ReviewSummary.js +3 -3
  153. package/dist/Components/SaveBar/SaveBar.d.ts +1 -1
  154. package/dist/Components/SaveBar/SaveBar.js +2 -2
  155. package/dist/Components/SaveBar/SaveBarProps.d.ts +3 -3
  156. package/dist/Components/Search/Search.js +2 -9
  157. package/dist/Components/Search/ctrlShortcut.d.ts +1 -0
  158. package/dist/Components/Search/ctrlShortcut.js +29 -0
  159. package/dist/Components/SearchSelect/SearchSelect.js +117 -30
  160. package/dist/Components/SegmentedControl/SegmentedControl.d.ts +8 -2
  161. package/dist/Components/SegmentedControl/SegmentedControl.js +9 -5
  162. package/dist/Components/Select/SelectPopup.js +6 -4
  163. package/dist/Components/SelectSearch/SelectSearch.js +5 -4
  164. package/dist/Components/SettingRow/SettingRow.js +1 -1
  165. package/dist/Components/SideBar/SecondaryBar.js +2 -1
  166. package/dist/Components/SideBar/SideBar.js +82 -21
  167. package/dist/Components/SideBar/components/MenuItemBox.d.ts +2 -2
  168. package/dist/Components/SideBar/components/MenuItemBox.js +4 -3
  169. package/dist/Components/SideBar/components/MenuItems.d.ts +2 -2
  170. package/dist/Components/SideBar/components/MenuItems.js +3 -3
  171. package/dist/Components/SideBar/components/OtherApps.js +5 -1
  172. package/dist/Components/SideBar/components/OverflowTooltipText.js +4 -5
  173. package/dist/Components/SideBar/components/PinnedSection.js +2 -2
  174. package/dist/Components/SideBar/components/TextTruncation.js +11 -6
  175. package/dist/Components/SideBar/sidebarScale.d.ts +1 -1
  176. package/dist/Components/SideBar/sidebarScale.js +2 -1
  177. package/dist/Components/SignInActivityTable/SignInActivityTableProps.d.ts +8 -0
  178. package/dist/Components/Skeletons/SkeletonProps.d.ts +5 -2
  179. package/dist/Components/Skeletons/Skeletons.d.ts +1 -1
  180. package/dist/Components/Skeletons/Skeletons.js +4 -2
  181. package/dist/Components/SkipLink/SkipLink.d.ts +4 -0
  182. package/dist/Components/SkipLink/SkipLink.js +54 -0
  183. package/dist/Components/SkipLink/SkipLinkProps.d.ts +8 -0
  184. package/dist/Components/SkipLink/SkipLinkProps.js +2 -0
  185. package/dist/Components/Slider/Slider.d.ts +2 -2
  186. package/dist/Components/Slider/Slider.js +11 -4
  187. package/dist/Components/SpecTable/SpecTable.js +2 -1
  188. package/dist/Components/StageProgress/StageItem.js +2 -5
  189. package/dist/Components/StageProgress/StageProgress.js +2 -1
  190. package/dist/Components/StageProgress/StageProgressProps.d.ts +1 -1
  191. package/dist/Components/StageProgress/StepperStage.js +2 -6
  192. package/dist/Components/StageProgress/centerInStrip.d.ts +2 -0
  193. package/dist/Components/StageProgress/centerInStrip.js +15 -0
  194. package/dist/Components/StatCard/StatCard.d.ts +1 -1
  195. package/dist/Components/StatCard/StatCard.js +5 -4
  196. package/dist/Components/StatCard/StatCardProps.d.ts +3 -3
  197. package/dist/Components/StickyBuyBar/StickyBuyBar.js +1 -1
  198. package/dist/Components/Table/components/TableActions.js +40 -24
  199. package/dist/Components/Table/components/TableBody.js +25 -40
  200. package/dist/Components/Table/components/rowMeasurer.d.ts +8 -0
  201. package/dist/Components/Table/components/rowMeasurer.js +71 -0
  202. package/dist/Components/Table/filters/TableFilters.js +2 -13
  203. package/dist/Components/Table/hooks/useTable.js +12 -9
  204. package/dist/Components/Tabs/components/CountBadge.js +3 -3
  205. package/dist/Components/Tabs/components/Tab.d.ts +2 -1
  206. package/dist/Components/Tabs/components/Tab.js +4 -3
  207. package/dist/Components/Tabs/components/TabList.js +16 -1
  208. package/dist/Components/Tag/Tag.d.ts +2 -2
  209. package/dist/Components/Tag/Tag.js +15 -12
  210. package/dist/Components/Tag/Tag.styles.js +6 -4
  211. package/dist/Components/TagInput/TagInput.d.ts +3 -0
  212. package/dist/Components/TagInput/TagInput.js +99 -0
  213. package/dist/Components/TagInput/TagInputProps.d.ts +46 -0
  214. package/dist/Components/TagInput/TagInputProps.js +2 -0
  215. package/dist/Components/TagInput/tagEntries.d.ts +15 -0
  216. package/dist/Components/TagInput/tagEntries.js +45 -0
  217. package/dist/Components/TimePicker/TimePicker.d.ts +3 -0
  218. package/dist/Components/TimePicker/TimePicker.js +50 -0
  219. package/dist/Components/TimePicker/TimePickerProps.d.ts +44 -0
  220. package/dist/Components/TimePicker/TimePickerProps.js +2 -0
  221. package/dist/Components/TimePicker/timeParts.d.ts +10 -0
  222. package/dist/Components/TimePicker/timeParts.js +36 -0
  223. package/dist/Components/Timeline/Timeline.js +11 -9
  224. package/dist/Components/Toaster/Toaster.js +2 -1
  225. package/dist/Components/Toggle/TableToggle.js +4 -3
  226. package/dist/Components/ToggleSwitch/ToggleSwitch.d.ts +3 -2
  227. package/dist/Components/ToggleSwitch/ToggleSwitch.js +6 -5
  228. package/dist/Components/ToolTip/ToolTip.js +86 -8
  229. package/dist/Components/UpgradeButton/UpgradeButton.js +4 -2
  230. package/dist/Components/UserDetails/UserDetails.js +7 -1
  231. package/dist/Components/VisuallyHidden/VisuallyHidden.d.ts +15 -0
  232. package/dist/Components/VisuallyHidden/VisuallyHidden.js +21 -0
  233. package/dist/Components/VisuallyHidden/VisuallyHiddenProps.d.ts +3 -0
  234. package/dist/Components/VisuallyHidden/VisuallyHiddenProps.js +2 -0
  235. package/dist/Components/WizardDialog/WizardDialog.js +10 -5
  236. package/dist/Components/WizardDialog/WizardDialogProps.d.ts +4 -0
  237. package/dist/Components/WorkspaceWindow/WorkspaceTrayPreview.js +5 -1
  238. package/dist/Components/WorkspaceWindow/WorkspaceWindow.js +15 -2
  239. package/dist/Components/WorkspaceWindow/WorkspaceWindowProps.d.ts +2 -1
  240. package/dist/Hooks/sharedResizeObserver.d.ts +6 -0
  241. package/dist/Hooks/sharedResizeObserver.js +77 -0
  242. package/dist/Hooks/useIsTruncated.js +3 -4
  243. package/dist/Theme/chakra/Menu.styles.d.ts +1 -1
  244. package/dist/Theme/chakra/common.web.d.ts +1 -0
  245. package/dist/Theme/chakra/componentStyles.d.ts +1 -1
  246. package/dist/Theme/chakra/createBrandTheme.d.ts +3 -0
  247. package/dist/Theme/chakra/createBrandTheme.js +34 -4
  248. package/dist/Theme/chakra/focusRing.styles.d.ts +2 -0
  249. package/dist/Theme/chakra/focusRing.styles.js +5 -1
  250. package/dist/Theme/chakra/fonts.web.d.ts +2 -0
  251. package/dist/Theme/chakra/motion.d.ts +14 -0
  252. package/dist/Theme/chakra/motion.js +26 -1
  253. package/dist/Theme/index.d.ts +2 -1
  254. package/dist/Theme/index.js +12 -9
  255. package/dist/Theme/provider/PixelizeThemeProvider.d.ts +4 -1
  256. package/dist/Theme/provider/PixelizeThemeProvider.js +21 -12
  257. package/dist/Theme/provider/ThemeSwitcher.js +3 -2
  258. package/dist/Theme/themeProps.d.ts +3 -0
  259. package/dist/Theme/tokens/brands/emerald/palette.dark.js +2 -1
  260. package/dist/Theme/tokens/brands/index.d.ts +1 -1
  261. package/dist/Theme/tokens/brands/index.js +14 -13
  262. package/dist/Theme/tokens/brands/lavender/palette.dark.js +2 -1
  263. package/dist/Theme/tokens/brands/meadow/palette.dark.js +2 -1
  264. package/dist/Theme/tokens/brands/radiant/palette.dark.js +2 -1
  265. package/dist/Theme/tokens/brands/rosewood/palette.dark.js +2 -1
  266. package/dist/Theme/tokens/brands/skyline/palette.dark.js +2 -1
  267. package/dist/Theme/tokens/brands/slate/palette.dark.js +2 -1
  268. package/dist/Theme/tokens/brands/storefront/palette.dark.js +2 -1
  269. package/dist/Theme/tokens/brands/zinc/palette.dark.js +28 -24
  270. package/dist/Theme/tokens/builders/color.js +11 -7
  271. package/dist/Theme/tokens/builders/filledSurface.d.ts +3 -1
  272. package/dist/Theme/tokens/builders/filledSurface.js +7 -7
  273. package/dist/Theme/tokens/builders/lazy.d.ts +5 -0
  274. package/dist/Theme/tokens/builders/lazy.js +55 -0
  275. package/dist/Theme/tokens/builders/memo.d.ts +9 -0
  276. package/dist/Theme/tokens/builders/memo.js +28 -0
  277. package/dist/Theme/tokens/builders/memoByReads.d.ts +2 -0
  278. package/dist/Theme/tokens/builders/memoByReads.js +50 -0
  279. package/dist/Theme/tokens/builders/outlineRung.js +10 -2
  280. package/dist/Theme/tokens/builders/tone.js +5 -4
  281. package/dist/Theme/tokens/primitives/borderWidths.d.ts +6 -0
  282. package/dist/Theme/tokens/primitives/borderWidths.js +5 -0
  283. package/dist/Theme/tokens/primitives/index.d.ts +8 -3
  284. package/dist/Theme/tokens/primitives/index.js +8 -1
  285. package/dist/Theme/tokens/primitives/motion.d.ts +25 -2
  286. package/dist/Theme/tokens/primitives/motion.js +23 -5
  287. package/dist/Theme/tokens/primitives/optionRowSizes.d.ts +1 -1
  288. package/dist/Theme/tokens/primitives/optionRowSizes.js +2 -1
  289. package/dist/Theme/tokens/primitives/radii.d.ts +15 -0
  290. package/dist/Theme/tokens/primitives/radii.js +14 -0
  291. package/dist/Theme/tokens/primitives/shadows.d.ts +5 -1
  292. package/dist/Theme/tokens/primitives/shadows.js +5 -1
  293. package/dist/Theme/tokens/primitives/states.d.ts +1 -0
  294. package/dist/Theme/tokens/primitives/states.js +4 -0
  295. package/dist/Theme/tokens/primitives/typography.d.ts +17 -0
  296. package/dist/Theme/tokens/primitives/typography.js +21 -1
  297. package/dist/Theme/tokens/primitives/zIndices.d.ts +1 -0
  298. package/dist/Theme/tokens/primitives/zIndices.js +1 -0
  299. package/dist/Utils/formatDate.d.ts +25 -0
  300. package/dist/Utils/formatDate.js +144 -0
  301. package/dist/esm/Components/Accordion/Accordion.js +2 -2
  302. package/dist/esm/Components/AddressCard/AddressCard.js +2 -1
  303. package/dist/esm/Components/Apexcharts/ApexLineChart/ApexLineChart.js +1 -1
  304. package/dist/esm/Components/AppSwitcher/AppSwitcher.js +1 -1
  305. package/dist/esm/Components/AppearanceSettings/AppearanceSettings.js +1 -1
  306. package/dist/esm/Components/AudioRecorder/AudioRecorder.js +2 -1
  307. package/dist/esm/Components/Avatar/Avatar.js +6 -4
  308. package/dist/esm/Components/Backdrop/Backdrop.js +1 -1
  309. package/dist/esm/Components/BagBar/BagBar.js +2 -1
  310. package/dist/esm/Components/ButtonGroupIcon/ButtonGroupIcon.js +1 -1
  311. package/dist/esm/Components/CalendarGrid/CalendarGrid.js +6 -6
  312. package/dist/esm/Components/CalendarGrid/calendarMath.js +18 -6
  313. package/dist/esm/Components/Card/PaymentCard/PaymentCard.js +6 -5
  314. package/dist/esm/Components/CartItem/CartItem.js +2 -1
  315. package/dist/esm/Components/Checkbox/Checkbox.js +8 -5
  316. package/dist/esm/Components/CheckoutKit/selectable.js +1 -1
  317. package/dist/esm/Components/ChoiceCard/ChoiceCard.js +14 -0
  318. package/dist/esm/Components/ChoiceCard/ChoiceCardGroup.js +4 -0
  319. package/dist/esm/Components/ChoiceCard/ChoiceCardProps.js +1 -0
  320. package/dist/esm/Components/CircularProgress/CircularProgress.js +5 -9
  321. package/dist/esm/Components/CircularProgress/arc.js +13 -0
  322. package/dist/esm/Components/Common/FormLabel.js +1 -1
  323. package/dist/esm/Components/Common/FormattedDescription.js +1 -1
  324. package/dist/esm/Components/Common/HelperText.js +11 -8
  325. package/dist/esm/Components/Common/fieldStyles.js +2 -1
  326. package/dist/esm/Components/ContactForm/ContactForm.js +1 -1
  327. package/dist/esm/Components/CopyButton/CopyButton.js +14 -7
  328. package/dist/esm/Components/CouponField/CouponField.js +4 -3
  329. package/dist/esm/Components/CustomModulesTable/EditModuleModal.js +1 -1
  330. package/dist/esm/Components/DatePicker/CalendarPanel.js +2 -2
  331. package/dist/esm/Components/DatePicker/DatePicker.js +8 -2
  332. package/dist/esm/Components/DatePicker/RangeDatePicker.js +8 -6
  333. package/dist/esm/Components/DatePicker/SingleDatePicker.js +7 -4
  334. package/dist/esm/Components/DatePicker/ThemeDatePicker.js +7 -4
  335. package/dist/esm/Components/DatePicker/TimeOnlyPicker.js +5 -3
  336. package/dist/esm/Components/DatePicker/TimePickerInput.js +8 -6
  337. package/dist/esm/Components/DescriptionList/DescriptionList.js +3 -3
  338. package/dist/esm/Components/Dropdown/DropDown.js +12 -4
  339. package/dist/esm/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +2 -1
  340. package/dist/esm/Components/EmptyState/EmptyState.js +2 -2
  341. package/dist/esm/Components/FileUpload/FileUpload.js +21 -15
  342. package/dist/esm/Components/FileUpload/useObjectUrl.js +10 -0
  343. package/dist/esm/Components/FileUploader/FileUploader.js +9 -3
  344. package/dist/esm/Components/FilterBar/FilterBar.js +2 -2
  345. package/dist/esm/Components/FilterSidebar/FilterSidebar.js +10 -6
  346. package/dist/esm/Components/Form/FormWrapper.js +1 -1
  347. package/dist/esm/Components/FormField/FormField.js +52 -0
  348. package/dist/esm/Components/FormField/FormFieldProps.js +1 -0
  349. package/dist/esm/Components/Header/HeaderActions.js +2 -2
  350. package/dist/esm/Components/Header/components/mobileMenu.js +1 -1
  351. package/dist/esm/Components/IconButton/IconButton.js +21 -0
  352. package/dist/esm/Components/IconButton/IconButtonProps.js +1 -0
  353. package/dist/esm/Components/Input/PhoneNumberInput.js +15 -1
  354. package/dist/esm/Components/KanbanBoard/AccountCard.js +3 -2
  355. package/dist/esm/Components/KanbanBoard/AccountRow.js +1 -1
  356. package/dist/esm/Components/KanbanBoard/KanbanBoard.js +56 -39
  357. package/dist/esm/Components/KanbanBoard/MeasuredItem.js +6 -14
  358. package/dist/esm/Components/KanbanBoard/boardStore.js +22 -0
  359. package/dist/esm/Components/Kbd/Kbd.js +1 -1
  360. package/dist/esm/Components/LimitReachedModal/LimitReachedModal.js +1 -1
  361. package/dist/esm/Components/Loading/Loading.js +1 -1
  362. package/dist/esm/Components/MediaGallery/MediaGallery.js +2 -2
  363. package/dist/esm/Components/MediaGallery/MediaLightbox.js +2 -1
  364. package/dist/esm/Components/MediaGallery/glass.js +2 -1
  365. package/dist/esm/Components/MediaViewer/MediaViewer.js +1 -1
  366. package/dist/esm/Components/MediaViewer/components/MediaAudioPlayer.js +7 -7
  367. package/dist/esm/Components/MediaViewer/components/MediaImageViewer.js +1 -1
  368. package/dist/esm/Components/MediaViewer/components/MediaScrubber.js +5 -1
  369. package/dist/esm/Components/MediaViewer/components/MediaVideoPlayer.js +7 -7
  370. package/dist/esm/Components/MediaViewer/components/PlaybackTimeline.js +38 -0
  371. package/dist/esm/Components/MediaViewer/components/TileChip.js +1 -1
  372. package/dist/esm/Components/Modal/Modal.js +1 -1
  373. package/dist/esm/Components/MoreItems/MoreItems.js +2 -2
  374. package/dist/esm/Components/NavigationBar/NavigationBar.js +2 -2
  375. package/dist/esm/Components/NoteTextArea/NoteTextArea.js +18 -4
  376. package/dist/esm/Components/Notification/Notification.js +17 -3
  377. package/dist/esm/Components/NotificationBell/NotificationBell.js +2 -1
  378. package/dist/esm/Components/NotificationBell/NotificationItem.js +1 -1
  379. package/dist/esm/Components/NotificationBell/NotificationList.js +1 -1
  380. package/dist/esm/Components/OffersList/OffersList.js +2 -1
  381. package/dist/esm/Components/OptionChip/OptionChip.js +3 -2
  382. package/dist/esm/Components/OrderStatusTimeline/OrderStatusTimeline.js +2 -1
  383. package/dist/esm/Components/OrderSummary/OrderSummary.js +5 -5
  384. package/dist/esm/Components/OrganizationDetails/OrganizationDetails.js +7 -1
  385. package/dist/esm/Components/PageHeader/PageHeader.js +2 -2
  386. package/dist/esm/Components/Pagination/Pagination.js +42 -0
  387. package/dist/esm/Components/Pagination/PaginationProps.js +6 -0
  388. package/dist/esm/Components/Pagination/pageWindow.js +16 -0
  389. package/dist/esm/Components/PaymentOption/PaymentOption.js +1 -1
  390. package/dist/esm/Components/PersonChip/PersonChip.js +2 -2
  391. package/dist/esm/Components/PinInput/PinInput.js +14 -2
  392. package/dist/esm/Components/PincodeChecker/PincodeChecker.js +4 -4
  393. package/dist/esm/Components/PlanPill/PlanPill.js +2 -1
  394. package/dist/esm/Components/PriceBlock/PriceBlock.js +3 -3
  395. package/dist/esm/Components/Primitives/Primitives.js +1 -1
  396. package/dist/esm/Components/ProductBadges/ProductBadges.js +2 -1
  397. package/dist/esm/Components/ProductCard/ProductCard.js +1 -1
  398. package/dist/esm/Components/ProductCard/ProductCardAction.js +3 -3
  399. package/dist/esm/Components/ProductCard/ProductCardSwatches.js +2 -1
  400. package/dist/esm/Components/ProductCard/cardMetrics.js +2 -1
  401. package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +3 -2
  402. package/dist/esm/Components/QuantityStepper/QuantityStepper.js +2 -1
  403. package/dist/esm/Components/RadioButton/RadioButton.js +7 -4
  404. package/dist/esm/Components/RangeSlider/RangeSlider.js +3 -3
  405. package/dist/esm/Components/Rating/Rating.js +2 -1
  406. package/dist/esm/Components/Reorder/Reorder.js +3 -2
  407. package/dist/esm/Components/ReviewList/ReviewList.js +3 -3
  408. package/dist/esm/Components/ReviewSummary/ReviewSummary.js +3 -3
  409. package/dist/esm/Components/SaveBar/SaveBar.js +2 -2
  410. package/dist/esm/Components/Search/Search.js +2 -9
  411. package/dist/esm/Components/Search/ctrlShortcut.js +25 -0
  412. package/dist/esm/Components/SearchSelect/SearchSelect.js +120 -33
  413. package/dist/esm/Components/SegmentedControl/SegmentedControl.js +11 -6
  414. package/dist/esm/Components/Select/SelectPopup.js +6 -4
  415. package/dist/esm/Components/SelectSearch/SelectSearch.js +5 -4
  416. package/dist/esm/Components/SettingRow/SettingRow.js +1 -1
  417. package/dist/esm/Components/SideBar/SecondaryBar.js +2 -1
  418. package/dist/esm/Components/SideBar/SideBar.js +83 -22
  419. package/dist/esm/Components/SideBar/components/MenuItemBox.js +4 -3
  420. package/dist/esm/Components/SideBar/components/MenuItems.js +4 -4
  421. package/dist/esm/Components/SideBar/components/OtherApps.js +2 -1
  422. package/dist/esm/Components/SideBar/components/OverflowTooltipText.js +4 -5
  423. package/dist/esm/Components/SideBar/components/PinnedSection.js +2 -2
  424. package/dist/esm/Components/SideBar/components/TextTruncation.js +9 -7
  425. package/dist/esm/Components/SideBar/sidebarScale.js +2 -1
  426. package/dist/esm/Components/Skeletons/Skeletons.js +4 -2
  427. package/dist/esm/Components/SkipLink/SkipLink.js +50 -0
  428. package/dist/esm/Components/SkipLink/SkipLinkProps.js +1 -0
  429. package/dist/esm/Components/Slider/Slider.js +11 -4
  430. package/dist/esm/Components/SpecTable/SpecTable.js +2 -1
  431. package/dist/esm/Components/StageProgress/StageItem.js +2 -5
  432. package/dist/esm/Components/StageProgress/StageProgress.js +2 -1
  433. package/dist/esm/Components/StageProgress/StepperStage.js +2 -6
  434. package/dist/esm/Components/StageProgress/centerInStrip.js +11 -0
  435. package/dist/esm/Components/StatCard/StatCard.js +5 -4
  436. package/dist/esm/Components/StickyBuyBar/StickyBuyBar.js +2 -2
  437. package/dist/esm/Components/Table/components/TableActions.js +42 -26
  438. package/dist/esm/Components/Table/components/TableBody.js +25 -40
  439. package/dist/esm/Components/Table/components/rowMeasurer.js +66 -0
  440. package/dist/esm/Components/Table/filters/TableFilters.js +3 -14
  441. package/dist/esm/Components/Table/hooks/useTable.js +12 -9
  442. package/dist/esm/Components/Tabs/components/CountBadge.js +3 -3
  443. package/dist/esm/Components/Tabs/components/Tab.js +5 -4
  444. package/dist/esm/Components/Tabs/components/TabList.js +16 -1
  445. package/dist/esm/Components/Tag/Tag.js +11 -8
  446. package/dist/esm/Components/Tag/Tag.styles.js +6 -4
  447. package/dist/esm/Components/TagInput/TagInput.js +94 -0
  448. package/dist/esm/Components/TagInput/TagInputProps.js +1 -0
  449. package/dist/esm/Components/TagInput/tagEntries.js +39 -0
  450. package/dist/esm/Components/TimePicker/TimePicker.js +45 -0
  451. package/dist/esm/Components/TimePicker/TimePickerProps.js +1 -0
  452. package/dist/esm/Components/TimePicker/timeParts.js +26 -0
  453. package/dist/esm/Components/Timeline/Timeline.js +11 -9
  454. package/dist/esm/Components/Toaster/Toaster.js +2 -1
  455. package/dist/esm/Components/Toggle/TableToggle.js +4 -3
  456. package/dist/esm/Components/ToggleSwitch/ToggleSwitch.js +7 -5
  457. package/dist/esm/Components/ToolTip/ToolTip.js +89 -11
  458. package/dist/esm/Components/UpgradeButton/UpgradeButton.js +4 -2
  459. package/dist/esm/Components/UserDetails/UserDetails.js +7 -1
  460. package/dist/esm/Components/VisuallyHidden/VisuallyHidden.js +18 -0
  461. package/dist/esm/Components/VisuallyHidden/VisuallyHiddenProps.js +1 -0
  462. package/dist/esm/Components/WizardDialog/WizardDialog.js +11 -6
  463. package/dist/esm/Components/WorkspaceWindow/WorkspaceTrayPreview.js +2 -1
  464. package/dist/esm/Components/WorkspaceWindow/WorkspaceWindow.js +13 -3
  465. package/dist/esm/Hooks/sharedResizeObserver.js +73 -0
  466. package/dist/esm/Hooks/useIsTruncated.js +3 -4
  467. package/dist/esm/Theme/chakra/createBrandTheme.js +34 -4
  468. package/dist/esm/Theme/chakra/focusRing.styles.js +3 -0
  469. package/dist/esm/Theme/chakra/motion.js +25 -0
  470. package/dist/esm/Theme/index.js +12 -9
  471. package/dist/esm/Theme/provider/PixelizeThemeProvider.js +22 -13
  472. package/dist/esm/Theme/provider/ThemeSwitcher.js +3 -2
  473. package/dist/esm/Theme/tokens/brands/emerald/palette.dark.js +2 -1
  474. package/dist/esm/Theme/tokens/brands/index.js +14 -13
  475. package/dist/esm/Theme/tokens/brands/lavender/palette.dark.js +2 -1
  476. package/dist/esm/Theme/tokens/brands/meadow/palette.dark.js +2 -1
  477. package/dist/esm/Theme/tokens/brands/radiant/palette.dark.js +2 -1
  478. package/dist/esm/Theme/tokens/brands/rosewood/palette.dark.js +2 -1
  479. package/dist/esm/Theme/tokens/brands/skyline/palette.dark.js +2 -1
  480. package/dist/esm/Theme/tokens/brands/slate/palette.dark.js +2 -1
  481. package/dist/esm/Theme/tokens/brands/storefront/palette.dark.js +2 -1
  482. package/dist/esm/Theme/tokens/brands/zinc/palette.dark.js +28 -24
  483. package/dist/esm/Theme/tokens/builders/color.js +10 -6
  484. package/dist/esm/Theme/tokens/builders/filledSurface.js +7 -7
  485. package/dist/esm/Theme/tokens/builders/lazy.js +49 -0
  486. package/dist/esm/Theme/tokens/builders/memo.js +21 -0
  487. package/dist/esm/Theme/tokens/builders/memoByReads.js +46 -0
  488. package/dist/esm/Theme/tokens/builders/outlineRung.js +10 -2
  489. package/dist/esm/Theme/tokens/builders/tone.js +5 -4
  490. package/dist/esm/Theme/tokens/primitives/borderWidths.js +2 -0
  491. package/dist/esm/Theme/tokens/primitives/index.js +5 -3
  492. package/dist/esm/Theme/tokens/primitives/motion.js +20 -4
  493. package/dist/esm/Theme/tokens/primitives/optionRowSizes.js +2 -1
  494. package/dist/esm/Theme/tokens/primitives/radii.js +13 -0
  495. package/dist/esm/Theme/tokens/primitives/shadows.js +3 -1
  496. package/dist/esm/Theme/tokens/primitives/states.js +1 -0
  497. package/dist/esm/Theme/tokens/primitives/typography.js +20 -0
  498. package/dist/esm/Theme/tokens/primitives/zIndices.js +1 -0
  499. package/dist/esm/Utils/formatDate.js +138 -0
  500. package/dist/esm/index.js +18 -2
  501. package/dist/index.d.ts +33 -5
  502. package/dist/index.js +47 -4
  503. package/package.json +1 -1
@@ -93,6 +93,6 @@ const MediaImageViewer = ({ item, label, onZoomChange, onNaturalSize, labels: la
93
93
  return (_jsxs(Box, { ref: stageRef, position: "absolute", inset: 0, bg: chrome.stage, overflow: "hidden", children: [_jsx(Flex, { position: "absolute", inset: 0, align: "center", justify: "center", p: { base: 2, md: 6 }, pb: { base: 20, md: 24 }, cursor: zoom > 100 ? (dragging ? "grabbing" : "grab") : "default", onPointerDown: onPointerDown, onPointerMove: onPointerMove, onPointerUp: endDrag, onPointerCancel: endDrag, sx: { touchAction: zoom > 100 ? "none" : "pan-y" }, children: failed ? (_jsx(MediaStatusPanel, { icon: warningIcon(), label: label, message: labels.imageError, downloadLabel: labels.download, downloadHref: item.src, tone: "warning", testId: "media-image-error" })) : (_jsx(Image, { src: item.src, alt: label, maxW: "100%", maxH: "100%", objectFit: "contain", draggable: false, userSelect: "none", onError: () => setFailed(true), onLoad: (event) => onNaturalSize === null || onNaturalSize === void 0 ? void 0 : onNaturalSize({
94
94
  width: event.currentTarget.naturalWidth,
95
95
  height: event.currentTarget.naturalHeight,
96
- }), transform: `translate(${pan.x}px, ${pan.y}px) scale(${zoom / 100}) rotate(${rotation}deg)`, transition: dragging ? "none" : "transform 0.15s ease-out", "data-testid": "media-image" })) }), _jsxs(Flex, { role: "toolbar", "aria-label": labels.imageControls, position: "absolute", bottom: 4, left: "50%", transform: "translateX(-50%)", align: "center", gap: 1, p: 1, borderRadius: "12px", bg: chrome.raised, borderWidth: "1px", borderColor: chrome.hover, maxW: "calc(100% - 16px)", overflowX: "auto", children: [_jsx(ViewerIconButton, { label: labels.zoomOut, hint: "-", icon: _jsx(ZoomOut, { size: 18 }), onClick: () => zoomBy(-ZOOM_STEP), isDisabled: zoom <= MIN_ZOOM, testId: "media-zoom-out" }), _jsx(Text, { as: "output", "aria-live": "polite", "aria-label": labels.zoomLevel, minW: "56px", textAlign: "center", fontSize: "sm", fontWeight: 600, color: chrome.ink, "data-testid": "media-zoom-level", children: `${zoom}%` }), _jsx(ViewerIconButton, { label: labels.zoomIn, hint: "+", icon: _jsx(ZoomIn, { size: 18 }), onClick: () => zoomBy(ZOOM_STEP), isDisabled: zoom >= MAX_ZOOM, testId: "media-zoom-in" }), _jsx(ViewerIconButton, { label: labels.fitLabel, hint: "0", icon: _jsx(Scan, { size: 16, "aria-hidden": true }), onClick: reset, testId: "media-fit" }), _jsx(Box, { w: "1px", h: "24px", bg: chrome.hover, mx: 1, "aria-hidden": true }), _jsx(ViewerIconButton, { label: labels.rotate, hint: "R", icon: _jsx(RotateCw, { size: 18 }), onClick: rotate, testId: "media-rotate" }), fullscreenSupported ? (_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-fullscreen" })) : null] })] }));
96
+ }), style: { transform: `translate(${pan.x}px, ${pan.y}px) scale(${zoom / 100}) rotate(${rotation}deg)` }, transition: dragging ? "none" : "transform 0.15s ease-out", "data-testid": "media-image" })) }), _jsxs(Flex, { role: "toolbar", "aria-label": labels.imageControls, position: "absolute", bottom: 4, left: "50%", transform: "translateX(-50%)", align: "center", gap: 1, p: 1, borderRadius: "xl", bg: chrome.raised, borderWidth: "1px", borderColor: chrome.hover, maxW: "calc(100% - 16px)", overflowX: "auto", children: [_jsx(ViewerIconButton, { label: labels.zoomOut, hint: "-", icon: _jsx(ZoomOut, { size: 18 }), onClick: () => zoomBy(-ZOOM_STEP), isDisabled: zoom <= MIN_ZOOM, testId: "media-zoom-out" }), _jsx(Text, { as: "output", "aria-live": "polite", "aria-label": labels.zoomLevel, minW: "56px", textAlign: "center", fontSize: "sm", fontWeight: 600, color: chrome.ink, "data-testid": "media-zoom-level", children: `${zoom}%` }), _jsx(ViewerIconButton, { label: labels.zoomIn, hint: "+", icon: _jsx(ZoomIn, { size: 18 }), onClick: () => zoomBy(ZOOM_STEP), isDisabled: zoom >= MAX_ZOOM, testId: "media-zoom-in" }), _jsx(ViewerIconButton, { label: labels.fitLabel, hint: "0", icon: _jsx(Scan, { size: 16, "aria-hidden": true }), onClick: reset, testId: "media-fit" }), _jsx(Box, { w: "1px", h: "24px", bg: chrome.hover, mx: 1, "aria-hidden": true }), _jsx(ViewerIconButton, { label: labels.rotate, hint: "R", icon: _jsx(RotateCw, { size: 18 }), onClick: rotate, testId: "media-rotate" }), fullscreenSupported ? (_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-fullscreen" })) : null] })] }));
97
97
  };
98
98
  export default MediaImageViewer;
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useRef, useState } from "react";
3
3
  import { Box } from "@chakra-ui/react";
4
4
  import { settleBetween } from "../../../Theme/tokens/builders/focusRing.js";
5
+ import { NUMERIC_TEXT } from "../../../Theme/tokens/primitives/typography.js";
5
6
  import { useViewerChrome } from "../useViewerChrome.js";
6
7
  const STEP_SECONDS = 5;
7
8
  const BIG_STEP_SECONDS = 30;
@@ -82,6 +83,9 @@ const MediaScrubber = ({ value, max, buffered = [], onSeek, onPreview, ariaLabel
82
83
  setHovering(false);
83
84
  if (!dragging.current)
84
85
  endPreview();
85
- }, children: [previewLabel !== null ? (_jsx(Box, { position: "absolute", bottom: "100%", left: `${previewX}%`, transform: "translateX(-50%)", mb: 1, px: 2, py: 0.5, borderRadius: "4px", bg: chrome.raised, color: chrome.ink, fontSize: "xs", fontWeight: 600, whiteSpace: "nowrap", pointerEvents: "none", sx: { fontVariantNumeric: "tabular-nums" }, "data-testid": testId ? `${testId}-tooltip` : undefined, children: previewLabel })) : null, _jsxs(Box, { ref: trackRef, role: "slider", tabIndex: disabled ? -1 : 0, "aria-label": ariaLabel, "aria-orientation": "horizontal", "aria-valuemin": 0, "aria-valuemax": disabled ? 0 : max, "aria-valuenow": disabled ? 0 : value, "aria-valuetext": disabled ? undefined : ariaValueText(value), "aria-disabled": disabled || undefined, position: "relative", h: trackH, borderRadius: "full", bg: chrome.track, transition: "height 0.12s ease-out", onPointerDown: onPointerDown, onPointerMove: onPointerMove, onPointerUp: onPointerUp, onPointerCancel: onPointerUp, onKeyDown: onKeyDown, _focusVisible: { boxShadow: `0 0 0 2px ${ring}` }, "data-testid": testId, children: [buffered.map((range, i) => (_jsx(Box, { position: "absolute", top: 0, bottom: 0, left: `${disabled ? 0 : clamp(range.start / max, 0, 1) * 100}%`, width: `${disabled ? 0 : (clamp(range.end / max, 0, 1) - clamp(range.start / max, 0, 1)) * 100}%`, bg: chrome.hover, borderRadius: "full" }, i))), _jsx(Box, { position: "absolute", top: 0, bottom: 0, left: 0, width: `${fraction * 100}%`, bg: chrome.accent, borderRadius: "full" }), _jsx(Box, { position: "absolute", top: "50%", left: `${fraction * 100}%`, transform: "translate(-50%, -50%)", boxSize: hovering || dragging.current ? "14px" : "0px", borderRadius: "full", bg: chrome.ink, transition: "width 0.12s ease-out, height 0.12s ease-out", pointerEvents: "none" })] })] }));
86
+ }, children: [previewLabel !== null ? (_jsx(Box, { position: "absolute", bottom: "100%", style: { left: `${previewX}%` }, transform: "translateX(-50%)", mb: 1, px: 2, py: 0.5, borderRadius: "base", bg: chrome.raised, color: chrome.ink, fontSize: "xs", fontWeight: 600, whiteSpace: "nowrap", pointerEvents: "none", sx: NUMERIC_TEXT, "data-testid": testId ? `${testId}-tooltip` : undefined, children: previewLabel })) : null, _jsxs(Box, { ref: trackRef, role: "slider", tabIndex: disabled ? -1 : 0, "aria-label": ariaLabel, "aria-orientation": "horizontal", "aria-valuemin": 0, "aria-valuemax": disabled ? 0 : max, "aria-valuenow": disabled ? 0 : value, "aria-valuetext": disabled ? undefined : ariaValueText(value), "aria-disabled": disabled || undefined, position: "relative", h: trackH, borderRadius: "full", bg: chrome.track, transition: "height 0.12s ease-out", onPointerDown: onPointerDown, onPointerMove: onPointerMove, onPointerUp: onPointerUp, onPointerCancel: onPointerUp, onKeyDown: onKeyDown, _focusVisible: { boxShadow: `0 0 0 2px ${ring}` }, "data-testid": testId, children: [buffered.map((range, i) => (_jsx(Box, { position: "absolute", top: 0, bottom: 0, style: {
87
+ left: `${disabled ? 0 : clamp(range.start / max, 0, 1) * 100}%`,
88
+ width: `${disabled ? 0 : (clamp(range.end / max, 0, 1) - clamp(range.start / max, 0, 1)) * 100}%`,
89
+ }, bg: chrome.hover, borderRadius: "full" }, i))), _jsx(Box, { position: "absolute", top: 0, bottom: 0, left: 0, style: { width: `${fraction * 100}%` }, bg: chrome.accent, borderRadius: "full" }), _jsx(Box, { position: "absolute", top: "50%", style: { left: `${fraction * 100}%` }, transform: "translate(-50%, -50%)", boxSize: hovering || dragging.current ? "14px" : "0px", borderRadius: "full", bg: chrome.ink, transition: "width 0.12s ease-out, height 0.12s ease-out", pointerEvents: "none" })] })] }));
86
90
  };
87
91
  export default MediaScrubber;
@@ -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;
@@ -39,7 +39,7 @@ export default function NavBar({ userAvathar, userName, userRole, navMenu, moreI
39
39
  px: "0.625rem",
40
40
  py: "0.5rem",
41
41
  fontWeight: 500,
42
- fontSize: "13px",
42
+ fontSize: "xs-plus",
43
43
  color: theme.colors.text[900],
44
44
  gap: theme.space["2"],
45
45
  transition: "background 0.12s",
@@ -47,7 +47,7 @@ export default function NavBar({ userAvathar, userName, userRole, navMenu, moreI
47
47
  _focus: { bg: menuHoverBg },
48
48
  _active: { bg: rowBackgrounds.selectedActive },
49
49
  };
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",
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: "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
51
  // Without a cap one long title stretches the whole dropdown; titles truncate instead.
52
52
  maxW: "18rem", bg: theme.colors.surfaceRaised,
53
53
  // NOTE: Chakra's MenuItem inherits --menu-bg hardcoded to #fff via dead _dark — set it or items stay white.
@@ -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,10 @@ 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
+ const CARD_TRANSITION = "box-shadow 0.2s ease, transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease";
13
+ const DISMISS_TRANSITION = "background-color 0.2s ease, color 0.2s ease, transform 0.2s ease";
10
14
  /** 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
15
  const Notification = ({ notification, onClose, showStatus, onClick, isLoading = false, colors, }) => {
12
16
  var _a, _b, _c, _d, _e, _f, _g;
@@ -99,15 +103,25 @@ const Notification = ({ notification, onClose, showStatus, onClick, isLoading =
99
103
  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
104
  }
101
105
  // 🧩 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) => {
106
+ 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: CARD_TRANSITION, sx: reducedMotionSx(), position: "relative", children: [onClose && (_jsx(Box, { position: "absolute", top: "2", right: "2", cursor: "pointer", onClick: onClose, onKeyDown: (e) => {
103
107
  if (e.key === "Enter" || e.key === " ") {
104
108
  e.preventDefault();
105
109
  onClose();
106
110
  }
107
- }, tabIndex: 0, p: 1, borderRadius: "md", _hover: {
111
+ }, role: "button", "aria-label": "Dismiss notification", tabIndex: 0, p: 1, borderRadius: "md", _hover: {
108
112
  bg: closeTone.bg,
109
113
  color: closeTone.fg,
110
114
  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" }))] })] })] }));
115
+ }, 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 && {
116
+ role: "button",
117
+ tabIndex: 0,
118
+ onKeyDown: (e) => {
119
+ if (e.key !== "Enter" && e.key !== " ")
120
+ return;
121
+ e.preventDefault();
122
+ onClick(notification.id, notification.type);
123
+ },
124
+ _focusVisible: focusVisibleRing(theme.colors),
125
+ }), 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
126
  };
113
127
  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);
@@ -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;
@@ -8,6 +8,7 @@ import { resolveFilledSurface } from "../../Theme/tokens/builders/filledSurface.
8
8
  import { resolveSoftTone } from "../../Theme/tokens/builders/tone.js";
9
9
  import { transitionFor } from "../../Theme/tokens/primitives/motion.js";
10
10
  import { reducedMotionSx } from "../../Theme/chakra/motion.js";
11
+ import { focusVisibleRing } from "../../Theme/chakra/focusRing.styles.js";
11
12
  import Button from "../Button/Button.js";
12
13
  import EmptyState from "../EmptyState/EmptyState.js";
13
14
  import Tag from "../Tag/Tag.js";
@@ -125,7 +126,12 @@ const OrganizationDetails = ({ activeOrganizations, invitedOrganizations, isLoad
125
126
  borderColor: colors.primary[300],
126
127
  boxShadow: "lg",
127
128
  transform: "translateY(-3px)",
128
- }, children: [_jsxs(Flex, { justifyContent: "space-between", alignItems: "center", mb: 2, children: [_jsx(Flex, { align: "center", justify: "center", boxSize: "36px", borderRadius: "lg", bg: primary50, color: onPrimary50, children: _jsx(Building2, { size: 18 }) }), _jsxs(HStack, { spacing: 1, children: [item.default === 1 ? (_jsxs(Badge, { colorScheme: "green", borderRadius: "full", px: 2, py: 0.5, display: "flex", alignItems: "center", gap: 1, fontSize: "0.7rem", fontWeight: 600, children: [_jsx(CheckCircle2, { size: 12 }), labels.default] })) : isSwitching ? (_jsxs(Flex, { align: "center", gap: 2, color: colors.accentText, children: [_jsx(Spinner, { size: "sm" }), _jsx(Text, { fontSize: "xs", children: labels.settingDefault })] })) : (_jsxs(Flex, { align: "center", gap: 1, fontSize: "xs", color: colors.accentText, fontWeight: 600, cursor: "pointer", _hover: { color: colors.primary[700], gap: 2 }, transition: transitionFor(["color", "gap"]), sx: reducedMotionSx(), onClick: () => onSetDefault === null || onSetDefault === void 0 ? void 0 : onSetDefault(item.orgId), children: [_jsx(CheckCircle2, { size: 12 }), _jsx(Text, { children: labels.setAsDefault })] })), canEdit && (_jsx(Tooltip, { label: labels.editOrganization, hasArrow: true, children: _jsx(IconButton, { "aria-label": labels.editOrganization, icon: _jsx(Pencil, { size: 12 }), size: "xs", variant: "ghost", color: muted, borderRadius: "full", _hover: { color: onPrimary50, bg: primary50 }, onClick: () => startEditing(item) }) })), _jsx(Tooltip, { label: isProtected
129
+ }, children: [_jsxs(Flex, { justifyContent: "space-between", alignItems: "center", mb: 2, children: [_jsx(Flex, { align: "center", justify: "center", boxSize: "36px", borderRadius: "lg", bg: primary50, color: onPrimary50, children: _jsx(Building2, { size: 18 }) }), _jsxs(HStack, { spacing: 1, children: [item.default === 1 ? (_jsxs(Badge, { colorScheme: "green", borderRadius: "full", px: 2, py: 0.5, display: "flex", alignItems: "center", gap: 1, fontSize: "0.7rem", fontWeight: 600, children: [_jsx(CheckCircle2, { size: 12 }), labels.default] })) : isSwitching ? (_jsxs(Flex, { align: "center", gap: 2, color: colors.accentText, children: [_jsx(Spinner, { size: "sm" }), _jsx(Text, { fontSize: "xs", children: labels.settingDefault })] })) : (_jsxs(Flex, { align: "center", gap: 1, fontSize: "xs", color: colors.accentText, fontWeight: 600, cursor: "pointer", _hover: { color: colors.primary[700], gap: 2 }, transition: transitionFor(["color", "gap"]), sx: reducedMotionSx(), role: "button", tabIndex: 0, _focusVisible: focusVisibleRing(colors), onClick: () => onSetDefault === null || onSetDefault === void 0 ? void 0 : onSetDefault(item.orgId), onKeyDown: (e) => {
130
+ if (e.key !== "Enter" && e.key !== " ")
131
+ return;
132
+ e.preventDefault();
133
+ onSetDefault === null || onSetDefault === void 0 ? void 0 : onSetDefault(item.orgId);
134
+ }, children: [_jsx(CheckCircle2, { size: 12 }), _jsx(Text, { children: labels.setAsDefault })] })), canEdit && (_jsx(Tooltip, { label: labels.editOrganization, hasArrow: true, children: _jsx(IconButton, { "aria-label": labels.editOrganization, icon: _jsx(Pencil, { size: 12 }), size: "xs", variant: "ghost", color: muted, borderRadius: "full", _hover: { color: onPrimary50, bg: primary50 }, onClick: () => startEditing(item) }) })), _jsx(Tooltip, { label: isProtected
129
135
  ? ((_d = item.deleteDisabledReason) !== null && _d !== void 0 ? _d : labels.protectedOrganization)
130
136
  : labels.deleteOrganization, hasArrow: true, children: isProtected ? (_jsx(Box, { as: "span", display: "inline-flex", children: deleteButton })) : (deleteButton) })] })] }), isEditingThis ? (_jsxs(Box, { children: [_jsxs(HStack, { spacing: 1, children: [_jsx(Input, { value: editValue, onChange: (e) => {
131
137
  setEditValue(e.target.value);