pixelize-design-library 2.4.2-beta.62 → 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 (166) hide show
  1. package/CHANGELOG.md +75 -2
  2. package/COMPONENT-GOTCHAS.md +25 -6
  3. package/DESIGN-GUIDE.md +12 -5
  4. package/dist/Components/Button/Button.styles.js +51 -21
  5. package/dist/Components/Card/CardProps.d.ts +2 -2
  6. package/dist/Components/ConfirmDialog/ConfirmDialog.js +2 -1
  7. package/dist/Components/CustomModulesTable/CustomModulesTable.js +6 -4
  8. package/dist/Components/CustomModulesTable/EditModuleModal.js +2 -1
  9. package/dist/Components/DatePicker/RangeDatePicker.js +2 -1
  10. package/dist/Components/DatePicker/SingleDatePicker.js +2 -1
  11. package/dist/Components/DatePicker/TimeOnlyPicker.js +2 -1
  12. package/dist/Components/DatePicker/dayStates.js +2 -1
  13. package/dist/Components/Drawer/Drawer.js +2 -1
  14. package/dist/Components/Dropdown/DropDown.js +2 -1
  15. package/dist/Components/FileUpload/FileUpload.js +9 -2
  16. package/dist/Components/FilterSidebar/FilterSidebar.js +7 -4
  17. package/dist/Components/KanbanBoard/AccountCard.js +4 -2
  18. package/dist/Components/NavigationBar/NavigationBar.js +3 -2
  19. package/dist/Components/Notification/Notification.js +4 -3
  20. package/dist/Components/NotificationBell/NotificationPanel.js +4 -3
  21. package/dist/Components/OrganizationDetails/CreateOrgModal.js +2 -1
  22. package/dist/Components/OrganizationDetails/OrganizationDetails.js +5 -3
  23. package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +7 -3
  24. package/dist/Components/SearchSelect/SearchSelect.js +42 -21
  25. package/dist/Components/SearchSelect/searchSelectNav.d.ts +13 -0
  26. package/dist/Components/SearchSelect/searchSelectNav.js +40 -0
  27. package/dist/Components/Select/SelectPopup.js +2 -1
  28. package/dist/Components/SelectSearch/SelectSearch.js +2 -1
  29. package/dist/Components/SettingRow/SettingRow.js +2 -1
  30. package/dist/Components/SettingRow/SettingsSection.js +2 -1
  31. package/dist/Components/SideBar/SecondaryBar.js +4 -3
  32. package/dist/Components/SideBar/SideBar.js +16 -13
  33. package/dist/Components/SideBar/SideBarProps.d.ts +1 -1
  34. package/dist/Components/SideBar/components/MenuItemBox.js +7 -4
  35. package/dist/Components/SideBar/components/MenuPopoverContent.js +2 -1
  36. package/dist/Components/SideBar/components/OtherApps.js +2 -1
  37. package/dist/Components/SideBar/components/PinnedSection.js +7 -4
  38. package/dist/Components/SideBar/sidebarMotion.d.ts +2 -0
  39. package/dist/Components/SideBar/sidebarMotion.js +6 -0
  40. package/dist/Components/SignInActivityTable/SignInActivityTable.js +6 -4
  41. package/dist/Components/StageProgress/StageItem.js +5 -2
  42. package/dist/Components/StageProgress/StepperStage.js +2 -2
  43. package/dist/Components/StatCard/StatCard.js +2 -1
  44. package/dist/Components/Table/Table.js +6 -2
  45. package/dist/Components/Table/components/TableActions.js +3 -2
  46. package/dist/Components/Table/filters/CompactSelect.js +2 -1
  47. package/dist/Components/Table/settings/TableSettings.js +7 -2
  48. package/dist/Components/Table/variants/classic.js +3 -2
  49. package/dist/Components/Timeline/Timeline.js +11 -4
  50. package/dist/Components/Toaster/Toaster.js +19 -8
  51. package/dist/Components/Toggle/TableToggle.js +5 -2
  52. package/dist/Components/UserDetails/AddUserModal.js +2 -1
  53. package/dist/Components/UserDetails/ChangeRoleModal.js +2 -1
  54. package/dist/Components/UserDetails/UserDetails.js +3 -1
  55. package/dist/Theme/chakra/Card.styles.d.ts +7 -1
  56. package/dist/Theme/chakra/Card.styles.js +4 -1
  57. package/dist/Theme/chakra/Menu.styles.d.ts +3 -5
  58. package/dist/Theme/chakra/Menu.styles.js +3 -0
  59. package/dist/Theme/chakra/Popover.styles.d.ts +2 -11
  60. package/dist/Theme/chakra/Popover.styles.js +2 -0
  61. package/dist/Theme/chakra/common.web.d.ts +4 -0
  62. package/dist/Theme/chakra/componentStyles.d.ts +11 -3
  63. package/dist/Theme/chakra/componentStyles.js +10 -6
  64. package/dist/Theme/chakra/motion.d.ts +1 -0
  65. package/dist/Theme/chakra/motion.js +2 -1
  66. package/dist/Theme/chakra/overlay.styles.d.ts +5 -0
  67. package/dist/Theme/chakra/overlay.styles.js +4 -1
  68. package/dist/Theme/themeProps.d.ts +4 -0
  69. package/dist/Theme/tokens/brands/index.d.ts +1 -0
  70. package/dist/Theme/tokens/brands/index.js +17 -1
  71. package/dist/Theme/tokens/brands/radiant/palette.light.js +15 -0
  72. package/dist/Theme/tokens/brands/rosewood/palette.light.js +10 -10
  73. package/dist/Theme/tokens/brands/zinc/palette.dark.d.ts +7 -29
  74. package/dist/Theme/tokens/brands/zinc/palette.dark.js +3 -35
  75. package/dist/Theme/tokens/builders/buildDarkPalette.d.ts +6 -1
  76. package/dist/Theme/tokens/builders/buildDarkPalette.js +37 -8
  77. package/dist/Theme/tokens/builders/mutedText.d.ts +1 -1
  78. package/dist/Theme/tokens/builders/mutedText.js +13 -3
  79. package/dist/Theme/tokens/builders/planeStep.d.ts +4 -0
  80. package/dist/Theme/tokens/builders/planeStep.js +20 -0
  81. package/dist/Theme/tokens/builders/planes.d.ts +4 -0
  82. package/dist/Theme/tokens/builders/planes.js +33 -0
  83. package/dist/Theme/tokens/builders/skeletonShimmer.d.ts +9 -0
  84. package/dist/Theme/tokens/builders/skeletonShimmer.js +25 -0
  85. package/dist/Theme/tokens/builders/surfaceRaised.d.ts +3 -1
  86. package/dist/Theme/tokens/builders/surfaceRaised.js +18 -8
  87. package/dist/Theme/tokens/builders/surfaceRungs.js +3 -1
  88. package/dist/Theme/tokens/primitives/index.d.ts +2 -2
  89. package/dist/Theme/tokens/primitives/index.js +4 -1
  90. package/dist/Theme/tokens/primitives/motion.d.ts +1 -0
  91. package/dist/Theme/tokens/primitives/motion.js +2 -1
  92. package/dist/Theme/tokens/primitives/shadows.d.ts +16 -0
  93. package/dist/Theme/tokens/primitives/shadows.js +56 -6
  94. package/dist/Theme/tokens/primitives/typography.js +1 -1
  95. package/dist/esm/Components/Button/Button.styles.js +54 -24
  96. package/dist/esm/Components/ConfirmDialog/ConfirmDialog.js +2 -1
  97. package/dist/esm/Components/CustomModulesTable/CustomModulesTable.js +6 -4
  98. package/dist/esm/Components/CustomModulesTable/EditModuleModal.js +2 -1
  99. package/dist/esm/Components/DatePicker/RangeDatePicker.js +2 -1
  100. package/dist/esm/Components/DatePicker/SingleDatePicker.js +2 -1
  101. package/dist/esm/Components/DatePicker/TimeOnlyPicker.js +2 -1
  102. package/dist/esm/Components/DatePicker/dayStates.js +2 -1
  103. package/dist/esm/Components/Drawer/Drawer.js +2 -1
  104. package/dist/esm/Components/Dropdown/DropDown.js +2 -1
  105. package/dist/esm/Components/FileUpload/FileUpload.js +10 -3
  106. package/dist/esm/Components/FilterSidebar/FilterSidebar.js +7 -4
  107. package/dist/esm/Components/KanbanBoard/AccountCard.js +4 -2
  108. package/dist/esm/Components/NavigationBar/NavigationBar.js +3 -2
  109. package/dist/esm/Components/Notification/Notification.js +4 -3
  110. package/dist/esm/Components/NotificationBell/NotificationPanel.js +4 -3
  111. package/dist/esm/Components/OrganizationDetails/CreateOrgModal.js +2 -1
  112. package/dist/esm/Components/OrganizationDetails/OrganizationDetails.js +5 -3
  113. package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +7 -3
  114. package/dist/esm/Components/SearchSelect/SearchSelect.js +42 -21
  115. package/dist/esm/Components/SearchSelect/searchSelectNav.js +32 -0
  116. package/dist/esm/Components/Select/SelectPopup.js +2 -1
  117. package/dist/esm/Components/SelectSearch/SelectSearch.js +2 -1
  118. package/dist/esm/Components/SettingRow/SettingRow.js +2 -1
  119. package/dist/esm/Components/SettingRow/SettingsSection.js +2 -1
  120. package/dist/esm/Components/SideBar/SecondaryBar.js +4 -3
  121. package/dist/esm/Components/SideBar/SideBar.js +17 -14
  122. package/dist/esm/Components/SideBar/components/MenuItemBox.js +7 -4
  123. package/dist/esm/Components/SideBar/components/MenuPopoverContent.js +2 -1
  124. package/dist/esm/Components/SideBar/components/OtherApps.js +2 -1
  125. package/dist/esm/Components/SideBar/components/PinnedSection.js +7 -4
  126. package/dist/esm/Components/SideBar/sidebarMotion.js +3 -0
  127. package/dist/esm/Components/SignInActivityTable/SignInActivityTable.js +6 -4
  128. package/dist/esm/Components/StageProgress/StageItem.js +5 -2
  129. package/dist/esm/Components/StageProgress/StepperStage.js +2 -2
  130. package/dist/esm/Components/StatCard/StatCard.js +2 -1
  131. package/dist/esm/Components/Table/Table.js +8 -4
  132. package/dist/esm/Components/Table/components/TableActions.js +3 -2
  133. package/dist/esm/Components/Table/filters/CompactSelect.js +2 -1
  134. package/dist/esm/Components/Table/settings/TableSettings.js +8 -3
  135. package/dist/esm/Components/Table/variants/classic.js +3 -2
  136. package/dist/esm/Components/Timeline/Timeline.js +11 -4
  137. package/dist/esm/Components/Toaster/Toaster.js +20 -9
  138. package/dist/esm/Components/Toggle/TableToggle.js +5 -2
  139. package/dist/esm/Components/UserDetails/AddUserModal.js +2 -1
  140. package/dist/esm/Components/UserDetails/ChangeRoleModal.js +2 -1
  141. package/dist/esm/Components/UserDetails/UserDetails.js +3 -1
  142. package/dist/esm/Theme/chakra/Card.styles.js +4 -1
  143. package/dist/esm/Theme/chakra/Menu.styles.js +3 -0
  144. package/dist/esm/Theme/chakra/Popover.styles.js +2 -0
  145. package/dist/esm/Theme/chakra/componentStyles.js +10 -6
  146. package/dist/esm/Theme/chakra/motion.js +1 -0
  147. package/dist/esm/Theme/chakra/overlay.styles.js +3 -0
  148. package/dist/esm/Theme/tokens/brands/index.js +16 -0
  149. package/dist/esm/Theme/tokens/brands/radiant/palette.light.js +15 -0
  150. package/dist/esm/Theme/tokens/brands/rosewood/palette.light.js +10 -10
  151. package/dist/esm/Theme/tokens/brands/zinc/palette.dark.js +3 -35
  152. package/dist/esm/Theme/tokens/builders/buildDarkPalette.js +38 -9
  153. package/dist/esm/Theme/tokens/builders/mutedText.js +12 -2
  154. package/dist/esm/Theme/tokens/builders/planeStep.js +14 -0
  155. package/dist/esm/Theme/tokens/builders/planes.js +28 -0
  156. package/dist/esm/Theme/tokens/builders/skeletonShimmer.js +21 -0
  157. package/dist/esm/Theme/tokens/builders/surfaceRaised.js +16 -7
  158. package/dist/esm/Theme/tokens/builders/surfaceRungs.js +3 -1
  159. package/dist/esm/Theme/tokens/primitives/index.js +1 -1
  160. package/dist/esm/Theme/tokens/primitives/motion.js +1 -0
  161. package/dist/esm/Theme/tokens/primitives/shadows.js +54 -5
  162. package/dist/esm/Theme/tokens/primitives/typography.js +1 -1
  163. package/dist/esm/index.js +1 -0
  164. package/dist/index.d.ts +1 -0
  165. package/dist/index.js +9 -5
  166. package/package.json +1 -1
