welcome-ui 1.0.0-beta.2 → 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 (74) 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 → Box.js} +1 -1
  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.mjs → System.mjs} +5 -5
  18. package/dist/X5NMLKT6-BC1Q56kB.mjs +1258 -0
  19. package/dist/X5NMLKT6-vrNG8i_R.js +14 -0
  20. package/dist/index-0MPAX4B5.mjs +320 -0
  21. package/dist/index-BNA_A0oa.js +155 -0
  22. package/dist/index-BXJQXgy9.js +13 -0
  23. package/dist/index-Bwrtxit1.mjs +84 -0
  24. package/dist/index-Ct2FOeyM.js +17 -0
  25. package/dist/index-DRNn5iIc.js +142 -0
  26. package/dist/index-Du8Nrf16.mjs +128 -0
  27. package/dist/index-MifIgNHW.mjs +47 -0
  28. package/dist/index-V28zHt_Z.js +68 -0
  29. package/dist/index-WmqrMIzg.mjs +19070 -0
  30. package/dist/index.js +147 -5
  31. package/dist/index.mjs +770 -219
  32. package/dist/types/components/Accordion/index.d.ts +16 -0
  33. package/dist/types/components/Accordion/styles.d.ts +6 -0
  34. package/dist/types/components/Accordion/theme.d.ts +10 -0
  35. package/dist/types/components/Alert/Title.d.ts +7 -0
  36. package/dist/types/components/Alert/index.d.ts +24 -0
  37. package/dist/types/components/Alert/styles.d.ts +6 -0
  38. package/dist/types/components/Alert/theme.d.ts +15 -0
  39. package/dist/types/components/AspectRatio/index.d.ts +6 -0
  40. package/dist/types/components/AspectRatio/styles.d.ts +2 -0
  41. package/dist/types/components/Avatar/index.d.ts +16 -0
  42. package/dist/types/components/Avatar/styles.d.ts +2 -0
  43. package/dist/types/components/Avatar/theme.d.ts +9 -0
  44. package/dist/types/components/Avatar/utils.d.ts +3 -0
  45. package/dist/types/components/Badge/index.d.ts +11 -0
  46. package/dist/types/components/Badge/styles.d.ts +8 -0
  47. package/dist/types/components/Badge/theme.d.ts +18 -0
  48. package/dist/types/components/Breadcrumb/Item.d.ts +13 -0
  49. package/dist/types/components/Breadcrumb/Item.styles.d.ts +2 -0
  50. package/dist/types/components/Breadcrumb/index.d.ts +18 -0
  51. package/dist/types/components/Breadcrumb/styles.d.ts +6 -0
  52. package/dist/types/components/Breadcrumb/theme.d.ts +12 -0
  53. package/dist/types/components/Button/index.d.ts +21 -0
  54. package/dist/types/components/Button/styles.d.ts +2 -0
  55. package/dist/types/components/Button/theme.d.ts +13 -0
  56. package/dist/types/components/ButtonGroup/index.d.ts +15 -0
  57. package/dist/types/components/ButtonGroup/styles.d.ts +1 -0
  58. package/dist/types/components/Card/Cover.d.ts +10 -0
  59. package/dist/types/components/Card/Cover.styles.d.ts +1 -0
  60. package/dist/types/components/Card/index.d.ts +8 -0
  61. package/dist/types/components/Card/styles.d.ts +2 -0
  62. package/dist/types/components/Card/theme.d.ts +6 -0
  63. package/dist/types/components/ClearButton/index.d.ts +5 -0
  64. package/dist/types/components/ClearButton/styles.d.ts +1 -0
  65. package/dist/types/components/CloseButton/index.d.ts +3 -0
  66. package/dist/types/components/CloseButton/styles.d.ts +1 -0
  67. package/dist/types/components/Flex/index.d.ts +19 -0
  68. package/dist/types/components/index.d.ts +12 -0
  69. package/dist/types/theme/index.d.ts +12 -0
  70. package/package.json +9 -4
  71. package/dist/box.mjs +0 -8
  72. /package/dist/{system.js → System.js} +0 -0
  73. /package/dist/{wui-provider.js → WuiProvider.js} +0 -0
  74. /package/dist/{wui-provider.mjs → WuiProvider.mjs} +0 -0
package/dist/index.mjs CHANGED
@@ -1,17 +1,346 @@
1
1
  "use client";
