@vellira-ui/tokens 2.74.0 → 2.76.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 +81 -0
- package/dist/dark/components/index.d.ts +1 -0
- package/dist/dark/components/index.d.ts.map +1 -1
- package/dist/dark/components/index.js +1 -0
- package/dist/dark/components/switch.d.ts +2 -0
- package/dist/dark/components/switch.d.ts.map +1 -0
- package/dist/dark/components/switch.js +47 -0
- package/dist/factories/createSwitchTokens.d.ts +31 -0
- package/dist/factories/createSwitchTokens.d.ts.map +1 -0
- package/dist/factories/createSwitchTokens.js +1 -0
- package/dist/factories/index.d.ts +1 -0
- package/dist/factories/index.d.ts.map +1 -1
- package/dist/factories/index.js +1 -0
- 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 +108 -0
- package/dist/highContrast/components/index.d.ts +1 -0
- package/dist/highContrast/components/index.d.ts.map +1 -1
- package/dist/highContrast/components/index.js +1 -0
- package/dist/highContrast/components/switch.d.ts +2 -0
- package/dist/highContrast/components/switch.d.ts.map +1 -0
- package/dist/highContrast/components/switch.js +47 -0
- package/dist/light/components/index.d.ts +1 -0
- package/dist/light/components/index.d.ts.map +1 -1
- package/dist/light/components/index.js +1 -0
- package/dist/light/components/switch.d.ts +2 -0
- package/dist/light/components/switch.d.ts.map +1 -0
- package/dist/light/components/switch.js +47 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-types.d.ts","sourceRoot":"","sources":["../../src/generated/token-types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,eAAO,MAAM,UAAU,6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[
|
|
|
2119
2119
|
'components.select.warning.soft.option.selectedPressed.bg',
|
|
2120
2120
|
'components.select.warning.soft.option.selectedPressed.border',
|
|
2121
2121
|
'components.select.warning.soft.option.selectedPressed.fg',
|
|
2122
|
+
'components.switch.disabled.thumbBg',
|
|
2123
|
+
'components.switch.disabled.trackBg',
|
|
2124
|
+
'components.switch.disabled.trackBorder',
|
|
2125
|
+
'components.switch.errorBorder',
|
|
2126
|
+
'components.switch.errorRing',
|
|
2127
|
+
'components.switch.focusRing',
|
|
2128
|
+
'components.switch.geometry.borderWidth',
|
|
2129
|
+
'components.switch.geometry.focusRingOffset',
|
|
2130
|
+
'components.switch.geometry.focusRingWidth',
|
|
2131
|
+
'components.switch.geometry.padding',
|
|
2132
|
+
'components.switch.geometry.pressScale',
|
|
2133
|
+
'components.switch.geometry.thumbSize',
|
|
2134
|
+
'components.switch.geometry.thumbTravel',
|
|
2135
|
+
'components.switch.geometry.trackHeight',
|
|
2136
|
+
'components.switch.geometry.trackWidth',
|
|
2137
|
+
'components.switch.off.thumbBg',
|
|
2138
|
+
'components.switch.off.trackBg',
|
|
2139
|
+
'components.switch.off.trackBorder',
|
|
2140
|
+
'components.switch.on.default.thumbBg',
|
|
2141
|
+
'components.switch.on.default.trackBg',
|
|
2142
|
+
'components.switch.on.default.trackBorder',
|
|
2143
|
+
'components.switch.on.hover.thumbBg',
|
|
2144
|
+
'components.switch.on.hover.trackBg',
|
|
2145
|
+
'components.switch.on.hover.trackBorder',
|
|
2146
|
+
'components.switch.on.pressed.thumbBg',
|
|
2147
|
+
'components.switch.on.pressed.trackBg',
|
|
2148
|
+
'components.switch.on.pressed.trackBorder',
|
|
2122
2149
|
'components.tabs.danger.focusRing',
|
|
2123
2150
|
'components.tabs.danger.indicator.bg',
|
|
2124
2151
|
'components.tabs.danger.indicator.hoverBg',
|
|
@@ -4249,6 +4276,33 @@ export const tokenPaths = [
|
|
|
4249
4276
|
'components.select.warning.soft.option.selectedPressed.bg',
|
|
4250
4277
|
'components.select.warning.soft.option.selectedPressed.border',
|
|
4251
4278
|
'components.select.warning.soft.option.selectedPressed.fg',
|
|
4279
|
+
'components.switch.disabled.thumbBg',
|
|
4280
|
+
'components.switch.disabled.trackBg',
|
|
4281
|
+
'components.switch.disabled.trackBorder',
|
|
4282
|
+
'components.switch.errorBorder',
|
|
4283
|
+
'components.switch.errorRing',
|
|
4284
|
+
'components.switch.focusRing',
|
|
4285
|
+
'components.switch.geometry.borderWidth',
|
|
4286
|
+
'components.switch.geometry.focusRingOffset',
|
|
4287
|
+
'components.switch.geometry.focusRingWidth',
|
|
4288
|
+
'components.switch.geometry.padding',
|
|
4289
|
+
'components.switch.geometry.pressScale',
|
|
4290
|
+
'components.switch.geometry.thumbSize',
|
|
4291
|
+
'components.switch.geometry.thumbTravel',
|
|
4292
|
+
'components.switch.geometry.trackHeight',
|
|
4293
|
+
'components.switch.geometry.trackWidth',
|
|
4294
|
+
'components.switch.off.thumbBg',
|
|
4295
|
+
'components.switch.off.trackBg',
|
|
4296
|
+
'components.switch.off.trackBorder',
|
|
4297
|
+
'components.switch.on.default.thumbBg',
|
|
4298
|
+
'components.switch.on.default.trackBg',
|
|
4299
|
+
'components.switch.on.default.trackBorder',
|
|
4300
|
+
'components.switch.on.hover.thumbBg',
|
|
4301
|
+
'components.switch.on.hover.trackBg',
|
|
4302
|
+
'components.switch.on.hover.trackBorder',
|
|
4303
|
+
'components.switch.on.pressed.thumbBg',
|
|
4304
|
+
'components.switch.on.pressed.trackBg',
|
|
4305
|
+
'components.switch.on.pressed.trackBorder',
|
|
4252
4306
|
'components.tabs.danger.focusRing',
|
|
4253
4307
|
'components.tabs.danger.indicator.bg',
|
|
4254
4308
|
'components.tabs.danger.indicator.hoverBg',
|
|
@@ -6820,6 +6874,33 @@ export const themeCssVariableNames = [
|
|
|
6820
6874
|
'--surface-muted',
|
|
6821
6875
|
'--surface-pressed',
|
|
6822
6876
|
'--surface-subtle',
|
|
6877
|
+
'--switch-disabled-thumb-bg',
|
|
6878
|
+
'--switch-disabled-track-bg',
|
|
6879
|
+
'--switch-disabled-track-border',
|
|
6880
|
+
'--switch-error-border',
|
|
6881
|
+
'--switch-error-ring',
|
|
6882
|
+
'--switch-focus-ring',
|
|
6883
|
+
'--switch-geometry-border-width',
|
|
6884
|
+
'--switch-geometry-focus-ring-offset',
|
|
6885
|
+
'--switch-geometry-focus-ring-width',
|
|
6886
|
+
'--switch-geometry-padding',
|
|
6887
|
+
'--switch-geometry-press-scale',
|
|
6888
|
+
'--switch-geometry-thumb-size',
|
|
6889
|
+
'--switch-geometry-thumb-travel',
|
|
6890
|
+
'--switch-geometry-track-height',
|
|
6891
|
+
'--switch-geometry-track-width',
|
|
6892
|
+
'--switch-off-thumb-bg',
|
|
6893
|
+
'--switch-off-track-bg',
|
|
6894
|
+
'--switch-off-track-border',
|
|
6895
|
+
'--switch-on-default-thumb-bg',
|
|
6896
|
+
'--switch-on-default-track-bg',
|
|
6897
|
+
'--switch-on-default-track-border',
|
|
6898
|
+
'--switch-on-hover-thumb-bg',
|
|
6899
|
+
'--switch-on-hover-track-bg',
|
|
6900
|
+
'--switch-on-hover-track-border',
|
|
6901
|
+
'--switch-on-pressed-thumb-bg',
|
|
6902
|
+
'--switch-on-pressed-track-bg',
|
|
6903
|
+
'--switch-on-pressed-track-border',
|
|
6823
6904
|
'--tabs-danger-focus-ring',
|
|
6824
6905
|
'--tabs-danger-indicator-bg',
|
|
6825
6906
|
'--tabs-danger-indicator-hover-bg',
|
|
@@ -9125,6 +9206,33 @@ export const cssVariableNames = [
|
|
|
9125
9206
|
'--surface-muted',
|
|
9126
9207
|
'--surface-pressed',
|
|
9127
9208
|
'--surface-subtle',
|
|
9209
|
+
'--switch-disabled-thumb-bg',
|
|
9210
|
+
'--switch-disabled-track-bg',
|
|
9211
|
+
'--switch-disabled-track-border',
|
|
9212
|
+
'--switch-error-border',
|
|
9213
|
+
'--switch-error-ring',
|
|
9214
|
+
'--switch-focus-ring',
|
|
9215
|
+
'--switch-geometry-border-width',
|
|
9216
|
+
'--switch-geometry-focus-ring-offset',
|
|
9217
|
+
'--switch-geometry-focus-ring-width',
|
|
9218
|
+
'--switch-geometry-padding',
|
|
9219
|
+
'--switch-geometry-press-scale',
|
|
9220
|
+
'--switch-geometry-thumb-size',
|
|
9221
|
+
'--switch-geometry-thumb-travel',
|
|
9222
|
+
'--switch-geometry-track-height',
|
|
9223
|
+
'--switch-geometry-track-width',
|
|
9224
|
+
'--switch-off-thumb-bg',
|
|
9225
|
+
'--switch-off-track-bg',
|
|
9226
|
+
'--switch-off-track-border',
|
|
9227
|
+
'--switch-on-default-thumb-bg',
|
|
9228
|
+
'--switch-on-default-track-bg',
|
|
9229
|
+
'--switch-on-default-track-border',
|
|
9230
|
+
'--switch-on-hover-thumb-bg',
|
|
9231
|
+
'--switch-on-hover-track-bg',
|
|
9232
|
+
'--switch-on-hover-track-border',
|
|
9233
|
+
'--switch-on-pressed-thumb-bg',
|
|
9234
|
+
'--switch-on-pressed-track-bg',
|
|
9235
|
+
'--switch-on-pressed-track-border',
|
|
9128
9236
|
'--tabs-danger-focus-ring',
|
|
9129
9237
|
'--tabs-danger-indicator-bg',
|
|
9130
9238
|
'--tabs-danger-indicator-hover-bg',
|
|
@@ -9,6 +9,7 @@ export { popover } from './popover.js';
|
|
|
9
9
|
export { radio } from './radio.js';
|
|
10
10
|
export { radioGroup } from './radioGroup.js';
|
|
11
11
|
export { select } from './select.js';
|
|
12
|
+
export { switchTokens as switch } from './switch.js';
|
|
12
13
|
export { tabs } from './tabs.js';
|
|
13
14
|
export { tooltip } from './tooltip.js';
|
|
14
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/highContrast/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC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AAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -9,5 +9,6 @@ export { popover } from './popover.js';
|
|
|
9
9
|
export { radio } from './radio.js';
|
|
10
10
|
export { radioGroup } from './radioGroup.js';
|
|
11
11
|
export { select } from './select.js';
|
|
12
|
+
export { switchTokens as switch } from './switch.js';
|
|
12
13
|
export { tabs } from './tabs.js';
|
|
13
14
|
export { tooltip } from './tooltip.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../../src/highContrast/components/switch.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY,oEA0CvB,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { createSwitchTokens } from '../../factories/createSwitchTokens.js';
|
|
2
|
+
import { control } from '../semantic/control.js';
|
|
3
|
+
import { focus } from '../semantic/focus.js';
|
|
4
|
+
import { status } from '../semantic/status.js';
|
|
5
|
+
export const switchTokens = createSwitchTokens({
|
|
6
|
+
geometry: {
|
|
7
|
+
trackWidth: 44,
|
|
8
|
+
trackHeight: 24,
|
|
9
|
+
borderWidth: 2,
|
|
10
|
+
padding: 1,
|
|
11
|
+
thumbSize: 18,
|
|
12
|
+
thumbTravel: 20,
|
|
13
|
+
focusRingWidth: 2,
|
|
14
|
+
focusRingOffset: 2,
|
|
15
|
+
pressScale: 0.98,
|
|
16
|
+
},
|
|
17
|
+
off: {
|
|
18
|
+
trackBg: control.default.bg,
|
|
19
|
+
trackBorder: control.default.border,
|
|
20
|
+
thumbBg: control.default.fg,
|
|
21
|
+
},
|
|
22
|
+
on: {
|
|
23
|
+
default: {
|
|
24
|
+
trackBg: control.selected.default.bg,
|
|
25
|
+
trackBorder: control.selected.default.border,
|
|
26
|
+
thumbBg: control.selected.default.fg,
|
|
27
|
+
},
|
|
28
|
+
hover: {
|
|
29
|
+
trackBg: control.selected.hover.bg,
|
|
30
|
+
trackBorder: control.selected.hover.border,
|
|
31
|
+
thumbBg: control.selected.hover.fg,
|
|
32
|
+
},
|
|
33
|
+
pressed: {
|
|
34
|
+
trackBg: control.selected.active.bg,
|
|
35
|
+
trackBorder: control.selected.active.border,
|
|
36
|
+
thumbBg: control.selected.active.fg,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
focusRing: focus.ring.color,
|
|
40
|
+
errorBorder: status.error.border,
|
|
41
|
+
errorRing: status.error.ring,
|
|
42
|
+
disabled: {
|
|
43
|
+
trackBg: control.disabled.bg,
|
|
44
|
+
trackBorder: control.disabled.border,
|
|
45
|
+
thumbBg: control.disabled.fg,
|
|
46
|
+
},
|
|
47
|
+
});
|
|
@@ -9,6 +9,7 @@ export { popover } from './popover.js';
|
|
|
9
9
|
export { radio } from './radio.js';
|
|
10
10
|
export { radioGroup } from './radioGroup.js';
|
|
11
11
|
export { select } from './select.js';
|
|
12
|
+
export { switchTokens as switch } from './switch.js';
|
|
12
13
|
export { tabs } from './tabs.js';
|
|
13
14
|
export { tooltip } from './tooltip.js';
|
|
14
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/light/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/light/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,YAAY,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -9,5 +9,6 @@ export { popover } from './popover.js';
|
|
|
9
9
|
export { radio } from './radio.js';
|
|
10
10
|
export { radioGroup } from './radioGroup.js';
|
|
11
11
|
export { select } from './select.js';
|
|
12
|
+
export { switchTokens as switch } from './switch.js';
|
|
12
13
|
export { tabs } from './tabs.js';
|
|
13
14
|
export { tooltip } from './tooltip.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../../src/light/components/switch.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY,oEA0CvB,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { createSwitchTokens } from '../../factories/createSwitchTokens.js';
|
|
2
|
+
import { control } from '../semantic/control.js';
|
|
3
|
+
import { focus } from '../semantic/focus.js';
|
|
4
|
+
import { status } from '../semantic/status.js';
|
|
5
|
+
export const switchTokens = createSwitchTokens({
|
|
6
|
+
geometry: {
|
|
7
|
+
trackWidth: 44,
|
|
8
|
+
trackHeight: 24,
|
|
9
|
+
borderWidth: 2,
|
|
10
|
+
padding: 1,
|
|
11
|
+
thumbSize: 18,
|
|
12
|
+
thumbTravel: 20,
|
|
13
|
+
focusRingWidth: 2,
|
|
14
|
+
focusRingOffset: 2,
|
|
15
|
+
pressScale: 0.98,
|
|
16
|
+
},
|
|
17
|
+
off: {
|
|
18
|
+
trackBg: control.default.bg,
|
|
19
|
+
trackBorder: control.default.border,
|
|
20
|
+
thumbBg: control.default.fg,
|
|
21
|
+
},
|
|
22
|
+
on: {
|
|
23
|
+
default: {
|
|
24
|
+
trackBg: control.selected.default.bg,
|
|
25
|
+
trackBorder: control.selected.default.border,
|
|
26
|
+
thumbBg: control.selected.default.fg,
|
|
27
|
+
},
|
|
28
|
+
hover: {
|
|
29
|
+
trackBg: control.selected.hover.bg,
|
|
30
|
+
trackBorder: control.selected.hover.border,
|
|
31
|
+
thumbBg: control.selected.hover.fg,
|
|
32
|
+
},
|
|
33
|
+
pressed: {
|
|
34
|
+
trackBg: control.selected.active.bg,
|
|
35
|
+
trackBorder: control.selected.active.border,
|
|
36
|
+
thumbBg: control.selected.active.fg,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
focusRing: focus.ring.color,
|
|
40
|
+
errorBorder: status.error.border,
|
|
41
|
+
errorRing: status.error.ring,
|
|
42
|
+
disabled: {
|
|
43
|
+
trackBg: control.disabled.bg,
|
|
44
|
+
trackBorder: control.disabled.border,
|
|
45
|
+
thumbBg: control.disabled.fg,
|
|
46
|
+
},
|
|
47
|
+
});
|