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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (582) hide show
  1. package/CHANGELOG.md +228 -2
  2. package/COMPONENT-GOTCHAS.md +144 -7
  3. package/DESIGN-GUIDE.md +12 -5
  4. package/dist/Components/Accordion/Accordion.js +2 -2
  5. package/dist/Components/AddressCard/AddressCard.js +2 -1
  6. package/dist/Components/Apexcharts/ApexLineChart/ApexLineChart.js +1 -1
  7. package/dist/Components/AppSwitcher/AppSwitcher.js +1 -1
  8. package/dist/Components/AppearanceSettings/AppearanceSettings.js +1 -1
  9. package/dist/Components/AudioRecorder/AudioRecorder.js +2 -1
  10. package/dist/Components/Avatar/Avatar.d.ts +2 -1
  11. package/dist/Components/Avatar/Avatar.js +5 -3
  12. package/dist/Components/Backdrop/Backdrop.js +1 -1
  13. package/dist/Components/BagBar/BagBar.js +2 -1
  14. package/dist/Components/Button/Button.styles.js +51 -21
  15. package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.js +1 -1
  16. package/dist/Components/CalendarGrid/CalendarGrid.js +5 -5
  17. package/dist/Components/CalendarGrid/calendarMath.js +18 -6
  18. package/dist/Components/Card/CardProps.d.ts +2 -2
  19. package/dist/Components/Card/PaymentCard/PaymentCard.js +6 -5
  20. package/dist/Components/CartItem/CartItem.js +2 -1
  21. package/dist/Components/Checkbox/Checkbox.d.ts +18 -3
  22. package/dist/Components/Checkbox/Checkbox.js +9 -7
  23. package/dist/Components/CheckoutKit/selectable.js +1 -1
  24. package/dist/Components/ChoiceCard/ChoiceCard.d.ts +3 -0
  25. package/dist/Components/ChoiceCard/ChoiceCard.js +16 -0
  26. package/dist/Components/ChoiceCard/ChoiceCardGroup.d.ts +3 -0
  27. package/dist/Components/ChoiceCard/ChoiceCardGroup.js +6 -0
  28. package/dist/Components/ChoiceCard/ChoiceCardProps.d.ts +28 -0
  29. package/dist/Components/ChoiceCard/ChoiceCardProps.js +2 -0
  30. package/dist/Components/CircularProgress/CircularProgress.js +4 -8
  31. package/dist/Components/CircularProgress/CircularProgressProps.d.ts +5 -3
  32. package/dist/Components/CircularProgress/arc.d.ts +9 -1
  33. package/dist/Components/CircularProgress/arc.js +15 -1
  34. package/dist/Components/Common/FormLabel.js +1 -1
  35. package/dist/Components/Common/FormattedDescription.js +1 -1
  36. package/dist/Components/Common/HelperText.d.ts +5 -4
  37. package/dist/Components/Common/HelperText.js +10 -7
  38. package/dist/Components/Common/fieldStyles.d.ts +4 -4
  39. package/dist/Components/Common/fieldStyles.js +2 -1
  40. package/dist/Components/ConfirmDialog/ConfirmDialog.js +2 -1
  41. package/dist/Components/ContactForm/ContactForm.js +1 -1
  42. package/dist/Components/CopyButton/CopyButton.js +12 -5
  43. package/dist/Components/CouponField/CouponField.js +4 -3
  44. package/dist/Components/CustomModulesTable/CustomModulesTable.js +6 -4
  45. package/dist/Components/CustomModulesTable/CustomModulesTableProps.d.ts +18 -0
  46. package/dist/Components/CustomModulesTable/EditModuleModal.js +2 -1
  47. package/dist/Components/DatePicker/CalendarPanel.js +2 -2
  48. package/dist/Components/DatePicker/DatePicker.js +8 -2
  49. package/dist/Components/DatePicker/RangeDatePicker.d.ts +9 -3
  50. package/dist/Components/DatePicker/RangeDatePicker.js +8 -6
  51. package/dist/Components/DatePicker/SingleDatePicker.d.ts +9 -5
  52. package/dist/Components/DatePicker/SingleDatePicker.js +9 -5
  53. package/dist/Components/DatePicker/ThemeDatePicker.d.ts +8 -4
  54. package/dist/Components/DatePicker/ThemeDatePicker.js +9 -6
  55. package/dist/Components/DatePicker/TimeOnlyPicker.d.ts +9 -5
  56. package/dist/Components/DatePicker/TimeOnlyPicker.js +8 -5
  57. package/dist/Components/DatePicker/TimePickerInput.d.ts +2 -2
  58. package/dist/Components/DatePicker/TimePickerInput.js +6 -5
  59. package/dist/Components/DatePicker/dayStates.js +2 -1
  60. package/dist/Components/DescriptionList/DescriptionList.d.ts +1 -1
  61. package/dist/Components/DescriptionList/DescriptionList.js +3 -3
  62. package/dist/Components/DescriptionList/DescriptionListProps.d.ts +3 -3
  63. package/dist/Components/Drawer/Drawer.js +2 -1
  64. package/dist/Components/Dropdown/DropDown.js +13 -4
  65. package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +2 -1
  66. package/dist/Components/EmptyState/EmptyState.js +2 -2
  67. package/dist/Components/EmptyState/EmptyStateProps.d.ts +3 -3
  68. package/dist/Components/FileUpload/FileUpload.js +28 -15
  69. package/dist/Components/FileUpload/useObjectUrl.d.ts +1 -0
  70. package/dist/Components/FileUpload/useObjectUrl.js +14 -0
  71. package/dist/Components/FileUploader/FileUploader.js +9 -3
  72. package/dist/Components/FileUploader/FileUploaderProps.d.ts +8 -0
  73. package/dist/Components/FilterBar/FilterBar.d.ts +1 -1
  74. package/dist/Components/FilterBar/FilterBar.js +2 -2
  75. package/dist/Components/FilterBar/FilterBarProps.d.ts +3 -3
  76. package/dist/Components/FilterSidebar/FilterSidebar.js +15 -8
  77. package/dist/Components/Form/FormWrapper.js +1 -1
  78. package/dist/Components/FormField/FormField.d.ts +3 -0
  79. package/dist/Components/FormField/FormField.js +57 -0
  80. package/dist/Components/FormField/FormFieldProps.d.ts +33 -0
  81. package/dist/Components/FormField/FormFieldProps.js +2 -0
  82. package/dist/Components/Header/HeaderActions.js +2 -2
  83. package/dist/Components/Header/components/mobileMenu.js +1 -1
  84. package/dist/Components/IconButton/IconButton.d.ts +5 -0
  85. package/dist/Components/IconButton/IconButton.js +24 -0
  86. package/dist/Components/IconButton/IconButtonProps.d.ts +10 -0
  87. package/dist/Components/IconButton/IconButtonProps.js +2 -0
  88. package/dist/Components/Input/PhoneNumberInput.js +14 -0
  89. package/dist/Components/Input/PhoneNumberInputProps.d.ts +1 -0
  90. package/dist/Components/KanbanBoard/AccountCard.js +7 -4
  91. package/dist/Components/KanbanBoard/AccountRow.js +1 -1
  92. package/dist/Components/KanbanBoard/KanbanBoard.js +56 -39
  93. package/dist/Components/KanbanBoard/MeasuredItem.js +6 -14
  94. package/dist/Components/KanbanBoard/boardStore.d.ts +8 -0
  95. package/dist/Components/KanbanBoard/boardStore.js +27 -0
  96. package/dist/Components/Kbd/Kbd.js +1 -1
  97. package/dist/Components/LimitReachedModal/LimitReachedModal.js +1 -1
  98. package/dist/Components/Loading/Loading.js +1 -1
  99. package/dist/Components/MediaGallery/MediaGallery.js +1 -1
  100. package/dist/Components/MediaGallery/MediaLightbox.js +2 -1
  101. package/dist/Components/MediaGallery/glass.js +2 -1
  102. package/dist/Components/MediaViewer/MediaViewer.js +1 -1
  103. package/dist/Components/MediaViewer/components/MediaAudioPlayer.js +7 -7
  104. package/dist/Components/MediaViewer/components/MediaImageViewer.js +1 -1
  105. package/dist/Components/MediaViewer/components/MediaScrubber.js +5 -1
  106. package/dist/Components/MediaViewer/components/MediaVideoPlayer.js +7 -7
  107. package/dist/Components/MediaViewer/components/PlaybackTimeline.d.ts +20 -0
  108. package/dist/Components/MediaViewer/components/PlaybackTimeline.js +47 -0
  109. package/dist/Components/MediaViewer/components/TileChip.js +1 -1
  110. package/dist/Components/Modal/Modal.js +1 -1
  111. package/dist/Components/MoreItems/MoreItems.js +2 -2
  112. package/dist/Components/NavigationBar/NavigationBar.js +5 -4
  113. package/dist/Components/NoteTextArea/NoteTextArea.js +18 -4
  114. package/dist/Components/NoteTextArea/NoteTextAreaProps.d.ts +12 -0
  115. package/dist/Components/Notification/Notification.js +18 -3
  116. package/dist/Components/Notification/NotificationProps.d.ts +17 -1
  117. package/dist/Components/NotificationBell/NotificationBell.js +5 -1
  118. package/dist/Components/NotificationBell/NotificationItem.js +1 -1
  119. package/dist/Components/NotificationBell/NotificationList.js +1 -1
  120. package/dist/Components/NotificationBell/NotificationPanel.js +4 -3
  121. package/dist/Components/OffersList/OffersList.js +2 -1
  122. package/dist/Components/OptionChip/OptionChip.js +3 -2
  123. package/dist/Components/OrderStatusTimeline/OrderStatusTimeline.js +2 -1
  124. package/dist/Components/OrderSummary/OrderSummary.js +5 -5
  125. package/dist/Components/OrganizationDetails/CreateOrgModal.js +2 -1
  126. package/dist/Components/OrganizationDetails/OrganizationDetails.js +10 -2
  127. package/dist/Components/PageHeader/PageHeader.d.ts +1 -1
  128. package/dist/Components/PageHeader/PageHeader.js +2 -2
  129. package/dist/Components/PageHeader/PageHeaderProps.d.ts +3 -3
  130. package/dist/Components/Pagination/Pagination.d.ts +5 -0
  131. package/dist/Components/Pagination/Pagination.js +48 -0
  132. package/dist/Components/Pagination/PaginationProps.d.ts +46 -0
  133. package/dist/Components/Pagination/PaginationProps.js +9 -0
  134. package/dist/Components/Pagination/pageWindow.d.ts +4 -0
  135. package/dist/Components/Pagination/pageWindow.js +22 -0
  136. package/dist/Components/PaymentOption/PaymentOption.js +1 -1
  137. package/dist/Components/PersonChip/PersonChip.js +2 -2
  138. package/dist/Components/PinInput/PinInput.d.ts +1 -1
  139. package/dist/Components/PinInput/PinInput.js +17 -2
  140. package/dist/Components/PinInput/PinInputProps.d.ts +9 -1
  141. package/dist/Components/PincodeChecker/PincodeChecker.js +4 -4
  142. package/dist/Components/PlanPill/PlanPill.js +2 -1
  143. package/dist/Components/PriceBlock/PriceBlock.js +3 -3
  144. package/dist/Components/Primitives/Primitives.d.ts +2 -2
  145. package/dist/Components/Primitives/Primitives.js +2 -3
  146. package/dist/Components/ProductBadges/ProductBadges.js +2 -1
  147. package/dist/Components/ProductCard/ProductCard.js +1 -1
  148. package/dist/Components/ProductCard/ProductCardAction.js +2 -2
  149. package/dist/Components/ProductCard/ProductCardSwatches.js +2 -1
  150. package/dist/Components/ProductCard/cardMetrics.d.ts +1 -1
  151. package/dist/Components/ProductCard/cardMetrics.js +5 -1
  152. package/dist/Components/ProfileCard/ProfileCardProps.d.ts +11 -0
  153. package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +9 -4
  154. package/dist/Components/QuantityStepper/QuantityStepper.js +2 -1
  155. package/dist/Components/RadioButton/RadioButton.d.ts +11 -2
  156. package/dist/Components/RadioButton/RadioButton.js +9 -6
  157. package/dist/Components/RangeSlider/RangeSlider.js +3 -3
  158. package/dist/Components/Rating/Rating.js +2 -1
  159. package/dist/Components/Reorder/Reorder.js +3 -2
  160. package/dist/Components/ReviewList/ReviewList.js +3 -3
  161. package/dist/Components/ReviewSummary/ReviewSummary.js +3 -3
  162. package/dist/Components/SaveBar/SaveBar.d.ts +1 -1
  163. package/dist/Components/SaveBar/SaveBar.js +2 -2
  164. package/dist/Components/SaveBar/SaveBarProps.d.ts +3 -3
  165. package/dist/Components/Search/Search.js +2 -9
  166. package/dist/Components/Search/ctrlShortcut.d.ts +1 -0
  167. package/dist/Components/Search/ctrlShortcut.js +29 -0
  168. package/dist/Components/SearchSelect/SearchSelect.js +157 -49
  169. package/dist/Components/SearchSelect/searchSelectNav.d.ts +13 -0
  170. package/dist/Components/SearchSelect/searchSelectNav.js +40 -0
  171. package/dist/Components/SegmentedControl/SegmentedControl.d.ts +8 -2
  172. package/dist/Components/SegmentedControl/SegmentedControl.js +9 -5
  173. package/dist/Components/Select/SelectPopup.js +7 -4
  174. package/dist/Components/SelectSearch/SelectSearch.js +6 -4
  175. package/dist/Components/SettingRow/SettingRow.js +2 -1
  176. package/dist/Components/SettingRow/SettingsSection.js +2 -1
  177. package/dist/Components/SideBar/SecondaryBar.js +5 -3
  178. package/dist/Components/SideBar/SideBar.js +96 -32
  179. package/dist/Components/SideBar/SideBarProps.d.ts +1 -1
  180. package/dist/Components/SideBar/components/MenuItemBox.d.ts +2 -2
  181. package/dist/Components/SideBar/components/MenuItemBox.js +11 -7
  182. package/dist/Components/SideBar/components/MenuItems.d.ts +2 -2
  183. package/dist/Components/SideBar/components/MenuItems.js +3 -3
  184. package/dist/Components/SideBar/components/MenuPopoverContent.js +2 -1
  185. package/dist/Components/SideBar/components/OtherApps.js +7 -2
  186. package/dist/Components/SideBar/components/OverflowTooltipText.js +4 -5
  187. package/dist/Components/SideBar/components/PinnedSection.js +8 -5
  188. package/dist/Components/SideBar/components/TextTruncation.js +11 -6
  189. package/dist/Components/SideBar/sidebarMotion.d.ts +2 -0
  190. package/dist/Components/SideBar/sidebarMotion.js +6 -0
  191. package/dist/Components/SideBar/sidebarScale.d.ts +1 -1
  192. package/dist/Components/SideBar/sidebarScale.js +2 -1
  193. package/dist/Components/SignInActivityTable/SignInActivityTable.js +6 -4
  194. package/dist/Components/SignInActivityTable/SignInActivityTableProps.d.ts +8 -0
  195. package/dist/Components/Skeletons/SkeletonProps.d.ts +5 -2
  196. package/dist/Components/Skeletons/Skeletons.d.ts +1 -1
  197. package/dist/Components/Skeletons/Skeletons.js +4 -2
  198. package/dist/Components/SkipLink/SkipLink.d.ts +4 -0
  199. package/dist/Components/SkipLink/SkipLink.js +54 -0
  200. package/dist/Components/SkipLink/SkipLinkProps.d.ts +8 -0
  201. package/dist/Components/SkipLink/SkipLinkProps.js +2 -0
  202. package/dist/Components/Slider/Slider.d.ts +2 -2
  203. package/dist/Components/Slider/Slider.js +11 -4
  204. package/dist/Components/SpecTable/SpecTable.js +2 -1
  205. package/dist/Components/StageProgress/StageItem.js +7 -7
  206. package/dist/Components/StageProgress/StageProgress.js +2 -1
  207. package/dist/Components/StageProgress/StageProgressProps.d.ts +1 -1
  208. package/dist/Components/StageProgress/StepperStage.js +4 -8
  209. package/dist/Components/StageProgress/centerInStrip.d.ts +2 -0
  210. package/dist/Components/StageProgress/centerInStrip.js +15 -0
  211. package/dist/Components/StatCard/StatCard.d.ts +1 -1
  212. package/dist/Components/StatCard/StatCard.js +6 -4
  213. package/dist/Components/StatCard/StatCardProps.d.ts +3 -3
  214. package/dist/Components/StickyBuyBar/StickyBuyBar.js +1 -1
  215. package/dist/Components/Table/Table.js +6 -2
  216. package/dist/Components/Table/components/TableActions.js +41 -24
  217. package/dist/Components/Table/components/TableBody.js +25 -40
  218. package/dist/Components/Table/components/rowMeasurer.d.ts +8 -0
  219. package/dist/Components/Table/components/rowMeasurer.js +71 -0
  220. package/dist/Components/Table/filters/CompactSelect.js +2 -1
  221. package/dist/Components/Table/filters/TableFilters.js +2 -13
  222. package/dist/Components/Table/hooks/useTable.js +12 -9
  223. package/dist/Components/Table/settings/TableSettings.js +7 -2
  224. package/dist/Components/Table/variants/classic.js +3 -2
  225. package/dist/Components/Tabs/components/CountBadge.js +3 -3
  226. package/dist/Components/Tabs/components/Tab.d.ts +2 -1
  227. package/dist/Components/Tabs/components/Tab.js +4 -3
  228. package/dist/Components/Tabs/components/TabList.js +16 -1
  229. package/dist/Components/Tag/Tag.d.ts +2 -2
  230. package/dist/Components/Tag/Tag.js +15 -12
  231. package/dist/Components/Tag/Tag.styles.js +6 -4
  232. package/dist/Components/TagInput/TagInput.d.ts +3 -0
  233. package/dist/Components/TagInput/TagInput.js +99 -0
  234. package/dist/Components/TagInput/TagInputProps.d.ts +46 -0
  235. package/dist/Components/TagInput/TagInputProps.js +2 -0
  236. package/dist/Components/TagInput/tagEntries.d.ts +15 -0
  237. package/dist/Components/TagInput/tagEntries.js +45 -0
  238. package/dist/Components/TimePicker/TimePicker.d.ts +3 -0
  239. package/dist/Components/TimePicker/TimePicker.js +50 -0
  240. package/dist/Components/TimePicker/TimePickerProps.d.ts +44 -0
  241. package/dist/Components/TimePicker/TimePickerProps.js +2 -0
  242. package/dist/Components/TimePicker/timeParts.d.ts +10 -0
  243. package/dist/Components/TimePicker/timeParts.js +36 -0
  244. package/dist/Components/Timeline/Timeline.js +21 -12
  245. package/dist/Components/Toaster/Toaster.js +20 -8
  246. package/dist/Components/Toggle/TableToggle.js +8 -4
  247. package/dist/Components/ToggleSwitch/ToggleSwitch.d.ts +3 -2
  248. package/dist/Components/ToggleSwitch/ToggleSwitch.js +6 -5
  249. package/dist/Components/ToolTip/ToolTip.js +86 -8
  250. package/dist/Components/UpgradeButton/UpgradeButton.js +4 -2
  251. package/dist/Components/UserDetails/AddUserModal.js +2 -1
  252. package/dist/Components/UserDetails/ChangeRoleModal.js +2 -1
  253. package/dist/Components/UserDetails/UserDetails.js +10 -2
  254. package/dist/Components/VisuallyHidden/VisuallyHidden.d.ts +15 -0
  255. package/dist/Components/VisuallyHidden/VisuallyHidden.js +21 -0
  256. package/dist/Components/VisuallyHidden/VisuallyHiddenProps.d.ts +3 -0
  257. package/dist/Components/VisuallyHidden/VisuallyHiddenProps.js +2 -0
  258. package/dist/Components/WizardDialog/WizardDialog.js +10 -5
  259. package/dist/Components/WizardDialog/WizardDialogProps.d.ts +4 -0
  260. package/dist/Components/WorkspaceWindow/WorkspaceTrayPreview.js +5 -1
  261. package/dist/Components/WorkspaceWindow/WorkspaceWindow.js +15 -2
  262. package/dist/Components/WorkspaceWindow/WorkspaceWindowProps.d.ts +2 -1
  263. package/dist/Hooks/sharedResizeObserver.d.ts +6 -0
  264. package/dist/Hooks/sharedResizeObserver.js +77 -0
  265. package/dist/Hooks/useIsTruncated.js +3 -4
  266. package/dist/Theme/chakra/Card.styles.d.ts +7 -1
  267. package/dist/Theme/chakra/Card.styles.js +4 -1
  268. package/dist/Theme/chakra/Menu.styles.d.ts +4 -6
  269. package/dist/Theme/chakra/Menu.styles.js +3 -0
  270. package/dist/Theme/chakra/Popover.styles.d.ts +2 -11
  271. package/dist/Theme/chakra/Popover.styles.js +2 -0
  272. package/dist/Theme/chakra/common.web.d.ts +5 -0
  273. package/dist/Theme/chakra/componentStyles.d.ts +12 -4
  274. package/dist/Theme/chakra/componentStyles.js +10 -6
  275. package/dist/Theme/chakra/createBrandTheme.d.ts +3 -0
  276. package/dist/Theme/chakra/createBrandTheme.js +34 -4
  277. package/dist/Theme/chakra/focusRing.styles.d.ts +2 -0
  278. package/dist/Theme/chakra/focusRing.styles.js +5 -1
  279. package/dist/Theme/chakra/fonts.web.d.ts +2 -0
  280. package/dist/Theme/chakra/motion.d.ts +15 -0
  281. package/dist/Theme/chakra/motion.js +27 -1
  282. package/dist/Theme/chakra/overlay.styles.d.ts +5 -0
  283. package/dist/Theme/chakra/overlay.styles.js +4 -1
  284. package/dist/Theme/index.d.ts +2 -1
  285. package/dist/Theme/index.js +12 -9
  286. package/dist/Theme/provider/PixelizeThemeProvider.d.ts +4 -1
  287. package/dist/Theme/provider/PixelizeThemeProvider.js +21 -12
  288. package/dist/Theme/provider/ThemeSwitcher.js +3 -2
  289. package/dist/Theme/themeProps.d.ts +7 -0
  290. package/dist/Theme/tokens/brands/emerald/palette.dark.js +2 -1
  291. package/dist/Theme/tokens/brands/index.d.ts +2 -1
  292. package/dist/Theme/tokens/brands/index.js +31 -14
  293. package/dist/Theme/tokens/brands/lavender/palette.dark.js +2 -1
  294. package/dist/Theme/tokens/brands/meadow/palette.dark.js +2 -1
  295. package/dist/Theme/tokens/brands/radiant/palette.dark.js +2 -1
  296. package/dist/Theme/tokens/brands/radiant/palette.light.js +15 -0
  297. package/dist/Theme/tokens/brands/rosewood/palette.dark.js +2 -1
  298. package/dist/Theme/tokens/brands/rosewood/palette.light.js +10 -10
  299. package/dist/Theme/tokens/brands/skyline/palette.dark.js +2 -1
  300. package/dist/Theme/tokens/brands/slate/palette.dark.js +2 -1
  301. package/dist/Theme/tokens/brands/storefront/palette.dark.js +2 -1
  302. package/dist/Theme/tokens/brands/zinc/palette.dark.d.ts +7 -29
  303. package/dist/Theme/tokens/brands/zinc/palette.dark.js +27 -55
  304. package/dist/Theme/tokens/builders/buildDarkPalette.d.ts +6 -1
  305. package/dist/Theme/tokens/builders/buildDarkPalette.js +37 -8
  306. package/dist/Theme/tokens/builders/color.js +11 -7
  307. package/dist/Theme/tokens/builders/filledSurface.d.ts +3 -1
  308. package/dist/Theme/tokens/builders/filledSurface.js +7 -7
  309. package/dist/Theme/tokens/builders/lazy.d.ts +5 -0
  310. package/dist/Theme/tokens/builders/lazy.js +55 -0
  311. package/dist/Theme/tokens/builders/memo.d.ts +9 -0
  312. package/dist/Theme/tokens/builders/memo.js +28 -0
  313. package/dist/Theme/tokens/builders/memoByReads.d.ts +2 -0
  314. package/dist/Theme/tokens/builders/memoByReads.js +50 -0
  315. package/dist/Theme/tokens/builders/mutedText.d.ts +1 -1
  316. package/dist/Theme/tokens/builders/mutedText.js +13 -3
  317. package/dist/Theme/tokens/builders/outlineRung.js +10 -2
  318. package/dist/Theme/tokens/builders/planeStep.d.ts +4 -0
  319. package/dist/Theme/tokens/builders/planeStep.js +20 -0
  320. package/dist/Theme/tokens/builders/planes.d.ts +4 -0
  321. package/dist/Theme/tokens/builders/planes.js +33 -0
  322. package/dist/Theme/tokens/builders/skeletonShimmer.d.ts +9 -0
  323. package/dist/Theme/tokens/builders/skeletonShimmer.js +25 -0
  324. package/dist/Theme/tokens/builders/surfaceRaised.d.ts +3 -1
  325. package/dist/Theme/tokens/builders/surfaceRaised.js +18 -8
  326. package/dist/Theme/tokens/builders/surfaceRungs.js +3 -1
  327. package/dist/Theme/tokens/builders/tone.js +5 -4
  328. package/dist/Theme/tokens/primitives/borderWidths.d.ts +6 -0
  329. package/dist/Theme/tokens/primitives/borderWidths.js +5 -0
  330. package/dist/Theme/tokens/primitives/index.d.ts +8 -3
  331. package/dist/Theme/tokens/primitives/index.js +11 -1
  332. package/dist/Theme/tokens/primitives/motion.d.ts +26 -2
  333. package/dist/Theme/tokens/primitives/motion.js +24 -5
  334. package/dist/Theme/tokens/primitives/optionRowSizes.d.ts +1 -1
  335. package/dist/Theme/tokens/primitives/optionRowSizes.js +2 -1
  336. package/dist/Theme/tokens/primitives/radii.d.ts +15 -0
  337. package/dist/Theme/tokens/primitives/radii.js +14 -0
  338. package/dist/Theme/tokens/primitives/shadows.d.ts +21 -1
  339. package/dist/Theme/tokens/primitives/shadows.js +59 -5
  340. package/dist/Theme/tokens/primitives/states.d.ts +1 -0
  341. package/dist/Theme/tokens/primitives/states.js +4 -0
  342. package/dist/Theme/tokens/primitives/typography.d.ts +17 -0
  343. package/dist/Theme/tokens/primitives/typography.js +22 -2
  344. package/dist/Theme/tokens/primitives/zIndices.d.ts +1 -0
  345. package/dist/Theme/tokens/primitives/zIndices.js +1 -0
  346. package/dist/Utils/formatDate.d.ts +25 -0
  347. package/dist/Utils/formatDate.js +144 -0
  348. package/dist/esm/Components/Accordion/Accordion.js +2 -2
  349. package/dist/esm/Components/AddressCard/AddressCard.js +2 -1
  350. package/dist/esm/Components/Apexcharts/ApexLineChart/ApexLineChart.js +1 -1
  351. package/dist/esm/Components/AppSwitcher/AppSwitcher.js +1 -1
  352. package/dist/esm/Components/AppearanceSettings/AppearanceSettings.js +1 -1
  353. package/dist/esm/Components/AudioRecorder/AudioRecorder.js +2 -1
  354. package/dist/esm/Components/Avatar/Avatar.js +6 -4
  355. package/dist/esm/Components/Backdrop/Backdrop.js +1 -1
  356. package/dist/esm/Components/BagBar/BagBar.js +2 -1
  357. package/dist/esm/Components/Button/Button.styles.js +54 -24
  358. package/dist/esm/Components/ButtonGroupIcon/ButtonGroupIcon.js +1 -1
  359. package/dist/esm/Components/CalendarGrid/CalendarGrid.js +6 -6
  360. package/dist/esm/Components/CalendarGrid/calendarMath.js +18 -6
  361. package/dist/esm/Components/Card/PaymentCard/PaymentCard.js +6 -5
  362. package/dist/esm/Components/CartItem/CartItem.js +2 -1
  363. package/dist/esm/Components/Checkbox/Checkbox.js +8 -5
  364. package/dist/esm/Components/CheckoutKit/selectable.js +1 -1
  365. package/dist/esm/Components/ChoiceCard/ChoiceCard.js +14 -0
  366. package/dist/esm/Components/ChoiceCard/ChoiceCardGroup.js +4 -0
  367. package/dist/esm/Components/ChoiceCard/ChoiceCardProps.js +1 -0
  368. package/dist/esm/Components/CircularProgress/CircularProgress.js +5 -9
  369. package/dist/esm/Components/CircularProgress/arc.js +13 -0
  370. package/dist/esm/Components/Common/FormLabel.js +1 -1
  371. package/dist/esm/Components/Common/FormattedDescription.js +1 -1
  372. package/dist/esm/Components/Common/HelperText.js +11 -8
  373. package/dist/esm/Components/Common/fieldStyles.js +2 -1
  374. package/dist/esm/Components/ConfirmDialog/ConfirmDialog.js +2 -1
  375. package/dist/esm/Components/ContactForm/ContactForm.js +1 -1
  376. package/dist/esm/Components/CopyButton/CopyButton.js +14 -7
  377. package/dist/esm/Components/CouponField/CouponField.js +4 -3
  378. package/dist/esm/Components/CustomModulesTable/CustomModulesTable.js +6 -4
  379. package/dist/esm/Components/CustomModulesTable/EditModuleModal.js +2 -1
  380. package/dist/esm/Components/DatePicker/CalendarPanel.js +2 -2
  381. package/dist/esm/Components/DatePicker/DatePicker.js +8 -2
  382. package/dist/esm/Components/DatePicker/RangeDatePicker.js +10 -7
  383. package/dist/esm/Components/DatePicker/SingleDatePicker.js +9 -5
  384. package/dist/esm/Components/DatePicker/ThemeDatePicker.js +7 -4
  385. package/dist/esm/Components/DatePicker/TimeOnlyPicker.js +7 -4
  386. package/dist/esm/Components/DatePicker/TimePickerInput.js +8 -6
  387. package/dist/esm/Components/DatePicker/dayStates.js +2 -1
  388. package/dist/esm/Components/DescriptionList/DescriptionList.js +3 -3
  389. package/dist/esm/Components/Drawer/Drawer.js +2 -1
  390. package/dist/esm/Components/Dropdown/DropDown.js +13 -4
  391. package/dist/esm/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +2 -1
  392. package/dist/esm/Components/EmptyState/EmptyState.js +2 -2
  393. package/dist/esm/Components/FileUpload/FileUpload.js +29 -16
  394. package/dist/esm/Components/FileUpload/useObjectUrl.js +10 -0
  395. package/dist/esm/Components/FileUploader/FileUploader.js +9 -3
  396. package/dist/esm/Components/FilterBar/FilterBar.js +2 -2
  397. package/dist/esm/Components/FilterSidebar/FilterSidebar.js +15 -8
  398. package/dist/esm/Components/Form/FormWrapper.js +1 -1
  399. package/dist/esm/Components/FormField/FormField.js +52 -0
  400. package/dist/esm/Components/FormField/FormFieldProps.js +1 -0
  401. package/dist/esm/Components/Header/HeaderActions.js +2 -2
  402. package/dist/esm/Components/Header/components/mobileMenu.js +1 -1
  403. package/dist/esm/Components/IconButton/IconButton.js +21 -0
  404. package/dist/esm/Components/IconButton/IconButtonProps.js +1 -0
  405. package/dist/esm/Components/Input/PhoneNumberInput.js +15 -1
  406. package/dist/esm/Components/KanbanBoard/AccountCard.js +7 -4
  407. package/dist/esm/Components/KanbanBoard/AccountRow.js +1 -1
  408. package/dist/esm/Components/KanbanBoard/KanbanBoard.js +56 -39
  409. package/dist/esm/Components/KanbanBoard/MeasuredItem.js +6 -14
  410. package/dist/esm/Components/KanbanBoard/boardStore.js +22 -0
  411. package/dist/esm/Components/Kbd/Kbd.js +1 -1
  412. package/dist/esm/Components/LimitReachedModal/LimitReachedModal.js +1 -1
  413. package/dist/esm/Components/Loading/Loading.js +1 -1
  414. package/dist/esm/Components/MediaGallery/MediaGallery.js +2 -2
  415. package/dist/esm/Components/MediaGallery/MediaLightbox.js +2 -1
  416. package/dist/esm/Components/MediaGallery/glass.js +2 -1
  417. package/dist/esm/Components/MediaViewer/MediaViewer.js +1 -1
  418. package/dist/esm/Components/MediaViewer/components/MediaAudioPlayer.js +7 -7
  419. package/dist/esm/Components/MediaViewer/components/MediaImageViewer.js +1 -1
  420. package/dist/esm/Components/MediaViewer/components/MediaScrubber.js +5 -1
  421. package/dist/esm/Components/MediaViewer/components/MediaVideoPlayer.js +7 -7
  422. package/dist/esm/Components/MediaViewer/components/PlaybackTimeline.js +38 -0
  423. package/dist/esm/Components/MediaViewer/components/TileChip.js +1 -1
  424. package/dist/esm/Components/Modal/Modal.js +1 -1
  425. package/dist/esm/Components/MoreItems/MoreItems.js +2 -2
  426. package/dist/esm/Components/NavigationBar/NavigationBar.js +5 -4
  427. package/dist/esm/Components/NoteTextArea/NoteTextArea.js +18 -4
  428. package/dist/esm/Components/Notification/Notification.js +18 -3
  429. package/dist/esm/Components/NotificationBell/NotificationBell.js +2 -1
  430. package/dist/esm/Components/NotificationBell/NotificationItem.js +1 -1
  431. package/dist/esm/Components/NotificationBell/NotificationList.js +1 -1
  432. package/dist/esm/Components/NotificationBell/NotificationPanel.js +4 -3
  433. package/dist/esm/Components/OffersList/OffersList.js +2 -1
  434. package/dist/esm/Components/OptionChip/OptionChip.js +3 -2
  435. package/dist/esm/Components/OrderStatusTimeline/OrderStatusTimeline.js +2 -1
  436. package/dist/esm/Components/OrderSummary/OrderSummary.js +5 -5
  437. package/dist/esm/Components/OrganizationDetails/CreateOrgModal.js +2 -1
  438. package/dist/esm/Components/OrganizationDetails/OrganizationDetails.js +10 -2
  439. package/dist/esm/Components/PageHeader/PageHeader.js +2 -2
  440. package/dist/esm/Components/Pagination/Pagination.js +42 -0
  441. package/dist/esm/Components/Pagination/PaginationProps.js +6 -0
  442. package/dist/esm/Components/Pagination/pageWindow.js +16 -0
  443. package/dist/esm/Components/PaymentOption/PaymentOption.js +1 -1
  444. package/dist/esm/Components/PersonChip/PersonChip.js +2 -2
  445. package/dist/esm/Components/PinInput/PinInput.js +14 -2
  446. package/dist/esm/Components/PincodeChecker/PincodeChecker.js +4 -4
  447. package/dist/esm/Components/PlanPill/PlanPill.js +2 -1
  448. package/dist/esm/Components/PriceBlock/PriceBlock.js +3 -3
  449. package/dist/esm/Components/Primitives/Primitives.js +1 -1
  450. package/dist/esm/Components/ProductBadges/ProductBadges.js +2 -1
  451. package/dist/esm/Components/ProductCard/ProductCard.js +1 -1
  452. package/dist/esm/Components/ProductCard/ProductCardAction.js +3 -3
  453. package/dist/esm/Components/ProductCard/ProductCardSwatches.js +2 -1
  454. package/dist/esm/Components/ProductCard/cardMetrics.js +2 -1
  455. package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +9 -4
  456. package/dist/esm/Components/QuantityStepper/QuantityStepper.js +2 -1
  457. package/dist/esm/Components/RadioButton/RadioButton.js +7 -4
  458. package/dist/esm/Components/RangeSlider/RangeSlider.js +3 -3
  459. package/dist/esm/Components/Rating/Rating.js +2 -1
  460. package/dist/esm/Components/Reorder/Reorder.js +3 -2
  461. package/dist/esm/Components/ReviewList/ReviewList.js +3 -3
  462. package/dist/esm/Components/ReviewSummary/ReviewSummary.js +3 -3
  463. package/dist/esm/Components/SaveBar/SaveBar.js +2 -2
  464. package/dist/esm/Components/Search/Search.js +2 -9
  465. package/dist/esm/Components/Search/ctrlShortcut.js +25 -0
  466. package/dist/esm/Components/SearchSelect/SearchSelect.js +160 -52
  467. package/dist/esm/Components/SearchSelect/searchSelectNav.js +32 -0
  468. package/dist/esm/Components/SegmentedControl/SegmentedControl.js +11 -6
  469. package/dist/esm/Components/Select/SelectPopup.js +7 -4
  470. package/dist/esm/Components/SelectSearch/SelectSearch.js +6 -4
  471. package/dist/esm/Components/SettingRow/SettingRow.js +2 -1
  472. package/dist/esm/Components/SettingRow/SettingsSection.js +2 -1
  473. package/dist/esm/Components/SideBar/SecondaryBar.js +5 -3
  474. package/dist/esm/Components/SideBar/SideBar.js +98 -34
  475. package/dist/esm/Components/SideBar/components/MenuItemBox.js +11 -7
  476. package/dist/esm/Components/SideBar/components/MenuItems.js +4 -4
  477. package/dist/esm/Components/SideBar/components/MenuPopoverContent.js +2 -1
  478. package/dist/esm/Components/SideBar/components/OtherApps.js +4 -2
  479. package/dist/esm/Components/SideBar/components/OverflowTooltipText.js +4 -5
  480. package/dist/esm/Components/SideBar/components/PinnedSection.js +8 -5
  481. package/dist/esm/Components/SideBar/components/TextTruncation.js +9 -7
  482. package/dist/esm/Components/SideBar/sidebarMotion.js +3 -0
  483. package/dist/esm/Components/SideBar/sidebarScale.js +2 -1
  484. package/dist/esm/Components/SignInActivityTable/SignInActivityTable.js +6 -4
  485. package/dist/esm/Components/Skeletons/Skeletons.js +4 -2
  486. package/dist/esm/Components/SkipLink/SkipLink.js +50 -0
  487. package/dist/esm/Components/SkipLink/SkipLinkProps.js +1 -0
  488. package/dist/esm/Components/Slider/Slider.js +11 -4
  489. package/dist/esm/Components/SpecTable/SpecTable.js +2 -1
  490. package/dist/esm/Components/StageProgress/StageItem.js +7 -7
  491. package/dist/esm/Components/StageProgress/StageProgress.js +2 -1
  492. package/dist/esm/Components/StageProgress/StepperStage.js +4 -8
  493. package/dist/esm/Components/StageProgress/centerInStrip.js +11 -0
  494. package/dist/esm/Components/StatCard/StatCard.js +6 -4
  495. package/dist/esm/Components/StickyBuyBar/StickyBuyBar.js +2 -2
  496. package/dist/esm/Components/Table/Table.js +8 -4
  497. package/dist/esm/Components/Table/components/TableActions.js +43 -26
  498. package/dist/esm/Components/Table/components/TableBody.js +25 -40
  499. package/dist/esm/Components/Table/components/rowMeasurer.js +66 -0
  500. package/dist/esm/Components/Table/filters/CompactSelect.js +2 -1
  501. package/dist/esm/Components/Table/filters/TableFilters.js +3 -14
  502. package/dist/esm/Components/Table/hooks/useTable.js +12 -9
  503. package/dist/esm/Components/Table/settings/TableSettings.js +8 -3
  504. package/dist/esm/Components/Table/variants/classic.js +3 -2
  505. package/dist/esm/Components/Tabs/components/CountBadge.js +3 -3
  506. package/dist/esm/Components/Tabs/components/Tab.js +5 -4
  507. package/dist/esm/Components/Tabs/components/TabList.js +16 -1
  508. package/dist/esm/Components/Tag/Tag.js +11 -8
  509. package/dist/esm/Components/Tag/Tag.styles.js +6 -4
  510. package/dist/esm/Components/TagInput/TagInput.js +94 -0
  511. package/dist/esm/Components/TagInput/TagInputProps.js +1 -0
  512. package/dist/esm/Components/TagInput/tagEntries.js +39 -0
  513. package/dist/esm/Components/TimePicker/TimePicker.js +45 -0
  514. package/dist/esm/Components/TimePicker/TimePickerProps.js +1 -0
  515. package/dist/esm/Components/TimePicker/timeParts.js +26 -0
  516. package/dist/esm/Components/Timeline/Timeline.js +21 -12
  517. package/dist/esm/Components/Toaster/Toaster.js +21 -9
  518. package/dist/esm/Components/Toggle/TableToggle.js +8 -4
  519. package/dist/esm/Components/ToggleSwitch/ToggleSwitch.js +7 -5
  520. package/dist/esm/Components/ToolTip/ToolTip.js +89 -11
  521. package/dist/esm/Components/UpgradeButton/UpgradeButton.js +4 -2
  522. package/dist/esm/Components/UserDetails/AddUserModal.js +2 -1
  523. package/dist/esm/Components/UserDetails/ChangeRoleModal.js +2 -1
  524. package/dist/esm/Components/UserDetails/UserDetails.js +10 -2
  525. package/dist/esm/Components/VisuallyHidden/VisuallyHidden.js +18 -0
  526. package/dist/esm/Components/VisuallyHidden/VisuallyHiddenProps.js +1 -0
  527. package/dist/esm/Components/WizardDialog/WizardDialog.js +11 -6
  528. package/dist/esm/Components/WorkspaceWindow/WorkspaceTrayPreview.js +2 -1
  529. package/dist/esm/Components/WorkspaceWindow/WorkspaceWindow.js +13 -3
  530. package/dist/esm/Hooks/sharedResizeObserver.js +73 -0
  531. package/dist/esm/Hooks/useIsTruncated.js +3 -4
  532. package/dist/esm/Theme/chakra/Card.styles.js +4 -1
  533. package/dist/esm/Theme/chakra/Menu.styles.js +3 -0
  534. package/dist/esm/Theme/chakra/Popover.styles.js +2 -0
  535. package/dist/esm/Theme/chakra/componentStyles.js +10 -6
  536. package/dist/esm/Theme/chakra/createBrandTheme.js +34 -4
  537. package/dist/esm/Theme/chakra/focusRing.styles.js +3 -0
  538. package/dist/esm/Theme/chakra/motion.js +26 -0
  539. package/dist/esm/Theme/chakra/overlay.styles.js +3 -0
  540. package/dist/esm/Theme/index.js +12 -9
  541. package/dist/esm/Theme/provider/PixelizeThemeProvider.js +22 -13
  542. package/dist/esm/Theme/provider/ThemeSwitcher.js +3 -2
  543. package/dist/esm/Theme/tokens/brands/emerald/palette.dark.js +2 -1
  544. package/dist/esm/Theme/tokens/brands/index.js +30 -13
  545. package/dist/esm/Theme/tokens/brands/lavender/palette.dark.js +2 -1
  546. package/dist/esm/Theme/tokens/brands/meadow/palette.dark.js +2 -1
  547. package/dist/esm/Theme/tokens/brands/radiant/palette.dark.js +2 -1
  548. package/dist/esm/Theme/tokens/brands/radiant/palette.light.js +15 -0
  549. package/dist/esm/Theme/tokens/brands/rosewood/palette.dark.js +2 -1
  550. package/dist/esm/Theme/tokens/brands/rosewood/palette.light.js +10 -10
  551. package/dist/esm/Theme/tokens/brands/skyline/palette.dark.js +2 -1
  552. package/dist/esm/Theme/tokens/brands/slate/palette.dark.js +2 -1
  553. package/dist/esm/Theme/tokens/brands/storefront/palette.dark.js +2 -1
  554. package/dist/esm/Theme/tokens/brands/zinc/palette.dark.js +27 -55
  555. package/dist/esm/Theme/tokens/builders/buildDarkPalette.js +38 -9
  556. package/dist/esm/Theme/tokens/builders/color.js +10 -6
  557. package/dist/esm/Theme/tokens/builders/filledSurface.js +7 -7
  558. package/dist/esm/Theme/tokens/builders/lazy.js +49 -0
  559. package/dist/esm/Theme/tokens/builders/memo.js +21 -0
  560. package/dist/esm/Theme/tokens/builders/memoByReads.js +46 -0
  561. package/dist/esm/Theme/tokens/builders/mutedText.js +12 -2
  562. package/dist/esm/Theme/tokens/builders/outlineRung.js +10 -2
  563. package/dist/esm/Theme/tokens/builders/planeStep.js +14 -0
  564. package/dist/esm/Theme/tokens/builders/planes.js +28 -0
  565. package/dist/esm/Theme/tokens/builders/skeletonShimmer.js +21 -0
  566. package/dist/esm/Theme/tokens/builders/surfaceRaised.js +16 -7
  567. package/dist/esm/Theme/tokens/builders/surfaceRungs.js +3 -1
  568. package/dist/esm/Theme/tokens/builders/tone.js +5 -4
  569. package/dist/esm/Theme/tokens/primitives/borderWidths.js +2 -0
  570. package/dist/esm/Theme/tokens/primitives/index.js +5 -3
  571. package/dist/esm/Theme/tokens/primitives/motion.js +21 -4
  572. package/dist/esm/Theme/tokens/primitives/optionRowSizes.js +2 -1
  573. package/dist/esm/Theme/tokens/primitives/radii.js +13 -0
  574. package/dist/esm/Theme/tokens/primitives/shadows.js +56 -5
  575. package/dist/esm/Theme/tokens/primitives/states.js +1 -0
  576. package/dist/esm/Theme/tokens/primitives/typography.js +21 -1
  577. package/dist/esm/Theme/tokens/primitives/zIndices.js +1 -0
  578. package/dist/esm/Utils/formatDate.js +138 -0
  579. package/dist/esm/index.js +19 -2
  580. package/dist/index.d.ts +34 -5
  581. package/dist/index.js +51 -4
  582. package/package.json +1 -1
