welcome-ui 1.0.0-beta.1 → 1.0.0-beta.3

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 (93) hide show
  1. package/dist/Accordion.js +89 -0
  2. package/dist/Accordion.mjs +579 -0
  3. package/dist/Alert.js +1 -0
  4. package/dist/Alert.mjs +7 -0
  5. package/dist/AspectRatio.js +29 -0
  6. package/dist/AspectRatio.mjs +41 -0
  7. package/dist/Avatar.js +5 -0
  8. package/dist/Avatar.mjs +55 -0
  9. package/dist/Badge.js +17 -0
  10. package/dist/Badge.mjs +53 -0
  11. package/dist/Box.js +1 -0
  12. package/dist/Box.mjs +8 -0
  13. package/dist/Breadcrumb.js +54 -0
  14. package/dist/Breadcrumb.mjs +439 -0
  15. package/dist/Flex.js +1 -0
  16. package/dist/Flex.mjs +26 -0
  17. package/dist/System.js +1 -0
  18. package/dist/System.mjs +51 -0
  19. package/dist/X5NMLKT6-BC1Q56kB.mjs +1258 -0
  20. package/dist/X5NMLKT6-vrNG8i_R.js +14 -0
  21. package/dist/index-0MPAX4B5.mjs +320 -0
  22. package/dist/index-BNA_A0oa.js +155 -0
  23. package/dist/index-BXJQXgy9.js +13 -0
  24. package/dist/index-Bwrtxit1.mjs +84 -0
  25. package/dist/index-Ct2FOeyM.js +17 -0
  26. package/dist/index-DRNn5iIc.js +142 -0
  27. package/dist/index-Du8Nrf16.mjs +128 -0
  28. package/dist/index-MifIgNHW.mjs +47 -0
  29. package/dist/index-V28zHt_Z.js +68 -0
  30. package/dist/index-WmqrMIzg.mjs +19070 -0
  31. package/dist/index.js +147 -5
  32. package/dist/index.mjs +767 -217
  33. package/dist/types/components/Accordion/index.d.ts +16 -0
  34. package/dist/types/components/Accordion/styles.d.ts +6 -0
  35. package/dist/types/components/Accordion/theme.d.ts +10 -0
  36. package/dist/types/components/Alert/Title.d.ts +7 -0
  37. package/dist/types/components/Alert/index.d.ts +24 -0
  38. package/dist/types/components/Alert/styles.d.ts +6 -0
  39. package/dist/types/components/Alert/theme.d.ts +15 -0
  40. package/dist/types/components/AspectRatio/index.d.ts +6 -0
  41. package/dist/types/components/AspectRatio/styles.d.ts +2 -0
  42. package/dist/types/components/Avatar/index.d.ts +16 -0
  43. package/dist/types/components/Avatar/styles.d.ts +2 -0
  44. package/dist/types/components/Avatar/theme.d.ts +9 -0
  45. package/dist/types/components/Avatar/utils.d.ts +3 -0
  46. package/dist/types/components/Badge/index.d.ts +11 -0
  47. package/dist/types/components/Badge/styles.d.ts +8 -0
  48. package/dist/types/components/Badge/theme.d.ts +18 -0
  49. package/dist/types/components/Box/index.d.ts +3 -0
  50. package/dist/types/components/Breadcrumb/Item.d.ts +13 -0
  51. package/dist/types/components/Breadcrumb/Item.styles.d.ts +2 -0
  52. package/dist/types/components/Breadcrumb/index.d.ts +18 -0
  53. package/dist/types/components/Breadcrumb/styles.d.ts +6 -0
  54. package/dist/types/components/Breadcrumb/theme.d.ts +12 -0
  55. package/dist/types/components/Button/index.d.ts +21 -0
  56. package/dist/types/components/Button/styles.d.ts +2 -0
  57. package/dist/types/components/Button/theme.d.ts +13 -0
  58. package/dist/types/components/ButtonGroup/index.d.ts +15 -0
  59. package/dist/types/components/ButtonGroup/styles.d.ts +1 -0
  60. package/dist/types/components/Card/Cover.d.ts +10 -0
  61. package/dist/types/components/Card/Cover.styles.d.ts +1 -0
  62. package/dist/types/components/Card/index.d.ts +8 -0
  63. package/dist/types/components/Card/styles.d.ts +2 -0
  64. package/dist/types/components/Card/theme.d.ts +6 -0
  65. package/dist/types/components/ClearButton/index.d.ts +5 -0
  66. package/dist/types/components/ClearButton/styles.d.ts +1 -0
  67. package/dist/types/components/CloseButton/index.d.ts +3 -0
  68. package/dist/types/components/CloseButton/styles.d.ts +1 -0
  69. package/dist/types/components/Flex/index.d.ts +19 -0
  70. package/dist/types/components/System/index.d.ts +40 -0
  71. package/dist/types/components/WuiProvider/font.d.ts +16 -0
  72. package/dist/types/components/WuiProvider/hide-focus-rings-root.d.ts +8 -0
  73. package/dist/types/components/WuiProvider/index.d.ts +11 -0
  74. package/dist/types/components/WuiProvider/styles.d.ts +5 -0
  75. package/dist/types/components/index.d.ts +15 -0
  76. package/dist/types/index.d.ts +2 -0
  77. package/dist/types/theme/borders.d.ts +6 -0
  78. package/dist/types/theme/colors.d.ts +346 -0
  79. package/dist/types/theme/dark.d.ts +7 -0
  80. package/dist/types/theme/focus.d.ts +10 -0
  81. package/dist/types/theme/fonts.d.ts +18 -0
  82. package/dist/types/theme/index.d.ts +76 -0
  83. package/dist/types/theme/radii.d.ts +12 -0
  84. package/dist/types/theme/screens.d.ts +13 -0
  85. package/dist/types/theme/selection.d.ts +4 -0
  86. package/dist/types/theme/shadows.d.ts +5 -0
  87. package/dist/types/theme/space.d.ts +18 -0
  88. package/dist/types/theme/transitions.d.ts +13 -0
  89. package/dist/types/theme/typography.d.ts +133 -0
  90. package/dist/types/theme/underline.d.ts +9 -0
  91. package/package.json +7 -2
  92. package/dist/Test.js +0 -3
  93. package/dist/Test.mjs +0 -9
