@adam-milo/ui 1.0.22 → 1.0.24
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 +18 -9
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +53 -59
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +50 -104
- package/dist/index12.cjs +1 -1
- package/dist/index12.js +108 -76
- package/dist/index13.cjs +1 -1
- package/dist/index13.js +77 -26
- package/dist/index14.cjs +1 -1
- package/dist/index14.js +22 -462
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +466 -109
- package/dist/index16.cjs +1 -1
- package/dist/index16.js +111 -30
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +42 -12
- package/dist/index18.cjs +1 -0
- package/dist/index18.js +14 -0
- package/dist/index2.cjs +1 -1
- package/dist/index2.js +1 -1
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +20 -299
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +298 -13
- package/dist/index22.cjs +1 -0
- package/dist/index22.js +16 -0
- package/dist/index25.cjs +1 -0
- package/dist/index25.js +1193 -0
- package/dist/index3.cjs +1 -1
- package/dist/index3.js +2 -2
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +7 -19
- package/dist/index36.cjs +1 -0
- package/dist/index36.js +21 -0
- package/dist/index38.cjs +1 -0
- package/dist/index38.js +6 -0
- package/dist/index39.cjs +1 -0
- package/dist/index39.js +11 -0
- package/dist/index4.cjs +1 -1
- package/dist/index4.js +1 -1
- package/dist/index40.cjs +1 -0
- package/dist/index40.js +70 -0
- package/dist/index41.cjs +1 -0
- package/dist/index41.js +39 -0
- package/dist/index42.cjs +1 -0
- package/dist/index42.js +64 -0
- package/dist/index43.cjs +1 -0
- package/dist/index43.js +10 -0
- package/dist/index44.cjs +1 -0
- package/dist/index44.js +212 -0
- package/dist/index45.cjs +1 -0
- package/dist/index45.js +29 -0
- package/dist/index46.cjs +1 -0
- package/dist/index46.js +208 -0
- package/dist/index47.cjs +1 -0
- package/dist/index47.js +14 -0
- package/dist/index48.cjs +1 -0
- package/dist/index48.js +293 -0
- package/dist/index49.cjs +1 -0
- package/dist/index49.js +18 -0
- package/dist/index5.cjs +1 -1
- package/dist/index5.js +1 -1
- package/dist/index50.cjs +1 -0
- package/dist/index50.js +43 -0
- package/dist/index51.cjs +1 -0
- package/dist/index51.js +89 -0
- package/dist/index52.cjs +1 -0
- package/dist/index52.js +14 -0
- package/dist/index53.cjs +1 -0
- package/dist/index53.js +71 -0
- package/dist/index54.cjs +1 -0
- package/dist/index54.js +6 -0
- package/dist/index55.cjs +1 -0
- package/dist/index55.js +14 -0
- package/dist/index56.cjs +1 -0
- package/dist/index56.js +34 -0
- package/dist/index57.cjs +1 -0
- package/dist/index57.js +122 -0
- package/dist/index58.cjs +1 -0
- package/dist/index58.js +11 -0
- package/dist/index59.cjs +1 -0
- package/dist/index59.js +17 -0
- package/dist/index6.cjs +1 -1
- package/dist/index6.js +2 -2
- package/dist/index60.cjs +1 -0
- package/dist/index60.js +297 -0
- package/dist/index61.cjs +1 -0
- package/dist/index61.js +25 -0
- package/dist/index62.cjs +1 -0
- package/dist/index62.js +39 -0
- package/dist/index63.cjs +1 -0
- package/dist/index63.js +625 -0
- package/dist/index64.cjs +1 -0
- package/dist/index64.js +39 -0
- package/dist/index65.cjs +1 -0
- package/dist/index65.js +38 -0
- package/dist/index66.cjs +1 -0
- package/dist/index66.js +7 -0
- package/dist/index67.cjs +1 -0
- package/dist/index67.js +10 -0
- package/dist/index68.cjs +1 -0
- package/dist/index68.js +5 -0
- package/dist/index69.cjs +1 -0
- package/dist/index69.js +35 -0
- package/dist/index7.cjs +1 -1
- package/dist/index7.js +1 -1
- package/dist/index70.cjs +1 -0
- package/dist/index70.js +180 -0
- package/dist/index71.cjs +1 -0
- package/dist/index71.js +21 -0
- package/dist/index72.cjs +1 -0
- package/dist/index72.js +721 -0
- package/dist/index73.cjs +1 -0
- package/dist/index73.js +154 -0
- package/dist/index74.cjs +1 -0
- package/dist/index74.js +173 -0
- package/dist/index75.cjs +1 -0
- package/dist/index75.js +88 -0
- package/dist/index76.cjs +1 -0
- package/dist/index76.js +47 -0
- package/dist/index77.cjs +1 -0
- package/dist/index77.js +13 -0
- package/dist/index78.cjs +1 -0
- package/dist/index78.js +19 -0
- package/dist/index79.cjs +1 -0
- package/dist/index79.js +102 -0
- package/dist/index8.cjs +1 -1
- package/dist/index8.js +1 -1
- package/dist/index80.cjs +1 -0
- package/dist/index80.js +11 -0
- package/dist/index81.cjs +1 -0
- package/dist/index81.js +29 -0
- package/dist/index82.cjs +1 -0
- package/dist/index82.js +16 -0
- package/dist/index83.cjs +1 -0
- package/dist/index83.js +48 -0
- package/dist/index84.cjs +1 -0
- package/dist/index84.js +9 -0
- package/dist/index85.cjs +1 -0
- package/dist/index85.js +37 -0
- package/dist/index9.cjs +1 -1
- package/dist/index9.js +224 -35
- package/dist/src/components/forms/select/Select.component.d.ts +100 -0
- package/dist/src/components/forms/select/Select.component.d.ts.map +1 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -1
- package/dist/index19.cjs +0 -1
- package/dist/index19.js +0 -22
- package/dist/index30.cjs +0 -1
- package/dist/index30.js +0 -9
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index2.cjs"),r=require("./index3.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index2.cjs"),r=require("./index3.cjs"),t=require("./index4.cjs"),o=require("./index5.cjs"),i=require("./index6.cjs"),s=require("./index7.cjs"),a=require("./index8.cjs"),p=require("./index9.cjs"),l=require("./index10.cjs"),n=require("./index11.cjs"),x=require("./index12.cjs"),c=require("./index13.cjs"),d=require("./index14.cjs"),u=require("./index15.cjs"),g=require("./index16.cjs"),C=require("./index17.cjs"),D=require("./index18.cjs"),b=require("@adam-milo/icons");exports.Button=e.Button,exports.EmailInput=r.EmailInput,exports.PasswordInput=t.PasswordInput,exports.NumericInput=o.NumericInput,exports.AlphanumericInput=i.AlphanumericInput,exports.Checkbox=s.Checkbox,exports.Radio=a.Radio,exports.Select=p.Select,exports.SelectContent=p.SelectContent,exports.SelectGroup=p.SelectGroup,exports.SelectItem=p.SelectItem,exports.SelectLabel=p.SelectLabel,exports.SelectSeparator=p.SelectSeparator,exports.SelectTrigger=p.SelectTrigger,exports.SelectValue=p.SelectValue,exports.Tabs=l.Tabs,exports.TabsContent=l.TabsContent,exports.TabsList=l.TabsList,exports.TabsTrigger=l.TabsTrigger,exports.Alert=n.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=c.DataTable,exports.Chip=d.Chip,exports.ChipGroup=u.ChipGroup,exports.Dialog=g.Dialog,exports.DialogClose=g.DialogClose,exports.DialogContent=g.DialogContent,exports.DialogDescription=g.DialogDescription,exports.DialogFooter=g.DialogFooter,exports.DialogHeader=g.DialogHeader,exports.DialogOverlay=g.DialogOverlay,exports.DialogPortal=g.DialogPortal,exports.DialogTitle=g.DialogTitle,exports.DialogTrigger=g.DialogTrigger,exports.Stack=C.Stack,exports.cn=D.cn,exports.generateId=D.generateId,Object.defineProperty(exports,"Icon",{enumerable:!0,get:()=>b.Icon}),Object.defineProperty(exports,"availableIcons",{enumerable:!0,get:()=>b.availableIcons});
|
package/dist/index.js
CHANGED
|
@@ -5,15 +5,16 @@ import { NumericInput } from "./index5.js";
|
|
|
5
5
|
import { AlphanumericInput } from "./index6.js";
|
|
6
6
|
import { Checkbox } from "./index7.js";
|
|
7
7
|
import { Radio } from "./index8.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
8
|
+
import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue } from "./index9.js";
|
|
9
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from "./index10.js";
|
|
10
|
+
import { Alert } from "./index11.js";
|
|
11
|
+
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "./index12.js";
|
|
12
|
+
import { DataTable } from "./index13.js";
|
|
13
|
+
import { Chip } from "./index14.js";
|
|
14
|
+
import { ChipGroup } from "./index15.js";
|
|
15
|
+
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from "./index16.js";
|
|
16
|
+
import { Stack } from "./index17.js";
|
|
17
|
+
import { cn, generateId } from "./index18.js";
|
|
17
18
|
import { Icon, availableIcons } from "@adam-milo/icons";
|
|
18
19
|
export {
|
|
19
20
|
Alert,
|
|
@@ -44,6 +45,14 @@ export {
|
|
|
44
45
|
NumericInput,
|
|
45
46
|
PasswordInput,
|
|
46
47
|
Radio,
|
|
48
|
+
Select,
|
|
49
|
+
SelectContent,
|
|
50
|
+
SelectGroup,
|
|
51
|
+
SelectItem,
|
|
52
|
+
SelectLabel,
|
|
53
|
+
SelectSeparator,
|
|
54
|
+
SelectTrigger,
|
|
55
|
+
SelectValue,
|
|
47
56
|
Stack,
|
|
48
57
|
Tabs,
|
|
49
58
|
TabsContent,
|
package/dist/index10.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),e=require("react"),a=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),e=require("react"),a=require("@radix-ui/react-tabs"),s=require("./index18.cjs");function r(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const a in t)if("default"!==a){const s=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,s.get?s:{enumerable:!0,get:()=>t[a]})}return e.default=t,Object.freeze(e)};/* empty css */const i=r(a),n=i.Root,c=e.forwardRef(({className:e,"data-cy":a,"data-testid":r,...n},c)=>{const o=a||"tabs-list",d=r||"tabs-list";return t.jsx(i.List,{ref:c,className:s.cn("tabs-list",e),"data-cy":o,"data-testid":d,...n})});c.displayName=i.List.displayName;const o=e.forwardRef(({className:e,value:a,"data-cy":r,"data-testid":n,...c},o)=>{const d=r||(a?`tabs-trigger-${a}`:"tabs-trigger"),l=n||(a?`tabs-trigger-${a}`:"tabs-trigger");return t.jsx(i.Trigger,{ref:o,className:s.cn("tabs-trigger",e),value:a,"data-cy":d,"data-testid":l,...c})});o.displayName=i.Trigger.displayName;const d=e.forwardRef(({className:e,value:a,"data-cy":r,"data-testid":n,...c},o)=>{const d=r||(a?`tabs-content-${a}`:"tabs-content"),l=n||(a?`tabs-content-${a}`:"tabs-content");return t.jsx(i.Content,{ref:o,className:s.cn("tabs-content",e),value:a,"data-cy":d,"data-testid":l,...c})});d.displayName=i.Content.displayName,exports.Tabs=n,exports.TabsContent=d,exports.TabsList=c,exports.TabsTrigger=o;
|
package/dist/index10.js
CHANGED
|
@@ -1,71 +1,65 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
|
-
import
|
|
3
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
4
|
+
import { cn } from "./index18.js";
|
|
4
5
|
/* empty css */
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"data-cy": dataCy,
|
|
13
|
-
"data-testid": dataTestId,
|
|
14
|
-
...props
|
|
15
|
-
}, ref) => {
|
|
16
|
-
const roleMap = {
|
|
17
|
-
info: "status",
|
|
18
|
-
success: "status",
|
|
19
|
-
warning: "alert",
|
|
20
|
-
error: "alert"
|
|
21
|
-
};
|
|
22
|
-
const finalDataCy = dataCy || `alert-${variant}`;
|
|
23
|
-
const finalTestId = dataTestId || `alert-${variant}`;
|
|
24
|
-
return /* @__PURE__ */ jsxs(
|
|
25
|
-
"div",
|
|
6
|
+
const Tabs = TabsPrimitive.Root;
|
|
7
|
+
const TabsList = forwardRef(
|
|
8
|
+
({ className, "data-cy": dataCy, "data-testid": dataTestId, ...props }, ref) => {
|
|
9
|
+
const finalDataCy = dataCy || "tabs-list";
|
|
10
|
+
const finalTestId = dataTestId || "tabs-list";
|
|
11
|
+
return /* @__PURE__ */ jsx(
|
|
12
|
+
TabsPrimitive.List,
|
|
26
13
|
{
|
|
27
14
|
ref,
|
|
28
|
-
|
|
29
|
-
className: cn("alert", `alert--${variant}`, className),
|
|
15
|
+
className: cn("tabs-list", className),
|
|
30
16
|
"data-cy": finalDataCy,
|
|
31
17
|
"data-testid": finalTestId,
|
|
32
|
-
...props
|
|
33
|
-
children: [
|
|
34
|
-
icon && /* @__PURE__ */ jsx(
|
|
35
|
-
"div",
|
|
36
|
-
{
|
|
37
|
-
className: "alert__icon",
|
|
38
|
-
"data-cy": `${finalDataCy}-icon`,
|
|
39
|
-
"data-testid": `${finalTestId}-icon`,
|
|
40
|
-
children: icon
|
|
41
|
-
}
|
|
42
|
-
),
|
|
43
|
-
/* @__PURE__ */ jsxs(
|
|
44
|
-
"div",
|
|
45
|
-
{
|
|
46
|
-
className: "alert__content",
|
|
47
|
-
"data-cy": `${finalDataCy}-content`,
|
|
48
|
-
"data-testid": `${finalTestId}-content`,
|
|
49
|
-
children: [
|
|
50
|
-
title && /* @__PURE__ */ jsx(
|
|
51
|
-
"div",
|
|
52
|
-
{
|
|
53
|
-
className: "alert__title",
|
|
54
|
-
"data-cy": `${finalDataCy}-title`,
|
|
55
|
-
"data-testid": `${finalTestId}-title`,
|
|
56
|
-
children: title
|
|
57
|
-
}
|
|
58
|
-
),
|
|
59
|
-
/* @__PURE__ */ jsx("div", { "data-cy": `${finalDataCy}-message`, "data-testid": `${finalTestId}-message`, children })
|
|
60
|
-
]
|
|
61
|
-
}
|
|
62
|
-
)
|
|
63
|
-
]
|
|
18
|
+
...props
|
|
64
19
|
}
|
|
65
20
|
);
|
|
66
21
|
}
|
|
67
22
|
);
|
|
68
|
-
|
|
23
|
+
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
24
|
+
const TabsTrigger = forwardRef(
|
|
25
|
+
({ className, value, "data-cy": dataCy, "data-testid": dataTestId, ...props }, ref) => {
|
|
26
|
+
const finalDataCy = dataCy || (value ? `tabs-trigger-${value}` : "tabs-trigger");
|
|
27
|
+
const finalTestId = dataTestId || (value ? `tabs-trigger-${value}` : "tabs-trigger");
|
|
28
|
+
return /* @__PURE__ */ jsx(
|
|
29
|
+
TabsPrimitive.Trigger,
|
|
30
|
+
{
|
|
31
|
+
ref,
|
|
32
|
+
className: cn("tabs-trigger", className),
|
|
33
|
+
value,
|
|
34
|
+
"data-cy": finalDataCy,
|
|
35
|
+
"data-testid": finalTestId,
|
|
36
|
+
...props
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
42
|
+
const TabsContent = forwardRef(
|
|
43
|
+
({ className, value, "data-cy": dataCy, "data-testid": dataTestId, ...props }, ref) => {
|
|
44
|
+
const finalDataCy = dataCy || (value ? `tabs-content-${value}` : "tabs-content");
|
|
45
|
+
const finalTestId = dataTestId || (value ? `tabs-content-${value}` : "tabs-content");
|
|
46
|
+
return /* @__PURE__ */ jsx(
|
|
47
|
+
TabsPrimitive.Content,
|
|
48
|
+
{
|
|
49
|
+
ref,
|
|
50
|
+
className: cn("tabs-content", className),
|
|
51
|
+
value,
|
|
52
|
+
"data-cy": finalDataCy,
|
|
53
|
+
"data-testid": finalTestId,
|
|
54
|
+
...props
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
69
60
|
export {
|
|
70
|
-
|
|
61
|
+
Tabs,
|
|
62
|
+
TabsContent,
|
|
63
|
+
TabsList,
|
|
64
|
+
TabsTrigger
|
|
71
65
|
};
|
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 t=require("react/jsx-runtime"),e=require("react"),a=require("./index18.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/index11.js
CHANGED
|
@@ -1,125 +1,71 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
|
-
import { cn } from "./
|
|
3
|
+
import { cn } from "./index18.js";
|
|
4
4
|
/* empty css */
|
|
5
|
-
const
|
|
5
|
+
const Alert = forwardRef(
|
|
6
6
|
({
|
|
7
|
-
variant = "
|
|
7
|
+
variant = "info",
|
|
8
|
+
title,
|
|
9
|
+
icon,
|
|
8
10
|
className,
|
|
9
11
|
children,
|
|
10
12
|
"data-cy": dataCy,
|
|
11
13
|
"data-testid": dataTestId,
|
|
12
14
|
...props
|
|
13
15
|
}, ref) => {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
const roleMap = {
|
|
17
|
+
info: "status",
|
|
18
|
+
success: "status",
|
|
19
|
+
warning: "alert",
|
|
20
|
+
error: "alert"
|
|
21
|
+
};
|
|
22
|
+
const finalDataCy = dataCy || `alert-${variant}`;
|
|
23
|
+
const finalTestId = dataTestId || `alert-${variant}`;
|
|
24
|
+
return /* @__PURE__ */ jsxs(
|
|
17
25
|
"div",
|
|
18
26
|
{
|
|
19
27
|
ref,
|
|
20
|
-
|
|
28
|
+
role: roleMap[variant],
|
|
29
|
+
className: cn("alert", `alert--${variant}`, className),
|
|
21
30
|
"data-cy": finalDataCy,
|
|
22
31
|
"data-testid": finalTestId,
|
|
23
32
|
...props,
|
|
24
|
-
children
|
|
33
|
+
children: [
|
|
34
|
+
icon && /* @__PURE__ */ jsx(
|
|
35
|
+
"div",
|
|
36
|
+
{
|
|
37
|
+
className: "alert__icon",
|
|
38
|
+
"data-cy": `${finalDataCy}-icon`,
|
|
39
|
+
"data-testid": `${finalTestId}-icon`,
|
|
40
|
+
children: icon
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
/* @__PURE__ */ jsxs(
|
|
44
|
+
"div",
|
|
45
|
+
{
|
|
46
|
+
className: "alert__content",
|
|
47
|
+
"data-cy": `${finalDataCy}-content`,
|
|
48
|
+
"data-testid": `${finalTestId}-content`,
|
|
49
|
+
children: [
|
|
50
|
+
title && /* @__PURE__ */ jsx(
|
|
51
|
+
"div",
|
|
52
|
+
{
|
|
53
|
+
className: "alert__title",
|
|
54
|
+
"data-cy": `${finalDataCy}-title`,
|
|
55
|
+
"data-testid": `${finalTestId}-title`,
|
|
56
|
+
children: title
|
|
57
|
+
}
|
|
58
|
+
),
|
|
59
|
+
/* @__PURE__ */ jsx("div", { "data-cy": `${finalDataCy}-message`, "data-testid": `${finalTestId}-message`, children })
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
]
|
|
25
64
|
}
|
|
26
65
|
);
|
|
27
66
|
}
|
|
28
67
|
);
|
|
29
|
-
|
|
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(
|
|
35
|
-
"div",
|
|
36
|
-
{
|
|
37
|
-
ref,
|
|
38
|
-
className: cn("card-header", className),
|
|
39
|
-
"data-cy": finalDataCy,
|
|
40
|
-
"data-testid": finalTestId,
|
|
41
|
-
...props
|
|
42
|
-
}
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
);
|
|
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";
|
|
51
|
-
return (
|
|
52
|
-
// eslint-disable-next-line jsx-a11y/heading-has-content
|
|
53
|
-
/* @__PURE__ */ jsx(
|
|
54
|
-
"h3",
|
|
55
|
-
{
|
|
56
|
-
ref,
|
|
57
|
-
className: cn("card-title", className),
|
|
58
|
-
"data-cy": finalDataCy,
|
|
59
|
-
"data-testid": finalTestId,
|
|
60
|
-
...props
|
|
61
|
-
}
|
|
62
|
-
)
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
);
|
|
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(
|
|
72
|
-
"p",
|
|
73
|
-
{
|
|
74
|
-
ref,
|
|
75
|
-
className: cn("card-description", className),
|
|
76
|
-
"data-cy": finalDataCy,
|
|
77
|
-
"data-testid": finalTestId,
|
|
78
|
-
...props
|
|
79
|
-
}
|
|
80
|
-
);
|
|
81
|
-
}
|
|
82
|
-
);
|
|
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(
|
|
89
|
-
"div",
|
|
90
|
-
{
|
|
91
|
-
ref,
|
|
92
|
-
className: cn("card-content", className),
|
|
93
|
-
"data-cy": finalDataCy,
|
|
94
|
-
"data-testid": finalTestId,
|
|
95
|
-
...props
|
|
96
|
-
}
|
|
97
|
-
);
|
|
98
|
-
}
|
|
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(
|
|
106
|
-
"div",
|
|
107
|
-
{
|
|
108
|
-
ref,
|
|
109
|
-
className: cn("card-footer", className),
|
|
110
|
-
"data-cy": finalDataCy,
|
|
111
|
-
"data-testid": finalTestId,
|
|
112
|
-
...props
|
|
113
|
-
}
|
|
114
|
-
);
|
|
115
|
-
}
|
|
116
|
-
);
|
|
117
|
-
CardFooter.displayName = "CardFooter";
|
|
68
|
+
Alert.displayName = "Alert";
|
|
118
69
|
export {
|
|
119
|
-
|
|
120
|
-
CardContent,
|
|
121
|
-
CardDescription,
|
|
122
|
-
CardFooter,
|
|
123
|
-
CardHeader,
|
|
124
|
-
CardTitle
|
|
70
|
+
Alert
|
|
125
71
|
};
|
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"),t=require("react"),e=require("./index18.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/index12.js
CHANGED
|
@@ -1,93 +1,125 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
|
-
import { cn } from "./
|
|
3
|
+
import { cn } from "./index18.js";
|
|
4
4
|
/* empty css */
|
|
5
|
-
const
|
|
5
|
+
const Card = forwardRef(
|
|
6
6
|
({
|
|
7
|
-
|
|
8
|
-
data,
|
|
9
|
-
striped = false,
|
|
10
|
-
hoverable = false,
|
|
7
|
+
variant = "default",
|
|
11
8
|
className,
|
|
9
|
+
children,
|
|
12
10
|
"data-cy": dataCy,
|
|
13
11
|
"data-testid": dataTestId,
|
|
14
12
|
...props
|
|
15
13
|
}, ref) => {
|
|
16
|
-
const finalDataCy = dataCy ||
|
|
17
|
-
const finalTestId = dataTestId ||
|
|
14
|
+
const finalDataCy = dataCy || `card-${variant}`;
|
|
15
|
+
const finalTestId = dataTestId || `card-${variant}`;
|
|
18
16
|
return /* @__PURE__ */ jsx(
|
|
19
17
|
"div",
|
|
20
18
|
{
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
"data-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
ref,
|
|
28
|
-
className: cn("datatable", className),
|
|
29
|
-
"data-cy": finalDataCy,
|
|
30
|
-
"data-testid": finalTestId,
|
|
31
|
-
...props,
|
|
32
|
-
children: [
|
|
33
|
-
/* @__PURE__ */ jsx(
|
|
34
|
-
"thead",
|
|
35
|
-
{
|
|
36
|
-
className: "datatable__head",
|
|
37
|
-
"data-cy": `${finalDataCy}-head`,
|
|
38
|
-
"data-testid": `${finalTestId}-head`,
|
|
39
|
-
children: /* @__PURE__ */ jsx("tr", { children: columns.map((column) => /* @__PURE__ */ jsx(
|
|
40
|
-
"th",
|
|
41
|
-
{
|
|
42
|
-
className: "datatable__header-cell",
|
|
43
|
-
"data-cy": `${finalDataCy}-header-${column.key}`,
|
|
44
|
-
"data-testid": `${finalTestId}-header-${column.key}`,
|
|
45
|
-
children: column.header
|
|
46
|
-
},
|
|
47
|
-
column.key
|
|
48
|
-
)) })
|
|
49
|
-
}
|
|
50
|
-
),
|
|
51
|
-
/* @__PURE__ */ jsx("tbody", { "data-cy": `${finalDataCy}-body`, "data-testid": `${finalTestId}-body`, children: data.length === 0 ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx(
|
|
52
|
-
"td",
|
|
53
|
-
{
|
|
54
|
-
colSpan: columns.length,
|
|
55
|
-
className: "datatable__empty",
|
|
56
|
-
"data-cy": `${finalDataCy}-empty`,
|
|
57
|
-
"data-testid": `${finalTestId}-empty`,
|
|
58
|
-
children: "No data available"
|
|
59
|
-
}
|
|
60
|
-
) }) : data.map((row, rowIndex) => /* @__PURE__ */ jsx(
|
|
61
|
-
"tr",
|
|
62
|
-
{
|
|
63
|
-
className: cn(
|
|
64
|
-
"datatable__body-row",
|
|
65
|
-
hoverable && "datatable__body-row--hoverable",
|
|
66
|
-
striped && "datatable__body-row--striped"
|
|
67
|
-
),
|
|
68
|
-
"data-cy": `${finalDataCy}-row-${rowIndex}`,
|
|
69
|
-
"data-testid": `${finalTestId}-row-${rowIndex}`,
|
|
70
|
-
children: columns.map((column) => /* @__PURE__ */ jsx(
|
|
71
|
-
"td",
|
|
72
|
-
{
|
|
73
|
-
className: "datatable__body-cell",
|
|
74
|
-
"data-cy": `${finalDataCy}-cell-${rowIndex}-${column.key}`,
|
|
75
|
-
"data-testid": `${finalTestId}-cell-${rowIndex}-${column.key}`,
|
|
76
|
-
children: String(row[column.key] ?? "")
|
|
77
|
-
},
|
|
78
|
-
column.key
|
|
79
|
-
))
|
|
80
|
-
},
|
|
81
|
-
rowIndex
|
|
82
|
-
)) })
|
|
83
|
-
]
|
|
84
|
-
}
|
|
85
|
-
)
|
|
19
|
+
ref,
|
|
20
|
+
className: cn("card", `card--${variant}`, className),
|
|
21
|
+
"data-cy": finalDataCy,
|
|
22
|
+
"data-testid": finalTestId,
|
|
23
|
+
...props,
|
|
24
|
+
children
|
|
86
25
|
}
|
|
87
26
|
);
|
|
88
27
|
}
|
|
89
28
|
);
|
|
90
|
-
|
|
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(
|
|
35
|
+
"div",
|
|
36
|
+
{
|
|
37
|
+
ref,
|
|
38
|
+
className: cn("card-header", className),
|
|
39
|
+
"data-cy": finalDataCy,
|
|
40
|
+
"data-testid": finalTestId,
|
|
41
|
+
...props
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
);
|
|
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";
|
|
51
|
+
return (
|
|
52
|
+
// eslint-disable-next-line jsx-a11y/heading-has-content
|
|
53
|
+
/* @__PURE__ */ jsx(
|
|
54
|
+
"h3",
|
|
55
|
+
{
|
|
56
|
+
ref,
|
|
57
|
+
className: cn("card-title", className),
|
|
58
|
+
"data-cy": finalDataCy,
|
|
59
|
+
"data-testid": finalTestId,
|
|
60
|
+
...props
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
);
|
|
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(
|
|
72
|
+
"p",
|
|
73
|
+
{
|
|
74
|
+
ref,
|
|
75
|
+
className: cn("card-description", className),
|
|
76
|
+
"data-cy": finalDataCy,
|
|
77
|
+
"data-testid": finalTestId,
|
|
78
|
+
...props
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
);
|
|
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(
|
|
89
|
+
"div",
|
|
90
|
+
{
|
|
91
|
+
ref,
|
|
92
|
+
className: cn("card-content", className),
|
|
93
|
+
"data-cy": finalDataCy,
|
|
94
|
+
"data-testid": finalTestId,
|
|
95
|
+
...props
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
}
|
|
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(
|
|
106
|
+
"div",
|
|
107
|
+
{
|
|
108
|
+
ref,
|
|
109
|
+
className: cn("card-footer", className),
|
|
110
|
+
"data-cy": finalDataCy,
|
|
111
|
+
"data-testid": finalTestId,
|
|
112
|
+
...props
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
);
|
|
117
|
+
CardFooter.displayName = "CardFooter";
|
|
91
118
|
export {
|
|
92
|
-
|
|
119
|
+
Card,
|
|
120
|
+
CardContent,
|
|
121
|
+
CardDescription,
|
|
122
|
+
CardFooter,
|
|
123
|
+
CardHeader,
|
|
124
|
+
CardTitle
|
|
93
125
|
};
|
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 a=require("react/jsx-runtime"),e=require("react"),t=require("./index18.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;
|