@vellira-ui/tokens 2.28.0 → 2.30.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 (63) hide show
  1. package/dist/css/tokens.css +1045 -56
  2. package/dist/dark/components/button.d.ts +15 -15
  3. package/dist/dark/components/button.js +1 -1
  4. package/dist/dark/components/checkbox.d.ts +15 -15
  5. package/dist/dark/components/checkbox.js +1 -1
  6. package/dist/dark/components/formField.d.ts +52 -0
  7. package/dist/dark/components/formField.d.ts.map +1 -1
  8. package/dist/dark/components/formField.js +55 -0
  9. package/dist/dark/components/input.d.ts +109 -4
  10. package/dist/dark/components/input.d.ts.map +1 -1
  11. package/dist/dark/components/input.js +81 -4
  12. package/dist/dark/components/radio.d.ts +35 -25
  13. package/dist/dark/components/radio.d.ts.map +1 -1
  14. package/dist/dark/components/radio.js +117 -27
  15. package/dist/factories/createButtonPalette.d.ts.map +1 -0
  16. package/dist/factories/createCheckboxPalette.d.ts.map +1 -0
  17. package/dist/factories/createInputPalette.d.ts +78 -0
  18. package/dist/factories/createInputPalette.d.ts.map +1 -0
  19. package/dist/factories/createInputPalette.js +78 -0
  20. package/dist/factories/createRadioPalette.d.ts +19 -0
  21. package/dist/factories/createRadioPalette.d.ts.map +1 -0
  22. package/dist/factories/createRadioPalette.js +6 -0
  23. package/dist/factories/index.d.ts +5 -0
  24. package/dist/factories/index.d.ts.map +1 -0
  25. package/dist/factories/index.js +4 -0
  26. package/dist/generated/token-types.d.ts +4 -4
  27. package/dist/generated/token-types.d.ts.map +1 -1
  28. package/dist/generated/token-types.js +1388 -68
  29. package/dist/highContrast/components/button.d.ts +15 -15
  30. package/dist/highContrast/components/button.js +1 -1
  31. package/dist/highContrast/components/checkbox.d.ts +15 -15
  32. package/dist/highContrast/components/checkbox.js +1 -1
  33. package/dist/highContrast/components/formField.d.ts +52 -0
  34. package/dist/highContrast/components/formField.d.ts.map +1 -1
  35. package/dist/highContrast/components/formField.js +55 -0
  36. package/dist/highContrast/components/input.d.ts +109 -4
  37. package/dist/highContrast/components/input.d.ts.map +1 -1
  38. package/dist/highContrast/components/input.js +101 -4
  39. package/dist/highContrast/components/radio.d.ts +35 -25
  40. package/dist/highContrast/components/radio.d.ts.map +1 -1
  41. package/dist/highContrast/components/radio.js +117 -27
  42. package/dist/light/components/button.d.ts +15 -15
  43. package/dist/light/components/button.js +1 -1
  44. package/dist/light/components/checkbox.d.ts +15 -15
  45. package/dist/light/components/checkbox.js +1 -1
  46. package/dist/light/components/formField.d.ts +52 -0
  47. package/dist/light/components/formField.d.ts.map +1 -1
  48. package/dist/light/components/formField.js +55 -0
  49. package/dist/light/components/input.d.ts +110 -5
  50. package/dist/light/components/input.d.ts.map +1 -1
  51. package/dist/light/components/input.js +81 -4
  52. package/dist/light/components/radio.d.ts +35 -25
  53. package/dist/light/components/radio.d.ts.map +1 -1
  54. package/dist/light/components/radio.js +117 -27
  55. package/dist/light/semantic/icons.d.ts +1 -1
  56. package/dist/light/semantic/icons.js +1 -1
  57. package/package.json +3 -2
  58. package/dist/utils/createButtonPalette.d.ts.map +0 -1
  59. package/dist/utils/createCheckboxPalette.d.ts.map +0 -1
  60. /package/dist/{utils → factories}/createButtonPalette.d.ts +0 -0
  61. /package/dist/{utils → factories}/createButtonPalette.js +0 -0
  62. /package/dist/{utils → factories}/createCheckboxPalette.d.ts +0 -0
  63. /package/dist/{utils → factories}/createCheckboxPalette.js +0 -0