package/dist/index.mjs CHANGED
@@ -1,24 +1,346 @@
1
1
  "use client";
2
- import { css as m, rpxTransformers as p, defaultTheme as f } from "@xstyled/styled-components";
3
- import { Test as ee } from "./Test.mjs";
4
- import { WuiProvider as re } from "./WuiProvider.mjs";
5
- const b = (e) => {
6
- const { colors: t } = e;
2
+ import m, { css as g, rpxTransformers as k, defaultTheme as D, th as d, system as p, keyframes as v } from "@xstyled/styled-components";
3
+ import { h as f, a as S } from "./index-MifIgNHW.mjs";
4
+ import { Accordion as Ze, useAccordion as Je } from "./Accordion.mjs";
5
+ import { L as T } from "./index-0MPAX4B5.mjs";
6
+ import { A as Qe } from "./index-0MPAX4B5.mjs";
7
+ import { AspectRatio as er } from "./AspectRatio.mjs";
8
+ import { Avatar as or } from "./Avatar.mjs";
9
+ import { Badge as nr } from "./Badge.mjs";
10
+ import { Box as C } from "./Box.mjs";
11
+ import { Breadcrumb as lr, BreadcrumbComponent as sr } from "./Breadcrumb.mjs";
12
+ import u, { Children as W, cloneElement as _ } from "react";
13
+ import { shouldForwardProp as z, forwardRef as h } from "./System.mjs";
14
+ import { componentSystem as dr, filterSystemProps as cr, system as ur, wrapperSystem as gr } from "./System.mjs";
15
+ import { B as R } from "./X5NMLKT6-BC1Q56kB.mjs";
16
+ import { S as U } from "./index-Du8Nrf16.mjs";
17
+ import { C as w } from "./index-Bwrtxit1.mjs";
18
+ import { Flex as br } from "./Flex.mjs";
19
+ import { WuiProvider as hr } from "./WuiProvider.mjs";
20
+ function y(r, e) {
21
+ if (typeof r != "object" || r === null) return e;
22
+ if (typeof e != "object" || e === null) return r;
23
+ const t = { ...r };
24
+ for (const n in e)
25
+ e.hasOwnProperty(n) && (t[n] = y(t[n], e[n]));
26
+ return t;
27
+ }
28
+ const N = (r) => {
29
+ const { borderWidths: e, colors: t, fontSizes: n, radii: a, space: s, texts: c, transitions: l } = r;
30
+ return {
31
+ padding: s.lg,
32
+ wrapper: {
33
+ backgroundColor: t["neutral-10"],
34
+ transition: l.medium,
35
+ border: `${e.sm} solid ${t["neutral-30"]}`,
36
+ borderRadius: a.md
37
+ },
38
+ icon: {
39
+ color: t["neutral-90"]
40
+ },
41
+ content: {
42
+ fontSize: n.sm
43
+ },
44
+ title: c.h5
45
+ };
46
+ }, I = (r) => {
47
+ const { borderWidths: e, colors: t, fontSizes: n, fontWeights: a, radii: s, space: c } = r, l = (i) => ({
48
+ backgroundColor: t[`${i}-10`],
49
+ borderColor: t[`${i}-10`],
50
+ color: t[`${i}-90`]
51
+ });
7
52
  return {
8
53
  default: {
9
- backgroundColor: t["primary-50"]
54
+ backgroundColor: t["neutral-10"],
55
+ borderColor: t["neutral-30"],
56
+ borderRadius: s.lg,
57
+ borderStyle: "solid",
58
+ borderWidth: e.sm,
59
+ color: t["neutral-80"],
60
+ fontSize: n.sm
61
+ },
62
+ title: {
63
+ default: {
64
+ color: t["neutral-90"],
65
+ fontWeight: a.medium
66
+ },
67
+ sizes: {
68
+ sm: {
69
+ marginBottom: c.xs
70
+ },
71
+ md: {
72
+ marginBottom: c.sm
73
+ }
74
+ }
75
+ },
76
+ danger: l("red"),
77
+ warning: l("orange"),
78
+ info: l("blue"),
79
+ success: l("green"),
80
+ beige: {
81
+ backgroundColor: t["beige-20"],
82
+ borderColor: t["beige-20"],
83
+ color: t["beige-80"]
84
+ },
85
+ sizes: {
86
+ sm: {
87
+ padding: c.lg
88
+ },
89
+ md: {
90
+ padding: c.xl
91
+ }
10
92
  }
11
93
  };
12
- };
13
- function d(e, t) {
14
- if (typeof e != "object" || e === null) return t;
15
- if (typeof t != "object" || t === null) return e;
16
- const o = { ...e };
17
- for (const l in t)
18
- t.hasOwnProperty(l) && (o[l] = d(o[l], t[l]));
19
- return o;
20
- }
21
- const x = {
94
+ }, O = (r) => {
95
+ const { colors: e, fontWeights: t, toRem: n } = r;
96
+ return {
97
+ sizes: {
98
+ sm: n(20),
99
+ md: n(30),
100
+ lg: n(40),
101
+ xl: n(50),
102
+ xxl: n(60)
103
+ },
104
+ text: {
105
+ color: e["neutral-90"],
106
+ fontWeight: t.bold
107
+ }
108
+ };
109
+ }, L = (r) => {
110
+ const { colors: e, fontWeights: t, space: n, texts: a, toRem: s } = r;
111
+ return {
112
+ default: {
113
+ ...a.xs,
114
+ fontWeight: t.medium
115
+ },
116
+ variants: {
117
+ default: {
118
+ color: e["beige-70"],
119
+ backgroundColor: e["beige-30"]
120
+ },
121
+ primary: {
122
+ color: e["neutral-90"],
123
+ backgroundColor: e["primary-40"]
124
+ }
125
+ },
126
+ disabled: {
127
+ default: {
128
+ color: e["beige-40"],
129
+ backgroundColor: e["beige-20"]
130
+ },
131
+ primary: {
132
+ color: e["primary-80"],
133
+ backgroundColor: e["primary-50"]
134
+ }
135
+ },
136
+ sizes: {
137
+ sm: {
138
+ padding: n.xxs,
139
+ height: s(16),
140
+ borderRadius: s(14)
141
+ },
142
+ md: {
143
+ padding: n.xs,
144
+ height: s(20),
145
+ borderRadius: s(14)
146
+ }
147
+ }
148
+ };
149
+ }, H = (r) => {
150
+ const { colors: e, space: t, texts: n } = r;
151
+ return {
152
+ list: {
153
+ ...n["subtitle-sm"],
154
+ padding: `${t.sm} 0`
155
+ },
156
+ item: {
157
+ default: {
158
+ color: e["neutral-50"],
159
+ textDecoration: "none"
160
+ },
161
+ hover: {
162
+ color: e["neutral-70"]
163
+ },
164
+ active: {
165
+ color: e["neutral-70"]
166
+ }
167
+ },
168
+ separator: {
169
+ padding: `0 ${t.xs}`,
170
+ color: e["neutral-50"]
171
+ }
172
+ };
173
+ }, G = (r) => {
174
+ const { colors: e, focus: t, fontWeights: n, radii: a, space: s, texts: c, toRem: l } = r, i = {
175
+ ...c.xs,
176
+ color: e["neutral-10"],
177
+ fontWeight: n.bold,
178
+ letterSpacing: 0,
179
+ borderRadius: a.md
180
+ };
181
+ return {
182
+ primary: {
183
+ ...i,
184
+ color: r.colors["neutral-90"],
185
+ backgroundColor: e["primary-40"],
186
+ borderColor: e["primary-40"]
187
+ },
188
+ secondary: {
189
+ ...i,
190
+ backgroundColor: e["neutral-90"],
191
+ borderColor: e["neutral-90"]
192
+ },
193
+ tertiary: {
194
+ ...i,
195
+ color: e["neutral-90"],
196
+ backgroundColor: "transparent",
197
+ borderColor: e["neutral-90"]
198
+ },
199
+ ghost: {
200
+ ...i,
201
+ color: e["neutral-90"],
202
+ backgroundColor: "transparent",
203
+ borderColor: "transparent"
204
+ },
205
+ danger: {
206
+ primary: {
207
+ color: e["neutral-10"],
208
+ backgroundColor: e["red-70"],
209
+ borderColor: e["red-70"]
210
+ },
211
+ tertiary: {
212
+ backgroundColor: "transparent",
213
+ color: e["red-80"],
214
+ borderColor: e["red-80"]
215
+ },
216
+ ghost: {
217
+ color: e["red-80"],
218
+ backgroundColor: "transparent",
219
+ borderColor: "transparent"
220
+ }
221
+ },
222
+ hover: {
223
+ primary: {
224
+ backgroundColor: e["primary-30"],
225
+ borderColor: e["primary-30"]
226
+ },
227
+ secondary: {
228
+ backgroundColor: e["neutral-70"],
229
+ borderColor: "transparent"
230
+ },
231
+ tertiary: {
232
+ backgroundColor: f(e["neutral-90"], 0.1)
233
+ },
234
+ ghost: {
235
+ backgroundColor: f(e["neutral-90"], 0.1)
236
+ },
237
+ danger: {
238
+ primary: {
239
+ backgroundColor: e["red-60"],
240
+ borderColor: e["red-60"]
241
+ },
242
+ tertiary: {
243
+ backgroundColor: e["red-10"]
244
+ },
245
+ ghost: {
246
+ backgroundColor: e["red-10"]
247
+ }
248
+ }
249
+ },
250
+ focus: {
251
+ primary: { ...t(e["primary-20"]) },
252
+ secondary: { ...t(e["neutral-40"]) },
253
+ tertiary: { ...t(e["neutral-40"]) },
254
+ ghost: { ...t(e["neutral-40"]) },
255
+ danger: {
256
+ primary: { ...t(e["red-40"]) },
257
+ tertiary: { ...t(e["red-40"]) },
258
+ ghost: { ...t(e["red-40"]) }
259
+ }
260
+ },
261
+ active: {
262
+ primary: {
263
+ backgroundColor: e["primary-10"],
264
+ borderColor: e["primary-10"]
265
+ },
266
+ secondary: {
267
+ backgroundColor: e["neutral-50"],
268
+ borderColor: e["neutral-50"]
269
+ },
270
+ tertiary: {
271
+ backgroundColor: f(e["neutral-90"], 0.4)
272
+ },
273
+ ghost: {
274
+ backgroundColor: f(e["neutral-90"], 0.4)
275
+ },
276
+ danger: {
277
+ primary: {
278
+ backgroundColor: e["red-50"],
279
+ borderColor: e["red-50"]
280
+ },
281
+ tertiary: {
282
+ backgroundColor: e["red-20"]
283
+ },
284
+ ghost: {
285
+ backgroundColor: e["red-20"]
286
+ }
287
+ }
288
+ },
289
+ disabled: {
290
+ ...i,
291
+ color: e["beige-70"],
292
+ backgroundColor: e["beige-40"],
293
+ borderColor: e["beige-40"],
294
+ "&:focus": { ...t(e["beige-10"]) }
295
+ },
296
+ sizes: {
297
+ xs: {
298
+ height: l(24),
299
+ padding: `${s.xs} ${s.sm}`
300
+ },
301
+ sm: {
302
+ height: l(32),
303
+ padding: `${s.sm} ${s.md}`
304
+ },
305
+ md: {
306
+ ...c.sm,
307
+ fontWeight: n.bold,
308
+ height: l(40),
309
+ padding: `${s.sm} ${s.lg}`
310
+ },
311
+ lg: {
312
+ ...c.sm,
313
+ fontWeight: n.bold,
314
+ height: l(48),
315
+ padding: `${s.md} ${s.xl}`
316
+ }
317
+ },
318
+ icon: {
319
+ only: {
320
+ xs: l(16),
321
+ sm: l(16),
322
+ md: l(16),
323
+ lg: l(24)
324
+ },
325
+ default: {
326
+ xs: l(12),
327
+ sm: l(16),
328
+ md: l(16),
329
+ lg: l(16)
330
+ }
331
+ }
332
+ };
333
+ }, P = (r) => {
334
+ const { borderWidths: e, colors: t } = r;
335
+ return {
336
+ default: {
337
+ backgroundColor: t["neutral-10"],
338
+ borderStyle: "solid",
339
+ borderWidth: e.sm,
340
+ borderColor: t["neutral-30"]
341
+ }
342
+ };
343
+ }, M = {
22
344
  "beige-10": "#FBF9F7",
23
345
  "beige-20": "#F6F3EF",
24
346
  "beige-30": "#EAE4DE",
@@ -124,221 +446,221 @@ const x = {
124
446
  "yellow-70": "#846A01",
125
447
  "yellow-80": "#604D00",
126
448
  "yellow-90": "#423500"
127
- }, h = (e) => ({
128
- ...e,
129
- "primary-10": e["yellow-10"],
130
- "primary-20": e["yellow-20"],
131
- "primary-30": e["yellow-30"],
132
- "primary-40": e["yellow-40"],
133
- "primary-50": e["yellow-50"],
134
- "primary-60": e["yellow-60"],
135
- "primary-70": e["yellow-70"],
136
- "primary-80": e["yellow-80"],
137
- "primary-90": e["yellow-90"],
138
- "secondary-blue": e["blue-40"],
139
- "secondary-green": e["green-30"],
140
- "secondary-orange": e["red-orange-40"],
141
- "secondary-pink": e["pink-40"],
142
- "secondary-teal": e["teal-40"],
143
- "secondary-violet": e["violet-40"],
449
+ }, E = (r) => ({
450
+ ...r,
451
+ "primary-10": r["yellow-10"],
452
+ "primary-20": r["yellow-20"],
453
+ "primary-30": r["yellow-30"],
454
+ "primary-40": r["yellow-40"],
455
+ "primary-50": r["yellow-50"],
456
+ "primary-60": r["yellow-60"],
457
+ "primary-70": r["yellow-70"],
458
+ "primary-80": r["yellow-80"],
459
+ "primary-90": r["yellow-90"],
460
+ "secondary-blue": r["blue-40"],
461
+ "secondary-green": r["green-30"],
462
+ "secondary-orange": r["red-orange-40"],
463
+ "secondary-pink": r["pink-40"],
464
+ "secondary-teal": r["teal-40"],
465
+ "secondary-violet": r["violet-40"],
144
466
  overlay: "rgba(0, 0, 0, 0.55)"
145
- }), c = h(x), w = Object.keys(c).reduce((e, t) => {
146
- if (t.startsWith("secondary-") || t === "overlay") return e;
147
- const o = 100 - Number(t.slice(-2)), l = t.slice(0, t.length - 2);
467
+ }), x = E(M), Y = Object.keys(x).reduce((r, e) => {
468
+ if (e.startsWith("secondary-") || e === "overlay") return r;
469
+ const t = 100 - Number(e.slice(-2)), n = e.slice(0, e.length - 2);
148
470
  return {
149
- ...e,
150
- [t]: c[`${l}${o}`]
471
+ ...r,
472
+ [e]: x[`${n}${t}`]
151
473
  };
152
- }, {}), A = {
153
- ...c,
154
- ...h(w)
155
- }, K = {
156
- colors: A
157
- }, E = (e) => ({
474
+ }, {}), j = {
475
+ ...x,
476
+ ...E(Y)
477
+ }, Oe = {
478
+ colors: j
479
+ }, q = (r) => ({
158
480
  "welcome-font": [
159
481
  {
160
- url: `${e.fontsUrl}/welcome-font-regular`,
482
+ url: `${r.fontsUrl}/welcome-font-regular`,
161
483
  weight: "400"
162
484
  },
163
485
  {
164
- url: `${e.fontsUrl}/welcome-font-medium`,
486
+ url: `${r.fontsUrl}/welcome-font-medium`,
165
487
  weight: "500"
166
488
  },
167
489
  {
168
- url: `${e.fontsUrl}/welcome-font-bold`,
490
+ url: `${r.fontsUrl}/welcome-font-bold`,
169
491
  weight: "600"
170
492
  },
171
493
  {
172
- url: `${e.fontsUrl}/welcome-font-regular-italic`,
494
+ url: `${r.fontsUrl}/welcome-font-regular-italic`,
173
495
  style: "italic",
174
496
  weight: "400"
175
497
  },
176
498
  {
177
- url: `${e.fontsUrl}/welcome-font-medium-italic`,
499
+ url: `${r.fontsUrl}/welcome-font-medium-italic`,
178
500
  style: "italic",
179
501
  weight: "500"
180
502
  },
181
503
  {
182
- url: `${e.fontsUrl}/welcome-font-bold-italic`,
504
+ url: `${r.fontsUrl}/welcome-font-bold-italic`,
183
505
  style: "italic",
184
506
  weight: "600"
185
507
  }
186
508
  ],
187
509
  "welcome-icon-font": [
188
510
  {
189
- url: `${e.fontsUrl}/icon-font/__ICON_FONT_HASH__/welcome-icon-font`,
511
+ url: `${r.fontsUrl}/icon-font/__ICON_FONT_HASH__/welcome-icon-font`,
190
512
  display: "block"
191
513
  }
192
514
  ],
193
515
  "work-sans": [
194
516
  {
195
- url: `${e.fontsUrl}/work-sans-variable`,
517
+ url: `${r.fontsUrl}/work-sans-variable`,
196
518
  isVariable: !0,
197
519
  stretch: "75% 125%",
198
520
  weight: "100 1000"
199
521
  }
200
522
  ]
201
- }), D = (e, t) => {
202
- const { toEm: o, toRem: l } = t, n = l;
523
+ }), V = (r, e) => {
524
+ const { toEm: t, toRem: n } = e, a = n;
203
525
  return {
204
- h0: n(65),
205
- h1: n(45),
206
- h2: n(36),
207
- h3: n(26),
208
- h4: n(20),
209
- h5: n(16),
210
- h6: n(14),
211
- lg: n(18),
212
- md: n(16),
213
- sm: n(14),
214
- "subtitle-md": n(13),
215
- "subtitle-sm": n(11),
216
- xs: n(12)
526
+ h0: a(65),
527
+ h1: a(45),
528
+ h2: a(36),
529
+ h3: a(26),
530
+ h4: a(20),
531
+ h5: a(16),
532
+ h6: a(14),
533
+ lg: a(18),
534
+ md: a(16),
535
+ sm: a(14),
536
+ "subtitle-md": a(13),
537
+ "subtitle-sm": a(11),
538
+ xs: a(12)
217
539
  };
218
- }, y = ({
219
- defaultLineHeight: e,
220
- toRem: t
540
+ }, Z = ({
541
+ defaultLineHeight: r,
542
+ toRem: e
221
543
  }) => ({
222
- html: e,
223
- h0: t(72),
224
- h1: t(48),
225
- h2: t(40),
226
- h3: t(32),
227
- h4: t(24),
228
- h5: t(18),
229
- h6: t(16),
230
- lg: t(24),
231
- md: t(18),
232
- sm: t(18),
233
- xs: t(14),
234
- "subtitle-md": e,
235
- "subtitle-sm": e
236
- }), T = {
544
+ html: r,
545
+ h0: e(72),
546
+ h1: e(48),
547
+ h2: e(40),
548
+ h3: e(32),
549
+ h4: e(24),
550
+ h5: e(18),
551
+ h6: e(16),
552
+ lg: e(24),
553
+ md: e(18),
554
+ sm: e(18),
555
+ xs: e(14),
556
+ "subtitle-md": r,
557
+ "subtitle-sm": r
558
+ }), J = {
237
559
  regular: 400,
238
560
  medium: 500,
239
561
  bold: 600
240
- }, B = ({
241
- defaultLetterSpacing: e,
242
- toRem: t
562
+ }, K = ({
563
+ defaultLetterSpacing: r,
564
+ toRem: e
243
565
  }) => ({
244
- html: e,
245
- h0: t(-1.7),
246
- h1: t(-1.2),
247
- h2: t(-1),
248
- h3: t(-0.9),
249
- h4: t(-0.6),
250
- h5: t(-0.5),
251
- h6: t(-0.5),
252
- lg: e,
253
- md: e,
254
- sm: e,
255
- xs: t(-0.2),
256
- "subtitle-md": t(-0.2),
257
- "subtitle-sm": t(-0.2)
258
- }), v = (e) => {
259
- const { fontWeights: t } = e;
566
+ html: r,
567
+ h0: e(-1.7),
568
+ h1: e(-1.2),
569
+ h2: e(-1),
570
+ h3: e(-0.9),
571
+ h4: e(-0.6),
572
+ h5: e(-0.5),
573
+ h6: e(-0.5),
574
+ lg: r,
575
+ md: r,
576
+ sm: r,
577
+ xs: e(-0.2),
578
+ "subtitle-md": e(-0.2),
579
+ "subtitle-sm": e(-0.2)
580
+ }), Q = (r) => {
581
+ const { fontWeights: e } = r;
260
582
  return {
261
- h0: t.bold,
262
- h1: t.bold,
263
- h2: t.bold,
264
- h3: t.bold,
265
- h4: t.bold,
266
- h5: t.bold,
267
- h6: t.bold,
268
- lg: t.regular,
269
- md: t.regular,
270
- sm: t.regular,
271
- "subtitle-md": t.bold,
272
- "subtitle-sm": t.medium,
273
- xs: t.regular
583
+ h0: e.bold,
584
+ h1: e.bold,
585
+ h2: e.bold,
586
+ h3: e.bold,
587
+ h4: e.bold,
588
+ h5: e.bold,
589
+ h6: e.bold,
590
+ lg: e.regular,
591
+ md: e.regular,
592
+ sm: e.regular,
593
+ "subtitle-md": e.bold,
594
+ "subtitle-sm": e.medium,
595
+ xs: e.regular
274
596
  };
275
- }, C = (e) => {
276
- const { fonts: t } = e;
597
+ }, X = (r) => {
598
+ const { fonts: e } = r;
277
599
  return {
278
- h0: t.headings,
279
- h1: t.headings,
280
- h2: t.headings,
281
- h3: t.headings,
282
- h4: t.headings,
283
- h5: t.headings,
284
- h6: t.headings,
285
- "subtitle-md": t.headings,
286
- "subtitle-sm": t.headings
600
+ h0: e.headings,
601
+ h1: e.headings,
602
+ h2: e.headings,
603
+ h3: e.headings,
604
+ h4: e.headings,
605
+ h5: e.headings,
606
+ h6: e.headings,
607
+ "subtitle-md": e.headings,
608
+ "subtitle-sm": e.headings
287
609
  };
288
- }, k = () => ({
610
+ }, ee = () => ({
289
611
  "subtitle-md": "uppercase",
290
612
  "subtitle-sm": "uppercase"
291
- }), _ = (e) => {
292
- const { colors: t } = e;
613
+ }), re = (r) => {
614
+ const { colors: e } = r;
293
615
  return {
294
- h0: t["neutral-90"],
295
- h1: t["neutral-90"],
296
- h2: t["neutral-90"],
297
- h3: t["neutral-90"],
298
- h4: t["neutral-90"],
299
- h5: t["neutral-90"],
300
- h6: t["neutral-90"]
616
+ h0: e["neutral-90"],
617
+ h1: e["neutral-90"],
618
+ h2: e["neutral-90"],
619
+ h3: e["neutral-90"],
620
+ h4: e["neutral-90"],
621
+ h5: e["neutral-90"],
622
+ h6: e["neutral-90"]
301
623
  };
302
- }, $ = (e) => {
624
+ }, oe = (r) => {
303
625
  const {
304
- fontSizes: t,
305
- letterSpacings: o,
306
- lineHeights: l,
307
- textsFontColors: n,
308
- textsFontFamily: g,
309
- textsFontWeights: F,
310
- textsTextTransform: u
311
- } = e;
312
- return Object.keys(t).reduce((s, r) => ({
313
- ...s,
314
- [r]: {
315
- color: n[r],
316
- fontFamily: g[r] || void 0,
317
- fontWeight: F[r],
318
- fontSize: t[r],
319
- lineHeight: l[r] || l.lg,
320
- letterSpacing: o[r] || void 0,
321
- textTransform: u[r] || void 0
626
+ fontSizes: e,
627
+ letterSpacings: t,
628
+ lineHeights: n,
629
+ textsFontColors: a,
630
+ textsFontFamily: s,
631
+ textsFontWeights: c,
632
+ textsTextTransform: l
633
+ } = r;
634
+ return Object.keys(e).reduce((i, o) => ({
635
+ ...i,
636
+ [o]: {
637
+ color: a[o],
638
+ fontFamily: s[o] || void 0,
639
+ fontWeight: c[o],
640
+ fontSize: e[o],
641
+ lineHeight: n[o] || n.lg,
642
+ letterSpacing: t[o] || void 0,
643
+ textTransform: l[o] || void 0
322
644
  }
323
645
  }), {});
324
- }, U = (e, t, o) => ({
325
- texts: [e, "sans-serif"].join(", "),
326
- headings: [t, "sans-serif"].join(", "),
327
- icons: o
328
- }), a = {
646
+ }, te = (r, e, t) => ({
647
+ texts: [r, "sans-serif"].join(", "),
648
+ headings: [e, "sans-serif"].join(", "),
649
+ icons: t
650
+ }), F = {
329
651
  primary: "ease",
330
652
  secondary: "linear",
331
653
  tertiary: "cubic-bezier(0.41, 0.094, 0.54, 0.07)"
332
- }, S = {
333
- slow: `500ms ${a.tertiary}`,
334
- medium: `300ms ${a.primary}`,
335
- fast: `100ms ${a.secondary}`
336
- }, N = ({ colors: e }) => ({
337
- default: m`
654
+ }, ne = {
655
+ slow: `500ms ${F.tertiary}`,
656
+ medium: `300ms ${F.primary}`,
657
+ fast: `100ms ${F.secondary}`
658
+ }, ae = ({ colors: r }) => ({
659
+ default: g`
338
660
  background-image: linear-gradient(
339
661
  0deg,
340
- ${e["primary-40"]},
341
- ${e["primary-40"]} 100%
662
+ ${r["primary-40"]},
663
+ ${r["primary-40"]} 100%
342
664
  );
343
665
  background-repeat: no-repeat;
344
666
  background-size: 100% 50%;
@@ -348,24 +670,24 @@ const x = {
348
670
  background-size 250ms,
349
671
  color 250ms;
350
672
  `,
351
- hover: m`
673
+ hover: g`
352
674
  opacity: 1;
353
675
  background-position-y: 100%;
354
676
  background-size: 100% 100%;
355
677
  `
356
- }), W = (e) => ({
678
+ }), le = (r) => ({
357
679
  none: "0",
358
- sm: e.toRem(2),
359
- md: e.toRem(4),
360
- lg: e.toRem(8),
361
- xl: e.toRem(16),
362
- xxl: e.toRem(24),
680
+ sm: r.toRem(2),
681
+ md: r.toRem(4),
682
+ lg: r.toRem(8),
683
+ xl: r.toRem(16),
684
+ xxl: r.toRem(24),
363
685
  full: "100%"
364
- }), L = {
686
+ }), se = {
365
687
  sm: "1px",
366
688
  md: "2px",
367
689
  lg: "3px"
368
- }, O = {
690
+ }, ie = {
369
691
  xs: 0,
370
692
  sm: 480,
371
693
  md: 736,
@@ -374,49 +696,277 @@ const x = {
374
696
  xxl: 1440,
375
697
  "3xl": 1620,
376
698
  "4xl": 1920
377
- }, I = {
699
+ }, de = {
378
700
  sm: "1px 2px 4px 0 rgba(0,0,0,0.05)",
379
701
  md: "3px 4px 10px 0 rgba(0,0,0,0.07)"
380
- }, z = (e) => ({
381
- xxs: e.toRem(2),
382
- xs: e.toRem(4),
383
- sm: e.toRem(8),
384
- md: e.toRem(12),
385
- lg: e.toRem(16),
386
- xl: e.toRem(24),
387
- xxl: e.toRem(32),
388
- "3xl": e.toRem(48),
389
- "4xl": e.toRem(64),
390
- "5xl": e.toRem(96),
391
- "6xl": e.toRem(128),
392
- "7xl": e.toRem(192)
393
- }), H = (e) => ({
394
- backgroundColor: e.colors["primary-40"],
395
- color: e.colors["neutral-90"]
396
- }), P = ({ colors: e }) => {
397
- function t(o = e["primary-40"]) {
702
+ }, ce = (r) => ({
703
+ xxs: r.toRem(2),
704
+ xs: r.toRem(4),
705
+ sm: r.toRem(8),
706
+ md: r.toRem(12),
707
+ lg: r.toRem(16),
708
+ xl: r.toRem(24),
709
+ xxl: r.toRem(32),
710
+ "3xl": r.toRem(48),
711
+ "4xl": r.toRem(64),
712
+ "5xl": r.toRem(96),
713
+ "6xl": r.toRem(128),
714
+ "7xl": r.toRem(192)
715
+ }), ue = (r) => ({
716
+ backgroundColor: r.colors["primary-40"],
717
+ color: r.colors["neutral-90"]
718
+ }), ge = ({ colors: r }) => {
719
+ function e(t = r["primary-40"]) {
398
720
  return {
399
- boxShadow: `0 0 0 2px ${o}`
721
+ boxShadow: `0 0 0 2px ${t}`
400
722
  };
401
723
  }
402
- return t;
403
- }, R = "work-sans", G = 16, M = "-0.019rem", Y = 1.15, V = "https://cdn.welcome-ui.com/fonts", Z = "welcome-font", q = "welcome-icon-font", Q = (e = {}) => {
724
+ return e;
725
+ }, me = "work-sans", be = 16, pe = "-0.019rem", he = 1.15, fe = "https://cdn.welcome-ui.com/fonts", Fe = "welcome-font", xe = "welcome-icon-font", Le = (r = {}) => {
404
726
  const {
405
- defaultFontFamily: t = R,
406
- defaultFontSize: o = G,
407
- defaultLetterSpacing: l = M,
408
- defaultLineHeight: n = Y,
409
- fontsUrl: g = V,
410
- headingFontFamily: F = Z,
411
- iconFontFamily: u = q,
412
- ...s
413
- } = e;
414
- let r = {};
415
- return r.transformers = { ...p }, r.toEm = (i) => `${i / o}em`, r.toRem = (i) => `${i / o}rem`, r.toPx = (i) => `${i * o}px`, r.colors = c, r.fontsUrl = g, r.fontFaces = E(r), r.fontSizes = D("rem", r), r.defaultLineHeight = n, r.defaultLetterSpacing = l, r.lineHeights = y(r), r.fontWeights = T, r.letterSpacings = B(r), r.fonts = U(t, F, u), r.borderWidths = L, r.screens = O, r.space = z(r), r.inset = r.space, r.radii = W(r), r.transitions = S, r.timingFunction = a, r.shadows = I, r = d(r, s), r.selection = H(r), r.underline = N(r), r.focus = P(r), r.textsFontWeights = v(r), r.textsFontFamily = C(r), r.textsFontColors = _(r), r.textsTextTransform = k(), r.texts = $(r), r.test = b(r), r.states = f.states, r = d(r, s), r;
416
- };
727
+ defaultFontFamily: e = me,
728
+ defaultFontSize: t = be,
729
+ defaultLetterSpacing: n = pe,
730
+ defaultLineHeight: a = he,
731
+ fontsUrl: s = fe,
732
+ headingFontFamily: c = Fe,
733
+ iconFontFamily: l = xe,
734
+ ...i
735
+ } = r;
736
+ let o = {};
737
+ return o.transformers = { ...k }, o.toEm = (b) => `${b / t}em`, o.toRem = (b) => `${b / t}rem`, o.toPx = (b) => `${b * t}px`, o.colors = x, o.fontsUrl = s, o.fontFaces = q(o), o.fontSizes = V("rem", o), o.defaultLineHeight = a, o.defaultLetterSpacing = n, o.lineHeights = Z(o), o.fontWeights = J, o.letterSpacings = K(o), o.fonts = te(e, c, l), o.borderWidths = se, o.screens = ie, o.space = ce(o), o.inset = o.space, o.radii = le(o), o.transitions = ne, o.timingFunction = F, o.shadows = de, o = y(o, i), o.selection = ue(o), o.underline = ae(o), o.focus = ge(o), o.textsFontWeights = Q(o), o.textsFontFamily = X(o), o.textsFontColors = re(o), o.textsTextTransform = ee(), o.texts = oe(o), o.accordions = N(o), o.alerts = I(o), o.avatars = O(o), o.badges = L(o), o.breadcrumbs = H(o), o.buttons = G(o), o.cards = P(o), o.states = D.states, o = y(o, i), o;
738
+ }, ye = (r, e = "square") => g`
739
+ width: ${d(`buttons.sizes.${r}.height`)};
740
+ padding: 0;
741
+ ${e === "circle" && g`
742
+ border-radius: ${d(`buttons.sizes.${r}.height`)};
743
+ `};
744
+ `, A = m(R).withConfig({ shouldForwardProp: z })(
745
+ ({ danger: r, disabled: e, shape: t, size: n = "md", variant: a = "primary" }) => g`
746
+ ${d(`buttons.${a}`)};
747
+ ${r && g`
748
+ ${d(`buttons.danger.${a}`)};
749
+ `}
750
+ position: relative;
751
+ display: inline-flex;
752
+ align-items: center;
753
+ justify-content: center;
754
+ width: auto;
755
+ ${d(`buttons.sizes.${n}`)};
756
+ text-decoration: none;
757
+ text-align: center;
758
+ white-space: nowrap;
759
+ cursor: pointer;
760
+ outline: none !important; /* important for firefox */
761
+ border-width: sm;
762
+ border-style: solid;
763
+ appearance: none;
764
+ overflow: hidden;
765
+ transition: medium;
766
+ ${t && ye(n, t)};
767
+ ${p};
768
+
769
+ & > svg.wui-icon,
770
+ & > i.wui-icon-font {
771
+ font-weight: initial;
772
+
773
+ &:only-child {
774
+ width: ${d(`buttons.icon.only.${n}`)};
775
+ height: ${d(`buttons.icon.only.${n}`)};
776
+ font-size: ${d(`buttons.icon.only.${n}`)};
777
+ }
778
+ &:not(:only-child) {
779
+ width: ${d(`buttons.icon.default.${n}`)};
780
+ height: ${d(`buttons.icon.default.${n}`)};
781
+ font-size: ${d(`buttons.icon.default.${n}`)};
782
+ }
783
+ }
784
+
785
+ & > *:not(:only-child):not(:last-child) {
786
+ margin-right: sm;
787
+ }
788
+
789
+ ${!e && g`
790
+ [${S}] &:focus {
791
+ box-shadow: none;
792
+ }
793
+ &:focus {
794
+ ${d(`buttons.focus.${a}`)};
795
+ ${r && g`
796
+ ${d(`buttons.focus.danger.${a}`)};
797
+ `}
798
+ }
799
+ &:hover {
800
+ ${d(`buttons.hover.${a}`)};
801
+ ${r && g`
802
+ ${d(`buttons.hover.danger.${a}`)};
803
+ `}
804
+ }
805
+ &:active {
806
+ ${d(`buttons.active.${a}`)};
807
+ ${r && g`
808
+ ${d(`buttons.active.danger.${a}`)};
809
+ `}
810
+ }
811
+ `};
812
+
813
+ &[disabled] {
814
+ cursor: not-allowed;
815
+ }
816
+ `
817
+ ), $ = h(
818
+ ({
819
+ children: r,
820
+ danger: e,
821
+ dataTestId: t,
822
+ disabled: n,
823
+ isLoading: a,
824
+ size: s = "md",
825
+ variant: c = "primary",
826
+ ...l
827
+ }, i) => {
828
+ const o = n || a;
829
+ return /* @__PURE__ */ u.createElement(
830
+ A,
831
+ {
832
+ danger: e,
833
+ "data-loading": a,
834
+ "data-testid": t,
835
+ disabled: o,
836
+ ref: i,
837
+ size: s,
838
+ variant: o ? "disabled" : c,
839
+ ...l
840
+ },
841
+ a && /* @__PURE__ */ u.createElement("div", null, /* @__PURE__ */ u.createElement(
842
+ C,
843
+ {
844
+ alignItems: "center",
845
+ bottom: 0,
846
+ display: "flex",
847
+ justifyContent: "center",
848
+ left: 0,
849
+ m: 0,
850
+ position: "absolute",
851
+ right: 0,
852
+ top: 0
853
+ },
854
+ /* @__PURE__ */ u.createElement(T, { size: "xs" })
855
+ ), /* @__PURE__ */ u.createElement(C, { opacity: "0" }, r)),
856
+ !a && r
857
+ );
858
+ }
859
+ );
860
+ $.displayName = "Button";
861
+ const He = A, $e = m.div`
862
+ display: inline-flex;
863
+ flex-wrap: wrap;
864
+ align-items: center;
865
+ margin-top: -3px;
866
+
867
+ > * {
868
+ margin-top: 3px;
869
+
870
+ &:not(:only-child) {
871
+ &:not(:last-child) {
872
+ border-right-color: rgba(255, 255, 255, 0.4);
873
+ }
874
+
875
+ &:first-child {
876
+ border-top-right-radius: 0;
877
+ border-bottom-right-radius: 0;
878
+ }
879
+
880
+ &:last-child {
881
+ border-top-left-radius: 0;
882
+ border-bottom-left-radius: 0;
883
+ }
884
+
885
+ &:not(:last-child):not(:first-child) {
886
+ border-radius: 0;
887
+ }
888
+ }
889
+ }
890
+
891
+ ${p};
892
+ `, Ge = h(
893
+ ({ children: r, dataTestId: e, disabled: t, size: n, variant: a }, s) => {
894
+ function c(l) {
895
+ return W.toArray(l).filter(Boolean).map((i) => _(i, {
896
+ ...i.props,
897
+ disabled: t || i.props.disabled,
898
+ size: n || i.props.size,
899
+ variant: a || i.props.variant
900
+ }));
901
+ }
902
+ return /* @__PURE__ */ u.createElement($e, { "data-testid": e, ref: s }, c(r));
903
+ }
904
+ ), Ce = m(U)`
905
+ ${d("cards.cover")};
906
+
907
+ ${p};
908
+ `, we = ({ src: r, ...e }) => /* @__PURE__ */ u.createElement(Ce, { ...e }, /* @__PURE__ */ u.createElement("img", { src: r })), Ee = m.divBox`
909
+ overflow: 'hidden';
910
+ border-radius: md;
911
+ ${d("cards.default")};
912
+ background-size: cover;
913
+ background-position: center;
914
+
915
+ ${p};
916
+ `, Ae = m.divBox`
917
+ padding: lg;
918
+
919
+ ${p};
920
+ `, Be = h(({ children: r, ...e }, t) => /* @__PURE__ */ u.createElement(Ee, { ref: t, ...e }, r)), Pe = Object.assign(Be, {
921
+ Body: Ae,
922
+ Cover: we
923
+ }), ke = v`
924
+ from {
925
+ opacity: 0;
926
+ }
927
+ to {
928
+ opacity: 1;
929
+ }
930
+ `, De = g`
931
+ ${ke}
932
+ `, B = m($)`
933
+ pointer-events: auto;
934
+ animation: ${d("transitions.medium")};
935
+ animation-name: ${De};
936
+ `, Me = h(
937
+ ({ size: r = "xs", ...e }, t) => /* @__PURE__ */ u.createElement(B, { ref: t, shape: "circle", size: r, title: "Clear", variant: "ghost", ...e }, /* @__PURE__ */ u.createElement(w, { size: "xxs" }))
938
+ ), Ye = B, ve = m($)`
939
+ & > svg:only-child {
940
+ width: ${d("space.md")};
941
+ height: ${d("space.md")};
942
+ }
943
+ `, je = h((r, e) => /* @__PURE__ */ u.createElement(ve, { ref: e, shape: "circle", size: "sm", title: "Close", variant: "ghost", ...r }, /* @__PURE__ */ u.createElement(w, { size: "lg" })));
417
944
  export {
418
- ee as Test,
419
- re as WuiProvider,
420
- Q as createTheme,
421
- K as darkTheme
945
+ Ze as Accordion,
946
+ Qe as Alert,
947
+ er as AspectRatio,
948
+ or as Avatar,
949
+ nr as Badge,
950
+ C as Box,
951
+ lr as Breadcrumb,
952
+ sr as BreadcrumbComponent,
953
+ $ as Button,
954
+ Ge as ButtonGroup,
955
+ Pe as Card,
956
+ Be as CardComponent,
957
+ Me as ClearButton,
958
+ je as CloseButton,
959
+ br as Flex,
960
+ He as StyledButton,
961
+ Ye as StyledClearButton,
962
+ hr as WuiProvider,
963
+ dr as componentSystem,
964
+ Le as createTheme,
965
+ Oe as darkTheme,
966
+ cr as filterSystemProps,
967
+ h as forwardRef,
968
+ z as shouldForwardProp,
969
+ ur as system,
970
+ Je as useAccordion,
971
+ gr as wrapperSystem
422
972
  };