@@ -2,9 +2,9 @@ import { buildDarkPalette } from "../../builders/buildDarkPalette.js";
2
2
  import { rotateScaleHue } from "../../builders/brandInk.js";
3
3
  import { buildPrimaryOpacity, buildPrimaryShadowTint } from "../../builders/buildBrandTokens.js";
4
4
  import { pickAccentText, onFilled } from "../../builders/accentText.js";
5
+ import { lazyPalette } from "../../builders/lazy.js";
5
6
  import light from "./palette.light.js";
6
7
  // NOTE: zinc dark INVERTS the primary (near-white fill, dark label) to match shadcn — every other brand lifts its own hue instead. Most ramps below are literals ported from Mobile-Components.
7
- const derived = buildDarkPalette(light);
8
8
  const PRIMARY_500 = "#e4e4e7";
9
9
  const SECONDARY_500 = "#a1a1aa";
10
10
  const primary = {
@@ -33,19 +33,6 @@ const secondary = {
33
33
  900: "#fafafa",
34
34
  opacity: buildPrimaryOpacity(SECONDARY_500),
35
35
  };
36
- // background[50] = the elevated surface (#0e0e11), resolved through a token, not a literal.
37
- const background = {
38
- 50: "#0e0e11",
39
- 100: "#131316",
40
- 200: "#18181b",
41
- 300: "#212124",
42
- 400: "#27272a",
43
- 500: "#3f3f46",
44
- 600: "#52525b",
45
- 700: "#71717a",
46
- 800: "#a1a1aa",
47
- 900: "#d4d4d8",
48
- };
49
36
  const text = {
50
37
  50: "#71717a",
51
38
  100: "#8a8a93",
@@ -71,10 +58,7 @@ const header = {
71
58
  900: "#ffffff",
72
59
  };
73
60
  // NOTE: gray[400] is the one value here NOT ported verbatim — pinned to clear the 3:1 non-text bar (shadcn's own measures 2.81).
74
- const gray = {
75
- 50: "#18181b",
76
- 100: "#27272a",
77
- 200: "#3f3f46",
61
+ const grayInk = {
78
62
  300: "#52525b",
79
63
  400: "#7a7a83",
80
64
  500: "#a1a1aa",
@@ -132,42 +116,30 @@ const disabled = {
132
116
  800: "#a1a1aa",
133
117
  900: "#d4d4d8",
134
118
  };
135
- const table = {
136
- hover: {
137
- 50: "#0e0e11",
138
- 100: "#131316",
139
- 200: "#18181b",
140
- 300: "#1f1f22",
141
- 400: "#27272a",
142
- 500: "#2f2f33",
143
- 600: "#3f3f46",
144
- 700: "#52525b",
145
- 800: "#71717a",
146
- 900: "#a1a1aa",
147
- },
148
- };
149
- const palette = {
150
- ...derived,
151
- gradient: { from: PRIMARY_500, to: "#a1a1aa" },
152
- primary,
153
- secondary,
154
- tertiary: { ...rotateScaleHue(secondary), opacity: secondary.opacity },
155
- // NOTE: backgroundColor/sidebar fall through to `...derived` — mobile's literals collapse distinct elevation steps, breaking darkSurfaces.test.ts.
156
- background,
157
- text,
158
- header,
159
- gray,
160
- border,
161
- boxborder,
162
- placeholder,
163
- disabled,
164
- table,
165
- accentText: pickAccentText(primary, derived.backgroundColor.main),
166
- onPrimary: onFilled(PRIMARY_500, derived.white, derived.black),
167
- boxShadow: {
168
- primary: buildPrimaryShadowTint(PRIMARY_500),
169
- error: derived.boxShadow.error,
170
- default: "#00000080",
171
- },
119
+ const buildPalette = () => {
120
+ const derived = buildDarkPalette(light);
121
+ return {
122
+ ...derived,
123
+ gradient: { from: PRIMARY_500, to: "#a1a1aa" },
124
+ primary,
125
+ secondary,
126
+ tertiary: { ...rotateScaleHue(secondary), opacity: secondary.opacity },
127
+ // NOTE: the planes (backgroundColor, background, table, gray fills) stay derived — they rise with the card.
128
+ text,
129
+ header,
130
+ gray: { ...derived.gray, ...grayInk },
131
+ border,
132
+ boxborder,
133
+ placeholder,
134
+ disabled,
135
+ accentText: pickAccentText(primary, derived.backgroundColor.main),
136
+ onPrimary: onFilled(PRIMARY_500, derived.white, derived.black),
137
+ boxShadow: {
138
+ primary: buildPrimaryShadowTint(PRIMARY_500),
139
+ error: derived.boxShadow.error,
140
+ default: "#00000080",
141
+ },
142
+ };
172
143
  };
144
+ const palette = lazyPalette(light, buildPalette);
173
145
  export default palette;
@@ -5,8 +5,9 @@ import { withSidebarTokens } from "./sidebarAccent.js";
5
5
  import { buildMutedText } from "./mutedText.js";
6
6
  import { buildSemanticText, buildOnSemantic } from "./semanticText.js";
7
7
  import { buildFocusRing } from "./focusRing.js";
8
- import { buildSurfaceRaised } from "./surfaceRaised.js";
8
+ import { buildSurfaceRaised, filledMarks } from "./surfaceRaised.js";
9
9
  import { buildStar } from "./star.js";
10
+ import { CARD_LIFT, lift } from "./planes.js";
10
11
  // Structural ramps are rebuilt at explicit targets (not reversed — light ramps bottom near 35%);
11
12
  // utility hues are reversed so index roles survive; brand/semantic ramps shift one step lighter.
12
13
  const SCALE_KEYS = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900];
@@ -142,23 +143,49 @@ const NAMED_SURFACE_L = {
142
143
  accent: 17,
143
144
  muted: 18,
144
145
  };
145
- // NOTE: surfaces are hue-neutral in dark (a tint wash reads as a different product per brand); accent lives in primary/semantic/text.
146
- const SURFACE_SAT = 0;
146
+ const SURFACE_SAT = { lifted: 14, flat: 0 };
147
147
  const TEXT_SAT = 12;
148
148
  const PLACEHOLDER_SAT = 10;
149
149
  const BORDER_SAT = 12;
150
150
  const DISABLED_SAT = 8;
151
151
  const GRAY_SAT = 0;
152
- export function buildDarkPalette(light) {
152
+ // Fill rungs drawn ON a card keep their step above it, so they rise with the card; ink and chrome rungs stay.
153
+ const BACKGROUND_FILLS = [100, 200, 300, 400, 500];
154
+ // NOTE: table.hover[500] gates every ink (it is a named surface), so it climbs one rung per step, not the card's full rise.
155
+ const TABLE_HOVER_ABOVE_CARD = {
156
+ 50: 1, 100: 3, 200: 5, 300: 6, 400: 6.5, 500: 7,
157
+ };
158
+ const GRAY_FILLS = [50, 100, 200];
159
+ const raise = (targets, rungs, by) => ({
160
+ ...targets,
161
+ ...Object.fromEntries(rungs.map((k) => [k, targets[k] + by])),
162
+ });
163
+ const cardPlane = (canvas, white, planes) => {
164
+ if (planes === "flat")
165
+ return { card: canvas, rise: 0, tableHover: TABLE_HOVER_TARGETS };
166
+ const card = lift(white, canvas, CARD_LIFT);
167
+ const cardL = hexToHsl(card).l;
168
+ const tableHover = {
169
+ ...TABLE_HOVER_TARGETS,
170
+ ...Object.fromEntries(Object.entries(TABLE_HOVER_ABOVE_CARD).map(([k, step]) => [k, cardL + step])),
171
+ };
172
+ return { card, rise: cardL - hexToHsl(canvas).l, tableHover };
173
+ };
174
+ export function buildDarkPalette(light, { planes = "lifted" } = {}) {
153
175
  const hueSource = light.primary[500];
154
176
  const { h } = hexToHsl(hueSource);
177
+ const surfaceSat = SURFACE_SAT[planes];
155
178
  const namedSurfaces = Object.fromEntries(Object.entries(NAMED_SURFACE_L).map(([key, l]) => [
156
179
  key,
157
- hslToHex({ h, s: SURFACE_SAT, l }),
180
+ hslToHex({ h, s: surfaceSat, l }),
158
181
  ]));
159
182
  const white = light.white;
183
+ const { card, rise, tableHover } = cardPlane(namedSurfaces.main, white, planes);
160
184
  const primary = liftBrand(light.primary, white);
161
- const background = fromTargets(hueSource, SURFACE_TARGETS, SURFACE_SAT);
185
+ const background = {
186
+ ...fromTargets(hueSource, raise(SURFACE_TARGETS, BACKGROUND_FILLS, rise), surfaceSat),
187
+ 50: card,
188
+ };
162
189
  const semantic = {
163
190
  success: liftAccent(light.semantic.success, white),
164
191
  error: liftAccent(light.semantic.error, white),
@@ -178,7 +205,7 @@ export function buildDarkPalette(light) {
178
205
  transparent: light.transparent,
179
206
  black: light.black,
180
207
  white: light.white,
181
- gray: fromTargets(hueSource, GRAY_TARGETS, GRAY_SAT),
208
+ gray: fromTargets(hueSource, raise(GRAY_TARGETS, GRAY_FILLS, rise), GRAY_SAT),
182
209
  red: reverseScale(light.red),
183
210
  orange: reverseScale(light.orange),
184
211
  yellow: reverseScale(light.yellow),
@@ -195,7 +222,9 @@ export function buildDarkPalette(light) {
195
222
  placeholder: fromTargets(hueSource, PLACEHOLDER_TARGETS, PLACEHOLDER_SAT),
196
223
  border: dividerRamp,
197
224
  boxborder: dividerRamp,
198
- table: { hover: fromTargets(hueSource, TABLE_HOVER_TARGETS, SURFACE_SAT) },
225
+ table: {
226
+ hover: fromTargets(hueSource, tableHover, surfaceSat),
227
+ },
199
228
  disabled: fromTargets(hueSource, DISABLED_TARGETS, DISABLED_SAT),
200
229
  accentText: pickAccentText(primary, namedSurfaces.main),
201
230
  textMuted: buildMutedText(fromTargets(hueSource, TEXT_TARGETS, TEXT_SAT), namedSurfaces.main),
@@ -203,7 +232,7 @@ export function buildDarkPalette(light) {
203
232
  onPrimary: onFilled(primary[500], light.white, light.black),
204
233
  onSemantic: buildOnSemantic(semantic, light.white, light.black),
205
234
  focusRing: buildFocusRing({ primary, background, backgroundColor: namedSurfaces }),
206
- surfaceRaised: buildSurfaceRaised({ backgroundColor: namedSurfaces, background, white }),
235
+ surfaceRaised: buildSurfaceRaised({ backgroundColor: namedSurfaces, background, white }, filledMarks({ primary, semantic })),
207
236
  star: buildStar(namedSurfaces.main),
208
237
  sidebar: withSidebarTokens(light),
209
238
  boxShadow: {
@@ -1,4 +1,5 @@
1
1
  // Pure color math, no dependencies or platform APIs — safe for the mobile port.
2
+ import { memoize } from "./memo.js";
2
3
  const clamp = (n, min, max) => Math.min(max, Math.max(min, n));
3
4
  // NOTE: #rrggbbaa throws on purpose — alpha over an unknown backdrop has no defined luminance; composite first.
4
5
  export function hexToRgb(hex) {
@@ -105,14 +106,17 @@ export function mix(a, b, weight) {
105
106
  b: ca.b + (cb.b - ca.b) * w,
106
107
  });
107
108
  }
109
+ const linearChannel = (v) => {
110
+ const c = v / 255;
111
+ return c <= 0.03928 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4);
112
+ };
113
+ const luminanceOf = memoize((hex) => {
114
+ const { r, g, b } = hexToRgb(hex);
115
+ return 0.2126 * linearChannel(r) + 0.7152 * linearChannel(g) + 0.0722 * linearChannel(b);
116
+ }, (hex) => hex, 4096);
108
117
  /** WCAG 2.1 relative luminance. */
109
118
  export function relativeLuminance(hex) {
110
- const { r, g, b } = hexToRgb(hex);
111
- const channel = (v) => {
112
- const c = v / 255;
113
- return c <= 0.03928 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4);
114
- };
115
- return 0.2126 * channel(r) + 0.7152 * channel(g) + 0.0722 * channel(b);
119
+ return luminanceOf(hex);
116
120
  }
117
121
  /** WCAG 2.1 contrast ratio, 1–21. AA body text needs >= 4.5. */
118
122
  export function contrastRatio(a, b) {
@@ -1,6 +1,7 @@
1
1
  import { contrastRatio } from "./color.js";
2
2
  import { AA_NORMAL_TEXT, isDarkCanvas, onFilled } from "./accentText.js";
3
3
  import { AA_NON_TEXT } from "./outlineRung.js";
4
+ import { memoize, scaleKey } from "./memo.js";
4
5
  const RUNGS = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900];
5
6
  // NOTE: "darker than [500]" is [600]/[700] in light but [400]/[300] in dark, since dark ramps run dark -> light.
6
7
  const FILL_STEP_RUNGS = { light: [600, 700], dark: [400, 300] };
@@ -51,12 +52,8 @@ export const darkerFillRung = (scale, canvas, white, step) => {
51
52
  };
52
53
  /** Label ink for a specific fill swatch — always `onFilled`, exported for style configs. */
53
54
  export const labelOnFill = (fill, white, black) => onFilled(fill, white, black);
54
- // Consumer-facing helper: fill rung + ink for solid/hover/active. Never pair scale[500] with onFilled by hand.
55
- export const resolveFilledSurface = (scale, colors) => {
56
- const { white, black, backgroundColor, background } = colors;
57
- const canvas = contrastRatio(scale[500], backgroundColor.main) <= contrastRatio(scale[500], background[50])
58
- ? backgroundColor.main
59
- : background[50];
55
+ const filledSurfaceMemo = memoize((scale, white, black, main, card) => {
56
+ const canvas = contrastRatio(scale[500], main) <= contrastRatio(scale[500], card) ? main : card;
60
57
  const rung = solidFillRung(scale, white, canvas);
61
58
  const fill = scale[rung];
62
59
  const hoverRung = darkerFillRung(scale, canvas, white, 0);
@@ -74,4 +71,7 @@ export const resolveFilledSurface = (scale, colors) => {
74
71
  activeFill,
75
72
  activeColor: labelOnFill(activeFill, white, black),
76
73
  };
77
- };
74
+ }, (scale, white, black, main, card) => `${scaleKey(scale)}|${white}|${black}|${main}|${card}`);
75
+ export const resolveFilledSurface = (scale, colors) => ({
76
+ ...filledSurfaceMemo(scale, colors.white, colors.black, colors.backgroundColor.main, colors.background[50]),
77
+ });
@@ -0,0 +1,49 @@
1
+ const dataProperty = (value) => ({
2
+ value,
3
+ writable: true,
4
+ enumerable: true,
5
+ configurable: true,
6
+ });
7
+ // NOTE: first read of any key builds once and swaps every getter for a plain data property.
8
+ export const lazyObject = (keys, build) => {
9
+ const target = {};
10
+ let built;
11
+ const materialise = () => {
12
+ if (built)
13
+ return built;
14
+ const value = build();
15
+ built = value;
16
+ if (!Object.isSealed(target)) {
17
+ keys.forEach((key) => Object.defineProperty(target, key, dataProperty(value[key])));
18
+ }
19
+ return value;
20
+ };
21
+ keys.forEach((key) => Object.defineProperty(target, key, {
22
+ enumerable: true,
23
+ configurable: true,
24
+ get: () => materialise()[key],
25
+ set: (next) => {
26
+ materialise();
27
+ Object.defineProperty(target, key, dataProperty(next));
28
+ },
29
+ }));
30
+ return target;
31
+ };
32
+ // NOTE: order matches finalizeLightPalette and buildDarkPalette, which append these after the source keys.
33
+ const DERIVED = {
34
+ accentText: true,
35
+ textMuted: true,
36
+ semanticText: true,
37
+ onPrimary: true,
38
+ onSemantic: true,
39
+ focusRing: true,
40
+ surfaceRaised: true,
41
+ star: true,
42
+ };
43
+ const DERIVED_KEYS = Object.keys(DERIVED);
44
+ export const paletteKeys = (source) => [
45
+ ...Object.keys(source),
46
+ ...DERIVED_KEYS.filter((key) => !(key in source)),
47
+ ];
48
+ /** A palette derived from `source` on its first read; same keys, order and values as `build()`. */
49
+ export const lazyPalette = (source, build) => lazyObject(paletteKeys(source), build);
@@ -0,0 +1,21 @@
1
+ const registry = [];
2
+ export const MEMO_LIMIT = 1024;
3
+ // NOTE: clear-on-overflow, not LRU — a hit stays one Map lookup; contrast walks mint many one-off keys.
4
+ export const memoize = (fn, keyOf, limit = MEMO_LIMIT) => {
5
+ const cache = new Map();
6
+ registry.push({ cache, limit });
7
+ return (...args) => {
8
+ const key = keyOf(...args);
9
+ const hit = cache.get(key);
10
+ if (hit !== undefined)
11
+ return hit;
12
+ const value = fn(...args);
13
+ if (cache.size >= limit)
14
+ cache.clear();
15
+ cache.set(key, value);
16
+ return value;
17
+ };
18
+ };
19
+ export const scaleKey = (s) => `${s[50]}|${s[100]}|${s[200]}|${s[300]}|${s[400]}|${s[500]}|${s[600]}|${s[700]}|${s[800]}|${s[900]}`;
20
+ export const memoCaches = () => registry.map(({ cache, limit }) => ({ size: cache.size, limit }));
21
+ export const clearMemoCaches = () => registry.forEach(({ cache }) => cache.clear());
@@ -0,0 +1,46 @@
1
+ export const READS_MEMO_LIMIT = 16;
2
+ // NOTE: keyed on exactly the props a call read; a call that enumerates or probes props is never cached.
3
+ export const memoiseByReads = (fn, limit = READS_MEMO_LIMIT) => {
4
+ const entries = [];
5
+ return (props) => {
6
+ const source = props;
7
+ const hit = entries.find((entry) => entry.keys.every((key, i) => Object.is(source[key], entry.values[i])));
8
+ if (hit)
9
+ return hit.result;
10
+ const reads = new Map();
11
+ let opaque = false;
12
+ const tracked = new Proxy(props, {
13
+ get(target, key, receiver) {
14
+ const value = Reflect.get(target, key, receiver);
15
+ if (typeof key !== "string")
16
+ opaque = true;
17
+ else if (!reads.has(key))
18
+ reads.set(key, value);
19
+ return value;
20
+ },
21
+ has(target, key) {
22
+ opaque = true;
23
+ return Reflect.has(target, key);
24
+ },
25
+ ownKeys(target) {
26
+ opaque = true;
27
+ return Reflect.ownKeys(target);
28
+ },
29
+ getOwnPropertyDescriptor(target, key) {
30
+ opaque = true;
31
+ return Reflect.getOwnPropertyDescriptor(target, key);
32
+ },
33
+ });
34
+ const result = fn(tracked);
35
+ if (!opaque) {
36
+ if (entries.length >= limit)
37
+ entries.shift();
38
+ entries.push({
39
+ keys: [...reads.keys()],
40
+ values: [...reads.values()],
41
+ result,
42
+ });
43
+ }
44
+ return result;
45
+ };
46
+ };
@@ -1,5 +1,15 @@
1
+ import { contrastRatio, hexToHsl, relativeLuminance, withLightness } from "./color.js";
1
2
  import { liftToContrast } from "./outlineRung.js";
2
3
  /** WCAG 1.4.3 — muted is still body text. */
3
4
  export const AA_NORMAL_TEXT = 4.5;
4
- /** Seeded from the ramp's muted rung so brand tint survives, then lifted until it clears AA. */
5
- export const buildMutedText = (text, canvas) => liftToContrast(text[400], canvas, AA_NORMAL_TEXT);
5
+ export const MUTED_TEXT_CEILING = 8;
6
+ const settleUnder = (hex, canvas, ceiling) => {
7
+ const { s, l } = hexToHsl(hex);
8
+ const toward = relativeLuminance(canvas) < 0.5 ? -1 : 1;
9
+ let settled = hex;
10
+ for (let next = l; contrastRatio(settled, canvas) > ceiling; next += toward) {
11
+ settled = withLightness(hex, next, s);
12
+ }
13
+ return settled;
14
+ };
15
+ export const buildMutedText = (text, canvas) => liftToContrast(settleUnder(text[400], canvas, MUTED_TEXT_CEILING), canvas, AA_NORMAL_TEXT);
@@ -1,4 +1,5 @@
1
1
  import { contrastRatio, hexToHsl, relativeLuminance, withLightness } from "./color.js";
2
+ import { memoize } from "./memo.js";
2
3
  export const MIN_PERCEPTIBLE_STEP = 1.15;
3
4
  export const AA_NON_TEXT = 3;
4
5
  // NOTE: settles below AA_NON_TEXT — focusRing.ts covers the 1.4.11 gate instead.
@@ -22,7 +23,8 @@ export function tintStep(seed, backdrop, target) {
22
23
  }
23
24
  return withLightness(seed, away > 0 ? 100 : 0, s);
24
25
  }
25
- export function liftToContrast(hex, backdrop, target = AA_NON_TEXT) {
26
+ const contrastKey = (hex, backdrop, target) => `${hex}|${backdrop}|${target}`;
27
+ const liftMemo = memoize((hex, backdrop, target) => {
26
28
  if (contrastRatio(hex, backdrop) >= target)
27
29
  return hex;
28
30
  const { s, l: start } = hexToHsl(hex);
@@ -38,8 +40,11 @@ export function liftToContrast(hex, backdrop, target = AA_NON_TEXT) {
38
40
  }
39
41
  const ends = [withLightness(hex, 100, s), withLightness(hex, 0, s)];
40
42
  return contrastRatio(ends[0], backdrop) >= contrastRatio(ends[1], backdrop) ? ends[0] : ends[1];
43
+ }, contrastKey);
44
+ export function liftToContrast(hex, backdrop, target = AA_NON_TEXT) {
45
+ return liftMemo(hex, backdrop, target);
41
46
  }
42
- export function softenToContrast(hex, backdrop, target) {
47
+ const softenMemo = memoize((hex, backdrop, target) => {
43
48
  if (contrastRatio(hex, backdrop) <= target)
44
49
  return hex;
45
50
  const { s, l: start } = hexToHsl(hex);
@@ -52,6 +57,9 @@ export function softenToContrast(hex, backdrop, target) {
52
57
  softest = next;
53
58
  }
54
59
  return softest;
60
+ }, contrastKey);
61
+ export function softenToContrast(hex, backdrop, target) {
62
+ return softenMemo(hex, backdrop, target);
55
63
  }
56
64
  // NOTE: border[*] is untouched — it draws decorative table gridlines, outside 1.4.11.
57
65
  export function withOutlineRung(palette) {
@@ -0,0 +1,14 @@
1
+ import { DEFAULT_BLACK, isDarkCanvas } from "./accentText.js";
2
+ import { contrastRatio } from "./color.js";
3
+ import { CHROME_RULE, MIN_PERCEPTIBLE_STEP, liftToContrast, tintStep } from "./outlineRung.js";
4
+ import { lift } from "./planes.js";
5
+ const holds = (fill, plane, target) => !isDarkCanvas(plane) || contrastRatio(fill, plane) >= target;
6
+ export const bandOn = (fill, plane) => holds(fill, plane, MIN_PERCEPTIBLE_STEP) ? fill : tintStep(fill, plane, MIN_PERCEPTIBLE_STEP);
7
+ export const recessOn = (fill, plane) => holds(fill, plane, MIN_PERCEPTIBLE_STEP)
8
+ ? fill
9
+ : lift(DEFAULT_BLACK, plane, MIN_PERCEPTIBLE_STEP);
10
+ export const cardRule = (colors) => {
11
+ const rule = colors.boxborder[200];
12
+ const card = colors.background[50];
13
+ return holds(rule, card, CHROME_RULE) ? rule : liftToContrast(rule, card, CHROME_RULE);
14
+ };
@@ -0,0 +1,28 @@
1
+ import { contrastRatio, mix } from "./color.js";
2
+ import { AA_NON_TEXT } from "./outlineRung.js";
3
+ export const CARD_LIFT = 1.16;
4
+ export const RAISED_LIFT = 1.15;
5
+ const STEP = 0.005;
6
+ const MAX_WEIGHT = 0.4;
7
+ export function lift(ink, base, target) {
8
+ for (let t = STEP * 4; t < MAX_WEIGHT; t += STEP) {
9
+ const next = mix(base, ink, t);
10
+ if (contrastRatio(next, base) >= target)
11
+ return next;
12
+ }
13
+ return mix(base, ink, MAX_WEIGHT);
14
+ }
15
+ const clearsMarks = (surface, marks) => marks.every((mark) => contrastRatio(mark, surface) >= AA_NON_TEXT);
16
+ // NOTE: stops one step early rather than drop a filled mark under 3:1 on the lifted plane.
17
+ export function liftUnder(ink, base, target, marks) {
18
+ let settled = base;
19
+ for (let t = STEP * 4; t < MAX_WEIGHT; t += STEP) {
20
+ const next = mix(base, ink, t);
21
+ if (!clearsMarks(next, marks))
22
+ return settled;
23
+ if (contrastRatio(next, base) >= target)
24
+ return next;
25
+ settled = next;
26
+ }
27
+ return settled;
28
+ }
@@ -0,0 +1,21 @@
1
+ import { contrastRatio, hexToHsl, relativeLuminance, withLightness } from "./color.js";
2
+ /** Same pulse depth as the mobile library's `SKELETON_SHIMMER_CONTRAST`. */
3
+ export const SKELETON_SHIMMER_CONTRAST = 1.35;
4
+ const settleAway = (seed, base, target) => {
5
+ const { s } = hexToHsl(seed);
6
+ let near = hexToHsl(base).l;
7
+ let far = relativeLuminance(base) < 0.5 ? 100 : 0;
8
+ for (let i = 0; i < 20; i += 1) {
9
+ const mid = (near + far) / 2;
10
+ if (contrastRatio(withLightness(seed, mid, s), base) < target)
11
+ near = mid;
12
+ else
13
+ far = mid;
14
+ }
15
+ return withLightness(seed, far, s);
16
+ };
17
+ /** The two colours a Skeleton pulses between: `gray[100]`, and `gray[300]`'s tint settled to the amplitude. */
18
+ export const skeletonShimmer = (palette) => ({
19
+ start: palette.gray[100],
20
+ end: settleAway(palette.gray[300], palette.gray[100], SKELETON_SHIMMER_CONTRAST),
21
+ });
@@ -1,15 +1,24 @@
1
1
  import { contrastRatio, mix, relativeLuminance } from "./color.js";
2
2
  import { liftToContrast } from "./outlineRung.js";
3
+ import { RAISED_LIFT, liftUnder } from "./planes.js";
4
+ import { cardRule } from "./planeStep.js";
5
+ import { SEMANTIC_TONES } from "./semanticText.js";
3
6
  export const RAISED_OVERLAY = 0.07;
4
- // Never below the card, and at least one white-overlay step above the canvas.
5
- export const buildSurfaceRaised = (source) => {
6
- const overlay = mix(source.backgroundColor.main, source.white, RAISED_OVERLAY);
7
+ /** The filled fills a raised plane must keep at 3:1, or a button on a menu stops reading. */
8
+ export const filledMarks = (colors) => [
9
+ colors.primary[500],
10
+ ...SEMANTIC_TONES.map((tone) => colors.semantic[tone][500]),
11
+ ];
12
+ // Never below the card: the lighter of one white-overlay step off the canvas and a RAISED_LIFT step off the card.
13
+ export const buildSurfaceRaised = (source, marks = []) => {
7
14
  const card = source.background[50];
8
- return relativeLuminance(overlay) > relativeLuminance(card) ? overlay : card;
15
+ const overlay = mix(source.backgroundColor.main, source.white, RAISED_OVERLAY);
16
+ const stepped = liftUnder(source.white, card, RAISED_LIFT, marks);
17
+ return [overlay, stepped].reduce((top, c) => (relativeLuminance(c) > relativeLuminance(top) ? c : top), card);
9
18
  };
10
19
  export const withSurfaceRaised = (palette) => ({
11
20
  ...palette,
12
- surfaceRaised: buildSurfaceRaised(palette),
21
+ surfaceRaised: buildSurfaceRaised(palette, filledMarks(palette)),
13
22
  });
14
- // A divider inside an overlay, at the weight `boxborder[200]` has on a card.
15
- export const raisedRule = (colors) => liftToContrast(colors.boxborder[200], colors.surfaceRaised, contrastRatio(colors.boxborder[200], colors.background[50]));
23
+ // A divider inside an overlay, at the weight a rule has inside a card.
24
+ export const raisedRule = (colors) => liftToContrast(colors.boxborder[200], colors.surfaceRaised, contrastRatio(cardRule(colors), colors.background[50]));
@@ -2,6 +2,7 @@ import { contrastRatio } from "./color.js";
2
2
  import { liftToContrast, settleAcross, ruleInk, AA_NON_TEXT, CHROME_BORDER, CHROME_RULE } from "./outlineRung.js";
3
3
  import { AA_NORMAL_TEXT, pickAccentText } from "./accentText.js";
4
4
  import { SEMANTIC_TONES } from "./semanticText.js";
5
+ import { listRowBackgrounds } from "./rowStates.js";
5
6
  // NOTE: hint held to the non-text floor, not body-text — at 4.5 an empty field reads as typed-into. See CHROME-CONSISTENCY.md.
6
7
  export const PLACEHOLDER_TEXT = AA_NON_TEXT;
7
8
  export const namedSurfaces = (palette) => [
@@ -15,6 +16,7 @@ export const hardestSurface = (ink, surfaces) => surfaces.reduce((worst, s) => c
15
16
  // Runs last: `table.hover` is one of the surfaces, and it settles in its own rung.
16
17
  export function withSurfaceRungs(palette) {
17
18
  const surfaces = namedSurfaces(palette);
19
+ const accentSurfaces = [...surfaces, ...Object.values(listRowBackgrounds(palette))];
18
20
  const lift = (ink, target) => liftToContrast(ink, hardestSurface(ink, surfaces), target);
19
21
  const settle = (ink, target) => settleAcross(ink, surfaces, target);
20
22
  const rule = (ink) => ruleInk(ink, [palette.backgroundColor.main, palette.background[50]], CHROME_RULE);
@@ -25,7 +27,7 @@ export function withSurfaceRungs(palette) {
25
27
  return {
26
28
  ...palette,
27
29
  textMuted: lift(palette.textMuted, AA_NORMAL_TEXT),
28
- accentText: pickAccentText(palette.primary, hardestSurface(palette.accentText, surfaces)),
30
+ accentText: pickAccentText(palette.primary, hardestSurface(palette.accentText, accentSurfaces)),
29
31
  semanticText,
30
32
  text: { ...palette.text, 500: lift(palette.text[500], AA_NORMAL_TEXT) },
31
33
  header: { ...palette.header, 500: lift(palette.header[500], AA_NORMAL_TEXT) },
@@ -1,6 +1,7 @@
1
1
  import { isDarkCanvas } from "./accentText.js";
2
2
  import { compositeOver } from "./color.js";
3
3
  import { liftToContrast } from "./outlineRung.js";
4
+ import { memoize } from "./memo.js";
4
5
  export const TONES = ["neutral", "info", "success", "warning", "error"];
5
6
  export const toneToColorScheme = {
6
7
  neutral: "gray",
@@ -26,10 +27,8 @@ const SOFT_INK_TARGET = 6.5;
26
27
  const withAlpha = (hex, alpha) => `${hex}${Math.round(Math.min(1, Math.max(0, alpha)) * 255)
27
28
  .toString(16)
28
29
  .padStart(2, "0")}`;
29
- /** Translucent tint of the scale's own `[500]` hue — one rung for every scheme, any surface. */
30
- export const resolveSoftTone = (colors, scale, surface = colors.backgroundColor.main) => {
30
+ const softToneMemo = memoize((hue, surface) => {
31
31
  const dark = isDarkCanvas(surface);
32
- const hue = scale[500];
33
32
  const bgAlpha = dark ? BG_ALPHA.dark : BG_ALPHA.light;
34
33
  const ringAlpha = dark ? RING_ALPHA.dark : RING_ALPHA.light;
35
34
  const bg = withAlpha(hue, bgAlpha);
@@ -44,4 +43,6 @@ export const resolveSoftTone = (colors, scale, surface = colors.backgroundColor.
44
43
  activeBg: withAlpha(hue, bgAlpha + STATE_STEP * 1.75),
45
44
  activeBorder: withAlpha(hue, ringAlpha + STATE_STEP * 2),
46
45
  };
47
- };
46
+ }, (hue, surface) => `${hue}|${surface}`);
47
+ /** Translucent tint of the scale's own `[500]` hue — one rung for every scheme, any surface. */
48
+ export const resolveSoftTone = (colors, scale, surface = colors.backgroundColor.main) => ({ ...softToneMemo(scale[500], surface) });
@@ -0,0 +1,2 @@
1
+ /** Stroke widths in px on purpose: a rem hairline grows with the user's root font size. */
2
+ export const BORDER_WIDTHS = { hairline: "1px", thick: "2px" };
@@ -1,11 +1,13 @@
1
1
  export { default as space } from "./space.js";
2
2
  export { default as sizes } from "./sizes.js";
3
- export { default as radii } from "./radii.js";
4
- export { default as shadows } from "./shadows.js";
3
+ export { default as radii, RADIUS_ROLE } from "./radii.js";
4
+ export * from "./borderWidths.js";
5
+ export * from "./states.js";
6
+ export { default as shadows, shadowsDark, shadowsFor, shadowCss, ELEVATION_LAYERS, SHADOW_INK } from "./shadows.js";
5
7
  export { default as zIndices } from "./zIndices.js";
6
8
  export { default as breakpoints } from "./breakpoints.js";
7
9
  export { default as lineHeights } from "./lineHeights.js";
8
10
  export { default as letterSpacings } from "./letterSpacings.js";
9
- export { default as typography, fonts, fontSizes, fontWeights } from "./typography.js";
11
+ export { default as typography, fonts, fontSizes, fontWeights, NUMERIC_TEXT, TEXT_STYLES } from "./typography.js";
10
12
  export * from "./controlSizes.js";
11
13
  export * from "./motion.js";
@@ -1,8 +1,25 @@
1
- export const MOTION_MS = { fast: 150, base: 200 };
2
- export const MOTION_EASE = "cubic-bezier(0.2, 0, 0, 1)";
1
+ export const MOTION_MS = { fast: 150, base: 200, enter: 200, exit: 200 };
2
+ /** Pebble easing curves (mobile `pebble-spec.json` motion.easing); `in` is Pebble's `accelerate`. */
3
+ export const MOTION_BEZIER = {
4
+ standard: [0.2, 0, 0, 1],
5
+ out: [0.16, 1, 0.3, 1],
6
+ in: [0.3, 0, 1, 1],
7
+ };
8
+ export const cubicBezierCss = (curve) => `cubic-bezier(${curve.join(", ")})`;
9
+ export const MOTION_EASE = cubicBezierCss(MOTION_BEZIER.standard);
10
+ export const MOTION_EASE_OUT = cubicBezierCss(MOTION_BEZIER.out);
11
+ export const MOTION_EASE_IN = cubicBezierCss(MOTION_BEZIER.in);
12
+ /** Periods for loops that are feedback, not transitions: skeleton pulse, spinner turn, progress sweep. */
13
+ export const MOTION_LOOP_MS = { pulse: 700, spin: 800, sweep: 1200 };
14
+ export const MOTION_PRESS_SCALE = 0.98;
3
15
  /** A `transition` value for named properties only — `all` also animates layout and colour flips. */
4
- export const transitionFor = (properties, speed = "fast") => {
16
+ export const transitionFor = (properties, speed = "fast", curve = "standard") => {
5
17
  if (properties.includes("all"))
6
18
  throw new Error("transitionFor: name the properties, never `all`");
7
- return properties.map((p) => `${p} ${MOTION_MS[speed]}ms ${MOTION_EASE}`).join(", ");
19
+ const ease = cubicBezierCss(MOTION_BEZIER[curve]);
20
+ return properties.map((p) => `${p} ${MOTION_MS[speed]}ms ${ease}`).join(", ");
21
+ };
22
+ export const motionTransition = (speed = "base", curve = "standard") => {
23
+ const [x1, y1, x2, y2] = MOTION_BEZIER[curve];
24
+ return { duration: MOTION_MS[speed] / 1000, ease: [x1, y1, x2, y2] };
8
25
  };