@cerberus-design/react 0.8.0-next-ff54309 → 0.8.0-next-1c1573b

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.
Files changed (88) hide show
  1. package/build/legacy/_tsup-dts-rollup.d.ts +23 -0
  2. package/build/legacy/{chunk-P7JQ47LC.js → chunk-6PN23MAZ.js} +2 -2
  3. package/build/legacy/{chunk-2CYO4SJM.js → chunk-7EDCTSAP.js} +2 -2
  4. package/build/legacy/{chunk-I3QCRJ5R.js → chunk-BI6UZBJB.js} +2 -2
  5. package/build/{modern/chunk-M7HQ5V66.js → legacy/chunk-C7447UIN.js} +2 -2
  6. package/build/legacy/chunk-CP7OUC2Q.js +42 -0
  7. package/build/legacy/chunk-CP7OUC2Q.js.map +1 -0
  8. package/build/legacy/{chunk-Q6AA6XBS.js → chunk-HQIRGWY3.js} +2 -2
  9. package/build/{modern/chunk-YBD32ORB.js → legacy/chunk-K3X3OMAA.js} +8 -2
  10. package/build/legacy/chunk-K3X3OMAA.js.map +1 -0
  11. package/build/legacy/{chunk-GOJYBQNG.js → chunk-MVV3VTY2.js} +2 -2
  12. package/build/legacy/{chunk-EBRWD5EE.js → chunk-R6DGIPXN.js} +7 -5
  13. package/build/legacy/chunk-R6DGIPXN.js.map +1 -0
  14. package/build/{modern/chunk-NKJL4J2S.js → legacy/chunk-RHMGQNFD.js} +2 -2
  15. package/build/legacy/{chunk-SWHJ4GA4.js → chunk-VQMP3PBJ.js} +2 -2
  16. package/build/legacy/{chunk-6OPGX7H5.js → chunk-XKID4ZMW.js} +3 -3
  17. package/build/legacy/components/Checkbox.js +4 -3
  18. package/build/legacy/components/FileUploader.js +4 -3
  19. package/build/legacy/components/Input.js +4 -3
  20. package/build/legacy/components/Notification.js +4 -3
  21. package/build/legacy/components/Select.js +4 -3
  22. package/build/legacy/components/Toggle.js +4 -3
  23. package/build/legacy/config/cerbIcons.js +2 -1
  24. package/build/legacy/config/defineIcons.js +3 -2
  25. package/build/legacy/config/icons/checkbox.icons.js +9 -0
  26. package/build/legacy/config/icons/checkbox.icons.js.map +1 -0
  27. package/build/legacy/context/confirm-modal.js +4 -3
  28. package/build/legacy/context/notification-center.js +5 -4
  29. package/build/legacy/context/prompt-modal.js +5 -4
  30. package/build/legacy/index.js +12 -11
  31. package/build/legacy/index.js.map +1 -1
  32. package/build/modern/_tsup-dts-rollup.d.ts +23 -0
  33. package/build/modern/{chunk-3CMOWLNY.js → chunk-66OTWSEH.js} +3 -3
  34. package/build/{legacy/chunk-M7HQ5V66.js → modern/chunk-C7447UIN.js} +2 -2
  35. package/build/modern/chunk-CP7OUC2Q.js +42 -0
  36. package/build/modern/chunk-CP7OUC2Q.js.map +1 -0
  37. package/build/modern/{chunk-GE7RTD5F.js → chunk-EKUUJB37.js} +2 -2
  38. package/build/modern/{chunk-PQGIVCAA.js → chunk-ETIKSLRO.js} +2 -2
  39. package/build/modern/{chunk-Q6AA6XBS.js → chunk-HQIRGWY3.js} +2 -2
  40. package/build/modern/{chunk-GX63P3NP.js → chunk-HVICMTKV.js} +2 -2
  41. package/build/{legacy/chunk-YBD32ORB.js → modern/chunk-K3X3OMAA.js} +8 -2
  42. package/build/modern/chunk-K3X3OMAA.js.map +1 -0
  43. package/build/modern/{chunk-GOJYBQNG.js → chunk-MVV3VTY2.js} +2 -2
  44. package/build/modern/{chunk-WA7ZWO2U.js → chunk-R4V7FTYK.js} +2 -2
  45. package/build/modern/{chunk-EBRWD5EE.js → chunk-R6DGIPXN.js} +7 -5
  46. package/build/modern/chunk-R6DGIPXN.js.map +1 -0
  47. package/build/{legacy/chunk-NKJL4J2S.js → modern/chunk-RHMGQNFD.js} +2 -2
  48. package/build/modern/components/Checkbox.js +4 -3
  49. package/build/modern/components/FileUploader.js +4 -3
  50. package/build/modern/components/Input.js +4 -3
  51. package/build/modern/components/Notification.js +4 -3
  52. package/build/modern/components/Select.js +4 -3
  53. package/build/modern/components/Toggle.js +4 -3
  54. package/build/modern/config/cerbIcons.js +2 -1
  55. package/build/modern/config/defineIcons.js +3 -2
  56. package/build/modern/config/icons/checkbox.icons.js +9 -0
  57. package/build/modern/config/icons/checkbox.icons.js.map +1 -0
  58. package/build/modern/context/confirm-modal.js +4 -3
  59. package/build/modern/context/notification-center.js +5 -4
  60. package/build/modern/context/prompt-modal.js +5 -4
  61. package/build/modern/index.js +12 -11
  62. package/build/modern/index.js.map +1 -1
  63. package/package.json +2 -2
  64. package/src/components/Checkbox.tsx +11 -3
  65. package/src/config/cerbIcons.ts +4 -1
  66. package/src/config/icons/checkbox.icons.tsx +49 -0
  67. package/build/legacy/chunk-EBRWD5EE.js.map +0 -1
  68. package/build/legacy/chunk-YBD32ORB.js.map +0 -1
  69. package/build/modern/chunk-EBRWD5EE.js.map +0 -1
  70. package/build/modern/chunk-YBD32ORB.js.map +0 -1
  71. /package/build/legacy/{chunk-P7JQ47LC.js.map → chunk-6PN23MAZ.js.map} +0 -0
  72. /package/build/legacy/{chunk-2CYO4SJM.js.map → chunk-7EDCTSAP.js.map} +0 -0
  73. /package/build/legacy/{chunk-I3QCRJ5R.js.map → chunk-BI6UZBJB.js.map} +0 -0
  74. /package/build/legacy/{chunk-M7HQ5V66.js.map → chunk-C7447UIN.js.map} +0 -0
  75. /package/build/legacy/{chunk-Q6AA6XBS.js.map → chunk-HQIRGWY3.js.map} +0 -0
  76. /package/build/legacy/{chunk-GOJYBQNG.js.map → chunk-MVV3VTY2.js.map} +0 -0
  77. /package/build/legacy/{chunk-NKJL4J2S.js.map → chunk-RHMGQNFD.js.map} +0 -0
  78. /package/build/legacy/{chunk-SWHJ4GA4.js.map → chunk-VQMP3PBJ.js.map} +0 -0
  79. /package/build/legacy/{chunk-6OPGX7H5.js.map → chunk-XKID4ZMW.js.map} +0 -0
  80. /package/build/modern/{chunk-3CMOWLNY.js.map → chunk-66OTWSEH.js.map} +0 -0
  81. /package/build/modern/{chunk-M7HQ5V66.js.map → chunk-C7447UIN.js.map} +0 -0
  82. /package/build/modern/{chunk-GE7RTD5F.js.map → chunk-EKUUJB37.js.map} +0 -0
  83. /package/build/modern/{chunk-PQGIVCAA.js.map → chunk-ETIKSLRO.js.map} +0 -0
  84. /package/build/modern/{chunk-Q6AA6XBS.js.map → chunk-HQIRGWY3.js.map} +0 -0
  85. /package/build/modern/{chunk-GX63P3NP.js.map → chunk-HVICMTKV.js.map} +0 -0
  86. /package/build/modern/{chunk-GOJYBQNG.js.map → chunk-MVV3VTY2.js.map} +0 -0
  87. /package/build/modern/{chunk-WA7ZWO2U.js.map → chunk-R4V7FTYK.js.map} +0 -0
  88. /package/build/modern/{chunk-NKJL4J2S.js.map → chunk-RHMGQNFD.js.map} +0 -0
