welcome-ui 8.2.1 → 8.3.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/dist/Alert.mjs CHANGED
@@ -18,23 +18,23 @@ const x = c.divBox`
18
18
  `, A = c(q)`
19
19
  position: absolute;
20
20
  align-self: flex-start;
21
- `, F = c.divBox(({ icon: n, isFullWidth: o, size: e, variant: l }) => f`
21
+ `, F = c.divBox(({ icon: o, isFullWidth: e, size: n, variant: i }) => f`
22
22
  position: relative;
23
23
  display: flex;
24
24
  align-items: flex-start;
25
25
  width: 100%;
26
- max-width: ${o ? "100%" : "max-content"};
26
+ max-width: ${e ? "100%" : "max-content"};
27
27
  ${r("alerts.default")};
28
- ${r(`alerts.${l}`)};
29
- ${r(`alerts.sizes.${e}`)};
28
+ ${r(`alerts.${i}`)};
29
+ ${r(`alerts.sizes.${n}`)};
30
30
 
31
- ${n !== null && e === "sm" && f`
31
+ ${o !== null && n === "sm" && f`
32
32
  ${x} {
33
33
  margin-left: calc(${r("icons.sm")} + ${r("space.md")});
34
34
  }
35
35
  `}
36
36
 
37
- ${n !== null && e === "md" && f`
37
+ ${o !== null && n === "md" && f`
38
38
  ${x} {
39
39
  margin-left: calc(${r("icons.md")} + ${r("space.lg")});
40
40
  gap: ${r("space.lg")};
@@ -45,36 +45,42 @@ const x = c.divBox`
45
45
  margin-top: -3;
46
46
  }
47
47
  `}
48
- `), G = c(O)(({ variant: n }) => f`
48
+ `), G = c(O)(({ hasCloseButton: o, variant: e }) => f`
49
49
  font-weight: medium;
50
50
  ${r("alerts.title.default")};
51
- ${r(`alerts.title.sizes.${n}`)};
51
+ ${r(`alerts.title.sizes.${e}`)};
52
+ margin-right: ${o ? "xl" : void 0};
52
53
  ${D};
53
- `), b = ({ children: n, dataTestId: o, variant: e }) => /* @__PURE__ */ s.jsx(G, { "data-testid": o, variant: e, children: n }), H = d(
54
+ `), b = ({
55
+ children: o,
56
+ dataTestId: e,
57
+ hasCloseButton: n,
58
+ variant: i
59
+ }) => /* @__PURE__ */ s.jsx(G, { "data-testid": e, hasCloseButton: n, variant: i, children: o }), H = d(
54
60
  ({
55
- children: n,
56
- cta: o,
57
- dataTestId: e,
58
- handleClose: l,
61
+ children: o,
62
+ cta: e,
63
+ dataTestId: n,
64
+ handleClose: i,
59
65
  icon: p,
60
- isFullWidth: h,
61
- size: i = "sm",
66
+ isFullWidth: S,
67
+ size: l = "sm",
62
68
  variant: a = "default",
63
69
  ...C
64
70
  }, I) => {
65
- const k = e ? `${e}-close-button` : void 0, E = a === "beige" ? "default" : a, u = a === "ai", T = j.toArray(n).map((t) => t.type === b ? m(t, { variant: i }) : t), $ = (t) => {
71
+ const k = n ? `${n}-close-button` : void 0, E = a === "beige" ? "default" : a, u = a === "ai", T = j.toArray(o).map((t) => t.type === b ? m(t, { hasCloseButton: !!i, variant: l }) : t), $ = (t) => {
66
72
  var y;
67
73
  if (t) {
68
74
  if (t.type === v)
69
75
  return m(t, {
70
76
  ai: u,
71
- size: i,
77
+ size: l,
72
78
  variant: u ? "primary" : void 0
73
79
  });
74
- if (t.type === S)
80
+ if (t.type === h)
75
81
  return m(t, {
76
82
  ai: u,
77
- size: i
83
+ size: l
78
84
  });
79
85
  if ((y = t.props) != null && y.children)
80
86
  return m(t, {
@@ -86,30 +92,30 @@ const x = c.divBox`
86
92
  });
87
93
  }
88
94
  return t;
89
- }, g = R.isValidElement(o) ? $(o) : o;
95
+ }, g = R.isValidElement(e) ? $(e) : e;
90
96
  return /* @__PURE__ */ s.jsxs(
91
97
  F,
92
98
  {
93
- "data-testid": e,
99
+ "data-testid": n,
94
100
  icon: p,
95
- isFullWidth: h,
101
+ isFullWidth: S,
96
102
  ref: I,
97
- size: i,
103
+ size: l,
98
104
  variant: a,
99
105
  ...C,
100
106
  children: [
101
- !!l && /* @__PURE__ */ s.jsx(
107
+ !!i && /* @__PURE__ */ s.jsx(
102
108
  _,
103
109
  {
104
110
  dataTestId: k,
105
- onClick: l,
111
+ onClick: i,
106
112
  position: "absolute",
107
113
  right: "sm",
108
114
  size: "xs",
109
115
  top: "sm"
110
116
  }
111
117
  ),
112
- p !== null && /* @__PURE__ */ s.jsx(A, { icon: p, size: i, variant: E }),
118
+ p !== null && /* @__PURE__ */ s.jsx(A, { icon: p, size: l, variant: E }),
113
119
  /* @__PURE__ */ s.jsxs(x, { children: [
114
120
  /* @__PURE__ */ s.jsx(B, { flex: 1, children: T }),
115
121
  !!g && /* @__PURE__ */ s.jsx(B, { alignItems: "center", display: "flex", gap: "sm", children: g })
@@ -119,12 +125,12 @@ const x = c.divBox`
119
125
  );
120
126
  }
121
127
  ), v = d(
122
- ({ variant: n = "secondary", ...o }, e) => /* @__PURE__ */ s.jsx(w, { flexShrink: 0, ref: e, w: "fit-content", ...o, variant: n })
123
- ), S = d(
124
- ({ variant: n = "tertiary", ...o }, e) => /* @__PURE__ */ s.jsx(w, { flexShrink: 0, ref: e, w: "fit-content", ...o, variant: n })
128
+ ({ variant: o = "secondary", ...e }, n) => /* @__PURE__ */ s.jsx(w, { flexShrink: 0, ref: n, w: "fit-content", ...e, variant: o })
129
+ ), h = d(
130
+ ({ variant: o = "tertiary", ...e }, n) => /* @__PURE__ */ s.jsx(w, { flexShrink: 0, ref: n, w: "fit-content", ...e, variant: o })
125
131
  ), X = Object.assign(H, {
126
132
  Button: v,
127
- SecondaryButton: S,
133
+ SecondaryButton: h,
128
134
  Title: b
129
135
  });
130
136
  export {
package/dist/Card.mjs CHANGED
@@ -6,7 +6,7 @@ import { Shape as i } from "./Shape.mjs";
6
6
  const c = e(i)`
7
7
  ${t("cards.cover")};
8
8
  `, a = ({ src: o, ...r }) => /* @__PURE__ */ d.jsx(c, { ...r, children: /* @__PURE__ */ d.jsx("img", { src: o }) }), m = e.divBox`
9
- overflow: 'hidden';
9
+ overflow: hidden;
10
10
  border-radius: md;
11
11
  ${t("cards.default")};
12
12
  background-size: cover;
package/dist/Toggle.mjs CHANGED
@@ -2,8 +2,8 @@
2
2
  import { j as s } from "./jsx-runtime-B7I4PJ0H.mjs";
3
3
  import { C as f, a as $ } from "./index-62h-enZF.mjs";
4
4
  import { shouldForwardProp as g, forwardRef as c } from "./System.mjs";
5
- import r, { th as t, system as u, css as i } from "@xstyled/styled-components";
6
- const h = r(f).withConfig({ shouldForwardProp: g })(
5
+ import r, { th as t, system as h, css as i } from "@xstyled/styled-components";
6
+ const u = r(f).withConfig({ shouldForwardProp: g })(
7
7
  ({ order: e = "-1", size: o }) => i`
8
8
  ${t("toggles.item.default")};
9
9
  ${t(`toggles.item.sizes.${o}`)};
@@ -52,12 +52,13 @@ const h = r(f).withConfig({ shouldForwardProp: g })(
52
52
  }
53
53
  }
54
54
 
55
- ${u};
55
+ ${h};
56
56
  `
57
57
  ), x = r.divBox`
58
58
  position: relative;
59
59
  display: inline-block;
60
60
  cursor: pointer;
61
+ flex-shrink: 0;
61
62
  `, b = r.divBox.withConfig({ shouldForwardProp: g })(
62
63
  ({ checked: e, size: o }) => i`
63
64
  position: absolute;
@@ -86,7 +87,7 @@ const h = r(f).withConfig({ shouldForwardProp: g })(
86
87
  const m = o && a;
87
88
  return /* @__PURE__ */ s.jsxs(x, { onClick: l, children: [
88
89
  m ? /* @__PURE__ */ s.jsx(b, { checked: e, onClick: l, size: n, children: e ? o : a }) : null,
89
- /* @__PURE__ */ s.jsx($, { ...d, checked: e, Component: h, ref: p, size: n })
90
+ /* @__PURE__ */ s.jsx($, { ...d, checked: e, Component: u, ref: p, size: n })
90
91
  ] });
91
92
  }
92
93
  );
package/dist/theme.mjs CHANGED
@@ -1427,9 +1427,9 @@ const I = /* @__PURE__ */ N(Z), Q = (o) => {
1427
1427
  }
1428
1428
  };
1429
1429
  }, Ur = {
1430
- lg: "3px",
1430
+ sm: "1px",
1431
1431
  md: "2px",
1432
- sm: "1px"
1432
+ lg: "3px"
1433
1433
  }, Pr = {
1434
1434
  "beige-10": "#FBF9F7",
1435
1435
  "beige-20": "#F6F3EF",
@@ -1763,41 +1763,41 @@ const I = /* @__PURE__ */ N(Z), Q = (o) => {
1763
1763
  }
1764
1764
  ]
1765
1765
  }), Jr = (o) => ({
1766
- full: "100%",
1767
- lg: o.toRem(8),
1768
- md: o.toRem(4),
1769
1766
  none: "0",
1770
1767
  sm: o.toRem(2),
1768
+ md: o.toRem(4),
1769
+ lg: o.toRem(8),
1771
1770
  xl: o.toRem(16),
1772
- xxl: o.toRem(24)
1771
+ xxl: o.toRem(24),
1772
+ full: "100%"
1773
1773
  }), Xr = {
1774
- "3xl": 1620,
1775
- "4xl": 1920,
1776
- lg: 980,
1777
- md: 736,
1774
+ xs: 0,
1778
1775
  sm: 480,
1776
+ md: 736,
1777
+ lg: 980,
1779
1778
  xl: 1280,
1780
- xs: 0,
1781
- xxl: 1440
1779
+ xxl: 1440,
1780
+ "3xl": 1620,
1781
+ "4xl": 1920
1782
1782
  }, Zr = (o) => ({
1783
1783
  backgroundColor: o.colors["primary-40"],
1784
1784
  color: o.colors["neutral-90"]
1785
1785
  }), Qr = {
1786
- md: "3px 4px 10px 0 rgba(0,0,0,0.07)",
1787
- sm: "1px 2px 4px 0 rgba(0,0,0,0.05)"
1786
+ sm: "1px 2px 4px 0 rgba(0,0,0,0.05)",
1787
+ md: "3px 4px 10px 0 rgba(0,0,0,0.07)"
1788
1788
  }, Vr = (o) => ({
1789
+ xxs: o.toRem(2),
1790
+ xs: o.toRem(4),
1791
+ sm: o.toRem(8),
1792
+ md: o.toRem(12),
1793
+ lg: o.toRem(16),
1794
+ xl: o.toRem(24),
1795
+ xxl: o.toRem(32),
1789
1796
  "3xl": o.toRem(48),
1790
1797
  "4xl": o.toRem(64),
1791
1798
  "5xl": o.toRem(96),
1792
1799
  "6xl": o.toRem(128),
1793
- "7xl": o.toRem(192),
1794
- lg: o.toRem(16),
1795
- md: o.toRem(12),
1796
- sm: o.toRem(8),
1797
- xl: o.toRem(24),
1798
- xs: o.toRem(4),
1799
- xxl: o.toRem(32),
1800
- xxs: o.toRem(2)
1800
+ "7xl": o.toRem(192)
1801
1801
  }), h = {
1802
1802
  primary: "ease",
1803
1803
  secondary: "linear",
@@ -1,6 +1,8 @@
1
1
  import { default as React } from 'react';
2
2
  import { TextProps } from '../Text';
3
- export type AlertTitleProps = Pick<TextProps, 'children' | 'dataTestId' | 'variant'>;
3
+ export type AlertTitleProps = Pick<TextProps, 'children' | 'dataTestId' | 'variant'> & {
4
+ hasCloseButton?: boolean;
5
+ };
4
6
  /**
5
7
  * @name Alert.Title
6
8
  */
@@ -1,6 +1,6 @@
1
1
  export type ThemeBorderWidths = {
2
- lg: string;
3
- md: string;
4
2
  sm: string;
3
+ md: string;
4
+ lg: string;
5
5
  };
6
6
  export declare const borderWidths: ThemeBorderWidths;
@@ -333,14 +333,7 @@ export declare const colors: {
333
333
  'yellow-80': string;
334
334
  'yellow-90': string;
335
335
  };
336
- declare const enum SecondaryColors {
337
- 'blue' = 0,
338
- 'green' = 1,
339
- 'orange' = 2,
340
- 'pink' = 3,
341
- 'teal' = 4,
342
- 'violet' = 5
343
- }
344
336
  export type ThemeColors = typeof colors;
345
- export type ThemeSecondaryColors = keyof typeof SecondaryColors;
337
+ export type ThemeSecondaryColors = SecondaryColors;
338
+ type SecondaryColors = 'blue' | 'green' | 'orange' | 'pink' | 'teal' | 'violet';
346
339
  export {};
@@ -1,12 +1,12 @@
1
1
  import { ThemeValues } from '.';
2
2
  export type ThemeRadii = {
3
- [key: number]: string;
4
- full: string;
5
- lg: string;
6
- md: string;
7
3
  none: string;
8
4
  sm: string;
5
+ md: string;
6
+ lg: string;
9
7
  xl: string;
10
8
  xxl: string;
9
+ full: string;
10
+ [key: number]: string;
11
11
  };
12
12
  export declare const getRadii: (theme: ThemeValues) => ThemeRadii;
@@ -1,5 +1,5 @@
1
1
  export type ThemeShadows = {
2
- md: string;
3
2
  sm: string;
3
+ md: string;
4
4
  };
5
5
  export declare const shadows: ThemeShadows;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "welcome-ui",
3
- "version": "8.2.1",
3
+ "version": "8.3.0",
4
4
  "description": "Customizable design system with react • styled-components • styled-system and ariakit.",
5
5
  "files": [
6
6
  "dist"
@@ -84,10 +84,10 @@
84
84
  "release-it": "^18.1.2",
85
85
  "rollup": "^4.39.0",
86
86
  "rollup-preserve-directives": "^1.1.3",
87
- "vite": "^6.2.1",
87
+ "vite": "^6.3.5",
88
88
  "vite-plugin-dts": "^4.5.3",
89
89
  "vite-plugin-static-copy": "^2.3.0",
90
- "vitest": "^3.0.8"
90
+ "vitest": "^3.1.4"
91
91
  },
92
92
  "peerDependencies": {
93
93
  "@xstyled/styled-components": "^4.0.0",