pixelize-design-library 2.4.2-beta.1 → 2.4.2-beta.3
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.
- package/dist/Components/Header/HeaderActions.d.ts +3 -1
- package/dist/Components/Header/HeaderActions.js +7 -3
- package/dist/Components/PlanPill/PlanPill.js +1 -1
- package/dist/Theme/chakra/Menu.styles.d.ts +6 -6
- package/dist/Theme/chakra/Menu.styles.js +6 -5
- package/dist/Theme/chakra/Popover.styles.d.ts +3 -3
- package/dist/Theme/chakra/Popover.styles.js +7 -6
- package/dist/Theme/chakra/Switch.styles.d.ts +1 -1
- package/dist/Theme/chakra/Switch.styles.js +7 -9
- package/dist/Theme/chakra/componentStyles.d.ts +9 -9
- package/dist/Theme/provider/PixelizeThemeProvider.js +18 -20
- package/dist/Theme/provider/ThemeSwitcher.js +10 -20
- package/dist/Theme/tokens/brands/emerald/palette.light.js +5 -7
- package/dist/Theme/tokens/brands/lavender/palette.light.js +5 -116
- package/dist/Theme/tokens/brands/meadow/palette.light.js +5 -7
- package/dist/Theme/tokens/brands/neutrals.d.ts +8 -0
- package/dist/Theme/tokens/brands/neutrals.js +119 -0
- package/dist/Theme/tokens/brands/radiant/palette.light.js +5 -7
- package/dist/Theme/tokens/brands/rosewood/palette.light.js +5 -7
- package/dist/Theme/tokens/brands/skyline/palette.light.js +5 -7
- package/dist/Theme/tokens/brands/slate/palette.light.js +6 -12
- package/dist/Theme/tokens/brands/storefront/palette.light.js +5 -7
- package/dist/Theme/tokens/builders/brandInk.d.ts +11 -0
- package/dist/Theme/tokens/builders/brandInk.js +106 -0
- package/dist/Theme/tokens/types.d.ts +5 -0
- package/dist/esm/Components/Header/HeaderActions.js +8 -4
- package/dist/esm/Components/PlanPill/PlanPill.js +2 -2
- package/dist/esm/Theme/chakra/Menu.styles.js +6 -5
- package/dist/esm/Theme/chakra/Popover.styles.js +7 -6
- package/dist/esm/Theme/chakra/Switch.styles.js +7 -9
- package/dist/esm/Theme/provider/PixelizeThemeProvider.js +18 -20
- package/dist/esm/Theme/provider/ThemeSwitcher.js +10 -20
- package/dist/esm/Theme/tokens/brands/emerald/palette.light.js +5 -4
- package/dist/esm/Theme/tokens/brands/lavender/palette.light.js +5 -116
- package/dist/esm/Theme/tokens/brands/meadow/palette.light.js +5 -4
- package/dist/esm/Theme/tokens/brands/neutrals.js +116 -0
- package/dist/esm/Theme/tokens/brands/radiant/palette.light.js +5 -4
- package/dist/esm/Theme/tokens/brands/rosewood/palette.light.js +5 -4
- package/dist/esm/Theme/tokens/brands/skyline/palette.light.js +5 -4
- package/dist/esm/Theme/tokens/brands/slate/palette.light.js +6 -9
- package/dist/esm/Theme/tokens/brands/storefront/palette.light.js +5 -4
- package/dist/esm/Theme/tokens/builders/brandInk.js +103 -0
- package/package.json +1 -1
|
@@ -22,33 +22,23 @@ const toBrandLabel = (brand) => brand.charAt(0).toUpperCase() + brand.slice(1);
|
|
|
22
22
|
* the dot always matches what selecting that brand actually looks like,
|
|
23
23
|
* regardless of which brand/mode is currently active.
|
|
24
24
|
*/
|
|
25
|
-
const brandSwatchColor = (brand) =>
|
|
26
|
-
var _a, _b, _c, _d, _e;
|
|
27
|
-
return (_e = (_d = (_c = (_b = (_a = brandThemes[brand]) === null || _a === void 0 ? void 0 : _a.light) === null || _b === void 0 ? void 0 : _b.colors) === null || _c === void 0 ? void 0 : _c.primary) === null || _d === void 0 ? void 0 : _d[500]) !== null && _e !== void 0 ? _e : "gray.400";
|
|
28
|
-
};
|
|
25
|
+
const brandSwatchColor = (brand) => brandThemes[brand].light.colors.primary[500];
|
|
29
26
|
const BrandSwatch = ({ brand }) => (_jsx(Box, { as: "span", display: "inline-block", w: "0.625rem", h: "0.625rem", borderRadius: "full", bg: brandSwatchColor(brand), border: "1px solid", borderColor: "whiteAlpha.300", flexShrink: 0 }));
|
|
30
27
|
/**
|
|
31
28
|
* Palette values already differ per color mode (`brandThemes[brand].light|dark`), so tokens
|
|
32
29
|
* are read straight from the active theme — no `useColorModeValue` pairing needed here.
|
|
33
|
-
* Fallbacks are Chakra token names, never literal colors, for themes without a brand palette.
|
|
34
30
|
*/
|
|
35
31
|
const useSwitcherColors = () => {
|
|
36
|
-
|
|
37
|
-
const colors = useCustomTheme().colors;
|
|
32
|
+
const { colors } = useCustomTheme();
|
|
38
33
|
return {
|
|
39
|
-
trackBg:
|
|
40
|
-
activeBg:
|
|
41
|
-
activeColor:
|
|
42
|
-
mutedColor:
|
|
43
|
-
hoverBg:
|
|
44
|
-
borderColor:
|
|
45
|
-
//
|
|
46
|
-
|
|
47
|
-
// Re-deriving it here too and pushing it back via `sx` on every render caused a redundant
|
|
48
|
-
// Emotion style recompute per render, which showed up as flicker while hovering/scrolling
|
|
49
|
-
// this list. Keep menuColor (Menu.styles.ts doesn't set list `color` per this component's
|
|
50
|
-
// needs) but stop duplicating menuBg.
|
|
51
|
-
menuColor: (_0 = (_y = (_x = colors === null || colors === void 0 ? void 0 : colors.text) === null || _x === void 0 ? void 0 : _x[900]) !== null && _y !== void 0 ? _y : (_z = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _z === void 0 ? void 0 : _z[900]) !== null && _0 !== void 0 ? _0 : "gray.900",
|
|
34
|
+
trackBg: colors.backgroundColor.secondary,
|
|
35
|
+
activeBg: colors.backgroundColor.main,
|
|
36
|
+
activeColor: colors.primary[500],
|
|
37
|
+
mutedColor: colors.text[600],
|
|
38
|
+
hoverBg: colors.gray[100],
|
|
39
|
+
borderColor: colors.border[200],
|
|
40
|
+
// NOTE: menuBg lives in Menu.styles.ts — re-pushing it via `sx` flickers on every render.
|
|
41
|
+
menuColor: colors.text[900],
|
|
52
42
|
};
|
|
53
43
|
};
|
|
54
44
|
const BrandMenu = ({ size }) => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { neutralTokens, sharedBoxShadow } from "../neutrals.js";
|
|
2
2
|
import { buildPrimaryOpacity, buildPrimaryShadowTint } from "../../builders/buildBrandTokens.js";
|
|
3
|
+
import { buildBrandInk } from "../../builders/brandInk.js";
|
|
3
4
|
const PRIMARY_500 = "#0f9d8a"; // teal-emerald core (balanced, not too green/blue)
|
|
4
5
|
const primary = {
|
|
5
6
|
50: "#e6f7f5",
|
|
@@ -15,7 +16,8 @@ const primary = {
|
|
|
15
16
|
opacity: buildPrimaryOpacity(PRIMARY_500),
|
|
16
17
|
};
|
|
17
18
|
const palette = {
|
|
18
|
-
...
|
|
19
|
+
...neutralTokens,
|
|
20
|
+
...buildBrandInk(PRIMARY_500),
|
|
19
21
|
// Stops retuned so white gradient-button text (onGradient, accentText.ts) clears AA at both
|
|
20
22
|
// ends — the original pair let white drop to 3.38/2.43 against from/to. Same hue, darker.
|
|
21
23
|
// Both nudged one step further (4.537/4.515 -> 4.618/4.616): the first pass cleared AA by
|
|
@@ -123,8 +125,7 @@ const palette = {
|
|
|
123
125
|
},
|
|
124
126
|
boxShadow: {
|
|
125
127
|
primary: buildPrimaryShadowTint(PRIMARY_500),
|
|
126
|
-
|
|
127
|
-
default: lavenderPalette.boxShadow.default,
|
|
128
|
+
...sharedBoxShadow,
|
|
128
129
|
},
|
|
129
130
|
};
|
|
130
131
|
export default palette;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { buildPrimaryOpacity, buildPrimaryShadowTint } from "../../builders/buildBrandTokens.js";
|
|
2
|
+
import { neutralTokens, sharedBoxShadow } from "../neutrals.js";
|
|
2
3
|
const PRIMARY_500 = "#8B3FC8";
|
|
3
4
|
const SECONDARY_ANCHOR = "#1e0f30";
|
|
4
5
|
const primary = {
|
|
@@ -28,56 +29,6 @@ const secondary = {
|
|
|
28
29
|
opacity: buildPrimaryOpacity(SECONDARY_ANCHOR),
|
|
29
30
|
};
|
|
30
31
|
const tertiary = { ...secondary };
|
|
31
|
-
const semantic = {
|
|
32
|
-
success: {
|
|
33
|
-
50: "#e9f8ef",
|
|
34
|
-
100: "#bbe9cc",
|
|
35
|
-
200: "#9adeb4",
|
|
36
|
-
300: "#6ccf92",
|
|
37
|
-
400: "#4fc67d",
|
|
38
|
-
500: "#23b85c",
|
|
39
|
-
600: "#20a754",
|
|
40
|
-
700: "#198341",
|
|
41
|
-
800: "#136533",
|
|
42
|
-
900: "#0f4d27",
|
|
43
|
-
},
|
|
44
|
-
error: {
|
|
45
|
-
50: "#feedeb",
|
|
46
|
-
100: "#fbc6c2",
|
|
47
|
-
200: "#f9aaa4",
|
|
48
|
-
300: "#f6837b",
|
|
49
|
-
400: "#f56b61",
|
|
50
|
-
500: "#f2463a",
|
|
51
|
-
600: "#dc4035",
|
|
52
|
-
700: "#ac3229",
|
|
53
|
-
800: "#852720",
|
|
54
|
-
900: "#661d18",
|
|
55
|
-
},
|
|
56
|
-
warning: {
|
|
57
|
-
50: "#fff4ef",
|
|
58
|
-
100: "#ffddce",
|
|
59
|
-
200: "#ffccb7",
|
|
60
|
-
300: "#ffb596",
|
|
61
|
-
400: "#ffa781",
|
|
62
|
-
500: "#ff9162",
|
|
63
|
-
600: "#e88459",
|
|
64
|
-
700: "#b56746",
|
|
65
|
-
800: "#8c5036",
|
|
66
|
-
900: "#6b3d29",
|
|
67
|
-
},
|
|
68
|
-
info: {
|
|
69
|
-
50: "#eff9fc",
|
|
70
|
-
100: "#cdedf5",
|
|
71
|
-
200: "#b5e4f0",
|
|
72
|
-
300: "#94d7e9",
|
|
73
|
-
400: "#7fd0e5",
|
|
74
|
-
500: "#5fc4de",
|
|
75
|
-
600: "#56b2ea",
|
|
76
|
-
700: "#438b9e",
|
|
77
|
-
800: "#346c78",
|
|
78
|
-
900: "#28525d",
|
|
79
|
-
},
|
|
80
|
-
};
|
|
81
32
|
const gray = {
|
|
82
33
|
50: "#f9f7fb",
|
|
83
34
|
100: "#f0eaf6",
|
|
@@ -98,51 +49,6 @@ const gray = {
|
|
|
98
49
|
};
|
|
99
50
|
// These global color scales stay unchanged — they are
|
|
100
51
|
// utility palettes, not theme-specific
|
|
101
|
-
const red = {
|
|
102
|
-
50: "#feedeb", 100: "#fbc6c2", 200: "#f9aaa4", 300: "#f6837b",
|
|
103
|
-
400: "#f56b61", 500: "#f2463a", 600: "#dc4035", 700: "#ac3229",
|
|
104
|
-
800: "#852720", 900: "#661d18",
|
|
105
|
-
};
|
|
106
|
-
const orange = {
|
|
107
|
-
50: "#fff4ef", 100: "#ffddce", 200: "#ffccb7", 300: "#ffb596",
|
|
108
|
-
400: "#ffa781", 500: "#ff9162", 600: "#e88459", 700: "#b56746",
|
|
109
|
-
800: "#8c5036", 900: "#6b3d29",
|
|
110
|
-
};
|
|
111
|
-
const yellow = {
|
|
112
|
-
50: "#fefbec", 100: "#fdf1c5", 200: "#fbeba9", 300: "#fae281",
|
|
113
|
-
400: "#f9dc69", 500: "#f7d343", 600: "#e1c03d", 700: "#af9630",
|
|
114
|
-
800: "#887425", 900: "#68591c",
|
|
115
|
-
};
|
|
116
|
-
const green = {
|
|
117
|
-
50: "#e9f8ef", 100: "#bbe9cc", 200: "#9adeb4", 300: "#6ccf92",
|
|
118
|
-
400: "#4fc67d", 500: "#23b85c", 600: "#20a754", 700: "#198341",
|
|
119
|
-
800: "#136533", 900: "#0f4d27",
|
|
120
|
-
};
|
|
121
|
-
const teal = {
|
|
122
|
-
50: "#eff9fc", 100: "#cdedf5", 200: "#b5e4f0", 300: "#94d7e9",
|
|
123
|
-
400: "#7fd0e5", 500: "#5fc4de", 600: "#56b2ea", 700: "#438b9e",
|
|
124
|
-
800: "#346c78", 900: "#28525d",
|
|
125
|
-
};
|
|
126
|
-
const blue = {
|
|
127
|
-
50: "#ebf8ff", 100: "#bee3f8", 200: "#90cdf4", 300: "#63b3ed",
|
|
128
|
-
400: "#4299e1", 500: "#3182ce", 600: "#2b6cb0", 700: "#2c5282",
|
|
129
|
-
800: "#2a4365", 900: "#1a365d",
|
|
130
|
-
};
|
|
131
|
-
const cyan = {
|
|
132
|
-
50: "#edfdfd", 100: "#c4f1f9", 200: "#9decf9", 300: "#76e4f7",
|
|
133
|
-
400: "#0bc5ea", 500: "#00b5d8", 600: "#00a3c4", 700: "#0987a0",
|
|
134
|
-
800: "#086f83", 900: "#065666",
|
|
135
|
-
};
|
|
136
|
-
const purple = {
|
|
137
|
-
50: "#faf5ff", 100: "#e9d8fd", 200: "#d6bcfa", 300: "#b794f4",
|
|
138
|
-
400: "#9f7aea", 500: "#805ad5", 600: "#6b46c1", 700: "#553c9a",
|
|
139
|
-
800: "#44337a", 900: "#322659",
|
|
140
|
-
};
|
|
141
|
-
const pink = {
|
|
142
|
-
50: "#fff5f7", 100: "#fed7e2", 200: "#fbb6ce", 300: "#f687b3",
|
|
143
|
-
400: "#ed64a6", 500: "#d53f8c", 600: "#b83280", 700: "#97266d",
|
|
144
|
-
800: "#702459", 900: "#521b41",
|
|
145
|
-
};
|
|
146
52
|
const backgroundColor = {
|
|
147
53
|
main: "#f9f7fc",
|
|
148
54
|
secondary: "#f2edf8",
|
|
@@ -208,8 +114,7 @@ const placeholder = {
|
|
|
208
114
|
};
|
|
209
115
|
const boxShadow = {
|
|
210
116
|
primary: buildPrimaryShadowTint(PRIMARY_500),
|
|
211
|
-
|
|
212
|
-
default: "#00000033",
|
|
117
|
+
...sharedBoxShadow,
|
|
213
118
|
};
|
|
214
119
|
const sidebar = {
|
|
215
120
|
background: {
|
|
@@ -281,31 +186,15 @@ const disabled = {
|
|
|
281
186
|
800: "#625d75",
|
|
282
187
|
900: "#4b4759",
|
|
283
188
|
};
|
|
284
|
-
//
|
|
285
|
-
|
|
286
|
-
// original let white drop to 3.53 there (`from` already passed at 5.76, unchanged).
|
|
287
|
-
// Nudged one step further (4.511 -> 4.609): the first pass cleared AA by <0.02, too thin a
|
|
288
|
-
// margin to trust against rounding/rendering variance.
|
|
289
|
-
const gradient = { from: "#8B3FC8", to: "#df187a" };
|
|
189
|
+
// Single-hue gradient: white clears AA by margin, not by hundredths. See gradientTone.test.ts.
|
|
190
|
+
const gradient = { from: "#8b3fc8", to: "#762d9d" };
|
|
290
191
|
const palette = {
|
|
291
192
|
gradient,
|
|
292
193
|
primary,
|
|
293
194
|
secondary,
|
|
294
195
|
tertiary,
|
|
295
|
-
|
|
296
|
-
black: "#000",
|
|
297
|
-
white: "#fff",
|
|
298
|
-
semantic,
|
|
196
|
+
...neutralTokens,
|
|
299
197
|
gray,
|
|
300
|
-
red,
|
|
301
|
-
orange,
|
|
302
|
-
yellow,
|
|
303
|
-
green,
|
|
304
|
-
teal,
|
|
305
|
-
blue,
|
|
306
|
-
cyan,
|
|
307
|
-
purple,
|
|
308
|
-
pink,
|
|
309
198
|
backgroundColor,
|
|
310
199
|
background,
|
|
311
200
|
text,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { neutralTokens, sharedBoxShadow } from "../neutrals.js";
|
|
2
2
|
import { buildPrimaryOpacity, buildPrimaryShadowTint } from "../../builders/buildBrandTokens.js";
|
|
3
|
+
import { buildBrandInk } from "../../builders/brandInk.js";
|
|
3
4
|
const PRIMARY_500 = "#2d6a4f"; // was #2caa3d — deeper, forest-toned
|
|
4
5
|
const primary = {
|
|
5
6
|
50: "#edf7f2",
|
|
@@ -15,7 +16,8 @@ const primary = {
|
|
|
15
16
|
opacity: buildPrimaryOpacity(PRIMARY_500),
|
|
16
17
|
};
|
|
17
18
|
const palette = {
|
|
18
|
-
...
|
|
19
|
+
...neutralTokens,
|
|
20
|
+
...buildBrandInk(PRIMARY_500),
|
|
19
21
|
// `to` stop retuned so white gradient-button text (onGradient, accentText.ts) clears AA — the
|
|
20
22
|
// original let white drop to 2.49 there (`from` already passed at 6.39, unchanged).
|
|
21
23
|
// Nudged one step further (4.519 -> 4.627): the first pass cleared AA by <0.02, too thin a
|
|
@@ -121,8 +123,7 @@ const palette = {
|
|
|
121
123
|
},
|
|
122
124
|
boxShadow: {
|
|
123
125
|
primary: buildPrimaryShadowTint(PRIMARY_500),
|
|
124
|
-
|
|
125
|
-
default: lavenderPalette.boxShadow.default,
|
|
126
|
+
...sharedBoxShadow,
|
|
126
127
|
},
|
|
127
128
|
};
|
|
128
129
|
export default palette;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
const semantic = {
|
|
2
|
+
success: {
|
|
3
|
+
50: "#e9f8ef",
|
|
4
|
+
100: "#bbe9cc",
|
|
5
|
+
200: "#9adeb4",
|
|
6
|
+
300: "#6ccf92",
|
|
7
|
+
400: "#4fc67d",
|
|
8
|
+
500: "#23b85c",
|
|
9
|
+
600: "#20a754",
|
|
10
|
+
700: "#198341",
|
|
11
|
+
800: "#136533",
|
|
12
|
+
900: "#0f4d27",
|
|
13
|
+
},
|
|
14
|
+
error: {
|
|
15
|
+
50: "#feedeb",
|
|
16
|
+
100: "#fbc6c2",
|
|
17
|
+
200: "#f9aaa4",
|
|
18
|
+
300: "#f6837b",
|
|
19
|
+
400: "#f56b61",
|
|
20
|
+
500: "#f2463a",
|
|
21
|
+
600: "#dc4035",
|
|
22
|
+
700: "#ac3229",
|
|
23
|
+
800: "#852720",
|
|
24
|
+
900: "#661d18",
|
|
25
|
+
},
|
|
26
|
+
warning: {
|
|
27
|
+
50: "#fff4ef",
|
|
28
|
+
100: "#ffddce",
|
|
29
|
+
200: "#ffccb7",
|
|
30
|
+
300: "#ffb596",
|
|
31
|
+
400: "#ffa781",
|
|
32
|
+
500: "#ff9162",
|
|
33
|
+
600: "#e88459",
|
|
34
|
+
700: "#b56746",
|
|
35
|
+
800: "#8c5036",
|
|
36
|
+
900: "#6b3d29",
|
|
37
|
+
},
|
|
38
|
+
info: {
|
|
39
|
+
50: "#eff9fc",
|
|
40
|
+
100: "#cdedf5",
|
|
41
|
+
200: "#b5e4f0",
|
|
42
|
+
300: "#94d7e9",
|
|
43
|
+
400: "#7fd0e5",
|
|
44
|
+
500: "#5fc4de",
|
|
45
|
+
600: "#56b2ea",
|
|
46
|
+
700: "#438b9e",
|
|
47
|
+
800: "#346c78",
|
|
48
|
+
900: "#28525d",
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
const red = {
|
|
52
|
+
50: "#feedeb", 100: "#fbc6c2", 200: "#f9aaa4", 300: "#f6837b",
|
|
53
|
+
400: "#f56b61", 500: "#f2463a", 600: "#dc4035", 700: "#ac3229",
|
|
54
|
+
800: "#852720", 900: "#661d18",
|
|
55
|
+
};
|
|
56
|
+
const orange = {
|
|
57
|
+
50: "#fff4ef", 100: "#ffddce", 200: "#ffccb7", 300: "#ffb596",
|
|
58
|
+
400: "#ffa781", 500: "#ff9162", 600: "#e88459", 700: "#b56746",
|
|
59
|
+
800: "#8c5036", 900: "#6b3d29",
|
|
60
|
+
};
|
|
61
|
+
const yellow = {
|
|
62
|
+
50: "#fefbec", 100: "#fdf1c5", 200: "#fbeba9", 300: "#fae281",
|
|
63
|
+
400: "#f9dc69", 500: "#f7d343", 600: "#e1c03d", 700: "#af9630",
|
|
64
|
+
800: "#887425", 900: "#68591c",
|
|
65
|
+
};
|
|
66
|
+
const green = {
|
|
67
|
+
50: "#e9f8ef", 100: "#bbe9cc", 200: "#9adeb4", 300: "#6ccf92",
|
|
68
|
+
400: "#4fc67d", 500: "#23b85c", 600: "#20a754", 700: "#198341",
|
|
69
|
+
800: "#136533", 900: "#0f4d27",
|
|
70
|
+
};
|
|
71
|
+
const teal = {
|
|
72
|
+
50: "#eff9fc", 100: "#cdedf5", 200: "#b5e4f0", 300: "#94d7e9",
|
|
73
|
+
400: "#7fd0e5", 500: "#5fc4de", 600: "#56b2ea", 700: "#438b9e",
|
|
74
|
+
800: "#346c78", 900: "#28525d",
|
|
75
|
+
};
|
|
76
|
+
const blue = {
|
|
77
|
+
50: "#ebf8ff", 100: "#bee3f8", 200: "#90cdf4", 300: "#63b3ed",
|
|
78
|
+
400: "#4299e1", 500: "#3182ce", 600: "#2b6cb0", 700: "#2c5282",
|
|
79
|
+
800: "#2a4365", 900: "#1a365d",
|
|
80
|
+
};
|
|
81
|
+
const cyan = {
|
|
82
|
+
50: "#edfdfd", 100: "#c4f1f9", 200: "#9decf9", 300: "#76e4f7",
|
|
83
|
+
400: "#0bc5ea", 500: "#00b5d8", 600: "#00a3c4", 700: "#0987a0",
|
|
84
|
+
800: "#086f83", 900: "#065666",
|
|
85
|
+
};
|
|
86
|
+
const purple = {
|
|
87
|
+
50: "#faf5ff", 100: "#e9d8fd", 200: "#d6bcfa", 300: "#b794f4",
|
|
88
|
+
400: "#9f7aea", 500: "#805ad5", 600: "#6b46c1", 700: "#553c9a",
|
|
89
|
+
800: "#44337a", 900: "#322659",
|
|
90
|
+
};
|
|
91
|
+
const pink = {
|
|
92
|
+
50: "#fff5f7", 100: "#fed7e2", 200: "#fbb6ce", 300: "#f687b3",
|
|
93
|
+
400: "#ed64a6", 500: "#d53f8c", 600: "#b83280", 700: "#97266d",
|
|
94
|
+
800: "#702459", 900: "#521b41",
|
|
95
|
+
};
|
|
96
|
+
/** Non-brand shadow tints. Only `primary` is brand-derived. */
|
|
97
|
+
export const sharedBoxShadow = {
|
|
98
|
+
error: "#F2463A47",
|
|
99
|
+
default: "#00000033",
|
|
100
|
+
};
|
|
101
|
+
/** Utility scales shared by every brand — never theme-specific. */
|
|
102
|
+
export const neutralTokens = {
|
|
103
|
+
transparent: "transparent",
|
|
104
|
+
black: "#000",
|
|
105
|
+
white: "#fff",
|
|
106
|
+
semantic,
|
|
107
|
+
red,
|
|
108
|
+
orange,
|
|
109
|
+
yellow,
|
|
110
|
+
green,
|
|
111
|
+
teal,
|
|
112
|
+
blue,
|
|
113
|
+
cyan,
|
|
114
|
+
purple,
|
|
115
|
+
pink,
|
|
116
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { neutralTokens, sharedBoxShadow } from "../neutrals.js";
|
|
2
2
|
import { buildPrimaryOpacity, buildPrimaryShadowTint } from "../../builders/buildBrandTokens.js";
|
|
3
|
+
import { buildBrandInk } from "../../builders/brandInk.js";
|
|
3
4
|
const PRIMARY_500 = "#cf4e3a"; // warm red (terracotta leaning)
|
|
4
5
|
const primary = {
|
|
5
6
|
50: "#fdf1ee",
|
|
@@ -15,7 +16,8 @@ const primary = {
|
|
|
15
16
|
opacity: buildPrimaryOpacity(PRIMARY_500),
|
|
16
17
|
};
|
|
17
18
|
const palette = {
|
|
18
|
-
...
|
|
19
|
+
...neutralTokens,
|
|
20
|
+
...buildBrandInk(PRIMARY_500),
|
|
19
21
|
// Stops retuned so white gradient-button text (onGradient, accentText.ts) clears AA at both
|
|
20
22
|
// ends — the original pair let white drop to 4.37/2.15 against from/to. Same hue, darker.
|
|
21
23
|
// Both nudged one step further (4.509/4.502 -> 4.601/4.617): the first pass cleared AA by
|
|
@@ -123,8 +125,7 @@ const palette = {
|
|
|
123
125
|
},
|
|
124
126
|
boxShadow: {
|
|
125
127
|
primary: buildPrimaryShadowTint(PRIMARY_500),
|
|
126
|
-
|
|
127
|
-
default: lavenderPalette.boxShadow.default,
|
|
128
|
+
...sharedBoxShadow,
|
|
128
129
|
},
|
|
129
130
|
};
|
|
130
131
|
export default palette;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { neutralTokens, sharedBoxShadow } from "../neutrals.js";
|
|
2
2
|
import { buildPrimaryOpacity, buildPrimaryShadowTint } from "../../builders/buildBrandTokens.js";
|
|
3
|
+
import { buildBrandInk } from "../../builders/brandInk.js";
|
|
3
4
|
const PRIMARY_500 = "#d16a7e"; // muted warm rose (not neon pink)
|
|
4
5
|
const primary = {
|
|
5
6
|
50: "#fdf2f5",
|
|
@@ -15,7 +16,8 @@ const primary = {
|
|
|
15
16
|
opacity: buildPrimaryOpacity(PRIMARY_500),
|
|
16
17
|
};
|
|
17
18
|
const palette = {
|
|
18
|
-
...
|
|
19
|
+
...neutralTokens,
|
|
20
|
+
...buildBrandInk(PRIMARY_500),
|
|
19
21
|
// Stops retuned so white gradient-button text (onGradient, accentText.ts) clears AA at both
|
|
20
22
|
// ends — the original pair let white drop to 3.46/2.69 against from/to. Same hue, darker.
|
|
21
23
|
// Both nudged one step further (4.520/4.505 -> 4.609/4.607): the first pass cleared AA by
|
|
@@ -127,8 +129,7 @@ const palette = {
|
|
|
127
129
|
},
|
|
128
130
|
boxShadow: {
|
|
129
131
|
primary: buildPrimaryShadowTint(PRIMARY_500),
|
|
130
|
-
|
|
131
|
-
default: lavenderPalette.boxShadow.default,
|
|
132
|
+
...sharedBoxShadow,
|
|
132
133
|
},
|
|
133
134
|
};
|
|
134
135
|
export default palette;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { neutralTokens, sharedBoxShadow } from "../neutrals.js";
|
|
2
2
|
import { buildPrimaryOpacity, buildPrimaryShadowTint } from "../../builders/buildBrandTokens.js";
|
|
3
|
+
import { buildBrandInk } from "../../builders/brandInk.js";
|
|
3
4
|
const PRIMARY_500 = "#1a3a6b"; // was #0088cc — deep navy
|
|
4
5
|
const primary = {
|
|
5
6
|
50: "#e8ecf4",
|
|
@@ -15,7 +16,8 @@ const primary = {
|
|
|
15
16
|
opacity: buildPrimaryOpacity(PRIMARY_500),
|
|
16
17
|
};
|
|
17
18
|
const palette = {
|
|
18
|
-
...
|
|
19
|
+
...neutralTokens,
|
|
20
|
+
...buildBrandInk(PRIMARY_500),
|
|
19
21
|
// `to` stop retuned so white gradient-button text (onGradient, accentText.ts) clears AA — the
|
|
20
22
|
// original let white drop to 2.14 there (`from` already passed at 11.28, unchanged).
|
|
21
23
|
// Nudged one step further (4.515 -> 4.600): the first pass cleared AA by <0.02, too thin a
|
|
@@ -121,8 +123,7 @@ const palette = {
|
|
|
121
123
|
},
|
|
122
124
|
boxShadow: {
|
|
123
125
|
primary: buildPrimaryShadowTint(PRIMARY_500),
|
|
124
|
-
|
|
125
|
-
default: lavenderPalette.boxShadow.default,
|
|
126
|
+
...sharedBoxShadow,
|
|
126
127
|
},
|
|
127
128
|
};
|
|
128
129
|
export default palette;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { neutralTokens, sharedBoxShadow } from "../neutrals.js";
|
|
2
2
|
import { buildPrimaryOpacity, buildPrimaryShadowTint } from "../../builders/buildBrandTokens.js";
|
|
3
|
+
import { buildBrandInk } from "../../builders/brandInk.js";
|
|
3
4
|
const PRIMARY_500 = "#6b7280"; // was #475569 — pure neutral gray, no blue cast
|
|
4
5
|
const primary = {
|
|
5
6
|
50: "#f9fafb",
|
|
@@ -15,12 +16,9 @@ const primary = {
|
|
|
15
16
|
opacity: buildPrimaryOpacity(PRIMARY_500),
|
|
16
17
|
};
|
|
17
18
|
const palette = {
|
|
18
|
-
...
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
// Nudged one step further (4.520 -> 4.608): the first pass cleared AA by <0.02, too thin a
|
|
22
|
-
// margin to trust against rounding/rendering variance.
|
|
23
|
-
gradient: { from: "#6b7280", to: "#5664f6" }, // slate gray → indigo
|
|
19
|
+
...neutralTokens,
|
|
20
|
+
...buildBrandInk(PRIMARY_500),
|
|
21
|
+
gradient: { from: "#666d7a", to: "#4a4e59" },
|
|
24
22
|
primary,
|
|
25
23
|
tertiary: { ...primary },
|
|
26
24
|
gray: {
|
|
@@ -125,8 +123,7 @@ const palette = {
|
|
|
125
123
|
},
|
|
126
124
|
boxShadow: {
|
|
127
125
|
primary: buildPrimaryShadowTint(PRIMARY_500),
|
|
128
|
-
|
|
129
|
-
default: lavenderPalette.boxShadow.default,
|
|
126
|
+
...sharedBoxShadow,
|
|
130
127
|
},
|
|
131
128
|
};
|
|
132
129
|
export default palette;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { neutralTokens, sharedBoxShadow } from "../neutrals.js";
|
|
2
2
|
import { buildPrimaryOpacity, buildPrimaryShadowTint } from "../../builders/buildBrandTokens.js";
|
|
3
|
+
import { buildBrandInk } from "../../builders/brandInk.js";
|
|
3
4
|
const PRIMARY_500 = "#004f4b"; // deep spruce teal — storefront/retail brand anchor
|
|
4
5
|
const primary = {
|
|
5
6
|
50: "#eafaf9",
|
|
@@ -15,7 +16,8 @@ const primary = {
|
|
|
15
16
|
opacity: buildPrimaryOpacity(PRIMARY_500),
|
|
16
17
|
};
|
|
17
18
|
const palette = {
|
|
18
|
-
...
|
|
19
|
+
...neutralTokens,
|
|
20
|
+
...buildBrandInk(PRIMARY_500),
|
|
19
21
|
// Same hue as primary, darker stop for the "to" end — mirrors emerald's gradient pattern.
|
|
20
22
|
// White gradient-button text verified AA at both stops (4.98 / 6.96).
|
|
21
23
|
gradient: { from: "#0c7d77", to: "#095e90" }, // spruce teal → deep blue
|
|
@@ -115,8 +117,7 @@ const palette = {
|
|
|
115
117
|
},
|
|
116
118
|
boxShadow: {
|
|
117
119
|
primary: buildPrimaryShadowTint(PRIMARY_500),
|
|
118
|
-
|
|
119
|
-
default: lavenderPalette.boxShadow.default,
|
|
120
|
+
...sharedBoxShadow,
|
|
120
121
|
},
|
|
121
122
|
};
|
|
122
123
|
export default palette;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { buildPrimaryOpacity } from "./buildBrandTokens.js";
|
|
2
|
+
import { hexToHsl, relativeLuminance, withLightness } from "./color.js";
|
|
3
|
+
const RUNGS = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900];
|
|
4
|
+
// Lavender's primary saturation. Each brand's ramps scale away from it.
|
|
5
|
+
const REFERENCE_SATURATION = 55.5;
|
|
6
|
+
const SECONDARY = {
|
|
7
|
+
50: [39.4, 0.8231],
|
|
8
|
+
100: [41.0, 0.61132],
|
|
9
|
+
200: [37.7, 0.39479],
|
|
10
|
+
300: [27.4, 0.18614],
|
|
11
|
+
400: [28.4, 0.10269],
|
|
12
|
+
500: [52.4, 0.00831],
|
|
13
|
+
600: [55.1, 0.00573],
|
|
14
|
+
700: [55.6, 0.00386],
|
|
15
|
+
800: [60.0, 0.00245],
|
|
16
|
+
900: [57.1, 0.00141],
|
|
17
|
+
};
|
|
18
|
+
const TEXT = {
|
|
19
|
+
50: [25.9, 0.86267],
|
|
20
|
+
100: [32.4, 0.63853],
|
|
21
|
+
200: [32.7, 0.48344],
|
|
22
|
+
300: [30.6, 0.30607],
|
|
23
|
+
400: [29.2, 0.21515],
|
|
24
|
+
500: [26.3, 0.10787],
|
|
25
|
+
600: [26.6, 0.08786],
|
|
26
|
+
700: [26.7, 0.05281],
|
|
27
|
+
800: [27.4, 0.03145],
|
|
28
|
+
900: [29.0, 0.01826],
|
|
29
|
+
};
|
|
30
|
+
const HEADER = {
|
|
31
|
+
50: [31.3, 0.83382],
|
|
32
|
+
100: [31.0, 0.59779],
|
|
33
|
+
200: [30.6, 0.44729],
|
|
34
|
+
300: [29.3, 0.27622],
|
|
35
|
+
400: [30.0, 0.19238],
|
|
36
|
+
500: [29.9, 0.10467],
|
|
37
|
+
600: [29.9, 0.08682],
|
|
38
|
+
700: [29.7, 0.05281],
|
|
39
|
+
800: [29.1, 0.0319],
|
|
40
|
+
900: [29.9, 0.01915],
|
|
41
|
+
};
|
|
42
|
+
const PLACEHOLDER = {
|
|
43
|
+
50: [30.4, 0.87913],
|
|
44
|
+
100: [35.4, 0.67128],
|
|
45
|
+
200: [36.1, 0.53513],
|
|
46
|
+
300: [34.7, 0.37333],
|
|
47
|
+
400: [31.4, 0.30462],
|
|
48
|
+
500: [28.2, 0.19307],
|
|
49
|
+
600: [22.8, 0.15818],
|
|
50
|
+
700: [22.0, 0.09196],
|
|
51
|
+
800: [21.5, 0.05448],
|
|
52
|
+
900: [22.3, 0.03206],
|
|
53
|
+
};
|
|
54
|
+
const DISABLED = {
|
|
55
|
+
50: [33.3, 0.90353],
|
|
56
|
+
100: [38.9, 0.80618],
|
|
57
|
+
200: [40.7, 0.71546],
|
|
58
|
+
300: [41.0, 0.60545],
|
|
59
|
+
400: [39.6, 0.53328],
|
|
60
|
+
500: [40.5, 0.43688],
|
|
61
|
+
600: [28.2, 0.35566],
|
|
62
|
+
700: [13.4, 0.20289],
|
|
63
|
+
800: [11.4, 0.1171],
|
|
64
|
+
900: [11.2, 0.06724],
|
|
65
|
+
};
|
|
66
|
+
// Lightness is monotonic in luminance for a fixed hue/saturation, so bisection converges.
|
|
67
|
+
const atLuminance = (anchor, saturation, target) => {
|
|
68
|
+
let low = 0;
|
|
69
|
+
let high = 100;
|
|
70
|
+
for (let i = 0; i < 30; i += 1) {
|
|
71
|
+
const mid = (low + high) / 2;
|
|
72
|
+
if (relativeLuminance(withLightness(anchor, mid, saturation)) < target)
|
|
73
|
+
low = mid;
|
|
74
|
+
else
|
|
75
|
+
high = mid;
|
|
76
|
+
}
|
|
77
|
+
return withLightness(anchor, (low + high) / 2, saturation);
|
|
78
|
+
};
|
|
79
|
+
const ramp = (anchor, profile) => {
|
|
80
|
+
const ratio = hexToHsl(anchor).s / REFERENCE_SATURATION;
|
|
81
|
+
const scale = {};
|
|
82
|
+
for (const rung of RUNGS) {
|
|
83
|
+
const [saturation, luminance] = profile[rung];
|
|
84
|
+
scale[rung] = atLuminance(anchor, Math.min(100, saturation * ratio), luminance);
|
|
85
|
+
}
|
|
86
|
+
return scale;
|
|
87
|
+
};
|
|
88
|
+
const brandRamp = (anchor, profile) => {
|
|
89
|
+
const scale = ramp(anchor, profile);
|
|
90
|
+
return { ...scale, opacity: buildPrimaryOpacity(scale[500]) };
|
|
91
|
+
};
|
|
92
|
+
/** Brand-hued ink ramps at lavender's verified luminances, so contrast carries over. */
|
|
93
|
+
export function buildBrandInk(primary500) {
|
|
94
|
+
const secondary = brandRamp(primary500, SECONDARY);
|
|
95
|
+
return {
|
|
96
|
+
secondary,
|
|
97
|
+
tertiary: { ...secondary },
|
|
98
|
+
text: ramp(primary500, TEXT),
|
|
99
|
+
header: ramp(primary500, HEADER),
|
|
100
|
+
placeholder: ramp(primary500, PLACEHOLDER),
|
|
101
|
+
disabled: ramp(primary500, DISABLED),
|
|
102
|
+
};
|
|
103
|
+
}
|
package/package.json
CHANGED