@@ -114,6 +114,7 @@ import { SensorOptions } from '@dnd-kit/core';
114
114
  import { SensorProps } from '@dnd-kit/core';
115
115
  import { SensorResponse } from '@dnd-kit/core';
116
116
  import { Sensors } from '@dnd-kit/core';
117
+ import type { SVGProps } from 'react';
117
118
  import type { TableHTMLAttributes } from 'react';
118
119
  import { TabsVariantProps } from '@cerberus/styled-system/recipes';
119
120
  import { tag } from '@cerberus/styled-system/recipes';
@@ -199,6 +200,13 @@ declare function Checkbox(props: CheckboxProps): JSX_2.Element;
199
200
  export { Checkbox }
200
201
  export { Checkbox as Checkbox_alias_1 }
201
202
 
203
+ /**
204
+ * This module contains substitute icons for the Checkbox component.
205
+ * @module
206
+ */
207
+ declare interface CheckboxIconProps extends SVGProps<SVGSVGElement> {
208
+ }
209
+
202
210
  /**
203
211
  * This module contains the Checkbox component.
204
212
  * @module
@@ -206,10 +214,16 @@ export { Checkbox as Checkbox_alias_1 }
206
214
  declare type CheckboxProps = CheckboxVariantProps & Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'id'> & {
207
215
  describedBy?: string;
208
216
  id: string;
217
+ mixed?: boolean;
209
218
  };
210
219
  export { CheckboxProps }
211
220
  export { CheckboxProps as CheckboxProps_alias_1 }
212
221
 
222
+ /**
223
+ * Checkmark icon for Checkbox component
224
+ */
225
+ export declare function CheckmarkIcon(props: CheckboxIconProps): JSX_2.Element;
226
+
213
227
  declare type ClickableTagProps = HTMLAttributes<HTMLSpanElement> & {
214
228
  gradient?: never;
215
229
  palette?: never;
@@ -308,6 +322,7 @@ export declare interface DefinedIcons {
308
322
  confirmModal?: IconType;
309
323
  promptModal?: IconType;
310
324
  fileUploader?: IconType;
325
+ indeterminate?: IconType;
311
326
  infoNotification?: IconType;
312
327
  successNotification?: IconType;
313
328
  warningNotification?: IconType;
@@ -539,6 +554,14 @@ export { IconButtonRecipeProps as IconButtonRecipeProps_alias_1 }
539
554
 
540
555
  export declare type IconType = CarbonIconType | ElementType;
541
556
 
557
+ /**
558
+ * Indeterminate icon for Checkbox component
559
+ */
560
+ export declare function IndeterminateIcon(props: IndeterminateIconProps): JSX_2.Element;
561
+
562
+ declare interface IndeterminateIconProps extends SVGProps<SVGSVGElement> {
563
+ }
564
+
542
565
  declare type IndeterminateProgressBarProps = {
543
566
  indeterminate: true;
544
567
  now?: never;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Notification
3
- } from "./chunk-I3QCRJ5R.js";
3
+ } from "./chunk-BI6UZBJB.js";
4
4
  import {
5
5
  NotificationDescription
6
6
  } from "./chunk-HW76XVA3.js";
@@ -119,4 +119,4 @@ export {
119
119
  NotificationCenter,
120
120
  useNotificationCenter
121
121
  };
122
- //# sourceMappingURL=chunk-P7JQ47LC.js.map
122
+ //# sourceMappingURL=chunk-6PN23MAZ.js.map
@@ -27,7 +27,7 @@ import {
27
27
  } from "./chunk-KESKDLX6.js";
28
28
  import {
29
29
  $cerberusIcons
30
- } from "./chunk-Q6AA6XBS.js";
30
+ } from "./chunk-HQIRGWY3.js";
31
31
  import {
32
32
  useModal
33
33
  } from "./chunk-TZNYJ3G7.js";
