@adam-milo/ui 1.0.6 → 1.0.9
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 +43 -37
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +90 -9
- package/dist/index11.cjs +1 -0
- package/dist/index11.js +115 -0
- package/dist/index12.cjs +1 -0
- package/dist/index12.js +43 -0
- package/dist/index13.cjs +1 -0
- package/dist/index13.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 +69 -48
- package/dist/index4.cjs +1 -1
- package/dist/index4.js +173 -56
- package/dist/index5.cjs +1 -1
- package/dist/index5.js +147 -51
- package/dist/index6.cjs +1 -1
- package/dist/index6.js +155 -105
- package/dist/index7.cjs +1 -1
- package/dist/index7.js +53 -84
- package/dist/index8.cjs +1 -1
- package/dist/index8.js +61 -107
- package/dist/index9.cjs +1 -1
- package/dist/index9.js +108 -32
- package/dist/src/components/forms/alphanumeric-input/AlphanumericInput.component.d.ts +62 -0
- package/dist/src/components/forms/alphanumeric-input/AlphanumericInput.component.d.ts.map +1 -0
- package/dist/src/components/forms/email-input/EmailInput.component.d.ts +34 -0
- package/dist/src/components/forms/email-input/EmailInput.component.d.ts.map +1 -0
- package/dist/src/components/forms/numeric-input/NumericInput.component.d.ts +62 -0
- package/dist/src/components/forms/numeric-input/NumericInput.component.d.ts.map +1 -0
- package/dist/src/components/forms/password-input/PasswordInput.component.d.ts +25 -0
- package/dist/src/components/forms/password-input/PasswordInput.component.d.ts.map +1 -0
- package/dist/src/index.d.ts +8 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/src/components/forms/input/Input.component.d.ts +0 -20
- package/dist/src/components/forms/input/Input.component.d.ts.map +0 -1
package/dist/index6.js
CHANGED
|
@@ -1,119 +1,169 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { cn as
|
|
1
|
+
import { jsxs as U, jsx as b } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as L, useState as x, useId as g } from "react";
|
|
3
|
+
import { cn as z } from "./index13.js";
|
|
4
4
|
/* empty css */
|
|
5
|
-
const
|
|
5
|
+
const y = L(
|
|
6
6
|
({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
7
|
+
allowHyphen: u = !1,
|
|
8
|
+
allowUnderscore: c = !1,
|
|
9
|
+
allowSpace: f = !1,
|
|
10
|
+
minLength: h,
|
|
11
|
+
maxLength: p,
|
|
12
|
+
invalidFormatMessage: F = "Only letters and numbers are allowed",
|
|
13
|
+
minLengthMessage: M,
|
|
14
|
+
maxLengthMessage: O,
|
|
15
|
+
onValidationChange: a,
|
|
16
|
+
error: Z,
|
|
17
|
+
onChange: v,
|
|
18
|
+
onKeyDown: t,
|
|
19
|
+
label: _,
|
|
20
|
+
helperText: I,
|
|
21
|
+
fullWidth: E = !1,
|
|
22
|
+
className: T,
|
|
23
|
+
id: q,
|
|
24
|
+
"data-cy": G,
|
|
25
|
+
"data-testid": J,
|
|
26
|
+
...m
|
|
27
|
+
}, P) => {
|
|
28
|
+
const [Q, A] = x(), [X, Y] = x(!1), W = g(), $ = q || W, N = `${$}-error`, B = `${$}-helper`, d = G || "alphanumeric-input", l = J || "alphanumeric-input", j = (r) => {
|
|
29
|
+
if (!r) return { isValid: !0 };
|
|
30
|
+
let s = "^[a-zA-Z0-9";
|
|
31
|
+
if (u && (s += "\\-"), c && (s += "_"), f && (s += " "), s += "]+$", !new RegExp(s).test(r)) {
|
|
32
|
+
let R = F;
|
|
33
|
+
if (u || c || f) {
|
|
34
|
+
const k = ["letters", "numbers"];
|
|
35
|
+
u && k.push("hyphens"), c && k.push("underscores"), f && k.push("spaces"), R = `Only ${k.join(", ")} are allowed`;
|
|
36
|
+
}
|
|
37
|
+
return { isValid: !1, error: R };
|
|
24
38
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
|
|
39
|
+
return h !== void 0 && r.length < h ? {
|
|
40
|
+
isValid: !1,
|
|
41
|
+
error: M || `Must be at least ${h} characters`
|
|
42
|
+
} : p !== void 0 && r.length > p ? {
|
|
43
|
+
isValid: !1,
|
|
44
|
+
error: O || `Must be at most ${p} characters`
|
|
45
|
+
} : { isValid: !0 };
|
|
46
|
+
}, H = (r) => {
|
|
47
|
+
const s = [
|
|
48
|
+
"Backspace",
|
|
49
|
+
"Delete",
|
|
50
|
+
"Tab",
|
|
51
|
+
"Escape",
|
|
52
|
+
"Enter",
|
|
53
|
+
"ArrowLeft",
|
|
54
|
+
"ArrowRight",
|
|
55
|
+
"Home",
|
|
56
|
+
"End"
|
|
57
|
+
];
|
|
58
|
+
if (r.ctrlKey || r.metaKey) {
|
|
59
|
+
t == null || t(r);
|
|
60
|
+
return;
|
|
40
61
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
C.displayName = "CardHeader";
|
|
45
|
-
const m = n(
|
|
46
|
-
({ className: a, "data-cy": t, "data-testid": d, ...e }, r) => {
|
|
47
|
-
const c = t || "card-title", s = d || "card-title";
|
|
48
|
-
return (
|
|
49
|
-
// eslint-disable-next-line jsx-a11y/heading-has-content
|
|
50
|
-
/* @__PURE__ */ i(
|
|
51
|
-
"h3",
|
|
52
|
-
{
|
|
53
|
-
ref: r,
|
|
54
|
-
className: o("card-title", a),
|
|
55
|
-
"data-cy": c,
|
|
56
|
-
"data-testid": s,
|
|
57
|
-
...e
|
|
58
|
-
}
|
|
59
|
-
)
|
|
60
|
-
);
|
|
61
|
-
}
|
|
62
|
-
);
|
|
63
|
-
m.displayName = "CardTitle";
|
|
64
|
-
const p = n(
|
|
65
|
-
({ className: a, "data-cy": t, "data-testid": d, ...e }, r) => {
|
|
66
|
-
const c = t || "card-description", s = d || "card-description";
|
|
67
|
-
return /* @__PURE__ */ i(
|
|
68
|
-
"p",
|
|
69
|
-
{
|
|
70
|
-
ref: r,
|
|
71
|
-
className: o("card-description", a),
|
|
72
|
-
"data-cy": c,
|
|
73
|
-
"data-testid": s,
|
|
74
|
-
...e
|
|
62
|
+
if (s.includes(r.key)) {
|
|
63
|
+
t == null || t(r);
|
|
64
|
+
return;
|
|
75
65
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
p.displayName = "CardDescription";
|
|
80
|
-
const N = n(
|
|
81
|
-
({ className: a, "data-cy": t, "data-testid": d, ...e }, r) => {
|
|
82
|
-
const c = t || "card-content", s = d || "card-content";
|
|
83
|
-
return /* @__PURE__ */ i(
|
|
84
|
-
"div",
|
|
85
|
-
{
|
|
86
|
-
ref: r,
|
|
87
|
-
className: o("card-content", a),
|
|
88
|
-
"data-cy": c,
|
|
89
|
-
"data-testid": s,
|
|
90
|
-
...e
|
|
66
|
+
if (f && r.key === " ") {
|
|
67
|
+
t == null || t(r);
|
|
68
|
+
return;
|
|
91
69
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
70
|
+
if (u && r.key === "-") {
|
|
71
|
+
t == null || t(r);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
if (c && r.key === "_") {
|
|
75
|
+
t == null || t(r);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
if (r.key >= "a" && r.key <= "z" || r.key >= "A" && r.key <= "Z") {
|
|
79
|
+
t == null || t(r);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
if (r.key >= "0" && r.key <= "9") {
|
|
83
|
+
t == null || t(r);
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
r.preventDefault();
|
|
87
|
+
}, S = (r) => {
|
|
88
|
+
const s = r.target.value;
|
|
89
|
+
if (X) {
|
|
90
|
+
const i = j(s);
|
|
91
|
+
A(i.error), a == null || a(i.isValid);
|
|
92
|
+
}
|
|
93
|
+
v == null || v(r);
|
|
94
|
+
}, V = (r) => {
|
|
95
|
+
var i;
|
|
96
|
+
Y(!0);
|
|
97
|
+
const s = j(r.target.value);
|
|
98
|
+
A(s.error), a == null || a(s.isValid), (i = m.onBlur) == null || i.call(m, r);
|
|
99
|
+
}, e = Z || Q;
|
|
100
|
+
return /* @__PURE__ */ U(
|
|
100
101
|
"div",
|
|
101
102
|
{
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
"data-
|
|
105
|
-
|
|
106
|
-
|
|
103
|
+
className: z("input-wrapper", E && "input-wrapper--full-width"),
|
|
104
|
+
"data-cy": `${d}-wrapper`,
|
|
105
|
+
"data-testid": `${l}-wrapper`,
|
|
106
|
+
children: [
|
|
107
|
+
_ && /* @__PURE__ */ b(
|
|
108
|
+
"label",
|
|
109
|
+
{
|
|
110
|
+
htmlFor: $,
|
|
111
|
+
className: "input__label",
|
|
112
|
+
"data-cy": `${d}-label`,
|
|
113
|
+
"data-testid": `${l}-label`,
|
|
114
|
+
children: _
|
|
115
|
+
}
|
|
116
|
+
),
|
|
117
|
+
/* @__PURE__ */ b(
|
|
118
|
+
"input",
|
|
119
|
+
{
|
|
120
|
+
ref: P,
|
|
121
|
+
id: $,
|
|
122
|
+
type: "text",
|
|
123
|
+
className: z(
|
|
124
|
+
"input",
|
|
125
|
+
e && "input--error",
|
|
126
|
+
E && "input--full-width",
|
|
127
|
+
T
|
|
128
|
+
),
|
|
129
|
+
"aria-invalid": e ? "true" : "false",
|
|
130
|
+
"aria-describedby": e ? N : I ? B : void 0,
|
|
131
|
+
"data-cy": d,
|
|
132
|
+
"data-testid": l,
|
|
133
|
+
onChange: S,
|
|
134
|
+
onBlur: V,
|
|
135
|
+
onKeyDown: H,
|
|
136
|
+
maxLength: p,
|
|
137
|
+
...m
|
|
138
|
+
}
|
|
139
|
+
),
|
|
140
|
+
e && /* @__PURE__ */ b(
|
|
141
|
+
"span",
|
|
142
|
+
{
|
|
143
|
+
id: N,
|
|
144
|
+
className: "input__error",
|
|
145
|
+
role: "alert",
|
|
146
|
+
"data-cy": `${d}-error`,
|
|
147
|
+
"data-testid": `${l}-error`,
|
|
148
|
+
children: e
|
|
149
|
+
}
|
|
150
|
+
),
|
|
151
|
+
I && !e && /* @__PURE__ */ b(
|
|
152
|
+
"span",
|
|
153
|
+
{
|
|
154
|
+
id: B,
|
|
155
|
+
className: "input__helper",
|
|
156
|
+
"data-cy": `${d}-helper`,
|
|
157
|
+
"data-testid": `${l}-helper`,
|
|
158
|
+
children: I
|
|
159
|
+
}
|
|
160
|
+
)
|
|
161
|
+
]
|
|
107
162
|
}
|
|
108
163
|
);
|
|
109
164
|
}
|
|
110
165
|
);
|
|
111
|
-
|
|
166
|
+
y.displayName = "AlphanumericInput";
|
|
112
167
|
export {
|
|
113
|
-
|
|
114
|
-
N as CardContent,
|
|
115
|
-
p as CardDescription,
|
|
116
|
-
D as CardFooter,
|
|
117
|
-
C as CardHeader,
|
|
118
|
-
m as CardTitle
|
|
168
|
+
y as AlphanumericInput
|
|
119
169
|
};
|
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 d=require("react/jsx-runtime"),b=require("react"),T=require("@radix-ui/react-tabs"),g=require("./index13.cjs");;/* empty css */function m(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const e in a)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(a,e);Object.defineProperty(t,e,s.get?s:{enumerable:!0,get:()=>a[e]})}}return t.default=a,Object.freeze(t)}const n=m(T),u=n.Root,f=b.forwardRef(({className:a,"data-cy":t,"data-testid":e,...s},r)=>{const i=t||"tabs-list",c=e||"tabs-list";return d.jsx(n.List,{ref:r,className:g.cn("tabs-list",a),"data-cy":i,"data-testid":c,...s})});f.displayName=n.List.displayName;const l=b.forwardRef(({className:a,value:t,"data-cy":e,"data-testid":s,...r},i)=>{const c=e||(t?`tabs-trigger-${t}`:"tabs-trigger"),o=s||(t?`tabs-trigger-${t}`:"tabs-trigger");return d.jsx(n.Trigger,{ref:i,className:g.cn("tabs-trigger",a),value:t,"data-cy":c,"data-testid":o,...r})});l.displayName=n.Trigger.displayName;const y=b.forwardRef(({className:a,value:t,"data-cy":e,"data-testid":s,...r},i)=>{const c=e||(t?`tabs-content-${t}`:"tabs-content"),o=s||(t?`tabs-content-${t}`:"tabs-content");return d.jsx(n.Content,{ref:i,className:g.cn("tabs-content",a),value:t,"data-cy":c,"data-testid":o,...r})});y.displayName=n.Content.displayName;exports.Tabs=u;exports.TabsContent=y;exports.TabsList=f;exports.TabsTrigger=l;
|
package/dist/index7.js
CHANGED
|
@@ -1,92 +1,61 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as m } from "react";
|
|
3
|
+
import * as a from "@radix-ui/react-tabs";
|
|
4
|
+
import { cn as b } from "./index13.js";
|
|
4
5
|
/* empty css */
|
|
5
|
-
const
|
|
6
|
-
({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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",
|
|
6
|
+
const C = a.Root, g = m(
|
|
7
|
+
({ className: s, "data-cy": t, "data-testid": i, ...n }, r) => {
|
|
8
|
+
const e = t || "tabs-list", o = i || "tabs-list";
|
|
9
|
+
return /* @__PURE__ */ c(
|
|
10
|
+
a.List,
|
|
19
11
|
{
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
"data-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
)
|
|
12
|
+
ref: r,
|
|
13
|
+
className: b("tabs-list", s),
|
|
14
|
+
"data-cy": e,
|
|
15
|
+
"data-testid": o,
|
|
16
|
+
...n
|
|
85
17
|
}
|
|
86
18
|
);
|
|
87
19
|
}
|
|
88
20
|
);
|
|
89
|
-
|
|
21
|
+
g.displayName = a.List.displayName;
|
|
22
|
+
const y = m(
|
|
23
|
+
({ className: s, value: t, "data-cy": i, "data-testid": n, ...r }, e) => {
|
|
24
|
+
const o = i || (t ? `tabs-trigger-${t}` : "tabs-trigger"), d = n || (t ? `tabs-trigger-${t}` : "tabs-trigger");
|
|
25
|
+
return /* @__PURE__ */ c(
|
|
26
|
+
a.Trigger,
|
|
27
|
+
{
|
|
28
|
+
ref: e,
|
|
29
|
+
className: b("tabs-trigger", s),
|
|
30
|
+
value: t,
|
|
31
|
+
"data-cy": o,
|
|
32
|
+
"data-testid": d,
|
|
33
|
+
...r
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
y.displayName = a.Trigger.displayName;
|
|
39
|
+
const f = m(
|
|
40
|
+
({ className: s, value: t, "data-cy": i, "data-testid": n, ...r }, e) => {
|
|
41
|
+
const o = i || (t ? `tabs-content-${t}` : "tabs-content"), d = n || (t ? `tabs-content-${t}` : "tabs-content");
|
|
42
|
+
return /* @__PURE__ */ c(
|
|
43
|
+
a.Content,
|
|
44
|
+
{
|
|
45
|
+
ref: e,
|
|
46
|
+
className: b("tabs-content", s),
|
|
47
|
+
value: t,
|
|
48
|
+
"data-cy": o,
|
|
49
|
+
"data-testid": d,
|
|
50
|
+
...r
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
f.displayName = a.Content.displayName;
|
|
90
56
|
export {
|
|
91
|
-
|
|
57
|
+
C as Tabs,
|
|
58
|
+
f as TabsContent,
|
|
59
|
+
g as TabsList,
|
|
60
|
+
y as TabsTrigger
|
|
92
61
|
};
|
package/dist/index8.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"),m=require("react"),f=require("./index13.cjs");;/* empty css */const c=m.forwardRef(({variant:s="info",title:r,icon:d,className:i,children:l,"data-cy":n,"data-testid":o,...u},$)=>{const y={info:"status",success:"status",warning:"alert",error:"alert"},t=n||`alert-${s}`,e=o||`alert-${s}`;return a.jsxs("div",{ref:$,role:y[s],className:f.cn("alert",`alert--${s}`,i),"data-cy":t,"data-testid":e,...u,children:[d&&a.jsx("div",{className:"alert__icon","data-cy":`${t}-icon`,"data-testid":`${e}-icon`,children:d}),a.jsxs("div",{className:"alert__content","data-cy":`${t}-content`,"data-testid":`${e}-content`,children:[r&&a.jsx("div",{className:"alert__title","data-cy":`${t}-title`,"data-testid":`${e}-title`,children:r}),a.jsx("div",{"data-cy":`${t}-message`,"data-testid":`${e}-message`,children:l})]})]})});c.displayName="Alert";exports.Alert=c;
|
package/dist/index8.js
CHANGED
|
@@ -1,115 +1,69 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import
|
|
4
|
-
import { cn as r } from "./index10.js";
|
|
1
|
+
import { jsxs as c, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as y } from "react";
|
|
3
|
+
import { cn as p } from "./index13.js";
|
|
5
4
|
/* empty css */
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
-
|
|
25
|
-
a.Content,
|
|
5
|
+
const _ = y(
|
|
6
|
+
({
|
|
7
|
+
variant: e = "info",
|
|
8
|
+
title: d,
|
|
9
|
+
icon: r,
|
|
10
|
+
className: i,
|
|
11
|
+
children: l,
|
|
12
|
+
"data-cy": o,
|
|
13
|
+
"data-testid": n,
|
|
14
|
+
...m
|
|
15
|
+
}, $) => {
|
|
16
|
+
const f = {
|
|
17
|
+
info: "status",
|
|
18
|
+
success: "status",
|
|
19
|
+
warning: "alert",
|
|
20
|
+
error: "alert"
|
|
21
|
+
}, t = o || `alert-${e}`, a = n || `alert-${e}`;
|
|
22
|
+
return /* @__PURE__ */ c(
|
|
23
|
+
"div",
|
|
26
24
|
{
|
|
27
|
-
ref:
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
"data-
|
|
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
|
-
"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
|
|
25
|
+
ref: $,
|
|
26
|
+
role: f[e],
|
|
27
|
+
className: p("alert", `alert--${e}`, i),
|
|
28
|
+
"data-cy": t,
|
|
29
|
+
"data-testid": a,
|
|
30
|
+
...m,
|
|
31
|
+
children: [
|
|
32
|
+
r && /* @__PURE__ */ s(
|
|
33
|
+
"div",
|
|
34
|
+
{
|
|
35
|
+
className: "alert__icon",
|
|
36
|
+
"data-cy": `${t}-icon`,
|
|
37
|
+
"data-testid": `${a}-icon`,
|
|
38
|
+
children: r
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
/* @__PURE__ */ c(
|
|
42
|
+
"div",
|
|
43
|
+
{
|
|
44
|
+
className: "alert__content",
|
|
45
|
+
"data-cy": `${t}-content`,
|
|
46
|
+
"data-testid": `${a}-content`,
|
|
47
|
+
children: [
|
|
48
|
+
d && /* @__PURE__ */ s(
|
|
49
|
+
"div",
|
|
50
|
+
{
|
|
51
|
+
className: "alert__title",
|
|
52
|
+
"data-cy": `${t}-title`,
|
|
53
|
+
"data-testid": `${a}-title`,
|
|
54
|
+
children: d
|
|
55
|
+
}
|
|
56
|
+
),
|
|
57
|
+
/* @__PURE__ */ s("div", { "data-cy": `${t}-message`, "data-testid": `${a}-message`, children: l })
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
]
|
|
85
62
|
}
|
|
86
63
|
);
|
|
87
64
|
}
|
|
88
65
|
);
|
|
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;
|
|
66
|
+
_.displayName = "Alert";
|
|
104
67
|
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
|
|
68
|
+
_ as Alert
|
|
115
69
|
};
|
package/dist/index9.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 n=require("react/jsx-runtime"),i=require("react"),o=require("./index13.cjs");;/* empty css */const l=i.forwardRef(({variant:a="default",className:t,children:d,"data-cy":e,"data-testid":r,...c},s)=>{const p=e||`card-${a}`,N=r||`card-${a}`;return n.jsx("div",{ref:s,className:o.cn("card",`card--${a}`,t),"data-cy":p,"data-testid":N,...c,children:d})});l.displayName="Card";const f=i.forwardRef(({className:a,"data-cy":t,"data-testid":d,...e},r)=>{const c=t||"card-header",s=d||"card-header";return n.jsx("div",{ref:r,className:o.cn("card-header",a),"data-cy":c,"data-testid":s,...e})});f.displayName="CardHeader";const C=i.forwardRef(({className:a,"data-cy":t,"data-testid":d,...e},r)=>{const c=t||"card-title",s=d||"card-title";return n.jsx("h3",{ref:r,className:o.cn("card-title",a),"data-cy":c,"data-testid":s,...e})});C.displayName="CardTitle";const y=i.forwardRef(({className:a,"data-cy":t,"data-testid":d,...e},r)=>{const c=t||"card-description",s=d||"card-description";return n.jsx("p",{ref:r,className:o.cn("card-description",a),"data-cy":c,"data-testid":s,...e})});y.displayName="CardDescription";const u=i.forwardRef(({className:a,"data-cy":t,"data-testid":d,...e},r)=>{const c=t||"card-content",s=d||"card-content";return n.jsx("div",{ref:r,className:o.cn("card-content",a),"data-cy":c,"data-testid":s,...e})});u.displayName="CardContent";const m=i.forwardRef(({className:a,"data-cy":t,"data-testid":d,...e},r)=>{const c=t||"card-footer",s=d||"card-footer";return n.jsx("div",{ref:r,className:o.cn("card-footer",a),"data-cy":c,"data-testid":s,...e})});m.displayName="CardFooter";exports.Card=l;exports.CardContent=u;exports.CardDescription=y;exports.CardFooter=m;exports.CardHeader=f;exports.CardTitle=C;
|