welcome-ui 7.1.0 → 7.2.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/README.md +2 -8
- package/dist/Accordion.mjs +8 -8
- package/dist/Alert.mjs +79 -72
- package/dist/Button.mjs +59 -45
- package/dist/Icons.mjs +621 -625
- package/dist/VariantIcon.mjs +22 -21
- package/dist/index-BrfXjmHY.mjs +36 -0
- package/dist/theme.mjs +411 -350
- package/dist/types/components/Alert/index.d.ts +3 -5
- package/dist/types/components/Alert/theme.d.ts +5 -5
- package/dist/types/components/Button/index.d.ts +8 -6
- package/dist/types/components/Button/theme.d.ts +3 -3
- package/dist/types/components/Tag/index.d.ts +1 -4
- package/dist/types/components/Tag/theme.d.ts +1 -1
- package/dist/types/components/Toast/styles.d.ts +4 -4
- package/dist/types/components/VariantIcon/index.d.ts +1 -3
- package/dist/types/components/VariantIcon/theme.d.ts +3 -7
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/utils.mjs +16 -14
- package/package.json +1 -1
- package/dist/index-RUkz9Z2V.mjs +0 -31
package/README.md
CHANGED
|
@@ -72,19 +72,13 @@ export default function Root() {
|
|
|
72
72
|
yarn
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
-
2. Start
|
|
75
|
+
2. Start documentation website
|
|
76
76
|
|
|
77
77
|
```bash
|
|
78
78
|
yarn start
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
-
3.
|
|
82
|
-
|
|
83
|
-
```bash
|
|
84
|
-
yarn website
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
4. and go to http://localhost:3020
|
|
81
|
+
3. and go to http://localhost:3020
|
|
88
82
|
|
|
89
83
|
## How to release
|
|
90
84
|
|
package/dist/Accordion.mjs
CHANGED
|
@@ -19,16 +19,16 @@ const w = r.div`
|
|
|
19
19
|
${o("accordions.icon")};
|
|
20
20
|
transform: rotate3d(0);
|
|
21
21
|
transition: medium;
|
|
22
|
-
width:
|
|
23
|
-
height:
|
|
22
|
+
width: 32;
|
|
23
|
+
height: 32;
|
|
24
24
|
color: inherit;
|
|
25
25
|
display: flex;
|
|
26
|
-
border-radius:
|
|
26
|
+
border-radius: 16;
|
|
27
27
|
|
|
28
28
|
& *:first-child {
|
|
29
29
|
margin: auto;
|
|
30
30
|
}
|
|
31
|
-
`,
|
|
31
|
+
`, E = r(p)`
|
|
32
32
|
${o("accordions.title")};
|
|
33
33
|
width: 100%;
|
|
34
34
|
padding: ${o("accordions.padding")};
|
|
@@ -37,7 +37,7 @@ const w = r.div`
|
|
|
37
37
|
display: flex;
|
|
38
38
|
justify-content: space-between;
|
|
39
39
|
align-items: center;
|
|
40
|
-
gap:
|
|
40
|
+
gap: lg;
|
|
41
41
|
|
|
42
42
|
&[aria-expanded='true'] {
|
|
43
43
|
${n} {
|
|
@@ -59,7 +59,7 @@ const w = r.div`
|
|
|
59
59
|
color: inherit;
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
`,
|
|
62
|
+
`, v = r(f)`
|
|
63
63
|
display: grid;
|
|
64
64
|
grid-template-rows: 0fr;
|
|
65
65
|
transition-property: grid-template-rows;
|
|
@@ -75,13 +75,13 @@ const w = r.div`
|
|
|
75
75
|
&[data-enter] {
|
|
76
76
|
grid-template-rows: 1fr;
|
|
77
77
|
}
|
|
78
|
-
`,
|
|
78
|
+
`, y = r.div`
|
|
79
79
|
${o("accordions.content")};
|
|
80
80
|
padding: ${o("accordions.padding")};
|
|
81
81
|
padding-top: 0;
|
|
82
82
|
color: neutral-70;
|
|
83
83
|
`, A = $(
|
|
84
|
-
({ children: i, dataTestId: e, icon: c = /* @__PURE__ */ t.createElement(h, null), store: a, title: d, ...s }, l) => /* @__PURE__ */ t.createElement(w, { "data-testid": e, ref: l, ...s }, /* @__PURE__ */ t.createElement(
|
|
84
|
+
({ children: i, dataTestId: e, icon: c = /* @__PURE__ */ t.createElement(h, null), store: a, title: d, ...s }, l) => /* @__PURE__ */ t.createElement(w, { "data-testid": e, ref: l, ...s }, /* @__PURE__ */ t.createElement(E, { "data-testid": e ? `${e}-title` : void 0, store: a }, d, /* @__PURE__ */ t.createElement(n, null, m(c, { size: "sm" }))), /* @__PURE__ */ t.createElement(v, { "data-testid": e ? `${e}-content` : void 0, store: a }, /* @__PURE__ */ t.createElement("div", null, /* @__PURE__ */ t.createElement(y, null, i))))
|
|
85
85
|
);
|
|
86
86
|
function j(i) {
|
|
87
87
|
return g({ animated: !0, ...i });
|
package/dist/Alert.mjs
CHANGED
|
@@ -1,91 +1,107 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import a, { Children as B, cloneElement as m } from "react";
|
|
3
|
+
import f, { css as c, th as o, system as w } from "@xstyled/styled-components";
|
|
4
4
|
import { Text as D } from "./Text.mjs";
|
|
5
|
-
import { VariantIcon as
|
|
6
|
-
import { CloseButton as
|
|
7
|
-
import { Button as
|
|
8
|
-
import { forwardRef as
|
|
9
|
-
import { Box as
|
|
10
|
-
const
|
|
5
|
+
import { VariantIcon as O } from "./VariantIcon.mjs";
|
|
6
|
+
import { CloseButton as h } from "./CloseButton.mjs";
|
|
7
|
+
import { Button as A } from "./Button.mjs";
|
|
8
|
+
import { forwardRef as $ } from "./System.mjs";
|
|
9
|
+
import { Box as E } from "./Box.mjs";
|
|
10
|
+
const d = f.divBox`
|
|
11
|
+
display: flex;
|
|
12
|
+
gap: md;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
justify-content: space-between;
|
|
15
|
+
align-items: flex-start;
|
|
11
16
|
flex: 1;
|
|
12
|
-
`,
|
|
17
|
+
`, b = f(O)`
|
|
13
18
|
position: absolute;
|
|
14
19
|
align-self: flex-start;
|
|
15
|
-
`, q =
|
|
20
|
+
`, q = f.divBox(({ icon: n, isFullWidth: r, size: e, variant: s }) => c`
|
|
16
21
|
position: relative;
|
|
17
22
|
display: flex;
|
|
18
23
|
align-items: flex-start;
|
|
19
24
|
width: 100%;
|
|
20
|
-
max-width: ${
|
|
21
|
-
${
|
|
22
|
-
${
|
|
23
|
-
${
|
|
24
|
-
${
|
|
25
|
+
max-width: ${r ? "100%" : "max-content"};
|
|
26
|
+
${o("alerts.default")};
|
|
27
|
+
${o(`alerts.${s}`)};
|
|
28
|
+
${o(`alerts.sizes.${e}`)};
|
|
29
|
+
${w};
|
|
25
30
|
|
|
26
|
-
${
|
|
27
|
-
${
|
|
28
|
-
margin-left: calc(${
|
|
31
|
+
${n !== null && e === "sm" && c`
|
|
32
|
+
${d} {
|
|
33
|
+
margin-left: calc(${o("icons.sm")} + ${o("space.md")});
|
|
29
34
|
}
|
|
30
35
|
`}
|
|
31
36
|
|
|
32
|
-
${
|
|
33
|
-
${
|
|
34
|
-
margin-left: calc(${
|
|
37
|
+
${n !== null && e === "md" && c`
|
|
38
|
+
${d} {
|
|
39
|
+
margin-left: calc(${o("icons.md")} + ${o("space.lg")});
|
|
40
|
+
gap: ${o("space.lg")};
|
|
41
|
+
font-size: ${o("fontSizes.md")};
|
|
35
42
|
}
|
|
36
43
|
|
|
37
|
-
${
|
|
44
|
+
${b} {
|
|
38
45
|
margin-top: -3;
|
|
39
46
|
}
|
|
40
47
|
`}
|
|
41
|
-
`), F =
|
|
48
|
+
`), F = f(D)(({ variant: n }) => c`
|
|
42
49
|
font-weight: medium;
|
|
43
|
-
${
|
|
44
|
-
${
|
|
45
|
-
${
|
|
46
|
-
`),
|
|
50
|
+
${o("alerts.title.default")};
|
|
51
|
+
${o(`alerts.title.sizes.${n}`)};
|
|
52
|
+
${w};
|
|
53
|
+
`), S = ({ children: n, dataTestId: r, variant: e }) => /* @__PURE__ */ a.createElement(F, { "data-testid": r, variant: e }, n), G = $(
|
|
47
54
|
({
|
|
48
|
-
children:
|
|
49
|
-
cta:
|
|
50
|
-
dataTestId:
|
|
55
|
+
children: n,
|
|
56
|
+
cta: r,
|
|
57
|
+
dataTestId: e,
|
|
51
58
|
handleClose: s,
|
|
52
|
-
icon:
|
|
53
|
-
isFullWidth:
|
|
54
|
-
size:
|
|
55
|
-
variant:
|
|
56
|
-
...
|
|
57
|
-
},
|
|
58
|
-
const
|
|
59
|
+
icon: u,
|
|
60
|
+
isFullWidth: _,
|
|
61
|
+
size: l = "sm",
|
|
62
|
+
variant: i = "default",
|
|
63
|
+
...k
|
|
64
|
+
}, v) => {
|
|
65
|
+
const T = e ? `${e}-close-button` : void 0, V = i === "beige" ? "default" : i, p = i === "ai", j = B.toArray(n).map((t) => t.type === S ? m(t, { variant: l }) : t), x = (t) => {
|
|
59
66
|
var y;
|
|
60
67
|
if (t) {
|
|
61
|
-
if (t.type ===
|
|
62
|
-
|
|
68
|
+
if (t.type === C)
|
|
69
|
+
return m(t, {
|
|
70
|
+
size: l,
|
|
71
|
+
ai: p,
|
|
72
|
+
variant: p ? "primary" : void 0
|
|
73
|
+
});
|
|
74
|
+
if (t.type === I)
|
|
75
|
+
return m(t, {
|
|
76
|
+
size: l,
|
|
77
|
+
ai: p
|
|
78
|
+
});
|
|
63
79
|
if ((y = t.props) != null && y.children)
|
|
64
|
-
return
|
|
80
|
+
return m(t, {
|
|
65
81
|
...t.props,
|
|
66
|
-
children:
|
|
82
|
+
children: B.map(
|
|
67
83
|
t.props.children,
|
|
68
|
-
(
|
|
84
|
+
(R) => x(R)
|
|
69
85
|
)
|
|
70
86
|
});
|
|
71
87
|
}
|
|
72
88
|
return t;
|
|
73
|
-
}, g =
|
|
74
|
-
return /* @__PURE__ */
|
|
89
|
+
}, g = a.isValidElement(r) ? x(r) : r;
|
|
90
|
+
return /* @__PURE__ */ a.createElement(
|
|
75
91
|
q,
|
|
76
92
|
{
|
|
77
|
-
"data-testid":
|
|
78
|
-
icon:
|
|
79
|
-
isFullWidth:
|
|
80
|
-
ref:
|
|
81
|
-
size:
|
|
82
|
-
variant:
|
|
83
|
-
...
|
|
93
|
+
"data-testid": e,
|
|
94
|
+
icon: u,
|
|
95
|
+
isFullWidth: _,
|
|
96
|
+
ref: v,
|
|
97
|
+
size: l,
|
|
98
|
+
variant: i,
|
|
99
|
+
...k
|
|
84
100
|
},
|
|
85
|
-
!!s && /* @__PURE__ */
|
|
86
|
-
|
|
101
|
+
!!s && /* @__PURE__ */ a.createElement(
|
|
102
|
+
h,
|
|
87
103
|
{
|
|
88
|
-
dataTestId:
|
|
104
|
+
dataTestId: T,
|
|
89
105
|
onClick: s,
|
|
90
106
|
position: "absolute",
|
|
91
107
|
right: "sm",
|
|
@@ -93,27 +109,18 @@ const $ = c.divBox`
|
|
|
93
109
|
top: "sm"
|
|
94
110
|
}
|
|
95
111
|
),
|
|
96
|
-
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
p,
|
|
99
|
-
{
|
|
100
|
-
alignItems: "flex-start",
|
|
101
|
-
display: "flex",
|
|
102
|
-
flexDirection: "column",
|
|
103
|
-
gap: "md",
|
|
104
|
-
justifyContent: "space-between"
|
|
105
|
-
},
|
|
106
|
-
/* @__PURE__ */ r.createElement(p, { flex: 1 }, V),
|
|
107
|
-
!!g && /* @__PURE__ */ r.createElement(p, { alignItems: "center", display: "flex", gap: "sm" }, g)
|
|
108
|
-
))
|
|
112
|
+
u !== null && /* @__PURE__ */ a.createElement(b, { icon: u, size: l, variant: V }),
|
|
113
|
+
/* @__PURE__ */ a.createElement(d, null, /* @__PURE__ */ a.createElement(E, { flex: 1 }, j), !!g && /* @__PURE__ */ a.createElement(E, { alignItems: "center", display: "flex", gap: "sm" }, g))
|
|
109
114
|
);
|
|
110
115
|
}
|
|
111
|
-
),
|
|
112
|
-
(
|
|
116
|
+
), C = $(
|
|
117
|
+
({ variant: n = "secondary", ...r }, e) => /* @__PURE__ */ a.createElement(A, { flexShrink: 0, ref: e, w: "fit-content", ...r, variant: n })
|
|
118
|
+
), I = $(
|
|
119
|
+
({ variant: n = "tertiary", ...r }, e) => /* @__PURE__ */ a.createElement(A, { flexShrink: 0, ref: e, w: "fit-content", ...r, variant: n })
|
|
113
120
|
), U = Object.assign(G, {
|
|
114
|
-
Title:
|
|
115
|
-
Button:
|
|
116
|
-
SecondaryButton:
|
|
121
|
+
Title: S,
|
|
122
|
+
Button: C,
|
|
123
|
+
SecondaryButton: I
|
|
117
124
|
});
|
|
118
125
|
export {
|
|
119
126
|
U as Alert
|
package/dist/Button.mjs
CHANGED
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import r from "react";
|
|
3
|
-
import h, { css as
|
|
4
|
-
import { B as
|
|
5
|
-
import { h as
|
|
6
|
-
import { shouldForwardProp as
|
|
7
|
-
import { Loader as
|
|
8
|
-
import { Box as
|
|
9
|
-
const
|
|
10
|
-
width: ${t(`buttons.sizes.${
|
|
3
|
+
import h, { css as e, th as t, system as p } from "@xstyled/styled-components";
|
|
4
|
+
import { B as y } from "./X5NMLKT6-uFSu0Lii.mjs";
|
|
5
|
+
import { h as w } from "./hide-focus-rings-root-BNyva1yb.mjs";
|
|
6
|
+
import { shouldForwardProp as g, forwardRef as x } from "./System.mjs";
|
|
7
|
+
import { Loader as B } from "./Loader.mjs";
|
|
8
|
+
import { Box as c } from "./Box.mjs";
|
|
9
|
+
const E = (i, s = "square") => e`
|
|
10
|
+
width: ${t(`buttons.sizes.${i}.height`)};
|
|
11
11
|
padding: 0;
|
|
12
|
-
${s === "circle" &&
|
|
13
|
-
border-radius: ${t(`buttons.sizes.${
|
|
12
|
+
${s === "circle" && e`
|
|
13
|
+
border-radius: ${t(`buttons.sizes.${i}.height`)};
|
|
14
14
|
`};
|
|
15
|
-
`,
|
|
16
|
-
({ danger:
|
|
15
|
+
`, d = h(y).withConfig({ shouldForwardProp: g })(
|
|
16
|
+
({ ai: i, danger: s, disabled: u, shape: $, size: n = "md", variant: o = "primary" }) => e`
|
|
17
17
|
${t(`buttons.${o}`)};
|
|
18
|
-
${
|
|
18
|
+
${i && e`
|
|
19
|
+
${t(`buttons.ai.${o}`)};
|
|
20
|
+
`}
|
|
21
|
+
${s && e`
|
|
19
22
|
${t(`buttons.danger.${o}`)};
|
|
20
23
|
`}
|
|
21
24
|
position: relative;
|
|
@@ -34,8 +37,8 @@ const B = (e, s = "square") => i`
|
|
|
34
37
|
appearance: none;
|
|
35
38
|
overflow: hidden;
|
|
36
39
|
transition: medium;
|
|
37
|
-
${
|
|
38
|
-
${
|
|
40
|
+
${$ && E(n, $)};
|
|
41
|
+
${p};
|
|
39
42
|
|
|
40
43
|
& > svg.wui-icon,
|
|
41
44
|
& > i.wui-icon-font {
|
|
@@ -57,25 +60,34 @@ const B = (e, s = "square") => i`
|
|
|
57
60
|
margin-right: sm;
|
|
58
61
|
}
|
|
59
62
|
|
|
60
|
-
${!
|
|
61
|
-
[${
|
|
63
|
+
${!u && e`
|
|
64
|
+
[${w}] &:focus {
|
|
62
65
|
box-shadow: none;
|
|
63
66
|
}
|
|
64
67
|
&:focus {
|
|
65
68
|
${t(`buttons.focus.${o}`)};
|
|
66
|
-
${
|
|
69
|
+
${i && e`
|
|
70
|
+
${t(`buttons.focus.ai.${o}`)};
|
|
71
|
+
`}
|
|
72
|
+
${s && e`
|
|
67
73
|
${t(`buttons.focus.danger.${o}`)};
|
|
68
74
|
`}
|
|
69
75
|
}
|
|
70
76
|
&:hover {
|
|
71
77
|
${t(`buttons.hover.${o}`)};
|
|
72
|
-
${
|
|
78
|
+
${i && e`
|
|
79
|
+
${t(`buttons.hover.ai.${o}`)};
|
|
80
|
+
`}
|
|
81
|
+
${s && e`
|
|
73
82
|
${t(`buttons.hover.danger.${o}`)};
|
|
74
83
|
`}
|
|
75
84
|
}
|
|
76
85
|
&:active {
|
|
77
86
|
${t(`buttons.active.${o}`)};
|
|
78
|
-
${
|
|
87
|
+
${i && e`
|
|
88
|
+
${t(`buttons.active.ai.${o}`)};
|
|
89
|
+
`}
|
|
90
|
+
${s && e`
|
|
79
91
|
${t(`buttons.active.danger.${o}`)};
|
|
80
92
|
`}
|
|
81
93
|
}
|
|
@@ -85,32 +97,34 @@ const B = (e, s = "square") => i`
|
|
|
85
97
|
cursor: not-allowed;
|
|
86
98
|
}
|
|
87
99
|
`
|
|
88
|
-
),
|
|
100
|
+
), _ = x(
|
|
89
101
|
({
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
102
|
+
ai: i,
|
|
103
|
+
children: s,
|
|
104
|
+
danger: u,
|
|
105
|
+
dataTestId: $,
|
|
93
106
|
disabled: n,
|
|
94
107
|
isLoading: o,
|
|
95
|
-
size:
|
|
96
|
-
variant:
|
|
97
|
-
...
|
|
98
|
-
},
|
|
99
|
-
const
|
|
108
|
+
size: a = "md",
|
|
109
|
+
variant: m = "primary",
|
|
110
|
+
...f
|
|
111
|
+
}, b) => {
|
|
112
|
+
const l = n || o;
|
|
100
113
|
return /* @__PURE__ */ r.createElement(
|
|
101
|
-
|
|
114
|
+
d,
|
|
102
115
|
{
|
|
103
|
-
|
|
116
|
+
ai: i,
|
|
117
|
+
danger: u,
|
|
104
118
|
"data-loading": o,
|
|
105
|
-
"data-testid":
|
|
106
|
-
disabled:
|
|
107
|
-
ref:
|
|
108
|
-
size:
|
|
109
|
-
variant:
|
|
110
|
-
...
|
|
119
|
+
"data-testid": $,
|
|
120
|
+
disabled: l,
|
|
121
|
+
ref: b,
|
|
122
|
+
size: a,
|
|
123
|
+
variant: l ? "disabled" : m,
|
|
124
|
+
...f
|
|
111
125
|
},
|
|
112
126
|
o && /* @__PURE__ */ r.createElement("div", null, /* @__PURE__ */ r.createElement(
|
|
113
|
-
|
|
127
|
+
c,
|
|
114
128
|
{
|
|
115
129
|
alignItems: "center",
|
|
116
130
|
bottom: 0,
|
|
@@ -122,15 +136,15 @@ const B = (e, s = "square") => i`
|
|
|
122
136
|
right: 0,
|
|
123
137
|
top: 0
|
|
124
138
|
},
|
|
125
|
-
/* @__PURE__ */ r.createElement(
|
|
126
|
-
), /* @__PURE__ */ r.createElement(
|
|
127
|
-
!o &&
|
|
139
|
+
/* @__PURE__ */ r.createElement(B, { size: "xs" })
|
|
140
|
+
), /* @__PURE__ */ r.createElement(c, { opacity: "0" }, s)),
|
|
141
|
+
!o && s
|
|
128
142
|
);
|
|
129
143
|
}
|
|
130
144
|
);
|
|
131
|
-
|
|
132
|
-
const
|
|
145
|
+
_.displayName = "Button";
|
|
146
|
+
const q = d;
|
|
133
147
|
export {
|
|
134
|
-
|
|
135
|
-
|
|
148
|
+
_ as Button,
|
|
149
|
+
q as StyledButton
|
|
136
150
|
};
|