@adam-milo/ui 1.0.16 → 1.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index7.js CHANGED
@@ -1,61 +1,97 @@
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 "./index14.js";
1
+ import { jsxs as f, jsx as i } from "react/jsx-runtime";
2
+ import { forwardRef as C, useId as R, useRef as j, useCallback as g, useEffect as D } from "react";
3
+ import { cn as k } from "./index16.js";
5
4
  /* empty css */
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,
11
- {
12
- ref: r,
13
- className: b("tabs-list", s),
14
- "data-cy": e,
15
- "data-testid": o,
16
- ...n
17
- }
5
+ const E = C(
6
+ ({
7
+ label: c,
8
+ error: a,
9
+ helperText: s,
10
+ indeterminate: o = !1,
11
+ className: m,
12
+ id: x,
13
+ required: n,
14
+ disabled: h,
15
+ checked: y,
16
+ "data-cy": _,
17
+ "data-testid": $,
18
+ ...N
19
+ }, e) => {
20
+ const v = R(), d = x || v, u = `${d}-error`, b = `${d}-helper`, t = _ || "checkbox", r = $ || "checkbox", l = j(null), w = g(
21
+ (p) => {
22
+ l.current = p, e && (typeof e == "function" ? e(p) : "current" in e && (e.current = p));
23
+ },
24
+ [e]
18
25
  );
19
- }
20
- );
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,
26
+ D(() => {
27
+ l.current && (l.current.indeterminate = o);
28
+ }, [o]);
29
+ const I = c && n && !c.includes("*") ? `${c} *` : c;
30
+ return /* @__PURE__ */ f(
31
+ "div",
44
32
  {
45
- ref: e,
46
- className: b("tabs-content", s),
47
- value: t,
48
- "data-cy": o,
49
- "data-testid": d,
50
- ...r
33
+ className: k("checkbox-wrapper", h && "checkbox-wrapper--disabled"),
34
+ "data-cy": `${t}-wrapper`,
35
+ "data-testid": `${r}-wrapper`,
36
+ children: [
37
+ /* @__PURE__ */ f("div", { className: "checkbox__container", children: [
38
+ /* @__PURE__ */ i(
39
+ "input",
40
+ {
41
+ ref: w,
42
+ id: d,
43
+ type: "checkbox",
44
+ checked: y,
45
+ className: k("checkbox__input", a && "checkbox__input--error", m),
46
+ "aria-invalid": a ? "true" : "false",
47
+ "aria-required": n ? "true" : void 0,
48
+ "aria-describedby": a ? u : s ? b : void 0,
49
+ "data-cy": t,
50
+ "data-testid": r,
51
+ "data-indeterminate": o ? "true" : void 0,
52
+ disabled: h,
53
+ required: n,
54
+ ...N
55
+ }
56
+ ),
57
+ c && /* @__PURE__ */ i(
58
+ "label",
59
+ {
60
+ htmlFor: d,
61
+ className: "checkbox__label",
62
+ "data-cy": `${t}-label`,
63
+ "data-testid": `${r}-label`,
64
+ children: I
65
+ }
66
+ )
67
+ ] }),
68
+ a && /* @__PURE__ */ i(
69
+ "span",
70
+ {
71
+ id: u,
72
+ className: "checkbox__error",
73
+ role: "alert",
74
+ "data-cy": `${t}-error`,
75
+ "data-testid": `${r}-error`,
76
+ children: a
77
+ }
78
+ ),
79
+ s && !a && /* @__PURE__ */ i(
80
+ "span",
81
+ {
82
+ id: b,
83
+ className: "checkbox__helper",
84
+ "data-cy": `${t}-helper`,
85
+ "data-testid": `${r}-helper`,
86
+ children: s
87
+ }
88
+ )
89
+ ]
51
90
  }
52
91
  );
53
92
  }
54
93
  );