@@ -152,4 +152,4 @@ export {
152
152
  ConfirmModal,
153
153
  useConfirmModal
154
154
  };
155
- //# sourceMappingURL=chunk-2CYO4SJM.js.map
155
+ //# sourceMappingURL=chunk-7EDCTSAP.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-KESKDLX6.js";
4
4
  import {
5
5
  $cerberusIcons
6
- } from "./chunk-Q6AA6XBS.js";
6
+ } from "./chunk-HQIRGWY3.js";
7
7
 
8
8
  // src/components/Notification.tsx
9
9
  import { cx } from "@cerberus/styled-system/css";
@@ -73,4 +73,4 @@ function Notification(props) {
73
73
  export {
74
74
  Notification
75
75
  };
76
- //# sourceMappingURL=chunk-I3QCRJ5R.js.map
76
+ //# sourceMappingURL=chunk-BI6UZBJB.js.map
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-4O4QFF4S.js";
7
7
  import {
8
8
  $cerberusIcons
9
- } from "./chunk-Q6AA6XBS.js";
9
+ } from "./chunk-HQIRGWY3.js";
10
10
 
11
11
  // src/components/Input.tsx
12
12
  import { input } from "@cerberus/styled-system/recipes";
@@ -39,4 +39,4 @@ function Input(props) {
39
39
  export {
40
40
  Input
41
41
  };
42
- //# sourceMappingURL=chunk-M7HQ5V66.js.map
42
+ //# sourceMappingURL=chunk-C7447UIN.js.map
@@ -0,0 +1,42 @@
1
+ // src/config/icons/checkbox.icons.tsx
2
+ import { jsx } from "react/jsx-runtime";
3
+ function CheckmarkIcon(props) {
4
+ return /* @__PURE__ */ jsx(
5
+ "svg",
6
+ {
7
+ "aria-hidden": "true",
8
+ xmlns: "http://www.w3.org/2000/svg",
9
+ fill: "none",
10
+ role: "img",
11
+ viewBox: "0 0 24 24",
12
+ ...props,
13
+ children: /* @__PURE__ */ jsx(
14
+ "path",
15
+ {
16
+ fill: "currentColor",
17
+ d: "M9.714 18 4 12.335l1.818-1.764 3.896 3.824L18.181 6 20 7.803 9.714 18Z"
18
+ }
19
+ )
20
+ }
21
+ );
22
+ }
23
+ function IndeterminateIcon(props) {
24
+ return /* @__PURE__ */ jsx(
25
+ "svg",
26
+ {
27
+ "aria-hidden": "true",
28
+ xmlns: "http://www.w3.org/2000/svg",
29
+ role: "img",
30
+ fill: "none",
31
+ viewBox: "0 0 24 24",
32
+ ...props,
33
+ children: /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M4 11h16v2.667H4z" })
34
+ }
35
+ );
36
+ }
37
+
38
+ export {
39
+ CheckmarkIcon,
40
+ IndeterminateIcon
41
+ };
42
+ //# sourceMappingURL=chunk-CP7OUC2Q.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/config/icons/checkbox.icons.tsx"],"sourcesContent":["import type { SVGProps } from 'react'\n\n/**\n * This module contains substitute icons for the Checkbox component.\n * @module\n */\n\ninterface CheckboxIconProps extends SVGProps<SVGSVGElement> {}\n\n/**\n * Checkmark icon for Checkbox component\n */\nexport function CheckmarkIcon(props: CheckboxIconProps) {\n return (\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n role=\"img\"\n viewBox=\"0 0 24 24\"\n {...props}\n >\n <path\n fill=\"currentColor\"\n d=\"M9.714 18 4 12.335l1.818-1.764 3.896 3.824L18.181 6 20 7.803 9.714 18Z\"\n />\n </svg>\n )\n}\n\ninterface IndeterminateIconProps extends SVGProps<SVGSVGElement> {}\n\n/**\n * Indeterminate icon for Checkbox component\n */\nexport function IndeterminateIcon(props: IndeterminateIconProps) {\n return (\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n role=\"img\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n {...props}\n >\n <path fill=\"currentColor\" d=\"M4 11h16v2.667H4z\" />\n </svg>\n )\n}\n"],"mappings":";AAsBM;AAVC,SAAS,cAAc,OAA0B;AACtD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAY;AAAA,MACZ,OAAM;AAAA,MACN,MAAK;AAAA,MACL,MAAK;AAAA,MACL,SAAQ;AAAA,MACP,GAAG;AAAA,MAEJ;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,GAAE;AAAA;AAAA,MACJ;AAAA;AAAA,EACF;AAEJ;AAOO,SAAS,kBAAkB,OAA+B;AAC/D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAY;AAAA,MACZ,OAAM;AAAA,MACN,MAAK;AAAA,MACL,MAAK;AAAA,MACL,SAAQ;AAAA,MACP,GAAG;AAAA,MAEJ,8BAAC,UAAK,MAAK,gBAAe,GAAE,qBAAoB;AAAA;AAAA,EAClD;AAEJ;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  defaultIcons
3
- } from "./chunk-YBD32ORB.js";
3
+ } from "./chunk-K3X3OMAA.js";
4
4
 
5
5
  // src/config/defineIcons.ts
