@adam-milo/ui 1.0.20 → 1.0.22
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 +53 -53
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +38 -36
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +82 -76
- package/dist/index12.cjs +1 -1
- package/dist/index12.js +50 -49
- package/dist/index13.cjs +1 -1
- package/dist/index13.js +30 -30
- package/dist/index14.cjs +1 -1
- package/dist/index14.js +348 -209
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +92 -82
- package/dist/index16.cjs +1 -1
- package/dist/index16.js +32 -31
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +10 -7
- package/dist/index19.cjs +1 -0
- package/dist/index19.js +22 -0
- package/dist/index2.cjs +1 -1
- package/dist/index2.js +26 -26
- package/dist/index20.cjs +1 -0
- package/dist/index20.js +301 -0
- package/dist/index21.cjs +1 -0
- package/dist/index21.js +16 -0
- package/dist/index3.cjs +1 -1
- package/dist/index3.js +37 -95
- package/dist/index30.cjs +1 -0
- package/dist/index30.js +9 -0
- package/dist/index33.cjs +1 -0
- package/dist/index33.js +21 -0
- package/dist/index4.cjs +1 -1
- package/dist/index4.js +18 -174
- package/dist/index5.cjs +1 -1
- package/dist/index5.js +51 -155
- package/dist/index6.cjs +1 -1
- package/dist/index6.js +102 -159
- package/dist/index7.cjs +1 -1
- package/dist/index7.js +76 -61
- package/dist/index8.cjs +1 -1
- package/dist/index8.js +68 -54
- package/dist/index9.cjs +1 -1
- package/dist/index9.js +47 -43
- package/dist/src/components/forms/alphanumeric-input/AlphanumericInput.component.d.ts +23 -38
- package/dist/src/components/forms/alphanumeric-input/AlphanumericInput.component.d.ts.map +1 -1
- package/dist/src/components/forms/email-input/EmailInput.component.d.ts +17 -20
- package/dist/src/components/forms/email-input/EmailInput.component.d.ts.map +1 -1
- package/dist/src/components/forms/input/Input.component.d.ts +105 -0
- package/dist/src/components/forms/input/Input.component.d.ts.map +1 -0
- package/dist/src/components/forms/numeric-input/NumericInput.component.d.ts +30 -48
- package/dist/src/components/forms/numeric-input/NumericInput.component.d.ts.map +1 -1
- package/dist/src/components/forms/password-input/PasswordInput.component.d.ts +19 -16
- package/dist/src/components/forms/password-input/PasswordInput.component.d.ts.map +1 -1
- package/dist/src/lib/debounce.d.ts +12 -0
- package/dist/src/lib/debounce.d.ts.map +1 -0
- package/dist/src/lib/debounce.spec.d.ts +2 -0
- package/dist/src/lib/debounce.spec.d.ts.map +1 -0
- package/dist/src/lib/dev-utils.d.ts +41 -0
- package/dist/src/lib/dev-utils.d.ts.map +1 -0
- package/dist/src/lib/index.d.ts +15 -2
- package/dist/src/lib/index.d.ts.map +1 -1
- package/dist/src/lib/useMergedRef.d.ts +19 -0
- package/dist/src/lib/useMergedRef.d.ts.map +1 -0
- package/dist/style.css +1 -1
- package/package.json +5 -2
package/dist/index.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 e=require("./index2.cjs"),r=require("./index3.cjs"),o=require("./index4.cjs"),t=require("./index5.cjs"),i=require("./index6.cjs"),s=require("./index7.cjs"),a=require("./index8.cjs"),n=require("./index9.cjs"),p=require("./index10.cjs"),x=require("./index11.cjs"),l=require("./index12.cjs"),d=require("./index13.cjs"),c=require("./index14.cjs"),u=require("./index15.cjs"),g=require("./index16.cjs"),C=require("./index17.cjs"),D=require("@adam-milo/icons");exports.Button=e.Button,exports.EmailInput=r.EmailInput,exports.PasswordInput=o.PasswordInput,exports.NumericInput=t.NumericInput,exports.AlphanumericInput=i.AlphanumericInput,exports.Checkbox=s.Checkbox,exports.Radio=a.Radio,exports.Tabs=n.Tabs,exports.TabsContent=n.TabsContent,exports.TabsList=n.TabsList,exports.TabsTrigger=n.TabsTrigger,exports.Alert=p.Alert,exports.Card=x.Card,exports.CardContent=x.CardContent,exports.CardDescription=x.CardDescription,exports.CardFooter=x.CardFooter,exports.CardHeader=x.CardHeader,exports.CardTitle=x.CardTitle,exports.DataTable=l.DataTable,exports.Chip=d.Chip,exports.ChipGroup=c.ChipGroup,exports.Dialog=u.Dialog,exports.DialogClose=u.DialogClose,exports.DialogContent=u.DialogContent,exports.DialogDescription=u.DialogDescription,exports.DialogFooter=u.DialogFooter,exports.DialogHeader=u.DialogHeader,exports.DialogOverlay=u.DialogOverlay,exports.DialogPortal=u.DialogPortal,exports.DialogTitle=u.DialogTitle,exports.DialogTrigger=u.DialogTrigger,exports.Stack=g.Stack,exports.cn=C.cn,exports.generateId=C.generateId,Object.defineProperty(exports,"Icon",{enumerable:!0,get:()=>D.Icon}),Object.defineProperty(exports,"availableIcons",{enumerable:!0,get:()=>D.availableIcons});
|
package/dist/index.js
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import { Button
|
|
2
|
-
import { EmailInput
|
|
3
|
-
import { PasswordInput
|
|
4
|
-
import { NumericInput
|
|
5
|
-
import { AlphanumericInput
|
|
6
|
-
import { Checkbox
|
|
7
|
-
import { Radio
|
|
8
|
-
import { Tabs
|
|
9
|
-
import { Alert
|
|
10
|
-
import { Card
|
|
11
|
-
import { DataTable
|
|
12
|
-
import { Chip
|
|
13
|
-
import { ChipGroup
|
|
14
|
-
import { Dialog
|
|
15
|
-
import { Stack
|
|
16
|
-
import { cn
|
|
17
|
-
import { Icon
|
|
1
|
+
import { Button } from "./index2.js";
|
|
2
|
+
import { EmailInput } from "./index3.js";
|
|
3
|
+
import { PasswordInput } from "./index4.js";
|
|
4
|
+
import { NumericInput } from "./index5.js";
|
|
5
|
+
import { AlphanumericInput } from "./index6.js";
|
|
6
|
+
import { Checkbox } from "./index7.js";
|
|
7
|
+
import { Radio } from "./index8.js";
|
|
8
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from "./index9.js";
|
|
9
|
+
import { Alert } from "./index10.js";
|
|
10
|
+
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "./index11.js";
|
|
11
|
+
import { DataTable } from "./index12.js";
|
|
12
|
+
import { Chip } from "./index13.js";
|
|
13
|
+
import { ChipGroup } from "./index14.js";
|
|
14
|
+
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from "./index15.js";
|
|
15
|
+
import { Stack } from "./index16.js";
|
|
16
|
+
import { cn, generateId } from "./index17.js";
|
|
17
|
+
import { Icon, availableIcons } from "@adam-milo/icons";
|
|
18
18
|
export {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
-
|
|
19
|
+
Alert,
|
|
20
|
+
AlphanumericInput,
|
|
21
|
+
Button,
|
|
22
|
+
Card,
|
|
23
|
+
CardContent,
|
|
24
|
+
CardDescription,
|
|
25
|
+
CardFooter,
|
|
26
|
+
CardHeader,
|
|
27
|
+
CardTitle,
|
|
28
|
+
Checkbox,
|
|
29
|
+
Chip,
|
|
30
|
+
ChipGroup,
|
|
31
|
+
DataTable,
|
|
32
|
+
Dialog,
|
|
33
|
+
DialogClose,
|
|
34
|
+
DialogContent,
|
|
35
|
+
DialogDescription,
|
|
36
|
+
DialogFooter,
|
|
37
|
+
DialogHeader,
|
|
38
|
+
DialogOverlay,
|
|
39
|
+
DialogPortal,
|
|
40
|
+
DialogTitle,
|
|
41
|
+
DialogTrigger,
|
|
42
|
+
EmailInput,
|
|
43
|
+
Icon,
|
|
44
|
+
NumericInput,
|
|
45
|
+
PasswordInput,
|
|
46
|
+
Radio,
|
|
47
|
+
Stack,
|
|
48
|
+
Tabs,
|
|
49
|
+
TabsContent,
|
|
50
|
+
TabsList,
|
|
51
|
+
TabsTrigger,
|
|
52
|
+
availableIcons,
|
|
53
|
+
cn,
|
|
54
|
+
generateId
|
|
55
55
|
};
|
package/dist/index10.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"),e=require("react"),a=require("./index17.cjs");;/* empty css */const r=e.forwardRef(({variant:e="info",title:r,icon:s,className:i,children:c,"data-cy":d,"data-testid":l,...n},o)=>{const u=d||`alert-${e}`,$=l||`alert-${e}`;return t.jsxs("div",{ref:o,role:{info:"status",success:"status",warning:"alert",error:"alert"}[e],className:a.cn("alert",`alert--${e}`,i),"data-cy":u,"data-testid":$,...n,children:[s&&t.jsx("div",{className:"alert__icon","data-cy":`${u}-icon`,"data-testid":`${$}-icon`,children:s}),t.jsxs("div",{className:"alert__content","data-cy":`${u}-content`,"data-testid":`${$}-content`,children:[r&&t.jsx("div",{className:"alert__title","data-cy":`${u}-title`,"data-testid":`${$}-title`,children:r}),t.jsx("div",{"data-cy":`${u}-message`,"data-testid":`${$}-message`,children:c})]})]})});r.displayName="Alert",exports.Alert=r;
|
package/dist/index10.js
CHANGED
|
@@ -1,60 +1,62 @@
|
|
|
1
|
-
import { jsxs
|
|
2
|
-
import { forwardRef
|
|
3
|
-
import { cn
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { cn } from "./index17.js";
|
|
4
4
|
/* empty css */
|
|
5
|
-
const
|
|
5
|
+
const Alert = forwardRef(
|
|
6
6
|
({
|
|
7
|
-
variant
|
|
8
|
-
title
|
|
9
|
-
icon
|
|
10
|
-
className
|
|
11
|
-
children
|
|
12
|
-
"data-cy":
|
|
13
|
-
"data-testid":
|
|
14
|
-
...
|
|
15
|
-
},
|
|
16
|
-
const
|
|
7
|
+
variant = "info",
|
|
8
|
+
title,
|
|
9
|
+
icon,
|
|
10
|
+
className,
|
|
11
|
+
children,
|
|
12
|
+
"data-cy": dataCy,
|
|
13
|
+
"data-testid": dataTestId,
|
|
14
|
+
...props
|
|
15
|
+
}, ref) => {
|
|
16
|
+
const roleMap = {
|
|
17
17
|
info: "status",
|
|
18
18
|
success: "status",
|
|
19
19
|
warning: "alert",
|
|
20
20
|
error: "alert"
|
|
21
|
-
}
|
|
22
|
-
|
|
21
|
+
};
|
|
22
|
+
const finalDataCy = dataCy || `alert-${variant}`;
|
|
23
|
+
const finalTestId = dataTestId || `alert-${variant}`;
|
|
24
|
+
return /* @__PURE__ */ jsxs(
|
|
23
25
|
"div",
|
|
24
26
|
{
|
|
25
|
-
ref
|
|
26
|
-
role:
|
|
27
|
-
className:
|
|
28
|
-
"data-cy":
|
|
29
|
-
"data-testid":
|
|
30
|
-
...
|
|
27
|
+
ref,
|
|
28
|
+
role: roleMap[variant],
|
|
29
|
+
className: cn("alert", `alert--${variant}`, className),
|
|
30
|
+
"data-cy": finalDataCy,
|
|
31
|
+
"data-testid": finalTestId,
|
|
32
|
+
...props,
|
|
31
33
|
children: [
|
|
32
|
-
|
|
34
|
+
icon && /* @__PURE__ */ jsx(
|
|
33
35
|
"div",
|
|
34
36
|
{
|
|
35
37
|
className: "alert__icon",
|
|
36
|
-
"data-cy": `${
|
|
37
|
-
"data-testid": `${
|
|
38
|
-
children:
|
|
38
|
+
"data-cy": `${finalDataCy}-icon`,
|
|
39
|
+
"data-testid": `${finalTestId}-icon`,
|
|
40
|
+
children: icon
|
|
39
41
|
}
|
|
40
42
|
),
|
|
41
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ jsxs(
|
|
42
44
|
"div",
|
|
43
45
|
{
|
|
44
46
|
className: "alert__content",
|
|
45
|
-
"data-cy": `${
|
|
46
|
-
"data-testid": `${
|
|
47
|
+
"data-cy": `${finalDataCy}-content`,
|
|
48
|
+
"data-testid": `${finalTestId}-content`,
|
|
47
49
|
children: [
|
|
48
|
-
|
|
50
|
+
title && /* @__PURE__ */ jsx(
|
|
49
51
|
"div",
|
|
50
52
|
{
|
|
51
53
|
className: "alert__title",
|
|
52
|
-
"data-cy": `${
|
|
53
|
-
"data-testid": `${
|
|
54
|
-
children:
|
|
54
|
+
"data-cy": `${finalDataCy}-title`,
|
|
55
|
+
"data-testid": `${finalTestId}-title`,
|
|
56
|
+
children: title
|
|
55
57
|
}
|
|
56
58
|
),
|
|
57
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ jsx("div", { "data-cy": `${finalDataCy}-message`, "data-testid": `${finalTestId}-message`, children })
|
|
58
60
|
]
|
|
59
61
|
}
|
|
60
62
|
)
|
|
@@ -63,7 +65,7 @@ const _ = y(
|
|
|
63
65
|
);
|
|
64
66
|
}
|
|
65
67
|
);
|
|
66
|
-
|
|
68
|
+
Alert.displayName = "Alert";
|
|
67
69
|
export {
|
|
68
|
-
|
|
70
|
+
Alert
|
|
69
71
|
};
|
package/dist/index11.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"),t=require("react"),e=require("./index17.cjs");;/* empty css */const r=t.forwardRef(({variant:t="default",className:r,children:d,"data-cy":c,"data-testid":s,...i},o)=>{const n=c||`card-${t}`,l=s||`card-${t}`;return a.jsx("div",{ref:o,className:e.cn("card",`card--${t}`,r),"data-cy":n,"data-testid":l,...i,children:d})});r.displayName="Card";const d=t.forwardRef(({className:t,"data-cy":r,"data-testid":d,...c},s)=>{const i=r||"card-header",o=d||"card-header";return a.jsx("div",{ref:s,className:e.cn("card-header",t),"data-cy":i,"data-testid":o,...c})});d.displayName="CardHeader";const c=t.forwardRef(({className:t,"data-cy":r,"data-testid":d,...c},s)=>{const i=r||"card-title",o=d||"card-title";return a.jsx("h3",{ref:s,className:e.cn("card-title",t),"data-cy":i,"data-testid":o,...c})});c.displayName="CardTitle";const s=t.forwardRef(({className:t,"data-cy":r,"data-testid":d,...c},s)=>{const i=r||"card-description",o=d||"card-description";return a.jsx("p",{ref:s,className:e.cn("card-description",t),"data-cy":i,"data-testid":o,...c})});s.displayName="CardDescription";const i=t.forwardRef(({className:t,"data-cy":r,"data-testid":d,...c},s)=>{const i=r||"card-content",o=d||"card-content";return a.jsx("div",{ref:s,className:e.cn("card-content",t),"data-cy":i,"data-testid":o,...c})});i.displayName="CardContent";const o=t.forwardRef(({className:t,"data-cy":r,"data-testid":d,...c},s)=>{const i=r||"card-footer",o=d||"card-footer";return a.jsx("div",{ref:s,className:e.cn("card-footer",t),"data-cy":i,"data-testid":o,...c})});o.displayName="CardFooter",exports.Card=r,exports.CardContent=i,exports.CardDescription=s,exports.CardFooter=o,exports.CardHeader=d,exports.CardTitle=c;
|
package/dist/index11.js
CHANGED
|
@@ -1,119 +1,125 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import { forwardRef
|
|
3
|
-
import { cn
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { cn } from "./index17.js";
|
|
4
4
|
/* empty css */
|
|
5
|
-
const
|
|
5
|
+
const Card = forwardRef(
|
|
6
6
|
({
|
|
7
|
-
variant
|
|
8
|
-
className
|
|
9
|
-
children
|
|
10
|
-
"data-cy":
|
|
11
|
-
"data-testid":
|
|
12
|
-
...
|
|
13
|
-
},
|
|
14
|
-
const
|
|
15
|
-
|
|
7
|
+
variant = "default",
|
|
8
|
+
className,
|
|
9
|
+
children,
|
|
10
|
+
"data-cy": dataCy,
|
|
11
|
+
"data-testid": dataTestId,
|
|
12
|
+
...props
|
|
13
|
+
}, ref) => {
|
|
14
|
+
const finalDataCy = dataCy || `card-${variant}`;
|
|
15
|
+
const finalTestId = dataTestId || `card-${variant}`;
|
|
16
|
+
return /* @__PURE__ */ jsx(
|
|
16
17
|
"div",
|
|
17
18
|
{
|
|
18
|
-
ref
|
|
19
|
-
className:
|
|
20
|
-
"data-cy":
|
|
21
|
-
"data-testid":
|
|
22
|
-
...
|
|
23
|
-
children
|
|
19
|
+
ref,
|
|
20
|
+
className: cn("card", `card--${variant}`, className),
|
|
21
|
+
"data-cy": finalDataCy,
|
|
22
|
+
"data-testid": finalTestId,
|
|
23
|
+
...props,
|
|
24
|
+
children
|
|
24
25
|
}
|
|
25
26
|
);
|
|
26
27
|
}
|
|
27
28
|
);
|
|
28
|
-
|
|
29
|
-
const
|
|
30
|
-
({ className
|
|
31
|
-
const
|
|
32
|
-
|
|
29
|
+
Card.displayName = "Card";
|
|
30
|
+
const CardHeader = forwardRef(
|
|
31
|
+
({ className, "data-cy": dataCy, "data-testid": dataTestId, ...props }, ref) => {
|
|
32
|
+
const finalDataCy = dataCy || "card-header";
|
|
33
|
+
const finalTestId = dataTestId || "card-header";
|
|
34
|
+
return /* @__PURE__ */ jsx(
|
|
33
35
|
"div",
|
|
34
36
|
{
|
|
35
|
-
ref
|
|
36
|
-
className:
|
|
37
|
-
"data-cy":
|
|
38
|
-
"data-testid":
|
|
39
|
-
...
|
|
37
|
+
ref,
|
|
38
|
+
className: cn("card-header", className),
|
|
39
|
+
"data-cy": finalDataCy,
|
|
40
|
+
"data-testid": finalTestId,
|
|
41
|
+
...props
|
|
40
42
|
}
|
|
41
43
|
);
|
|
42
44
|
}
|
|
43
45
|
);
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
({ className
|
|
47
|
-
const
|
|
46
|
+
CardHeader.displayName = "CardHeader";
|
|
47
|
+
const CardTitle = forwardRef(
|
|
48
|
+
({ className, "data-cy": dataCy, "data-testid": dataTestId, ...props }, ref) => {
|
|
49
|
+
const finalDataCy = dataCy || "card-title";
|
|
50
|
+
const finalTestId = dataTestId || "card-title";
|
|
48
51
|
return (
|
|
49
52
|
// eslint-disable-next-line jsx-a11y/heading-has-content
|
|
50
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ jsx(
|
|
51
54
|
"h3",
|
|
52
55
|
{
|
|
53
|
-
ref
|
|
54
|
-
className:
|
|
55
|
-
"data-cy":
|
|
56
|
-
"data-testid":
|
|
57
|
-
...
|
|
56
|
+
ref,
|
|
57
|
+
className: cn("card-title", className),
|
|
58
|
+
"data-cy": finalDataCy,
|
|
59
|
+
"data-testid": finalTestId,
|
|
60
|
+
...props
|
|
58
61
|
}
|
|
59
62
|
)
|
|
60
63
|
);
|
|
61
64
|
}
|
|
62
65
|
);
|
|
63
|
-
|
|
64
|
-
const
|
|
65
|
-
({ className
|
|
66
|
-
const
|
|
67
|
-
|
|
66
|
+
CardTitle.displayName = "CardTitle";
|
|
67
|
+
const CardDescription = forwardRef(
|
|
68
|
+
({ className, "data-cy": dataCy, "data-testid": dataTestId, ...props }, ref) => {
|
|
69
|
+
const finalDataCy = dataCy || "card-description";
|
|
70
|
+
const finalTestId = dataTestId || "card-description";
|
|
71
|
+
return /* @__PURE__ */ jsx(
|
|
68
72
|
"p",
|
|
69
73
|
{
|
|
70
|
-
ref
|
|
71
|
-
className:
|
|
72
|
-
"data-cy":
|
|
73
|
-
"data-testid":
|
|
74
|
-
...
|
|
74
|
+
ref,
|
|
75
|
+
className: cn("card-description", className),
|
|
76
|
+
"data-cy": finalDataCy,
|
|
77
|
+
"data-testid": finalTestId,
|
|
78
|
+
...props
|
|
75
79
|
}
|
|
76
80
|
);
|
|
77
81
|
}
|
|
78
82
|
);
|
|
79
|
-
|
|
80
|
-
const
|
|
81
|
-
({ className
|
|
82
|
-
const
|
|
83
|
-
|
|
83
|
+
CardDescription.displayName = "CardDescription";
|
|
84
|
+
const CardContent = forwardRef(
|
|
85
|
+
({ className, "data-cy": dataCy, "data-testid": dataTestId, ...props }, ref) => {
|
|
86
|
+
const finalDataCy = dataCy || "card-content";
|
|
87
|
+
const finalTestId = dataTestId || "card-content";
|
|
88
|
+
return /* @__PURE__ */ jsx(
|
|
84
89
|
"div",
|
|
85
90
|
{
|
|
86
|
-
ref
|
|
87
|
-
className:
|
|
88
|
-
"data-cy":
|
|
89
|
-
"data-testid":
|
|
90
|
-
...
|
|
91
|
+
ref,
|
|
92
|
+
className: cn("card-content", className),
|
|
93
|
+
"data-cy": finalDataCy,
|
|
94
|
+
"data-testid": finalTestId,
|
|
95
|
+
...props
|
|
91
96
|
}
|
|
92
97
|
);
|
|
93
98
|
}
|
|
94
99
|
);
|
|
95
|
-
|
|
96
|
-
const
|
|
97
|
-
({ className
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
+
CardContent.displayName = "CardContent";
|
|
101
|
+
const CardFooter = forwardRef(
|
|
102
|
+
({ className, "data-cy": dataCy, "data-testid": dataTestId, ...props }, ref) => {
|
|
103
|
+
const finalDataCy = dataCy || "card-footer";
|
|
104
|
+
const finalTestId = dataTestId || "card-footer";
|
|
105
|
+
return /* @__PURE__ */ jsx(
|
|
100
106
|
"div",
|
|
101
107
|
{
|
|
102
|
-
ref
|
|
103
|
-
className:
|
|
104
|
-
"data-cy":
|
|
105
|
-
"data-testid":
|
|
106
|
-
...
|
|
108
|
+
ref,
|
|
109
|
+
className: cn("card-footer", className),
|
|
110
|
+
"data-cy": finalDataCy,
|
|
111
|
+
"data-testid": finalTestId,
|
|
112
|
+
...props
|
|
107
113
|
}
|
|
108
114
|
);
|
|
109
115
|
}
|
|
110
116
|
);
|
|
111
|
-
|
|
117
|
+
CardFooter.displayName = "CardFooter";
|
|
112
118
|
export {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
+
Card,
|
|
120
|
+
CardContent,
|
|
121
|
+
CardDescription,
|
|
122
|
+
CardFooter,
|
|
123
|
+
CardHeader,
|
|
124
|
+
CardTitle
|
|
119
125
|
};
|
package/dist/index12.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),e=require("react"),t=require("./index17.cjs");;/* empty css */const d=e.forwardRef(({columns:e,data:d,striped:r=!1,hoverable:l=!1,className:s,"data-cy":c,"data-testid":i,...y},o)=>{const b=c||"datatable",n=i||"datatable";return a.jsx("div",{className:"datatable-wrapper","data-cy":`${b}-wrapper`,"data-testid":`${n}-wrapper`,children:a.jsxs("table",{ref:o,className:t.cn("datatable",s),"data-cy":b,"data-testid":n,...y,children:[a.jsx("thead",{className:"datatable__head","data-cy":`${b}-head`,"data-testid":`${n}-head`,children:a.jsx("tr",{children:e.map(e=>a.jsx("th",{className:"datatable__header-cell","data-cy":`${b}-header-${e.key}`,"data-testid":`${n}-header-${e.key}`,children:e.header},e.key))})}),a.jsx("tbody",{"data-cy":`${b}-body`,"data-testid":`${n}-body`,children:0===d.length?a.jsx("tr",{children:a.jsx("td",{colSpan:e.length,className:"datatable__empty","data-cy":`${b}-empty`,"data-testid":`${n}-empty`,children:"No data available"})}):d.map((d,s)=>a.jsx("tr",{className:t.cn("datatable__body-row",l&&"datatable__body-row--hoverable",r&&"datatable__body-row--striped"),"data-cy":`${b}-row-${s}`,"data-testid":`${n}-row-${s}`,children:e.map(e=>a.jsx("td",{className:"datatable__body-cell","data-cy":`${b}-cell-${s}-${e.key}`,"data-testid":`${n}-cell-${s}-${e.key}`,children:String(d[e.key]??"")},e.key))},s))})]})})});d.displayName="DataTable",exports.DataTable=d;
|
package/dist/index12.js
CHANGED
|
@@ -1,83 +1,84 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import { forwardRef
|
|
3
|
-
import { cn
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { cn } from "./index17.js";
|
|
4
4
|
/* empty css */
|
|
5
|
-
const
|
|
5
|
+
const DataTable = forwardRef(
|
|
6
6
|
({
|
|
7
|
-
columns
|
|
8
|
-
data
|
|
9
|
-
striped
|
|
10
|
-
hoverable
|
|
11
|
-
className
|
|
12
|
-
"data-cy":
|
|
13
|
-
"data-testid":
|
|
14
|
-
...
|
|
15
|
-
},
|
|
16
|
-
const
|
|
17
|
-
|
|
7
|
+
columns,
|
|
8
|
+
data,
|
|
9
|
+
striped = false,
|
|
10
|
+
hoverable = false,
|
|
11
|
+
className,
|
|
12
|
+
"data-cy": dataCy,
|
|
13
|
+
"data-testid": dataTestId,
|
|
14
|
+
...props
|
|
15
|
+
}, ref) => {
|
|
16
|
+
const finalDataCy = dataCy || "datatable";
|
|
17
|
+
const finalTestId = dataTestId || "datatable";
|
|
18
|
+
return /* @__PURE__ */ jsx(
|
|
18
19
|
"div",
|
|
19
20
|
{
|
|
20
21
|
className: "datatable-wrapper",
|
|
21
|
-
"data-cy": `${
|
|
22
|
-
"data-testid": `${
|
|
23
|
-
children: /* @__PURE__ */
|
|
22
|
+
"data-cy": `${finalDataCy}-wrapper`,
|
|
23
|
+
"data-testid": `${finalTestId}-wrapper`,
|
|
24
|
+
children: /* @__PURE__ */ jsxs(
|
|
24
25
|
"table",
|
|
25
26
|
{
|
|
26
|
-
ref
|
|
27
|
-
className:
|
|
28
|
-
"data-cy":
|
|
29
|
-
"data-testid":
|
|
30
|
-
...
|
|
27
|
+
ref,
|
|
28
|
+
className: cn("datatable", className),
|
|
29
|
+
"data-cy": finalDataCy,
|
|
30
|
+
"data-testid": finalTestId,
|
|
31
|
+
...props,
|
|
31
32
|
children: [
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
+
/* @__PURE__ */ jsx(
|
|
33
34
|
"thead",
|
|
34
35
|
{
|
|
35
36
|
className: "datatable__head",
|
|
36
|
-
"data-cy": `${
|
|
37
|
-
"data-testid": `${
|
|
38
|
-
children: /* @__PURE__ */
|
|
37
|
+
"data-cy": `${finalDataCy}-head`,
|
|
38
|
+
"data-testid": `${finalTestId}-head`,
|
|
39
|
+
children: /* @__PURE__ */ jsx("tr", { children: columns.map((column) => /* @__PURE__ */ jsx(
|
|
39
40
|
"th",
|
|
40
41
|
{
|
|
41
42
|
className: "datatable__header-cell",
|
|
42
|
-
"data-cy": `${
|
|
43
|
-
"data-testid": `${
|
|
44
|
-
children:
|
|
43
|
+
"data-cy": `${finalDataCy}-header-${column.key}`,
|
|
44
|
+
"data-testid": `${finalTestId}-header-${column.key}`,
|
|
45
|
+
children: column.header
|
|
45
46
|
},
|
|
46
|
-
|
|
47
|
+
column.key
|
|
47
48
|
)) })
|
|
48
49
|
}
|
|
49
50
|
),
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ jsx("tbody", { "data-cy": `${finalDataCy}-body`, "data-testid": `${finalTestId}-body`, children: data.length === 0 ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx(
|
|
51
52
|
"td",
|
|
52
53
|
{
|
|
53
|
-
colSpan:
|
|
54
|
+
colSpan: columns.length,
|
|
54
55
|
className: "datatable__empty",
|
|
55
|
-
"data-cy": `${
|
|
56
|
-
"data-testid": `${
|
|
56
|
+
"data-cy": `${finalDataCy}-empty`,
|
|
57
|
+
"data-testid": `${finalTestId}-empty`,
|
|
57
58
|
children: "No data available"
|
|
58
59
|
}
|
|
59
|
-
) }) :
|
|
60
|
+
) }) : data.map((row, rowIndex) => /* @__PURE__ */ jsx(
|
|
60
61
|
"tr",
|
|
61
62
|
{
|
|
62
|
-
className:
|
|
63
|
+
className: cn(
|
|
63
64
|
"datatable__body-row",
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
hoverable && "datatable__body-row--hoverable",
|
|
66
|
+
striped && "datatable__body-row--striped"
|
|
66
67
|
),
|
|
67
|
-
"data-cy": `${
|
|
68
|
-
"data-testid": `${
|
|
69
|
-
children:
|
|
68
|
+
"data-cy": `${finalDataCy}-row-${rowIndex}`,
|
|
69
|
+
"data-testid": `${finalTestId}-row-${rowIndex}`,
|
|
70
|
+
children: columns.map((column) => /* @__PURE__ */ jsx(
|
|
70
71
|
"td",
|
|
71
72
|
{
|
|
72
73
|
className: "datatable__body-cell",
|
|
73
|
-
"data-cy": `${
|
|
74
|
-
"data-testid": `${
|
|
75
|
-
children: String(
|
|
74
|
+
"data-cy": `${finalDataCy}-cell-${rowIndex}-${column.key}`,
|
|
75
|
+
"data-testid": `${finalTestId}-cell-${rowIndex}-${column.key}`,
|
|
76
|
+
children: String(row[column.key] ?? "")
|
|
76
77
|
},
|
|
77
|
-
|
|
78
|
+
column.key
|
|
78
79
|
))
|
|
79
80
|
},
|
|
80
|
-
|
|
81
|
+
rowIndex
|
|
81
82
|
)) })
|
|
82
83
|
]
|
|
83
84
|
}
|
|
@@ -86,7 +87,7 @@ const n = f(
|
|
|
86
87
|
);
|
|
87
88
|
}
|
|
88
89
|
);
|
|
89
|
-
|
|
90
|
+
DataTable.displayName = "DataTable";
|
|
90
91
|
export {
|
|
91
|
-
|
|
92
|
+
DataTable
|
|
92
93
|
};
|
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 e=require("react/jsx-runtime"),a=require("react"),i=require("./index17.cjs");;/* empty css */const r=a.forwardRef(({variant:a="primary",selected:r=!1,disabled:s=!1,className:t,children:c,"data-testid":d,"data-cy":l,...n},p)=>{const h=i.cn("chip",`chip--${a}`,r&&"chip--selected",s&&"chip--disabled",t);return e.jsx("div",{ref:p,className:h,"data-testid":d||`chip-${a}`,"data-cy":l||`chip-${a}`,"aria-selected":r,"aria-disabled":s,"aria-label":"string"==typeof c?c:void 0,...n,children:e.jsx("span",{className:"chip__label",children:c})})});r.displayName="Chip",exports.Chip=r;
|