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.
- package/dist/Accordion.js +89 -0
- package/dist/Accordion.mjs +579 -0
- package/dist/Alert.js +1 -0
- package/dist/Alert.mjs +7 -0
- package/dist/AspectRatio.js +29 -0
- package/dist/AspectRatio.mjs +41 -0
- package/dist/Avatar.js +5 -0
- package/dist/Avatar.mjs +55 -0
- package/dist/Badge.js +17 -0
- package/dist/Badge.mjs +53 -0
- package/dist/{box.js → Box.js} +1 -1
- package/dist/Box.mjs +8 -0
- package/dist/Breadcrumb.js +54 -0
- package/dist/Breadcrumb.mjs +439 -0
- package/dist/Flex.js +1 -0
- package/dist/Flex.mjs +26 -0
- package/dist/{system.mjs → System.mjs} +5 -5
- package/dist/X5NMLKT6-BC1Q56kB.mjs +1258 -0
- package/dist/X5NMLKT6-vrNG8i_R.js +14 -0
- package/dist/index-0MPAX4B5.mjs +320 -0
- package/dist/index-BNA_A0oa.js +155 -0
- package/dist/index-BXJQXgy9.js +13 -0
- package/dist/index-Bwrtxit1.mjs +84 -0
- package/dist/index-Ct2FOeyM.js +17 -0
- package/dist/index-DRNn5iIc.js +142 -0
- package/dist/index-Du8Nrf16.mjs +128 -0
- package/dist/index-MifIgNHW.mjs +47 -0
- package/dist/index-V28zHt_Z.js +68 -0
- package/dist/index-WmqrMIzg.mjs +19070 -0
- package/dist/index.js +147 -5
- package/dist/index.mjs +770 -219
- package/dist/types/components/Accordion/index.d.ts +16 -0
- package/dist/types/components/Accordion/styles.d.ts +6 -0
- package/dist/types/components/Accordion/theme.d.ts +10 -0
- package/dist/types/components/Alert/Title.d.ts +7 -0
- package/dist/types/components/Alert/index.d.ts +24 -0
- package/dist/types/components/Alert/styles.d.ts +6 -0
- package/dist/types/components/Alert/theme.d.ts +15 -0
- package/dist/types/components/AspectRatio/index.d.ts +6 -0
- package/dist/types/components/AspectRatio/styles.d.ts +2 -0
- package/dist/types/components/Avatar/index.d.ts +16 -0
- package/dist/types/components/Avatar/styles.d.ts +2 -0
- package/dist/types/components/Avatar/theme.d.ts +9 -0
- package/dist/types/components/Avatar/utils.d.ts +3 -0
- package/dist/types/components/Badge/index.d.ts +11 -0
- package/dist/types/components/Badge/styles.d.ts +8 -0
- package/dist/types/components/Badge/theme.d.ts +18 -0
- package/dist/types/components/Breadcrumb/Item.d.ts +13 -0
- package/dist/types/components/Breadcrumb/Item.styles.d.ts +2 -0
- package/dist/types/components/Breadcrumb/index.d.ts +18 -0
- package/dist/types/components/Breadcrumb/styles.d.ts +6 -0
- package/dist/types/components/Breadcrumb/theme.d.ts +12 -0
- package/dist/types/components/Button/index.d.ts +21 -0
- package/dist/types/components/Button/styles.d.ts +2 -0
- package/dist/types/components/Button/theme.d.ts +13 -0
- package/dist/types/components/ButtonGroup/index.d.ts +15 -0
- package/dist/types/components/ButtonGroup/styles.d.ts +1 -0
- package/dist/types/components/Card/Cover.d.ts +10 -0
- package/dist/types/components/Card/Cover.styles.d.ts +1 -0
- package/dist/types/components/Card/index.d.ts +8 -0
- package/dist/types/components/Card/styles.d.ts +2 -0
- package/dist/types/components/Card/theme.d.ts +6 -0
- package/dist/types/components/ClearButton/index.d.ts +5 -0
- package/dist/types/components/ClearButton/styles.d.ts +1 -0
- package/dist/types/components/CloseButton/index.d.ts +3 -0
- package/dist/types/components/CloseButton/styles.d.ts +1 -0
- package/dist/types/components/Flex/index.d.ts +19 -0
- package/dist/types/components/index.d.ts +12 -0
- package/dist/types/theme/index.d.ts +12 -0
- package/package.json +9 -4
- package/dist/box.mjs +0 -8
- /package/dist/{system.js → System.js} +0 -0
- /package/dist/{wui-provider.js → WuiProvider.js} +0 -0
- /package/dist/{wui-provider.mjs → WuiProvider.mjs} +0 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import o from "react";
|
|
3
|
+
import { f as d } from "./index-WmqrMIzg.mjs";
|
|
4
|
+
import p, { x as g, css as r, system as h, th as m } from "@xstyled/styled-components";
|
|
5
|
+
import { g as c } from "./index-MifIgNHW.mjs";
|
|
6
|
+
var y = d((e, i) => /* @__PURE__ */ o.createElement(g.div, { ref: i, ...e })), u = (e, i, t) => r`
|
|
7
|
+
width: ${c(e, i)};
|
|
8
|
+
height: ${c(e, i)};
|
|
9
|
+
border-radius: ${t === "circle" && "50%"};
|
|
10
|
+
`, $ = p(y)(
|
|
11
|
+
({ h: e, shape: i, w: t }) => r`
|
|
12
|
+
position: relative;
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
|
|
18
|
+
img {
|
|
19
|
+
object-fit: cover;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
width: 100%;
|
|
22
|
+
height: 100%;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
${h};
|
|
26
|
+
|
|
27
|
+
/* we must override shapeStyles (let this line under ${h}) */
|
|
28
|
+
${i && u(t, e, i)}
|
|
29
|
+
`
|
|
30
|
+
), w = d(
|
|
31
|
+
({ children: e, dataTestId: i, shape: t, ...a }, l) => /* @__PURE__ */ o.createElement($, { "data-testid": i, ref: l, shape: t, ...a }, e)
|
|
32
|
+
);
|
|
33
|
+
w.displayName = "Shape";
|
|
34
|
+
var k = {
|
|
35
|
+
h0: "h1",
|
|
36
|
+
h1: "h2",
|
|
37
|
+
h2: "h3",
|
|
38
|
+
h3: "h4",
|
|
39
|
+
h4: "h5",
|
|
40
|
+
h5: "h6",
|
|
41
|
+
h6: "h6"
|
|
42
|
+
}, v = (e) => r`
|
|
43
|
+
/* stylelint-disable-next-line value-no-vendor-prefix */
|
|
44
|
+
display: -webkit-box;
|
|
45
|
+
/* stylelint-disable-next-line property-no-vendor-prefix */
|
|
46
|
+
-webkit-box-orient: vertical;
|
|
47
|
+
/* stylelint-disable-next-line property-no-vendor-prefix */
|
|
48
|
+
-webkit-line-clamp: ${e || "none"};
|
|
49
|
+
line-height: normal;
|
|
50
|
+
overflow: hidden;
|
|
51
|
+
word-break: ${e === 1 ? "break-all" : null};
|
|
52
|
+
`, S = p.p(({ lines: e, theme: i, variant: t, withDash: a }) => {
|
|
53
|
+
const l = k[t], n = t == null ? void 0 : t.startsWith("h"), s = e && e !== 1 / 0 && t.startsWith("h") && i.fonts.headings.includes("welcome-font");
|
|
54
|
+
return r`
|
|
55
|
+
${m(`texts.${l || t}`)};
|
|
56
|
+
|
|
57
|
+
/* Start fallback for non-webkit */
|
|
58
|
+
display: block;
|
|
59
|
+
${e && e !== 1 / 0 && v(e)};
|
|
60
|
+
/* End fallback for non-webkit */
|
|
61
|
+
|
|
62
|
+
${a && n && r`
|
|
63
|
+
display: flex;
|
|
64
|
+
|
|
65
|
+
&:before {
|
|
66
|
+
content: '';
|
|
67
|
+
width: 16;
|
|
68
|
+
height: 4;
|
|
69
|
+
display: flex;
|
|
70
|
+
align-self: center;
|
|
71
|
+
flex-shrink: 0;
|
|
72
|
+
background-color: primary-40;
|
|
73
|
+
margin-right: md;
|
|
74
|
+
}
|
|
75
|
+
`}
|
|
76
|
+
|
|
77
|
+
@media (min-width: lg) {
|
|
78
|
+
${m(`texts.${t}`)};
|
|
79
|
+
${h};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
${s && r`
|
|
83
|
+
& {
|
|
84
|
+
line-height: 1.4;
|
|
85
|
+
}
|
|
86
|
+
`}
|
|
87
|
+
|
|
88
|
+
${h};
|
|
89
|
+
`;
|
|
90
|
+
}), N = {
|
|
91
|
+
h0: "h1",
|
|
92
|
+
h1: "h1",
|
|
93
|
+
h2: "h2",
|
|
94
|
+
h3: "h3",
|
|
95
|
+
h4: "h4",
|
|
96
|
+
h5: "h5",
|
|
97
|
+
h6: "h6",
|
|
98
|
+
lg: "p",
|
|
99
|
+
md: "p",
|
|
100
|
+
sm: "p",
|
|
101
|
+
xs: "p",
|
|
102
|
+
"subtitle-md": "span",
|
|
103
|
+
"subtitle-sm": "span"
|
|
104
|
+
}, E = d(
|
|
105
|
+
({ as: e, children: i, dataTestId: t, lines: a, variant: l = "md", withDash: n, ...s }, f) => {
|
|
106
|
+
const x = e || N[l], b = s.className || "";
|
|
107
|
+
return /* @__PURE__ */ o.createElement(
|
|
108
|
+
S,
|
|
109
|
+
{
|
|
110
|
+
as: x,
|
|
111
|
+
"data-testid": t,
|
|
112
|
+
lines: a,
|
|
113
|
+
ref: f,
|
|
114
|
+
variant: l,
|
|
115
|
+
withDash: n,
|
|
116
|
+
...s,
|
|
117
|
+
className: `${b} wui-text`
|
|
118
|
+
},
|
|
119
|
+
i
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
);
|
|
123
|
+
E.displayName = "Text";
|
|
124
|
+
export {
|
|
125
|
+
y as B,
|
|
126
|
+
w as S,
|
|
127
|
+
E as T
|
|
128
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { css as o, createGlobalStyle as u } from "@xstyled/styled-components";
|
|
3
|
+
import "react";
|
|
4
|
+
import "./index-WmqrMIzg.mjs";
|
|
5
|
+
o`
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
`;
|
|
10
|
+
var v = (t, r, e) => Math.min(Math.max(t, r), e), d = (t, r = t) => {
|
|
11
|
+
const e = parseInt(t, 10), n = parseInt(r, 10);
|
|
12
|
+
return e - n >= 0 ? t : r;
|
|
13
|
+
}, s = (t, r, e) => parseInt(t.substring(r, e), 16), c = (t) => /(^[0-9a-fA-F]{6}$)|(^[0-9a-fA-F]{3}$)/.test(t), f = (t) => {
|
|
14
|
+
if (!t || (t = t.replace("#", ""), !c(t)))
|
|
15
|
+
return;
|
|
16
|
+
t.length === 3 && (t = `${t[0]}${t[0]}${t[1]}${t[1]}${t[2]}${t[2]}`);
|
|
17
|
+
const r = (a) => s(a, 0, 2), e = (a) => s(a, 2, 4), n = (a) => s(a, 4, 6);
|
|
18
|
+
return `${r(t)}, ${e(t)}, ${n(t)}`;
|
|
19
|
+
}, b = (t, r = 1) => t ? t.startsWith("#") ? `rgba(${f(t)}, ${r})` : t : void 0, $ = "data-wui-hidefocusrings";
|
|
20
|
+
u(
|
|
21
|
+
() => o`
|
|
22
|
+
[${$}] *:focus {
|
|
23
|
+
outline: none;
|
|
24
|
+
}
|
|
25
|
+
`
|
|
26
|
+
);
|
|
27
|
+
o`
|
|
28
|
+
white-space: nowrap;
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
text-overflow: ellipsis;
|
|
31
|
+
`;
|
|
32
|
+
var A = (t, r, e = !0) => {
|
|
33
|
+
let n = null, a = null;
|
|
34
|
+
return (...l) => {
|
|
35
|
+
const i = () => {
|
|
36
|
+
t(...a), n = null;
|
|
37
|
+
};
|
|
38
|
+
a = l, n || (e && i(), n = setTimeout(i, r));
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
$ as a,
|
|
43
|
+
v as c,
|
|
44
|
+
d as g,
|
|
45
|
+
b as h,
|
|
46
|
+
A as t
|
|
47
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use client";"use strict";const a=require("react"),o=require("./index-DRNn5iIc.js"),i=require("@xstyled/styled-components"),d=require("./index-BXJQXgy9.js");var c=o.forwardRef((e,s)=>a.createElement(i.x.div,{ref:s,...e})),g=(e,s,t)=>i.css`
|
|
2
|
+
width: ${d.getMax(e,s)};
|
|
3
|
+
height: ${d.getMax(e,s)};
|
|
4
|
+
border-radius: ${t==="circle"&&"50%"};
|
|
5
|
+
`,y=i(c)(({h:e,shape:s,w:t})=>i.css`
|
|
6
|
+
position: relative;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
|
|
12
|
+
img {
|
|
13
|
+
object-fit: cover;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 100%;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
${i.system};
|
|
20
|
+
|
|
21
|
+
/* we must override shapeStyles (let this line under ${i.system}) */
|
|
22
|
+
${s&&g(t,e,s)}
|
|
23
|
+
`),m=o.forwardRef(({children:e,dataTestId:s,shape:t,...n},r)=>a.createElement(y,{"data-testid":s,ref:r,shape:t,...n},e));m.displayName="Shape";var u={h0:"h1",h1:"h2",h2:"h3",h3:"h4",h4:"h5",h5:"h6",h6:"h6"},$=e=>i.css`
|
|
24
|
+
/* stylelint-disable-next-line value-no-vendor-prefix */
|
|
25
|
+
display: -webkit-box;
|
|
26
|
+
/* stylelint-disable-next-line property-no-vendor-prefix */
|
|
27
|
+
-webkit-box-orient: vertical;
|
|
28
|
+
/* stylelint-disable-next-line property-no-vendor-prefix */
|
|
29
|
+
-webkit-line-clamp: ${e||"none"};
|
|
30
|
+
line-height: normal;
|
|
31
|
+
overflow: hidden;
|
|
32
|
+
word-break: ${e===1?"break-all":null};
|
|
33
|
+
`,w=i.p(({lines:e,theme:s,variant:t,withDash:n})=>{const r=u[t],h=t==null?void 0:t.startsWith("h"),l=e&&e!==1/0&&t.startsWith("h")&&s.fonts.headings.includes("welcome-font");return i.css`
|
|
34
|
+
${i.th(`texts.${r||t}`)};
|
|
35
|
+
|
|
36
|
+
/* Start fallback for non-webkit */
|
|
37
|
+
display: block;
|
|
38
|
+
${e&&e!==1/0&&$(e)};
|
|
39
|
+
/* End fallback for non-webkit */
|
|
40
|
+
|
|
41
|
+
${n&&h&&i.css`
|
|
42
|
+
display: flex;
|
|
43
|
+
|
|
44
|
+
&:before {
|
|
45
|
+
content: '';
|
|
46
|
+
width: 16;
|
|
47
|
+
height: 4;
|
|
48
|
+
display: flex;
|
|
49
|
+
align-self: center;
|
|
50
|
+
flex-shrink: 0;
|
|
51
|
+
background-color: primary-40;
|
|
52
|
+
margin-right: md;
|
|
53
|
+
}
|
|
54
|
+
`}
|
|
55
|
+
|
|
56
|
+
@media (min-width: lg) {
|
|
57
|
+
${i.th(`texts.${t}`)};
|
|
58
|
+
${i.system};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
${l&&i.css`
|
|
62
|
+
& {
|
|
63
|
+
line-height: 1.4;
|
|
64
|
+
}
|
|
65
|
+
`}
|
|
66
|
+
|
|
67
|
+
${i.system};
|
|
68
|
+
`}),k={h0:"h1",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",lg:"p",md:"p",sm:"p",xs:"p","subtitle-md":"span","subtitle-sm":"span"},p=o.forwardRef(({as:e,children:s,dataTestId:t,lines:n,variant:r="md",withDash:h,...l},f)=>{const x=e||k[r],b=l.className||"";return a.createElement(w,{as:x,"data-testid":t,lines:n,ref:f,variant:r,withDash:h,...l,className:`${b} wui-text`},s)});p.displayName="Text";exports.Box=c;exports.Shape2=m;exports.Text2=p;
|