@adam-milo/ui 1.0.15 → 1.0.17

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 CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index2.cjs"),i=require("./index3.cjs"),l=require("./index4.cjs"),c=require("./index5.cjs"),s=require("./index6.cjs"),t=require("./index7.cjs"),u=require("./index8.cjs"),o=require("./index9.cjs"),p=require("./index10.cjs"),g=require("./index11.cjs"),e=require("./index12.cjs"),D=require("./index13.cjs"),r=require("./index14.cjs"),n=require("@adam-milo/icons");exports.Button=a.Button;exports.EmailInput=i.EmailInput;exports.PasswordInput=l.PasswordInput;exports.NumericInput=c.NumericInput;exports.AlphanumericInput=s.AlphanumericInput;exports.Tabs=t.Tabs;exports.TabsContent=t.TabsContent;exports.TabsList=t.TabsList;exports.TabsTrigger=t.TabsTrigger;exports.Alert=u.Alert;exports.Card=o.Card;exports.CardContent=o.CardContent;exports.CardDescription=o.CardDescription;exports.CardFooter=o.CardFooter;exports.CardHeader=o.CardHeader;exports.CardTitle=o.CardTitle;exports.DataTable=p.DataTable;exports.Chip=g.Chip;exports.Dialog=e.Dialog;exports.DialogClose=e.DialogClose;exports.DialogContent=e.DialogContent;exports.DialogDescription=e.DialogDescription;exports.DialogFooter=e.DialogFooter;exports.DialogHeader=e.DialogHeader;exports.DialogOverlay=e.DialogOverlay;exports.DialogPortal=e.DialogPortal;exports.DialogTitle=e.DialogTitle;exports.DialogTrigger=e.DialogTrigger;exports.Stack=D.Stack;exports.cn=r.cn;exports.generateId=r.generateId;Object.defineProperty(exports,"Icon",{enumerable:!0,get:()=>n.Icon});Object.defineProperty(exports,"availableIcons",{enumerable:!0,get:()=>n.availableIcons});
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index2.cjs"),i=require("./index3.cjs"),c=require("./index4.cjs"),l=require("./index5.cjs"),s=require("./index6.cjs"),u=require("./index7.cjs"),t=require("./index8.cjs"),p=require("./index9.cjs"),o=require("./index10.cjs"),g=require("./index11.cjs"),D=require("./index12.cjs"),e=require("./index13.cjs"),d=require("./index14.cjs"),r=require("./index15.cjs"),n=require("@adam-milo/icons");exports.Button=a.Button;exports.EmailInput=i.EmailInput;exports.PasswordInput=c.PasswordInput;exports.NumericInput=l.NumericInput;exports.AlphanumericInput=s.AlphanumericInput;exports.Checkbox=u.Checkbox;exports.Tabs=t.Tabs;exports.TabsContent=t.TabsContent;exports.TabsList=t.TabsList;exports.TabsTrigger=t.TabsTrigger;exports.Alert=p.Alert;exports.Card=o.Card;exports.CardContent=o.CardContent;exports.CardDescription=o.CardDescription;exports.CardFooter=o.CardFooter;exports.CardHeader=o.CardHeader;exports.CardTitle=o.CardTitle;exports.DataTable=g.DataTable;exports.Chip=D.Chip;exports.Dialog=e.Dialog;exports.DialogClose=e.DialogClose;exports.DialogContent=e.DialogContent;exports.DialogDescription=e.DialogDescription;exports.DialogFooter=e.DialogFooter;exports.DialogHeader=e.DialogHeader;exports.DialogOverlay=e.DialogOverlay;exports.DialogPortal=e.DialogPortal;exports.DialogTitle=e.DialogTitle;exports.DialogTrigger=e.DialogTrigger;exports.Stack=d.Stack;exports.cn=r.cn;exports.generateId=r.generateId;Object.defineProperty(exports,"Icon",{enumerable:!0,get:()=>n.Icon});Object.defineProperty(exports,"availableIcons",{enumerable:!0,get:()=>n.availableIcons});
package/dist/index.js CHANGED
@@ -1,49 +1,51 @@
1
1
  import { Button as e } from "./index2.js";