6
6
  function _validateIconsProperties(icons) {
@@ -24,4 +24,4 @@ export {
24
24
  defineIcons,
25
25
  $cerberusIcons
26
26
  };
27
- //# sourceMappingURL=chunk-Q6AA6XBS.js.map
27
+ //# sourceMappingURL=chunk-HQIRGWY3.js.map
@@ -1,3 +1,8 @@
1
+ import {
2
+ CheckmarkIcon,
3
+ IndeterminateIcon
4
+ } from "./chunk-CP7OUC2Q.js";
5
+
1
6
  // src/config/cerbIcons.ts
2
7
  import {
3
8
  Checkmark,
@@ -10,10 +15,11 @@ import {
10
15
  WarningFilled
11
16
  } from "@cerberus/icons";
12
17
  var defaultIcons = {
13
- checkbox: Checkmark,
18
+ checkbox: CheckmarkIcon,
14
19
  confirmModal: Information,
15
20
  promptModal: Information,
16
21
  fileUploader: CloudUpload,
22
+ indeterminate: IndeterminateIcon,
17
23
  infoNotification: InformationFilled,
18
24
  successNotification: CheckmarkFilled,
19
25
  warningNotification: WarningFilled,
@@ -26,4 +32,4 @@ var defaultIcons = {
26
32
  export {
27
33
  defaultIcons
28
34
  };
29
- //# sourceMappingURL=chunk-YBD32ORB.js.map
35
+ //# sourceMappingURL=chunk-K3X3OMAA.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/config/cerbIcons.ts"],"sourcesContent":["import {\n Checkmark,\n CheckmarkFilled,\n ChevronDown,\n CloudUpload,\n ErrorFilled,\n Information,\n InformationFilled,\n WarningFilled,\n type CarbonIconType,\n} from '@cerberus/icons'\nimport type { ElementType } from 'react'\nimport { CheckmarkIcon, IndeterminateIcon } from './icons/checkbox.icons'\n\nexport type IconType = CarbonIconType | ElementType\n\nexport interface DefinedIcons {\n checkbox?: IconType\n confirmModal?: IconType\n promptModal?: IconType\n fileUploader?: IconType\n indeterminate?: IconType\n infoNotification?: IconType\n successNotification?: IconType\n warningNotification?: IconType\n dangerNotification?: IconType\n invalid: IconType\n selectArrow?: IconType\n toggleChecked?: IconType\n}\n\nexport const defaultIcons: DefinedIcons = {\n checkbox: CheckmarkIcon,\n confirmModal: Information,\n promptModal: Information,\n fileUploader: CloudUpload,\n indeterminate: IndeterminateIcon,\n infoNotification: InformationFilled,\n successNotification: CheckmarkFilled,\n warningNotification: WarningFilled,\n dangerNotification: ErrorFilled,\n invalid: WarningFilled,\n selectArrow: ChevronDown,\n toggleChecked: Checkmark,\n}\n"],"mappings":";;;;;;AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AAqBA,IAAM,eAA6B;AAAA,EACxC,UAAU;AAAA,EACV,cAAc;AAAA,EACd,aAAa;AAAA,EACb,cAAc;AAAA,EACd,eAAe;AAAA,EACf,kBAAkB;AAAA,EAClB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,oBAAoB;AAAA,EACpB,SAAS;AAAA,EACT,aAAa;AAAA,EACb,eAAe;AACjB;","names":[]}
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-ZAU4JVLL.js";
4
4
  import {
5
5
  $cerberusIcons
6
- } from "./chunk-Q6AA6XBS.js";
6
+ } from "./chunk-HQIRGWY3.js";
7
7
 
8
8
  // src/components/Toggle.tsx
9
9
  import { cx } from "@cerberus/styled-system/css";
@@ -55,4 +55,4 @@ function Toggle(props) {
55
55
  export {
56
56
  Toggle
57
57
  };
58
- //# sourceMappingURL=chunk-GOJYBQNG.js.map
58
+ //# sourceMappingURL=chunk-MVV3VTY2.js.map
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-4O4QFF4S.js";
7
7
  import {
8
8
  $cerberusIcons
9
- } from "./chunk-Q6AA6XBS.js";
9
+ } from "./chunk-HQIRGWY3.js";
10
10
 
11
11
  // src/components/Checkbox.tsx
12
12
  import {
@@ -16,10 +16,10 @@ import { vstack } from "@cerberus/styled-system/patterns";
16
16
  import { cx } from "@cerberus/styled-system/css";
17
17
  import { jsx, jsxs } from "react/jsx-runtime";
18
18
  function Checkbox(props) {
19
- const { describedBy, size, checked, ...nativeProps } = props;
19
+ const { describedBy, size, checked, mixed, ...nativeProps } = props;
20
20
  const { invalid, ...fieldStates } = useFieldContext();
21
21
  const styles = checkbox({ size });
22
- const { checkbox: CheckIcon } = $cerberusIcons;
22
+ const { checkbox: CheckIcon, indeterminate: IndeterminateIcon } = $cerberusIcons;
23
23
  return /* @__PURE__ */ jsxs(
24
24
  "div",
25
25
  {
@@ -38,11 +38,13 @@ function Checkbox(props) {
38
38
  ...fieldStates,
39
39
  ...describedBy && { "aria-describedby": describedBy },
40
40
  ...invalid && { "aria-invalid": true },
41
+ ...mixed && { "aria-checked": "mixed" },
41
42
  className: cx("peer", nativeProps.className, styles.input),
42
43
  type: "checkbox"
43
44
  }
44
45
  ),
45
- /* @__PURE__ */ jsx(Show, { when: checked, children: /* @__PURE__ */ jsx("span", { className: styles.icon, children: /* @__PURE__ */ jsx(CheckIcon, {}) }) })
46
+ /* @__PURE__ */ jsx(Show, { when: checked && !mixed, children: /* @__PURE__ */ jsx("span", { className: styles.icon, children: /* @__PURE__ */ jsx(CheckIcon, {}) }) }),
47
+ /* @__PURE__ */ jsx(Show, { when: mixed, children: /* @__PURE__ */ jsx("span", { className: styles.icon, children: /* @__PURE__ */ jsx(IndeterminateIcon, {}) }) })
46
48
  ]
47
49
  }
48
50
  );
@@ -51,4 +53,4 @@ function Checkbox(props) {
51
53
  export {
52
54
  Checkbox
53
55
  };
54
- //# sourceMappingURL=chunk-EBRWD5EE.js.map
56
+ //# sourceMappingURL=chunk-R6DGIPXN.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/Checkbox.tsx"],"sourcesContent":["'use client'\n\nimport {\n checkbox,\n type CheckboxVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { vstack } from '@cerberus/styled-system/patterns'\nimport { cx } from '@cerberus/styled-system/css'\nimport type { InputHTMLAttributes } from 'react'\nimport { Show } from './Show'\nimport { useFieldContext } from '../context/field'\nimport { $cerberusIcons } from '../config/defineIcons'\n\n/**\n * This module contains the Checkbox component.\n * @module\n */\n\nexport type CheckboxProps = CheckboxVariantProps &\n Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'id'> & {\n describedBy?: string\n id: string\n mixed?: boolean\n }\n\n/**\n * Checkbox component\n * @definition [ARIA Target Size](https://www.w3.org/WAI/WCAG21/Understanding/target-size.html#:~:text=Understanding%20SC%202.5.,%3ATarget%20Size%20(Level%20AAA)&text=The%20size%20of%20the%20target,Equivalent)\n * @definition [ARIA Forms](https://www.a11yproject.com/checklist/#forms)\n * @definition [Checkbox docs](https://cerberus.digitalu.design/react/checkbox)\n * @example\n * ```tsx\n * <Field>\n * <Checkbox id=\"legal\" checked={checked.legal} onChange={handleChange} />\n * </Field>\n * ```\n */\nexport function Checkbox(props: CheckboxProps) {\n const { describedBy, size, checked, mixed, ...nativeProps } = props\n const { invalid, ...fieldStates } = useFieldContext()\n const styles = checkbox({ size })\n const { checkbox: CheckIcon, indeterminate: IndeterminateIcon } =\n $cerberusIcons\n\n return (\n <div\n className={cx(\n styles.root,\n vstack({\n gap: '0',\n justify: 'center',\n }),\n )}\n >\n <input\n {...nativeProps}\n {...fieldStates}\n {...(describedBy && { 'aria-describedby': describedBy })}\n {...(invalid && { 'aria-invalid': true })}\n {...(mixed && { 'aria-checked': 'mixed' })}\n className={cx('peer', nativeProps.className, styles.input)}\n type=\"checkbox\"\n />\n <Show when={checked && !mixed}>\n <span className={styles.icon}>\n <CheckIcon />\n </span>\n </Show>\n <Show when={mixed}>\n <span className={styles.icon}>\n <IndeterminateIcon />\n </span>\n </Show>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;AAEA;AAAA,EACE;AAAA,OAEK;AACP,SAAS,cAAc;AACvB,SAAS,UAAU;AAsCf,SASE,KATF;AARG,SAAS,SAAS,OAAsB;AAC7C,QAAM,EAAE,aAAa,MAAM,SAAS,OAAO,GAAG,YAAY,IAAI;AAC9D,QAAM,EAAE,SAAS,GAAG,YAAY,IAAI,gBAAgB;AACpD,QAAM,SAAS,SAAS,EAAE,KAAK,CAAC;AAChC,QAAM,EAAE,UAAU,WAAW,eAAe,kBAAkB,IAC5D;AAEF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT,OAAO;AAAA,QACP,OAAO;AAAA,UACL,KAAK;AAAA,UACL,SAAS;AAAA,QACX,CAAC;AAAA,MACH;AAAA,MAEA;AAAA;AAAA,UAAC;AAAA;AAAA,YACE,GAAG;AAAA,YACH,GAAG;AAAA,YACH,GAAI,eAAe,EAAE,oBAAoB,YAAY;AAAA,YACrD,GAAI,WAAW,EAAE,gBAAgB,KAAK;AAAA,YACtC,GAAI,SAAS,EAAE,gBAAgB,QAAQ;AAAA,YACxC,WAAW,GAAG,QAAQ,YAAY,WAAW,OAAO,KAAK;AAAA,YACzD,MAAK;AAAA;AAAA,QACP;AAAA,QACA,oBAAC,QAAK,MAAM,WAAW,CAAC,OACtB,8BAAC,UAAK,WAAW,OAAO,MACtB,8BAAC,aAAU,GACb,GACF;AAAA,QACA,oBAAC,QAAK,MAAM,OACV,8BAAC,UAAK,WAAW,OAAO,MACtB,8BAAC,qBAAkB,GACrB,GACF;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-4O4QFF4S.js";
7
7
  import {
8
8
  $cerberusIcons
9
- } from "./chunk-Q6AA6XBS.js";
9
+ } from "./chunk-HQIRGWY3.js";
10
10
 
11
11
  // src/components/Select.tsx
12
12
  import { cx } from "@cerberus/styled-system/css";
@@ -65,4 +65,4 @@ export {
65
65
  Select,
66
66
  Option
67
67
  };
68
- //# sourceMappingURL=chunk-NKJL4J2S.js.map
68
+ //# sourceMappingURL=chunk-RHMGQNFD.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-4O4QFF4S.js";
4
4
  import {
5
5
  $cerberusIcons
6
- } from "./chunk-Q6AA6XBS.js";
6
+ } from "./chunk-HQIRGWY3.js";
7
7
 
8
8
  // src/components/FileUploader.tsx
9
9
  import { cx } from "@cerberus/styled-system/css";
@@ -60,4 +60,4 @@ function FileUploader(props) {
60
60
  export {
61
61
  FileUploader
62
62
  };
63
- //# sourceMappingURL=chunk-SWHJ4GA4.js.map
63
+ //# sourceMappingURL=chunk-VQMP3PBJ.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-4CAT3FHV.js";
4
4
  import {
5
5
  Input
6
- } from "./chunk-M7HQ5V66.js";
6
+ } from "./chunk-C7447UIN.js";
7
7
  import {
8
8
  Label
9
9
  } from "./chunk-RQPDRHRP.js";
@@ -36,7 +36,7 @@ import {
36
36
  } from "./chunk-KESKDLX6.js";
37
37
  import {
38
38
  $cerberusIcons
39
- } from "./chunk-Q6AA6XBS.js";
39
+ } from "./chunk-HQIRGWY3.js";
40
40
  import {
41
41
  useModal
42
42
  } from "./chunk-TZNYJ3G7.js";
@@ -205,4 +205,4 @@ export {
205
205
  PromptModal,
206
206
  usePromptModal
207
207
  };
208
- //# sourceMappingURL=chunk-6OPGX7H5.js.map
208
+ //# sourceMappingURL=chunk-XKID4ZMW.js.map
@@ -1,11 +1,12 @@
1
1
  "use client";
2
2
  import {
3
3
  Checkbox
4
- } from "../chunk-EBRWD5EE.js";
4
+ } from "../chunk-R6DGIPXN.js";
5
5
  import "../chunk-ZAU4JVLL.js";
