welcome-ui 9.0.0-alpha.4 → 9.0.1
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 +47 -3
- package/dist/2W3RN7C5-bkX-rIa3.js +61 -0
- package/dist/4I4MLMKD-BLxAidnq.js +43 -0
- package/dist/Accordion.js +6 -6
- package/dist/Alert.js +1 -1
- package/dist/AspectRatio.js +1 -1
- package/dist/Avatar.js +1 -1
- package/dist/{4CMBR7SL-Dhp8uJop.js → B7UTNDHN-BlIblHCu.js} +59 -59
- package/dist/Badge.js +1 -1
- package/dist/Breadcrumb.css +1 -1
- package/dist/Breadcrumb.js +27 -27
- package/dist/Button.js +2 -2
- package/dist/ButtonGroup.js +1 -1
- package/dist/Card.js +1 -1
- package/dist/Checkbox.css +1 -1
- package/dist/Checkbox.js +22 -22
- package/dist/CloseButton.js +3 -3
- package/dist/{SYRFVSLH-CHNUB1rW.js → DSAASPLT-BaaCUKsb.js} +7 -7
- package/dist/DatePicker.js +5 -5
- package/dist/DateTimePicker.js +2 -2
- package/dist/Drawer.css +1 -1
- package/dist/Drawer.js +67 -67
- package/dist/DropdownMenu.js +261 -259
- package/dist/Field.js +1 -1
- package/dist/FieldGroup.js +1 -1
- package/dist/FileDrop.js +194 -221
- package/dist/FileUpload.js +2 -2
- package/dist/GVVKDT6A-bET6V7Py.js +724 -0
- package/dist/Hint.js +1 -1
- package/dist/{Icon-BisRi8B3.js → Icon-EG7O4YwD.js} +1 -1
- package/dist/Icon.js +12 -12
- package/dist/InputText.js +1 -1
- package/dist/{ASMQKSDT-SH1qSiMi.js → KPUWHTQJ-D2TPji47.js} +30 -30
- package/dist/Label.js +3 -3
- package/dist/Link.css +1 -1
- package/dist/Link.js +27 -27
- package/dist/Loader.js +1 -1
- package/dist/Logo.js +1 -1
- package/dist/Modal.js +10 -10
- package/dist/{JC64G2H7-DPy9R0De.js → NI3IVY7K-Ztb3-XAv.js} +571 -571
- package/dist/{P4IRICAX-7kH4HzWI.js → NMGNQVTG-C6TqBngP.js} +5 -5
- package/dist/{LVA2YJMS-NUHCRwFZ.js → OE2EFRVA-C3721cM3.js} +316 -315
- package/dist/{ITI7HKP4-C5xLpoVY.js → OLVWQA7U-DysaSaZj.js} +59 -59
- package/dist/Pagination.css +1 -1
- package/dist/Pagination.js +81 -73
- package/dist/PasswordInput.js +17 -18
- package/dist/Popover.js +14 -14
- package/dist/{YV4JVR4I-CVFstk2K.js → RTNCFSKZ-qpPg689E.js} +75 -73
- package/dist/Radio.css +1 -1
- package/dist/Radio.js +29 -29
- package/dist/RadioGroup.js +21 -21
- package/dist/RadioTab.js +2 -2
- package/dist/{P2CTZE2T-D1TepwxQ.js → SBSPVDDI-DJKkC1eb.js} +43 -43
- package/dist/{NLEBE274-B4zy25kL.js → SQZLCNLX-CHDXnZ16.js} +16 -16
- package/dist/Search.js +2 -2
- package/dist/Select.js +170 -181
- package/dist/Slider.js +1 -1
- package/dist/Swiper.css +1 -1
- package/dist/Swiper.js +151 -151
- package/dist/{VGCJ63VH-CVhs4PYt.js → T22PY7TE-C1N0q8Kn.js} +109 -109
- package/dist/Table.js +1 -1
- package/dist/Tabs.js +303 -308
- package/dist/Tag.js +3 -3
- package/dist/Text.js +1 -1
- package/dist/Textarea.js +1 -1
- package/dist/TimePicker.js +2 -2
- package/dist/Toast.js +1 -1
- package/dist/Toggle.js +2 -2
- package/dist/Tooltip.js +72 -72
- package/dist/VariantIcon.js +3 -3
- package/dist/WelcomeLoader.js +1 -1
- package/dist/XCKGTAUF-DkxWCbaW.js +25 -0
- package/dist/Y67KZUMI-DFEgrUv2.js +15 -0
- package/dist/{AXB53BZF-BHeessqV.js → ZTXFEM5L-CkrIQCN1.js} +7 -7
- package/dist/{field-icon-size-Du58qHNC.js → field-icon-size-Z5NulTSk.js} +216 -224
- package/dist/{index-5rXezknO.js → index-BC2bF45u.js} +1 -1
- package/dist/{index-C8GsqBDe.js → index-BeetbagJ.js} +1 -1
- package/dist/{index-BJLXLdM3.js → index-Bt79XJ8R.js} +1 -1
- package/dist/{index-Dcq5gh3E.js → index-BtwrJ6N4.js} +1 -1
- package/dist/{index-DL4-ut3P.js → index-CCASZBtz.js} +1 -1
- package/dist/{index-lbUBMgHp.js → index-CPqDZeah.js} +2 -2
- package/dist/{index-CTgip19b.js → index-CQEPCbEE.js} +1 -1
- package/dist/{index-CnxSNAPH.js → index-Crpe9CvH.js} +1 -1
- package/dist/{index-CWVOLBDY.js → index-D5a8Oe6k.js} +1 -1
- package/dist/{index-C1jjVTAc.js → index-D8dq-I5s.js} +1 -1
- package/dist/{index-Cvtm6uuS.js → index-DkwTwo3z.js} +1 -1
- package/dist/{index-BG2aV9o8.js → index-DnO8yBVT.js} +1 -1
- package/dist/index.css +0 -0
- package/dist/tslib.es6-DpB4Y59c.js +683 -0
- package/dist/types/components/Pagination/index.d.ts +1 -2
- package/dist/types/components/Pagination/types.d.ts +5 -2
- package/dist/types/components/PasswordInput/ToggleButton.d.ts +1 -1
- package/dist/types/components/PasswordInput/types.d.ts +1 -1
- package/dist/types/components/Tabs/components/TabList/index.d.ts +1 -1
- package/dist/types/components/Tabs/index.d.ts +1 -1
- package/dist/types/components/Tabs/types.d.ts +1 -2
- package/dist/types/components/Tabs/utils.d.ts +1 -2
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/theme/index.d.ts +0 -0
- package/dist/types/utils/useForkRef.d.ts +7 -1
- package/dist/useForkRef-D807AV7D.js +22 -0
- package/dist/{utils-BNMgUIHQ.js → utils-BpbIqM56.js} +1 -1
- package/dist/utils.js +2 -2
- package/package.json +5 -5
- package/dist/BYC7LY2E-DbSoi9cN.js +0 -673
- package/dist/KUU7WJ55-CsIy9XMu.js +0 -61
- package/dist/MTZPJQMC-D_TnSwZf.js +0 -15
- package/dist/QYJ6MIDR-Dm7lYMh6.js +0 -43
- package/dist/X5NMLKT6-PeY306ft.js +0 -25
- package/dist/index--0U5Rubs.js +0 -644
- /package/dist/{index-PAaZGbyz.js → index-CdiHdiVB.js} +0 -0
package/README.md
CHANGED
|
@@ -15,14 +15,58 @@ Here you'll find all the core components you need to create a delightful webapp.
|
|
|
15
15
|
1 - Install the `welcome-ui` package and **peer dependencies** listed below:
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
yarn add welcome-ui react@^
|
|
18
|
+
yarn add welcome-ui tailwindcss react@^19.0.0
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
yarn add postcss --dev
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
2 - Add dependencies for vite project
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
yarn add @tailwindcss/vite --dev
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
3 - Add on your vite config tailwindcss plugin
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
import { defineConfig } from 'vite'
|
|
35
|
+
import tailwindcss from '@tailwindcss/vite'
|
|
36
|
+
|
|
37
|
+
export default defineConfig({
|
|
38
|
+
plugins: [
|
|
39
|
+
tailwindcss(),
|
|
40
|
+
],
|
|
41
|
+
})
|
|
19
42
|
```
|
|
20
43
|
|
|
21
44
|
## Import library & Theme
|
|
22
45
|
|
|
23
|
-
|
|
46
|
+
On your theme or global css import:
|
|
47
|
+
|
|
48
|
+
- TailwindCSS
|
|
49
|
+
- Welcome UI Theme
|
|
50
|
+
- Welcome UI components style
|
|
51
|
+
|
|
52
|
+
```css
|
|
53
|
+
@import 'tailwindcss';
|
|
24
54
|
|
|
25
|
-
|
|
55
|
+
@import 'welcome-ui/theme.css';
|
|
56
|
+
|
|
57
|
+
@import 'welcome-ui/Accordion.css';
|
|
58
|
+
@import 'welcome-ui/Alert.css';
|
|
59
|
+
@import 'welcome-ui-new/***other-components-you-need***.css';
|
|
60
|
+
...
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Enjoy! 🌞
|
|
64
|
+
|
|
65
|
+
```jsx
|
|
66
|
+
import { Button } from 'welcome-ui/Button'
|
|
67
|
+
|
|
68
|
+
return <Button>Ok let's go</Button>
|
|
69
|
+
```
|
|
26
70
|
|
|
27
71
|
## Develop on local
|
|
28
72
|
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { c as F, _ as p, O as d, A as I, L as q, u as _, d as x, p as Y, a as T, W as j, X as w, j as L, h as H, Y as V, Z as W, f as X, b as Z } from "./OE2EFRVA-C3721cM3.js";
|
|
3
|
+
import { useRef as C, useState as D, useEffect as z } from "react";
|
|
4
|
+
var G = "button";
|
|
5
|
+
function M(s) {
|
|
6
|
+
if (!s.isTrusted) return !1;
|
|
7
|
+
const t = s.currentTarget;
|
|
8
|
+
return s.key === "Enter" ? d(t) || t.tagName === "SUMMARY" || t.tagName === "A" : s.key === " " ? d(t) || t.tagName === "SUMMARY" || t.tagName === "INPUT" || t.tagName === "SELECT" : !1;
|
|
9
|
+
}
|
|
10
|
+
var J = Symbol("command"), Q = F(
|
|
11
|
+
function(t) {
|
|
12
|
+
var i = t, { clickOnEnter: m = !0, clickOnSpace: u = !0 } = i, r = p(i, ["clickOnEnter", "clickOnSpace"]);
|
|
13
|
+
const c = C(null), [K, R] = D(!1);
|
|
14
|
+
z(() => {
|
|
15
|
+
c.current && R(d(c.current));
|
|
16
|
+
}, []);
|
|
17
|
+
const [U, k] = D(!1), f = C(!1), y = I(r), [E, A] = q(r, J, !0), P = r.onKeyDown, O = _((e) => {
|
|
18
|
+
P == null || P(e);
|
|
19
|
+
const a = e.currentTarget;
|
|
20
|
+
if (e.defaultPrevented || E || y || !L(e) || H(a) || a.isContentEditable) return;
|
|
21
|
+
const o = m && e.key === "Enter", n = u && e.key === " ", g = e.key === "Enter" && !m, l = e.key === " " && !u;
|
|
22
|
+
if (g || l) {
|
|
23
|
+
e.preventDefault();
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
if (o || n) {
|
|
27
|
+
const v = M(e);
|
|
28
|
+
if (o) {
|
|
29
|
+
if (!v) {
|
|
30
|
+
e.preventDefault();
|
|
31
|
+
const S = e, { view: $ } = S, B = p(S, ["view"]), N = () => w(a, B);
|
|
32
|
+
V() ? W(a, "keyup", N) : queueMicrotask(N);
|
|
33
|
+
}
|
|
34
|
+
} else n && (f.current = !0, v || (e.preventDefault(), k(!0)));
|
|
35
|
+
}
|
|
36
|
+
}), b = r.onKeyUp, h = _((e) => {
|
|
37
|
+
if (b == null || b(e), e.defaultPrevented || E || y || e.metaKey) return;
|
|
38
|
+
const a = u && e.key === " ";
|
|
39
|
+
if (f.current && a && (f.current = !1, !M(e))) {
|
|
40
|
+
e.preventDefault(), k(!1);
|
|
41
|
+
const o = e.currentTarget, n = e, { view: g } = n, l = p(n, ["view"]);
|
|
42
|
+
queueMicrotask(() => w(o, l));
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
return r = x(T(T({
|
|
46
|
+
"data-active": U || void 0,
|
|
47
|
+
type: K ? "button" : void 0
|
|
48
|
+
}, A), r), {
|
|
49
|
+
ref: Y(c, r.ref),
|
|
50
|
+
onKeyDown: O,
|
|
51
|
+
onKeyUp: h
|
|
52
|
+
}), r = j(r), r;
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
X(function(t) {
|
|
56
|
+
const i = Q(t);
|
|
57
|
+
return Z(G, i);
|
|
58
|
+
});
|
|
59
|
+
export {
|
|
60
|
+
Q as u
|
|
61
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { u as p, P as _ } from "./Y67KZUMI-DFEgrUv2.js";
|
|
3
|
+
import { c as i, _ as v, d as l, p as h, a as n, f as P, b as m, i as D, u as x, x as E } from "./OE2EFRVA-C3721cM3.js";
|
|
4
|
+
import { u as b } from "./ZTXFEM5L-CkrIQCN1.js";
|
|
5
|
+
import { jsx as g } from "react/jsx-runtime";
|
|
6
|
+
var A = "div", d = i(
|
|
7
|
+
function(s) {
|
|
8
|
+
var e = s, { store: r } = e, o = v(e, ["store"]);
|
|
9
|
+
const c = p();
|
|
10
|
+
return r = r || c, o = l(n({}, o), {
|
|
11
|
+
ref: h(r == null ? void 0 : r.setAnchorElement, o.ref)
|
|
12
|
+
}), o;
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
P(function(s) {
|
|
16
|
+
const e = d(s);
|
|
17
|
+
return m(A, e);
|
|
18
|
+
});
|
|
19
|
+
var C = "button", k = i(function(s) {
|
|
20
|
+
var e = s, { store: r } = e, o = v(e, ["store"]);
|
|
21
|
+
const c = p();
|
|
22
|
+
r = r || c, D(
|
|
23
|
+
r,
|
|
24
|
+
process.env.NODE_ENV !== "production" && "PopoverDisclosure must receive a `store` prop or be wrapped in a PopoverProvider component."
|
|
25
|
+
);
|
|
26
|
+
const u = o.onClick, f = x((t) => {
|
|
27
|
+
r == null || r.setAnchorElement(t.currentTarget), u == null || u(t);
|
|
28
|
+
});
|
|
29
|
+
return o = E(
|
|
30
|
+
o,
|
|
31
|
+
(t) => /* @__PURE__ */ g(_, { value: r, children: t }),
|
|
32
|
+
[r]
|
|
33
|
+
), o = l(n({}, o), {
|
|
34
|
+
onClick: f
|
|
35
|
+
}), o = d(n({ store: r }, o)), o = b(n({ store: r }, o)), o;
|
|
36
|
+
}), w = P(function(s) {
|
|
37
|
+
const e = k(s);
|
|
38
|
+
return m(C, e);
|
|
39
|
+
});
|
|
40
|
+
export {
|
|
41
|
+
w as P,
|
|
42
|
+
k as u
|
|
43
|
+
};
|
package/dist/Accordion.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as t, jsx as o } from "react/jsx-runtime";
|
|
3
|
-
import { D as d } from "./
|
|
4
|
-
import { D as a } from "./
|
|
5
|
-
import { u as k } from "./
|
|
3
|
+
import { D as d } from "./NMGNQVTG-C6TqBngP.js";
|
|
4
|
+
import { D as a } from "./T22PY7TE-C1N0q8Kn.js";
|
|
5
|
+
import { u as k } from "./T22PY7TE-C1N0q8Kn.js";
|
|
6
6
|
import { forwardRef as _ } from "react";
|
|
7
|
-
import "./Icon-
|
|
8
|
-
import { R as u } from "./index-
|
|
7
|
+
import "./Icon-EG7O4YwD.js";
|
|
8
|
+
import { R as u } from "./index-BtwrJ6N4.js";
|
|
9
9
|
import { Text as f } from "./Text.js";
|
|
10
|
-
import { c as h } from "./index-
|
|
10
|
+
import { c as h } from "./index-CdiHdiVB.js";
|
|
11
11
|
const p = "_root_173le_2", v = "_icon_173le_11", x = "_disclosure_173le_23", N = {
|
|
12
12
|
root: p,
|
|
13
13
|
icon: v,
|
package/dist/Alert.js
CHANGED
|
@@ -5,7 +5,7 @@ import { Button as y } from "./Button.js";
|
|
|
5
5
|
import { CloseButton as I } from "./CloseButton.js";
|
|
6
6
|
import { Text as b } from "./Text.js";
|
|
7
7
|
import { VariantIcon as S } from "./VariantIcon.js";
|
|
8
|
-
import { c as T } from "./index-
|
|
8
|
+
import { c as T } from "./index-CdiHdiVB.js";
|
|
9
9
|
const V = "_root_1c0qe_2", $ = "_icon_1c0qe_55", E = "_content_1c0qe_58", R = "_title_1c0qe_88", O = {
|
|
10
10
|
root: V,
|
|
11
11
|
"size-sm": "_size-sm_1c0qe_16",
|
package/dist/AspectRatio.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
-
import { c as e } from "./index-
|
|
3
|
+
import { c as e } from "./index-CdiHdiVB.js";
|
|
4
4
|
import { f as _ } from "./forwardRefWithAs-8eP3ZN15.js";
|
|
5
5
|
import "react";
|
|
6
6
|
const c = "_root_1s56r_2", m = {
|
package/dist/Avatar.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as n } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef as i } from "react";
|
|
4
|
-
import { c as _ } from "./index-
|
|
4
|
+
import { c as _ } from "./index-CdiHdiVB.js";
|
|
5
5
|
const l = "_root_zm5un_2", u = {
|
|
6
6
|
root: l,
|
|
7
7
|
"size-sm": "_size-sm_zm5un_24",
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { H as S, G as C, S as Q, I as L, s as X, g as Z, K as p } from "./OE2EFRVA-C3721cM3.js";
|
|
3
|
+
import { t as ee, c as O, s as R, i as te, f as G, d as h, a as ne } from "./RTNCFSKZ-qpPg689E.js";
|
|
4
4
|
function re(t) {
|
|
5
|
+
const i = [];
|
|
6
|
+
for (const e of t)
|
|
7
|
+
i.push(...e);
|
|
8
|
+
return i;
|
|
9
|
+
}
|
|
10
|
+
function U(t) {
|
|
11
|
+
return t.slice().reverse();
|
|
12
|
+
}
|
|
13
|
+
function ie(t) {
|
|
5
14
|
var i;
|
|
6
15
|
const e = t.find((a) => !!a.element), o = [...t].reverse().find((a) => !!a.element);
|
|
7
16
|
let s = (i = e == null ? void 0 : e.element) == null ? void 0 : i.parentElement;
|
|
@@ -10,14 +19,14 @@ function re(t) {
|
|
|
10
19
|
return s;
|
|
11
20
|
s = s.parentElement;
|
|
12
21
|
}
|
|
13
|
-
return
|
|
22
|
+
return Z(s).body;
|
|
14
23
|
}
|
|
15
|
-
function
|
|
24
|
+
function se(t) {
|
|
16
25
|
return t == null ? void 0 : t.__unstablePrivateStore;
|
|
17
26
|
}
|
|
18
|
-
function
|
|
27
|
+
function oe(t = {}) {
|
|
19
28
|
var i;
|
|
20
|
-
|
|
29
|
+
ee(t, t.store);
|
|
21
30
|
const e = (i = t.store) == null ? void 0 : i.getState(), o = S(
|
|
22
31
|
t.items,
|
|
23
32
|
e == null ? void 0 : e.items,
|
|
@@ -26,29 +35,29 @@ function se(t = {}) {
|
|
|
26
35
|
), s = new Map(o.map((r) => [r.id, r])), a = {
|
|
27
36
|
items: o,
|
|
28
37
|
renderedItems: S(e == null ? void 0 : e.renderedItems, [])
|
|
29
|
-
}, d =
|
|
38
|
+
}, d = se(t.store), u = O(
|
|
30
39
|
{ items: o, renderedItems: a.renderedItems },
|
|
31
40
|
d
|
|
32
|
-
), n =
|
|
33
|
-
const l =
|
|
41
|
+
), n = O(a, t.store), b = (r) => {
|
|
42
|
+
const l = X(r, (c) => c.element);
|
|
34
43
|
u.setState("renderedItems", l), n.setState("renderedItems", l);
|
|
35
44
|
};
|
|
36
|
-
R(n, () =>
|
|
45
|
+
R(n, () => te(u)), R(u, () => G(u, ["items"], (r) => {
|
|
37
46
|
n.setState("items", r.items);
|
|
38
|
-
})), R(u, () =>
|
|
47
|
+
})), R(u, () => G(u, ["renderedItems"], (r) => {
|
|
39
48
|
let l = !0, c = requestAnimationFrame(() => {
|
|
40
49
|
const { renderedItems: m } = n.getState();
|
|
41
50
|
r.renderedItems !== m && b(r.renderedItems);
|
|
42
51
|
});
|
|
43
52
|
if (typeof IntersectionObserver != "function")
|
|
44
53
|
return () => cancelAnimationFrame(c);
|
|
45
|
-
const
|
|
54
|
+
const g = () => {
|
|
46
55
|
if (l) {
|
|
47
56
|
l = !1;
|
|
48
57
|
return;
|
|
49
58
|
}
|
|
50
59
|
cancelAnimationFrame(c), c = requestAnimationFrame(() => b(r.renderedItems));
|
|
51
|
-
}, F =
|
|
60
|
+
}, F = ie(r.renderedItems), f = new IntersectionObserver(g, { root: F });
|
|
52
61
|
for (const m of r.renderedItems)
|
|
53
62
|
m.element && f.observe(m.element);
|
|
54
63
|
return () => {
|
|
@@ -56,24 +65,24 @@ function se(t = {}) {
|
|
|
56
65
|
};
|
|
57
66
|
}));
|
|
58
67
|
const E = (r, l, c = !1) => {
|
|
59
|
-
let
|
|
68
|
+
let g;
|
|
60
69
|
return l((f) => {
|
|
61
|
-
const m = f.findIndex(({ id:
|
|
70
|
+
const m = f.findIndex(({ id: x }) => x === r.id), w = f.slice();
|
|
62
71
|
if (m !== -1) {
|
|
63
|
-
|
|
64
|
-
const
|
|
65
|
-
w[m] =
|
|
72
|
+
g = f[m];
|
|
73
|
+
const x = L(L({}, g), r);
|
|
74
|
+
w[m] = x, s.set(r.id, x);
|
|
66
75
|
} else
|
|
67
76
|
w.push(r), s.set(r.id, r);
|
|
68
77
|
return w;
|
|
69
78
|
}), () => {
|
|
70
79
|
l((f) => {
|
|
71
|
-
if (!
|
|
72
|
-
return c && s.delete(r.id), f.filter(({ id:
|
|
73
|
-
const m = f.findIndex(({ id:
|
|
80
|
+
if (!g)
|
|
81
|
+
return c && s.delete(r.id), f.filter(({ id: x }) => x !== r.id);
|
|
82
|
+
const m = f.findIndex(({ id: x }) => x === r.id);
|
|
74
83
|
if (m === -1) return f;
|
|
75
84
|
const w = f.slice();
|
|
76
|
-
return w[m] =
|
|
85
|
+
return w[m] = g, s.set(r.id, g), w;
|
|
77
86
|
});
|
|
78
87
|
};
|
|
79
88
|
}, P = (r) => E(
|
|
@@ -83,7 +92,7 @@ function se(t = {}) {
|
|
|
83
92
|
);
|
|
84
93
|
return C(L({}, n), {
|
|
85
94
|
registerItem: P,
|
|
86
|
-
renderItem: (r) =>
|
|
95
|
+
renderItem: (r) => Q(
|
|
87
96
|
P(r),
|
|
88
97
|
E(
|
|
89
98
|
r,
|
|
@@ -95,7 +104,7 @@ function se(t = {}) {
|
|
|
95
104
|
let l = s.get(r);
|
|
96
105
|
if (!l) {
|
|
97
106
|
const { items: c } = u.getState();
|
|
98
|
-
l = c.find((
|
|
107
|
+
l = c.find((g) => g.id === r), l && s.set(r, l);
|
|
99
108
|
}
|
|
100
109
|
return l || null;
|
|
101
110
|
},
|
|
@@ -103,17 +112,8 @@ function se(t = {}) {
|
|
|
103
112
|
__unstablePrivateStore: u
|
|
104
113
|
});
|
|
105
114
|
}
|
|
106
|
-
function
|
|
107
|
-
return
|
|
108
|
-
}
|
|
109
|
-
function le(t) {
|
|
110
|
-
const i = [];
|
|
111
|
-
for (const e of t)
|
|
112
|
-
i.push(...e);
|
|
113
|
-
return i;
|
|
114
|
-
}
|
|
115
|
-
function $(t) {
|
|
116
|
-
return t.slice().reverse();
|
|
115
|
+
function le(t, i, e) {
|
|
116
|
+
return p(i, [e.store]), h(t, e, "items", "setItems"), t;
|
|
117
117
|
}
|
|
118
118
|
var ae = { id: null };
|
|
119
119
|
function _(t, i) {
|
|
@@ -122,7 +122,7 @@ function _(t, i) {
|
|
|
122
122
|
function de(t, i) {
|
|
123
123
|
return t.filter((e) => i ? !e.disabled && e.id !== i : !e.disabled);
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function $(t, i) {
|
|
126
126
|
return t.filter((e) => e.rowId === i);
|
|
127
127
|
}
|
|
128
128
|
function ce(t, i, e = !1) {
|
|
@@ -133,7 +133,7 @@ function ce(t, i, e = !1) {
|
|
|
133
133
|
...t.slice(0, o)
|
|
134
134
|
];
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function H(t) {
|
|
137
137
|
const i = [];
|
|
138
138
|
for (const e of t) {
|
|
139
139
|
const o = i.find((s) => {
|
|
@@ -144,7 +144,7 @@ function Y(t) {
|
|
|
144
144
|
}
|
|
145
145
|
return i;
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function K(t) {
|
|
148
148
|
let i = 0;
|
|
149
149
|
for (const { length: e } of t)
|
|
150
150
|
e > i && (i = e);
|
|
@@ -158,7 +158,7 @@ function ue(t) {
|
|
|
158
158
|
};
|
|
159
159
|
}
|
|
160
160
|
function fe(t, i, e) {
|
|
161
|
-
const o =
|
|
161
|
+
const o = K(t);
|
|
162
162
|
for (const s of t)
|
|
163
163
|
for (let a = 0; a < o; a += 1) {
|
|
164
164
|
const d = s[a];
|
|
@@ -170,7 +170,7 @@ function fe(t, i, e) {
|
|
|
170
170
|
return t;
|
|
171
171
|
}
|
|
172
172
|
function me(t) {
|
|
173
|
-
const i =
|
|
173
|
+
const i = H(t), e = K(i), o = [];
|
|
174
174
|
for (let s = 0; s < e; s += 1)
|
|
175
175
|
for (const a of i) {
|
|
176
176
|
const d = a[s];
|
|
@@ -187,7 +187,7 @@ function me(t) {
|
|
|
187
187
|
}
|
|
188
188
|
function Se(t = {}) {
|
|
189
189
|
var i;
|
|
190
|
-
const e = (i = t.store) == null ? void 0 : i.getState(), o =
|
|
190
|
+
const e = (i = t.store) == null ? void 0 : i.getState(), o = oe(t), s = S(
|
|
191
191
|
t.activeId,
|
|
192
192
|
e == null ? void 0 : e.activeId,
|
|
193
193
|
t.defaultActiveId
|
|
@@ -219,10 +219,10 @@ function Se(t = {}) {
|
|
|
219
219
|
focusLoop: S(t.focusLoop, e == null ? void 0 : e.focusLoop, !1),
|
|
220
220
|
focusWrap: S(t.focusWrap, e == null ? void 0 : e.focusWrap, !1),
|
|
221
221
|
focusShift: S(t.focusShift, e == null ? void 0 : e.focusShift, !1)
|
|
222
|
-
}), d =
|
|
222
|
+
}), d = O(a, o, t.store);
|
|
223
223
|
R(
|
|
224
224
|
d,
|
|
225
|
-
() =>
|
|
225
|
+
() => ne(d, ["renderedItems", "activeId"], (n) => {
|
|
226
226
|
d.setState("activeId", (b) => {
|
|
227
227
|
var E;
|
|
228
228
|
return b !== void 0 ? b : (E = _(n.renderedItems)) == null ? void 0 : E.id;
|
|
@@ -234,30 +234,30 @@ function Se(t = {}) {
|
|
|
234
234
|
const r = d.getState(), {
|
|
235
235
|
skip: l = 0,
|
|
236
236
|
activeId: c = r.activeId,
|
|
237
|
-
focusShift:
|
|
237
|
+
focusShift: g = r.focusShift,
|
|
238
238
|
focusLoop: F = r.focusLoop,
|
|
239
239
|
focusWrap: f = r.focusWrap,
|
|
240
240
|
includesBaseElement: m = r.includesBaseElement,
|
|
241
241
|
renderedItems: w = r.renderedItems,
|
|
242
|
-
rtl:
|
|
243
|
-
} = b, y = n === "up" || n === "down",
|
|
244
|
-
let v = y ?
|
|
245
|
-
fe(
|
|
242
|
+
rtl: x = r.rtl
|
|
243
|
+
} = b, y = n === "up" || n === "down", z = n === "next" || n === "down", Y = z ? x && !y : !x || y, j = g && !l;
|
|
244
|
+
let v = y ? re(
|
|
245
|
+
fe(H(w), c, j)
|
|
246
246
|
) : w;
|
|
247
|
-
if (v =
|
|
247
|
+
if (v = Y ? U(v) : v, v = y ? me(v) : v, c == null)
|
|
248
248
|
return (E = _(v)) == null ? void 0 : E.id;
|
|
249
249
|
const M = v.find((I) => I.id === c);
|
|
250
250
|
if (!M)
|
|
251
251
|
return (P = _(v)) == null ? void 0 : P.id;
|
|
252
|
-
const D = v.some((I) => I.rowId),
|
|
252
|
+
const D = v.some((I) => I.rowId), J = v.indexOf(M), N = v.slice(J + 1), W = $(N, M.rowId);
|
|
253
253
|
if (l) {
|
|
254
254
|
const I = de(W, c), B = I.slice(l)[0] || // If we can't find an item, just return the last one.
|
|
255
255
|
I[I.length - 1];
|
|
256
256
|
return B == null ? void 0 : B.id;
|
|
257
257
|
}
|
|
258
|
-
const T = F && (y ? F !== "horizontal" : F !== "vertical"), V = D && f && (y ? f !== "horizontal" : f !== "vertical"), A =
|
|
258
|
+
const T = F && (y ? F !== "horizontal" : F !== "vertical"), V = D && f && (y ? f !== "horizontal" : f !== "vertical"), A = z ? (!D || y) && T && m : y ? m : !1;
|
|
259
259
|
if (T) {
|
|
260
|
-
const I = V && !A ? v :
|
|
260
|
+
const I = V && !A ? v : $(v, M.rowId), B = ce(I, c, A), q = _(B, c);
|
|
261
261
|
return q == null ? void 0 : q.id;
|
|
262
262
|
}
|
|
263
263
|
if (V) {
|
|
@@ -288,7 +288,7 @@ function Se(t = {}) {
|
|
|
288
288
|
},
|
|
289
289
|
last: () => {
|
|
290
290
|
var n;
|
|
291
|
-
return (n = _(
|
|
291
|
+
return (n = _(U(d.getState().renderedItems))) == null ? void 0 : n.id;
|
|
292
292
|
},
|
|
293
293
|
next: (n) => (n !== void 0 && typeof n == "number" && (n = { skip: n }), u("next", n)),
|
|
294
294
|
previous: (n) => (n !== void 0 && typeof n == "number" && (n = { skip: n }), u("previous", n)),
|
|
@@ -296,13 +296,13 @@ function Se(t = {}) {
|
|
|
296
296
|
up: (n) => (n !== void 0 && typeof n == "number" && (n = { skip: n }), u("up", n))
|
|
297
297
|
});
|
|
298
298
|
}
|
|
299
|
-
function
|
|
300
|
-
return t =
|
|
299
|
+
function ge(t, i, e) {
|
|
300
|
+
return t = le(t, i, e), h(t, e, "activeId", "setActiveId"), h(t, e, "includesBaseElement"), h(t, e, "virtualFocus"), h(t, e, "orientation"), h(t, e, "rtl"), h(t, e, "focusLoop"), h(t, e, "focusWrap"), h(t, e, "focusShift"), t;
|
|
301
301
|
}
|
|
302
302
|
export {
|
|
303
|
-
|
|
303
|
+
oe as a,
|
|
304
304
|
Se as c,
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
305
|
+
re as f,
|
|
306
|
+
U as r,
|
|
307
|
+
ge as u
|
|
308
308
|
};
|
package/dist/Badge.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as m } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef as u } from "react";
|
|
4
|
-
import { c } from "./index-
|
|
4
|
+
import { c } from "./index-CdiHdiVB.js";
|
|
5
5
|
const b = "_root_nle8k_2", f = {
|
|
6
6
|
root: b,
|
|
7
7
|
"disabled-default": "_disabled-default_nle8k_18",
|
package/dist/Breadcrumb.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.
|
|
1
|
+
@layer components{._root_ce14e_2{height:100%;position:relative;overflow-x:hidden;padding:var(--spacing-sm) 0;font-size:var(--font-size-subtitle-sm);font-weight:var(--font-weight-medium);letter-spacing:var(--letter-spacing-subtitle-sm);line-height:var(--line-height-subtitle-sm);text-transform:uppercase;font-family:var(--font-family-headings)}._list_ce14e_14{display:inline-flex;align-items:center;max-width:100%;overflow-x:auto;margin:0;padding:0;list-style:none;white-space:nowrap}._start-gradient_ce14e_24{left:0;transform-origin:left}._end-gradient_ce14e_28{right:0;transform-origin:right}._start-gradient_ce14e_24,._end-gradient_ce14e_28{position:absolute;bottom:0;top:0;width:var(--spacing-xxl)}._item-wrapper_ce14e_39{display:inline-flex;flex:0 0 auto;line-height:normal}._item-content_ce14e_44{color:var(--breadcrumbItemColor, var(--color-neutral-50));text-decoration:none;align-items:center;transition:var(--duration-medium);direction:initial}._item-content_ce14e_44:hover,._item-content_ce14e_44[aria-current=page]{--breadcrumbItemColor: var(--color-neutral-70)}._item-content_ce14e_44[aria-disabled=true]{pointer-events:none;cursor:default}._item-separator_ce14e_58{color:var(--color-neutral-50);padding:0 var(--spacing-xs);display:flex;align-items:center}}
|
package/dist/Breadcrumb.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as te, jsx as R } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef as re, Children as pe, cloneElement as be, useRef as M, useState as
|
|
4
|
-
import "./Icon-
|
|
5
|
-
import { R as me } from "./index-
|
|
6
|
-
import { c as ne } from "./index-
|
|
3
|
+
import { forwardRef as re, Children as pe, cloneElement as be, useRef as M, useState as V, useCallback as X, useMemo as ge, useEffect as q } from "react";
|
|
4
|
+
import "./Icon-EG7O4YwD.js";
|
|
5
|
+
import { R as me } from "./index-BtwrJ6N4.js";
|
|
6
|
+
import { c as ne } from "./index-CdiHdiVB.js";
|
|
7
7
|
import { t as xe } from "./throttle-BDBzFeFj.js";
|
|
8
8
|
var b = [], ze = function() {
|
|
9
9
|
return b.some(function(e) {
|
|
@@ -83,13 +83,13 @@ var g = function(e) {
|
|
|
83
83
|
return S.get(e);
|
|
84
84
|
if (oe(e))
|
|
85
85
|
return S.set(e, Y), Y;
|
|
86
|
-
var r = getComputedStyle(e), n = P(e) && e.ownerSVGElement && e.getBBox(), i = !Te && r.boxSizing === "border-box", o = ye.test(r.writingMode || ""), s = !n && U.test(r.overflowY || ""), l = !n && U.test(r.overflowX || ""), c = n ? 0 : d(r.paddingTop), v = n ? 0 : d(r.paddingRight), h = n ? 0 : d(r.paddingBottom), f = n ? 0 : d(r.paddingLeft), w = n ? 0 : d(r.borderTopWidth), a = n ? 0 : d(r.borderRightWidth), u = n ? 0 : d(r.borderBottomWidth), m = n ? 0 : d(r.borderLeftWidth), p = f + v, x = c + h, O = m + a, D = w + u,
|
|
86
|
+
var r = getComputedStyle(e), n = P(e) && e.ownerSVGElement && e.getBBox(), i = !Te && r.boxSizing === "border-box", o = ye.test(r.writingMode || ""), s = !n && U.test(r.overflowY || ""), l = !n && U.test(r.overflowX || ""), c = n ? 0 : d(r.paddingTop), v = n ? 0 : d(r.paddingRight), h = n ? 0 : d(r.paddingBottom), f = n ? 0 : d(r.paddingLeft), w = n ? 0 : d(r.borderTopWidth), a = n ? 0 : d(r.borderRightWidth), u = n ? 0 : d(r.borderBottomWidth), m = n ? 0 : d(r.borderLeftWidth), p = f + v, x = c + h, O = m + a, D = w + u, G = l ? e.offsetHeight - D - e.clientHeight : 0, F = s ? e.offsetWidth - O - e.clientWidth : 0, le = i ? p + O : 0, de = i ? x + D : 0, T = n ? n.width : d(r.width) - le - F, B = n ? n.height : d(r.height) - de - G, fe = T + p + F + O, he = B + x + G + D, H = g({
|
|
87
87
|
devicePixelContentBoxSize: z(Math.round(T * devicePixelRatio), Math.round(B * devicePixelRatio), o),
|
|
88
88
|
borderBoxSize: z(fe, he, o),
|
|
89
89
|
contentBoxSize: z(T, B, o),
|
|
90
90
|
contentRect: new ie(f, c, T, B)
|
|
91
91
|
});
|
|
92
|
-
return S.set(e,
|
|
92
|
+
return S.set(e, H), H;
|
|
93
93
|
}, ae = function(e, t, r) {
|
|
94
94
|
var n = se(e, r), i = n.borderBoxSize, o = n.contentBoxSize, s = n.devicePixelContentBoxSize;
|
|
95
95
|
switch (t) {
|
|
@@ -262,7 +262,7 @@ var g = function(e) {
|
|
|
262
262
|
return r.unobserve(t, i.target);
|
|
263
263
|
}), n.activeTargets.splice(0, n.activeTargets.length);
|
|
264
264
|
}, e;
|
|
265
|
-
}(),
|
|
265
|
+
}(), Ge = function() {
|
|
266
266
|
function e(t) {
|
|
267
267
|
if (arguments.length === 0)
|
|
268
268
|
throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");
|
|
@@ -288,15 +288,15 @@ var g = function(e) {
|
|
|
288
288
|
return "function ResizeObserver () { [polyfill code] }";
|
|
289
289
|
}, e;
|
|
290
290
|
}();
|
|
291
|
-
const
|
|
292
|
-
root:
|
|
293
|
-
list:
|
|
294
|
-
"start-gradient": "_start-
|
|
295
|
-
"end-gradient": "_end-
|
|
296
|
-
"item-wrapper": "_item-
|
|
297
|
-
"item-content": "_item-
|
|
298
|
-
"item-separator": "_item-
|
|
299
|
-
}, L = ne(ue),
|
|
291
|
+
const Fe = (e, t, r) => Math.min(Math.max(e, t), r), He = "_root_ce14e_2", Ve = "_list_ce14e_14", ue = {
|
|
292
|
+
root: He,
|
|
293
|
+
list: Ve,
|
|
294
|
+
"start-gradient": "_start-gradient_ce14e_24",
|
|
295
|
+
"end-gradient": "_end-gradient_ce14e_28",
|
|
296
|
+
"item-wrapper": "_item-wrapper_ce14e_39",
|
|
297
|
+
"item-content": "_item-content_ce14e_44",
|
|
298
|
+
"item-separator": "_item-separator_ce14e_58"
|
|
299
|
+
}, L = ne(ue), Xe = re(
|
|
300
300
|
({ children: e, "data-testid": t, isActive: r, separator: n, ...i }, o) => {
|
|
301
301
|
const s = i.href || i.to;
|
|
302
302
|
return /* @__PURE__ */ te("li", { "aria-label": "breadcrumb", className: L("item-wrapper"), "data-testid": t, children: [
|
|
@@ -314,7 +314,7 @@ const Ge = (e, t, r) => Math.min(Math.max(e, t), r), Fe = "_root_9vqpr_2", He =
|
|
|
314
314
|
)
|
|
315
315
|
] });
|
|
316
316
|
}
|
|
317
|
-
), k = ne(ue),
|
|
317
|
+
), k = ne(ue), qe = re(
|
|
318
318
|
({ children: e, lastChildNotClickable: t = !0, separator: r = /* @__PURE__ */ R(me, { size: "xs" }), ...n }, i) => {
|
|
319
319
|
const o = pe.toArray(e).filter(Boolean), s = o.length, l = o.map((w, a) => {
|
|
320
320
|
const u = s === 1 || s === a + 1;
|
|
@@ -331,18 +331,18 @@ const Ge = (e, t, r) => Math.min(Math.max(e, t), r), Fe = "_root_9vqpr_2", He =
|
|
|
331
331
|
c
|
|
332
332
|
] });
|
|
333
333
|
}
|
|
334
|
-
), Ze = Object.assign(
|
|
335
|
-
Item:
|
|
334
|
+
), Ze = Object.assign(qe, {
|
|
335
|
+
Item: Xe
|
|
336
336
|
}), $e = () => {
|
|
337
|
-
const e = M(null), t = M(), r = M(), [n, i] =
|
|
337
|
+
const e = M(null), t = M(), r = M(), [n, i] = V(!1), [o, s] = V(0), l = (a, u) => {
|
|
338
338
|
a && (a.style.transform = `scale3d(${u}, 1, 1)`);
|
|
339
|
-
}, c =
|
|
339
|
+
}, c = X((a) => {
|
|
340
340
|
const u = 1 - a;
|
|
341
341
|
l(t.current, u), l(r.current, a);
|
|
342
|
-
}, []), v =
|
|
342
|
+
}, []), v = X(() => {
|
|
343
343
|
const {
|
|
344
344
|
current: { offsetWidth: a, scrollLeft: u, scrollWidth: m }
|
|
345
|
-
} = e, p = m - a, O =
|
|
345
|
+
} = e, p = m - a, O = Fe(Math.abs(u - o), 0, p) / p;
|
|
346
346
|
c(O);
|
|
347
347
|
}, [o, c]), h = ge(
|
|
348
348
|
() => xe(
|
|
@@ -362,10 +362,10 @@ const Ge = (e, t, r) => Math.min(Math.max(e, t), r), Fe = "_root_9vqpr_2", He =
|
|
|
362
362
|
),
|
|
363
363
|
[o]
|
|
364
364
|
);
|
|
365
|
-
|
|
366
|
-
const a = new
|
|
365
|
+
q(() => {
|
|
366
|
+
const a = new Ge(h);
|
|
367
367
|
return a.observe(e.current), () => a.disconnect();
|
|
368
|
-
}, []),
|
|
368
|
+
}, []), q(() => {
|
|
369
369
|
t.current && r.current && c(0);
|
|
370
370
|
}, [n, c]);
|
|
371
371
|
const f = n ? /* @__PURE__ */ R(
|
|
@@ -385,5 +385,5 @@ const Ge = (e, t, r) => Math.min(Math.max(e, t), r), Fe = "_root_9vqpr_2", He =
|
|
|
385
385
|
};
|
|
386
386
|
export {
|
|
387
387
|
Ze as Breadcrumb,
|
|
388
|
-
|
|
388
|
+
qe as BreadcrumbComponent
|
|
389
389
|
};
|
package/dist/Button.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as l, jsx as a, Fragment as g } from "react/jsx-runtime";
|
|
3
|
-
import { B as f } from "./
|
|
3
|
+
import { B as f } from "./XCKGTAUF-DkxWCbaW.js";
|
|
4
4
|
import { useButtonGroup as z } from "./ButtonGroup.js";
|
|
5
5
|
import { Loader as b } from "./Loader.js";
|
|
6
|
-
import { c as x } from "./index-
|
|
6
|
+
import { c as x } from "./index-CdiHdiVB.js";
|
|
7
7
|
import { f as B } from "./forwardRefWithAs-8eP3ZN15.js";
|
|
8
8
|
import "react";
|
|
9
9
|
const N = "_root_1q8jk_2", $ = "_shape_1q8jk_74", D = "_loader_1q8jk_235", S = {
|
package/dist/ButtonGroup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import { createContext as f, useMemo as i, useContext as l } from "react";
|
|
4
|
-
import { c as x } from "./index-
|
|
4
|
+
import { c as x } from "./index-CdiHdiVB.js";
|
|
5
5
|
import { f as G } from "./forwardRefWithAs-8eP3ZN15.js";
|
|
6
6
|
const d = "_root_kot0y_2", y = {
|
|
7
7
|
root: d
|
package/dist/Card.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as c } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef as n } from "react";
|
|
4
|
-
import { c as d } from "./index-
|
|
4
|
+
import { c as d } from "./index-CdiHdiVB.js";
|
|
5
5
|
const a = "_root_10ds1_2", m = "_body_10ds1_13", e = {
|
|
6
6
|
root: a,
|
|
7
7
|
body: m
|