55
- f.displayName = a.Content.displayName;
94
+ E.displayName = "Checkbox";
56
95
  export {
57
- C as Tabs,
58
- f as TabsContent,
59
- g as TabsList,
60
- y as TabsTrigger
96
+ E as Checkbox
61
97
  };
package/dist/index8.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),m=require("react"),f=require("./index14.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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("react"),_=require("./index16.cjs");;/* empty css */const $=n.forwardRef(({label:r,error:d,helperText:c,className:f,id:h,required:l,disabled:p,checked:m,"data-cy":j,"data-testid":R,...b},a)=>{const N=n.useId(),s=h||N,u=`${s}-error`,y=`${s}-helper`,t=j||"radio",i=R||"radio",x=n.useRef(null),w=n.useCallback(o=>{x.current=o,a&&(typeof a=="function"?a(o):"current"in a&&(a.current=o))},[a]),I=r&&l&&!r.includes("*")?`${r} *`:r;return e.jsxs("div",{className:_.cn("radio-wrapper",p&&"radio-wrapper--disabled"),"data-cy":`${t}-wrapper`,"data-testid":`${i}-wrapper`,children:[e.jsxs("div",{className:"radio__container",children:[e.jsx("input",{ref:w,id:s,type:"radio",checked:m,className:_.cn("radio__input",d&&"radio__input--error",f),"aria-describedby":d?u:c?y:void 0,"data-cy":t,"data-testid":i,disabled:p,required:l,...b}),r&&e.jsx("label",{htmlFor:s,className:"radio__label","data-cy":`${t}-label`,"data-testid":`${i}-label`,children:I})]}),d&&e.jsx("span",{id:u,className:"radio__error",role:"alert","data-cy":`${t}-error`,"data-testid":`${i}-error`,children:d}),c&&!d&&e.jsx("span",{id:y,className:"radio__helper","data-cy":`${t}-helper`,"data-testid":`${i}-helper`,children:c})]})});$.displayName="Radio";exports.Radio=$;
package/dist/index8.js CHANGED
@@ -1,61 +1,81 @@
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 "./index14.js";
1
+ import { jsxs as u, jsx as s } from "react/jsx-runtime";
2
+ import { forwardRef as j, useId as C, useRef as g, useCallback as k } from "react";
3
+ import { cn as y } from "./index16.js";
4
4
  /* empty css */
5
- const _ = y(
5
+ const x = j(
6
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(
7
+ label: d,
8
+ error: r,
9
+ helperText: o,
10
+ className: _,
11
+ id: f,
12
+ required: n,
13
+ disabled: l,
14
+ checked: $,
15
+ "data-cy": h,
16
+ "data-testid": N,
17
+ ...R
18
+ }, a) => {
19
+ const b = C(), e = f || b, p = `${e}-error`, m = `${e}-helper`, t = h || "radio", i = N || "radio", w = g(null), I = k(
20
+ (c) => {
21
+ w.current = c, a && (typeof a == "function" ? a(c) : "current" in a && (a.current = c));
22
+ },
23
+ [a]
24
+ ), v = d && n && !d.includes("*") ? `${d} *` : d;
25
+ return /* @__PURE__ */ u(
23
26
  "div",
24
27
  {
25
- ref: $,
26
- role: f[e],
27
- className: p("alert", `alert--${e}`, i),
28
- "data-cy": t,
29
- "data-testid": a,
30
- ...m,
28
+ className: y("radio-wrapper", l && "radio-wrapper--disabled"),
29
+ "data-cy": `${t}-wrapper`,
30
+ "data-testid": `${i}-wrapper`,
31
31
  children: [
32
+ /* @__PURE__ */ u("div", { className: "radio__container", children: [
33
+ /* @__PURE__ */ s(
34
+ "input",
35
+ {
36
+ ref: I,
37
+ id: e,
38
+ type: "radio",
39
+ checked: $,
40
+ className: y("radio__input", r && "radio__input--error", _),
41
+ "aria-describedby": r ? p : o ? m : void 0,
42
+ "data-cy": t,
43
+ "data-testid": i,
44
+ disabled: l,
45
+ required: n,
46
+ ...R
47
+ }
48
+ ),
49
+ d && /* @__PURE__ */ s(
50
+ "label",
51
+ {
52
+ htmlFor: e,
53
+ className: "radio__label",
54
+ "data-cy": `${t}-label`,
55
+ "data-testid": `${i}-label`,
56
+ children: v
57
+ }
58
+ )
59
+ ] }),
32
60
  r && /* @__PURE__ */ s(
33
- "div",
61
+ "span",
34
62
  {
35
- className: "alert__icon",
36
- "data-cy": `${t}-icon`,
37
- "data-testid": `${a}-icon`,
63
+ id: p,
64
+ className: "radio__error",
65
+ role: "alert",
66
+ "data-cy": `${t}-error`,
67
+ "data-testid": `${i}-error`,
38
68
  children: r
39
69
  }
40
70
  ),
41
- /* @__PURE__ */ c(
42
- "div",
71
+ o && !r && /* @__PURE__ */ s(
72
+ "span",
43
73
  {
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
- ]
74
+ id: m,
75
+ className: "radio__helper",
76
+ "data-cy": `${t}-helper`,
77
+ "data-testid": `${i}-helper`,
78
+ children: o
59
79
  }
60
80
  )
61
81
  ]
@@ -63,7 +83,7 @@ const _ = y(
63
83
  );
64
84
  }
65
85
  );
66
- _.displayName = "Alert";
86
+ x.displayName = "Radio";
67
87
  export {
68
- _ as Alert
88
+ x as Radio
69
89
  };
package/dist/index9.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),i=require("react"),o=require("./index14.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;
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("./index16.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/index9.js CHANGED
@@ -1,119 +1,61 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { forwardRef as n } from "react";
3
- import { cn as o } from "./index14.js";
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 "./index16.js";
4
5
  /* empty css */
5
- const f = n(
6
- ({
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(
16
- "div",
17
- {
18
- ref: s,
19
- className: o("card", `card--${a}`, t),
20
- "data-cy": l,
21
- "data-testid": y,
22
- ...c,
23
- children: d
24
- }
25
- );
26
- }
27
- );
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",
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,
69
11
  {
70
12
  ref: r,
71
- className: o("card-description", a),
72
- "data-cy": c,
73
- "data-testid": s,
74
- ...e
13
+ className: b("tabs-list", s),
14
+ "data-cy": e,
15
+ "data-testid": o,
16
+ ...n
75
17
  }
76
18
  );
77
19
  }
78
20
  );
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",
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,
85
27
  {
86
- ref: r,
87
- className: o("card-content", a),
88
- "data-cy": c,
89
- "data-testid": s,
90
- ...e
28
+ ref: e,
29
+ className: b("tabs-trigger", s),
30
+ value: t,
31
+ "data-cy": o,
32
+ "data-testid": d,
33
+ ...r
91
34
  }
92
35
  );
93
36
  }
