welcome-ui 0.0.0-dev.1759252708223 → 0.0.0-dev.1759392523253

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 (49) hide show
  1. package/dist/AspectRatio.css +1 -1
  2. package/dist/AspectRatio.js +13 -12
  3. package/dist/Breadcrumb.css +1 -1
  4. package/dist/Breadcrumb.js +101 -124
  5. package/dist/Button.css +1 -1
  6. package/dist/Button.js +49 -49
  7. package/dist/Modal.css +1 -1
  8. package/dist/Modal.js +132 -174
  9. package/dist/Search.js +118 -125
  10. package/dist/Swiper.js +113 -119
  11. package/dist/theme.css +1 -1
  12. package/dist/throttle-BDBzFeFj.js +13 -0
  13. package/dist/types/components/AspectRatio/index.d.ts +1 -2
  14. package/dist/types/components/AspectRatio/types.d.ts +12 -3
  15. package/dist/types/components/Icon/index.d.ts +305 -0
  16. package/dist/types/components/Modal/components/Close.d.ts +2 -2
  17. package/dist/types/components/Modal/components/Content.d.ts +3 -5
  18. package/dist/types/components/Modal/index.d.ts +0 -1
  19. package/dist/types/components/Modal/types.d.ts +0 -5
  20. package/dist/types/old/components/Alert/styles.d.ts +4 -4
  21. package/dist/types/old/components/Avatar/styles.d.ts +4 -4
  22. package/dist/types/old/components/Card/Cover.styles.d.ts +2 -2
  23. package/dist/types/old/components/ClearButton/index.d.ts +2 -2
  24. package/dist/types/old/components/ClearButton/styles.d.ts +2 -2
  25. package/dist/types/old/components/CloseButton/styles.d.ts +2 -2
  26. package/dist/types/old/components/Drawer/styles.d.ts +2 -2
  27. package/dist/types/old/components/InputText/styles.d.ts +1 -1
  28. package/dist/types/old/components/Link/styles.d.ts +2 -2
  29. package/dist/types/old/components/Loader/styles.d.ts +2 -2
  30. package/dist/types/old/components/Modal/Assets/Backdrop.d.ts +2 -2
  31. package/dist/types/old/components/Modal/Assets/index.d.ts +4 -4
  32. package/dist/types/old/components/Modal/Assets/styles.d.ts +4 -4
  33. package/dist/types/old/components/Modal/index.d.ts +4 -4
  34. package/dist/types/old/components/Modal/styles.d.ts +4 -4
  35. package/dist/types/old/components/Radio/styles.d.ts +2 -2
  36. package/dist/types/old/components/Select/index.d.ts +2 -2
  37. package/dist/types/old/components/Select/styles.d.ts +2 -2
  38. package/dist/types/old/components/Shape/styles.d.ts +2 -2
  39. package/dist/types/old/components/Slider/styles.d.ts +10 -10
  40. package/dist/types/old/components/Swiper/styles.d.ts +2 -2
  41. package/dist/types/old/components/Toast/styles.d.ts +8 -8
  42. package/dist/types/theme/tokens.json.d.ts +378 -0
  43. package/dist/types/theme/types.d.ts +0 -10
  44. package/dist/types/theme/utils/parseTokens.d.ts +15 -0
  45. package/dist/types/theme/utils/parseTokens.test.d.ts +1 -0
  46. package/dist/types/utils/clamp.d.ts +1 -0
  47. package/dist/types/utils/use-screens.d.ts +2 -2
  48. package/package.json +4 -2
  49. package/dist/types/theme/tokens.d.ts +0 -307