2
- import { css as m, rpxTransformers as h, defaultTheme as f } from "@xstyled/styled-components";
3
- import { Box as j } from "./box.mjs";
4
- import { componentSystem as te, filterSystemProps as re, forwardRef as ne, shouldForwardProp as oe, system as le, wrapperSystem as ie } from "./system.mjs";
5
- import { WuiProvider as ae } from "./wui-provider.mjs";
6
- function d(e, t) {
7
- if (typeof e != "object" || e === null) return t;
8
- if (typeof t != "object" || t === null) return e;
9
- const o = { ...e };
10
- for (const l in t)
11
- t.hasOwnProperty(l) && (o[l] = d(o[l], t[l]));
12
- return o;
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;
13
27
  }
14
- const x = {
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
+ });
52
+ return {
53
+ default: {
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
+ }
92
+ }
93
+ };
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 = {
15
344
  "beige-10": "#FBF9F7",
16
345
  "beige-20": "#F6F3EF",
17
346
  "beige-30": "#EAE4DE",
@@ -117,221 +446,221 @@ const x = {
117
446
  "yellow-70": "#846A01",
118
447
  "yellow-80": "#604D00",
119
448
  "yellow-90": "#423500"
120
- }, p = (e) => ({
121
- ...e,
122
- "primary-10": e["yellow-10"],
123
- "primary-20": e["yellow-20"],
124
- "primary-30": e["yellow-30"],
125
- "primary-40": e["yellow-40"],
126
- "primary-50": e["yellow-50"],
127
- "primary-60": e["yellow-60"],
128
- "primary-70": e["yellow-70"],
129
- "primary-80": e["yellow-80"],
130
- "primary-90": e["yellow-90"],
131
- "secondary-blue": e["blue-40"],
132
- "secondary-green": e["green-30"],
133
- "secondary-orange": e["red-orange-40"],
134
- "secondary-pink": e["pink-40"],
135
- "secondary-teal": e["teal-40"],
136
- "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"],
137
466
  overlay: "rgba(0, 0, 0, 0.55)"
138
- }), c = p(x), b = Object.keys(c).reduce((e, t) => {
139
- if (t.startsWith("secondary-") || t === "overlay") return e;
140
- 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);
141
470
  return {
142
- ...e,
143
- [t]: c[`${l}${o}`]
471
+ ...r,
472
+ [e]: x[`${n}${t}`]
144
473
  };
145
- }, {}), w = {
146
- ...c,
147
- ...p(b)
148
- }, J = {
149
- colors: w
150
- }, A = (e) => ({
474
+ }, {}), j = {
475
+ ...x,
476
+ ...E(Y)
477
+ }, Oe = {
478
+ colors: j
479
+ }, q = (r) => ({
151
480
  "welcome-font": [
152
481
  {
153
- url: `${e.fontsUrl}/welcome-font-regular`,
482
+ url: `${r.fontsUrl}/welcome-font-regular`,
154
483
  weight: "400"
155
484
  },
156
485
  {
157
- url: `${e.fontsUrl}/welcome-font-medium`,
486
+ url: `${r.fontsUrl}/welcome-font-medium`,
158
487
  weight: "500"
159
488
  },
160
489
  {
161
- url: `${e.fontsUrl}/welcome-font-bold`,
490
+ url: `${r.fontsUrl}/welcome-font-bold`,
162
491
  weight: "600"
163
492
  },
164
493
  {
165
- url: `${e.fontsUrl}/welcome-font-regular-italic`,
494
+ url: `${r.fontsUrl}/welcome-font-regular-italic`,
166
495
  style: "italic",
167
496
  weight: "400"
168
497
  },
169
498
  {
170
- url: `${e.fontsUrl}/welcome-font-medium-italic`,
499
+ url: `${r.fontsUrl}/welcome-font-medium-italic`,
171
500
  style: "italic",
172
501
  weight: "500"
173
502
  },
174
503
  {
175
- url: `${e.fontsUrl}/welcome-font-bold-italic`,
504
+ url: `${r.fontsUrl}/welcome-font-bold-italic`,
176
505
  style: "italic",
177
506
  weight: "600"
178
507
  }
179
508
  ],
180
509
  "welcome-icon-font": [
181
510
  {
182
- url: `${e.fontsUrl}/icon-font/__ICON_FONT_HASH__/welcome-icon-font`,
511
+ url: `${r.fontsUrl}/icon-font/__ICON_FONT_HASH__/welcome-icon-font`,
183
512
  display: "block"
184
513
  }
185
514
  ],
186
515
  "work-sans": [
187
516
  {
188
- url: `${e.fontsUrl}/work-sans-variable`,
517
+ url: `${r.fontsUrl}/work-sans-variable`,
189
518
  isVariable: !0,
190
519
  stretch: "75% 125%",
191
520
  weight: "100 1000"
192
521
  }
193
522
  ]
194
- }), E = (e, t) => {
195
- const { toEm: o, toRem: l } = t, n = l;
523
+ }), V = (r, e) => {
524
+ const { toEm: t, toRem: n } = e, a = n;
196
525
  return {
197
- h0: n(65),
198
- h1: n(45),
199
- h2: n(36),
200
- h3: n(26),
201
- h4: n(20),
202
- h5: n(16),
203
- h6: n(14),
204
- lg: n(18),
205
- md: n(16),
206
- sm: n(14),
207
- "subtitle-md": n(13),
208
- "subtitle-sm": n(11),
209
- 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)
210
539
  };
