@uncinq/design-tokens 0.4.0 → 1.0.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 (68) hide show
  1. package/README.md +122 -53
  2. package/dist/css/primitive/blur.css +14 -0
  3. package/{tokens → dist/css}/primitive/color.css +53 -96
  4. package/dist/css/primitive/font.css +29 -0
  5. package/dist/css/primitive/shadow.css +16 -0
  6. package/{tokens → dist/css}/primitive/size.css +14 -17
  7. package/{tokens → dist/css}/primitive.css +0 -1
  8. package/{tokens → dist/css}/semantic/blur.css +4 -0
  9. package/dist/css/semantic/border.css +14 -0
  10. package/dist/css/semantic/color.css +99 -0
  11. package/dist/css/semantic/focus.css +13 -0
  12. package/dist/css/semantic/form.css +109 -0
  13. package/dist/css/semantic/grid.css +15 -0
  14. package/dist/css/semantic/icon.css +21 -0
  15. package/dist/css/semantic/motion.css +28 -0
  16. package/dist/css/semantic/opacity.css +15 -0
  17. package/dist/css/semantic/radius.css +20 -0
  18. package/dist/css/semantic/ratio.css +18 -0
  19. package/dist/css/semantic/shadow.css +12 -0
  20. package/dist/css/semantic/size.css +14 -0
  21. package/dist/css/semantic/spacing.css +30 -0
  22. package/dist/css/semantic/typography.css +48 -0
  23. package/dist/css/semantic/z-index.css +18 -0
  24. package/{tokens → dist/css}/semantic.css +0 -2
  25. package/package.json +22 -11
  26. package/tokens/primitive/blur.json +24 -0
  27. package/tokens/primitive/color.json +259 -0
  28. package/tokens/primitive/font.json +93 -0
  29. package/tokens/primitive/shadow.json +113 -0
  30. package/tokens/primitive/size.json +196 -0
  31. package/tokens/semantic/blur.json +8 -0
  32. package/tokens/semantic/border.json +28 -0
  33. package/tokens/semantic/color.json +343 -0
  34. package/tokens/semantic/focus.json +22 -0
  35. package/tokens/semantic/form.json +550 -0
  36. package/tokens/semantic/grid.json +28 -0
  37. package/tokens/semantic/icon.json +52 -0
  38. package/tokens/semantic/motion.json +86 -0
  39. package/tokens/semantic/opacity.json +28 -0
  40. package/tokens/semantic/radius.json +48 -0
  41. package/tokens/semantic/ratio.json +40 -0
  42. package/tokens/semantic/shadow.json +18 -0
  43. package/tokens/semantic/size.json +24 -0
  44. package/tokens/semantic/spacing.json +90 -0
  45. package/tokens/semantic/typography.json +174 -0
  46. package/tokens/semantic/z-index.json +40 -0
  47. package/tokens/primitive/blur.css +0 -10
  48. package/tokens/primitive/font.css +0 -32
  49. package/tokens/primitive/opacity.css +0 -12
  50. package/tokens/primitive/shadow.css +0 -16
  51. package/tokens/semantic/border.css +0 -15
  52. package/tokens/semantic/color.css +0 -119
  53. package/tokens/semantic/dark.css +0 -48
  54. package/tokens/semantic/focus.css +0 -10
  55. package/tokens/semantic/form.css +0 -107
  56. package/tokens/semantic/grid.css +0 -39
  57. package/tokens/semantic/icon.css +0 -19
  58. package/tokens/semantic/motion.css +0 -46
  59. package/tokens/semantic/opacity.css +0 -10
  60. package/tokens/semantic/radius.css +0 -19
  61. package/tokens/semantic/ratio.css +0 -23
  62. package/tokens/semantic/shadow.css +0 -14
  63. package/tokens/semantic/size.css +0 -20
  64. package/tokens/semantic/spacing.css +0 -42
  65. package/tokens/semantic/typography.css +0 -78
  66. package/tokens/semantic/z-index.css +0 -14
  67. /package/{tokens → dist/css}/index.css +0 -0
  68. /package/{tokens → dist/css}/semantic/mediaqueries.css +0 -0