@@ -1,40 +1,124 @@
1
+ import { createRadioPalette } from '../../factories/createRadioPalette.js';
1
2
  import { colors } from '../../primitives/colors.js';
2
3
  import { border } from '../semantic/border.js';
3
4
  import { control } from '../semantic/control.js';
4
5
  import { focus } from '../semantic/focus.js';
5
6
  import { status } from '../semantic/status.js';
6
- import { surface } from '../semantic/surface.js';
7
7
  import { text } from '../semantic/text.js';
8
+ const primary = createRadioPalette({
9
+ ring: colors.primary[400],
10
+ default: {
11
+ bg: colors.primary[950],
12
+ fg: colors.primary[300],
13
+ border: colors.primary[500],
14
+ labelFg: colors.primary[400],
15
+ },
16
+ hover: {
17
+ bg: colors.primary[900],
18
+ fg: colors.primary[200],
19
+ border: colors.primary[400],
20
+ labelFg: colors.primary[400],
21
+ },
22
+ pressed: {
23
+ bg: colors.primary[950],
24
+ fg: colors.primary[400],
25
+ border: colors.primary[600],
26
+ labelFg: colors.primary[500],
27
+ },
28
+ });
29
+ const neutral = createRadioPalette({
30
+ ring: colors.vellira[400],
31
+ default: {
32
+ bg: colors.vellira[950],
33
+ fg: colors.vellira[200],
34
+ border: colors.vellira[300],
35
+ labelFg: colors.vellira[200],
36
+ },
37
+ hover: {
38
+ bg: colors.vellira[900],
39
+ fg: colors.vellira[100],
40
+ border: colors.vellira[200],
41
+ labelFg: colors.vellira[300],
42
+ },
43
+ pressed: {
44
+ bg: colors.vellira[950],
45
+ fg: colors.vellira[300],
46
+ border: colors.vellira[400],
47
+ labelFg: colors.vellira[400],
48
+ },
49
+ });
50
+ const success = createRadioPalette({
51
+ ring: colors.success[500],
52
+ default: {
53
+ bg: colors.success[950],
54
+ fg: colors.success[500],
55
+ border: colors.success[500],
56
+ labelFg: colors.success[400],
57
+ },
58
+ hover: {
59
+ bg: colors.success[900],
60
+ fg: colors.success[400],
61
+ border: colors.success[400],
62
+ labelFg: colors.success[500],
63
+ },
64
+ pressed: {
65
+ bg: colors.success[950],
66
+ fg: colors.success[600],
67
+ border: colors.success[600],
68
+ labelFg: colors.success[600],
69
+ },
70
+ });
71
+ const warning = createRadioPalette({
72
+ ring: colors.warning[500],
73
+ default: {
74
+ bg: colors.warning[950],
75
+ fg: colors.warning[500],
76
+ border: colors.warning[500],
77
+ labelFg: colors.warning[400],
78
+ },
79
+ hover: {
80
+ bg: colors.warning[900],
81
+ fg: colors.warning[400],
82
+ border: colors.warning[400],
83
+ labelFg: colors.warning[500],
84
+ },
85
+ pressed: {
86
+ bg: colors.warning[950],
87
+ fg: colors.warning[600],
88
+ border: colors.warning[600],
89
+ labelFg: colors.warning[600],
90
+ },
91
+ });
92
+ const danger = createRadioPalette({
93
+ ring: colors.error[500],
94
+ default: {
95
+ bg: colors.error[950],
96
+ fg: colors.error[400],
97
+ border: colors.error[500],
98
+ labelFg: colors.error[400],
99
+ },
100
+ hover: {
101
+ bg: colors.error[900],
102
+ fg: colors.error[300],
103
+ border: colors.error[400],
104
+ labelFg: colors.error[500],
105
+ },
106
+ pressed: {
107
+ bg: colors.error[950],
108
+ fg: colors.error[500],
109
+ border: colors.error[600],
110
+ labelFg: colors.error[600],
111
+ },
112
+ });
8
113
  export const radio = {
9
114
  default: control.default,
10
115
  hover: control.hover,
11
116
  pressed: control.active,
12
- checked: {
13
- default: {
14
- bg: surface.default,
15
- fg: colors.primary[300],
16
- border: colors.primary[500],
17
- labelFg: text.brand,
18
- },
19
- hover: {
20
- bg: surface.hover,
21
- fg: colors.primary[200],
22
- border: colors.primary[400],
23
- labelFg: text.interactiveHover,
24
- },
25
- pressed: {
26
- bg: surface.active,
27
- fg: colors.primary[400],
28
- border: colors.primary[600],
29
- labelFg: text.brand,
30
- },
31
- disabled: {
32
- bg: surface.disabled,
33
- fg: text.disabled,
34
- border: border.disabled,
35
- labelFg: text.disabled,
36
- },
37
- },
117
+ primary,
118
+ neutral,
119
+ success,
120
+ warning,
121
+ danger,
38
122
  focus: {
39
123
  ring: focus.ring.color,
40
124
  border: border.focus,
@@ -45,4 +129,10 @@ export const radio = {
45
129
  ring: status.error.ring,
46
130
  },
47
131
  disabled: control.disabled,
132
+ selectedDisabled: {
133
+ bg: control.disabled.bg,
134
+ fg: text.disabled,
135
+ border: border.disabled,
136
+ labelFg: text.disabled,
137
+ },
48
138
  };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createButtonPalette.d.ts","sourceRoot":"","sources":["../../src/factories/createButtonPalette.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAC;IAEb,KAAK,EAAE;QACL,OAAO,EAAE,WAAW,CAAC;QACrB,KAAK,EAAE,WAAW,CAAC;QACnB,OAAO,EAAE,WAAW,CAAC;KACtB,CAAC;IAEF,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IAEf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,WAAW;;;CAGd,CAAC;AAEX,eAAO,MAAM,mBAAmB,GAAI,sJAejC,mBAAmB;;;iBA1CT,WAAW;eACb,WAAW;iBACT,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiHX,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createCheckboxPalette.d.ts","sourceRoot":"","sources":["../../src/factories/createCheckboxPalette.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,aAAa,CAAC;IACvB,KAAK,EAAE,aAAa,CAAC;IACrB,OAAO,EAAE,aAAa,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,kDAKnC,qBAAqB;;;;;CAMX,CAAC"}
@@ -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
+ });
@@ -0,0 +1,19 @@
1
+ export type RadioState = {
2
+ bg: string;
3
+ fg: string;
4
+ border: string;
5
+ labelFg: string;
6
+ };
7
+ export type RadioPaletteConfig = {
8
+ ring: string;
9
+ default: RadioState;
10
+ hover: RadioState;
11
+ pressed: RadioState;
12
+ };
13
+ export declare const createRadioPalette: ({ ring, default: defaultState, hover, pressed, }: RadioPaletteConfig) => {
14
+ readonly ring: string;
15
+ readonly default: RadioState;
16
+ readonly hover: RadioState;
17
+ readonly pressed: RadioState;
18
+ };
19
+ //# sourceMappingURL=createRadioPalette.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createRadioPalette.d.ts","sourceRoot":"","sources":["../../src/factories/createRadioPalette.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,UAAU,CAAC;IACpB,KAAK,EAAE,UAAU,CAAC;IAClB,OAAO,EAAE,UAAU,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,kDAKhC,kBAAkB;;;;;CAMR,CAAC"}
@@ -0,0 +1,6 @@
1
+ export const createRadioPalette = ({ ring, default: defaultState, hover, pressed, }) => ({
2
+ ring,
3
+ default: defaultState,
4
+ hover,
5
+ pressed,
6
+ });
@@ -0,0 +1,5 @@
1
+ export * from './createButtonPalette.js';
2
+ export * from './createCheckboxPalette.js';
3
+ export * from './createInputPalette.js';
4
+ export * from './createRadioPalette.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/factories/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './createButtonPalette.js';
2
+ export * from './createCheckboxPalette.js';
3
+ export * from './createInputPalette.js';
4
+ export * from './createRadioPalette.js';