2
2
  import { EmailInput as a } from "./index3.js";
3
3
  import { PasswordInput as p } from "./index4.js";
4
- import { NumericInput as n } from "./index5.js";
5
- import { AlphanumericInput as g } from "./index6.js";
6
- import { Tabs as x, TabsContent as D, TabsList as s, TabsTrigger as C } from "./index7.js";
7
- import { Alert as T } from "./index8.js";
8
- import { Card as u, CardContent as I, CardDescription as b, CardFooter as h, CardHeader as v, CardTitle as A } from "./index9.js";
9
- import { DataTable as H } from "./index10.js";
10
- import { Chip as k } from "./index11.js";
11
- import { Dialog as y, DialogClose as B, DialogContent as E, DialogDescription as L, DialogFooter as N, DialogHeader as O, DialogOverlay as S, DialogPortal as j, DialogTitle as q, DialogTrigger as z } from "./index12.js";
12
- import { Stack as J } from "./index13.js";
13
- import { cn as M, generateId as Q } from "./index14.js";
14
- import { Icon as U, availableIcons as V } from "@adam-milo/icons";
4
+ import { NumericInput as m } from "./index5.js";
5
+ import { AlphanumericInput as x } from "./index6.js";
6
+ import { Checkbox as g } from "./index7.js";
7
+ import { Tabs as C, TabsContent as s, TabsList as d, TabsTrigger as c } from "./index8.js";
8
+ import { Alert as b } from "./index9.js";
9
+ import { Card as I, CardContent as h, CardDescription as k, CardFooter as v, CardHeader as A, CardTitle as F } from "./index10.js";
10
+ import { DataTable as P } from "./index11.js";
11
+ import { Chip as y } from "./index12.js";
12
+ import { Dialog as E, DialogClose as L, DialogContent as N, DialogDescription as O, DialogFooter as S, DialogHeader as j, DialogOverlay as q, DialogPortal as z, DialogTitle as G, DialogTrigger as J } from "./index13.js";
13
+ import { Stack as M } from "./index14.js";
14
+ import { cn as R, generateId as U } from "./index15.js";
15
+ import { Icon as W, availableIcons as X } from "@adam-milo/icons";
15
16
  export {
16
- T as Alert,
17
- g as AlphanumericInput,
17
+ b as Alert,
18
+ x as AlphanumericInput,
18
19
  e as Button,
19
- u as Card,
20
- I as CardContent,
21
- b as CardDescription,
22
- h as CardFooter,
23
- v as CardHeader,
24
- A as CardTitle,
25
- k as Chip,
26
- H as DataTable,
27
- y as Dialog,
28
- B as DialogClose,
29
- E as DialogContent,
30
- L as DialogDescription,
31
- N as DialogFooter,
32
- O as DialogHeader,
33
- S as DialogOverlay,
34
- j as DialogPortal,
35
- q as DialogTitle,
36
- z as DialogTrigger,
20
+ I as Card,
21
+ h as CardContent,
22
+ k as CardDescription,
23
+ v as CardFooter,
24
+ A as CardHeader,
25
+ F as CardTitle,
26
+ g as Checkbox,
27
+ y as Chip,
28
+ P as DataTable,
29
+ E as Dialog,
30
+ L as DialogClose,
31
+ N as DialogContent,
32
+ O as DialogDescription,
33
+ S as DialogFooter,
34
+ j as DialogHeader,
35
+ q as DialogOverlay,
36
+ z as DialogPortal,
37
+ G as DialogTitle,
38
+ J as DialogTrigger,
37
39
  a as EmailInput,
38
- U as Icon,
39
- n as NumericInput,
40
+ W as Icon,
41
+ m as NumericInput,
40
42
  p as PasswordInput,
41
- J as Stack,
42
- x as Tabs,
43
- D as TabsContent,
44
- s as TabsList,
45
- C as TabsTrigger,
46
- V as availableIcons,
47
- M as cn,
48
- Q as generateId
43
+ M as Stack,
44
+ C as Tabs,
45
+ s as TabsContent,
46
+ d as TabsList,
47
+ c as TabsTrigger,
48
+ X as availableIcons,
49
+ R as cn,
50
+ U as generateId
49
51
  };