@@ -0,0 +1,378 @@
1
+ declare const _default: {
2
+ "border": {
3
+ "width": {
4
+ "$type": "dimension",
5
+ "lg": {
6
+ "$value": "3px"
7
+ },
8
+ "md": {
9
+ "$value": "2px"
10
+ },
11
+ "sm": {
12
+ "$value": "1px"
13
+ }
14
+ }
15
+ },
16
+ "color": {
17
+ "$type": "color",
18
+ "beige": {
19
+ "10": { "$value": "#fbf9f7" },
20
+ "20": { "$value": "#f6f3ef" },
21
+ "30": { "$value": "#eae4de" },
22
+ "40": { "$value": "#d2cbc3" },
23
+ "50": { "$value": "#a7a096" },
24
+ "60": { "$value": "#605b55" },
25
+ "70": { "$value": "#4d4944" },
26
+ "80": { "$value": "#33302d" },
27
+ "90": { "$value": "#1e1c1a" }
28
+ },
29
+ "blue": {
30
+ "10": { "$value": "#e0f5ff" },
31
+ "20": { "$value": "#bbeaff" },
32
+ "30": { "$value": "#9bdef7" },
33
+ "40": { "$value": "#55c3e9" },
34
+ "50": { "$value": "#27a5d0" },
35
+ "60": { "$value": "#057aa3" },
36
+ "70": { "$value": "#025a79" },
37
+ "80": { "$value": "#013c50" },
38
+ "90": { "$value": "#00202b" }
39
+ },
40
+ "green": {
41
+ "10": { "$value": "#eaffd4" },
42
+ "20": { "$value": "#d6f6b4" },
43
+ "30": { "$value": "#bade94" },
44
+ "40": { "$value": "#9fc873" },
45
+ "50": { "$value": "#83ad57" },
46
+ "60": { "$value": "#5a8034" },
47
+ "70": { "$value": "#40611f" },
48
+ "80": { "$value": "#2a4210" },
49
+ "90": { "$value": "#142603" }
50
+ },
51
+ "neutral": {
52
+ "10": { "$value": "#ffffff" },
53
+ "20": { "$value": "#f3f3f3" },
54
+ "30": { "$value": "#dedede" },
55
+ "40": { "$value": "#bdbdbd" },
56
+ "50": { "$value": "#989898" },
57
+ "60": { "$value": "#585858" },
58
+ "70": { "$value": "#444444" },
59
+ "80": { "$value": "#212121" },
60
+ "90": { "$value": "#000000" }
61
+ },
62
+ "orange": {
63
+ "10": { "$value": "#ffebce" },
64
+ "20": { "$value": "#ffd495" },
65
+ "30": { "$value": "#ffbb59" },
66
+ "40": { "$value": "#ff9f14" },
67
+ "50": { "$value": "#db860a" },
68
+ "60": { "$value": "#a6670a" },
69
+ "70": { "$value": "#824f06" },
70
+ "80": { "$value": "#573607" },
71
+ "90": { "$value": "#382303" }
72
+ },
73
+ "pink": {
74
+ "10": { "$value": "#ffeaf5" },
75
+ "20": { "$value": "#ffd5eb" },
76
+ "30": { "$value": "#feb7dc" },
77
+ "40": { "$value": "#f696c8" },
78
+ "50": { "$value": "#e468a8" },
79
+ "60": { "$value": "#c24887" },
80
+ "70": { "$value": "#972962" },
81
+ "80": { "$value": "#6d1142" },
82
+ "90": { "$value": "#3c0725" }
83
+ },
84
+ "red": {
85
+ "10": { "$value": "#fbdedc" },
86
+ "20": { "$value": "#fcc7c3" },
87
+ "30": { "$value": "#fdb3ae" },
88
+ "40": { "$value": "#ff9490" },
89
+ "50": { "$value": "#ff6165" },
90
+ "60": { "$value": "#e1003a" },
91
+ "70": { "$value": "#a80029" },
92
+ "80": { "$value": "#75001a" },
93
+ "90": { "$value": "#450101" }
94
+ },
95
+ "red-orange": {
96
+ "10": { "$value": "#ffded0" },
97
+ "20": { "$value": "#ffc9b2" },
98
+ "30": { "$value": "#ffb595" },
99
+ "40": { "$value": "#ff9868" },
100
+ "50": { "$value": "#e67b49" },
101
+ "60": { "$value": "#c45927" },
102
+ "70": { "$value": "#9f4217" },
103
+ "80": { "$value": "#6d2605" },
104
+ "90": { "$value": "#451701" }
105
+ },
106
+ "teal": {
107
+ "10": { "$value": "#d5fffa" },
108
+ "20": { "$value": "#aaf4eb" },
109
+ "30": { "$value": "#6de1d2" },
110
+ "40": { "$value": "#00c7ae" },
111
+ "50": { "$value": "#01aa95" },
112
+ "60": { "$value": "#008070" },
113
+ "70": { "$value": "#00544a" },
114
+ "80": { "$value": "#003d35" },
115
+ "90": { "$value": "#00211d" }
116
+ },
117
+ "transparent": {
118
+ "$value": "transparent"
119
+ },
120
+ "violet": {
121
+ "10": { "$value": "#f2f2ff" },
122
+ "20": { "$value": "#e0e0ff" },
123
+ "30": { "$value": "#c9c9ff" },
124
+ "40": { "$value": "#acacff" },
125
+ "50": { "$value": "#9080f0" },
126
+ "60": { "$value": "#7958d6" },
127
+ "70": { "$value": "#593cac" },
128
+ "80": { "$value": "#422a86" },
129
+ "90": { "$value": "#1f0e51" }
130
+ },
131
+ "yellow": {
132
+ "10": { "$value": "#fff8d9" },
133
+ "20": { "$value": "#fff1b2" },
134
+ "30": { "$value": "#ffe166" },
135
+ "40": { "$value": "#ffcd00" },
136
+ "50": { "$value": "#e5b800" },
137
+ "60": { "$value": "#b69200" },
138
+ "70": { "$value": "#846a01" },
139
+ "80": { "$value": "#604d00" },
140
+ "90": { "$value": "#423500" }
141
+ },
142
+ "brand": {
143
+ "10": { "$value": "{color.yellow.10}" },
144
+ "20": { "$value": "{color.yellow.20}" },
145
+ "30": { "$value": "{color.yellow.30}" },
146
+ "40": { "$value": "{color.yellow.40}" },
147
+ "50": { "$value": "{color.yellow.50}" },
148
+ "60": { "$value": "{color.yellow.60}" },
149
+ "70": { "$value": "{color.yellow.70}" },
150
+ "80": { "$value": "{color.yellow.80}" },
151
+ "90": { "$value": "{color.yellow.90}" }
152
+ },
153
+ "overlay": {
154
+ "$value": "color-mix(in oklab, {color.neutral.90} 55%, transparent)"
155
+ },
156
+ "secondary": {
157
+ "blue": { "$value": "{color.blue.40}" },
158
+ "green": { "$value": "{color.green.30}" },
159
+ "orange": { "$value": "{color.red-orange.40}" },
160
+ "pink": { "$value": "{color.pink.40}" },
161
+ "teal": { "$value": "{color.teal.40}" },
162
+ "violet": { "$value": "{color.violet.40}" }
163
+ }
164
+ },
165
+ "font": {
166
+ "family": {
167
+ "$type": "fontFamily",
168
+ "default": {
169
+ "$value": "'Work Sans', sans-serif"
170
+ },
171
+ "headings": {
172
+ "$value": "'welcome-font', sans-serif"
173
+ },
174
+ "icons": {
175
+ "$value": "'welcome-icon-font'"
176
+ }
177
+ },
178
+ "size": {
179
+ "$type": "dimension",
180
+ "11": { "$value": "0.6875rem" },
181
+ "12": { "$value": "0.75rem" },
182
+ "13": { "$value": "0.8125rem" },
183
+ "14": { "$value": "0.875rem" },
184
+ "16": { "$value": "1rem" },
185
+ "18": { "$value": "1.125rem" },
186
+ "20": { "$value": "1.25rem" },
187
+ "24": { "$value": "1.5rem" },
188
+ "26": { "$value": "1.625rem" },
189
+ "36": { "$value": "2.25rem" },
190
+ "45": { "$value": "2.8125rem" },
191
+ "65": { "$value": "4.0625rem" },
192
+ "h0": { "$value": "{font.size.65}" },
193
+ "h1": { "$value": "{font.size.45}" },
194
+ "h2": { "$value": "{font.size.36}" },
195
+ "h3": { "$value": "{font.size.26}" },
196
+ "h4": { "$value": "{font.size.20}" },
197
+ "h5": { "$value": "{font.size.16}" },
198
+ "h6": { "$value": "{font.size.14}" },
199
+ "lg": { "$value": "{font.size.18}" },
200
+ "md": { "$value": "{font.size.16}" },
201
+ "sm": { "$value": "{font.size.14}" },
202
+ "subtitle": {
203
+ "md": { "$value": "{font.size.13}" },
204
+ "sm": { "$value": "{font.size.11}" }
205
+ },
206
+ "xl": { "$value": "{font.size.24}" },
207
+ "xs": { "$value": "{font.size.12}" }
208
+ },
209
+ "weight": {
210
+ "$type": "fontWeight",
211
+ "400": { "$value": "400" },
212
+ "500": { "$value": "500" },
213
+ "600": { "$value": "600" },
214
+ "bold": { "$value": "{font.weight.600}" },
215
+ "medium": { "$value": "{font.weight.500}" },
216
+ "regular": { "$value": "{font.weight.400}" }
217
+ }
218
+ },
219
+ "height": {
220
+ "$type": "dimension",
221
+ "4": { "$value": "0.25rem" },
222
+ "8": { "$value": "0.5rem" },
223
+ "10": { "$value": "0.625rem" },
224
+ "12": { "$value": "0.75rem" },
225
+ "16": { "$value": "1rem" },
226
+ "20": { "$value": "1.25rem" },
227
+ "24": { "$value": "1.5rem" },
228
+ "30": { "$value": "1.875rem" },
229
+ "32": { "$value": "2rem" },
230
+ "40": { "$value": "2.5rem" },
231
+ "48": { "$value": "3rem" },
232
+ "50": { "$value": "3.125rem" },
233
+ "60": { "$value": "3.75rem" },
234
+ "64": { "$value": "4rem" },
235
+ "elements": {
236
+ "lg": { "$value": "{height.40}" },
237
+ "md": { "$value": "{height.32}" },
238
+ "sm": { "$value": "{height.24}" },
239
+ "xl": { "$value": "{height.48}" },
240
+ "xs": { "$value": "{height.16}" },
241
+ "xxl": { "$value": "{height.64}" },
242
+ "xxs": { "$value": "{height.12}" }
243
+ }
244
+ },
245
+ "letter-spacing": {
246
+ "$type": "dimension",
247
+ "h0": { "$value": "-0.10625rem" },
248
+ "h1": { "$value": "-0.075rem" },
249
+ "h2": { "$value": "-0.0625rem" },
250
+ "h3": { "$value": "-0.05625rem" },
251
+ "h4": { "$value": "-0.0375rem" },
252
+ "h5": { "$value": "-0.03125rem" },
253
+ "h6": { "$value": "-0.03125rem" },
254
+ "lg": { "$value": "-0.019rem" },
255
+ "md": { "$value": "-0.019rem" },
256
+ "sm": { "$value": "-0.019rem" },
257
+ "subtitle": {
258
+ "md": { "$value": "-0.0125rem" },
259
+ "sm": { "$value": "-0.0125rem" }
260
+ },
261
+ "xs": { "$value": "-0.0125rem" }
262
+ },
263
+ "line-height": {
264
+ "$type": "dimension",
265
+ "14": { "$value": "0.875rem" },
266
+ "16": { "$value": "1rem" },
267
+ "18": { "$value": "1.125rem" },
268
+ "20": { "$value": "1.25rem" },
269
+ "24": { "$value": "1.5rem" },
270
+ "32": { "$value": "2rem" },
271
+ "40": { "$value": "2.5rem" },
272
+ "48": { "$value": "3rem" },
273
+ "72": { "$value": "4.5rem" },
274
+ "iso-font-size": { "$value": "1" },
275
+ "h0": { "$value": "{line-height.72}" },
276
+ "h1": { "$value": "{line-height.48}" },
277
+ "h2": { "$value": "{line-height.40}" },
278
+ "h3": { "$value": "{line-height.32}" },
279
+ "h4": { "$value": "{line-height.24}" },
280
+ "h5": { "$value": "{line-height.20}" },
281
+ "h6": { "$value": "{line-height.18}" },
282
+ "lg": { "$value": "{line-height.24}" },
283
+ "md": { "$value": "{line-height.18}" },
284
+ "sm": { "$value": "{line-height.18}" },
285
+ "subtitle": {
286
+ "md": { "$value": "{line-height.iso-font-size}" },
287
+ "sm": { "$value": "{line-height.iso-font-size}" }
288
+ },
289
+ "xs": { "$value": "{line-height.14}" }
290
+ },
291
+ "radius": {
292
+ "$type": "dimension",
293
+ "2xl": { "$value": "1.5rem" },
294
+ "circle": { "$value": "calc(infinity * 1px)" },
295
+ "lg": { "$value": "0.5rem" },
296
+ "md": { "$value": "0.25rem" },
297
+ "sm": { "$value": "0.125rem" },
298
+ "xl": { "$value": "1rem" }
299
+ },
300
+ "breakpoint": {
301
+ "$type": "dimension",
302
+ "2xl": { "$value": "1440px" },
303
+ "3xl": { "$value": "1620px" },
304
+ "4xl": { "$value": "1920px" },
305
+ "lg": { "$value": "980px" },
306
+ "md": { "$value": "736px" },
307
+ "sm": { "$value": "480px" },
308
+ "xl": { "$value": "1280px" },
309
+ "xs": { "$value": "0px" }
310
+ },
311
+ "shadow": {
312
+ "$type": "shadow",
313
+ "focus": {
314
+ "$value": "0 0 0 2px {color.brand.40}"
315
+ },
316
+ "focus-danger": {
317
+ "$value": "0 0 0 2px {color.red.30}"
318
+ },
319
+ "focus-success": {
320
+ "$value": "0 0 0 2px {color.green.30}"
321
+ },
322
+ "focus-warning": {
323
+ "$value": "0 0 0 2px {color.orange.20}"
324
+ },
325
+ "md": {
326
+ "$value": "3px 4px 10px 0 color-mix(in oklab, {color.neutral.90} 7%, transparent)"
327
+ },
328
+ "sm": {
329
+ "$value": "1px 2px 4px 0 color-mix(in oklab, {color.neutral.90} 5%, transparent)"
330
+ }
331
+ },
332
+ "spacing": {
333
+ "$type": "dimension",
334
+ "0": { "$value": "0" },
335
+ "2": { "$value": "0.125rem" },
336
+ "3": { "$value": "0.1875rem" },
337
+ "4": { "$value": "0.25rem" },
338
+ "8": { "$value": "0.5rem" },
339
+ "12": { "$value": "0.75rem" },
340
+ "16": { "$value": "1rem" },
341
+ "24": { "$value": "1.5rem" },
342
+ "28": { "$value": "1.75rem" },
343
+ "32": { "$value": "2rem" },
344
+ "36": { "$value": "2.25rem" },
345
+ "48": { "$value": "3rem" },
346
+ "64": { "$value": "4rem" },
347
+ "96": { "$value": "6rem" },
348
+ "128": { "$value": "8rem" },
349
+ "192": { "$value": "12rem" },
350
+ "3xl": { "$value": "{spacing.48}" },
351
+ "4xl": { "$value": "{spacing.64}" },
352
+ "5xl": { "$value": "{spacing.96}" },
353
+ "6xl": { "$value": "{spacing.128}" },
354
+ "7xl": { "$value": "{spacing.192}" },
355
+ "lg": { "$value": "{spacing.16}" },
356
+ "md": { "$value": "{spacing.12}" },
357
+ "sm": { "$value": "{spacing.8}" },
358
+ "xl": { "$value": "{spacing.24}" },
359
+ "xs": { "$value": "{spacing.4}" },
360
+ "xxl": { "$value": "{spacing.32}" },
361
+ "xxs": { "$value": "{spacing.2}" }
362
+ },
363
+ "duration": {
364
+ "$type": "duration",
365
+ "fast": { "$value": "100ms" },
366
+ "medium": { "$value": "300ms" },
367
+ "slow": { "$value": "500ms" }
368
+ },
369
+ "timing": {
370
+ "$type": "cubicBezier",
371
+ "primary": { "$value": "ease" },
372
+ "secondary": { "$value": "linear" },
373
+ "tertiary": { "$value": "cubic-bezier(0.41, 0.094, 0.54, 0.07)" }
374
+ }
375
+ }
376
+ ;
377
+
378
+ export default _default;
@@ -1,13 +1,3 @@
1
- import { primitives, semantics } from './tokens';
2
- export type ColorMix = `color-mix(in oklab, var(${ColorTokens}) ${OpacityRanges}%, transparent)`;
3
- export type ColorTokens = 'transparent' | PrimitiveColorTokens | SemanticColorTokens;
4
1
  export type PolymorphicProps<E extends React.ElementType> = React.PropsWithChildren<React.ComponentPropsWithoutRef<E> & {
5
2
  as?: E;
6
3
  }>;