@@ -132,6 +132,10 @@ declare const common: {
132
132
  inner: string;
133
133
  none: string;
134
134
  darkLg: string;
135
+ card: string;
136
+ float: string;
137
+ dialog: string;
138
+ sheet: string;
135
139
  };
136
140
  radii: {
137
141
  none: string;
@@ -94,10 +94,15 @@ export declare const componentStyles: {
94
94
  [x: string]: string;
95
95
  };
96
96
  };
97
+ elevated: {
98
+ container: {
99
+ [x: string]: string;
100
+ };
101
+ };
97
102
  } | undefined;
98
103
  defaultProps?: {
99
104
  size?: "sm" | "md" | "lg" | undefined;
100
- variant?: "outline" | undefined;
105
+ variant?: "elevated" | "outline" | undefined;
101
106
  colorScheme?: string | undefined;
102
107
  } | undefined;
103
108
  parts: ("header" | "container" | "body" | "footer")[];
@@ -168,7 +173,8 @@ export declare const componentStyles: {
168
173
  Menu: {
169
174
  baseStyle?: (({ theme }: StyleFunctionProps) => {
170
175
  list: {
171
- [x: string]: string;
176
+ borderRadius: "xl";
177
+ boxShadow: "md";
172
178
  bg: string;
173
179
  color: string;
174
180
  borderWidth: string;
@@ -180,6 +186,7 @@ export declare const componentStyles: {
180
186
  px: string;
181
187
  py: string;
182
188
  mx: string;
189
+ width: string;
183
190
  fontSize: string;
184
191
  borderRadius: "md";
185
192
  bg: string;
@@ -284,7 +291,8 @@ export declare const componentStyles: {
284
291
  Popover: {
285
292
  baseStyle?: (({ theme }: StyleFunctionProps) => {
286
293
  content: {
287
- [x: string]: string;
294
+ borderRadius: "xl";
295
+ boxShadow: "md";
288
296
  bg: string;
289
297
  color: string;
290
298
  borderWidth: string;
@@ -15,6 +15,7 @@ const accentText_1 = require("../tokens/builders/accentText");
15
15
  const filledSurface_1 = require("../tokens/builders/filledSurface");
16
16
  const outlineRung_1 = require("../tokens/builders/outlineRung");
17
17
  const tone_1 = require("../tokens/builders/tone");
18
+ const skeletonShimmer_1 = require("../tokens/builders/skeletonShimmer");
18
19
  const tooltipSurface_1 = require("../tokens/builders/tooltipSurface");
19
20
  const Drawer_styles_1 = require("./Drawer.styles");
20
21
  const Menu_styles_1 = require("./Menu.styles");
@@ -145,12 +146,15 @@ const $skeletonStart = (0, react_1.cssVar)("skeleton-start-color");
145
146
  const $skeletonEnd = (0, react_1.cssVar)("skeleton-end-color");
146
147
  // NOTE: fixes Chakra's Skeleton hardcoding gray.100/.400 via `_dark` (dead here) — an explicit startColor/endColor prop still wins.
147
148
  const Skeleton = {
148
- baseStyle: ({ theme }) => ({
149
- [$skeletonStart.variable]: (0, paletteFromTheme_1.paletteOf)(theme).gray[100],
150
- [$skeletonEnd.variable]: (0, paletteFromTheme_1.paletteOf)(theme).gray[300],
151
- background: $skeletonStart.reference,
152
- borderColor: $skeletonEnd.reference,
153
- }),
149
+ baseStyle: ({ theme }) => {
150
+ const shimmer = (0, skeletonShimmer_1.skeletonShimmer)((0, paletteFromTheme_1.paletteOf)(theme));
151
+ return {
152
+ [$skeletonStart.variable]: shimmer.start,
153
+ [$skeletonEnd.variable]: shimmer.end,
154
+ background: $skeletonStart.reference,
155
+ borderColor: $skeletonEnd.reference,
156
+ };
157
+ },
154
158
  };
155
159
  // NOTE: uses Chakra's own shorthand style keys (bg/w/h/pos) + !important — extendTheme deep-merges by key, so mismatched keys let Chakra's stock value win.
156
160
  const Radio = {
@@ -1,5 +1,6 @@
1
1
  import type { SystemStyleObject } from "@chakra-ui/react";
2
2
  export declare const REDUCED_MOTION_QUERY = "@media (prefers-reduced-motion: reduce)";
3
+ export declare const MOTION_OK_QUERY = "@media (prefers-reduced-motion: no-preference)";
3
4
  export declare const usePrefersReducedMotion: () => boolean;
4
5
  /** Spread into `sx`: drops transitions and animations when the user asks for less motion. */
5
6
  export declare const reducedMotionSx: (overrides?: SystemStyleObject) => SystemStyleObject;
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.reducedMotionGlobalStyles = exports.REDUCED_MOTION_SELECTOR = exports.MOTION_KEEP_CLASS = exports.reducedMotionSx = exports.usePrefersReducedMotion = exports.REDUCED_MOTION_QUERY = void 0;
3
+ exports.reducedMotionGlobalStyles = exports.REDUCED_MOTION_SELECTOR = exports.MOTION_KEEP_CLASS = exports.reducedMotionSx = exports.usePrefersReducedMotion = exports.MOTION_OK_QUERY = exports.REDUCED_MOTION_QUERY = void 0;
4
4
  const useMatchMedia_1 = require("../../Hooks/useMatchMedia");
5
5
  exports.REDUCED_MOTION_QUERY = "@media (prefers-reduced-motion: reduce)";
6
+ exports.MOTION_OK_QUERY = "@media (prefers-reduced-motion: no-preference)";
6
7
  const MEDIA = "(prefers-reduced-motion: reduce)";
7
8
  const usePrefersReducedMotion = () => (0, useMatchMedia_1.useMatchMedia)(MEDIA, false);
8
9
  exports.usePrefersReducedMotion = usePrefersReducedMotion;
@@ -1,5 +1,10 @@
1
1
  import type { PaletteProps } from "../tokens/types";
2
2
  export declare const OVERLAY_BLUR = "blur(4px)";
3
+ /** Radius and elevation every anchored popup shares: menus, popovers, selects, dropdowns. */
4
+ export declare const POPUP_SURFACE: {
5
+ readonly borderRadius: "xl";
6
+ readonly boxShadow: "md";
7
+ };
3
8
  /** The one Modal/Drawer backdrop; reuse it for any custom full-screen scrim. */
4
9
  export declare const overlayScrimStyles: (colors: Pick<PaletteProps, "black">) => {
5
10
  bg: string;
@@ -1,9 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dialogPartStyles = exports.overlayScrimStyles = exports.OVERLAY_BLUR = void 0;
3
+ exports.dialogPartStyles = exports.overlayScrimStyles = exports.POPUP_SURFACE = exports.OVERLAY_BLUR = void 0;
4
4
  const scrim_1 = require("../tokens/builders/scrim");
5
5
  const surfaceRaised_1 = require("../tokens/builders/surfaceRaised");
6
+ const radii_1 = require("../tokens/primitives/radii");
6
7
  exports.OVERLAY_BLUR = "blur(4px)";
8
+ /** Radius and elevation every anchored popup shares: menus, popovers, selects, dropdowns. */
9
+ exports.POPUP_SURFACE = { borderRadius: radii_1.RADIUS_ROLE.float, boxShadow: "md" };
7
10
  /** The one Modal/Drawer backdrop; reuse it for any custom full-screen scrim. */
8
11
  const overlayScrimStyles = (colors) => ({
9
12
  bg: (0, scrim_1.overlayScrim)(colors),
@@ -86,6 +86,10 @@ export type CustomThemeProps = {
86
86
  inner: string;
87
87
  none: string;
88
88
  darkLg: string;
89
+ card: string;
90
+ float: string;
91
+ dialog: string;
92
+ sheet: string;
89
93
  };
90
94
  radii: ChakraTheme["radii"] & {
91
95
  none: string;
@@ -17,6 +17,7 @@ import rosewoodDark from "./rosewood/palette.dark";
17
17
  import storefrontDark from "./storefront/palette.dark";
18
18
  import zincDark from "./zinc/palette.dark";
19
19
  import type { BrandPaletteSource, PaletteProps, ResolvedColorMode, ThemeName } from "../types";
20
+ export declare const LIGHT_CANVAS_STEP = 1.09;
20
21
  /** Derived, never hand-written: a copied hex goes stale the moment a canvas moves. */
21
22
  export declare const finalizeLightPalette: (source: BrandPaletteSource) => PaletteProps;
22
23
  export { lavender, meadow, radiant, skyline, slate, emerald, rosewood, storefront, zinc };
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.themeNames = exports.palettes = exports.darkPalettes = exports.lightPalettes = exports.zincDark = exports.storefrontDark = exports.rosewoodDark = exports.emeraldDark = exports.slateDark = exports.skylineDark = exports.radiantDark = exports.meadowDark = exports.lavenderDark = exports.zinc = exports.storefront = exports.rosewood = exports.emerald = exports.slate = exports.skyline = exports.radiant = exports.meadow = exports.lavender = exports.finalizeLightPalette = void 0;
6
+ exports.themeNames = exports.palettes = exports.darkPalettes = exports.lightPalettes = exports.zincDark = exports.storefrontDark = exports.rosewoodDark = exports.emeraldDark = exports.slateDark = exports.skylineDark = exports.radiantDark = exports.meadowDark = exports.lavenderDark = exports.zinc = exports.storefront = exports.rosewood = exports.emerald = exports.slate = exports.skyline = exports.radiant = exports.meadow = exports.lavender = exports.finalizeLightPalette = exports.LIGHT_CANVAS_STEP = void 0;
7
7
  const palette_light_1 = __importDefault(require("./lavender/palette.light"));
8
8
  exports.lavender = palette_light_1.default;
9
9
  const palette_light_2 = __importDefault(require("./meadow/palette.light"));
@@ -51,9 +51,25 @@ const surfaceRungs_1 = require("../builders/surfaceRungs");
51
51
  const surfaceRaised_1 = require("../builders/surfaceRaised");
52
52
  const star_1 = require("../builders/star");
53
53
  const lazy_1 = require("../builders/lazy");
54
+ const color_1 = require("../builders/color");
55
+ exports.LIGHT_CANVAS_STEP = 1.09;
56
+ const CANVAS_MIX_STEP = 0.0025;
57
+ const CANVAS_MIX_MAX = 0.5;
58
+ const lightCanvas = (canvas, card, ink) => {
59
+ for (let weight = 0; weight < CANVAS_MIX_MAX; weight += CANVAS_MIX_STEP) {
60
+ const next = (0, color_1.mix)(canvas, ink, weight);
61
+ if ((0, color_1.contrastRatio)(next, card) >= exports.LIGHT_CANVAS_STEP)
62
+ return next;
63
+ }
64
+ return (0, color_1.mix)(canvas, ink, CANVAS_MIX_MAX);
65
+ };
54
66
  /** Derived, never hand-written: a copied hex goes stale the moment a canvas moves. */
55
67
  const finalizeLightPalette = (source) => ({
56
68
  ...source,
69
+ backgroundColor: {
70
+ ...source.backgroundColor,
71
+ base: lightCanvas(source.backgroundColor.base, source.background[50], source.text[900]),
72
+ },
57
73
  sidebar: (0, sidebarAccent_1.withSidebarTokens)(source),
58
74
  accentText: (0, accentText_1.pickAccentText)(source.primary, source.backgroundColor.main),
59
75
  textMuted: (0, mutedText_1.buildMutedText)(source.text, source.backgroundColor.main),
@@ -17,8 +17,22 @@ const primary = {
17
17
  900: "#531a14",
18
18
  opacity: (0, buildBrandTokens_1.buildPrimaryOpacity)(PRIMARY_500),
19
19
  };
20
+ const danger = {
21
+ 50: "#fcedf3",
22
+ 100: "#f5c5db",
23
+ 200: "#f1a9ca",
24
+ 300: "#ec82b4",
25
+ 400: "#ea69a7",
26
+ 500: "#e74494",
27
+ 600: "#d23e87",
28
+ 700: "#a43069",
29
+ 800: "#7f2651",
30
+ 900: "#611c3e",
31
+ };
20
32
  const palette = {
21
33
  ...neutrals_1.neutralTokens,
34
+ red: danger,
35
+ semantic: { ...neutrals_1.neutralTokens.semantic, error: danger },
22
36
  ...(0, brandInk_1.buildBrandInk)(PRIMARY_500),
23
37
  // NOTE: stops retuned so white gradient-button text clears AA at both ends — original let it drop to 4.37/2.15.
24
38
  gradient: { from: "#cd4733", to: "#a36807" }, // terracotta red → amber
@@ -120,6 +134,7 @@ const palette = {
120
134
  boxShadow: {
121
135
  primary: (0, buildBrandTokens_1.buildPrimaryShadowTint)(PRIMARY_500),
122
136
  ...neutrals_1.sharedBoxShadow,
137
+ error: `${danger[500]}47`,
123
138
  },
124
139
  };
125
140
  exports.default = palette;
@@ -3,18 +3,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const neutrals_1 = require("../neutrals");
4
4
  const buildBrandTokens_1 = require("../../builders/buildBrandTokens");
5
5
  const brandInk_1 = require("../../builders/brandInk");
6
- const PRIMARY_500 = "#d16a7e"; // muted warm rose (not neon pink)
6
+ const PRIMARY_500 = "#cb6b94";
7
7
  const primary = {
8
- 50: "#fdf2f5",
9
- 100: "#f9d6de",
10
- 200: "#f2aaba",
11
- 300: "#ea7f96",
12
- 400: "#de627d",
8
+ 50: "#fcf2f7",
9
+ 100: "#f6d6e5",
10
+ 200: "#edabc9",
11
+ 300: "#e480ad",
12
+ 400: "#d76398",
13
13
  500: PRIMARY_500,
14
- 600: "#b9556b",
15
- 700: "#984558",
16
- 800: "#763646",
17
- 900: "#552634",
14
+ 600: "#b35681",
15
+ 700: "#93466a",
16
+ 800: "#723754",
17
+ 900: "#52273e",
18
18
  opacity: (0, buildBrandTokens_1.buildPrimaryOpacity)(PRIMARY_500),
19
19
  };
20
20
  const palette = {
@@ -66,18 +66,6 @@ declare const palette: {
66
66
  800: string;
67
67
  900: string;
68
68
  };
69
- background: {
70
- 50: string;
71
- 100: string;
72
- 200: string;
73
- 300: string;
74
- 400: string;
75
- 500: string;
76
- 600: string;
77
- 700: string;
78
- 800: string;
79
- 900: string;
80
- };
81
69
  text: {
82
70
  50: string;
83
71
  100: string;
@@ -103,9 +91,6 @@ declare const palette: {
103
91
  900: string;
104
92
  };
105
93
  gray: {
106
- 50: string;
107
- 100: string;
108
- 200: string;
109
94
  300: string;
110
95
  400: string;
111
96
  500: string;
@@ -113,6 +98,9 @@ declare const palette: {
113
98
  700: string;
114
99
  800: string;
115
100
  900: string;
101
+ 50: string;
102
+ 100: string;
103
+ 200: string;
116
104
  };
117
105
  border: {
118
106
  50: string;
@@ -162,20 +150,6 @@ declare const palette: {
162
150
  800: string;
163
151
  900: string;
164
152
  };
165
- table: {
166
- hover: {
167
- 50: string;
168
- 100: string;
169
- 200: string;
170
- 300: string;
171
- 400: string;
172
- 500: string;
173
- 600: string;
174
- 700: string;
175
- 800: string;
176
- 900: string;
177
- };
178
- };
179
153
  accentText: string;
180
154
  onPrimary: string;
181
155
  boxShadow: {
@@ -197,8 +171,12 @@ declare const palette: {
197
171
  purple: import("../..").ColorScale;
198
172
  pink: import("../..").ColorScale;
199
173
  backgroundColor: import("../..").NamedSurfaces;
174
+ background: import("../..").ColorScale;
200
175
  focusRing: import("../..").FocusRingTokens;
201
176
  sidebar: import("../..").SidebarTokens;
177
+ table: {
178
+ hover: import("../..").ColorScale;
179
+ };
202
180
  semanticText: import("../..").SemanticTextTokens;
203
181
  textMuted: string;
204
182
  onSemantic: import("../..").SemanticTextTokens;
@@ -38,19 +38,6 @@ const secondary = {
38
38
  900: "#fafafa",
39
39
  opacity: (0, buildBrandTokens_1.buildPrimaryOpacity)(SECONDARY_500),
40
40
  };
41
- // background[50] = the elevated surface (#0e0e11), resolved through a token, not a literal.
42
- const background = {
43
- 50: "#0e0e11",
44
- 100: "#131316",
45
- 200: "#18181b",
46
- 300: "#212124",
47
- 400: "#27272a",
48
- 500: "#3f3f46",
49
- 600: "#52525b",
50
- 700: "#71717a",
51
- 800: "#a1a1aa",
52
- 900: "#d4d4d8",
53
- };
54
41
  const text = {
55
42
  50: "#71717a",
56
43
  100: "#8a8a93",
@@ -76,10 +63,7 @@ const header = {
76
63
  900: "#ffffff",
77
64
  };
78
65
  // 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).
79
- const gray = {
80
- 50: "#18181b",
81
- 100: "#27272a",
82
- 200: "#3f3f46",
66
+ const grayInk = {
83
67
  300: "#52525b",
84
68
  400: "#7a7a83",
85
69
  500: "#a1a1aa",
@@ -137,20 +121,6 @@ const disabled = {
137
121
  800: "#a1a1aa",
138
122
  900: "#d4d4d8",
139
123
  };
140
- const table = {
141
- hover: {
142
- 50: "#0e0e11",
143
- 100: "#131316",
144
- 200: "#18181b",
145
- 300: "#1f1f22",
146
- 400: "#27272a",
147
- 500: "#2f2f33",
148
- 600: "#3f3f46",
149
- 700: "#52525b",
150
- 800: "#71717a",
151
- 900: "#a1a1aa",
152
- },
153
- };
154
124
  const buildPalette = () => {
155
125
  const derived = (0, buildDarkPalette_1.buildDarkPalette)(palette_light_1.default);
156
126
  return {
@@ -159,16 +129,14 @@ const buildPalette = () => {
159
129
  primary,
160
130
  secondary,
161
131
  tertiary: { ...(0, brandInk_1.rotateScaleHue)(secondary), opacity: secondary.opacity },
162
- // NOTE: backgroundColor/sidebar fall through to `...derived` — mobile's literals collapse distinct elevation steps, breaking darkSurfaces.test.ts.
163
- background,
132
+ // NOTE: the planes (backgroundColor, background, table, gray fills) stay derived — they rise with the card.
164
133
  text,
165
134
  header,
166
- gray,
135
+ gray: { ...derived.gray, ...grayInk },
167
136
  border,
168
137
  boxborder,
169
138
  placeholder,
170
139
  disabled,
171
- table,
172
140
  accentText: (0, accentText_1.pickAccentText)(primary, derived.backgroundColor.main),
173
141
  onPrimary: (0, accentText_1.onFilled)(PRIMARY_500, derived.white, derived.black),
174
142
  boxShadow: {
@@ -6,5 +6,10 @@ export declare const shiftLighter: (scale: ColorScale) => ColorScale;
6
6
  export declare const accentLightnessDelta: (accent500: string, white: string) => number;
7
7
  /** Raises every rung by the same lightness delta, preserving the ramp's shape and hue. */
8
8
  export declare const liftScale: (scale: ColorScale, delta: number) => ColorScale;
9
- export declare function buildDarkPalette(light: BrandPaletteSource): PaletteProps;
9
+ /** `lifted`: brand-tinted canvas, card a CARD_LIFT step above it. `flat`: the hue-neutral canvas the card shares. */
10
+ export type DarkPlanes = "lifted" | "flat";
11
+ export interface DarkPaletteOptions {
12
+ planes?: DarkPlanes;
13
+ }
14
+ export declare function buildDarkPalette(light: BrandPaletteSource, { planes }?: DarkPaletteOptions): PaletteProps;
10
15
  export default buildDarkPalette;
@@ -11,6 +11,7 @@ const semanticText_1 = require("./semanticText");
11
11
  const focusRing_1 = require("./focusRing");
12
12
  const surfaceRaised_1 = require("./surfaceRaised");
13
13
  const star_1 = require("./star");
14
+ const planes_1 = require("./planes");
14
15
  // Structural ramps are rebuilt at explicit targets (not reversed — light ramps bottom near 35%);
15
16
  // utility hues are reversed so index roles survive; brand/semantic ramps shift one step lighter.
16
17
  const SCALE_KEYS = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900];
@@ -150,23 +151,49 @@ const NAMED_SURFACE_L = {
150
151
  accent: 17,
151
152
  muted: 18,
152
153
  };
153
- // NOTE: surfaces are hue-neutral in dark (a tint wash reads as a different product per brand); accent lives in primary/semantic/text.
154
- const SURFACE_SAT = 0;
154
+ const SURFACE_SAT = { lifted: 14, flat: 0 };
155
155
  const TEXT_SAT = 12;
156
156
  const PLACEHOLDER_SAT = 10;
157
157
  const BORDER_SAT = 12;
158
158
  const DISABLED_SAT = 8;
159
159
  const GRAY_SAT = 0;
160
- function buildDarkPalette(light) {
160
+ // Fill rungs drawn ON a card keep their step above it, so they rise with the card; ink and chrome rungs stay.
161
+ const BACKGROUND_FILLS = [100, 200, 300, 400, 500];
162
+ // 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.
163
+ const TABLE_HOVER_ABOVE_CARD = {
164
+ 50: 1, 100: 3, 200: 5, 300: 6, 400: 6.5, 500: 7,
165
+ };
166
+ const GRAY_FILLS = [50, 100, 200];
167
+ const raise = (targets, rungs, by) => ({
168
+ ...targets,
169
+ ...Object.fromEntries(rungs.map((k) => [k, targets[k] + by])),
170
+ });
171
+ const cardPlane = (canvas, white, planes) => {
172
+ if (planes === "flat")
173
+ return { card: canvas, rise: 0, tableHover: TABLE_HOVER_TARGETS };
174
+ const card = (0, planes_1.lift)(white, canvas, planes_1.CARD_LIFT);
175
+ const cardL = (0, color_1.hexToHsl)(card).l;
176
+ const tableHover = {
177
+ ...TABLE_HOVER_TARGETS,
178
+ ...Object.fromEntries(Object.entries(TABLE_HOVER_ABOVE_CARD).map(([k, step]) => [k, cardL + step])),
179
+ };
180
+ return { card, rise: cardL - (0, color_1.hexToHsl)(canvas).l, tableHover };
181
+ };
182
+ function buildDarkPalette(light, { planes = "lifted" } = {}) {
161
183
  const hueSource = light.primary[500];
162
184
  const { h } = (0, color_1.hexToHsl)(hueSource);
185
+ const surfaceSat = SURFACE_SAT[planes];
163
186
  const namedSurfaces = Object.fromEntries(Object.entries(NAMED_SURFACE_L).map(([key, l]) => [
164
187
  key,
165
- (0, color_1.hslToHex)({ h, s: SURFACE_SAT, l }),
188
+ (0, color_1.hslToHex)({ h, s: surfaceSat, l }),
166
189
  ]));
167
190
  const white = light.white;
191
+ const { card, rise, tableHover } = cardPlane(namedSurfaces.main, white, planes);
168
192
  const primary = liftBrand(light.primary, white);
169
- const background = fromTargets(hueSource, SURFACE_TARGETS, SURFACE_SAT);
193
+ const background = {
194
+ ...fromTargets(hueSource, raise(SURFACE_TARGETS, BACKGROUND_FILLS, rise), surfaceSat),
195
+ 50: card,
196
+ };
170
197
  const semantic = {
171
198
  success: liftAccent(light.semantic.success, white),
172
199
  error: liftAccent(light.semantic.error, white),
@@ -186,7 +213,7 @@ function buildDarkPalette(light) {
186
213
  transparent: light.transparent,
187
214
  black: light.black,
188
215
  white: light.white,
189
- gray: fromTargets(hueSource, GRAY_TARGETS, GRAY_SAT),
216
+ gray: fromTargets(hueSource, raise(GRAY_TARGETS, GRAY_FILLS, rise), GRAY_SAT),
190
217
  red: (0, exports.reverseScale)(light.red),
191
218
  orange: (0, exports.reverseScale)(light.orange),
192
219
  yellow: (0, exports.reverseScale)(light.yellow),
@@ -203,7 +230,9 @@ function buildDarkPalette(light) {
203
230
  placeholder: fromTargets(hueSource, PLACEHOLDER_TARGETS, PLACEHOLDER_SAT),
204
231
  border: dividerRamp,
205
232
  boxborder: dividerRamp,
206
- table: { hover: fromTargets(hueSource, TABLE_HOVER_TARGETS, SURFACE_SAT) },
233
+ table: {
234
+ hover: fromTargets(hueSource, tableHover, surfaceSat),
235
+ },
207
236
  disabled: fromTargets(hueSource, DISABLED_TARGETS, DISABLED_SAT),
208
237
  accentText: (0, accentText_1.pickAccentText)(primary, namedSurfaces.main),
209
238
  textMuted: (0, mutedText_1.buildMutedText)(fromTargets(hueSource, TEXT_TARGETS, TEXT_SAT), namedSurfaces.main),
@@ -211,7 +240,7 @@ function buildDarkPalette(light) {
211
240
  onPrimary: (0, accentText_1.onFilled)(primary[500], light.white, light.black),
212
241
  onSemantic: (0, semanticText_1.buildOnSemantic)(semantic, light.white, light.black),
213
242
  focusRing: (0, focusRing_1.buildFocusRing)({ primary, background, backgroundColor: namedSurfaces }),
214
- surfaceRaised: (0, surfaceRaised_1.buildSurfaceRaised)({ backgroundColor: namedSurfaces, background, white }),
243
+ surfaceRaised: (0, surfaceRaised_1.buildSurfaceRaised)({ backgroundColor: namedSurfaces, background, white }, (0, surfaceRaised_1.filledMarks)({ primary, semantic })),
215
244
  star: (0, star_1.buildStar)(namedSurfaces.main),
216
245
  sidebar: (0, sidebarAccent_1.withSidebarTokens)(light),
217
246
  boxShadow: {
@@ -1,5 +1,5 @@
1
1
  import type { ColorScale } from "../types";
2
2
  /** WCAG 1.4.3 — muted is still body text. */
3
3
  export declare const AA_NORMAL_TEXT = 4.5;
4
- /** Seeded from the ramp's muted rung so brand tint survives, then lifted until it clears AA. */
4
+ export declare const MUTED_TEXT_CEILING = 8;
5
5
  export declare const buildMutedText: (text: ColorScale, canvas: string) => string;
@@ -1,9 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.buildMutedText = exports.AA_NORMAL_TEXT = void 0;
3
+ exports.buildMutedText = exports.MUTED_TEXT_CEILING = exports.AA_NORMAL_TEXT = void 0;
4
+ const color_1 = require("./color");
4
5
  const outlineRung_1 = require("./outlineRung");
5
6
  /** WCAG 1.4.3 — muted is still body text. */
6
7
  exports.AA_NORMAL_TEXT = 4.5;
7
- /** Seeded from the ramp's muted rung so brand tint survives, then lifted until it clears AA. */
8
- const buildMutedText = (text, canvas) => (0, outlineRung_1.liftToContrast)(text[400], canvas, exports.AA_NORMAL_TEXT);
8
+ exports.MUTED_TEXT_CEILING = 8;
9
+ const settleUnder = (hex, canvas, ceiling) => {
10
+ const { s, l } = (0, color_1.hexToHsl)(hex);
11
+ const toward = (0, color_1.relativeLuminance)(canvas) < 0.5 ? -1 : 1;
12
+ let settled = hex;
13
+ for (let next = l; (0, color_1.contrastRatio)(settled, canvas) > ceiling; next += toward) {
14
+ settled = (0, color_1.withLightness)(hex, next, s);
15
+ }
16
+ return settled;
17
+ };
18
+ const buildMutedText = (text, canvas) => (0, outlineRung_1.liftToContrast)(settleUnder(text[400], canvas, exports.MUTED_TEXT_CEILING), canvas, exports.AA_NORMAL_TEXT);
9
19
  exports.buildMutedText = buildMutedText;
@@ -0,0 +1,4 @@
1
+ import type { PaletteProps } from "../types";
2
+ export declare const bandOn: (fill: string, plane: string) => string;
3
+ export declare const recessOn: (fill: string, plane: string) => string;
4
+ export declare const cardRule: (colors: Pick<PaletteProps, "boxborder" | "background">) => string;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.cardRule = exports.recessOn = exports.bandOn = void 0;
4
+ const accentText_1 = require("./accentText");
5
+ const color_1 = require("./color");
6
+ const outlineRung_1 = require("./outlineRung");
7
+ const planes_1 = require("./planes");
8
+ const holds = (fill, plane, target) => !(0, accentText_1.isDarkCanvas)(plane) || (0, color_1.contrastRatio)(fill, plane) >= target;
9
+ const bandOn = (fill, plane) => holds(fill, plane, outlineRung_1.MIN_PERCEPTIBLE_STEP) ? fill : (0, outlineRung_1.tintStep)(fill, plane, outlineRung_1.MIN_PERCEPTIBLE_STEP);
10
+ exports.bandOn = bandOn;
11
+ const recessOn = (fill, plane) => holds(fill, plane, outlineRung_1.MIN_PERCEPTIBLE_STEP)
12
+ ? fill
13
+ : (0, planes_1.lift)(accentText_1.DEFAULT_BLACK, plane, outlineRung_1.MIN_PERCEPTIBLE_STEP);
14
+ exports.recessOn = recessOn;
15
+ const cardRule = (colors) => {
16
+ const rule = colors.boxborder[200];
17
+ const card = colors.background[50];
18
+ return holds(rule, card, outlineRung_1.CHROME_RULE) ? rule : (0, outlineRung_1.liftToContrast)(rule, card, outlineRung_1.CHROME_RULE);
19
+ };
20
+ exports.cardRule = cardRule;
@@ -0,0 +1,4 @@
1
+ export declare const CARD_LIFT = 1.16;
2
+ export declare const RAISED_LIFT = 1.15;
3
+ export declare function lift(ink: string, base: string, target: number): string;
4
+ export declare function liftUnder(ink: string, base: string, target: number, marks: readonly string[]): string;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RAISED_LIFT = exports.CARD_LIFT = void 0;
4
+ exports.lift = lift;
5
+ exports.liftUnder = liftUnder;
6
+ const color_1 = require("./color");
7
+ const outlineRung_1 = require("./outlineRung");
8
+ exports.CARD_LIFT = 1.16;
9
+ exports.RAISED_LIFT = 1.15;
10
+ const STEP = 0.005;
11
+ const MAX_WEIGHT = 0.4;
12
+ function lift(ink, base, target) {
13
+ for (let t = STEP * 4; t < MAX_WEIGHT; t += STEP) {
14
+ const next = (0, color_1.mix)(base, ink, t);
15
+ if ((0, color_1.contrastRatio)(next, base) >= target)
16
+ return next;
17
+ }
18
+ return (0, color_1.mix)(base, ink, MAX_WEIGHT);
19
+ }
20
+ const clearsMarks = (surface, marks) => marks.every((mark) => (0, color_1.contrastRatio)(mark, surface) >= outlineRung_1.AA_NON_TEXT);
21
+ // NOTE: stops one step early rather than drop a filled mark under 3:1 on the lifted plane.
22
+ function liftUnder(ink, base, target, marks) {
23
+ let settled = base;
24
+ for (let t = STEP * 4; t < MAX_WEIGHT; t += STEP) {
25
+ const next = (0, color_1.mix)(base, ink, t);
26
+ if (!clearsMarks(next, marks))
27
+ return settled;
28
+ if ((0, color_1.contrastRatio)(next, base) >= target)
29
+ return next;
30
+ settled = next;
31
+ }
32
+ return settled;
33
+ }
@@ -0,0 +1,9 @@
1
+ import type { PaletteProps } from "../types";
2
+ /** Same pulse depth as the mobile library's `SKELETON_SHIMMER_CONTRAST`. */
3
+ export declare const SKELETON_SHIMMER_CONTRAST = 1.35;
4
+ export interface SkeletonShimmer {
5
+ start: string;
6
+ end: string;
7
+ }
8
+ /** The two colours a Skeleton pulses between: `gray[100]`, and `gray[300]`'s tint settled to the amplitude. */
9
+ export declare const skeletonShimmer: (palette: PaletteProps) => SkeletonShimmer;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.skeletonShimmer = exports.SKELETON_SHIMMER_CONTRAST = void 0;
4
+ const color_1 = require("./color");
5
+ /** Same pulse depth as the mobile library's `SKELETON_SHIMMER_CONTRAST`. */
6
+ exports.SKELETON_SHIMMER_CONTRAST = 1.35;
7
+ const settleAway = (seed, base, target) => {
8
+ const { s } = (0, color_1.hexToHsl)(seed);
9
+ let near = (0, color_1.hexToHsl)(base).l;
10
+ let far = (0, color_1.relativeLuminance)(base) < 0.5 ? 100 : 0;
11
+ for (let i = 0; i < 20; i += 1) {
12
+ const mid = (near + far) / 2;
13
+ if ((0, color_1.contrastRatio)((0, color_1.withLightness)(seed, mid, s), base) < target)
14
+ near = mid;
15
+ else
16
+ far = mid;
17
+ }
18
+ return (0, color_1.withLightness)(seed, far, s);
19
+ };
20
+ /** The two colours a Skeleton pulses between: `gray[100]`, and `gray[300]`'s tint settled to the amplitude. */
21
+ const skeletonShimmer = (palette) => ({
22
+ start: palette.gray[100],
23
+ end: settleAway(palette.gray[300], palette.gray[100], exports.SKELETON_SHIMMER_CONTRAST),
24
+ });
25
+ exports.skeletonShimmer = skeletonShimmer;
@@ -1,6 +1,8 @@
1
1
  import type { PaletteProps } from "../types";
2
2
  export declare const RAISED_OVERLAY = 0.07;
3
3
  export type SurfaceRaisedSource = Pick<PaletteProps, "backgroundColor" | "background" | "white">;
4
- export declare const buildSurfaceRaised: (source: SurfaceRaisedSource) => string;
4
+ /** The filled fills a raised plane must keep at 3:1, or a button on a menu stops reading. */
5
+ export declare const filledMarks: (colors: Pick<PaletteProps, "primary" | "semantic">) => string[];
6
+ export declare const buildSurfaceRaised: (source: SurfaceRaisedSource, marks?: readonly string[]) => string;
5
7
  export declare const withSurfaceRaised: (palette: PaletteProps) => PaletteProps;
6
8
  export declare const raisedRule: (colors: Pick<PaletteProps, "boxborder" | "background" | "surfaceRaised">) => string;