@vellira-ui/tokens 2.29.0 → 2.31.0

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 (43) hide show
  1. package/dist/css/tokens.css +2427 -16
  2. package/dist/dark/components/formField.d.ts +52 -0
  3. package/dist/dark/components/formField.d.ts.map +1 -1
  4. package/dist/dark/components/formField.js +55 -0
  5. package/dist/dark/components/input.d.ts +109 -4
  6. package/dist/dark/components/input.d.ts.map +1 -1
  7. package/dist/dark/components/input.js +81 -4
  8. package/dist/dark/components/select.d.ts +1702 -3
  9. package/dist/dark/components/select.d.ts.map +1 -1
  10. package/dist/dark/components/select.js +163 -6
  11. package/dist/factories/createInputPalette.d.ts +78 -0
  12. package/dist/factories/createInputPalette.d.ts.map +1 -0
  13. package/dist/factories/createInputPalette.js +78 -0
  14. package/dist/factories/createSelectPalette.d.ts +347 -0
  15. package/dist/factories/createSelectPalette.d.ts.map +1 -0
  16. package/dist/factories/createSelectPalette.js +41 -0
  17. package/dist/factories/index.d.ts +1 -0
  18. package/dist/factories/index.d.ts.map +1 -1
  19. package/dist/factories/index.js +1 -0
  20. package/dist/generated/token-types.d.ts +4 -4
  21. package/dist/generated/token-types.d.ts.map +1 -1
  22. package/dist/generated/token-types.js +3220 -4
  23. package/dist/highContrast/components/formField.d.ts +52 -0
  24. package/dist/highContrast/components/formField.d.ts.map +1 -1
  25. package/dist/highContrast/components/formField.js +55 -0
  26. package/dist/highContrast/components/input.d.ts +109 -4
  27. package/dist/highContrast/components/input.d.ts.map +1 -1
  28. package/dist/highContrast/components/input.js +101 -4
  29. package/dist/highContrast/components/select.d.ts +1701 -2
  30. package/dist/highContrast/components/select.d.ts.map +1 -1
  31. package/dist/highContrast/components/select.js +187 -5
  32. package/dist/light/components/formField.d.ts +52 -0
  33. package/dist/light/components/formField.d.ts.map +1 -1
  34. package/dist/light/components/formField.js +55 -0
  35. package/dist/light/components/input.d.ts +110 -5
  36. package/dist/light/components/input.d.ts.map +1 -1
  37. package/dist/light/components/input.js +81 -4
  38. package/dist/light/components/select.d.ts +1702 -3
  39. package/dist/light/components/select.d.ts.map +1 -1
  40. package/dist/light/components/select.js +164 -6
  41. package/dist/light/semantic/icons.d.ts +1 -1
  42. package/dist/light/semantic/icons.js +1 -1
  43. package/package.json +3 -2