94
37
  );
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",
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,
101
44
  {
102
- ref: r,
103
- className: o("card-footer", a),
104
- "data-cy": c,
105
- "data-testid": s,
106
- ...e
45
+ ref: e,
46
+ className: b("tabs-content", s),
47
+ value: t,
48
+ "data-cy": o,
49
+ "data-testid": d,
50
+ ...r
107
51
  }
108
52
  );
109
53
  }
110
54
  );
111
- D.displayName = "CardFooter";
55
+ f.displayName = a.Content.displayName;
112
56
  export {
113
- f as Card,
114
- N as CardContent,
115
- p as CardDescription,
116
- D as CardFooter,
117
- C as CardHeader,
118
- m as CardTitle
57
+ C as Tabs,
58
+ f as TabsContent,
59
+ g as TabsList,
60
+ y as TabsTrigger
119
61
  };
@@ -0,0 +1,102 @@
1
+ import { InputHTMLAttributes } from 'react';
2
+
3
+ export interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {
4
+ /**
5
+ * Label text for the checkbox
6
+ */
7
+ label?: string;
8
+ /**
9
+ * Error message to display below the checkbox
10
+ */
11
+ error?: string;
12
+ /**
13
+ * Helper text to display below the checkbox (only shown when no error)
14
+ */
15
+ helperText?: string;
16
+ /**
17
+ * Whether the checkbox is in an indeterminate state
18
+ * @default false
19
+ */
20
+ indeterminate?: boolean;
21
+ /**
22
+ * Callback fired when the checkbox state changes
23
+ * @param event - The change event from the input element
24
+ */
25
+ onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
26
+ /**
27
+ * Callback fired when the checkbox loses focus
28
+ * @param event - The blur event from the input element
29
+ */
30
+ onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
31
+ /**
32
+ * Callback fired when the checkbox gains focus
33
+ * @param event - The focus event from the input element
34
+ */
35
+ onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
36
+ /**
37
+ * Callback fired when the checkbox is clicked
38
+ * @param event - The mouse event from the input element
39
+ */
40
+ onClick?: (event: React.MouseEvent<HTMLInputElement>) => void;
41
+ /**
42
+ * Callback fired when a key is pressed on the checkbox
43
+ * @param event - The keyboard event from the input element
44
+ */
45
+ onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
46
+ /**
47
+ * Callback fired when a key is released on the checkbox
48
+ * @param event - The keyboard event from the input element
49
+ */
50
+ onKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
51
+ /**
52
+ * Custom data-cy attribute for Cypress testing
53
+ * Auto-generates as "checkbox" if not provided
54
+ */
55
+ 'data-cy'?: string;
56
+ /**
57
+ * Custom data-testid attribute for unit testing
58
+ * Auto-generates as "checkbox" if not provided
59
+ */
60
+ 'data-testid'?: string;
61
+ }
62
+ /**
63
+ * Checkbox - Accessible checkbox component for the Adam Milo Design System
64
+ *
65
+ * A fully accessible checkbox component that supports:
66
+ * - Standard checked/unchecked states
67
+ * - Indeterminate state (for "select all" scenarios)
68
+ * - Hover and focus states
69
+ * - Disabled state
70
+ * - Error states with messages
71
+ * - Helper text
72
+ * - Required field indicator (asterisk)
73
+ * - Full keyboard accessibility
74
+ * - RTL support
75
+ *
76
+ * @example
77
+ * ```tsx
78
+ * // Simple checkbox
79
+ * <Checkbox label="Accept terms" />
80
+ *
81
+ * // Required checkbox (asterisk added automatically)
82
+ * <Checkbox
83
+ * label="I agree"
84
+ * required
85
+ * />
86
+ *
87
+ * // With error
88
+ * <Checkbox
89
+ * label="Subscribe"
90
+ * error="You must accept to continue"
91
+ * />
92
+ *
93
+ * // Indeterminate (for "select all")
94
+ * <Checkbox
95
+ * label="Select all"
96
+ * indeterminate={true}
97
+ * checked={false}
98
+ * />
99
+ * ```
100
+ */
101
+ export declare const Checkbox: import('react').ForwardRefExoticComponent<CheckboxProps & import('react').RefAttributes<HTMLInputElement>>;
102
+ //# sourceMappingURL=Checkbox.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Checkbox.component.d.ts","sourceRoot":"","sources":["../../../../../src/components/forms/checkbox/Checkbox.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,mBAAmB,EAAyC,MAAM,OAAO,CAAC;AAE/F,OAAO,gBAAgB,CAAC;AAExB,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACxF;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAEhE;;;OAGG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAE7D;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAE9D;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAE9D;;;OAGG;IACH,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAEnE;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAEjE;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,eAAO,MAAM,QAAQ,4GAuHpB,CAAC"}