package/dist/index10.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),j=require("react"),c=require("./index14.cjs");;/* empty css */const y=j.forwardRef(({columns:r,data:i,striped:b=!1,hoverable:h=!1,className:$,"data-cy":n,"data-testid":p,...o},_)=>{const e=n||"datatable",t=p||"datatable";return a.jsx("div",{className:"datatable-wrapper","data-cy":`${e}-wrapper`,"data-testid":`${t}-wrapper`,children:a.jsxs("table",{ref:_,className:c.cn("datatable",$),"data-cy":e,"data-testid":t,...o,children:[a.jsx("thead",{className:"datatable__head","data-cy":`${e}-head`,"data-testid":`${t}-head`,children:a.jsx("tr",{children:r.map(d=>a.jsx("th",{className:"datatable__header-cell","data-cy":`${e}-header-${d.key}`,"data-testid":`${t}-header-${d.key}`,children:d.header},d.key))})}),a.jsx("tbody",{"data-cy":`${e}-body`,"data-testid":`${t}-body`,children:i.length===0?a.jsx("tr",{children:a.jsx("td",{colSpan:r.length,className:"datatable__empty","data-cy":`${e}-empty`,"data-testid":`${t}-empty`,children:"No data available"})}):i.map((d,l)=>a.jsx("tr",{className:c.cn("datatable__body-row",h&&"datatable__body-row--hoverable",b&&"datatable__body-row--striped"),"data-cy":`${e}-row-${l}`,"data-testid":`${t}-row-${l}`,children:r.map(s=>a.jsx("td",{className:"datatable__body-cell","data-cy":`${e}-cell-${l}-${s.key}`,"data-testid":`${t}-cell-${l}-${s.key}`,children:String(d[s.key]??"")},s.key))},l))})]})})});y.displayName="DataTable";exports.DataTable=y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),i=require("react"),o=require("./index15.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;
package/dist/index10.js CHANGED
@@ -1,92 +1,119 @@
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 "./index14.js";
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { forwardRef as n } from "react";
3
+ import { cn as o } from "./index15.js";
4
4
  /* empty css */
5
- const n = f(
5
+ const f = n(
6
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(
7
+ variant: a = "default",
8
+ className: t,
9
+ children: d,
10
+ "data-cy": e,
11
+ "data-testid": r,
12
+ ...c
13
+ }, s) => {
14
+ const l = e || `card-${a}`, y = r || `card-${a}`;
15
+ return /* @__PURE__ */ i(
18
16
  "div",
19
17
  {
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
- )
18
+ ref: s,
19
+ className: o("card", `card--${a}`, t),
20
+ "data-cy": l,
21
+ "data-testid": y,
22
+ ...c,
23
+ children: d
85
24
  }
86
25
  );
87
26
  }
88
27
  );
89
- n.displayName = "DataTable";
28
+ f.displayName = "Card";
29
+ const C = n(
30
+ ({ className: a, "data-cy": t, "data-testid": d, ...e }, r) => {
31
+ const c = t || "card-header", s = d || "card-header";
32
+ return /* @__PURE__ */ i(
33
+ "div",
34
+ {
35
+ ref: r,
36
+ className: o("card-header", a),
37
+ "data-cy": c,
38
+ "data-testid": s,
39
+ ...e
40
+ }
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
75
+ }
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
91
+ }
92
+ );
93
+ }
94
+ );
95
+ N.displayName = "CardContent";
96
+ const D = n(
97
+ ({ className: a, "data-cy": t, "data-testid": d, ...e }, r) => {
98
+ const c = t || "card-footer", s = d || "card-footer";
99
+ return /* @__PURE__ */ i(
100
+ "div",
101
+ {
102
+ ref: r,
103
+ className: o("card-footer", a),
104
+ "data-cy": c,
105
+ "data-testid": s,
106
+ ...e
107
+ }
108
+ );
109
+ }
110
+ );
111
+ D.displayName = "CardFooter";
90
112
  export {
91
- n as DataTable
113
+ f as Card,
114
+ N as CardContent,
115
+ p as CardDescription,
116
+ D as CardFooter,
117
+ C as CardHeader,
118
+ m as CardTitle
92
119
  };
