@webstudio-is/sdk-components-react-radix 0.95.0 → 0.97.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/lib/components.js +278 -35
- package/lib/hooks.js +475 -11
- package/lib/metas.js +4616 -58
- package/lib/props.js +23280 -57
- package/lib/types/theme/tailwind-classes.d.ts +4 -4
- package/package.json +9 -9
- package/lib/__generated__/accordion.props.js +0 -2619
- package/lib/__generated__/checkbox.props.js +0 -1080
- package/lib/__generated__/collapsible.props.js +0 -1026
- package/lib/__generated__/dialog.props.js +0 -2595
- package/lib/__generated__/label.props.js +0 -519
- package/lib/__generated__/navigation-menu.props.js +0 -2557
- package/lib/__generated__/popover.props.js +0 -558
- package/lib/__generated__/radio-group.props.js +0 -1623
- package/lib/__generated__/select.props.js +0 -3674
- package/lib/__generated__/sheet.props.js +0 -2614
- package/lib/__generated__/switch.props.js +0 -1080
- package/lib/__generated__/tabs.props.js +0 -2119
- package/lib/__generated__/tooltip.props.js +0 -569
- package/lib/accordion.js +0 -51
- package/lib/accordion.stories.js +0 -18
- package/lib/accordion.ws.js +0 -259
- package/lib/checkbox.js +0 -10
- package/lib/checkbox.stories.js +0 -19
- package/lib/checkbox.ws.js +0 -148
- package/lib/collapsible.js +0 -31
- package/lib/collapsible.stories.js +0 -18
- package/lib/collapsible.ws.js +0 -103
- package/lib/dialog.js +0 -53
- package/lib/dialog.stories.js +0 -18
- package/lib/dialog.ws.js +0 -289
- package/lib/label.js +0 -7
- package/lib/label.stories.js +0 -19
- package/lib/label.ws.js +0 -44
- package/lib/navigation-menu.js +0 -76
- package/lib/navigation-menu.stories.js +0 -18
- package/lib/navigation-menu.ws.js +0 -486
- package/lib/popover.js +0 -58
- package/lib/popover.stories.js +0 -18
- package/lib/popover.ws.js +0 -110
- package/lib/props-descriptions.js +0 -34
- package/lib/radio-group.js +0 -7
- package/lib/radio-group.stories.js +0 -19
- package/lib/radio-group.ws.js +0 -166
- package/lib/select.js +0 -65
- package/lib/select.stories.js +0 -18
- package/lib/select.ws.js +0 -321
- package/lib/sheet.js +0 -59
- package/lib/sheet.stories.js +0 -18
- package/lib/sheet.ws.js +0 -225
- package/lib/switch.js +0 -4
- package/lib/switch.stories.js +0 -19
- package/lib/switch.ws.js +0 -140
- package/lib/tabs.js +0 -38
- package/lib/tabs.stories.js +0 -18
- package/lib/tabs.ws.js +0 -169
- package/lib/theme/__generated__/tailwind-theme.js +0 -517
- package/lib/theme/styles.js +0 -63
- package/lib/theme/tailwind-classes.js +0 -651
- package/lib/theme/tailwind-colors.js +0 -23
- package/lib/tooltip.js +0 -55
- package/lib/tooltip.stories.js +0 -18
- package/lib/tooltip.ws.js +0 -111
|
@@ -1,517 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
export const spacing = {
|
|
3
|
-
"0": { type: "unit", unit: "px", value: 0 },
|
|
4
|
-
"1": { type: "unit", unit: "rem", value: 0.25 },
|
|
5
|
-
"2": { type: "unit", unit: "rem", value: 0.5 },
|
|
6
|
-
"3": { type: "unit", unit: "rem", value: 0.75 },
|
|
7
|
-
"4": { type: "unit", unit: "rem", value: 1 },
|
|
8
|
-
"5": { type: "unit", unit: "rem", value: 1.25 },
|
|
9
|
-
"6": { type: "unit", unit: "rem", value: 1.5 },
|
|
10
|
-
"7": { type: "unit", unit: "rem", value: 1.75 },
|
|
11
|
-
"8": { type: "unit", unit: "rem", value: 2 },
|
|
12
|
-
"9": { type: "unit", unit: "rem", value: 2.25 },
|
|
13
|
-
"10": { type: "unit", unit: "rem", value: 2.5 },
|
|
14
|
-
"11": { type: "unit", unit: "rem", value: 2.75 },
|
|
15
|
-
"12": { type: "unit", unit: "rem", value: 3 },
|
|
16
|
-
"14": { type: "unit", unit: "rem", value: 3.5 },
|
|
17
|
-
"16": { type: "unit", unit: "rem", value: 4 },
|
|
18
|
-
"20": { type: "unit", unit: "rem", value: 5 },
|
|
19
|
-
"24": { type: "unit", unit: "rem", value: 6 },
|
|
20
|
-
"28": { type: "unit", unit: "rem", value: 7 },
|
|
21
|
-
"32": { type: "unit", unit: "rem", value: 8 },
|
|
22
|
-
"36": { type: "unit", unit: "rem", value: 9 },
|
|
23
|
-
"40": { type: "unit", unit: "rem", value: 10 },
|
|
24
|
-
"44": { type: "unit", unit: "rem", value: 11 },
|
|
25
|
-
"48": { type: "unit", unit: "rem", value: 12 },
|
|
26
|
-
"52": { type: "unit", unit: "rem", value: 13 },
|
|
27
|
-
"56": { type: "unit", unit: "rem", value: 14 },
|
|
28
|
-
"60": { type: "unit", unit: "rem", value: 15 },
|
|
29
|
-
"64": { type: "unit", unit: "rem", value: 16 },
|
|
30
|
-
"72": { type: "unit", unit: "rem", value: 18 },
|
|
31
|
-
"80": { type: "unit", unit: "rem", value: 20 },
|
|
32
|
-
"96": { type: "unit", unit: "rem", value: 24 },
|
|
33
|
-
px: { type: "unit", unit: "px", value: 1 },
|
|
34
|
-
"0.5": { type: "unit", unit: "rem", value: 0.125 },
|
|
35
|
-
"1.5": { type: "unit", unit: "rem", value: 0.375 },
|
|
36
|
-
"2.5": { type: "unit", unit: "rem", value: 0.625 },
|
|
37
|
-
"3.5": { type: "unit", unit: "rem", value: 0.875 }
|
|
38
|
-
};
|
|
39
|
-
export const padding = {
|
|
40
|
-
...spacing
|
|
41
|
-
};
|
|
42
|
-
export const margin = {
|
|
43
|
-
...spacing,
|
|
44
|
-
auto: { type: "keyword", value: "auto" }
|
|
45
|
-
};
|
|
46
|
-
export const width = {
|
|
47
|
-
...spacing,
|
|
48
|
-
auto: { type: "keyword", value: "auto" },
|
|
49
|
-
"1/2": { type: "unit", unit: "%", value: 50 },
|
|
50
|
-
"1/3": { type: "unit", unit: "%", value: 33.333333 },
|
|
51
|
-
"2/3": { type: "unit", unit: "%", value: 66.666667 },
|
|
52
|
-
"1/4": { type: "unit", unit: "%", value: 25 },
|
|
53
|
-
"2/4": { type: "unit", unit: "%", value: 50 },
|
|
54
|
-
"3/4": { type: "unit", unit: "%", value: 75 },
|
|
55
|
-
"1/5": { type: "unit", unit: "%", value: 20 },
|
|
56
|
-
"2/5": { type: "unit", unit: "%", value: 40 },
|
|
57
|
-
"3/5": { type: "unit", unit: "%", value: 60 },
|
|
58
|
-
"4/5": { type: "unit", unit: "%", value: 80 },
|
|
59
|
-
"1/6": { type: "unit", unit: "%", value: 16.666667 },
|
|
60
|
-
"2/6": { type: "unit", unit: "%", value: 33.333333 },
|
|
61
|
-
"3/6": { type: "unit", unit: "%", value: 50 },
|
|
62
|
-
"4/6": { type: "unit", unit: "%", value: 66.666667 },
|
|
63
|
-
"5/6": { type: "unit", unit: "%", value: 83.333333 },
|
|
64
|
-
"1/12": { type: "unit", unit: "%", value: 8.333333 },
|
|
65
|
-
"2/12": { type: "unit", unit: "%", value: 16.666667 },
|
|
66
|
-
"3/12": { type: "unit", unit: "%", value: 25 },
|
|
67
|
-
"4/12": { type: "unit", unit: "%", value: 33.333333 },
|
|
68
|
-
"5/12": { type: "unit", unit: "%", value: 41.666667 },
|
|
69
|
-
"6/12": { type: "unit", unit: "%", value: 50 },
|
|
70
|
-
"7/12": { type: "unit", unit: "%", value: 58.333333 },
|
|
71
|
-
"8/12": { type: "unit", unit: "%", value: 66.666667 },
|
|
72
|
-
"9/12": { type: "unit", unit: "%", value: 75 },
|
|
73
|
-
"10/12": { type: "unit", unit: "%", value: 83.333333 },
|
|
74
|
-
"11/12": { type: "unit", unit: "%", value: 91.666667 },
|
|
75
|
-
full: { type: "unit", unit: "%", value: 100 },
|
|
76
|
-
screen: { type: "unit", unit: "vw", value: 100 },
|
|
77
|
-
min: { type: "keyword", value: "min-content" },
|
|
78
|
-
max: { type: "keyword", value: "max-content" },
|
|
79
|
-
fit: { type: "keyword", value: "fit-content" }
|
|
80
|
-
};
|
|
81
|
-
export const maxWidth = {
|
|
82
|
-
"0": { type: "unit", unit: "rem", value: 0 },
|
|
83
|
-
none: { type: "keyword", value: "none" },
|
|
84
|
-
xs: { type: "unit", unit: "rem", value: 20 },
|
|
85
|
-
sm: { type: "unit", unit: "rem", value: 24 },
|
|
86
|
-
md: { type: "unit", unit: "rem", value: 28 },
|
|
87
|
-
lg: { type: "unit", unit: "rem", value: 32 },
|
|
88
|
-
xl: { type: "unit", unit: "rem", value: 36 },
|
|
89
|
-
"2xl": { type: "unit", unit: "rem", value: 42 },
|
|
90
|
-
"3xl": { type: "unit", unit: "rem", value: 48 },
|
|
91
|
-
"4xl": { type: "unit", unit: "rem", value: 56 },
|
|
92
|
-
"5xl": { type: "unit", unit: "rem", value: 64 },
|
|
93
|
-
"6xl": { type: "unit", unit: "rem", value: 72 },
|
|
94
|
-
"7xl": { type: "unit", unit: "rem", value: 80 },
|
|
95
|
-
full: { type: "unit", unit: "%", value: 100 },
|
|
96
|
-
min: { type: "keyword", value: "min-content" },
|
|
97
|
-
max: { type: "keyword", value: "max-content" },
|
|
98
|
-
fit: { type: "keyword", value: "fit-content" },
|
|
99
|
-
prose: { type: "unit", unit: "ch", value: 65 }
|
|
100
|
-
};
|
|
101
|
-
export const height = {
|
|
102
|
-
...spacing,
|
|
103
|
-
auto: { type: "keyword", value: "auto" },
|
|
104
|
-
"1/2": { type: "unit", unit: "%", value: 50 },
|
|
105
|
-
"1/3": { type: "unit", unit: "%", value: 33.333333 },
|
|
106
|
-
"2/3": { type: "unit", unit: "%", value: 66.666667 },
|
|
107
|
-
"1/4": { type: "unit", unit: "%", value: 25 },
|
|
108
|
-
"2/4": { type: "unit", unit: "%", value: 50 },
|
|
109
|
-
"3/4": { type: "unit", unit: "%", value: 75 },
|
|
110
|
-
"1/5": { type: "unit", unit: "%", value: 20 },
|
|
111
|
-
"2/5": { type: "unit", unit: "%", value: 40 },
|
|
112
|
-
"3/5": { type: "unit", unit: "%", value: 60 },
|
|
113
|
-
"4/5": { type: "unit", unit: "%", value: 80 },
|
|
114
|
-
"1/6": { type: "unit", unit: "%", value: 16.666667 },
|
|
115
|
-
"2/6": { type: "unit", unit: "%", value: 33.333333 },
|
|
116
|
-
"3/6": { type: "unit", unit: "%", value: 50 },
|
|
117
|
-
"4/6": { type: "unit", unit: "%", value: 66.666667 },
|
|
118
|
-
"5/6": { type: "unit", unit: "%", value: 83.333333 },
|
|
119
|
-
full: { type: "unit", unit: "%", value: 100 },
|
|
120
|
-
screen: { type: "unit", unit: "vh", value: 100 },
|
|
121
|
-
min: { type: "keyword", value: "min-content" },
|
|
122
|
-
max: { type: "keyword", value: "max-content" },
|
|
123
|
-
fit: { type: "keyword", value: "fit-content" }
|
|
124
|
-
};
|
|
125
|
-
export const minHeight = {
|
|
126
|
-
"0": { type: "unit", unit: "px", value: 0 },
|
|
127
|
-
full: { type: "unit", unit: "%", value: 100 },
|
|
128
|
-
screen: { type: "unit", unit: "vh", value: 100 },
|
|
129
|
-
min: { type: "keyword", value: "min-content" },
|
|
130
|
-
max: { type: "keyword", value: "max-content" },
|
|
131
|
-
fit: { type: "keyword", value: "fit-content" }
|
|
132
|
-
};
|
|
133
|
-
export const inset = {
|
|
134
|
-
...spacing,
|
|
135
|
-
auto: { type: "keyword", value: "auto" },
|
|
136
|
-
"1/2": { type: "unit", unit: "%", value: 50 },
|
|
137
|
-
"1/3": { type: "unit", unit: "%", value: 33.333333 },
|
|
138
|
-
"2/3": { type: "unit", unit: "%", value: 66.666667 },
|
|
139
|
-
"1/4": { type: "unit", unit: "%", value: 25 },
|
|
140
|
-
"2/4": { type: "unit", unit: "%", value: 50 },
|
|
141
|
-
"3/4": { type: "unit", unit: "%", value: 75 },
|
|
142
|
-
full: { type: "unit", unit: "%", value: 100 }
|
|
143
|
-
};
|
|
144
|
-
export const borderWidth = {
|
|
145
|
-
"0": { type: "unit", unit: "px", value: 0 },
|
|
146
|
-
"2": { type: "unit", unit: "px", value: 2 },
|
|
147
|
-
"4": { type: "unit", unit: "px", value: 4 },
|
|
148
|
-
"8": { type: "unit", unit: "px", value: 8 },
|
|
149
|
-
DEFAULT: { type: "unit", unit: "px", value: 1 }
|
|
150
|
-
};
|
|
151
|
-
export const borderRadius = {
|
|
152
|
-
none: { type: "unit", unit: "px", value: 0 },
|
|
153
|
-
sm: { type: "unit", unit: "rem", value: 0.125 },
|
|
154
|
-
DEFAULT: { type: "unit", unit: "rem", value: 0.5 },
|
|
155
|
-
md: { type: "unit", unit: "rem", value: 0.375 },
|
|
156
|
-
lg: { type: "unit", unit: "rem", value: 0.5 },
|
|
157
|
-
xl: { type: "unit", unit: "rem", value: 0.75 },
|
|
158
|
-
"2xl": { type: "unit", unit: "rem", value: 1 },
|
|
159
|
-
"3xl": { type: "unit", unit: "rem", value: 1.5 },
|
|
160
|
-
full: { type: "unit", unit: "px", value: 9999 }
|
|
161
|
-
};
|
|
162
|
-
export const colors = {
|
|
163
|
-
transparent: { type: "keyword", value: "transparent" },
|
|
164
|
-
current: { type: "keyword", value: "currentColor" },
|
|
165
|
-
inherit: { type: "keyword", value: "inherit" },
|
|
166
|
-
popover: { type: "rgb", alpha: 1, r: 255, g: 255, b: 255 },
|
|
167
|
-
popoverForeground: { type: "rgb", alpha: 1, r: 2, g: 8, b: 23 },
|
|
168
|
-
border: { type: "rgb", alpha: 1, r: 226, g: 232, b: 240 },
|
|
169
|
-
background: { type: "rgb", alpha: 1, r: 255, g: 255, b: 255 },
|
|
170
|
-
foreground: { type: "rgb", alpha: 1, r: 2, g: 8, b: 23 },
|
|
171
|
-
ring: { type: "rgb", alpha: 1, r: 148, g: 163, b: 184 },
|
|
172
|
-
mutedForeground: { type: "rgb", alpha: 1, r: 100, g: 116, b: 139 },
|
|
173
|
-
muted: { type: "rgb", alpha: 1, r: 241, g: 245, b: 249 },
|
|
174
|
-
primary: { type: "rgb", alpha: 1, r: 15, g: 23, b: 42 },
|
|
175
|
-
primaryForeground: { type: "rgb", alpha: 1, r: 248, g: 250, b: 252 },
|
|
176
|
-
destructive: { type: "rgb", alpha: 1, r: 239, g: 68, b: 68 },
|
|
177
|
-
destructiveForeground: { type: "rgb", alpha: 1, r: 248, g: 250, b: 252 },
|
|
178
|
-
accent: { type: "rgb", alpha: 1, r: 241, g: 245, b: 249 },
|
|
179
|
-
accentForeground: { type: "rgb", alpha: 1, r: 15, g: 23, b: 42 },
|
|
180
|
-
input: { type: "rgb", alpha: 1, r: 226, g: 232, b: 240 },
|
|
181
|
-
secondary: { type: "rgb", alpha: 1, r: 241, g: 245, b: 249 },
|
|
182
|
-
secondaryForeground: { type: "rgb", alpha: 1, r: 15, g: 23, b: 42 }
|
|
183
|
-
};
|
|
184
|
-
export const zIndex = {
|
|
185
|
-
"0": { type: "unit", unit: "number", value: 0 },
|
|
186
|
-
"10": { type: "unit", unit: "number", value: 10 },
|
|
187
|
-
"20": { type: "unit", unit: "number", value: 20 },
|
|
188
|
-
"30": { type: "unit", unit: "number", value: 30 },
|
|
189
|
-
"40": { type: "unit", unit: "number", value: 40 },
|
|
190
|
-
"50": { type: "unit", unit: "number", value: 50 },
|
|
191
|
-
auto: { type: "keyword", value: "auto" }
|
|
192
|
-
};
|
|
193
|
-
export const opacity = {
|
|
194
|
-
"0": { type: "unit", unit: "number", value: 0 },
|
|
195
|
-
"5": { type: "unit", unit: "number", value: 0.05 },
|
|
196
|
-
"10": { type: "unit", unit: "number", value: 0.1 },
|
|
197
|
-
"20": { type: "unit", unit: "number", value: 0.2 },
|
|
198
|
-
"25": { type: "unit", unit: "number", value: 0.25 },
|
|
199
|
-
"30": { type: "unit", unit: "number", value: 0.3 },
|
|
200
|
-
"40": { type: "unit", unit: "number", value: 0.4 },
|
|
201
|
-
"50": { type: "unit", unit: "number", value: 0.5 },
|
|
202
|
-
"60": { type: "unit", unit: "number", value: 0.6 },
|
|
203
|
-
"70": { type: "unit", unit: "number", value: 0.7 },
|
|
204
|
-
"75": { type: "unit", unit: "number", value: 0.75 },
|
|
205
|
-
"80": { type: "unit", unit: "number", value: 0.8 },
|
|
206
|
-
"90": { type: "unit", unit: "number", value: 0.9 },
|
|
207
|
-
"95": { type: "unit", unit: "number", value: 0.95 },
|
|
208
|
-
"100": { type: "unit", unit: "number", value: 1 }
|
|
209
|
-
};
|
|
210
|
-
export const cursor = {
|
|
211
|
-
auto: { type: "keyword", value: "auto" },
|
|
212
|
-
default: { type: "keyword", value: "default" },
|
|
213
|
-
pointer: { type: "keyword", value: "pointer" },
|
|
214
|
-
wait: { type: "keyword", value: "wait" },
|
|
215
|
-
text: { type: "keyword", value: "text" },
|
|
216
|
-
move: { type: "keyword", value: "move" },
|
|
217
|
-
help: { type: "keyword", value: "help" },
|
|
218
|
-
"not-allowed": { type: "keyword", value: "not-allowed" },
|
|
219
|
-
none: { type: "keyword", value: "none" },
|
|
220
|
-
"context-menu": { type: "keyword", value: "context-menu" },
|
|
221
|
-
progress: { type: "keyword", value: "progress" },
|
|
222
|
-
cell: { type: "keyword", value: "cell" },
|
|
223
|
-
crosshair: { type: "keyword", value: "crosshair" },
|
|
224
|
-
"vertical-text": { type: "keyword", value: "vertical-text" },
|
|
225
|
-
alias: { type: "keyword", value: "alias" },
|
|
226
|
-
copy: { type: "keyword", value: "copy" },
|
|
227
|
-
"no-drop": { type: "keyword", value: "no-drop" },
|
|
228
|
-
grab: { type: "keyword", value: "grab" },
|
|
229
|
-
grabbing: { type: "keyword", value: "grabbing" },
|
|
230
|
-
"all-scroll": { type: "keyword", value: "all-scroll" },
|
|
231
|
-
"col-resize": { type: "keyword", value: "col-resize" },
|
|
232
|
-
"row-resize": { type: "keyword", value: "row-resize" },
|
|
233
|
-
"n-resize": { type: "keyword", value: "n-resize" },
|
|
234
|
-
"e-resize": { type: "keyword", value: "e-resize" },
|
|
235
|
-
"s-resize": { type: "keyword", value: "s-resize" },
|
|
236
|
-
"w-resize": { type: "keyword", value: "w-resize" },
|
|
237
|
-
"ne-resize": { type: "keyword", value: "ne-resize" },
|
|
238
|
-
"nw-resize": { type: "keyword", value: "nw-resize" },
|
|
239
|
-
"se-resize": { type: "keyword", value: "se-resize" },
|
|
240
|
-
"sw-resize": { type: "keyword", value: "sw-resize" },
|
|
241
|
-
"ew-resize": { type: "keyword", value: "ew-resize" },
|
|
242
|
-
"ns-resize": { type: "keyword", value: "ns-resize" },
|
|
243
|
-
"nesw-resize": { type: "keyword", value: "nesw-resize" },
|
|
244
|
-
"nwse-resize": { type: "keyword", value: "nwse-resize" },
|
|
245
|
-
"zoom-in": { type: "keyword", value: "zoom-in" },
|
|
246
|
-
"zoom-out": { type: "keyword", value: "zoom-out" }
|
|
247
|
-
};
|
|
248
|
-
export const lineHeight = {
|
|
249
|
-
"3": { type: "unit", unit: "rem", value: 0.75 },
|
|
250
|
-
"4": { type: "unit", unit: "rem", value: 1 },
|
|
251
|
-
"5": { type: "unit", unit: "rem", value: 1.25 },
|
|
252
|
-
"6": { type: "unit", unit: "rem", value: 1.5 },
|
|
253
|
-
"7": { type: "unit", unit: "rem", value: 1.75 },
|
|
254
|
-
"8": { type: "unit", unit: "rem", value: 2 },
|
|
255
|
-
"9": { type: "unit", unit: "rem", value: 2.25 },
|
|
256
|
-
"10": { type: "unit", unit: "rem", value: 2.5 },
|
|
257
|
-
none: { type: "unit", unit: "number", value: 1 },
|
|
258
|
-
tight: { type: "unit", unit: "number", value: 1.25 },
|
|
259
|
-
snug: { type: "unit", unit: "number", value: 1.375 },
|
|
260
|
-
normal: { type: "unit", unit: "number", value: 1.5 },
|
|
261
|
-
relaxed: { type: "unit", unit: "number", value: 1.625 },
|
|
262
|
-
loose: { type: "unit", unit: "number", value: 2 }
|
|
263
|
-
};
|
|
264
|
-
export const letterSpacing = {
|
|
265
|
-
tighter: { type: "unit", unit: "em", value: -0.05 },
|
|
266
|
-
tight: { type: "unit", unit: "em", value: -0.025 },
|
|
267
|
-
normal: { type: "unit", unit: "em", value: 0 },
|
|
268
|
-
wide: { type: "unit", unit: "em", value: 0.025 },
|
|
269
|
-
wider: { type: "unit", unit: "em", value: 0.05 },
|
|
270
|
-
widest: { type: "unit", unit: "em", value: 0.1 }
|
|
271
|
-
};
|
|
272
|
-
export const listStyleType = {
|
|
273
|
-
none: { type: "keyword", value: "none" },
|
|
274
|
-
disc: { type: "keyword", value: "disc" },
|
|
275
|
-
decimal: { type: "keyword", value: "decimal" }
|
|
276
|
-
};
|
|
277
|
-
export const lineClamp = {
|
|
278
|
-
"1": { type: "unit", unit: "number", value: 1 },
|
|
279
|
-
"2": { type: "unit", unit: "number", value: 2 },
|
|
280
|
-
"3": { type: "unit", unit: "number", value: 3 },
|
|
281
|
-
"4": { type: "unit", unit: "number", value: 4 },
|
|
282
|
-
"5": { type: "unit", unit: "number", value: 5 },
|
|
283
|
-
"6": { type: "unit", unit: "number", value: 6 }
|
|
284
|
-
};
|
|
285
|
-
export const textUnderlineOffset = {
|
|
286
|
-
"0": { type: "unit", unit: "px", value: 0 },
|
|
287
|
-
"1": { type: "unit", unit: "px", value: 1 },
|
|
288
|
-
"2": { type: "unit", unit: "px", value: 2 },
|
|
289
|
-
"4": { type: "unit", unit: "px", value: 4 },
|
|
290
|
-
"8": { type: "unit", unit: "px", value: 8 },
|
|
291
|
-
auto: { type: "keyword", value: "auto" }
|
|
292
|
-
};
|
|
293
|
-
export const ringWidth = {
|
|
294
|
-
"0": { type: "unit", unit: "px", value: 0 },
|
|
295
|
-
"1": { type: "unit", unit: "px", value: 1 },
|
|
296
|
-
"2": { type: "unit", unit: "px", value: 2 },
|
|
297
|
-
"4": { type: "unit", unit: "px", value: 4 },
|
|
298
|
-
"8": { type: "unit", unit: "px", value: 8 },
|
|
299
|
-
DEFAULT: { type: "unit", unit: "px", value: 3 }
|
|
300
|
-
};
|
|
301
|
-
export const ringOffsetWidth = {
|
|
302
|
-
"0": { type: "unit", unit: "px", value: 0 },
|
|
303
|
-
"1": { type: "unit", unit: "px", value: 1 },
|
|
304
|
-
"2": { type: "unit", unit: "px", value: 2 },
|
|
305
|
-
"4": { type: "unit", unit: "px", value: 4 },
|
|
306
|
-
"8": { type: "unit", unit: "px", value: 8 }
|
|
307
|
-
};
|
|
308
|
-
export const boxShadow = {
|
|
309
|
-
sm: {
|
|
310
|
-
type: "layers",
|
|
311
|
-
value: [
|
|
312
|
-
{
|
|
313
|
-
type: "tuple",
|
|
314
|
-
value: [
|
|
315
|
-
{ type: "unit", value: 0, unit: "number" },
|
|
316
|
-
{ type: "unit", value: 1, unit: "px" },
|
|
317
|
-
{ type: "unit", value: 2, unit: "px" },
|
|
318
|
-
{ type: "unit", value: 0, unit: "number" },
|
|
319
|
-
{ type: "rgb", alpha: 0.05, r: 0, g: 0, b: 0 }
|
|
320
|
-
]
|
|
321
|
-
}
|
|
322
|
-
]
|
|
323
|
-
},
|
|
324
|
-
DEFAULT: {
|
|
325
|
-
type: "layers",
|
|
326
|
-
value: [
|
|
327
|
-
{
|
|
328
|
-
type: "tuple",
|
|
329
|
-
value: [
|
|
330
|
-
{ type: "unit", value: 0, unit: "number" },
|
|
331
|
-
{ type: "unit", value: 1, unit: "px" },
|
|
332
|
-
{ type: "unit", value: 3, unit: "px" },
|
|
333
|
-
{ type: "unit", value: 0, unit: "number" },
|
|
334
|
-
{ type: "rgb", alpha: 0.1, r: 0, g: 0, b: 0 }
|
|
335
|
-
]
|
|
336
|
-
},
|
|
337
|
-
{
|
|
338
|
-
type: "tuple",
|
|
339
|
-
value: [
|
|
340
|
-
{ type: "unit", value: 0, unit: "number" },
|
|
341
|
-
{ type: "unit", value: 1, unit: "px" },
|
|
342
|
-
{ type: "unit", value: 2, unit: "px" },
|
|
343
|
-
{ type: "unit", value: -1, unit: "px" },
|
|
344
|
-
{ type: "rgb", alpha: 0.1, r: 0, g: 0, b: 0 }
|
|
345
|
-
]
|
|
346
|
-
}
|
|
347
|
-
]
|
|
348
|
-
},
|
|
349
|
-
md: {
|
|
350
|
-
type: "layers",
|
|
351
|
-
value: [
|
|
352
|
-
{
|
|
353
|
-
type: "tuple",
|
|
354
|
-
value: [
|
|
355
|
-
{ type: "unit", value: 0, unit: "number" },
|
|
356
|
-
{ type: "unit", value: 4, unit: "px" },
|
|
357
|
-
{ type: "unit", value: 6, unit: "px" },
|
|
358
|
-
{ type: "unit", value: -1, unit: "px" },
|
|
359
|
-
{ type: "rgb", alpha: 0.1, r: 0, g: 0, b: 0 }
|
|
360
|
-
]
|
|
361
|
-
},
|
|
362
|
-
{
|
|
363
|
-
type: "tuple",
|
|
364
|
-
value: [
|
|
365
|
-
{ type: "unit", value: 0, unit: "number" },
|
|
366
|
-
{ type: "unit", value: 2, unit: "px" },
|
|
367
|
-
{ type: "unit", value: 4, unit: "px" },
|
|
368
|
-
{ type: "unit", value: -2, unit: "px" },
|
|
369
|
-
{ type: "rgb", alpha: 0.1, r: 0, g: 0, b: 0 }
|
|
370
|
-
]
|
|
371
|
-
}
|
|
372
|
-
]
|
|
373
|
-
},
|
|
374
|
-
lg: {
|
|
375
|
-
type: "layers",
|
|
376
|
-
value: [
|
|
377
|
-
{
|
|
378
|
-
type: "tuple",
|
|
379
|
-
value: [
|
|
380
|
-
{ type: "unit", value: 0, unit: "number" },
|
|
381
|
-
{ type: "unit", value: 10, unit: "px" },
|
|
382
|
-
{ type: "unit", value: 15, unit: "px" },
|
|
383
|
-
{ type: "unit", value: -3, unit: "px" },
|
|
384
|
-
{ type: "rgb", alpha: 0.1, r: 0, g: 0, b: 0 }
|
|
385
|
-
]
|
|
386
|
-
},
|
|
387
|
-
{
|
|
388
|
-
type: "tuple",
|
|
389
|
-
value: [
|
|
390
|
-
{ type: "unit", value: 0, unit: "number" },
|
|
391
|
-
{ type: "unit", value: 4, unit: "px" },
|
|
392
|
-
{ type: "unit", value: 6, unit: "px" },
|
|
393
|
-
{ type: "unit", value: -4, unit: "px" },
|
|
394
|
-
{ type: "rgb", alpha: 0.1, r: 0, g: 0, b: 0 }
|
|
395
|
-
]
|
|
396
|
-
}
|
|
397
|
-
]
|
|
398
|
-
},
|
|
399
|
-
xl: {
|
|
400
|
-
type: "layers",
|
|
401
|
-
value: [
|
|
402
|
-
{
|
|
403
|
-
type: "tuple",
|
|
404
|
-
value: [
|
|
405
|
-
{ type: "unit", value: 0, unit: "number" },
|
|
406
|
-
{ type: "unit", value: 20, unit: "px" },
|
|
407
|
-
{ type: "unit", value: 25, unit: "px" },
|
|
408
|
-
{ type: "unit", value: -5, unit: "px" },
|
|
409
|
-
{ type: "rgb", alpha: 0.1, r: 0, g: 0, b: 0 }
|
|
410
|
-
]
|
|
411
|
-
},
|
|
412
|
-
{
|
|
413
|
-
type: "tuple",
|
|
414
|
-
value: [
|
|
415
|
-
{ type: "unit", value: 0, unit: "number" },
|
|
416
|
-
{ type: "unit", value: 8, unit: "px" },
|
|
417
|
-
{ type: "unit", value: 10, unit: "px" },
|
|
418
|
-
{ type: "unit", value: -6, unit: "px" },
|
|
419
|
-
{ type: "rgb", alpha: 0.1, r: 0, g: 0, b: 0 }
|
|
420
|
-
]
|
|
421
|
-
}
|
|
422
|
-
]
|
|
423
|
-
},
|
|
424
|
-
"2xl": {
|
|
425
|
-
type: "layers",
|
|
426
|
-
value: [
|
|
427
|
-
{
|
|
428
|
-
type: "tuple",
|
|
429
|
-
value: [
|
|
430
|
-
{ type: "unit", value: 0, unit: "number" },
|
|
431
|
-
{ type: "unit", value: 25, unit: "px" },
|
|
432
|
-
{ type: "unit", value: 50, unit: "px" },
|
|
433
|
-
{ type: "unit", value: -12, unit: "px" },
|
|
434
|
-
{ type: "rgb", alpha: 0.25, r: 0, g: 0, b: 0 }
|
|
435
|
-
]
|
|
436
|
-
}
|
|
437
|
-
]
|
|
438
|
-
},
|
|
439
|
-
inner: {
|
|
440
|
-
type: "layers",
|
|
441
|
-
value: [
|
|
442
|
-
{
|
|
443
|
-
type: "tuple",
|
|
444
|
-
value: [
|
|
445
|
-
{ type: "keyword", value: "inset" },
|
|
446
|
-
{ type: "unit", value: 0, unit: "number" },
|
|
447
|
-
{ type: "unit", value: 2, unit: "px" },
|
|
448
|
-
{ type: "unit", value: 4, unit: "px" },
|
|
449
|
-
{ type: "unit", value: 0, unit: "number" },
|
|
450
|
-
{ type: "rgb", alpha: 0.05, r: 0, g: 0, b: 0 }
|
|
451
|
-
]
|
|
452
|
-
}
|
|
453
|
-
]
|
|
454
|
-
},
|
|
455
|
-
none: {
|
|
456
|
-
type: "layers",
|
|
457
|
-
value: [{ type: "tuple", value: [{ type: "keyword", value: "none" }] }]
|
|
458
|
-
}
|
|
459
|
-
};
|
|
460
|
-
export const blur = {
|
|
461
|
-
sm: { type: "unparsed", value: "blur(0 1px 2px 0 rgb(0 0 0 / 0.05))" },
|
|
462
|
-
DEFAULT: {
|
|
463
|
-
type: "unparsed",
|
|
464
|
-
value: "blur(0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1))"
|
|
465
|
-
},
|
|
466
|
-
md: {
|
|
467
|
-
type: "unparsed",
|
|
468
|
-
value: "blur(0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1))"
|
|
469
|
-
},
|
|
470
|
-
lg: {
|
|
471
|
-
type: "unparsed",
|
|
472
|
-
value: "blur(0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1))"
|
|
473
|
-
},
|
|
474
|
-
xl: {
|
|
475
|
-
type: "unparsed",
|
|
476
|
-
value: "blur(0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1))"
|
|
477
|
-
},
|
|
478
|
-
"2xl": {
|
|
479
|
-
type: "unparsed",
|
|
480
|
-
value: "blur(0 25px 50px -12px rgb(0 0 0 / 0.25))"
|
|
481
|
-
},
|
|
482
|
-
inner: {
|
|
483
|
-
type: "unparsed",
|
|
484
|
-
value: "blur(inset 0 2px 4px 0 rgb(0 0 0 / 0.05))"
|
|
485
|
-
},
|
|
486
|
-
none: { type: "unparsed", value: "blur(none)" }
|
|
487
|
-
};
|
|
488
|
-
export const fontSize = {
|
|
489
|
-
xs: { type: "unit", unit: "rem", value: 0.75 },
|
|
490
|
-
sm: { type: "unit", unit: "rem", value: 0.875 },
|
|
491
|
-
base: { type: "unit", unit: "rem", value: 1 },
|
|
492
|
-
lg: { type: "unit", unit: "rem", value: 1.125 },
|
|
493
|
-
xl: { type: "unit", unit: "rem", value: 1.25 },
|
|
494
|
-
"2xl": { type: "unit", unit: "rem", value: 1.5 },
|
|
495
|
-
"3xl": { type: "unit", unit: "rem", value: 1.875 },
|
|
496
|
-
"4xl": { type: "unit", unit: "rem", value: 2.25 },
|
|
497
|
-
"5xl": { type: "unit", unit: "rem", value: 3 },
|
|
498
|
-
"6xl": { type: "unit", unit: "rem", value: 3.75 },
|
|
499
|
-
"7xl": { type: "unit", unit: "rem", value: 4.5 },
|
|
500
|
-
"8xl": { type: "unit", unit: "rem", value: 6 },
|
|
501
|
-
"9xl": { type: "unit", unit: "rem", value: 8 }
|
|
502
|
-
};
|
|
503
|
-
export const fontSizeLineHeight = {
|
|
504
|
-
xs: { type: "unit", unit: "rem", value: 1 },
|
|
505
|
-
sm: { type: "unit", unit: "rem", value: 1.25 },
|
|
506
|
-
base: { type: "unit", unit: "rem", value: 1.5 },
|
|
507
|
-
lg: { type: "unit", unit: "rem", value: 1.75 },
|
|
508
|
-
xl: { type: "unit", unit: "rem", value: 1.75 },
|
|
509
|
-
"2xl": { type: "unit", unit: "rem", value: 2 },
|
|
510
|
-
"3xl": { type: "unit", unit: "rem", value: 2.25 },
|
|
511
|
-
"4xl": { type: "unit", unit: "rem", value: 2.5 },
|
|
512
|
-
"5xl": { type: "unit", unit: "number", value: 1 },
|
|
513
|
-
"6xl": { type: "unit", unit: "number", value: 1 },
|
|
514
|
-
"7xl": { type: "unit", unit: "number", value: 1 },
|
|
515
|
-
"8xl": { type: "unit", unit: "number", value: 1 },
|
|
516
|
-
"9xl": { type: "unit", unit: "number", value: 1 }
|
|
517
|
-
};
|
package/lib/theme/styles.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
import * as tc from "./tailwind-classes";
|
|
3
|
-
export const getButtonStyles = (variant, size = "default") => {
|
|
4
|
-
const styles = [
|
|
5
|
-
// 'inline-flex items-center justify-center rounded-md text-sm font-medium
|
|
6
|
-
// ring-offset-background transition-colors
|
|
7
|
-
// focus-visible:outline-none focus-visible:ring-2
|
|
8
|
-
// focus-visible:ring-ring focus-visible:ring-offset-2
|
|
9
|
-
// disabled:pointer-events-none disabled:opacity-50'
|
|
10
|
-
tc.border(0),
|
|
11
|
-
tc.bg("transparent"),
|
|
12
|
-
tc.inlineFlex(),
|
|
13
|
-
tc.items("center"),
|
|
14
|
-
tc.justify("center"),
|
|
15
|
-
tc.rounded("md"),
|
|
16
|
-
tc.text("sm"),
|
|
17
|
-
tc.font("medium"),
|
|
18
|
-
tc.focusVisible(
|
|
19
|
-
[tc.outline("none"), tc.ring("ring", 2, "background", 2)].flat()
|
|
20
|
-
),
|
|
21
|
-
tc.state([tc.pointerEvents("none"), tc.opacity(50)].flat(), ":disabled")
|
|
22
|
-
].flat();
|
|
23
|
-
let variantStyles = [];
|
|
24
|
-
if (variant === "ghost") {
|
|
25
|
-
variantStyles = [
|
|
26
|
-
tc.state([tc.bg("accent"), tc.text("accentForeground")].flat(), ":hover")
|
|
27
|
-
].flat();
|
|
28
|
-
}
|
|
29
|
-
if (variant === "outline") {
|
|
30
|
-
variantStyles = [
|
|
31
|
-
tc.border(),
|
|
32
|
-
tc.border("input"),
|
|
33
|
-
tc.bg("background"),
|
|
34
|
-
tc.state(
|
|
35
|
-
[tc.bg("accent", 90), tc.text("accentForeground")].flat(),
|
|
36
|
-
":hover"
|
|
37
|
-
)
|
|
38
|
-
].flat();
|
|
39
|
-
}
|
|
40
|
-
let sizeStyles = [];
|
|
41
|
-
if (size === "icon") {
|
|
42
|
-
sizeStyles = [tc.h(10), tc.w(10)].flat();
|
|
43
|
-
}
|
|
44
|
-
if (size === "sm") {
|
|
45
|
-
sizeStyles = [tc.h(10), tc.px(3)].flat();
|
|
46
|
-
}
|
|
47
|
-
if (size === "default") {
|
|
48
|
-
sizeStyles = [tc.h(10), tc.px(4), tc.py(2)].flat();
|
|
49
|
-
}
|
|
50
|
-
return [...styles, ...variantStyles, ...sizeStyles];
|
|
51
|
-
};
|
|
52
|
-
export const buttonReset = [
|
|
53
|
-
{
|
|
54
|
-
property: "backgroundColor",
|
|
55
|
-
value: { type: "keyword", value: "transparent" }
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
property: "backgroundImage",
|
|
59
|
-
value: { type: "keyword", value: "none" }
|
|
60
|
-
},
|
|
61
|
-
tc.border(0),
|
|
62
|
-
tc.p(0)
|
|
63
|
-
].flat();
|