@adam-milo/ui 1.0.16 → 1.0.18
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/index.cjs +1 -1
- package/dist/index.js +45 -41
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +59 -82
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +107 -30
- package/dist/index12.cjs +1 -1
- package/dist/index12.js +84 -107
- package/dist/index13.cjs +1 -1
- package/dist/index13.js +32 -33
- package/dist/index14.cjs +1 -1
- package/dist/index14.js +113 -9
- package/dist/index15.cjs +1 -0
- package/dist/index15.js +43 -0
- package/dist/index16.cjs +1 -0
- package/dist/index16.js +11 -0
- package/dist/index2.cjs +1 -1
- package/dist/index2.js +1 -1
- package/dist/index3.cjs +1 -1
- package/dist/index3.js +1 -1
- package/dist/index4.cjs +1 -1
- package/dist/index4.js +1 -1
- package/dist/index5.cjs +1 -1
- package/dist/index5.js +1 -1
- package/dist/index6.cjs +1 -1
- package/dist/index6.js +1 -1
- package/dist/index7.cjs +1 -1
- package/dist/index7.js +88 -52
- package/dist/index8.cjs +1 -1
- package/dist/index8.js +69 -49
- package/dist/index9.cjs +1 -1
- package/dist/index9.js +42 -100
- package/dist/src/components/forms/checkbox/Checkbox.component.d.ts +102 -0
- package/dist/src/components/forms/checkbox/Checkbox.component.d.ts.map +1 -0
- package/dist/src/components/forms/radio/Radio.component.d.ts +100 -0
- package/dist/src/components/forms/radio/Radio.component.d.ts.map +1 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index12.js
CHANGED
|
@@ -1,115 +1,92 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import
|
|
4
|
-
import { cn as r } from "./index14.js";
|
|
1
|
+
import { jsx as a, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as f } from "react";
|
|
3
|
+
import { cn as y } from "./index16.js";
|
|
5
4
|
/* empty css */
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const D = c(({ className: t, children: i, "data-cy": o, "data-testid": e, ...d }, l) => {
|
|
21
|
-
const s = o || "dialog-content", y = e || "dialog-content";
|
|
22
|
-
return /* @__PURE__ */ m(p, { children: [
|
|
23
|
-
/* @__PURE__ */ n(g, {}),
|
|
24
|
-
/* @__PURE__ */ n(
|
|
25
|
-
a.Content,
|
|
5
|
+
const n = f(
|
|
6
|
+
({
|
|
7
|
+
columns: s,
|
|
8
|
+
data: i,
|
|
9
|
+
striped: c = !1,
|
|
10
|
+
hoverable: b = !1,
|
|
11
|
+
className: h,
|
|
12
|
+
"data-cy": $,
|
|
13
|
+
"data-testid": p,
|
|
14
|
+
...o
|
|
15
|
+
}, _) => {
|
|
16
|
+
const t = $ || "datatable", e = p || "datatable";
|
|
17
|
+
return /* @__PURE__ */ a(
|
|
18
|
+
"div",
|
|
26
19
|
{
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"data-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
20
|
+
className: "datatable-wrapper",
|
|
21
|
+
"data-cy": `${t}-wrapper`,
|
|
22
|
+
"data-testid": `${e}-wrapper`,
|
|
23
|
+
children: /* @__PURE__ */ m(
|
|
24
|
+
"table",
|
|
25
|
+
{
|
|
26
|
+
ref: _,
|
|
27
|
+
className: y("datatable", h),
|
|
28
|
+
"data-cy": t,
|
|
29
|
+
"data-testid": e,
|
|
30
|
+
...o,
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ a(
|
|
33
|
+
"thead",
|
|
34
|
+
{
|
|
35
|
+
className: "datatable__head",
|
|
36
|
+
"data-cy": `${t}-head`,
|
|
37
|
+
"data-testid": `${e}-head`,
|
|
38
|
+
children: /* @__PURE__ */ a("tr", { children: s.map((d) => /* @__PURE__ */ a(
|
|
39
|
+
"th",
|
|
40
|
+
{
|
|
41
|
+
className: "datatable__header-cell",
|
|
42
|
+
"data-cy": `${t}-header-${d.key}`,
|
|
43
|
+
"data-testid": `${e}-header-${d.key}`,
|
|
44
|
+
children: d.header
|
|
45
|
+
},
|
|
46
|
+
d.key
|
|
47
|
+
)) })
|
|
48
|
+
}
|
|
49
|
+
),
|
|
50
|
+
/* @__PURE__ */ a("tbody", { "data-cy": `${t}-body`, "data-testid": `${e}-body`, children: i.length === 0 ? /* @__PURE__ */ a("tr", { children: /* @__PURE__ */ a(
|
|
51
|
+
"td",
|
|
52
|
+
{
|
|
53
|
+
colSpan: s.length,
|
|
54
|
+
className: "datatable__empty",
|
|
55
|
+
"data-cy": `${t}-empty`,
|
|
56
|
+
"data-testid": `${e}-empty`,
|
|
57
|
+
children: "No data available"
|
|
58
|
+
}
|
|
59
|
+
) }) : i.map((d, l) => /* @__PURE__ */ a(
|
|
60
|
+
"tr",
|
|
61
|
+
{
|
|
62
|
+
className: y(
|
|
63
|
+
"datatable__body-row",
|
|
64
|
+
b && "datatable__body-row--hoverable",
|
|
65
|
+
c && "datatable__body-row--striped"
|
|
66
|
+
),
|
|
67
|
+
"data-cy": `${t}-row-${l}`,
|
|
68
|
+
"data-testid": `${e}-row-${l}`,
|
|
69
|
+
children: s.map((r) => /* @__PURE__ */ a(
|
|
70
|
+
"td",
|
|
71
|
+
{
|
|
72
|
+
className: "datatable__body-cell",
|
|
73
|
+
"data-cy": `${t}-cell-${l}-${r.key}`,
|
|
74
|
+
"data-testid": `${e}-cell-${l}-${r.key}`,
|
|
75
|
+
children: String(d[r.key] ?? "")
|
|
76
|
+
},
|
|
77
|
+
r.key
|
|
78
|
+
))
|
|
79
|
+
},
|
|
80
|
+
l
|
|
81
|
+
)) })
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
85
|
}
|
|
86
86
|
);
|
|
87
87
|
}
|
|
88
88
|
);
|
|
89
|
-
|
|
90
|
-
const T = c(({ className: t, "data-cy": i, "data-testid": o, ...e }, d) => {
|
|
91
|
-
const l = i || "dialog-description", s = o || "dialog-description";
|
|
92
|
-
return /* @__PURE__ */ n(
|
|
93
|
-
a.Description,
|
|
94
|
-
{
|
|
95
|
-
ref: d,
|
|
96
|
-
className: r("dialog-description", t),
|
|
97
|
-
"data-cy": l,
|
|
98
|
-
"data-testid": s,
|
|
99
|
-
...e
|
|
100
|
-
}
|
|
101
|
-
);
|
|
102
|
-
});
|
|
103
|
-
T.displayName = a.Description.displayName;
|
|
89
|
+
n.displayName = "DataTable";
|
|
104
90
|
export {
|
|
105
|
-
|
|
106
|
-
P as DialogClose,
|
|
107
|
-
D as DialogContent,
|
|
108
|
-
T as DialogDescription,
|
|
109
|
-
N as DialogFooter,
|
|
110
|
-
f as DialogHeader,
|
|
111
|
-
g as DialogOverlay,
|
|
112
|
-
p as DialogPortal,
|
|
113
|
-
C as DialogTitle,
|
|
114
|
-
O as DialogTrigger
|
|
91
|
+
n as DataTable
|
|
115
92
|
};
|
package/dist/index13.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),h=require("react"),u=require("./index16.cjs");;/* empty css */const c=h.forwardRef(({variant:e="primary",selected:i=!1,disabled:s=!1,className:r,children:a,"data-testid":d,"data-cy":p,...l},o)=>{const n=u.cn("chip",`chip--${e}`,i&&"chip--selected",s&&"chip--disabled",r);return t.jsx("div",{ref:o,className:n,"data-testid":d||`chip-${e}`,"data-cy":p||`chip-${e}`,"aria-selected":i,"aria-disabled":s,"aria-label":typeof a=="string"?a:void 0,...l,children:t.jsx("span",{className:"chip__label",children:a})})});c.displayName="Chip";exports.Chip=c;
|
package/dist/index13.js
CHANGED
|
@@ -1,43 +1,42 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { cn as
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as m } from "react";
|
|
3
|
+
import { cn as f } from "./index16.js";
|
|
4
4
|
/* empty css */
|
|
5
|
-
const
|
|
5
|
+
const h = m(
|
|
6
6
|
({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
7
|
+
variant: a = "primary",
|
|
8
|
+
selected: s = !1,
|
|
9
|
+
disabled: p = !1,
|
|
10
|
+
className: t,
|
|
11
|
+
children: i,
|
|
12
|
+
"data-testid": c,
|
|
13
|
+
"data-cy": r,
|
|
14
|
+
...o
|
|
15
|
+
}, d) => {
|
|
16
|
+
const l = f(
|
|
17
|
+
"chip",
|
|
18
|
+
`chip--${a}`,
|
|
19
|
+
s && "chip--selected",
|
|
20
|
+
p && "chip--disabled",
|
|
21
|
+
t
|
|
22
|
+
);
|
|
23
|
+
return /* @__PURE__ */ e(
|
|
20
24
|
"div",
|
|
21
25
|
{
|
|
22
|
-
ref:
|
|
23
|
-
className:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
),
|
|
32
|
-
"data-cy": d,
|
|
33
|
-
"data-testid": p,
|
|
34
|
-
...f,
|
|
35
|
-
children: k
|
|
26
|
+
ref: d,
|
|
27
|
+
className: l,
|
|
28
|
+
"data-testid": c || `chip-${a}`,
|
|
29
|
+
"data-cy": r || `chip-${a}`,
|
|
30
|
+
"aria-selected": s,
|
|
31
|
+
"aria-disabled": p,
|
|
32
|
+
"aria-label": typeof i == "string" ? i : void 0,
|
|
33
|
+
...o,
|
|
34
|
+
children: /* @__PURE__ */ e("span", { className: "chip__label", children: i })
|
|
36
35
|
}
|
|
37
36
|
);
|
|
38
37
|
}
|
|
39
38
|
);
|
|
40
|
-
|
|
39
|
+
h.displayName = "Chip";
|
|
41
40
|
export {
|
|
42
|
-
|
|
41
|
+
h as Chip
|
|
43
42
|
};
|
package/dist/index14.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function t(
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),c=require("react"),T=require("@radix-ui/react-dialog"),r=require("./index16.cjs");;/* empty css */function j(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:()=>a[t]})}}return e.default=a,Object.freeze(e)}const o=j(T),v=o.Root,C=o.Trigger,y=o.Portal,x=o.Close,g=c.forwardRef(({className:a,"data-cy":e,"data-testid":t,...i},l)=>{const s=e||"dialog-overlay",n=t||"dialog-overlay";return d.jsx(o.Overlay,{ref:l,className:r.cn("dialog-overlay",a),"data-cy":s,"data-testid":n,...i})});g.displayName=o.Overlay.displayName;const D=c.forwardRef(({className:a,children:e,"data-cy":t,"data-testid":i,...l},s)=>{const n=t||"dialog-content",N=i||"dialog-content";return d.jsxs(y,{children:[d.jsx(g,{}),d.jsx(o.Content,{ref:s,className:r.cn("dialog-content",a),"data-cy":n,"data-testid":N,...l,children:e})]})});D.displayName=o.Content.displayName;const f=({className:a,"data-cy":e,"data-testid":t,...i})=>{const l=e||"dialog-header",s=t||"dialog-header";return d.jsx("div",{className:r.cn("dialog-header",a),"data-cy":l,"data-testid":s,...i})};f.displayName="DialogHeader";const u=({className:a,"data-cy":e,"data-testid":t,...i})=>{const l=e||"dialog-footer",s=t||"dialog-footer";return d.jsx("div",{className:r.cn("dialog-footer",a),"data-cy":l,"data-testid":s,...i})};u.displayName="DialogFooter";const m=c.forwardRef(({className:a,"data-cy":e,"data-testid":t,...i},l)=>{const s=e||"dialog-title",n=t||"dialog-title";return d.jsx(o.Title,{ref:l,className:r.cn("dialog-title",a),"data-cy":s,"data-testid":n,...i})});m.displayName=o.Title.displayName;const p=c.forwardRef(({className:a,"data-cy":e,"data-testid":t,...i},l)=>{const s=e||"dialog-description",n=t||"dialog-description";return d.jsx(o.Description,{ref:l,className:r.cn("dialog-description",a),"data-cy":s,"data-testid":n,...i})});p.displayName=o.Description.displayName;exports.Dialog=v;exports.DialogClose=x;exports.DialogContent=D;exports.DialogDescription=p;exports.DialogFooter=u;exports.DialogHeader=f;exports.DialogOverlay=g;exports.DialogPortal=y;exports.DialogTitle=m;exports.DialogTrigger=C;
|
package/dist/index14.js
CHANGED
|
@@ -1,11 +1,115 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { jsxs as m, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as c } from "react";
|
|
3
|
+
import * as a from "@radix-ui/react-dialog";
|
|
4
|
+
import { cn as r } from "./index16.js";
|
|
5
|
+
/* empty css */
|
|
6
|
+
const x = a.Root, O = a.Trigger, p = a.Portal, P = a.Close, g = c(({ className: t, "data-cy": i, "data-testid": o, ...e }, d) => {
|
|
7
|
+
const l = i || "dialog-overlay", s = o || "dialog-overlay";
|
|
8
|
+
return /* @__PURE__ */ n(
|
|
9
|
+
a.Overlay,
|
|
10
|
+
{
|
|
11
|
+
ref: d,
|
|
12
|
+
className: r("dialog-overlay", t),
|
|
13
|
+
"data-cy": l,
|
|
14
|
+
"data-testid": s,
|
|
15
|
+
...e
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
});
|
|
19
|
+
g.displayName = a.Overlay.displayName;
|
|
20
|
+
const D = c(({ className: t, children: i, "data-cy": o, "data-testid": e, ...d }, l) => {
|
|
21
|
+
const s = o || "dialog-content", y = e || "dialog-content";
|
|
22
|
+
return /* @__PURE__ */ m(p, { children: [
|
|
23
|
+
/* @__PURE__ */ n(g, {}),
|
|
24
|
+
/* @__PURE__ */ n(
|
|
25
|
+
a.Content,
|
|
26
|
+
{
|
|
27
|
+
ref: l,
|
|
28
|
+
className: r("dialog-content", t),
|
|
29
|
+
"data-cy": s,
|
|
30
|
+
"data-testid": y,
|
|
31
|
+
...d,
|
|
32
|
+
children: i
|
|
33
|
+
}
|
|
34
|
+
)
|
|
35
|
+
] });
|
|
36
|
+
});
|
|
37
|
+
D.displayName = a.Content.displayName;
|
|
38
|
+
const f = ({
|
|
39
|
+
className: t,
|
|
40
|
+
"data-cy": i,
|
|
41
|
+
"data-testid": o,
|
|
42
|
+
...e
|
|
43
|
+
}) => {
|
|
44
|
+
const d = i || "dialog-header", l = o || "dialog-header";
|
|
45
|
+
return /* @__PURE__ */ n(
|
|
46
|
+
"div",
|
|
47
|
+
{
|
|
48
|
+
className: r("dialog-header", t),
|
|
49
|
+
"data-cy": d,
|
|
50
|
+
"data-testid": l,
|
|
51
|
+
...e
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
};
|
|
55
|
+
f.displayName = "DialogHeader";
|
|
56
|
+
const N = ({
|
|
57
|
+
className: t,
|
|
58
|
+
"data-cy": i,
|
|
59
|
+
"data-testid": o,
|
|
60
|
+
...e
|
|
61
|
+
}) => {
|
|
62
|
+
const d = i || "dialog-footer", l = o || "dialog-footer";
|
|
63
|
+
return /* @__PURE__ */ n(
|
|
64
|
+
"div",
|
|
65
|
+
{
|
|
66
|
+
className: r("dialog-footer", t),
|
|
67
|
+
"data-cy": d,
|
|
68
|
+
"data-testid": l,
|
|
69
|
+
...e
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
};
|
|
73
|
+
N.displayName = "DialogFooter";
|
|
74
|
+
const C = c(
|
|
75
|
+
({ className: t, "data-cy": i, "data-testid": o, ...e }, d) => {
|
|
76
|
+
const l = i || "dialog-title", s = o || "dialog-title";
|
|
77
|
+
return /* @__PURE__ */ n(
|
|
78
|
+
a.Title,
|
|
79
|
+
{
|
|
80
|
+
ref: d,
|
|
81
|
+
className: r("dialog-title", t),
|
|
82
|
+
"data-cy": l,
|
|
83
|
+
"data-testid": s,
|
|
84
|
+
...e
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
C.displayName = a.Title.displayName;
|
|
90
|
+
const T = c(({ className: t, "data-cy": i, "data-testid": o, ...e }, d) => {
|
|
91
|
+
const l = i || "dialog-description", s = o || "dialog-description";
|
|
92
|
+
return /* @__PURE__ */ n(
|
|
93
|
+
a.Description,
|
|
94
|
+
{
|
|
95
|
+
ref: d,
|
|
96
|
+
className: r("dialog-description", t),
|
|
97
|
+
"data-cy": l,
|
|
98
|
+
"data-testid": s,
|
|
99
|
+
...e
|
|
100
|
+
}
|
|
101
|
+
);
|
|
102
|
+
});
|
|
103
|
+
T.displayName = a.Description.displayName;
|
|
8
104
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
105
|
+
x as Dialog,
|
|
106
|
+
P as DialogClose,
|
|
107
|
+
D as DialogContent,
|
|
108
|
+
T as DialogDescription,
|
|
109
|
+
N as DialogFooter,
|
|
110
|
+
f as DialogHeader,
|
|
111
|
+
g as DialogOverlay,
|
|
112
|
+
p as DialogPortal,
|
|
113
|
+
C as DialogTitle,
|
|
114
|
+
O as DialogTrigger
|
|
11
115
|
};
|
package/dist/index15.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react/jsx-runtime"),$=require("react"),S=require("./index16.cjs");;/* empty css */const a=$.forwardRef(({direction:t="vertical",spacing:s="4",align:e="stretch",justify:c="start",wrap:r=!1,className:i,children:n,"data-cy":d,"data-testid":k,...l},u)=>{const o=d||`stack-${t}`,f=k||`stack-${t}`;return y.jsx("div",{ref:u,className:S.cn("stack",`stack--${t}`,`stack--spacing-${s}`,`stack--align-${e}`,`stack--justify-${c}`,r&&"stack--wrap",i),"data-cy":o,"data-testid":f,...l,children:n})});a.displayName="Stack";exports.Stack=a;
|
package/dist/index15.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as n } from "react";
|
|
3
|
+
import { cn as $ } from "./index16.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
const y = n(
|
|
6
|
+
({
|
|
7
|
+
direction: a = "vertical",
|
|
8
|
+
spacing: t = "4",
|
|
9
|
+
align: s = "stretch",
|
|
10
|
+
justify: c = "start",
|
|
11
|
+
wrap: r = !1,
|
|
12
|
+
className: i,
|
|
13
|
+
children: k,
|
|
14
|
+
"data-cy": o,
|
|
15
|
+
"data-testid": e,
|
|
16
|
+
...f
|
|
17
|
+
}, m) => {
|
|
18
|
+
const d = o || `stack-${a}`, p = e || `stack-${a}`;
|
|
19
|
+
return /* @__PURE__ */ l(
|
|
20
|
+
"div",
|
|
21
|
+
{
|
|
22
|
+
ref: m,
|
|
23
|
+
className: $(
|
|
24
|
+
"stack",
|
|
25
|
+
`stack--${a}`,
|
|
26
|
+
`stack--spacing-${t}`,
|
|
27
|
+
`stack--align-${s}`,
|
|
28
|
+
`stack--justify-${c}`,
|
|
29
|
+
r && "stack--wrap",
|
|
30
|
+
i
|
|
31
|
+
),
|
|
32
|
+
"data-cy": d,
|
|
33
|
+
"data-testid": p,
|
|
34
|
+
...f,
|
|
35
|
+
children: k
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
y.displayName = "Stack";
|
|
41
|
+
export {
|
|
42
|
+
y as Stack
|
|
43
|
+
};
|
package/dist/index16.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function t(...e){return e.filter(Boolean).join(" ")}let n=0;function r(e="id"){return n+=1,`${e}-${n}`}exports.cn=t;exports.generateId=r;
|
package/dist/index16.js
ADDED
package/dist/index2.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),m=require("react"),y=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),m=require("react"),y=require("./index16.cjs");;/* empty css */const n=m.forwardRef(({variant:t="primary-workspace",fullWidth:r=!1,icon:e,className:a,children:c,disabled:o,"data-testid":u,"data-cy":d,...i},l)=>{const b=y.cn("btn",`btn--${t}`,r&&"btn--full-width",a);return s.jsxs("button",{ref:l,disabled:o,className:b,"data-testid":u||`button-${t}`,"data-cy":d||`button-${t}`,...i,children:[e&&s.jsx("span",{className:"btn__icon",children:e}),c]})});n.displayName="Button";exports.Button=n;
|
package/dist/index2.js
CHANGED
package/dist/index3.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),n=require("react"),j=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),n=require("react"),j=require("./index16.cjs");;/* empty css */const L=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,w=n.forwardRef(({validateEmail:m=!0,invalidEmailMessage:y="Not a valid email address",onValidationChange:r,error:N,onChange:p,label:f,helperText:o,fullWidth:$=!1,className:_,id:x,"data-cy":q,"data-testid":S,...i},B)=>{const[R,I]=n.useState(),[h,F]=n.useState(!1),A=n.useId(),l=x||A,v=`${l}-error`,E=`${l}-helper`,s=q||"email-input",a=S||"email-input",b=t=>t?L.test(t):!0,D=t=>{const u=t.target.value;if(m&&h){const d=b(u);I(d?void 0:y),r==null||r(d)}p==null||p(t)},G=t=>{var u;if(F(!0),m){const d=b(t.target.value);I(d?void 0:y),r==null||r(d)}(u=i.onBlur)==null||u.call(i,t)},e=N||R;return c.jsxs("div",{className:j.cn("input-wrapper",$&&"input-wrapper--full-width"),"data-cy":`${s}-wrapper`,"data-testid":`${a}-wrapper`,children:[f&&c.jsx("label",{htmlFor:l,className:"input__label","data-cy":`${s}-label`,"data-testid":`${a}-label`,children:f}),c.jsx("input",{ref:B,id:l,type:"email",className:j.cn("input",e&&"input--error",$&&"input--full-width",_),"aria-invalid":e?"true":"false","aria-describedby":e?v:o?E:void 0,"data-cy":s,"data-testid":a,onChange:D,onBlur:G,...i}),e&&c.jsx("span",{id:v,className:"input__error",role:"alert","data-cy":`${s}-error`,"data-testid":`${a}-error`,children:e}),o&&!e&&c.jsx("span",{id:E,className:"input__helper","data-cy":`${s}-helper`,"data-testid":`${a}-helper`,children:o})]})});w.displayName="EmailInput";exports.EmailInput=w;
|
package/dist/index3.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as S, jsx as u } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as X, useState as E, useId as k } from "react";
|
|
3
|
-
import { cn as N } from "./
|
|
3
|
+
import { cn as N } from "./index16.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
const q = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, z = X(
|
|
6
6
|
({
|
package/dist/index4.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),d=require("react"),u=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),d=require("react"),u=require("./index16.cjs");;/* empty css */const w=d.forwardRef(({showToggle:h=!0,label:o,error:e,helperText:i,fullWidth:l=!1,className:x,id:g,"data-cy":j,"data-testid":y,...k},f)=>{const[n,b]=d.useState(!1),m=d.useId(),a=g||m,c=`${a}-error`,p=`${a}-helper`,s=j||"password-input",r=y||"password-input",$=()=>{b(v=>!v)};return t.jsxs("div",{className:"password-input-wrapper",children:[t.jsxs("div",{className:u.cn("input-wrapper",l&&"input-wrapper--full-width"),"data-cy":`${s}-wrapper`,"data-testid":`${r}-wrapper`,children:[o&&t.jsx("label",{htmlFor:a,className:"input__label","data-cy":`${s}-label`,"data-testid":`${r}-label`,children:o}),t.jsx("input",{ref:f,id:a,type:n?"text":"password",className:u.cn("input","password-input",e&&"input--error",l&&"input--full-width",x),"aria-invalid":e?"true":"false","aria-describedby":e?c:i?p:void 0,"data-cy":s,"data-testid":r,...k}),e&&t.jsx("span",{id:c,className:"input__error",role:"alert","data-cy":`${s}-error`,"data-testid":`${r}-error`,children:e}),i&&!e&&t.jsx("span",{id:p,className:"input__helper","data-cy":`${s}-helper`,"data-testid":`${r}-helper`,children:i})]}),h&&t.jsx("button",{type:"button",className:"password-input__toggle",onClick:$,"aria-label":n?"Hide password":"Show password","data-cy":`${s}-toggle`,"data-testid":`${r}-toggle`,children:n?t.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[t.jsx("path",{d:"M10 4C5.5 4 2 10 2 10s3.5 6 8 6 8-6 8-6-3.5-6-8-6z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"}),t.jsx("circle",{cx:"10",cy:"10",r:"2.5",stroke:"currentColor",strokeWidth:"1.5",fill:"none"})]}):t.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[t.jsx("path",{d:"M10 4C5.5 4 2 10 2 10s3.5 6 8 6 8-6 8-6-3.5-6-8-6z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"}),t.jsx("circle",{cx:"10",cy:"10",r:"2.5",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}),t.jsx("path",{d:"M3 3l14 14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})})]})});w.displayName="PasswordInput";exports.PasswordInput=w;
|
package/dist/index4.js
CHANGED
package/dist/index5.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),p=require("react"),T=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),p=require("react"),T=require("./index16.cjs");;/* empty css */const h=p.forwardRef(({allowDecimal:b=!1,allowNegative:N=!1,min:n,max:m,decimalPlaces:q=2,invalidNumberMessage:B="Please enter a valid number",minValueMessage:R,maxValueMessage:A,onValidationChange:s,error:P,onChange:v,onKeyDown:t,label:I,helperText:$,fullWidth:j=!1,className:F,id:M,"data-cy":g,"data-testid":H,...d},L)=>{const[O,x]=p.useState(),[V,z]=p.useState(!1),G=p.useId(),f=M||G,E=`${f}-error`,S=`${f}-helper`,i=g||"numeric-input",l=H||"numeric-input",k=r=>{if(!r)return{isValid:!0};const a=N?"-?":"",e=b?`(\\.\\d{0,${q}})?`:"";if(!new RegExp(`^${a}\\d+${e}$`).test(r))return{isValid:!1,error:B};const _=parseFloat(r);return n!==void 0&&_<n?{isValid:!1,error:R||`Value must be at least ${n}`}:m!==void 0&&_>m?{isValid:!1,error:A||`Value must be at most ${m}`}:{isValid:!0}},J=r=>{const a=["Backspace","Delete","Tab","Escape","Enter","ArrowLeft","ArrowRight","Home","End"];if(r.ctrlKey||r.metaKey){t==null||t(r);return}if(a.includes(r.key)){t==null||t(r);return}if(b&&r.key==="."){if(r.currentTarget.value.includes(".")){r.preventDefault();return}t==null||t(r);return}if(N&&r.key==="-"){const e=r.currentTarget.value;if((r.currentTarget.selectionStart||0)!==0||e.includes("-")){r.preventDefault();return}t==null||t(r);return}if(r.key>="0"&&r.key<="9"){t==null||t(r);return}r.preventDefault()},Q=r=>{const a=r.target.value;if(V){const e=k(a);x(e.error),s==null||s(e.isValid)}v==null||v(r)},U=r=>{var e;z(!0);const a=k(r.target.value);x(a.error),s==null||s(a.isValid),(e=d.onBlur)==null||e.call(d,r)},u=P||O;return c.jsxs("div",{className:T.cn("input-wrapper",j&&"input-wrapper--full-width"),"data-cy":`${i}-wrapper`,"data-testid":`${l}-wrapper`,children:[I&&c.jsx("label",{htmlFor:f,className:"input__label","data-cy":`${i}-label`,"data-testid":`${l}-label`,children:I}),c.jsx("input",{ref:L,id:f,type:"text",inputMode:"numeric",className:T.cn("input",u&&"input--error",j&&"input--full-width",F),"aria-invalid":u?"true":"false","aria-describedby":u?E:$?S:void 0,"data-cy":i,"data-testid":l,onChange:Q,onBlur:U,onKeyDown:J,...d}),u&&c.jsx("span",{id:E,className:"input__error",role:"alert","data-cy":`${i}-error`,"data-testid":`${l}-error`,children:u}),$&&!u&&c.jsx("span",{id:S,className:"input__helper","data-cy":`${i}-helper`,"data-testid":`${l}-helper`,children:$})]})});h.displayName="NumericInput";exports.NumericInput=h;
|
package/dist/index5.js
CHANGED
package/dist/index6.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),h=require("react"),R=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),h=require("react"),R=require("./index16.cjs");;/* empty css */const M=h.forwardRef(({allowHyphen:c=!1,allowUnderscore:f=!1,allowSpace:p=!1,minLength:v,maxLength:m,invalidFormatMessage:O="Only letters and numbers are allowed",minLengthMessage:z,maxLengthMessage:F,onValidationChange:s,error:T,onChange:I,onKeyDown:t,label:_,helperText:j,fullWidth:A=!1,className:Z,id:P,"data-cy":S,"data-testid":G,...$},J)=>{const[Q,E]=h.useState(),[X,Y]=h.useState(!1),W=h.useId(),b=P||W,x=`${b}-error`,N=`${b}-helper`,u=S||"alphanumeric-input",d=G||"alphanumeric-input",q=r=>{if(!r)return{isValid:!0};let e="^[a-zA-Z0-9";if(c&&(e+="\\-"),f&&(e+="_"),p&&(e+=" "),e+="]+$",!new RegExp(e).test(r)){let B=O;if(c||f||p){const k=["letters","numbers"];c&&k.push("hyphens"),f&&k.push("underscores"),p&&k.push("spaces"),B=`Only ${k.join(", ")} are allowed`}return{isValid:!1,error:B}}return v!==void 0&&r.length<v?{isValid:!1,error:z||`Must be at least ${v} characters`}:m!==void 0&&r.length>m?{isValid:!1,error:F||`Must be at most ${m} characters`}:{isValid:!0}},H=r=>{const e=["Backspace","Delete","Tab","Escape","Enter","ArrowLeft","ArrowRight","Home","End"];if(r.ctrlKey||r.metaKey){t==null||t(r);return}if(e.includes(r.key)){t==null||t(r);return}if(p&&r.key===" "){t==null||t(r);return}if(c&&r.key==="-"){t==null||t(r);return}if(f&&r.key==="_"){t==null||t(r);return}if(r.key>="a"&&r.key<="z"||r.key>="A"&&r.key<="Z"){t==null||t(r);return}if(r.key>="0"&&r.key<="9"){t==null||t(r);return}r.preventDefault()},V=r=>{const e=r.target.value;if(X){const i=q(e);E(i.error),s==null||s(i.isValid)}I==null||I(r)},U=r=>{var i;Y(!0);const e=q(r.target.value);E(e.error),s==null||s(e.isValid),(i=$.onBlur)==null||i.call($,r)},a=T||Q;return l.jsxs("div",{className:R.cn("input-wrapper",A&&"input-wrapper--full-width"),"data-cy":`${u}-wrapper`,"data-testid":`${d}-wrapper`,children:[_&&l.jsx("label",{htmlFor:b,className:"input__label","data-cy":`${u}-label`,"data-testid":`${d}-label`,children:_}),l.jsx("input",{ref:J,id:b,type:"text",className:R.cn("input",a&&"input--error",A&&"input--full-width",Z),"aria-invalid":a?"true":"false","aria-describedby":a?x:j?N:void 0,"data-cy":u,"data-testid":d,onChange:V,onBlur:U,onKeyDown:H,maxLength:m,...$}),a&&l.jsx("span",{id:x,className:"input__error",role:"alert","data-cy":`${u}-error`,"data-testid":`${d}-error`,children:a}),j&&!a&&l.jsx("span",{id:N,className:"input__helper","data-cy":`${u}-helper`,"data-testid":`${d}-helper`,children:j})]})});M.displayName="AlphanumericInput";exports.AlphanumericInput=M;
|
package/dist/index6.js
CHANGED
package/dist/index7.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),i=require("react"),k=require("./index16.cjs");;/* empty css */const f=i.forwardRef(({label:t,error:e,helperText:n,indeterminate:o=!1,className:y,id:_,required:l,disabled:b,checked:$,"data-cy":m,"data-testid":j,...v},c)=>{const N=i.useId(),d=_||N,p=`${d}-error`,x=`${d}-helper`,s=m||"checkbox",r=j||"checkbox",u=i.useRef(null),w=i.useCallback(h=>{u.current=h,c&&(typeof c=="function"?c(h):"current"in c&&(c.current=h))},[c]);i.useEffect(()=>{u.current&&(u.current.indeterminate=o)},[o]);const C=t&&l&&!t.includes("*")?`${t} *`:t;return a.jsxs("div",{className:k.cn("checkbox-wrapper",b&&"checkbox-wrapper--disabled"),"data-cy":`${s}-wrapper`,"data-testid":`${r}-wrapper`,children:[a.jsxs("div",{className:"checkbox__container",children:[a.jsx("input",{ref:w,id:d,type:"checkbox",checked:$,className:k.cn("checkbox__input",e&&"checkbox__input--error",y),"aria-invalid":e?"true":"false","aria-required":l?"true":void 0,"aria-describedby":e?p:n?x:void 0,"data-cy":s,"data-testid":r,"data-indeterminate":o?"true":void 0,disabled:b,required:l,...v}),t&&a.jsx("label",{htmlFor:d,className:"checkbox__label","data-cy":`${s}-label`,"data-testid":`${r}-label`,children:C})]}),e&&a.jsx("span",{id:p,className:"checkbox__error",role:"alert","data-cy":`${s}-error`,"data-testid":`${r}-error`,children:e}),n&&!e&&a.jsx("span",{id:x,className:"checkbox__helper","data-cy":`${s}-helper`,"data-testid":`${r}-helper`,children:n})]})});f.displayName="Checkbox";exports.Checkbox=f;
|