6
6
  import "../chunk-4O4QFF4S.js";
7
- import "../chunk-Q6AA6XBS.js";
8
- import "../chunk-YBD32ORB.js";
7
+ import "../chunk-HQIRGWY3.js";
8
+ import "../chunk-K3X3OMAA.js";
9
+ import "../chunk-CP7OUC2Q.js";
9
10
  export {
10
11
  Checkbox
11
12
  };
@@ -1,10 +1,11 @@
1
1
  "use client";
2
2
  import {
3
3
  FileUploader
4
- } from "../chunk-SWHJ4GA4.js";
4
+ } from "../chunk-VQMP3PBJ.js";
5
5
  import "../chunk-4O4QFF4S.js";
6
- import "../chunk-Q6AA6XBS.js";
7
- import "../chunk-YBD32ORB.js";
6
+ import "../chunk-HQIRGWY3.js";
7
+ import "../chunk-K3X3OMAA.js";
8
+ import "../chunk-CP7OUC2Q.js";
8
9
  export {
9
10
  FileUploader
10
11
  };
@@ -1,11 +1,12 @@
1
1
  "use client";
2
2
  import {
3
3
  Input
4
- } from "../chunk-M7HQ5V66.js";
4
+ } from "../chunk-C7447UIN.js";
5
5
  import "../chunk-ZAU4JVLL.js";