211
- }, y = ({
212
- defaultLineHeight: e,
213
- toRem: t
540
+ }, Z = ({
541
+ defaultLineHeight: r,
542
+ toRem: e
214
543
  }) => ({
215
- html: e,
216
- h0: t(72),
217
- h1: t(48),
218
- h2: t(40),
219
- h3: t(32),
220
- h4: t(24),
221
- h5: t(18),
222
- h6: t(16),
223
- lg: t(24),
224
- md: t(18),
225
- sm: t(18),
226
- xs: t(14),
227
- "subtitle-md": e,
228
- "subtitle-sm": e
229
- }), D = {
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 = {
230
559
  regular: 400,
231
560
  medium: 500,
232
561
  bold: 600
233
- }, T = ({
234
- defaultLetterSpacing: e,
235
- toRem: t
562
+ }, K = ({
563
+ defaultLetterSpacing: r,
564
+ toRem: e
236
565
  }) => ({
237
- html: e,
238
- h0: t(-1.7),
239
- h1: t(-1.2),
240
- h2: t(-1),
241
- h3: t(-0.9),
242
- h4: t(-0.6),
243
- h5: t(-0.5),
244
- h6: t(-0.5),
245
- lg: e,
246
- md: e,
247
- sm: e,
248
- xs: t(-0.2),
249
- "subtitle-md": t(-0.2),
250
- "subtitle-sm": t(-0.2)
251
- }), B = (e) => {
252
- 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;
253
582
  return {
254
- h0: t.bold,
255
- h1: t.bold,
256
- h2: t.bold,
257
- h3: t.bold,
258
- h4: t.bold,
259
- h5: t.bold,
260
- h6: t.bold,
261
- lg: t.regular,
262
- md: t.regular,
263
- sm: t.regular,
264
- "subtitle-md": t.bold,
265
- "subtitle-sm": t.medium,
266
- 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
267
596
  };
268
- }, v = (e) => {
269
- const { fonts: t } = e;
597
+ }, X = (r) => {
598
+ const { fonts: e } = r;
270
599
  return {
271
- h0: t.headings,
272
- h1: t.headings,
273
- h2: t.headings,
274
- h3: t.headings,
275
- h4: t.headings,
276
- h5: t.headings,
277
- h6: t.headings,
278
- "subtitle-md": t.headings,
279
- "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
280
609
  };
281
- }, C = () => ({
610
+ }, ee = () => ({
282
611
  "subtitle-md": "uppercase",
283
612
  "subtitle-sm": "uppercase"
284
- }), _ = (e) => {
285
- const { colors: t } = e;
613
+ }), re = (r) => {
614
+ const { colors: e } = r;
286
615
  return {
287
- h0: t["neutral-90"],
288
- h1: t["neutral-90"],
289
- h2: t["neutral-90"],
290
- h3: t["neutral-90"],
291
- h4: t["neutral-90"],
292
- h5: t["neutral-90"],
293
- 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"]
294
623
  };
295
- }, $ = (e) => {
624
+ }, oe = (r) => {
296
625
  const {
297
- fontSizes: t,
298
- letterSpacings: o,
299
- lineHeights: l,
300
- textsFontColors: n,
301
- textsFontFamily: F,
302
- textsFontWeights: g,
303
- textsTextTransform: u
304
- } = e;
305
- return Object.keys(t).reduce((s, r) => ({
306
- ...s,
307
- [r]: {
308
- color: n[r],
309
- fontFamily: F[r] || void 0,
310
- fontWeight: g[r],
311
- fontSize: t[r],
312
- lineHeight: l[r] || l.lg,
313
- letterSpacing: o[r] || void 0,
314
- 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
315
644
  }
316
645
  }), {});
317
- }, k = (e, t, o) => ({
318
- texts: [e, "sans-serif"].join(", "),
319
- headings: [t, "sans-serif"].join(", "),
320
- icons: o
321
- }), a = {
646
+ }, te = (r, e, t) => ({
647
+ texts: [r, "sans-serif"].join(", "),
648
+ headings: [e, "sans-serif"].join(", "),
649
+ icons: t
650
+ }), F = {
322
651
  primary: "ease",
323
652
  secondary: "linear",
324
653
  tertiary: "cubic-bezier(0.41, 0.094, 0.54, 0.07)"
325
- }, S = {
326
- slow: `500ms ${a.tertiary}`,
327
- medium: `300ms ${a.primary}`,
328
- fast: `100ms ${a.secondary}`
329
- }, U = ({ colors: e }) => ({
330
- 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`
331
660
  background-image: linear-gradient(
332
661
  0deg,
333
- ${e["primary-40"]},
334
- ${e["primary-40"]} 100%
662
+ ${r["primary-40"]},
663
+ ${r["primary-40"]} 100%
335
664
  );
336
665
  background-repeat: no-repeat;
337
666
  background-size: 100% 50%;
@@ -341,24 +670,24 @@ const x = {
341
670
  background-size 250ms,
342
671
  color 250ms;
343
672
  `,
344
- hover: m`
673
+ hover: g`
345
674
  opacity: 1;
346
675
  background-position-y: 100%;
347
676
  background-size: 100% 100%;
348
677
  `
349
- }), N = (e) => ({
678
+ }), le = (r) => ({
350
679
  none: "0",
351
- sm: e.toRem(2),
352
- md: e.toRem(4),
353
- lg: e.toRem(8),
354
- xl: e.toRem(16),
355
- 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),
356
685
  full: "100%"
357
- }), W = {
686
+ }), se = {
358
687
  sm: "1px",
359
688
  md: "2px",
360
689
  lg: "3px"
361
- }, L = {
690
+ }, ie = {
362
691
  xs: 0,
363
692
  sm: 480,
364
693
  md: 736,
@@ -367,55 +696,277 @@ const x = {
367
696
  xxl: 1440,
368
697
  "3xl": 1620,
369
698
  "4xl": 1920
370
- }, O = {
699
+ }, de = {
371
700
  sm: "1px 2px 4px 0 rgba(0,0,0,0.05)",
372
701
  md: "3px 4px 10px 0 rgba(0,0,0,0.07)"
373
- }, I = (e) => ({
374
- xxs: e.toRem(2),
375
- xs: e.toRem(4),
376
- sm: e.toRem(8),
377
- md: e.toRem(12),
378
- lg: e.toRem(16),
379
- xl: e.toRem(24),
380
- xxl: e.toRem(32),
381
- "3xl": e.toRem(48),
382
- "4xl": e.toRem(64),
383
- "5xl": e.toRem(96),
384
- "6xl": e.toRem(128),
385
- "7xl": e.toRem(192)
386
- }), z = (e) => ({
387
- backgroundColor: e.colors["primary-40"],
388
- color: e.colors["neutral-90"]
389
- }), H = ({ colors: e }) => {
390
- 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"]) {
391
720
  return {
392
- boxShadow: `0 0 0 2px ${o}`
721
+ boxShadow: `0 0 0 2px ${t}`
393
722
  };
394
723
  }
395
- return t;
396
- }, P = "work-sans", R = 16, G = "-0.019rem", M = 1.15, Y = "https://cdn.welcome-ui.com/fonts", V = "welcome-font", Z = "welcome-icon-font", K = (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 = {}) => {
397
726
  const {
398
- defaultFontFamily: t = P,
399
- defaultFontSize: o = R,
400
- defaultLetterSpacing: l = G,
401
- defaultLineHeight: n = M,
402
- fontsUrl: F = Y,
403
- headingFontFamily: g = V,
404
- iconFontFamily: u = Z,
405
- ...s
406
- } = e;
407
- let r = {};
408
- return r.transformers = { ...h }, r.toEm = (i) => `${i / o}em`, r.toRem = (i) => `${i / o}rem`, r.toPx = (i) => `${i * o}px`, r.colors = c, r.fontsUrl = F, r.fontFaces = A(r), r.fontSizes = E("rem", r), r.defaultLineHeight = n, r.defaultLetterSpacing = l, r.lineHeights = y(r), r.fontWeights = D, r.letterSpacings = T(r), r.fonts = k(t, g, u), r.borderWidths = W, r.screens = L, r.space = I(r), r.inset = r.space, r.radii = N(r), r.transitions = S, r.timingFunction = a, r.shadows = O, r = d(r, s), r.selection = z(r), r.underline = U(r), r.focus = H(r), r.textsFontWeights = B(r), r.textsFontFamily = v(r), r.textsFontColors = _(r), r.textsTextTransform = C(), r.texts = $(r), r.states = f.states, r = d(r, s), r;
409
- };
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" })));
410
944
  export {
411
- j as Box,
412
- ae as WuiProvider,
413
- te as componentSystem,
414
- K as createTheme,
415
- J as darkTheme,
416
- re as filterSystemProps,
417
- ne as forwardRef,
418
- oe as shouldForwardProp,
419
- le as system,
420
- ie as wrapperSystem
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
421
972
  };