@vellira-ui/tokens 2.31.0 → 2.33.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.
- package/dist/css/tokens.css +998 -98
- package/dist/dark/components/dropdown.d.ts +255 -0
- package/dist/dark/components/dropdown.d.ts.map +1 -1
- package/dist/dark/components/dropdown.js +106 -0
- package/dist/dark/components/select.d.ts +733 -6
- package/dist/dark/components/select.d.ts.map +1 -1
- package/dist/dark/components/select.js +57 -14
- package/dist/dark/theme.d.ts +7 -7
- package/dist/factories/createDropdownPalette.d.ts +69 -0
- package/dist/factories/createDropdownPalette.d.ts.map +1 -0
- package/dist/factories/createDropdownPalette.js +46 -0
- package/dist/factories/createSelectPalette.d.ts +156 -0
- package/dist/factories/createSelectPalette.d.ts.map +1 -1
- package/dist/factories/createSelectPalette.js +52 -33
- package/dist/generated/token-types.d.ts +4 -4
- package/dist/generated/token-types.d.ts.map +1 -1
- package/dist/generated/token-types.js +1200 -0
- package/dist/highContrast/components/dropdown.d.ts +255 -0
- package/dist/highContrast/components/dropdown.d.ts.map +1 -1
- package/dist/highContrast/components/dropdown.js +78 -0
- package/dist/highContrast/components/select.d.ts +731 -4
- package/dist/highContrast/components/select.d.ts.map +1 -1
- package/dist/highContrast/components/select.js +49 -1
- package/dist/highContrast/theme.d.ts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/light/components/contextMenu.d.ts +1 -1
- package/dist/light/components/dropdown.d.ts +256 -1
- package/dist/light/components/dropdown.d.ts.map +1 -1
- package/dist/light/components/dropdown.js +103 -0
- package/dist/light/components/input.d.ts +1 -1
- package/dist/light/components/select.d.ts +731 -4
- package/dist/light/components/select.d.ts.map +1 -1
- package/dist/light/components/select.js +24 -1
- package/dist/light/semantic/menu.d.ts +1 -1
- package/dist/light/semantic/status.d.ts +1 -1
- package/dist/light/semantic/status.js +1 -1
- package/dist/light/theme.d.ts +7 -7
- package/dist/tokens/typography.d.ts +7 -7
- package/dist/tokens/typography.js +7 -7
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/dark/components/select.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/dark/components/select.ts"],"names":[],"mappings":"AA0EA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoOT,CAAC"}
|
|
@@ -6,6 +6,7 @@ import { control } from '../semantic/control.js';
|
|
|
6
6
|
import { focus } from '../semantic/focus.js';
|
|
7
7
|
import { icons } from '../semantic/icons.js';
|
|
8
8
|
import { menu } from '../semantic/menu.js';
|
|
9
|
+
import { shadow } from '../semantic/shadow.js';
|
|
9
10
|
import { status } from '../semantic/status.js';
|
|
10
11
|
import { surface } from '../semantic/surface.js';
|
|
11
12
|
import { text } from '../semantic/text.js';
|
|
@@ -68,47 +69,82 @@ export const select = {
|
|
|
68
69
|
primary: createSelectPalette(primary, {
|
|
69
70
|
dropdownBorder: 'transparent',
|
|
70
71
|
optionActiveBorder: 'transparent',
|
|
72
|
+
optionActiveBg: colors.vellira[850],
|
|
73
|
+
optionActiveFg: text.primary,
|
|
71
74
|
optionActiveRing: 'transparent',
|
|
75
|
+
optionHoverBg: colors.vellira[700],
|
|
72
76
|
optionHoverBorder: 'transparent',
|
|
73
|
-
|
|
77
|
+
optionHoverFg: menu.item.hover.fg,
|
|
78
|
+
optionPressedBg: colors.vellira[900],
|
|
74
79
|
optionPressedBorder: 'transparent',
|
|
80
|
+
optionSelectedActiveBg: colors.vellira[850],
|
|
81
|
+
optionSelectedHoverBg: colors.vellira[700],
|
|
82
|
+
optionSelectedPressedBg: colors.vellira[900],
|
|
75
83
|
optionSelectedBg: colors.primary[800],
|
|
76
84
|
}),
|
|
77
85
|
neutral: createSelectPalette(neutral, {
|
|
78
86
|
dropdownBorder: 'transparent',
|
|
79
87
|
optionActiveBorder: 'transparent',
|
|
88
|
+
optionActiveBg: colors.vellira[850],
|
|
89
|
+
optionActiveFg: text.primary,
|
|
80
90
|
optionActiveRing: 'transparent',
|
|
91
|
+
optionHoverBg: colors.vellira[700],
|
|
81
92
|
optionHoverBorder: 'transparent',
|
|
82
|
-
|
|
93
|
+
optionHoverFg: menu.item.hover.fg,
|
|
94
|
+
optionPressedBg: colors.vellira[900],
|
|
83
95
|
optionPressedBorder: 'transparent',
|
|
84
|
-
|
|
96
|
+
optionSelectedActiveBg: colors.vellira[850],
|
|
97
|
+
optionSelectedHoverBg: colors.vellira[700],
|
|
98
|
+
optionSelectedPressedBg: colors.vellira[900],
|
|
99
|
+
optionSelectedBg: colors.vellira[600],
|
|
85
100
|
}),
|
|
86
101
|
success: createSelectPalette(success, {
|
|
87
102
|
dropdownBorder: 'transparent',
|
|
88
103
|
optionActiveBorder: 'transparent',
|
|
104
|
+
optionActiveBg: colors.success[900],
|
|
105
|
+
optionActiveFg: text.primary,
|
|
89
106
|
optionActiveRing: 'transparent',
|
|
107
|
+
optionHoverBg: colors.success[800],
|
|
90
108
|
optionHoverBorder: 'transparent',
|
|
91
|
-
|
|
109
|
+
optionHoverFg: menu.item.hover.fg,
|
|
110
|
+
optionPressedBg: colors.success[950],
|
|
92
111
|
optionPressedBorder: 'transparent',
|
|
93
|
-
|
|
112
|
+
optionSelectedActiveBg: colors.success[900],
|
|
113
|
+
optionSelectedHoverBg: colors.success[800],
|
|
114
|
+
optionSelectedPressedBg: colors.success[950],
|
|
115
|
+
optionSelectedBg: colors.success[700],
|
|
94
116
|
}),
|
|
95
117
|
warning: createSelectPalette(warning, {
|
|
96
118
|
dropdownBorder: 'transparent',
|
|
97
119
|
optionActiveBorder: 'transparent',
|
|
120
|
+
optionActiveBg: colors.warning[900],
|
|
121
|
+
optionActiveFg: text.primary,
|
|
98
122
|
optionActiveRing: 'transparent',
|
|
123
|
+
optionHoverBg: colors.warning[800],
|
|
99
124
|
optionHoverBorder: 'transparent',
|
|
100
|
-
|
|
125
|
+
optionHoverFg: menu.item.hover.fg,
|
|
126
|
+
optionPressedBg: colors.warning[950],
|
|
101
127
|
optionPressedBorder: 'transparent',
|
|
102
|
-
|
|
128
|
+
optionSelectedActiveBg: colors.warning[900],
|
|
129
|
+
optionSelectedHoverBg: colors.warning[800],
|
|
130
|
+
optionSelectedPressedBg: colors.warning[950],
|
|
131
|
+
optionSelectedBg: colors.warning[700],
|
|
103
132
|
}),
|
|
104
133
|
danger: createSelectPalette(danger, {
|
|
105
134
|
dropdownBorder: 'transparent',
|
|
106
135
|
optionActiveBorder: 'transparent',
|
|
136
|
+
optionActiveBg: colors.error[900],
|
|
137
|
+
optionActiveFg: text.primary,
|
|
107
138
|
optionActiveRing: 'transparent',
|
|
139
|
+
optionHoverBg: colors.error[800],
|
|
108
140
|
optionHoverBorder: 'transparent',
|
|
109
|
-
|
|
141
|
+
optionHoverFg: menu.item.hover.fg,
|
|
142
|
+
optionPressedBg: colors.error[950],
|
|
110
143
|
optionPressedBorder: 'transparent',
|
|
111
|
-
|
|
144
|
+
optionSelectedActiveBg: colors.error[900],
|
|
145
|
+
optionSelectedHoverBg: colors.error[800],
|
|
146
|
+
optionSelectedPressedBg: colors.error[950],
|
|
147
|
+
optionSelectedBg: colors.error[700],
|
|
112
148
|
}),
|
|
113
149
|
trigger: {
|
|
114
150
|
default: {
|
|
@@ -148,7 +184,7 @@ export const select = {
|
|
|
148
184
|
bg: menu.background,
|
|
149
185
|
fg: menu.item.default.fg,
|
|
150
186
|
border: 'transparent',
|
|
151
|
-
shadow:
|
|
187
|
+
shadow: shadow.lg,
|
|
152
188
|
search: {
|
|
153
189
|
bg: surface.default,
|
|
154
190
|
fg: text.primary,
|
|
@@ -166,6 +202,13 @@ export const select = {
|
|
|
166
202
|
bg: border.muted,
|
|
167
203
|
},
|
|
168
204
|
},
|
|
205
|
+
clearButton: {
|
|
206
|
+
fg: icons.muted,
|
|
207
|
+
hoverFg: status.error.fg,
|
|
208
|
+
hoverBg: status.error.bg,
|
|
209
|
+
focusBg: surface.subtle,
|
|
210
|
+
pressedBg: surface.active,
|
|
211
|
+
},
|
|
169
212
|
option: {
|
|
170
213
|
default: {
|
|
171
214
|
bg: menu.item.default.bg,
|
|
@@ -178,14 +221,14 @@ export const select = {
|
|
|
178
221
|
border: 'transparent',
|
|
179
222
|
},
|
|
180
223
|
active: {
|
|
181
|
-
bg:
|
|
182
|
-
fg:
|
|
224
|
+
bg: colors.vellira[600],
|
|
225
|
+
fg: text.primary,
|
|
183
226
|
border: 'transparent',
|
|
184
227
|
ring: 'transparent',
|
|
185
228
|
},
|
|
186
229
|
pressed: {
|
|
187
|
-
bg:
|
|
188
|
-
fg:
|
|
230
|
+
bg: colors.vellira[850],
|
|
231
|
+
fg: text.primary,
|
|
189
232
|
border: 'transparent',
|
|
190
233
|
},
|
|
191
234
|
selected: {
|
package/dist/dark/theme.d.ts
CHANGED
|
@@ -192,11 +192,11 @@ export declare const darkTheme: {
|
|
|
192
192
|
};
|
|
193
193
|
readonly typography: {
|
|
194
194
|
readonly family: {
|
|
195
|
-
readonly base: "
|
|
196
|
-
readonly extraLight: "
|
|
197
|
-
readonly regular: "
|
|
198
|
-
readonly medium: "
|
|
199
|
-
readonly semibold: "
|
|
195
|
+
readonly base: "VelliraSans, Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif";
|
|
196
|
+
readonly extraLight: "VelliraSans-ExtraLight";
|
|
197
|
+
readonly regular: "VelliraSans-Regular";
|
|
198
|
+
readonly medium: "VelliraSans-Medium";
|
|
199
|
+
readonly semibold: "VelliraSans-SemiBold";
|
|
200
200
|
};
|
|
201
201
|
readonly size: {
|
|
202
202
|
readonly xs: 12;
|
|
@@ -209,8 +209,8 @@ export declare const darkTheme: {
|
|
|
209
209
|
readonly weight: {
|
|
210
210
|
readonly light: "200";
|
|
211
211
|
readonly regular: "400";
|
|
212
|
-
readonly medium: "
|
|
213
|
-
readonly semibold: "
|
|
212
|
+
readonly medium: "500";
|
|
213
|
+
readonly semibold: "600";
|
|
214
214
|
};
|
|
215
215
|
readonly lineHeight: {
|
|
216
216
|
readonly xs: 16;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { createInputColorPalette } from './createInputPalette.js';
|
|
2
|
+
type DropdownBasePalette = ReturnType<typeof createInputColorPalette>;
|
|
3
|
+
type DropdownPaletteConfig = {
|
|
4
|
+
contentBorder?: string;
|
|
5
|
+
itemActiveBg?: string;
|
|
6
|
+
itemActiveFg?: string;
|
|
7
|
+
itemActiveRing?: string;
|
|
8
|
+
itemHoverBg?: string;
|
|
9
|
+
itemHoverFg?: string;
|
|
10
|
+
itemPressedBg?: string;
|
|
11
|
+
itemPressedFg?: string;
|
|
12
|
+
itemFg?: string;
|
|
13
|
+
itemBadgeBg?: string;
|
|
14
|
+
itemBadgeFg?: string;
|
|
15
|
+
itemBadgeBorder?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const createDropdownPalette: (palette: DropdownBasePalette, config?: DropdownPaletteConfig) => {
|
|
18
|
+
readonly ring: string;
|
|
19
|
+
readonly content: {
|
|
20
|
+
readonly border: string;
|
|
21
|
+
readonly ring: string;
|
|
22
|
+
};
|
|
23
|
+
readonly trigger: {
|
|
24
|
+
readonly default: {
|
|
25
|
+
readonly fg: string;
|
|
26
|
+
readonly border: "transparent";
|
|
27
|
+
readonly bg: string;
|
|
28
|
+
readonly placeholder: string;
|
|
29
|
+
readonly icon: string;
|
|
30
|
+
};
|
|
31
|
+
readonly hover: {
|
|
32
|
+
readonly bg: "transparent";
|
|
33
|
+
readonly fg: string;
|
|
34
|
+
readonly border: "transparent";
|
|
35
|
+
readonly placeholder: string;
|
|
36
|
+
readonly icon: string;
|
|
37
|
+
};
|
|
38
|
+
readonly focus: {
|
|
39
|
+
readonly fg: string;
|
|
40
|
+
readonly border: "transparent";
|
|
41
|
+
readonly bg: string;
|
|
42
|
+
readonly placeholder: string;
|
|
43
|
+
readonly icon: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
readonly item: {
|
|
47
|
+
readonly fg: string;
|
|
48
|
+
readonly active: {
|
|
49
|
+
readonly bg: string;
|
|
50
|
+
readonly fg: string;
|
|
51
|
+
readonly ring: string;
|
|
52
|
+
};
|
|
53
|
+
readonly hover: {
|
|
54
|
+
readonly bg: string;
|
|
55
|
+
readonly fg: string;
|
|
56
|
+
};
|
|
57
|
+
readonly pressed: {
|
|
58
|
+
readonly bg: string;
|
|
59
|
+
readonly fg: string;
|
|
60
|
+
};
|
|
61
|
+
readonly badge: {
|
|
62
|
+
readonly bg: string;
|
|
63
|
+
readonly fg: string;
|
|
64
|
+
readonly border: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
export {};
|
|
69
|
+
//# sourceMappingURL=createDropdownPalette.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createDropdownPalette.d.ts","sourceRoot":"","sources":["../../src/factories/createDropdownPalette.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAEvE,KAAK,mBAAmB,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACtE,KAAK,qBAAqB,GAAG;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAChC,SAAS,mBAAmB,EAC5B,SAAQ,qBAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+CvB,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export const createDropdownPalette = (palette, config = {}) => ({
|
|
2
|
+
ring: palette.ring,
|
|
3
|
+
content: {
|
|
4
|
+
border: config.contentBorder ?? palette.outline.default.border,
|
|
5
|
+
ring: palette.ring,
|
|
6
|
+
},
|
|
7
|
+
trigger: {
|
|
8
|
+
default: {
|
|
9
|
+
...palette.outline.default,
|
|
10
|
+
fg: palette.outline.default.icon,
|
|
11
|
+
border: 'transparent',
|
|
12
|
+
},
|
|
13
|
+
hover: {
|
|
14
|
+
...palette.outline.hover,
|
|
15
|
+
bg: 'transparent',
|
|
16
|
+
fg: palette.outline.hover.icon,
|
|
17
|
+
border: 'transparent',
|
|
18
|
+
},
|
|
19
|
+
focus: {
|
|
20
|
+
...palette.outline.focus,
|
|
21
|
+
fg: palette.outline.focus.icon,
|
|
22
|
+
border: 'transparent',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
item: {
|
|
26
|
+
fg: config.itemFg ?? palette.outline.default.border,
|
|
27
|
+
active: {
|
|
28
|
+
bg: config.itemActiveBg ?? palette.outline.hover.bg,
|
|
29
|
+
fg: config.itemActiveFg ?? palette.outline.hover.fg,
|
|
30
|
+
ring: config.itemActiveRing ?? palette.ring,
|
|
31
|
+
},
|
|
32
|
+
hover: {
|
|
33
|
+
bg: config.itemHoverBg ?? palette.outline.hover.bg,
|
|
34
|
+
fg: config.itemHoverFg ?? palette.outline.hover.fg,
|
|
35
|
+
},
|
|
36
|
+
pressed: {
|
|
37
|
+
bg: config.itemPressedBg ?? palette.outline.focus.bg,
|
|
38
|
+
fg: config.itemPressedFg ?? palette.outline.focus.fg,
|
|
39
|
+
},
|
|
40
|
+
badge: {
|
|
41
|
+
bg: config.itemBadgeBg ?? palette.soft.default.bg,
|
|
42
|
+
fg: config.itemBadgeFg ?? palette.soft.default.fg,
|
|
43
|
+
border: config.itemBadgeBorder ?? palette.soft.default.border,
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
});
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { createInputColorPalette } from './createInputPalette.js';
|
|
2
2
|
type SelectBasePalette = ReturnType<typeof createInputColorPalette>;
|
|
3
3
|
type SelectPaletteConfig = {
|
|
4
|
+
optionActiveBg?: string;
|
|
4
5
|
dropdownBorder?: string;
|
|
5
6
|
optionActiveBorder?: string;
|
|
7
|
+
optionActiveFg?: string;
|
|
6
8
|
optionActiveRing?: string;
|
|
7
9
|
optionHoverBg?: string;
|
|
8
10
|
optionHoverBorder?: string;
|
|
@@ -10,8 +12,18 @@ type SelectPaletteConfig = {
|
|
|
10
12
|
optionPressedBg?: string;
|
|
11
13
|
optionPressedBorder?: string;
|
|
12
14
|
optionPressedFg?: string;
|
|
15
|
+
optionSelectedActiveBg?: string;
|
|
16
|
+
optionSelectedActiveBorder?: string;
|
|
17
|
+
optionSelectedActiveFg?: string;
|
|
13
18
|
optionSelectedBg?: string;
|
|
14
19
|
optionSelectedBorder?: string;
|
|
20
|
+
optionSelectedFg?: string;
|
|
21
|
+
optionSelectedHoverBg?: string;
|
|
22
|
+
optionSelectedHoverBorder?: string;
|
|
23
|
+
optionSelectedHoverFg?: string;
|
|
24
|
+
optionSelectedPressedBg?: string;
|
|
25
|
+
optionSelectedPressedBorder?: string;
|
|
26
|
+
optionSelectedPressedFg?: string;
|
|
15
27
|
};
|
|
16
28
|
export declare const createSelectPalette: (palette: SelectBasePalette, config?: SelectPaletteConfig) => {
|
|
17
29
|
readonly ring: string;
|
|
@@ -37,6 +49,22 @@ export declare const createSelectPalette: (palette: SelectBasePalette, config?:
|
|
|
37
49
|
fg: string;
|
|
38
50
|
border: string;
|
|
39
51
|
};
|
|
52
|
+
selectedHover: {
|
|
53
|
+
bg: string;
|
|
54
|
+
fg: string;
|
|
55
|
+
border: string;
|
|
56
|
+
};
|
|
57
|
+
selectedActive: {
|
|
58
|
+
bg: string;
|
|
59
|
+
fg: string;
|
|
60
|
+
border: string;
|
|
61
|
+
ring: string;
|
|
62
|
+
};
|
|
63
|
+
selectedPressed: {
|
|
64
|
+
bg: string;
|
|
65
|
+
fg: string;
|
|
66
|
+
border: string;
|
|
67
|
+
};
|
|
40
68
|
pressed: {
|
|
41
69
|
bg: string;
|
|
42
70
|
fg: string;
|
|
@@ -73,6 +101,22 @@ export declare const createSelectPalette: (palette: SelectBasePalette, config?:
|
|
|
73
101
|
fg: string;
|
|
74
102
|
border: string;
|
|
75
103
|
};
|
|
104
|
+
selectedHover: {
|
|
105
|
+
bg: string;
|
|
106
|
+
fg: string;
|
|
107
|
+
border: string;
|
|
108
|
+
};
|
|
109
|
+
selectedActive: {
|
|
110
|
+
bg: string;
|
|
111
|
+
fg: string;
|
|
112
|
+
border: string;
|
|
113
|
+
ring: string;
|
|
114
|
+
};
|
|
115
|
+
selectedPressed: {
|
|
116
|
+
bg: string;
|
|
117
|
+
fg: string;
|
|
118
|
+
border: string;
|
|
119
|
+
};
|
|
76
120
|
pressed: {
|
|
77
121
|
bg: string;
|
|
78
122
|
fg: string;
|
|
@@ -109,6 +153,22 @@ export declare const createSelectPalette: (palette: SelectBasePalette, config?:
|
|
|
109
153
|
fg: string;
|
|
110
154
|
border: string;
|
|
111
155
|
};
|
|
156
|
+
selectedHover: {
|
|
157
|
+
bg: string;
|
|
158
|
+
fg: string;
|
|
159
|
+
border: string;
|
|
160
|
+
};
|
|
161
|
+
selectedActive: {
|
|
162
|
+
bg: string;
|
|
163
|
+
fg: string;
|
|
164
|
+
border: string;
|
|
165
|
+
ring: string;
|
|
166
|
+
};
|
|
167
|
+
selectedPressed: {
|
|
168
|
+
bg: string;
|
|
169
|
+
fg: string;
|
|
170
|
+
border: string;
|
|
171
|
+
};
|
|
112
172
|
pressed: {
|
|
113
173
|
bg: string;
|
|
114
174
|
fg: string;
|
|
@@ -146,6 +206,22 @@ export declare const createSelectPalette: (palette: SelectBasePalette, config?:
|
|
|
146
206
|
fg: string;
|
|
147
207
|
border: string;
|
|
148
208
|
};
|
|
209
|
+
selectedHover: {
|
|
210
|
+
bg: string;
|
|
211
|
+
fg: string;
|
|
212
|
+
border: string;
|
|
213
|
+
};
|
|
214
|
+
selectedActive: {
|
|
215
|
+
bg: string;
|
|
216
|
+
fg: string;
|
|
217
|
+
border: string;
|
|
218
|
+
ring: string;
|
|
219
|
+
};
|
|
220
|
+
selectedPressed: {
|
|
221
|
+
bg: string;
|
|
222
|
+
fg: string;
|
|
223
|
+
border: string;
|
|
224
|
+
};
|
|
149
225
|
pressed: {
|
|
150
226
|
bg: string;
|
|
151
227
|
fg: string;
|
|
@@ -182,6 +258,22 @@ export declare const createSelectPalette: (palette: SelectBasePalette, config?:
|
|
|
182
258
|
fg: string;
|
|
183
259
|
border: string;
|
|
184
260
|
};
|
|
261
|
+
selectedHover: {
|
|
262
|
+
bg: string;
|
|
263
|
+
fg: string;
|
|
264
|
+
border: string;
|
|
265
|
+
};
|
|
266
|
+
selectedActive: {
|
|
267
|
+
bg: string;
|
|
268
|
+
fg: string;
|
|
269
|
+
border: string;
|
|
270
|
+
ring: string;
|
|
271
|
+
};
|
|
272
|
+
selectedPressed: {
|
|
273
|
+
bg: string;
|
|
274
|
+
fg: string;
|
|
275
|
+
border: string;
|
|
276
|
+
};
|
|
185
277
|
pressed: {
|
|
186
278
|
bg: string;
|
|
187
279
|
fg: string;
|
|
@@ -218,6 +310,22 @@ export declare const createSelectPalette: (palette: SelectBasePalette, config?:
|
|
|
218
310
|
fg: string;
|
|
219
311
|
border: string;
|
|
220
312
|
};
|
|
313
|
+
selectedHover: {
|
|
314
|
+
bg: string;
|
|
315
|
+
fg: string;
|
|
316
|
+
border: string;
|
|
317
|
+
};
|
|
318
|
+
selectedActive: {
|
|
319
|
+
bg: string;
|
|
320
|
+
fg: string;
|
|
321
|
+
border: string;
|
|
322
|
+
ring: string;
|
|
323
|
+
};
|
|
324
|
+
selectedPressed: {
|
|
325
|
+
bg: string;
|
|
326
|
+
fg: string;
|
|
327
|
+
border: string;
|
|
328
|
+
};
|
|
221
329
|
pressed: {
|
|
222
330
|
bg: string;
|
|
223
331
|
fg: string;
|
|
@@ -255,6 +363,22 @@ export declare const createSelectPalette: (palette: SelectBasePalette, config?:
|
|
|
255
363
|
fg: string;
|
|
256
364
|
border: string;
|
|
257
365
|
};
|
|
366
|
+
selectedHover: {
|
|
367
|
+
bg: string;
|
|
368
|
+
fg: string;
|
|
369
|
+
border: string;
|
|
370
|
+
};
|
|
371
|
+
selectedActive: {
|
|
372
|
+
bg: string;
|
|
373
|
+
fg: string;
|
|
374
|
+
border: string;
|
|
375
|
+
ring: string;
|
|
376
|
+
};
|
|
377
|
+
selectedPressed: {
|
|
378
|
+
bg: string;
|
|
379
|
+
fg: string;
|
|
380
|
+
border: string;
|
|
381
|
+
};
|
|
258
382
|
pressed: {
|
|
259
383
|
bg: string;
|
|
260
384
|
fg: string;
|
|
@@ -291,6 +415,22 @@ export declare const createSelectPalette: (palette: SelectBasePalette, config?:
|
|
|
291
415
|
fg: string;
|
|
292
416
|
border: string;
|
|
293
417
|
};
|
|
418
|
+
selectedHover: {
|
|
419
|
+
bg: string;
|
|
420
|
+
fg: string;
|
|
421
|
+
border: string;
|
|
422
|
+
};
|
|
423
|
+
selectedActive: {
|
|
424
|
+
bg: string;
|
|
425
|
+
fg: string;
|
|
426
|
+
border: string;
|
|
427
|
+
ring: string;
|
|
428
|
+
};
|
|
429
|
+
selectedPressed: {
|
|
430
|
+
bg: string;
|
|
431
|
+
fg: string;
|
|
432
|
+
border: string;
|
|
433
|
+
};
|
|
294
434
|
pressed: {
|
|
295
435
|
bg: string;
|
|
296
436
|
fg: string;
|
|
@@ -327,6 +467,22 @@ export declare const createSelectPalette: (palette: SelectBasePalette, config?:
|
|
|
327
467
|
fg: string;
|
|
328
468
|
border: string;
|
|
329
469
|
};
|
|
470
|
+
selectedHover: {
|
|
471
|
+
bg: string;
|
|
472
|
+
fg: string;
|
|
473
|
+
border: string;
|
|
474
|
+
};
|
|
475
|
+
selectedActive: {
|
|
476
|
+
bg: string;
|
|
477
|
+
fg: string;
|
|
478
|
+
border: string;
|
|
479
|
+
ring: string;
|
|
480
|
+
};
|
|
481
|
+
selectedPressed: {
|
|
482
|
+
bg: string;
|
|
483
|
+
fg: string;
|
|
484
|
+
border: string;
|
|
485
|
+
};
|
|
330
486
|
pressed: {
|
|
331
487
|
bg: string;
|
|
332
488
|
fg: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSelectPalette.d.ts","sourceRoot":"","sources":["../../src/factories/createSelectPalette.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAEvE,KAAK,iBAAiB,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAEpE,KAAK,mBAAmB,GAAG;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,gBAAgB,CAAC,EAAE,MAAM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M,CAAC;IAC/B,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC,CAAC;AA8DF,eAAO,MAAM,mBAAmB,GAC9B,SAAS,iBAAiB,EAC1B,SAAQ,mBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOrB,CAAC"}
|
|
@@ -1,38 +1,57 @@
|
|
|
1
|
-
const createSelectVariant = (palette, variant, config) =>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
ring: config.optionActiveRing ?? palette.ring,
|
|
1
|
+
const createSelectVariant = (palette, variant, config) => {
|
|
2
|
+
const selected = {
|
|
3
|
+
bg: config.optionSelectedBg ?? palette.soft.default.bg,
|
|
4
|
+
fg: config.optionSelectedFg ?? palette.soft.default.fg,
|
|
5
|
+
border: config.optionSelectedBorder ?? palette.outline.default.border,
|
|
6
|
+
};
|
|
7
|
+
return {
|
|
8
|
+
...palette[variant],
|
|
9
|
+
dropdown: {
|
|
10
|
+
border: config.dropdownBorder ?? palette.outline.default.border,
|
|
11
|
+
ring: palette.ring,
|
|
13
12
|
},
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
option: {
|
|
14
|
+
active: {
|
|
15
|
+
bg: config.optionActiveBg ?? palette[variant].hover.bg,
|
|
16
|
+
fg: config.optionActiveFg ?? palette[variant].hover.fg,
|
|
17
|
+
border: config.optionActiveBorder ?? palette[variant].hover.border,
|
|
18
|
+
ring: config.optionActiveRing ?? palette.ring,
|
|
19
|
+
},
|
|
20
|
+
hover: {
|
|
21
|
+
bg: config.optionHoverBg ?? palette[variant].hover.bg,
|
|
22
|
+
fg: config.optionHoverFg ?? palette[variant].hover.fg,
|
|
23
|
+
border: config.optionHoverBorder ?? palette[variant].hover.border,
|
|
24
|
+
},
|
|
25
|
+
selected,
|
|
26
|
+
selectedHover: {
|
|
27
|
+
bg: config.optionSelectedHoverBg ?? selected.bg,
|
|
28
|
+
fg: config.optionSelectedHoverFg ?? selected.fg,
|
|
29
|
+
border: config.optionSelectedHoverBorder ?? selected.border,
|
|
30
|
+
},
|
|
31
|
+
selectedActive: {
|
|
32
|
+
bg: config.optionSelectedActiveBg ?? selected.bg,
|
|
33
|
+
fg: config.optionSelectedActiveFg ?? selected.fg,
|
|
34
|
+
border: config.optionSelectedActiveBorder ?? selected.border,
|
|
35
|
+
ring: config.optionActiveRing ?? palette.ring,
|
|
36
|
+
},
|
|
37
|
+
selectedPressed: {
|
|
38
|
+
bg: config.optionSelectedPressedBg ?? selected.bg,
|
|
39
|
+
fg: config.optionSelectedPressedFg ?? selected.fg,
|
|
40
|
+
border: config.optionSelectedPressedBorder ?? selected.border,
|
|
41
|
+
},
|
|
42
|
+
pressed: {
|
|
43
|
+
bg: config.optionPressedBg ?? palette[variant].focus.bg,
|
|
44
|
+
fg: config.optionPressedFg ?? palette[variant].focus.fg,
|
|
45
|
+
border: config.optionPressedBorder ?? palette[variant].focus.border,
|
|
46
|
+
},
|
|
47
|
+
badge: {
|
|
48
|
+
bg: palette.soft.default.bg,
|
|
49
|
+
fg: palette.soft.default.fg,
|
|
50
|
+
border: palette.soft.default.border,
|
|
51
|
+
},
|
|
18
52
|
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
fg: palette.soft.default.fg,
|
|
22
|
-
border: config.optionSelectedBorder ?? palette.outline.default.border,
|
|
23
|
-
},
|
|
24
|
-
pressed: {
|
|
25
|
-
bg: config.optionPressedBg ?? palette[variant].focus.bg,
|
|
26
|
-
fg: config.optionPressedFg ?? palette[variant].focus.fg,
|
|
27
|
-
border: config.optionPressedBorder ?? palette[variant].focus.border,
|
|
28
|
-
},
|
|
29
|
-
badge: {
|
|
30
|
-
bg: palette.soft.default.bg,
|
|
31
|
-
fg: palette.soft.default.fg,
|
|
32
|
-
border: palette.soft.default.border,
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
});
|
|
53
|
+
};
|
|
54
|
+
};
|
|
36
55
|
export const createSelectPalette = (palette, config = {}) => ({
|
|
37
56
|
ring: palette.ring,
|
|
38
57
|
outline: createSelectVariant(palette, 'outline', config),
|