6
6
  import "../chunk-4O4QFF4S.js";
7
- import "../chunk-Q6AA6XBS.js";
8
- import "../chunk-YBD32ORB.js";
7
+ import "../chunk-HQIRGWY3.js";
8
+ import "../chunk-K3X3OMAA.js";
9
+ import "../chunk-CP7OUC2Q.js";
9
10
  export {
10
11
  Input
11
12
  };
@@ -1,10 +1,11 @@
1
1
  "use client";
2
2
  import {
3
3
  Notification
4
- } from "../chunk-I3QCRJ5R.js";
4
+ } from "../chunk-BI6UZBJB.js";
5
5
  import "../chunk-KESKDLX6.js";
6
- import "../chunk-Q6AA6XBS.js";
7
- import "../chunk-YBD32ORB.js";
6
+ import "../chunk-HQIRGWY3.js";
7
+ import "../chunk-K3X3OMAA.js";
8
+ import "../chunk-CP7OUC2Q.js";
8
9
  export {
9
10
  Notification
10
11
  };
@@ -2,11 +2,12 @@
2
2
  import {
3
3
  Option,
4
4
  Select
5
- } from "../chunk-NKJL4J2S.js";
5
+ } from "../chunk-RHMGQNFD.js";
6
6
  import "../chunk-ZAU4JVLL.js";
7
7
  import "../chunk-4O4QFF4S.js";
8
- import "../chunk-Q6AA6XBS.js";
9
- import "../chunk-YBD32ORB.js";
8
+ import "../chunk-HQIRGWY3.js";
9
+ import "../chunk-K3X3OMAA.js";
10
+ import "../chunk-CP7OUC2Q.js";
10
11
  export {
11
12
  Option,
12
13
  Select
@@ -1,10 +1,11 @@
1
1
  "use client";
2
2
  import {
3
3
  Toggle
4
- } from "../chunk-GOJYBQNG.js";
4
+ } from "../chunk-MVV3VTY2.js";
5
5
  import "../chunk-ZAU4JVLL.js";
6
- import "../chunk-Q6AA6XBS.js";
7
- import "../chunk-YBD32ORB.js";
6
+ import "../chunk-HQIRGWY3.js";
7
+ import "../chunk-K3X3OMAA.js";
8
+ import "../chunk-CP7OUC2Q.js";
8
9
  export {
9
10
  Toggle
10
11
  };
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  defaultIcons
3
- } from "../chunk-YBD32ORB.js";
3
+ } from "../chunk-K3X3OMAA.js";
4
+ import "../chunk-CP7OUC2Q.js";
4
5
  export {
5
6
  defaultIcons
6
7
  };