package/dist/index11.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),h=require("react"),u=require("./index14.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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),j=require("react"),c=require("./index15.cjs");;/* empty css */const y=j.forwardRef(({columns:r,data:i,striped:b=!1,hoverable:h=!1,className:$,"data-cy":n,"data-testid":p,...o},_)=>{const e=n||"datatable",t=p||"datatable";return a.jsx("div",{className:"datatable-wrapper","data-cy":`${e}-wrapper`,"data-testid":`${t}-wrapper`,children:a.jsxs("table",{ref:_,className:c.cn("datatable",$),"data-cy":e,"data-testid":t,...o,children:[a.jsx("thead",{className:"datatable__head","data-cy":`${e}-head`,"data-testid":`${t}-head`,children:a.jsx("tr",{children:r.map(d=>a.jsx("th",{className:"datatable__header-cell","data-cy":`${e}-header-${d.key}`,"data-testid":`${t}-header-${d.key}`,children:d.header},d.key))})}),a.jsx("tbody",{"data-cy":`${e}-body`,"data-testid":`${t}-body`,children:i.length===0?a.jsx("tr",{children:a.jsx("td",{colSpan:r.length,className:"datatable__empty","data-cy":`${e}-empty`,"data-testid":`${t}-empty`,children:"No data available"})}):i.map((d,l)=>a.jsx("tr",{className:c.cn("datatable__body-row",h&&"datatable__body-row--hoverable",b&&"datatable__body-row--striped"),"data-cy":`${e}-row-${l}`,"data-testid":`${t}-row-${l}`,children:r.map(s=>a.jsx("td",{className:"datatable__body-cell","data-cy":`${e}-cell-${l}-${s.key}`,"data-testid":`${t}-cell-${l}-${s.key}`,children:String(d[s.key]??"")},s.key))},l))})]})})});y.displayName="DataTable";exports.DataTable=y;
package/dist/index11.js CHANGED
@@ -1,42 +1,92 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { forwardRef as m } from "react";
3
- import { cn as f } 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 "./index15.js";
4
4
  /* empty css */
5
- const h = m(
5
+ const n = f(
6
6
  ({
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,
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
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(
15
+ }, _) => {
16
+ const t = $ || "datatable", e = p || "datatable";
17
+ return /* @__PURE__ */ a(
24
18
  "div",
25
19
  {
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 })
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
+ )
35
85
  }
36
86
  );
37
87
  }
38
88
  );
39
- h.displayName = "Chip";
89
+ n.displayName = "DataTable";
40
90
  export {
41
- h as Chip
91
+ n as DataTable
42
92
  };
package/dist/index12.cjs CHANGED
@@ -1 +1 @@
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("./index14.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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),h=require("react"),u=require("./index15.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/index12.js CHANGED
@@ -1,115 +1,42 @@
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 "./index14.js";
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { forwardRef as m } from "react";
3
+ import { cn as f } from "./index15.js";
5
4
  /* 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,
5
+ const h = m(
6
+ ({
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(
24
+ "div",
79
25
  {
80
26
  ref: d,
81
- className: r("dialog-title", t),
82
- "data-cy": l,
83
- "data-testid": s,
84
- ...e
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 })
85
35
  }
86
36
  );
87
37
  }
88
38
  );
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;
39
+ h.displayName = "Chip";
104
40
  export {
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
41
+ h as Chip
115
42
  };
package/dist/index13.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react/jsx-runtime"),$=require("react"),S=require("./index14.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;
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("./index15.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;