@@ -0,0 +1,86 @@
1
+ {
2
+ "duration": {
3
+ "fast": {
4
+ "$value": "150ms",
5
+ "$type": "duration"
6
+ },
7
+ "normal": {
8
+ "$value": "300ms",
9
+ "$type": "duration"
10
+ },
11
+ "slow": {
12
+ "$value": "600ms",
13
+ "$type": "duration"
14
+ }
15
+ },
16
+ "easing": {
17
+ "linear": {
18
+ "$value": "linear",
19
+ "$type": "string"
20
+ },
21
+ "default": {
22
+ "$value": "ease-in-out",
23
+ "$type": "string"
24
+ },
25
+ "in": {
26
+ "$value": "ease-in",
27
+ "$type": "string"
28
+ },
29
+ "out": {
30
+ "$value": "ease-out",
31
+ "$type": "string"
32
+ },
33
+ "out-circ": {
34
+ "$value": "cubic-bezier(0, 0.55, 0.45, 1)",
35
+ "$type": "string"
36
+ },
37
+ "out-expo": {
38
+ "$value": "cubic-bezier(0.16, 1, 0.3, 1)",
39
+ "$type": "string"
40
+ },
41
+ "out-back": {
42
+ "$value": "cubic-bezier(0.34, 1.56, 0.64, 1)",
43
+ "$type": "string"
44
+ },
45
+ "bounce": {
46
+ "$value": "cubic-bezier(0.165, 0.84, 0.44, 1)",
47
+ "$type": "string"
48
+ },
49
+ "spring": {
50
+ "$value": "linear(0, 0.006, 0.025 2.8%, 0.101, 0.197, 0.325, 0.474, 0.638, 0.806, 0.962, 1.065, 1.12, 1.14, 1.12 30.9%, 1.034, 0.997, 0.986, 0.998, 1)",
51
+ "$type": "string"
52
+ }
53
+ },
54
+ "transition": {
55
+ "fast": {
56
+ "$value": "all {duration.fast} {easing.default}",
57
+ "$type": "string"
58
+ },
59
+ "normal": {
60
+ "$value": "all {duration.normal} {easing.default}",
61
+ "$type": "string"
62
+ },
63
+ "slow": {
64
+ "$value": "all {duration.slow} {easing.default}",
65
+ "$type": "string"
66
+ },
67
+ "opacity": {
68
+ "$value": "opacity {duration.normal} {easing.default}",
69
+ "$type": "string"
70
+ },
71
+ "transform": {
72
+ "$value": "transform {duration.normal} {easing.default}",
73
+ "$type": "string"
74
+ },
75
+ "property": {
76
+ "color": {
77
+ "$value": "color, background-color, border-color, outline-color, fill, stroke, text-decoration",
78
+ "$type": "string"
79
+ }
80
+ },
81
+ "color": {
82
+ "$value": "color {duration.normal} {easing.default}, background-color {duration.normal} {easing.default}, border-color {duration.normal} {easing.default}, outline-color {duration.normal} {easing.default}, fill {duration.normal} {easing.default}, stroke {duration.normal} {easing.default}, text-decoration {duration.normal} {easing.default}",
83
+ "$type": "string"
84
+ }
85
+ }
86
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "opacity": {
3
+ "backdrop": {
4
+ "$type": "number",
5
+ "$value": 0.5
6
+ },
7
+ "disabled": {
8
+ "$type": "number",
9
+ "$value": 0.5
10
+ },
11
+ "hover": {
12
+ "$type": "number",
13
+ "$value": 0.75
14
+ },
15
+ "overlay": {
16
+ "$type": "number",
17
+ "$value": 0.75
18
+ },
19
+ "shadow": {
20
+ "$type": "number",
21
+ "$value": 0.1
22
+ },
23
+ "subtle": {
24
+ "$type": "number",
25
+ "$value": 0.35
26
+ }
27
+ }
28
+ }
@@ -0,0 +1,48 @@
1
+ {
2
+ "radius": {
3
+ "2xs": {
4
+ "$value": "{size.2}",
5
+ "$type": "dimension"
6
+ },
7
+ "xs": {
8
+ "$value": "{size.4}",
9
+ "$type": "dimension"
10
+ },
11
+ "sm": {
12
+ "$value": "{size.8}",
13
+ "$type": "dimension"
14
+ },
15
+ "md": {
16
+ "$value": "{size.12}",
17
+ "$type": "dimension"
18
+ },
19
+ "lg": {
20
+ "$value": "{size.16}",
21
+ "$type": "dimension"
22
+ },
23
+ "xl": {
24
+ "$value": "{size.24}",
25
+ "$type": "dimension"
26
+ },
27
+ "2xl": {
28
+ "$value": "{size.32}",
29
+ "$type": "dimension"
30
+ },
31
+ "none": {
32
+ "$value": "0px",
33
+ "$type": "dimension"
34
+ },
35
+ "control": {
36
+ "$value": "{radius.sm}",
37
+ "$type": "dimension"
38
+ },
39
+ "surface": {
40
+ "$value": "{radius.md}",
41
+ "$type": "dimension"
42
+ },
43
+ "pill": {
44
+ "$value": "9999px",
45
+ "$type": "dimension"
46
+ }
47
+ }
48
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "ratio": {
3
+ "cinema": {
4
+ "$type": "string",
5
+ "$value": "21 / 9"
6
+ },
7
+ "hero": {
8
+ "$type": "string",
9
+ "$value": "4 / 1"
10
+ },
11
+ "landscape": {
12
+ "$type": "string",
13
+ "$value": "4 / 3"
14
+ },
15
+ "photography": {
16
+ "$type": "string",
17
+ "$value": "3 / 2"
18
+ },
19
+ "portrait": {
20
+ "$type": "string",
21
+ "$value": "3 / 4"
22
+ },
23
+ "print": {
24
+ "$type": "string",
25
+ "$value": "5 / 4"
26
+ },
27
+ "square": {
28
+ "$type": "string",
29
+ "$value": "1 / 1"
30
+ },
31
+ "story": {
32
+ "$type": "string",
33
+ "$value": "9 / 16"
34
+ },
35
+ "video": {
36
+ "$type": "string",
37
+ "$value": "16 / 9"
38
+ }
39
+ }
40
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "shadow": {
3
+ "control": {
4
+ "default": {
5
+ "$value": "{shadow.none}",
6
+ "$type": "shadow"
7
+ },
8
+ "hover": {
9
+ "$value": "{shadow.none}",
10
+ "$type": "shadow"
11
+ }
12
+ },
13
+ "surface": {
14
+ "$value": "{shadow.sm}",
15
+ "$type": "shadow"
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "size": {
3
+ "tablet": {
4
+ "$value": "{size.768}",
5
+ "$type": "dimension"
6
+ },
7
+ "tabletWide": {
8
+ "$value": "{size.1024}",
9
+ "$type": "dimension"
10
+ },
11
+ "laptop": {
12
+ "$value": "{size.1440}",
13
+ "$type": "dimension"
14
+ },
15
+ "desktop": {
16
+ "$value": "{size.1600}",
17
+ "$type": "dimension"
18
+ },
19
+ "desktopWide": {
20
+ "$value": "{size.1920}",
21
+ "$type": "dimension"
22
+ }
23
+ }
24
+ }
@@ -0,0 +1,90 @@
1
+ {
2
+ "spacing": {
3
+ "2xs": {
4
+ "$value": "{size.5}",
5
+ "$type": "dimension"
6
+ },
7
+ "xs": {
8
+ "$value": "{size.10}",
9
+ "$type": "dimension"
10
+ },
11
+ "sm": {
12
+ "$value": "{size.20}",
13
+ "$type": "dimension"
14
+ },
15
+ "md": {
16
+ "$value": "{size.30}",
17
+ "$type": "dimension"
18
+ },
19
+ "lg": {
20
+ "$value": "{size.40}",
21
+ "$type": "dimension"
22
+ },
23
+ "xl": {
24
+ "$value": "{size.60}",
25
+ "$type": "dimension"
26
+ },
27
+ "2xl": {
28
+ "$value": "{size.100}",
29
+ "$type": "dimension"
30
+ },
31
+ "3xl": {
32
+ "$value": "{size.150}",
33
+ "$type": "dimension"
34
+ },
35
+ "fluid": {
36
+ "2xs": {
37
+ "$value": "clamp(0.3125rem, 0.2232rem + 0.4464vw, 0.625rem)",
38
+ "$type": "string"
39
+ },
40
+ "xs": {
41
+ "$value": "clamp(0.625rem, 0.4464rem + 0.8929vw, 1.25rem)",
42
+ "$type": "string"
43
+ },
44
+ "sm": {
45
+ "$value": "clamp(1.25rem, 0.8929rem + 1.7857vw, 2.5rem)",
46
+ "$type": "string"
47
+ },
48
+ "md": {
49
+ "$value": "clamp(1.875rem, 1.3393rem + 2.6786vw, 3.75rem)",
50
+ "$type": "string"
51
+ },
52
+ "lg": {
53
+ "$value": "clamp(2.5rem, 1.7857rem + 3.5714vw, 5rem)",
54
+ "$type": "string"
55
+ },
56
+ "xl": {
57
+ "$value": "clamp(3.125rem, 2.2321rem + 4.4643vw, 6.25rem)",
58
+ "$type": "string"
59
+ },
60
+ "2xl": {
61
+ "$value": "clamp(3.75rem, 2.6786rem + 5.3571vw, 7.5rem)",
62
+ "$type": "string"
63
+ }
64
+ },
65
+ "card": {
66
+ "$value": "{spacing.sm}",
67
+ "$type": "dimension"
68
+ },
69
+ "control": {
70
+ "$value": "{spacing.xs}",
71
+ "$type": "dimension"
72
+ },
73
+ "heading": {
74
+ "$value": "{spacing.fluid.sm}",
75
+ "$type": "string"
76
+ },
77
+ "section": {
78
+ "$value": "{spacing.fluid.2xl}",
79
+ "$type": "string"
80
+ },
81
+ "surface": {
82
+ "$value": "{spacing.fluid.sm}",
83
+ "$type": "string"
84
+ },
85
+ "typography": {
86
+ "$value": "{spacing.fluid.xs}",
87
+ "$type": "string"
88
+ }
89
+ }
90
+ }
@@ -0,0 +1,174 @@
1
+ {
2
+ "fontFamily": {
3
+ "code": {
4
+ "$type": "fontFamily",
5
+ "$value": "{fontFamily.mono}"
6
+ },
7
+ "heading": {
8
+ "$type": "fontFamily",
9
+ "$value": "{fontFamily.sans}"
10
+ },
11
+ "text": {
12
+ "$type": "fontFamily",
13
+ "$value": "{fontFamily.sans}"
14
+ }
15
+ },
16
+ "fontSize": {
17
+ "2xs": {
18
+ "$type": "dimension",
19
+ "$value": "{size.12}"
20
+ },
21
+ "xs": {
22
+ "$type": "dimension",
23
+ "$value": "{size.14}"
24
+ },
25
+ "sm": {
26
+ "$type": "dimension",
27
+ "$value": "{size.16}"
28
+ },
29
+ "md": {
30
+ "$type": "dimension",
31
+ "$value": "{size.18}"
32
+ },
33
+ "lg": {
34
+ "$type": "dimension",
35
+ "$value": "{size.24}"
36
+ },
37
+ "xl": {
38
+ "$type": "dimension",
39
+ "$value": "{size.48}"
40
+ },
41
+ "2xl": {
42
+ "$type": "dimension",
43
+ "$value": "{size.64}"
44
+ },
45
+ "display": {
46
+ "$type": "dimension",
47
+ "$value": "{size.96}"
48
+ },
49
+ "fluid": {
50
+ "2xs": {
51
+ "$type": "string",
52
+ "$value": "clamp(0.625rem, 0.5893rem + 0.1786vw, 0.75rem)"
53
+ },
54
+ "xs": {
55
+ "$type": "string",
56
+ "$value": "clamp(0.75rem, 0.7143rem + 0.1786vw, 0.875rem)"
57
+ },
58
+ "sm": {
59
+ "$type": "string",
60
+ "$value": "clamp(0.875rem, 0.8393rem + 0.1786vw, 1rem)"
61
+ },
62
+ "md": {
63
+ "$type": "string",
64
+ "$value": "clamp(1rem, 0.9643rem + 0.1786vw, 1.125rem)"
65
+ },
66
+ "lg": {
67
+ "$type": "string",
68
+ "$value": "clamp(1.125rem, 1.0179rem + 0.5357vw, 1.5rem)"
69
+ },
70
+ "xl": {
71
+ "$type": "string",
72
+ "$value": "clamp(1.5rem, 1.0714rem + 2.1429vw, 3rem)"
73
+ },
74
+ "2xl": {
75
+ "$type": "string",
76
+ "$value": "clamp(3rem, 2.7143rem + 1.4286vw, 4rem)"
77
+ },
78
+ "display": {
79
+ "$type": "string",
80
+ "$value": "clamp(4rem, 3.4286rem + 2.8571vw, 6rem)"
81
+ }
82
+ },
83
+ "heading": {
84
+ "01": {
85
+ "$type": "string",
86
+ "$value": "{fontSize.fluid.xl}"
87
+ },
88
+ "02": {
89
+ "$type": "string",
90
+ "$value": "{fontSize.fluid.lg}"
91
+ },
92
+ "03": {
93
+ "$type": "string",
94
+ "$value": "{fontSize.fluid.md}"
95
+ },
96
+ "04": {
97
+ "$type": "string",
98
+ "$value": "{fontSize.fluid.sm}"
99
+ },
100
+ "05": {
101
+ "$type": "string",
102
+ "$value": "{fontSize.fluid.sm}"
103
+ },
104
+ "06": {
105
+ "$type": "string",
106
+ "$value": "{fontSize.fluid.sm}"
107
+ }
108
+ },
109
+ "small": {
110
+ "$type": "string",
111
+ "$value": "{fontSize.fluid.sm}"
112
+ },
113
+ "text": {
114
+ "$type": "string",
115
+ "$value": "{fontSize.fluid.md}"
116
+ }
117
+ },
118
+ "fontWeight": {
119
+ "control": {
120
+ "$type": "fontWeight",
121
+ "$value": "{fontWeight.medium}"
122
+ },
123
+ "heading": {
124
+ "$type": "fontWeight",
125
+ "$value": "{fontWeight.bold}"
126
+ },
127
+ "text": {
128
+ "$type": "fontWeight",
129
+ "$value": "{fontWeight.normal}"
130
+ }
131
+ },
132
+ "letterSpacing": {
133
+ "none": {
134
+ "$type": "dimension",
135
+ "$value": "0em"
136
+ },
137
+ "sm": {
138
+ "$type": "dimension",
139
+ "$value": "0.025em"
140
+ },
141
+ "md": {
142
+ "$type": "dimension",
143
+ "$value": "0.05em"
144
+ },
145
+ "lg": {
146
+ "$type": "dimension",
147
+ "$value": "0.1em"
148
+ },
149
+ "xl": {
150
+ "$type": "dimension",
151
+ "$value": "0.2em"
152
+ }
153
+ },
154
+ "lineHeight": {
155
+ "heading": {
156
+ "$type": "number",
157
+ "$value": "{lineHeight.tight}"
158
+ },
159
+ "text": {
160
+ "$type": "number",
161
+ "$value": "{lineHeight.normal}"
162
+ }
163
+ },
164
+ "maxWidth": {
165
+ "heading": {
166
+ "$type": "dimension",
167
+ "$value": "50ch"
168
+ },
169
+ "paragraph": {
170
+ "$type": "dimension",
171
+ "$value": "70ch"
172
+ }
173
+ }
174
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "zIndex": {
3
+ "below": {
4
+ "$type": "number",
5
+ "$value": -1
6
+ },
7
+ "base": {
8
+ "$type": "number",
9
+ "$value": 0
10
+ },
11
+ "raised": {
12
+ "$type": "number",
13
+ "$value": 10
14
+ },
15
+ "dropdown": {
16
+ "$type": "number",
17
+ "$value": 100
18
+ },
19
+ "sticky": {
20
+ "$type": "number",
21
+ "$value": 200
22
+ },
23
+ "drawer": {
24
+ "$type": "number",
25
+ "$value": 300
26
+ },
27
+ "modal": {
28
+ "$type": "number",
29
+ "$value": 400
30
+ },
31
+ "toast": {
32
+ "$type": "number",
33
+ "$value": 500
34
+ },
35
+ "tooltip": {
36
+ "$type": "number",
37
+ "$value": 600
38
+ }
39
+ }
40
+ }
@@ -1,10 +0,0 @@
1
- /* primitive/blur.css */
2
- @layer config {
3
- :root {
4
- --blur-xs: 2px;
5
- --blur-sm: 4px;
6
- --blur-md: 8px;
7
- --blur-lg: 16px;
8
- --blur-xl: 32px;
9
- }
10
- }
@@ -1,32 +0,0 @@
1
- /* primitive/font.css */
2
- @layer config {
3
- :root {
4
- /* Families */
5
- --font-family-mono: ui-monospace, monospace;
6
- --font-family-sans: system-ui, sans-serif;
7
- --font-family-serif: Georgia, serif;
8
-
9
- /* Weights */
10
- --font-weight-thin: 100;
11
- --font-weight-light: 300;
12
- --font-weight-normal: 400;
13
- --font-weight-medium: 500;
14
- --font-weight-semibold: 600;
15
- --font-weight-bold: 700;
16
- --font-weight-black: 900;
17
-
18
- /* Line heights */
19
- --line-height-none: 1;
20
- --line-height-tight: 1.1;
21
- --line-height-snug: 1.25;
22
- --line-height-normal: 1.5;
23
- --line-height-relaxed: 1.75;
24
- --line-height-loose: 2;
25
-
26
- /* Text decoration */
27
- --text-decoration-none: none;
28
- --text-decoration-underline: underline;
29
- --text-decoration-offset: 0.25rem;
30
- --text-decoration-thickness: 1px;
31
- }
32
- }
@@ -1,12 +0,0 @@
1
- /* primitive/opacity.css */
2
- @layer config {
3
- :root {
4
- --opacity-0: 0;
5
- --opacity-10: 0.1;
6
- --opacity-25: 0.25;
7
- --opacity-50: 0.5;
8
- --opacity-75: 0.75;
9
- --opacity-90: 0.9;
10
- --opacity-100: 1;
11
- }
12
- }
@@ -1,16 +0,0 @@
1
- /* primitive/shadow.css */
2
- @layer config {
3
- :root {
4
- --shadow-none: none;
5
-
6
- /* Directional (top-left light source) */
7
- --shadow-sm: 0 1px 2px 0 var(--color-shadow-light);
8
- --shadow-md: 0 4px 6px -1px var(--color-shadow-normal), 0 2px 4px -2px var(--color-shadow-normal);
9
- --shadow-lg: 0 10px 15px -3px var(--color-shadow-normal), 0 4px 6px -4px var(--color-shadow-normal);
10
-
11
- /* Centered (ambient glow) */
12
- --shadow-center-sm: 0 0 2px 2px var(--color-shadow-light);
13
- --shadow-center-md: 0 0 5px 5px var(--color-shadow-light);
14
- --shadow-center-lg: 0 0 10px 10px var(--color-shadow-light);
15
- }
16
- }
@@ -1,15 +0,0 @@
1
- /* semantic/border.css */
2
- @layer config {
3
- :root {
4
- /* Styles */
5
- --border-style-dotted: dotted;
6
- --border-style-dashed: dashed;
7
- --border-style-solid: solid;
8
-
9
- /* Widths */
10
- --border-width-none: 0px;
11
- --border-width-normal: 1px;
12
- --border-width-large: 2px;
13
- --border-width-xl: 4px;
14
- }
15
- }