@@ -1 +1 @@
1
- {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/dark/components/select.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2ET,CAAC"}
1
+ {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/dark/components/select.ts"],"names":[],"mappings":"AAyEA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyLT,CAAC"}
@@ -1,25 +1,141 @@
1
+ import { createInputColorPalette } from '../../factories/createInputPalette.js';
2
+ import { createSelectPalette } from '../../factories/createSelectPalette.js';
3
+ import { colors } from '../../primitives/colors.js';
1
4
  import { border } from '../semantic/border.js';
2
5
  import { control } from '../semantic/control.js';
3
6
  import { focus } from '../semantic/focus.js';
7
+ import { icons } from '../semantic/icons.js';
4
8
  import { menu } from '../semantic/menu.js';
5
- import { shadow } from '../semantic/shadow.js';
6
9
  import { status } from '../semantic/status.js';
10
+ import { surface } from '../semantic/surface.js';
7
11
  import { text } from '../semantic/text.js';
12
+ const selectPaletteDefaults = {
13
+ fg: text.primary,
14
+ placeholder: text.secondary,
15
+ filledFocusBg: surface.subtle,
16
+ hoverBg: surface.hover,
17
+ };
18
+ const primary = createInputColorPalette({
19
+ ...selectPaletteDefaults,
20
+ accent: colors.primary[400],
21
+ accentHover: colors.primary[500],
22
+ accentSoft: colors.primary[900],
23
+ filledBg: colors.primary[950],
24
+ filledHoverBg: colors.primary[900],
25
+ ring: colors.primary[400],
26
+ });
27
+ const neutral = createInputColorPalette({
28
+ ...selectPaletteDefaults,
29
+ accent: colors.vellira[300],
30
+ accentHover: colors.vellira[400],
31
+ accentSoft: colors.vellira[800],
32
+ filledBg: colors.vellira[900],
33
+ filledHoverBg: colors.vellira[800],
34
+ hoverBg: colors.vellira[900],
35
+ ring: colors.vellira[400],
36
+ });
37
+ const success = createInputColorPalette({
38
+ ...selectPaletteDefaults,
39
+ accent: colors.success[400],
40
+ accentHover: colors.success[500],
41
+ accentSoft: colors.success[900],
42
+ filledBg: colors.success[950],
43
+ filledHoverBg: colors.success[900],
44
+ hoverBg: colors.success[950],
45
+ ring: colors.success[500],
46
+ });
47
+ const warning = createInputColorPalette({
48
+ ...selectPaletteDefaults,
49
+ accent: colors.warning[400],
50
+ accentHover: colors.warning[500],
51
+ accentSoft: colors.warning[900],
52
+ filledBg: colors.warning[950],
53
+ filledHoverBg: colors.warning[900],
54
+ hoverBg: colors.warning[950],
55
+ ring: colors.warning[500],
56
+ });
57
+ const danger = createInputColorPalette({
58
+ ...selectPaletteDefaults,
59
+ accent: colors.error[400],
60
+ accentHover: colors.error[500],
61
+ accentSoft: colors.error[900],
62
+ filledBg: colors.error[950],
63
+ filledHoverBg: colors.error[900],
64
+ hoverBg: colors.error[950],
65
+ ring: colors.error[500],
66
+ });
8
67
  export const select = {
68
+ primary: createSelectPalette(primary, {
69
+ dropdownBorder: 'transparent',
70
+ optionActiveBorder: 'transparent',
71
+ optionActiveRing: 'transparent',
72
+ optionHoverBorder: 'transparent',
73
+ optionPressedBg: colors.primary[700],
74
+ optionPressedBorder: 'transparent',
75
+ optionSelectedBg: colors.primary[800],
76
+ }),
77
+ neutral: createSelectPalette(neutral, {
78
+ dropdownBorder: 'transparent',
79
+ optionActiveBorder: 'transparent',
80
+ optionActiveRing: 'transparent',
81
+ optionHoverBorder: 'transparent',
82
+ optionPressedBg: colors.vellira[800],
83
+ optionPressedBorder: 'transparent',
84
+ optionSelectedBg: colors.vellira[850],
85
+ }),
86
+ success: createSelectPalette(success, {
87
+ dropdownBorder: 'transparent',
88
+ optionActiveBorder: 'transparent',
89
+ optionActiveRing: 'transparent',
90
+ optionHoverBorder: 'transparent',
91
+ optionPressedBg: colors.success[800],
92
+ optionPressedBorder: 'transparent',
93
+ optionSelectedBg: colors.success[900],
94
+ }),
95
+ warning: createSelectPalette(warning, {
96
+ dropdownBorder: 'transparent',
97
+ optionActiveBorder: 'transparent',
98
+ optionActiveRing: 'transparent',
99
+ optionHoverBorder: 'transparent',
100
+ optionPressedBg: colors.warning[800],
101
+ optionPressedBorder: 'transparent',
102
+ optionSelectedBg: colors.warning[900],
103
+ }),
104
+ danger: createSelectPalette(danger, {
105
+ dropdownBorder: 'transparent',
106
+ optionActiveBorder: 'transparent',
107
+ optionActiveRing: 'transparent',
108
+ optionHoverBorder: 'transparent',
109
+ optionPressedBg: colors.error[800],
110
+ optionPressedBorder: 'transparent',
111
+ optionSelectedBg: colors.error[900],
112
+ }),
9
113
  trigger: {
10
114
  default: {
11
115
  bg: 'transparent',
12
116
  fg: text.primary,
13
117
  border: border.default,
118
+ icon: icons.brand,
119
+ placeholder: text.secondary,
120
+ },
121
+ hover: {
122
+ ...control.hover,
123
+ icon: icons.hover,
124
+ placeholder: text.secondary,
14
125
  },
15
- hover: control.hover,
16
126
  focus: {
17
127
  bg: 'transparent',
18
128
  fg: text.primary,
19
129
  border: border.focus,
20
130
  ring: focus.ring.color,
131
+ icon: icons.brand,
132
+ placeholder: text.secondary,
133
+ },
134
+ disabled: {
135
+ ...control.disabled,
136
+ icon: icons.disabled,
137
+ placeholder: text.disabled,
21
138
  },
22
- disabled: control.disabled,
23
139
  placeholder: {
24
140
  fg: text.secondary,
25
141
  },
@@ -31,8 +147,24 @@ export const select = {
31
147
  dropdown: {
32
148
  bg: menu.background,
33
149
  fg: menu.item.default.fg,
34
- border: menu.border,
35
- shadow: shadow.lg,
150
+ border: 'transparent',
151
+ shadow: 'none',
152
+ search: {
153
+ bg: surface.default,
154
+ fg: text.primary,
155
+ border: border.muted,
156
+ placeholder: text.secondary,
157
+ ring: focus.ring.color,
158
+ },
159
+ empty: {
160
+ fg: text.secondary,
161
+ },
162
+ groupLabel: {
163
+ fg: colors.primary[300],
164
+ },
165
+ separator: {
166
+ bg: border.muted,
167
+ },
36
168
  },
37
169
  option: {
38
170
  default: {
@@ -60,12 +192,37 @@ export const select = {
60
192
  bg: control.selected.muted.bg,
61
193
  fg: control.selected.muted.fg,
62
194
  border: control.selected.muted.border,
63
- shadow: shadow.inset,
195
+ shadow: 'none',
64
196
  },
65
197
  disabled: {
66
198
  bg: menu.item.disabled.bg,
67
199
  fg: menu.item.disabled.fg,
68
200
  border: 'transparent',
69
201
  },
202
+ description: {
203
+ fg: text.secondary,
204
+ },
205
+ icon: {
206
+ fg: icons.default,
207
+ },
208
+ badge: {
209
+ bg: surface.subtle,
210
+ fg: text.secondary,
211
+ border: border.muted,
212
+ },
213
+ shortcut: {
214
+ bg: surface.subtle,
215
+ fg: text.secondary,
216
+ border: border.muted,
217
+ },
218
+ success: {
219
+ fg: status.success.fg,
220
+ },
221
+ warning: {
222
+ fg: status.warning.fg,
223
+ },
224
+ danger: {
225
+ fg: status.error.fg,
226
+ },
70
227
  },
71
228
  };
@@ -0,0 +1,78 @@
1
+ export type InputState = {
2
+ bg: string;
3
+ fg: string;
4
+ border: string;
5
+ placeholder: string;
6
+ icon: string;
7
+ };
8
+ export type InputPaletteConfig = {
9
+ ring: string;
10
+ outline: {
11
+ default: InputState;
12
+ hover: InputState;
13
+ focus: InputState;
14
+ };
15
+ filled: {
16
+ default: InputState;
17
+ hover: InputState;
18
+ focus: InputState;
19
+ };
20
+ soft: {
21
+ default: InputState;
22
+ hover: InputState;
23
+ focus: InputState;
24
+ };
25
+ };
26
+ export declare const createInputPalette: ({ ring, outline, filled, soft, }: InputPaletteConfig) => {
27
+ readonly ring: string;
28
+ readonly outline: {
29
+ default: InputState;
30
+ hover: InputState;
31
+ focus: InputState;
32
+ };
33
+ readonly filled: {
34
+ default: InputState;
35
+ hover: InputState;
36
+ focus: InputState;
37
+ };
38
+ readonly soft: {
39
+ default: InputState;
40
+ hover: InputState;
41
+ focus: InputState;
42
+ };
43
+ };
44
+ export type InputColorPaletteConfig = {
45
+ accent: string;
46
+ accentHover: string;
47
+ accentSoft: string;
48
+ filledBg: string;
49
+ filledHoverBg: string;
50
+ hoverBg: string;
51
+ ring: string;
52
+ fg: string;
53
+ placeholder: string;
54
+ filledFocusBg: string;
55
+ filledDefaultBorder?: string;
56
+ filledHoverBorder?: string;
57
+ softDefaultBorder?: string;
58
+ softHoverBorder?: string;
59
+ };
60
+ export declare const createInputColorPalette: ({ accent, accentHover, accentSoft, filledBg, filledHoverBg, hoverBg, ring, fg, placeholder, filledFocusBg, filledDefaultBorder, filledHoverBorder, softDefaultBorder, softHoverBorder, }: InputColorPaletteConfig) => {
61
+ readonly ring: string;
62
+ readonly outline: {
63
+ default: InputState;
64
+ hover: InputState;
65
+ focus: InputState;
66
+ };
67
+ readonly filled: {
68
+ default: InputState;
69
+ hover: InputState;
70
+ focus: InputState;
71
+ };
72
+ readonly soft: {
73
+ default: InputState;
74
+ hover: InputState;
75
+ focus: InputState;
76
+ };
77
+ };
78
+ //# sourceMappingURL=createInputPalette.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createInputPalette.d.ts","sourceRoot":"","sources":["../../src/factories/createInputPalette.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE;QACP,OAAO,EAAE,UAAU,CAAC;QACpB,KAAK,EAAE,UAAU,CAAC;QAClB,KAAK,EAAE,UAAU,CAAC;KACnB,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,UAAU,CAAC;QACpB,KAAK,EAAE,UAAU,CAAC;QAClB,KAAK,EAAE,UAAU,CAAC;KACnB,CAAC;IACF,IAAI,EAAE;QACJ,OAAO,EAAE,UAAU,CAAC;QACpB,KAAK,EAAE,UAAU,CAAC;QAClB,KAAK,EAAE,UAAU,CAAC;KACnB,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,kCAKhC,kBAAkB;;;iBArBR,UAAU;eACZ,UAAU;eACV,UAAU;;;iBAGR,UAAU;eACZ,UAAU;eACV,UAAU;;;iBAGR,UAAU;eACZ,UAAU;eACV,UAAU;;CAeR,CAAC;AAEd,MAAM,MAAM,uBAAuB,GAAG;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,0LAerC,uBAAuB;;;iBA7Db,UAAU;eACZ,UAAU;eACV,UAAU;;;iBAGR,UAAU;eACZ,UAAU;eACV,UAAU;;;iBAGR,UAAU;eACZ,UAAU;eACV,UAAU;;CAyHjB,CAAC"}
@@ -0,0 +1,78 @@
1
+ export const createInputPalette = ({ ring, outline, filled, soft, }) => ({
2
+ ring,
3
+ outline,
4
+ filled,
5
+ soft,
6
+ });
7
+ export const createInputColorPalette = ({ accent, accentHover, accentSoft, filledBg, filledHoverBg, hoverBg, ring, fg, placeholder, filledFocusBg, filledDefaultBorder = 'transparent', filledHoverBorder = accent, softDefaultBorder = 'transparent', softHoverBorder = accent, }) => createInputPalette({
8
+ ring,
9
+ outline: {
10
+ default: {
11
+ bg: 'transparent',
12
+ fg,
13
+ border: accent,
14
+ placeholder,
15
+ icon: accent,
16
+ },
17
+ hover: {
18
+ bg: hoverBg,
19
+ fg,
20
+ border: accentHover,
21
+ placeholder,
22
+ icon: accentHover,
23
+ },
24
+ focus: {
25
+ bg: 'transparent',
26
+ fg,
27
+ border: accentHover,
28
+ placeholder,
29
+ icon: accentHover,
30
+ },
31
+ },
32
+ filled: {
33
+ default: {
34
+ bg: filledBg,
35
+ fg,
36
+ border: filledDefaultBorder,
37
+ placeholder,
38
+ icon: accent,
39
+ },
40
+ hover: {
41
+ bg: filledHoverBg,
42
+ fg,
43
+ border: filledHoverBorder,
44
+ placeholder,
45
+ icon: accentHover,
46
+ },
47
+ focus: {
48
+ bg: filledFocusBg,
49
+ fg,
50
+ border: accentHover,
51
+ placeholder,
52
+ icon: accentHover,
53
+ },
54
+ },
55
+ soft: {
56
+ default: {
57
+ bg: accentSoft,
58
+ fg,
59
+ border: softDefaultBorder,
60
+ placeholder,
61
+ icon: accent,
62
+ },
63
+ hover: {
64
+ bg: accentSoft,
65
+ fg,
66
+ border: softHoverBorder,
67
+ placeholder,
68
+ icon: accentHover,
69
+ },
70
+ focus: {
71
+ bg: accentSoft,
72
+ fg,
73
+ border: accentHover,
74
+ placeholder,
75
+ icon: accentHover,
76
+ },
77
+ },
78
+ });