7
- export type SemanticFontSizeTokens = keyof (typeof semantics)['fontSizes'];
8
- export type SemanticHeightTokens = keyof (typeof semantics)['heights'];
9
- export type SemanticSpacingTokens = keyof (typeof semantics)['spacings'];
10
- type OpacityRanges = 10 | 40;
11
- type PrimitiveColorTokens = keyof (typeof primitives)['colors'];
12
- type SemanticColorTokens = keyof (typeof semantics)['colors'];
13
- export {};
@@ -0,0 +1,15 @@
1
+ export type FlatTokens = Record<string, string>;
2
+ export interface TokensStructure {
3
+ [key: string]: TokenNode;
4
+ }
5
+ type TokenNode = string | TokenValue | TokenWithType | {
6
+ [key: string]: TokenNode;
7
+ };
8
+ interface TokenValue {
9
+ $value: string;
10
+ }
11
+ type TokenWithType = TokensStructure & {
12
+ $type: string;
13
+ };
14
+ export declare const parseTokens: (tokens: TokensStructure) => FlatTokens;
15
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export declare const clamp: (value: number, min: number, max: number) => number;
@@ -1,5 +1,5 @@
1
- import { primitives } from '../theme/tokens';
2
- type ScreenSize = keyof typeof primitives.screens extends `--breakpoint-${infer K}` ? K : never;
1
+ import { default as tokens } from '../theme/tokens.json';
2
+ type ScreenSize = keyof Omit<typeof tokens.breakpoint, '$type'>;
3
3
  type Screens = Record<ScreenSize, number>;
