@vellira-ui/tokens 2.30.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.
@@ -1 +1 @@
1
- {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/highContrast/components/select.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsET,CAAC"}
1
+ {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/highContrast/components/select.ts"],"names":[],"mappings":"AAuHA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyLT,CAAC"}
@@ -1,25 +1,166 @@
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[300],
21
+ accentHover: colors.primary[400],
22
+ accentSoft: colors.primary[900],
23
+ filledBg: colors.primary[950],
24
+ filledHoverBg: colors.primary[900],
25
+ filledDefaultBorder: colors.primary[300],
26
+ filledHoverBorder: colors.primary[400],
27
+ softDefaultBorder: colors.primary[300],
28
+ softHoverBorder: colors.primary[400],
29
+ ring: colors.primary[400],
30
+ });
31
+ const neutral = createInputColorPalette({
32
+ ...selectPaletteDefaults,
33
+ accent: colors.grayBlue[200],
34
+ accentHover: colors.gray[200],
35
+ accentSoft: colors.grayBlue[800],
36
+ filledBg: colors.grayBlue[900],
37
+ filledHoverBg: colors.grayBlue[800],
38
+ filledDefaultBorder: colors.grayBlue[200],
39
+ filledHoverBorder: colors.gray[200],
40
+ softDefaultBorder: colors.grayBlue[200],
41
+ softHoverBorder: colors.gray[200],
42
+ hoverBg: colors.grayBlue[900],
43
+ ring: colors.grayBlue[400],
44
+ });
45
+ const success = createInputColorPalette({
46
+ ...selectPaletteDefaults,
47
+ accent: colors.success[300],
48
+ accentHover: colors.success[400],
49
+ accentSoft: colors.success[900],
50
+ filledBg: colors.success[950],
51
+ filledHoverBg: colors.success[900],
52
+ filledDefaultBorder: colors.success[300],
53
+ filledHoverBorder: colors.success[400],
54
+ softDefaultBorder: colors.success[300],
55
+ softHoverBorder: colors.success[400],
56
+ hoverBg: colors.success[950],
57
+ ring: colors.success[500],
58
+ });
59
+ const warning = createInputColorPalette({
60
+ ...selectPaletteDefaults,
61
+ accent: colors.warning[500],
62
+ accentHover: colors.warning[400],
63
+ accentSoft: colors.warning[900],
64
+ filledBg: colors.warning[900],
65
+ filledHoverBg: colors.warning[800],
66
+ filledDefaultBorder: colors.warning[500],
67
+ filledHoverBorder: colors.warning[400],
68
+ softDefaultBorder: colors.warning[500],
69
+ softHoverBorder: colors.warning[400],
70
+ hoverBg: colors.warning[950],
71
+ ring: colors.warning[500],
72
+ });
73
+ const danger = createInputColorPalette({
74
+ ...selectPaletteDefaults,
75
+ accent: colors.error[400],
76
+ accentHover: colors.error[300],
77
+ accentSoft: colors.error[900],
78
+ filledBg: colors.error[950],
79
+ filledHoverBg: colors.error[900],
80
+ filledDefaultBorder: colors.error[400],
81
+ filledHoverBorder: colors.error[300],
82
+ softDefaultBorder: colors.error[400],
83
+ softHoverBorder: colors.error[300],
84
+ hoverBg: colors.error[950],
85
+ ring: colors.error[500],
86
+ });
8
87
  export const select = {
88
+ primary: createSelectPalette(primary, {
89
+ optionActiveBorder: 'transparent',
90
+ optionActiveRing: 'transparent',
91
+ optionHoverBg: menu.item.hover.bg,
92
+ optionHoverBorder: 'transparent',
93
+ optionHoverFg: menu.item.hover.fg,
94
+ optionPressedBg: menu.item.pressed.bg,
95
+ optionPressedBorder: 'transparent',
96
+ optionPressedFg: menu.item.pressed.fg,
97
+ }),
98
+ neutral: createSelectPalette(neutral, {
99
+ optionActiveBorder: 'transparent',
100
+ optionActiveRing: 'transparent',
101
+ optionHoverBg: menu.item.hover.bg,
102
+ optionHoverBorder: 'transparent',
103
+ optionHoverFg: menu.item.hover.fg,
104
+ optionPressedBg: menu.item.pressed.bg,
105
+ optionPressedBorder: 'transparent',
106
+ optionPressedFg: menu.item.pressed.fg,
107
+ }),
108
+ success: createSelectPalette(success, {
109
+ optionActiveBorder: 'transparent',
110
+ optionActiveRing: 'transparent',
111
+ optionHoverBg: menu.item.hover.bg,
112
+ optionHoverBorder: 'transparent',
113
+ optionHoverFg: menu.item.hover.fg,
114
+ optionPressedBg: menu.item.pressed.bg,
115
+ optionPressedBorder: 'transparent',
116
+ optionPressedFg: menu.item.pressed.fg,
117
+ }),
118
+ warning: createSelectPalette(warning, {
119
+ optionActiveBorder: 'transparent',
120
+ optionActiveRing: 'transparent',
121
+ optionHoverBg: menu.item.hover.bg,
122
+ optionHoverBorder: 'transparent',
123
+ optionHoverFg: menu.item.hover.fg,
124
+ optionPressedBg: menu.item.pressed.bg,
125
+ optionPressedBorder: 'transparent',
126
+ optionPressedFg: menu.item.pressed.fg,
127
+ }),
128
+ danger: createSelectPalette(danger, {
129
+ optionActiveBorder: 'transparent',
130
+ optionActiveRing: 'transparent',
131
+ optionHoverBg: menu.item.hover.bg,
132
+ optionHoverBorder: 'transparent',
133
+ optionHoverFg: menu.item.hover.fg,
134
+ optionPressedBg: menu.item.pressed.bg,
135
+ optionPressedBorder: 'transparent',
136
+ optionPressedFg: menu.item.pressed.fg,
137
+ }),
9
138
  trigger: {
10
139
  default: {
11
140
  bg: 'transparent',
12
141
  fg: text.primary,
13
142
  border: border.default,
143
+ icon: icons.brand,
144
+ placeholder: text.secondary,
145
+ },
146
+ hover: {
147
+ ...control.hover,
148
+ icon: icons.hover,
149
+ placeholder: text.secondary,
14
150
  },
15
- hover: control.hover,
16
151
  focus: {
17
152
  bg: 'transparent',
18
153
  fg: text.primary,
19
154
  border: border.focus,
20
155
  ring: focus.ring.color,
156
+ icon: icons.brand,
157
+ placeholder: text.secondary,
158
+ },
159
+ disabled: {
160
+ ...control.disabled,
161
+ icon: icons.disabled,
162
+ placeholder: text.disabled,
21
163
  },
22
- disabled: control.disabled,
23
164
  placeholder: {
24
165
  fg: text.secondary,
25
166
  },
@@ -32,7 +173,23 @@ export const select = {
32
173
  bg: menu.background,
33
174
  fg: menu.item.default.fg,
34
175
  border: menu.border,
35
- shadow: shadow.lg,
176
+ shadow: 'none',
177
+ search: {
178
+ bg: surface.default,
179
+ fg: text.primary,
180
+ border: border.muted,
181
+ placeholder: text.secondary,
182
+ ring: focus.ring.color,
183
+ },
184
+ empty: {
185
+ fg: text.secondary,
186
+ },
187
+ groupLabel: {
188
+ fg: colors.primary[300],
189
+ },
190
+ separator: {
191
+ bg: border.muted,
192
+ },
36
193
  },
37
194
  option: {
38
195
  default: {
@@ -56,11 +213,36 @@ export const select = {
56
213
  bg: control.selected.muted.bg,
57
214
  fg: control.selected.muted.fg,
58
215
  border: control.selected.muted.border,
59
- shadow: shadow.inset,
216
+ shadow: 'none',
60
217
  },
61
218
  disabled: {
62
219
  ...menu.item.disabled,
63
220
  border: 'transparent',
64
221
  },
222
+ description: {
223
+ fg: text.secondary,
224
+ },
225
+ icon: {
226
+ fg: icons.default,
227
+ },
228
+ badge: {
229
+ bg: surface.subtle,
230
+ fg: text.secondary,
231
+ border: border.muted,
232
+ },
233
+ shortcut: {
234
+ bg: surface.subtle,
235
+ fg: text.secondary,
236
+ border: border.muted,
237
+ },
238
+ success: {
239
+ fg: status.success.fg,
240
+ },
241
+ warning: {
242
+ fg: status.warning.fg,
243
+ },
244
+ danger: {
245
+ fg: status.error.fg,
246
+ },
65
247
  },
66
248
  };