@@ -1,8 +1,9 @@
1
1
  import {
2
2
  $cerberusIcons,
3
3
  defineIcons
4
- } from "../chunk-Q6AA6XBS.js";
5
- import "../chunk-YBD32ORB.js";
4
+ } from "../chunk-HQIRGWY3.js";
5
+ import "../chunk-K3X3OMAA.js";
6
+ import "../chunk-CP7OUC2Q.js";
6
7
  export {
7
8
  $cerberusIcons,
8
9
  defineIcons
@@ -0,0 +1,9 @@
1
+ import {
2
+ CheckmarkIcon,
3
+ IndeterminateIcon
4
+ } from "../../chunk-CP7OUC2Q.js";
5
+ export {
6
+ CheckmarkIcon,
7
+ IndeterminateIcon
8
+ };
9
+ //# sourceMappingURL=checkbox.icons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  ConfirmModal,
4
4
  useConfirmModal
5
- } from "../chunk-2CYO4SJM.js";
5
+ } from "../chunk-7EDCTSAP.js";
6
6
  import "../chunk-4CAT3FHV.js";
7
7
  import "../chunk-2UFNQM55.js";
8
8
  import "../chunk-4M4LCQ43.js";
@@ -12,8 +12,9 @@ import "../chunk-JJP2TFTU.js";
12
12
  import "../chunk-6F34A7NZ.js";
13
13
  import "../chunk-4O4QFF4S.js";
14
14
  import "../chunk-KESKDLX6.js";
15
- import "../chunk-Q6AA6XBS.js";
16
- import "../chunk-YBD32ORB.js";
15
+ import "../chunk-HQIRGWY3.js";
16
+ import "../chunk-K3X3OMAA.js";
17
+ import "../chunk-CP7OUC2Q.js";
17
18
  import "../chunk-TZNYJ3G7.js";
18
19
  export {
19
20
  ConfirmModal,
@@ -2,16 +2,17 @@
2
2
  import {
3
3
  NotificationCenter,
4
4
  useNotificationCenter
5
- } from "../chunk-P7JQ47LC.js";
6
- import "../chunk-I3QCRJ5R.js";
5
+ } from "../chunk-6PN23MAZ.js";
6
+ import "../chunk-BI6UZBJB.js";
7
7
  import "../chunk-HW76XVA3.js";
8
8
  import "../chunk-3C2DJSEE.js";
9
9
  import "../chunk-4CAT3FHV.js";
10
10
  import "../chunk-6F34A7NZ.js";
11
11
  import "../chunk-4O4QFF4S.js";
12
12
  import "../chunk-KESKDLX6.js";
13
- import "../chunk-Q6AA6XBS.js";
14
- import "../chunk-YBD32ORB.js";
13
+ import "../chunk-HQIRGWY3.js";
14
+ import "../chunk-K3X3OMAA.js";
15
+ import "../chunk-CP7OUC2Q.js";
15
16
  export {
16
17
  NotificationCenter,
17
18
  useNotificationCenter
@@ -2,9 +2,9 @@
2
2
  import {
3
3
  PromptModal,
4
4
  usePromptModal
5
- } from "../chunk-6OPGX7H5.js";
5
+ } from "../chunk-XKID4ZMW.js";
6
6
  import "../chunk-4CAT3FHV.js";
7
- import "../chunk-M7HQ5V66.js";
7
+ import "../chunk-C7447UIN.js";
8
8
  import "../chunk-RQPDRHRP.js";
9
9
  import "../chunk-2UFNQM55.js";
10
10
  import "../chunk-4M4LCQ43.js";
@@ -15,8 +15,9 @@ import "../chunk-6F34A7NZ.js";
15
15
  import "../chunk-ZAU4JVLL.js";
16
16
  import "../chunk-4O4QFF4S.js";
17
17
  import "../chunk-KESKDLX6.js";
18
- import "../chunk-Q6AA6XBS.js";
19
- import "../chunk-YBD32ORB.js";
18
+ import "../chunk-HQIRGWY3.js";
19
+ import "../chunk-K3X3OMAA.js";
20
+ import "../chunk-CP7OUC2Q.js";
20
21
  import "../chunk-TZNYJ3G7.js";
21
22
  export {
22
23
  PromptModal,
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  NotificationCenter,
3
3
  useNotificationCenter
4
- } from "./chunk-P7JQ47LC.js";
4
+ } from "./chunk-6PN23MAZ.js";
5
5
  import {
6
6
  PromptModal,
7
7
  usePromptModal
8
- } from "./chunk-6OPGX7H5.js";
8
+ } from "./chunk-XKID4ZMW.js";
9
9
  import {
10
10
  Tbody
11
11
  } from "./chunk-PJ3744I6.js";
@@ -23,18 +23,18 @@ import {
23
23
  } from "./chunk-N3FUF4TB.js";
24
24
  import {
25
25
  Toggle
26
- } from "./chunk-GOJYBQNG.js";
26
+ } from "./chunk-MVV3VTY2.js";
27
27
  import {
28
28
  ConfirmModal,
29
29
  useConfirmModal
30
- } from "./chunk-2CYO4SJM.js";
30
+ } from "./chunk-7EDCTSAP.js";
31
31
  import {
32
32
  Radio
33
33
  } from "./chunk-PH64POOB.js";
34
34
  import {
35
35
  Option,
36
36
  Select
37
- } from "./chunk-NKJL4J2S.js";
37
+ } from "./chunk-RHMGQNFD.js";
38
38
  import {
39
39
  Tab
40
40
  } from "./chunk-NE5NHILF.js";
@@ -67,7 +67,7 @@ import {
67
67
  } from "./chunk-KJUCHZHV.js";
68
68
  import {
69
69
  Notification
70
- } from "./chunk-I3QCRJ5R.js";
70
+ } from "./chunk-BI6UZBJB.js";
71
71
  import {
72
72
  NotificationDescription
73
73
  } from "./chunk-HW76XVA3.js";
@@ -85,7 +85,7 @@ import {
85
85
  } from "./chunk-SLHX5K6I.js";
86
86
  import {
87
87
  Input
88
- } from "./chunk-M7HQ5V66.js";
88
+ } from "./chunk-C7447UIN.js";
89
89
  import {
90
90
  Label
91
91
  } from "./chunk-RQPDRHRP.js";