4
4
  /**
5
5
  * A custom hook to retrieve the screen sizes defined in the theme tokens.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "welcome-ui",
3
- "version": "0.0.0-dev.1759252708223",
3
+ "version": "0.0.0-dev.1759392523253",
4
4
  "description": "Customizable design system with react • styled-components • styled-system and ariakit.",
5
5
  "files": [
6
6
  "dist"
@@ -28,7 +28,8 @@
28
28
  "scripts": {
29
29
  "start": "vite build --watch",
30
30
  "build": "vite build",
31
- "theme:generate": "tsx src/theme/generate-theme.ts && yarn run -W prettier --write 'src/theme/theme.css'",
31
+ "build:tokens": "style-dictionary build --config=style-dictionary.json --verbose",
32
+ "theme:generate": "yarn build:tokens && tsx src/theme/generate-theme.ts && yarn run -W prettier --write 'src/theme/theme.css'",
32
33
  "test": "vitest"
33
34
  },
34
35
  "repository": {
@@ -86,6 +87,7 @@
86
87
  "release-it": "^18.1.2",
87
88
  "rollup": "^4.39.0",
88
89
  "rollup-preserve-directives": "^1.1.3",
90
+ "style-dictionary": "^5.0.4",
89
91
  "tsx": "^4.20.6",
90
92
  "vite": "^6.3.5",
91
93
  "vite-plugin-dts": "^4.5.4",