@@ -119,7 +119,7 @@ import {
119
119
  } from "./chunk-6F34A7NZ.js";
120
120
  import {
121
121
  Checkbox
122
- } from "./chunk-EBRWD5EE.js";
122
+ } from "./chunk-R6DGIPXN.js";
123
123
  import {
124
124
  Droppable
125
125
  } from "./chunk-7VJOPJVX.js";
@@ -139,7 +139,7 @@ import {
139
139
  } from "./chunk-ZAU4JVLL.js";
140
140
  import {
141
141
  FileUploader
142
- } from "./chunk-SWHJ4GA4.js";
142
+ } from "./chunk-VQMP3PBJ.js";
143
143
  import {
144
144
  Show
145
145
  } from "./chunk-4O4QFF4S.js";
@@ -161,8 +161,9 @@ import {
161
161
  import {
162
162
  $cerberusIcons,
163
163
  defineIcons
164
- } from "./chunk-Q6AA6XBS.js";
165
- import "./chunk-YBD32ORB.js";
164
+ } from "./chunk-HQIRGWY3.js";
165
+ import "./chunk-K3X3OMAA.js";
166
+ import "./chunk-CP7OUC2Q.js";
166
167
  import {
167
168
  useModal
168
169
  } from "./chunk-TZNYJ3G7.js";
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["/**\n * This module is the entry point for the Cerberus React package.\n * @module\n */\n\n// components\n\nexport * from './components/Button'\nexport * from './components/Checkbox'\nexport * from './components/Droppable'\nexport * from './components/FieldMessage'\nexport * from './components/FeatureFlag'\nexport * from './components/FileUploader'\nexport * from './components/IconButton'\nexport * from './components/Input'\nexport * from './components/Label'\nexport * from './components/Modal'\nexport * from './components/ModalHeader'\nexport * from './components/ModalHeading'\nexport * from './components/ModalDescription'\nexport * from './components/ModalIcon'\nexport * from './components/NavMenuTrigger'\nexport * from './components/NavMenuList'\nexport * from './components/NavMenuLink'\nexport * from './components/Notification'\nexport * from './components/NotificationHeading'\nexport * from './components/NotificationDescription'\nexport * from './components/Portal'\nexport * from './components/ProgressBar'\nexport * from './components/Radio'\nexport * from './components/Select'\nexport * from './components/Tab'\nexport * from './components/TabList'\nexport * from './components/TabPanel'\nexport * from './components/Table'\nexport * from './components/Thead'\nexport * from './components/Th'\nexport * from './components/Td'\nexport * from './components/Tbody'\nexport * from './components/Tag'\nexport * from './components/Textarea'\nexport * from './components/Toggle'\nexport * from './components/Show'\n\n// context\n\nexport * from './context/confirm-modal'\nexport * from './context/feature-flags'\nexport * from './context/field'\nexport * from './context/navMenu'\nexport * from './context/notification-center'\nexport * from './context/prompt-modal'\nexport * from './context/tabs'\nexport * from './context/theme'\n\n// hooks\n\nexport * from './hooks/useModal'\nexport * from './hooks/useTheme'\nexport * from './hooks/useToggle'\n\n// aria-helpers\n\nexport * from './aria-helpers/nav-menu.aria'\nexport * from './aria-helpers/tabs.aria'\nexport * from './aria-helpers/trap-focus.aria'\n\n// utils\n\nexport * from './config/defineIcons'\n\n// shared types\n\nexport * from './types'\n\n// 3rd party\n\nexport * from '@dnd-kit/core'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6EA,cAAc;","names":[]}
1
+ {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["/**\n * This module is the entry point for the Cerberus React package.\n * @module\n */\n\n// components\n\nexport * from './components/Button'\nexport * from './components/Checkbox'\nexport * from './components/Droppable'\nexport * from './components/FieldMessage'\nexport * from './components/FeatureFlag'\nexport * from './components/FileUploader'\nexport * from './components/IconButton'\nexport * from './components/Input'\nexport * from './components/Label'\nexport * from './components/Modal'\nexport * from './components/ModalHeader'\nexport * from './components/ModalHeading'\nexport * from './components/ModalDescription'\nexport * from './components/ModalIcon'\nexport * from './components/NavMenuTrigger'\nexport * from './components/NavMenuList'\nexport * from './components/NavMenuLink'\nexport * from './components/Notification'\nexport * from './components/NotificationHeading'\nexport * from './components/NotificationDescription'\nexport * from './components/Portal'\nexport * from './components/ProgressBar'\nexport * from './components/Radio'\nexport * from './components/Select'\nexport * from './components/Tab'\nexport * from './components/TabList'\nexport * from './components/TabPanel'\nexport * from './components/Table'\nexport * from './components/Thead'\nexport * from './components/Th'\nexport * from './components/Td'\nexport * from './components/Tbody'\nexport * from './components/Tag'\nexport * from './components/Textarea'\nexport * from './components/Toggle'\nexport * from './components/Show'\n\n// context\n\nexport * from './context/confirm-modal'\nexport * from './context/feature-flags'\nexport * from './context/field'\nexport * from './context/navMenu'\nexport * from './context/notification-center'\nexport * from './context/prompt-modal'\nexport * from './context/tabs'\nexport * from './context/theme'\n\n// hooks\n\nexport * from './hooks/useModal'\nexport * from './hooks/useTheme'\nexport * from './hooks/useToggle'\n\n// aria-helpers\n\nexport * from './aria-helpers/nav-menu.aria'\nexport * from './aria-helpers/tabs.aria'\nexport * from './aria-helpers/trap-focus.aria'\n\n// utils\n\nexport * from './config/defineIcons'\n\n// shared types\n\nexport * from './types'\n\n// 3rd party\n\nexport * from '@dnd-kit/core'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6EA,cAAc;","names":[]}