@fuf-stack/uniform 2.0.0-next.1 → 2.0.0-next.4

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 (161) hide show
  1. package/dist/Checkboxes/index.d.mts +47 -27
  2. package/dist/Checkboxes/index.d.mts.map +1 -1
  3. package/dist/Checkboxes/index.mjs +26 -25
  4. package/dist/Checkboxes/index.mjs.map +1 -1
  5. package/dist/DatePicker/index.d.mts +63 -86
  6. package/dist/DatePicker/index.d.mts.map +1 -1
  7. package/dist/DatePicker/index.mjs +43 -49
  8. package/dist/DatePicker/index.mjs.map +1 -1
  9. package/dist/FieldArray/index.d.mts +8 -16
  10. package/dist/FieldArray/index.d.mts.map +1 -1
  11. package/dist/FieldArray/index.mjs +25 -37
  12. package/dist/FieldArray/index.mjs.map +1 -1
  13. package/dist/FieldCard/index.d.mts +0 -4
  14. package/dist/FieldCard/index.d.mts.map +1 -1
  15. package/dist/FieldCard/index.mjs +14 -25
  16. package/dist/FieldCard/index.mjs.map +1 -1
  17. package/dist/{FieldCopyTestIdButton-DV0tkdh2.mjs → FieldCopyTestIdButton-D3_jZYJ1.mjs} +3 -5
  18. package/dist/{FieldCopyTestIdButton-DV0tkdh2.mjs.map → FieldCopyTestIdButton-D3_jZYJ1.mjs.map} +1 -1
  19. package/dist/FieldHelper-B1DWl7eu.mjs +38 -0
  20. package/dist/FieldHelper-B1DWl7eu.mjs.map +1 -0
  21. package/dist/FieldLabel-DMTqq0Jj.mjs +29 -0
  22. package/dist/FieldLabel-DMTqq0Jj.mjs.map +1 -0
  23. package/dist/{FieldLayout-BLW5S-Jm.mjs → FieldLayout-C9MEBZAC.mjs} +11 -19
  24. package/dist/FieldLayout-C9MEBZAC.mjs.map +1 -0
  25. package/dist/FieldReset/index.d.mts +420 -0
  26. package/dist/FieldReset/index.d.mts.map +1 -0
  27. package/dist/FieldReset/index.mjs +258 -0
  28. package/dist/FieldReset/index.mjs.map +1 -0
  29. package/dist/{FieldValidationError-DgkCL3cC.mjs → FieldValidationError-BuLvuRyi.mjs} +5 -7
  30. package/dist/FieldValidationError-BuLvuRyi.mjs.map +1 -0
  31. package/dist/Form/index.d.mts +12 -14
  32. package/dist/Form/index.d.mts.map +1 -1
  33. package/dist/Form/index.mjs +7 -10
  34. package/dist/Form/index.mjs.map +1 -1
  35. package/dist/FormContext-BnNJYZOo.d.mts +124 -0
  36. package/dist/FormContext-BnNJYZOo.d.mts.map +1 -0
  37. package/dist/{FormContext-CHctWFAP.mjs → FormContext-PXkVlBdU.mjs} +5 -9
  38. package/dist/{FormContext-CHctWFAP.mjs.map → FormContext-PXkVlBdU.mjs.map} +1 -1
  39. package/dist/Grid/index.d.mts +0 -2
  40. package/dist/Grid/index.d.mts.map +1 -1
  41. package/dist/Grid/index.mjs +1 -1
  42. package/dist/{Grid-DfcZeuib.mjs → Grid-DBL29Kwb.mjs} +3 -5
  43. package/dist/{Grid-DfcZeuib.mjs.map → Grid-DBL29Kwb.mjs.map} +1 -1
  44. package/dist/Input/index.d.mts +610 -393
  45. package/dist/Input/index.d.mts.map +1 -1
  46. package/dist/Input/index.mjs +24 -31
  47. package/dist/Input/index.mjs.map +1 -1
  48. package/dist/RadioBoxes/index.d.mts +247 -2227
  49. package/dist/RadioBoxes/index.d.mts.map +1 -1
  50. package/dist/RadioBoxes/index.mjs +25 -37
  51. package/dist/RadioBoxes/index.mjs.map +1 -1
  52. package/dist/RadioTabs/index.d.mts +599 -289
  53. package/dist/RadioTabs/index.d.mts.map +1 -1
  54. package/dist/RadioTabs/index.mjs +24 -27
  55. package/dist/RadioTabs/index.mjs.map +1 -1
  56. package/dist/Radios/index.d.mts +164 -2077
  57. package/dist/Radios/index.d.mts.map +1 -1
  58. package/dist/Radios/index.mjs +12 -23
  59. package/dist/Radios/index.mjs.map +1 -1
  60. package/dist/Select/index.d.mts +809 -484
  61. package/dist/Select/index.d.mts.map +1 -1
  62. package/dist/Select/index.mjs +69 -54
  63. package/dist/Select/index.mjs.map +1 -1
  64. package/dist/Slider/index.d.mts +657 -281
  65. package/dist/Slider/index.d.mts.map +1 -1
  66. package/dist/Slider/index.mjs +42 -42
  67. package/dist/Slider/index.mjs.map +1 -1
  68. package/dist/SubmitButton/index.d.mts +0 -2
  69. package/dist/SubmitButton/index.d.mts.map +1 -1
  70. package/dist/SubmitButton/index.mjs +2 -4
  71. package/dist/SubmitButton/index.mjs.map +1 -1
  72. package/dist/Switch/index.d.mts +1 -1
  73. package/dist/Switch/index.mjs +25 -32
  74. package/dist/Switch/index.mjs.map +1 -1
  75. package/dist/Switch-aBYStBoY.d.mts +990 -0
  76. package/dist/Switch-aBYStBoY.d.mts.map +1 -0
  77. package/dist/SwitchBox/index.d.mts +606 -201
  78. package/dist/SwitchBox/index.d.mts.map +1 -1
  79. package/dist/SwitchBox/index.mjs +29 -33
  80. package/dist/SwitchBox/index.mjs.map +1 -1
  81. package/dist/TextArea/index.d.mts +565 -185
  82. package/dist/TextArea/index.d.mts.map +1 -1
  83. package/dist/TextArea/index.mjs +18 -23
  84. package/dist/TextArea/index.mjs.map +1 -1
  85. package/dist/Time/index.d.mts +60 -44
  86. package/dist/Time/index.d.mts.map +1 -1
  87. package/dist/Time/index.mjs +27 -36
  88. package/dist/Time/index.mjs.map +1 -1
  89. package/dist/fieldHelperVariants-ClP8taiS.mjs +20 -0
  90. package/dist/fieldHelperVariants-ClP8taiS.mjs.map +1 -0
  91. package/dist/fieldLabelVariants-C4ZqECec.mjs +13 -0
  92. package/dist/fieldLabelVariants-C4ZqECec.mjs.map +1 -0
  93. package/dist/{FieldDescription-C4l0HKGL.mjs → fieldProps-DWfz2jSO.mjs} +5 -17
  94. package/dist/fieldProps-DWfz2jSO.mjs.map +1 -0
  95. package/dist/helpers/index.d.mts +0 -6
  96. package/dist/helpers/index.d.mts.map +1 -1
  97. package/dist/helpers/index.mjs +3 -6
  98. package/dist/helpers/index.mjs.map +1 -1
  99. package/dist/hooks/useClientValidation/index.d.mts +0 -2
  100. package/dist/hooks/useClientValidation/index.d.mts.map +1 -1
  101. package/dist/hooks/useClientValidation/index.mjs +3 -5
  102. package/dist/hooks/useController/index.d.mts +0 -2
  103. package/dist/hooks/useController/index.d.mts.map +1 -1
  104. package/dist/hooks/useController/index.mjs +2 -3
  105. package/dist/hooks/useFormContext/index.d.mts +31 -52
  106. package/dist/hooks/useFormContext/index.d.mts.map +1 -1
  107. package/dist/hooks/useFormContext/index.mjs +2 -3
  108. package/dist/hooks/useInputValueDebounce/index.d.mts +0 -2
  109. package/dist/hooks/useInputValueDebounce/index.d.mts.map +1 -1
  110. package/dist/hooks/useInputValueDebounce/index.mjs +3 -5
  111. package/dist/hooks/useInputValueTransform/index.d.mts +1 -1
  112. package/dist/hooks/useInputValueTransform/index.mjs +2 -3
  113. package/dist/hooks/useWatchFormReset/index.d.mts +0 -2
  114. package/dist/hooks/useWatchFormReset/index.d.mts.map +1 -1
  115. package/dist/hooks/useWatchFormReset/index.mjs +3 -5
  116. package/dist/hooks/useWatchUserChange/index.d.mts +0 -2
  117. package/dist/hooks/useWatchUserChange/index.d.mts.map +1 -1
  118. package/dist/hooks/useWatchUserChange/index.mjs +3 -5
  119. package/dist/{index-BS8IoBOn.d.mts → index-cevZBrIN.d.mts} +1 -3
  120. package/dist/index-cevZBrIN.d.mts.map +1 -0
  121. package/dist/partials/FieldCopyTestIdButton/index.d.mts +0 -2
  122. package/dist/partials/FieldCopyTestIdButton/index.d.mts.map +1 -1
  123. package/dist/partials/FieldCopyTestIdButton/index.mjs +1 -1
  124. package/dist/{Switch-CvPO8IF9.d.mts → partials/FieldHelper/index.d.mts} +309 -361
  125. package/dist/partials/FieldHelper/index.d.mts.map +1 -0
  126. package/dist/partials/FieldHelper/index.mjs +7 -0
  127. package/dist/partials/FieldHelper/index.mjs.map +1 -0
  128. package/dist/partials/FieldLabel/index.d.mts +160 -0
  129. package/dist/partials/FieldLabel/index.d.mts.map +1 -0
  130. package/dist/partials/FieldLabel/index.mjs +7 -0
  131. package/dist/partials/FieldLabel/index.mjs.map +1 -0
  132. package/dist/partials/FieldValidationError/index.d.mts +13 -15
  133. package/dist/partials/FieldValidationError/index.d.mts.map +1 -1
  134. package/dist/partials/FieldValidationError/index.mjs +1 -1
  135. package/dist/{radioControlVariants-Cm6WufWo.mjs → radioControlVariants-CbtG5U4_.mjs} +28 -25
  136. package/dist/radioControlVariants-CbtG5U4_.mjs.map +1 -0
  137. package/dist/{switchVariants-BaQw2DA7.mjs → switchVariants-0Xa7TQYg.mjs} +8 -11
  138. package/dist/switchVariants-0Xa7TQYg.mjs.map +1 -0
  139. package/dist/{timeVariants-B9HDfNYt.mjs → timeVariants-Bkt4iwXx.mjs} +14 -12
  140. package/dist/timeVariants-Bkt4iwXx.mjs.map +1 -0
  141. package/dist/{useController-BCFeZbBZ.mjs → useController-JtIeurpw.mjs} +3 -4
  142. package/dist/{useController-BCFeZbBZ.mjs.map → useController-JtIeurpw.mjs.map} +1 -1
  143. package/dist/{useFormContext-BPjJjNnM.mjs → useFormContext-piqnN2L-.mjs} +3 -4
  144. package/dist/useFormContext-piqnN2L-.mjs.map +1 -0
  145. package/dist/{useInputValueTransform-Mw8YEOXT.mjs → useInputValueTransform-CXWWFhy_.mjs} +2 -3
  146. package/dist/{useInputValueTransform-Mw8YEOXT.mjs.map → useInputValueTransform-CXWWFhy_.mjs.map} +1 -1
  147. package/dist/{FieldLabel-DKzqkuY1.mjs → useUniformField-TTNPTsVn.mjs} +15 -37
  148. package/dist/useUniformField-TTNPTsVn.mjs.map +1 -0
  149. package/package.json +10 -7
  150. package/dist/FieldDescription-C4l0HKGL.mjs.map +0 -1
  151. package/dist/FieldLabel-DKzqkuY1.mjs.map +0 -1
  152. package/dist/FieldLayout-BLW5S-Jm.mjs.map +0 -1
  153. package/dist/FieldValidationError-DgkCL3cC.mjs.map +0 -1
  154. package/dist/FormContext-CsFiNvuJ.d.mts +0 -19
  155. package/dist/FormContext-CsFiNvuJ.d.mts.map +0 -1
  156. package/dist/Switch-CvPO8IF9.d.mts.map +0 -1
  157. package/dist/index-BS8IoBOn.d.mts.map +0 -1
  158. package/dist/radioControlVariants-Cm6WufWo.mjs.map +0 -1
  159. package/dist/switchVariants-BaQw2DA7.mjs.map +0 -1
  160. package/dist/timeVariants-B9HDfNYt.mjs.map +0 -1
  161. package/dist/useFormContext-BPjJjNnM.mjs.map +0 -1
@@ -1,11 +1,11 @@
1
- import { t as InputValueTransform } from "../index-BS8IoBOn.mjs";
1
+ import { t as InputValueTransform } from "../index-cevZBrIN.mjs";
2
2
  import { ReactNode } from "react";
3
3
  import { TVClassName, TVProps } from "@fuf-stack/pixel-utils";
4
- //#region src/Checkboxes/checkboxesVariants.d.ts
5
4
  export declare const checkboxesVariants: ((props?: ({
6
5
  color?: "success" | "default" | "info" | "danger" | "primary" | "secondary" | "warning" | undefined;
7
- invalid?: boolean | undefined;
8
6
  lineThrough?: boolean | undefined;
7
+ invalid?: boolean | undefined;
8
+ readOnly?: boolean | undefined;
9
9
  } & ({
10
10
  class?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
11
11
  className?: never;
@@ -15,8 +15,9 @@ export declare const checkboxesVariants: ((props?: ({
15
15
  })) | undefined) => {
16
16
  wrapper: (slotProps?: ({
17
17
  color?: "success" | "default" | "info" | "danger" | "primary" | "secondary" | "warning" | undefined;
18
- invalid?: boolean | undefined;
19
18
  lineThrough?: boolean | undefined;
19
+ invalid?: boolean | undefined;
20
+ readOnly?: boolean | undefined;
20
21
  } & ({
21
22
  class?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
22
23
  className?: never;
@@ -27,8 +28,9 @@ export declare const checkboxesVariants: ((props?: ({
27
28
  } & {
28
29
  base: (slotProps?: ({
29
30
  color?: "success" | "default" | "info" | "danger" | "primary" | "secondary" | "warning" | undefined;
30
- invalid?: boolean | undefined;
31
31
  lineThrough?: boolean | undefined;
32
+ invalid?: boolean | undefined;
33
+ readOnly?: boolean | undefined;
32
34
  } & ({
33
35
  class?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
34
36
  className?: never;
@@ -38,8 +40,9 @@ export declare const checkboxesVariants: ((props?: ({
38
40
  })) | undefined) => string;
39
41
  description: (slotProps?: ({
40
42
  color?: "success" | "default" | "info" | "danger" | "primary" | "secondary" | "warning" | undefined;
41
- invalid?: boolean | undefined;
42
43
  lineThrough?: boolean | undefined;
44
+ invalid?: boolean | undefined;
45
+ readOnly?: boolean | undefined;
43
46
  } & ({
44
47
  class?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
45
48
  className?: never;
@@ -49,8 +52,9 @@ export declare const checkboxesVariants: ((props?: ({
49
52
  })) | undefined) => string;
50
53
  errorMessage: (slotProps?: ({
51
54
  color?: "success" | "default" | "info" | "danger" | "primary" | "secondary" | "warning" | undefined;
52
- invalid?: boolean | undefined;
53
55
  lineThrough?: boolean | undefined;
56
+ invalid?: boolean | undefined;
57
+ readOnly?: boolean | undefined;
54
58
  } & ({
55
59
  class?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
56
60
  className?: never;
@@ -60,8 +64,9 @@ export declare const checkboxesVariants: ((props?: ({
60
64
  })) | undefined) => string;
61
65
  helperWrapper: (slotProps?: ({
62
66
  color?: "success" | "default" | "info" | "danger" | "primary" | "secondary" | "warning" | undefined;
63
- invalid?: boolean | undefined;
64
67
  lineThrough?: boolean | undefined;
68
+ invalid?: boolean | undefined;
69
+ readOnly?: boolean | undefined;
65
70
  } & ({
66
71
  class?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
67
72
  className?: never;
@@ -71,8 +76,9 @@ export declare const checkboxesVariants: ((props?: ({
71
76
  })) | undefined) => string;
72
77
  label: (slotProps?: ({
73
78
  color?: "success" | "default" | "info" | "danger" | "primary" | "secondary" | "warning" | undefined;
74
- invalid?: boolean | undefined;
75
79
  lineThrough?: boolean | undefined;
80
+ invalid?: boolean | undefined;
81
+ readOnly?: boolean | undefined;
76
82
  } & ({
77
83
  class?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
78
84
  className?: never;
@@ -82,8 +88,9 @@ export declare const checkboxesVariants: ((props?: ({
82
88
  })) | undefined) => string;
83
89
  optionBase: (slotProps?: ({
84
90
  color?: "success" | "default" | "info" | "danger" | "primary" | "secondary" | "warning" | undefined;
85
- invalid?: boolean | undefined;
86
91
  lineThrough?: boolean | undefined;
92
+ invalid?: boolean | undefined;
93
+ readOnly?: boolean | undefined;
87
94
  } & ({
88
95
  class?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
89
96
  className?: never;
@@ -93,8 +100,9 @@ export declare const checkboxesVariants: ((props?: ({
93
100
  })) | undefined) => string;
94
101
  optionIcon: (slotProps?: ({
95
102
  color?: "success" | "default" | "info" | "danger" | "primary" | "secondary" | "warning" | undefined;
96
- invalid?: boolean | undefined;
97
103
  lineThrough?: boolean | undefined;
104
+ invalid?: boolean | undefined;
105
+ readOnly?: boolean | undefined;
98
106
  } & ({
99
107
  class?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
100
108
  className?: never;
@@ -104,8 +112,9 @@ export declare const checkboxesVariants: ((props?: ({
104
112
  })) | undefined) => string;
105
113
  optionLabel: (slotProps?: ({
106
114
  color?: "success" | "default" | "info" | "danger" | "primary" | "secondary" | "warning" | undefined;
107
- invalid?: boolean | undefined;
108
115
  lineThrough?: boolean | undefined;
116
+ invalid?: boolean | undefined;
117
+ readOnly?: boolean | undefined;
109
118
  } & ({
110
119
  class?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
111
120
  className?: never;
@@ -115,8 +124,9 @@ export declare const checkboxesVariants: ((props?: ({
115
124
  })) | undefined) => string;
116
125
  optionLabelSubline: (slotProps?: ({
117
126
  color?: "success" | "default" | "info" | "danger" | "primary" | "secondary" | "warning" | undefined;
118
- invalid?: boolean | undefined;
119
127
  lineThrough?: boolean | undefined;
128
+ invalid?: boolean | undefined;
129
+ readOnly?: boolean | undefined;
120
130
  } & ({
121
131
  class?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
122
132
  className?: never;
@@ -126,8 +136,9 @@ export declare const checkboxesVariants: ((props?: ({
126
136
  })) | undefined) => string;
127
137
  optionWrapper: (slotProps?: ({
128
138
  color?: "success" | "default" | "info" | "danger" | "primary" | "secondary" | "warning" | undefined;
129
- invalid?: boolean | undefined;
130
139
  lineThrough?: boolean | undefined;
140
+ invalid?: boolean | undefined;
141
+ readOnly?: boolean | undefined;
131
142
  } & ({
132
143
  class?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
133
144
  className?: never;
@@ -137,8 +148,9 @@ export declare const checkboxesVariants: ((props?: ({
137
148
  })) | undefined) => string;
138
149
  wrapper: (slotProps?: ({
139
150
  color?: "success" | "default" | "info" | "danger" | "primary" | "secondary" | "warning" | undefined;
140
- invalid?: boolean | undefined;
141
151
  lineThrough?: boolean | undefined;
152
+ invalid?: boolean | undefined;
153
+ readOnly?: boolean | undefined;
142
154
  } & ({
143
155
  class?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
144
156
  className?: never;
@@ -319,7 +331,7 @@ export declare const checkboxesVariants: ((props?: ({
319
331
  /** Supporting text for the field */
320
332
  description: string;
321
333
  /** Container for validation messages */
322
- errorMessage: string[];
334
+ errorMessage: string;
323
335
  /** Container for help text and validation messages */
324
336
  helperWrapper: string;
325
337
  /** Visible field label */
@@ -350,23 +362,31 @@ export declare const checkboxesVariants: ((props?: ({
350
362
  optionWrapper: string;
351
363
  };
352
364
  };
365
+ readOnly: {
366
+ true: {
367
+ base: string;
368
+ optionWrapper: string;
369
+ };
370
+ };
353
371
  };
354
372
  defaultVariants: {
355
373
  color?: "success" | "default" | "info" | "danger" | "primary" | "secondary" | "warning" | undefined;
356
- invalid?: boolean | undefined;
357
374
  lineThrough?: boolean | undefined;
375
+ invalid?: boolean | undefined;
376
+ readOnly?: boolean | undefined;
358
377
  };
359
378
  compoundVariants: ({
360
379
  color?: "success" | "default" | "info" | "danger" | "primary" | "secondary" | "warning" | undefined;
361
- invalid?: boolean | boolean[] | undefined;
362
380
  lineThrough?: boolean | boolean[] | undefined;
381
+ invalid?: boolean | boolean[] | undefined;
382
+ readOnly?: boolean | boolean[] | undefined;
363
383
  } & ({
364
384
  class?: (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined) | {
385
+ description?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
365
386
  base?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
366
387
  wrapper?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
367
- description?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
368
- errorMessage?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
369
388
  label?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
389
+ errorMessage?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
370
390
  helperWrapper?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
371
391
  optionLabel?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
372
392
  optionLabelSubline?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
@@ -378,11 +398,11 @@ export declare const checkboxesVariants: ((props?: ({
378
398
  } | {
379
399
  class?: never;
380
400
  className?: (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined) | {
401
+ description?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
381
402
  base?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
382
403
  wrapper?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
383
- description?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
384
- errorMessage?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
385
404
  label?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
405
+ errorMessage?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
386
406
  helperWrapper?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
387
407
  optionLabel?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
388
408
  optionLabelSubline?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
@@ -392,10 +412,11 @@ export declare const checkboxesVariants: ((props?: ({
392
412
  };
393
413
  }))[];
394
414
  compoundSlots: ({
395
- slots: ("base" | "wrapper" | "description" | "errorMessage" | "label" | "helperWrapper" | "optionLabel" | "optionLabelSubline" | "optionBase" | "optionIcon" | "optionWrapper")[];
415
+ slots: ("description" | "base" | "wrapper" | "label" | "errorMessage" | "helperWrapper" | "optionLabel" | "optionLabelSubline" | "optionBase" | "optionIcon" | "optionWrapper")[];
396
416
  } & ({
397
417
  lineThrough?: boolean | boolean[] | undefined;
398
418
  invalid?: boolean | boolean[] | undefined;
419
+ readOnly?: boolean | boolean[] | undefined;
399
420
  } & ({
400
421
  class?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
401
422
  className?: never;
@@ -403,12 +424,10 @@ export declare const checkboxesVariants: ((props?: ({
403
424
  class?: never;
404
425
  className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
405
426
  })))[];
406
- variantKeys: ("invalid" | "lineThrough")[];
427
+ variantKeys: ("lineThrough" | "invalid" | "readOnly")[];
407
428
  };
408
429
  type VariantProps = TVProps<typeof checkboxesVariants>;
409
430
  type ClassName = TVClassName<typeof checkboxesVariants>;
410
- //#endregion
411
- //#region src/Checkboxes/Checkboxes.d.ts
412
431
  interface CheckboxOption {
413
432
  /** Disables the field */
414
433
  disabled?: boolean;
@@ -461,6 +480,8 @@ interface CheckboxesProps {
461
480
  name: string;
462
481
  /** Available options */
463
482
  options: CheckboxOption[];
483
+ /** Prevents changes while keeping the selection in validation and submission */
484
+ readOnly?: boolean;
464
485
  /** HTML data-testid attribute for e2e tests */
465
486
  testId?: string;
466
487
  /** allows disentangled display and form values for a field */
@@ -468,6 +489,5 @@ interface CheckboxesProps {
468
489
  }
469
490
  /** Form selection field for multiple checkbox options */
470
491
  declare const Checkboxes: ({ children, className, color, inline, lineThrough, name, options, ...uniformFieldProps }: CheckboxesProps) => import("react").JSX.Element;
471
- //#endregion
472
492
  export { type CheckboxOption, type CheckboxesProps, Checkboxes as default };
473
493
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/Checkboxes/checkboxesVariants.ts","../../src/Checkboxes/Checkboxes.tsx"],"mappings":";;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA0FnB,eAAe,eAAe;KAE9B,YAAY,mBAAmB;UC7H1B;;EAEf;;EAEA,QAAQ;;EAER,eAAe;;EAEf,OAAO;;EAEP;;EAEA;;UAGQ;;EAER,UAAU;;EAEV,QAAQ;;EAER;;IAEE;;IAEA;;IAEA;;;UAIa;;EAEf;;EAEA,YAAY,SAAS,wBAAwB;;EAE7C,YAAY;;EAEZ,QAAQ;;EAER,cAAc;;EAEd;;EAEA;;EAEA,QAAQ;;EAER;;EAEA;;EAEA,SAAS;;EAET;;EAEA;;EAEA,YAAY;;;cAIR,eAAc,UAAA,WAAA,OAAA,QAAA,aAAA,MAAA,YAAA,qBASjB,oCAAe,IAAA"}
@@ -1,12 +1,14 @@
1
- import { n as useUniformField } from "../FieldLabel-DKzqkuY1.mjs";
2
- import { n as getFieldControlProps } from "../FieldDescription-C4l0HKGL.mjs";
3
- import { t as FieldLayout } from "../FieldLayout-BLW5S-Jm.mjs";
1
+ import { t as useUniformField } from "../useUniformField-TTNPTsVn.mjs";
2
+ import { t as getFieldControlProps } from "../fieldProps-DWfz2jSO.mjs";
3
+ import { t as FieldLayout } from "../FieldLayout-C9MEBZAC.mjs";
4
+ import { t as fieldHelperVariants } from "../fieldHelperVariants-ClP8taiS.mjs";
5
+ import { t as fieldLabelVariants } from "../fieldLabelVariants-C4ZqECec.mjs";
4
6
  import { useId } from "react";
5
7
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
8
  import { slugify, tv } from "@fuf-stack/pixel-utils";
7
9
  import { useStyling } from "@fuf-stack/pixels/StylingProvider";
8
10
  import { CheckboxButton, CheckboxField, CheckboxGroup, Label } from "react-aria-components";
9
- //#region src/Checkboxes/checkboxesVariants.ts
11
+ // src/Checkboxes/checkboxesVariants.ts
10
12
  const checkboxColorVariants = tv({
11
13
  slots: { wrapper: "" },
12
14
  variants: { color: {
@@ -23,20 +25,20 @@ const checkboxesVariants = tv({
23
25
  extend: checkboxColorVariants,
24
26
  slots: {
25
27
  /** Container for the field control and supporting text */
26
- base: ["group flex w-full flex-col gap-y-1.5", "relative"],
28
+ base: ["group flex w-full flex-col", "relative"],
27
29
  /** Supporting text for the field */
28
- description: "text-foreground-400 text-small",
30
+ description: fieldHelperVariants.slots.description,
29
31
  /** Container for validation messages */
30
- errorMessage: ["text-tiny", "text-danger text-small"],
32
+ errorMessage: fieldHelperVariants.slots.errorMessage,
31
33
  /** Container for help text and validation messages */
32
- helperWrapper: "relative block p-0",
34
+ helperWrapper: fieldHelperVariants.slots.helperWrapper,
33
35
  /** Visible field label */
34
- label: ["inline-flex cursor-default text-sm text-foreground subpixel-antialiased group-data-[invalid=true]:!text-danger", "relative"],
36
+ label: [fieldLabelVariants.base, "relative inline-flex"],
35
37
  /** Clickable checkbox option */
36
38
  optionBase: [
37
39
  "",
38
40
  "group relative -m-2 inline-flex max-w-fit cursor-pointer select-none items-center justify-start p-2 tap-highlight-transparent",
39
- "data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-disabled"
41
+ "data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-disabled data-[disabled=true]:**:cursor-not-allowed"
40
42
  ],
41
43
  /** Checkmark inside the selection indicator */
42
44
  optionIcon: [
@@ -76,6 +78,10 @@ const checkboxesVariants = tv({
76
78
  invalid: { true: {
77
79
  optionLabel: "text-danger",
78
80
  optionWrapper: "before:border-danger"
81
+ } },
82
+ readOnly: { true: {
83
+ base: "cursor-not-allowed opacity-disabled **:cursor-not-allowed",
84
+ optionWrapper: "group-data-[hover=true]:before:bg-transparent"
79
85
  } }
80
86
  }
81
87
  });
@@ -89,8 +95,7 @@ const checkboxOptionVariants = tv({
89
95
  },
90
96
  variants: { invalid: { true: { label: "text-danger" } } }
91
97
  });
92
- //#endregion
93
- //#region src/Checkboxes/subcomponents/CheckboxIndicator.tsx
98
+ // src/Checkboxes/subcomponents/CheckboxIndicator.tsx
94
99
  /** Checkbox selection indicator with an animated checkmark */
95
100
  const CheckboxIndicator = ({ className, selected }) => {
96
101
  return /* @__PURE__ */ jsx("span", {
@@ -117,8 +122,7 @@ const CheckboxIndicator = ({ className, selected }) => {
117
122
  })
118
123
  });
119
124
  };
120
- //#endregion
121
- //#region src/Checkboxes/subcomponents/CheckboxLabel.tsx
125
+ // src/Checkboxes/subcomponents/CheckboxLabel.tsx
122
126
  /** Checkbox option text with an optional supporting line and accessible-name IDs */
123
127
  const CheckboxLabel = ({ className, id, label, labelSubline }) => {
124
128
  return /* @__PURE__ */ jsx("span", {
@@ -139,8 +143,7 @@ const CheckboxLabel = ({ className, id, label, labelSubline }) => {
139
143
  }) : label
140
144
  });
141
145
  };
142
- //#endregion
143
- //#region src/Checkboxes/subcomponents/CheckboxControl.tsx
146
+ // src/Checkboxes/subcomponents/CheckboxControl.tsx
144
147
  /**
145
148
  * Checkbox option with an animated indicator, label and optional subline
146
149
  *
@@ -206,21 +209,21 @@ const CheckboxControl = ({ className: classNames, color, describedBy, disabled,
206
209
  })
207
210
  });
208
211
  };
209
- //#endregion
210
- //#region src/Checkboxes/subcomponents/CheckboxesControl.tsx
212
+ // src/Checkboxes/subcomponents/CheckboxesControl.tsx
211
213
  /**
212
214
  * Checkbox group presentation with option composition and focus routing
213
215
  *
214
216
  * @see https://react-aria.adobe.com/CheckboxGroup
215
217
  */
216
218
  const CheckboxesControl = ({ field, children, className, color = "primary", inline = false, lineThrough, options }) => {
217
- const { description, disabled, errorMessage, ids, ref: inputRef, invalid, label, name, onBlur, onChange: onValueChange, required, testId } = field;
219
+ const { description, disabled, errorMessage, ids, ref: inputRef, invalid, label, name, onBlur, onChange: onValueChange, readOnly, required, testId } = field;
218
220
  const controlProps = getFieldControlProps(field);
219
221
  const styling = useStyling();
220
222
  const value = Array.isArray(field.value) ? field.value : [];
221
223
  const variants = styling.resolve(checkboxesVariants, {
222
224
  lineThrough,
223
- invalid
225
+ invalid,
226
+ readOnly
224
227
  });
225
228
  const classNames = styling.variantsToClassNames(variants, className, "base");
226
229
  const associations = controlProps;
@@ -270,6 +273,7 @@ const CheckboxesControl = ({ field, children, className, color = "primary", inli
270
273
  id: associations.id,
271
274
  isDisabled: disabled,
272
275
  isInvalid: invalid,
276
+ isReadOnly: readOnly,
273
277
  isRequired: required,
274
278
  name,
275
279
  onBlur,
@@ -301,8 +305,7 @@ const CheckboxesControl = ({ field, children, className, color = "primary", inli
301
305
  })]
302
306
  });
303
307
  };
304
- //#endregion
305
- //#region src/Checkboxes/Checkboxes.tsx
308
+ // src/Checkboxes/Checkboxes.tsx
306
309
  /** Form selection field for multiple checkbox options */
307
310
  const Checkboxes = ({ children = void 0, className = void 0, color = "primary", inline = false, lineThrough = false, name, options, ...uniformFieldProps }) => {
308
311
  const { field } = useUniformField({
@@ -320,10 +323,8 @@ const Checkboxes = ({ children = void 0, className = void 0, color = "primary",
320
323
  children
321
324
  });
322
325
  };
323
- //#endregion
324
- //#region src/Checkboxes/index.ts
326
+ // src/Checkboxes/index.ts
325
327
  var Checkboxes_default = Checkboxes;
326
- //#endregion
327
328
  export { checkboxesVariants, Checkboxes_default as default };
328
329
 
329
330
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../src/Checkboxes/checkboxesVariants.ts","../../src/Checkboxes/subcomponents/CheckboxIndicator.tsx","../../src/Checkboxes/subcomponents/CheckboxLabel.tsx","../../src/Checkboxes/subcomponents/CheckboxControl.tsx","../../src/Checkboxes/subcomponents/CheckboxesControl.tsx","../../src/Checkboxes/Checkboxes.tsx","../../src/Checkboxes/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\n\nimport { tv } from '@fuf-stack/pixel-utils';\n\nconst checkboxColorVariants = tv({\n slots: { wrapper: '' },\n variants: {\n color: {\n danger: {\n wrapper:\n 'text-danger-foreground after:bg-danger after:text-danger-foreground',\n },\n default: {\n wrapper:\n 'text-default-foreground after:bg-default after:text-default-foreground',\n },\n info: {\n wrapper:\n 'text-info-foreground after:bg-info after:text-info-foreground',\n },\n primary: {\n wrapper:\n 'text-primary-foreground after:bg-primary after:text-primary-foreground',\n },\n secondary: {\n wrapper:\n 'text-secondary-foreground after:bg-secondary after:text-secondary-foreground',\n },\n success: {\n wrapper:\n 'text-success-foreground after:bg-success after:text-success-foreground',\n },\n warning: {\n wrapper:\n 'text-warning-foreground after:bg-warning after:text-warning-foreground',\n },\n },\n },\n});\nexport const checkboxesVariants = tv({\n extend: checkboxColorVariants,\n slots: {\n /** Container for the field control and supporting text */\n base: ['group flex w-full flex-col gap-y-1.5', 'relative'],\n /** Supporting text for the field */\n description: 'text-foreground-400 text-small',\n /** Container for validation messages */\n errorMessage: ['text-tiny', 'text-danger text-small'],\n /** Container for help text and validation messages */\n helperWrapper: 'relative block p-0',\n /** Visible field label */\n label: [\n 'inline-flex cursor-default text-sm text-foreground subpixel-antialiased group-data-[invalid=true]:!text-danger',\n 'relative',\n ],\n /** Clickable checkbox option */\n optionBase: [\n '',\n // option layout and pointer behavior\n 'group relative -m-2 inline-flex max-w-fit cursor-pointer select-none items-center justify-start p-2 tap-highlight-transparent',\n // disabled interaction and opacity\n 'data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-disabled',\n ],\n /** Checkmark inside the selection indicator */\n optionIcon: [\n '',\n // checkmark dimensions and fade transition\n 'pointer-events-none z-10 h-3 w-4 opacity-0 transition-opacity',\n // selected visibility\n 'group-data-[selected=true]:opacity-100',\n // reduced motion\n 'motion-reduce:transition-none',\n ],\n /** Primary option text */\n optionLabel: '',\n /** Additional text below the option label */\n optionLabelSubline: 'text-foreground-400 !text-small',\n /** Outline and fill around the checkmark */\n optionWrapper: [\n '',\n // checkbox dimensions and layout\n 'relative me-2 inline-flex h-5 w-5 shrink-0 items-center justify-center overflow-hidden rounded-[calc(var(--pixel-radius-medium)*0.6)] transition-transform',\n // unselected border layer\n \"before:absolute before:inset-0 before:box-border before:rounded-[inherit] before:border-2 before:border-solid before:border-default before:transition-colors before:content-['']\",\n // animated selection layer\n \"after:absolute after:inset-0 after:origin-center after:scale-50 after:rounded-[inherit] after:opacity-0 after:duration-200 after:ease-linear after:content-[''] after:transition-transform-opacity\",\n // pressed scale\n 'group-data-[pressed=true]:scale-95',\n // keyboard focus ring\n 'group-data-[focus-visible=true]:ring-2 group-data-[focus-visible=true]:ring-focus group-data-[focus-visible=true]:ring-offset-2 group-data-[focus-visible=true]:ring-offset-background',\n // hover and selected states\n 'group-data-[hover=true]:before:bg-default-100 group-data-[selected=true]:after:scale-100 group-data-[selected=true]:after:opacity-100',\n // reduced motion\n 'motion-reduce:transition-none',\n ],\n /** Container arranging the selectable content */\n wrapper: [\n '',\n 'flex flex-col flex-wrap gap-2 data-[orientation=horizontal]:flex-row',\n ],\n },\n variants: {\n lineThrough: {\n true: {\n optionLabel: [\n // label layout\n 'inline-flex items-center justify-center',\n // strikethrough line\n \"before:absolute before:h-0.5 before:w-0 before:bg-foreground before:content-['']\",\n // selected strikethrough state\n 'group-data-[selected=true]:opacity-60 group-data-[selected=true]:before:w-full',\n 'relative before:transition-all before:duration-200',\n ],\n optionLabelSubline: 'group-data-[selected=true]:opacity-60',\n },\n },\n invalid: {\n true: {\n optionLabel: 'text-danger',\n optionWrapper: 'before:border-danger',\n },\n },\n },\n});\n\nexport type VariantProps = TVProps<typeof checkboxesVariants>;\n\nexport type ClassName = TVClassName<typeof checkboxesVariants>;\nexport const checkboxOptionVariants = tv({\n extend: checkboxColorVariants,\n slots: {\n /** Option field context without an additional layout box */\n field: 'contents',\n /** Container for the option label and optional subline */\n label:\n 'relative select-none text-foreground transition-colors-opacity text-medium before:transition-width motion-reduce:transition-none',\n },\n variants: { invalid: { true: { label: 'text-danger' } } },\n});\n\n/** Resolved checkbox group and option slot classes */\nexport type CheckboxClassNames = Record<\n keyof ReturnType<typeof checkboxesVariants>,\n string\n>;\n","interface CheckboxIndicatorProps {\n /** CSS class name */\n className: {\n /** Animated checkmark */\n icon: string;\n /** Selection indicator surface */\n wrapper: string;\n };\n /** Whether the option is selected */\n selected: boolean;\n}\n\n/** Checkbox selection indicator with an animated checkmark */\nconst CheckboxIndicator = ({ className, selected }: CheckboxIndicatorProps) => {\n return (\n <span aria-hidden className={className.wrapper} data-slot=\"wrapper\">\n <svg\n aria-hidden\n className={className.icon}\n data-slot=\"icon\"\n fill=\"none\"\n role=\"presentation\"\n stroke=\"currentColor\"\n strokeDasharray={22}\n strokeDashoffset={selected ? 44 : 66}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n viewBox=\"0 0 17 18\"\n >\n <polyline\n className=\"transition-[stroke-dashoffset] delay-200 duration-250 ease-linear motion-reduce:transition-none\"\n points=\"1 9 7 14 15 4\"\n />\n </svg>\n </span>\n );\n};\n\nexport default CheckboxIndicator;\n","import type { CheckboxOption } from '../Checkboxes';\n\ninterface CheckboxLabelProps extends Pick<\n CheckboxOption,\n 'label' | 'labelSubline'\n> {\n /** CSS class name */\n className: {\n /** Container for the option text */\n base: string;\n /** Primary option text */\n label: string;\n /** Supporting option text */\n subline: string;\n };\n /** Option ID used by the control's accessible-name associations */\n id: string;\n}\n\n/** Checkbox option text with an optional supporting line and accessible-name IDs */\nconst CheckboxLabel = ({\n className,\n id,\n label,\n labelSubline,\n}: CheckboxLabelProps) => {\n return (\n <span className={className.base} data-slot=\"label\" id={`${id}-label`}>\n {labelSubline ? (\n <div className=\"flex grow flex-col items-start\">\n <span className={className.label} id={`${id}-label-text`}>\n {label}\n </span>\n <span className={className.subline} id={`${id}-subline`}>\n {labelSubline}\n </span>\n </div>\n ) : (\n label\n )}\n </span>\n );\n};\n\nexport default CheckboxLabel;\n","import type { CheckboxButtonProps } from 'react-aria-components';\nimport type { CheckboxesProps, CheckboxOption } from '../Checkboxes';\nimport type { CheckboxClassNames } from '../checkboxesVariants';\n\nimport { useId } from 'react';\nimport { CheckboxButton, CheckboxField } from 'react-aria-components';\n\nimport { useStyling } from '@fuf-stack/pixels/StylingProvider';\n\nimport { checkboxOptionVariants } from '../checkboxesVariants';\nimport CheckboxIndicator from './CheckboxIndicator';\nimport CheckboxLabel from './CheckboxLabel';\n\ninterface CheckboxControlProps {\n /** CSS class name */\n className: CheckboxClassNames;\n /** Color scheme for the selection indicator */\n color: NonNullable<CheckboxesProps['color']>;\n /** Supporting description and error IDs */\n describedBy: string | undefined;\n /** Disables the field */\n disabled: boolean;\n /** Shows validation failure */\n invalid: boolean;\n /** Option label, subline and value */\n option: CheckboxOption;\n /** HTML data-testid attribute for e2e tests */\n testId: string;\n}\n\n/**\n * Checkbox option with an animated indicator, label and optional subline\n *\n * @see https://react-aria.adobe.com/Checkbox\n */\nconst CheckboxControl = ({\n className: classNames,\n color,\n describedBy,\n disabled,\n invalid,\n option,\n testId,\n}: CheckboxControlProps) => {\n const id = useId();\n const styling = useStyling();\n\n const hasSubline = !!option.labelSubline;\n const hasLabel = !!option.label || hasSubline;\n const labelledBy = hasSubline\n ? `${id}-label-text ${id}-subline`\n : `${id}-label`;\n\n // classNames from slots\n const variants = styling.resolve(checkboxOptionVariants, { color, invalid });\n const optionClassNames = styling.variantsToClassNames(variants, {\n label: hasSubline ? undefined : classNames.optionLabel,\n wrapper: classNames.optionWrapper,\n });\n\n // preserve option interaction selectors on the clickable label\n const renderOption: NonNullable<CheckboxButtonProps['render']> = (\n props,\n state,\n ) => {\n return (\n <label\n {...props}\n data-focus={state.isFocused || undefined}\n data-hover={state.isHovered || undefined}\n data-invalid={invalid}\n htmlFor={id}\n >\n {props.children}\n </label>\n );\n };\n\n return (\n <CheckboxField\n aria-describedby={describedBy}\n aria-invalid={invalid || undefined}\n aria-label={\n typeof option.label === 'string' ? option.label : option.value\n }\n aria-labelledby={hasLabel ? labelledBy : undefined}\n className={optionClassNames.field}\n id={id}\n isDisabled={disabled}\n isRequired={false}\n validationBehavior=\"aria\"\n value={option.value}\n >\n <CheckboxButton\n className={classNames.optionBase}\n data-testid={testId}\n render={renderOption}\n >\n {({ isSelected }) => {\n return (\n <>\n <CheckboxIndicator\n className={{\n icon: classNames.optionIcon,\n wrapper: optionClassNames.wrapper,\n }}\n selected={isSelected}\n />\n {hasLabel ? (\n <CheckboxLabel\n className={{\n base: optionClassNames.label,\n label: classNames.optionLabel,\n subline: classNames.optionLabelSubline,\n }}\n id={id}\n label={option.label}\n labelSubline={option.labelSubline}\n />\n ) : null}\n </>\n );\n }}\n </CheckboxButton>\n </CheckboxField>\n );\n};\n\nexport default CheckboxControl;\n","import type { CheckboxGroupProps } from 'react-aria-components';\nimport type { UniformField } from '../../hooks/useUniformField/types';\nimport type { CheckboxesProps } from '../Checkboxes';\n\nimport { CheckboxGroup, Label } from 'react-aria-components';\n\nimport { slugify } from '@fuf-stack/pixel-utils';\nimport { useStyling } from '@fuf-stack/pixels/StylingProvider';\n\nimport { getFieldControlProps } from '../../helpers/fieldProps/fieldProps';\nimport FieldLayout from '../../partials/FieldLayout/FieldLayout';\nimport { checkboxesVariants } from '../checkboxesVariants';\nimport CheckboxControl from './CheckboxControl';\n\ninterface CheckboxesControlProps extends Pick<\n CheckboxesProps,\n 'children' | 'className' | 'color' | 'inline' | 'lineThrough' | 'options'\n> {\n /** Bound field values, interactions and metadata */\n field: UniformField<unknown, string[]>;\n}\n\n/**\n * Checkbox group presentation with option composition and focus routing\n *\n * @see https://react-aria.adobe.com/CheckboxGroup\n */\nconst CheckboxesControl = ({\n field,\n children,\n className,\n color = 'primary',\n inline = false,\n lineThrough,\n options,\n}: CheckboxesControlProps) => {\n const {\n description,\n disabled,\n errorMessage,\n ids,\n ref: inputRef,\n invalid,\n label,\n name,\n onBlur,\n onChange: onValueChange,\n required,\n testId,\n } = field;\n\n // associate the editable control with its label and messages\n const controlProps = getFieldControlProps(field);\n\n const styling = useStyling();\n\n // treat non-array form values as an empty selection\n const value = Array.isArray(field.value) ? field.value : [];\n\n // classNames from slots\n const variants = styling.resolve(checkboxesVariants, {\n lineThrough,\n invalid,\n });\n const classNames = styling.variantsToClassNames(variants, className, 'base');\n\n const associations = controlProps;\n const describedBy =\n [\n associations['aria-describedby'],\n required ? `${ids.control}-required` : undefined,\n ]\n .filter(Boolean)\n .join(' ') || undefined;\n\n const renderedOptions = options?.map((option) => {\n const optionDisabled = !!disabled || !!option.disabled;\n\n return {\n option,\n state: {\n checked: value.includes(option.value),\n disabled: optionDisabled,\n invalid: !!invalid,\n },\n checkbox: (\n <CheckboxControl\n key={`index_${option.value}`}\n className={classNames}\n color={color === 'info' ? 'primary' : color}\n describedBy={describedBy}\n disabled={optionDisabled}\n invalid={invalid}\n option={option}\n testId={slugify(`${testId}_option_${option.testId ?? option.value}`, {\n replaceDots: true,\n })}\n />\n ),\n };\n });\n\n // route form focus to the first enabled checkbox\n const handleControlRef = (node: HTMLDivElement | null) => {\n inputRef(\n node\n ? {\n focus: () => {\n node\n .querySelector<HTMLInputElement>('input:not(:disabled)')\n ?.focus();\n },\n }\n : null,\n );\n };\n\n // keep the group styling state on its root\n const renderGroup: NonNullable<CheckboxGroupProps['render']> = (props) => {\n return (\n <div\n {...props}\n aria-invalid={invalid || undefined}\n data-invalid={invalid}\n data-required={required}\n >\n {props.children}\n </div>\n );\n };\n\n return (\n <FieldLayout\n baseAs={CheckboxGroup}\n baseProps={{\n 'aria-describedby': describedBy,\n 'aria-label': associations['aria-label'],\n 'data-component': 'checkboxes',\n 'data-slot': 'base',\n 'data-testid': testId,\n id: associations.id,\n isDisabled: disabled,\n isInvalid: invalid,\n isRequired: required,\n name,\n onBlur,\n onChange: onValueChange,\n ref: handleControlRef,\n render: renderGroup,\n validationBehavior: 'aria',\n value,\n }}\n className={classNames}\n description={description}\n errorMessage={errorMessage}\n ids={ids}\n invalid={invalid}\n label={label}\n labelAs={Label}\n required={required}\n >\n {required ? (\n <span className=\"sr-only\" id={`${ids.control}-required`}>\n Required selection.\n </span>\n ) : null}\n <div\n className={classNames.wrapper}\n data-orientation={inline ? 'horizontal' : 'vertical'}\n data-slot=\"wrapper\"\n >\n {children\n ? children(renderedOptions ?? [])\n : renderedOptions?.map(({ checkbox }) => {\n return checkbox;\n })}\n </div>\n </FieldLayout>\n );\n};\n\nexport default CheckboxesControl;\n","import type { ReactNode } from 'react';\nimport type { InputValueTransform } from '../hooks/useInputValueTransform';\nimport type { ClassName, VariantProps } from './checkboxesVariants';\n\nimport useUniformField from '../hooks/useUniformField/useUniformField';\nimport CheckboxesControl from './subcomponents/CheckboxesControl';\n\nexport { checkboxesVariants } from './checkboxesVariants';\n\nexport interface CheckboxOption {\n /** Disables the field */\n disabled?: boolean;\n /** Field label */\n label?: ReactNode;\n /** subline displayed below the label */\n labelSubline?: ReactNode;\n /** Arbitrary option metadata for custom render logic. */\n meta?: Record<string, unknown>;\n /** HTML data-testid attribute for e2e tests */\n testId?: string;\n /** option value */\n value: string;\n}\n\ninterface ChildRenderOption {\n /** Prebuilt checkbox element for custom option layouts */\n checkbox: ReactNode;\n /** Option data as provided in `options` */\n option: CheckboxOption;\n /** Render-state flags for this option */\n state: {\n /** Whether this option is currently selected */\n checked: boolean;\n /** Disables the field */\n disabled: boolean;\n /** Whether the checkbox group is invalid */\n invalid: boolean;\n };\n}\n\nexport interface CheckboxesProps {\n /** Custom accessible name */\n ariaLabel?: string;\n /** Optional child render function for custom full-list layout rendering. */\n children?: (options: ChildRenderOption[]) => ReactNode;\n /** CSS class name */\n className?: ClassName;\n /** Color scheme of the checkboxes */\n color?: VariantProps['color'];\n /** Help text associated with the field */\n description?: ReactNode;\n /** Disables the field */\n disabled?: boolean;\n /** Arranges options horizontally */\n inline?: boolean;\n /** Field label */\n label?: ReactNode;\n /** Whether the checkboxes label should be crossed out */\n lineThrough?: boolean;\n /** Field name */\n name: string;\n /** Available options */\n options: CheckboxOption[];\n /** HTML data-testid attribute for e2e tests */\n testId?: string;\n /** allows disentangled display and form values for a field */\n transform?: InputValueTransform<string[]>;\n}\n\n/** Form selection field for multiple checkbox options */\nconst Checkboxes = ({\n children = undefined,\n className = undefined,\n color = 'primary',\n inline = false,\n lineThrough = false,\n name,\n options,\n ...uniformFieldProps\n}: CheckboxesProps) => {\n const { field } = useUniformField({\n ...uniformFieldProps,\n isArrayValue: true,\n name,\n });\n\n return (\n <CheckboxesControl\n className={className}\n color={color}\n field={field}\n inline={inline}\n lineThrough={lineThrough}\n options={options}\n >\n {children}\n </CheckboxesControl>\n );\n};\n\nexport default Checkboxes;\n","import Checkboxes from './Checkboxes';\n\nexport type { CheckboxesProps, CheckboxOption } from './Checkboxes';\n\nexport { checkboxesVariants } from './Checkboxes';\n\nexport default Checkboxes;\n"],"mappings":";;;;;;;;;AAIA,MAAM,wBAAwB,GAAG;CAC/B,OAAO,EAAE,SAAS,GAAG;CACrB,UAAU,EACR,OAAO;EACL,QAAQ,EACN,SACE,sEACJ;EACA,SAAS,EACP,SACE,yEACJ;EACA,MAAM,EACJ,SACE,gEACJ;EACA,SAAS,EACP,SACE,yEACJ;EACA,WAAW,EACT,SACE,+EACJ;EACA,SAAS,EACP,SACE,yEACJ;EACA,SAAS,EACP,SACE,yEACJ;CACF,EACF;AACF,CAAC;AACD,MAAa,qBAAqB,GAAG;CACnC,QAAQ;CACR,OAAO;;EAEL,MAAM,CAAC,wCAAwC,UAAU;;EAEzD,aAAa;;EAEb,cAAc,CAAC,aAAa,wBAAwB;;EAEpD,eAAe;;EAEf,OAAO,CACL,kHACA,UACF;;EAEA,YAAY;GACV;GAEA;GAEA;EACF;;EAEA,YAAY;GACV;GAEA;GAEA;GAEA;EACF;;EAEA,aAAa;;EAEb,oBAAoB;;EAEpB,eAAe;GACb;GAEA;GAEA;GAEA;GAEA;GAEA;GAEA;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,CAAA;CAET;CAEA,OACE,qBAAC,aAAD;EACE,QAAQ;EACR,WAAW;GACT,oBAAoB;GACpB,cAAc,aAAa;GAC3B,kBAAkB;GAClB,aAAa;GACb,eAAe;GACf,IAAI,aAAa;GACjB,YAAY;GACZ,WAAW;GACX,YAAY;GACZ;GACA;GACA,UAAU;GACV,KAAK;GACL,QAAQ;GACR,oBAAoB;GACpB;EACF;EACA,WAAW;EACE;EACC;EACT;EACI;EACF;EACP,SAAS;EACC;EA3BZ,UAAA,CA6BG,WACC,oBAAC,QAAD;GAAM,WAAU;GAAU,IAAI,GAAG,IAAI,QAAQ;GAAY,UAAA;EAEnD,CAAA,IACJ,MACJ,oBAAC,OAAD;GACE,WAAW,WAAW;GACtB,oBAAkB,SAAS,eAAe;GAC1C,aAAU;GAET,UAAA,WACG,SAAS,mBAAmB,CAAC,CAAC,IAC9B,iBAAiB,KAAK,EAAE,eAAe;IACrC,OAAO;GACT,CAAC;EACF,CAAA,CACM;;AAEjB;;;;AC7GA,MAAM,cAAc,EAClB,WAAW,KAAA,GACX,YAAY,KAAA,GACZ,QAAQ,WACR,SAAS,OACT,cAAc,OACd,MACA,SACA,GAAG,wBACkB;CACrB,MAAM,EAAE,UAAU,gBAAgB;EAChC,GAAG;EACH,cAAc;EACd;CACF,CAAC;CAED,OACE,oBAAC,mBAAD;EACa;EACJ;EACA;EACC;EACK;EACJ;EAER;CACgB,CAAA;AAEvB;;;AC5FA,IAAA,qBAAe"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../src/Checkboxes/checkboxesVariants.ts","../../src/Checkboxes/subcomponents/CheckboxIndicator.tsx","../../src/Checkboxes/subcomponents/CheckboxLabel.tsx","../../src/Checkboxes/subcomponents/CheckboxControl.tsx","../../src/Checkboxes/subcomponents/CheckboxesControl.tsx","../../src/Checkboxes/Checkboxes.tsx","../../src/Checkboxes/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\n\nimport { tv } from '@fuf-stack/pixel-utils';\n\nimport { fieldHelperVariants } from '../partials/FieldHelper/fieldHelperVariants';\nimport { fieldLabelVariants } from '../partials/FieldLabel/fieldLabelVariants';\n\nconst checkboxColorVariants = tv({\n slots: { wrapper: '' },\n variants: {\n color: {\n danger: {\n wrapper:\n 'text-danger-foreground after:bg-danger after:text-danger-foreground',\n },\n default: {\n wrapper:\n 'text-default-foreground after:bg-default after:text-default-foreground',\n },\n info: {\n wrapper:\n 'text-info-foreground after:bg-info after:text-info-foreground',\n },\n primary: {\n wrapper:\n 'text-primary-foreground after:bg-primary after:text-primary-foreground',\n },\n secondary: {\n wrapper:\n 'text-secondary-foreground after:bg-secondary after:text-secondary-foreground',\n },\n success: {\n wrapper:\n 'text-success-foreground after:bg-success after:text-success-foreground',\n },\n warning: {\n wrapper:\n 'text-warning-foreground after:bg-warning after:text-warning-foreground',\n },\n },\n },\n});\nexport const checkboxesVariants = tv({\n extend: checkboxColorVariants,\n slots: {\n /** Container for the field control and supporting text */\n base: ['group flex w-full flex-col', 'relative'],\n /** Supporting text for the field */\n description: fieldHelperVariants.slots.description,\n /** Container for validation messages */\n errorMessage: fieldHelperVariants.slots.errorMessage,\n /** Container for help text and validation messages */\n helperWrapper: fieldHelperVariants.slots.helperWrapper,\n /** Visible field label */\n label: [fieldLabelVariants.base, 'relative inline-flex'],\n /** Clickable checkbox option */\n optionBase: [\n '',\n // option layout and pointer behavior\n 'group relative -m-2 inline-flex max-w-fit cursor-pointer select-none items-center justify-start p-2 tap-highlight-transparent',\n // disabled cursor and opacity, the native input covers the option\n 'data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-disabled data-[disabled=true]:**:cursor-not-allowed',\n ],\n /** Checkmark inside the selection indicator */\n optionIcon: [\n '',\n // checkmark dimensions and fade transition\n 'pointer-events-none z-10 h-3 w-4 opacity-0 transition-opacity',\n // selected visibility\n 'group-data-[selected=true]:opacity-100',\n // reduced motion\n 'motion-reduce:transition-none',\n ],\n /** Primary option text */\n optionLabel: '',\n /** Additional text below the option label */\n optionLabelSubline: 'text-foreground-400 !text-small',\n /** Outline and fill around the checkmark */\n optionWrapper: [\n '',\n // checkbox dimensions and layout\n 'relative me-2 inline-flex h-5 w-5 shrink-0 items-center justify-center overflow-hidden rounded-[calc(var(--pixel-radius-medium)*0.6)] transition-transform',\n // unselected border layer\n \"before:absolute before:inset-0 before:box-border before:rounded-[inherit] before:border-2 before:border-solid before:border-default before:transition-colors before:content-['']\",\n // animated selection layer\n \"after:absolute after:inset-0 after:origin-center after:scale-50 after:rounded-[inherit] after:opacity-0 after:duration-200 after:ease-linear after:content-[''] after:transition-transform-opacity\",\n // pressed scale\n 'group-data-[pressed=true]:scale-95',\n // keyboard focus ring\n 'group-data-[focus-visible=true]:ring-2 group-data-[focus-visible=true]:ring-focus group-data-[focus-visible=true]:ring-offset-2 group-data-[focus-visible=true]:ring-offset-background',\n // hover and selected states\n 'group-data-[hover=true]:before:bg-default-100 group-data-[selected=true]:after:scale-100 group-data-[selected=true]:after:opacity-100',\n // reduced motion\n 'motion-reduce:transition-none',\n ],\n /** Container arranging the selectable content */\n wrapper: [\n '',\n 'flex flex-col flex-wrap gap-2 data-[orientation=horizontal]:flex-row',\n ],\n },\n variants: {\n lineThrough: {\n true: {\n optionLabel: [\n // label layout\n 'inline-flex items-center justify-center',\n // strikethrough line\n \"before:absolute before:h-0.5 before:w-0 before:bg-foreground before:content-['']\",\n // selected strikethrough state\n 'group-data-[selected=true]:opacity-60 group-data-[selected=true]:before:w-full',\n 'relative before:transition-all before:duration-200',\n ],\n optionLabelSubline: 'group-data-[selected=true]:opacity-60',\n },\n },\n invalid: {\n true: {\n optionLabel: 'text-danger',\n optionWrapper: 'before:border-danger',\n },\n },\n readOnly: {\n true: {\n // inner controls set their own cursors, override every descendant\n base: 'cursor-not-allowed opacity-disabled **:cursor-not-allowed',\n optionWrapper: 'group-data-[hover=true]:before:bg-transparent',\n },\n },\n },\n});\n\nexport type VariantProps = TVProps<typeof checkboxesVariants>;\n\nexport type ClassName = TVClassName<typeof checkboxesVariants>;\nexport const checkboxOptionVariants = tv({\n extend: checkboxColorVariants,\n slots: {\n /** Option field context without an additional layout box */\n field: 'contents',\n /** Container for the option label and optional subline */\n label:\n 'relative select-none text-foreground transition-colors-opacity text-medium before:transition-width motion-reduce:transition-none',\n },\n variants: { invalid: { true: { label: 'text-danger' } } },\n});\n\n/** Resolved checkbox group and option slot classes */\nexport type CheckboxClassNames = Record<\n keyof ReturnType<typeof checkboxesVariants>,\n string\n>;\n","interface CheckboxIndicatorProps {\n /** CSS class name */\n className: {\n /** Animated checkmark */\n icon: string;\n /** Selection indicator surface */\n wrapper: string;\n };\n /** Whether the option is selected */\n selected: boolean;\n}\n\n/** Checkbox selection indicator with an animated checkmark */\nconst CheckboxIndicator = ({ className, selected }: CheckboxIndicatorProps) => {\n return (\n <span aria-hidden className={className.wrapper} data-slot=\"wrapper\">\n <svg\n aria-hidden\n className={className.icon}\n data-slot=\"icon\"\n fill=\"none\"\n role=\"presentation\"\n stroke=\"currentColor\"\n strokeDasharray={22}\n strokeDashoffset={selected ? 44 : 66}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n viewBox=\"0 0 17 18\"\n >\n <polyline\n className=\"transition-[stroke-dashoffset] delay-200 duration-250 ease-linear motion-reduce:transition-none\"\n points=\"1 9 7 14 15 4\"\n />\n </svg>\n </span>\n );\n};\n\nexport default CheckboxIndicator;\n","import type { CheckboxOption } from '../Checkboxes';\n\ninterface CheckboxLabelProps extends Pick<\n CheckboxOption,\n 'label' | 'labelSubline'\n> {\n /** CSS class name */\n className: {\n /** Container for the option text */\n base: string;\n /** Primary option text */\n label: string;\n /** Supporting option text */\n subline: string;\n };\n /** Option ID used by the control's accessible-name associations */\n id: string;\n}\n\n/** Checkbox option text with an optional supporting line and accessible-name IDs */\nconst CheckboxLabel = ({\n className,\n id,\n label,\n labelSubline,\n}: CheckboxLabelProps) => {\n return (\n <span className={className.base} data-slot=\"label\" id={`${id}-label`}>\n {labelSubline ? (\n <div className=\"flex grow flex-col items-start\">\n <span className={className.label} id={`${id}-label-text`}>\n {label}\n </span>\n <span className={className.subline} id={`${id}-subline`}>\n {labelSubline}\n </span>\n </div>\n ) : (\n label\n )}\n </span>\n );\n};\n\nexport default CheckboxLabel;\n","import type { CheckboxButtonProps } from 'react-aria-components';\nimport type { CheckboxesProps, CheckboxOption } from '../Checkboxes';\nimport type { CheckboxClassNames } from '../checkboxesVariants';\n\nimport { useId } from 'react';\nimport { CheckboxButton, CheckboxField } from 'react-aria-components';\n\nimport { useStyling } from '@fuf-stack/pixels/StylingProvider';\n\nimport { checkboxOptionVariants } from '../checkboxesVariants';\nimport CheckboxIndicator from './CheckboxIndicator';\nimport CheckboxLabel from './CheckboxLabel';\n\ninterface CheckboxControlProps {\n /** CSS class name */\n className: CheckboxClassNames;\n /** Color scheme for the selection indicator */\n color: NonNullable<CheckboxesProps['color']>;\n /** Supporting description and error IDs */\n describedBy: string | undefined;\n /** Disables the field */\n disabled: boolean;\n /** Shows validation failure */\n invalid: boolean;\n /** Option label, subline and value */\n option: CheckboxOption;\n /** HTML data-testid attribute for e2e tests */\n testId: string;\n}\n\n/**\n * Checkbox option with an animated indicator, label and optional subline\n *\n * @see https://react-aria.adobe.com/Checkbox\n */\nconst CheckboxControl = ({\n className: classNames,\n color,\n describedBy,\n disabled,\n invalid,\n option,\n testId,\n}: CheckboxControlProps) => {\n const id = useId();\n const styling = useStyling();\n\n const hasSubline = !!option.labelSubline;\n const hasLabel = !!option.label || hasSubline;\n const labelledBy = hasSubline\n ? `${id}-label-text ${id}-subline`\n : `${id}-label`;\n\n // classNames from slots\n const variants = styling.resolve(checkboxOptionVariants, { color, invalid });\n const optionClassNames = styling.variantsToClassNames(variants, {\n label: hasSubline ? undefined : classNames.optionLabel,\n wrapper: classNames.optionWrapper,\n });\n\n // preserve option interaction selectors on the clickable label\n const renderOption: NonNullable<CheckboxButtonProps['render']> = (\n props,\n state,\n ) => {\n return (\n <label\n {...props}\n data-focus={state.isFocused || undefined}\n data-hover={state.isHovered || undefined}\n data-invalid={invalid}\n htmlFor={id}\n >\n {props.children}\n </label>\n );\n };\n\n return (\n <CheckboxField\n aria-describedby={describedBy}\n aria-invalid={invalid || undefined}\n aria-label={\n typeof option.label === 'string' ? option.label : option.value\n }\n aria-labelledby={hasLabel ? labelledBy : undefined}\n className={optionClassNames.field}\n id={id}\n isDisabled={disabled}\n isRequired={false}\n validationBehavior=\"aria\"\n value={option.value}\n >\n <CheckboxButton\n className={classNames.optionBase}\n data-testid={testId}\n render={renderOption}\n >\n {({ isSelected }) => {\n return (\n <>\n <CheckboxIndicator\n className={{\n icon: classNames.optionIcon,\n wrapper: optionClassNames.wrapper,\n }}\n selected={isSelected}\n />\n {hasLabel ? (\n <CheckboxLabel\n className={{\n base: optionClassNames.label,\n label: classNames.optionLabel,\n subline: classNames.optionLabelSubline,\n }}\n id={id}\n label={option.label}\n labelSubline={option.labelSubline}\n />\n ) : null}\n </>\n );\n }}\n </CheckboxButton>\n </CheckboxField>\n );\n};\n\nexport default CheckboxControl;\n","import type { CheckboxGroupProps } from 'react-aria-components';\nimport type { UniformField } from '../../hooks/useUniformField/types';\nimport type { CheckboxesProps } from '../Checkboxes';\n\nimport { CheckboxGroup, Label } from 'react-aria-components';\n\nimport { slugify } from '@fuf-stack/pixel-utils';\nimport { useStyling } from '@fuf-stack/pixels/StylingProvider';\n\nimport { getFieldControlProps } from '../../helpers/fieldProps/fieldProps';\nimport FieldLayout from '../../partials/FieldLayout/FieldLayout';\nimport { checkboxesVariants } from '../checkboxesVariants';\nimport CheckboxControl from './CheckboxControl';\n\ninterface CheckboxesControlProps extends Pick<\n CheckboxesProps,\n 'children' | 'className' | 'color' | 'inline' | 'lineThrough' | 'options'\n> {\n /** Bound field values, interactions and metadata */\n field: UniformField<unknown, string[]>;\n}\n\n/**\n * Checkbox group presentation with option composition and focus routing\n *\n * @see https://react-aria.adobe.com/CheckboxGroup\n */\nconst CheckboxesControl = ({\n field,\n children,\n className,\n color = 'primary',\n inline = false,\n lineThrough,\n options,\n}: CheckboxesControlProps) => {\n const {\n description,\n disabled,\n errorMessage,\n ids,\n ref: inputRef,\n invalid,\n label,\n name,\n onBlur,\n onChange: onValueChange,\n readOnly,\n required,\n testId,\n } = field;\n\n // associate the editable control with its label and messages\n const controlProps = getFieldControlProps(field);\n\n const styling = useStyling();\n\n // treat non-array form values as an empty selection\n const value = Array.isArray(field.value) ? field.value : [];\n\n // classNames from slots\n const variants = styling.resolve(checkboxesVariants, {\n lineThrough,\n invalid,\n readOnly,\n });\n const classNames = styling.variantsToClassNames(variants, className, 'base');\n\n const associations = controlProps;\n const describedBy =\n [\n associations['aria-describedby'],\n required ? `${ids.control}-required` : undefined,\n ]\n .filter(Boolean)\n .join(' ') || undefined;\n\n const renderedOptions = options?.map((option) => {\n const optionDisabled = !!disabled || !!option.disabled;\n\n return {\n option,\n state: {\n checked: value.includes(option.value),\n disabled: optionDisabled,\n invalid: !!invalid,\n },\n checkbox: (\n <CheckboxControl\n key={`index_${option.value}`}\n className={classNames}\n color={color === 'info' ? 'primary' : color}\n describedBy={describedBy}\n disabled={optionDisabled}\n invalid={invalid}\n option={option}\n testId={slugify(`${testId}_option_${option.testId ?? option.value}`, {\n replaceDots: true,\n })}\n />\n ),\n };\n });\n\n // route form focus to the first enabled checkbox\n const handleControlRef = (node: HTMLDivElement | null) => {\n inputRef(\n node\n ? {\n focus: () => {\n node\n .querySelector<HTMLInputElement>('input:not(:disabled)')\n ?.focus();\n },\n }\n : null,\n );\n };\n\n // keep the group styling state on its root\n const renderGroup: NonNullable<CheckboxGroupProps['render']> = (props) => {\n return (\n <div\n {...props}\n aria-invalid={invalid || undefined}\n data-invalid={invalid}\n data-required={required}\n >\n {props.children}\n </div>\n );\n };\n\n return (\n <FieldLayout\n baseAs={CheckboxGroup}\n baseProps={{\n 'aria-describedby': describedBy,\n 'aria-label': associations['aria-label'],\n 'data-component': 'checkboxes',\n 'data-slot': 'base',\n 'data-testid': testId,\n id: associations.id,\n isDisabled: disabled,\n isInvalid: invalid,\n isReadOnly: readOnly,\n isRequired: required,\n name,\n onBlur,\n onChange: onValueChange,\n ref: handleControlRef,\n render: renderGroup,\n validationBehavior: 'aria',\n value,\n }}\n className={classNames}\n description={description}\n errorMessage={errorMessage}\n ids={ids}\n invalid={invalid}\n label={label}\n labelAs={Label}\n required={required}\n >\n {required ? (\n <span className=\"sr-only\" id={`${ids.control}-required`}>\n Required selection.\n </span>\n ) : null}\n <div\n className={classNames.wrapper}\n data-orientation={inline ? 'horizontal' : 'vertical'}\n data-slot=\"wrapper\"\n >\n {children\n ? children(renderedOptions ?? [])\n : renderedOptions?.map(({ checkbox }) => {\n return checkbox;\n })}\n </div>\n </FieldLayout>\n );\n};\n\nexport default CheckboxesControl;\n","import type { ReactNode } from 'react';\nimport type { InputValueTransform } from '../hooks/useInputValueTransform';\nimport type { ClassName, VariantProps } from './checkboxesVariants';\n\nimport useUniformField from '../hooks/useUniformField/useUniformField';\nimport CheckboxesControl from './subcomponents/CheckboxesControl';\n\nexport { checkboxesVariants } from './checkboxesVariants';\n\nexport interface CheckboxOption {\n /** Disables the field */\n disabled?: boolean;\n /** Field label */\n label?: ReactNode;\n /** subline displayed below the label */\n labelSubline?: ReactNode;\n /** Arbitrary option metadata for custom render logic. */\n meta?: Record<string, unknown>;\n /** HTML data-testid attribute for e2e tests */\n testId?: string;\n /** option value */\n value: string;\n}\n\ninterface ChildRenderOption {\n /** Prebuilt checkbox element for custom option layouts */\n checkbox: ReactNode;\n /** Option data as provided in `options` */\n option: CheckboxOption;\n /** Render-state flags for this option */\n state: {\n /** Whether this option is currently selected */\n checked: boolean;\n /** Disables the field */\n disabled: boolean;\n /** Whether the checkbox group is invalid */\n invalid: boolean;\n };\n}\n\nexport interface CheckboxesProps {\n /** Custom accessible name */\n ariaLabel?: string;\n /** Optional child render function for custom full-list layout rendering. */\n children?: (options: ChildRenderOption[]) => ReactNode;\n /** CSS class name */\n className?: ClassName;\n /** Color scheme of the checkboxes */\n color?: VariantProps['color'];\n /** Help text associated with the field */\n description?: ReactNode;\n /** Disables the field */\n disabled?: boolean;\n /** Arranges options horizontally */\n inline?: boolean;\n /** Field label */\n label?: ReactNode;\n /** Whether the checkboxes label should be crossed out */\n lineThrough?: boolean;\n /** Field name */\n name: string;\n /** Available options */\n options: CheckboxOption[];\n /** Prevents changes while keeping the selection in validation and submission */\n readOnly?: boolean;\n /** HTML data-testid attribute for e2e tests */\n testId?: string;\n /** allows disentangled display and form values for a field */\n transform?: InputValueTransform<string[]>;\n}\n\n/** Form selection field for multiple checkbox options */\nconst Checkboxes = ({\n children = undefined,\n className = undefined,\n color = 'primary',\n inline = false,\n lineThrough = false,\n name,\n options,\n ...uniformFieldProps\n}: CheckboxesProps) => {\n const { field } = useUniformField({\n ...uniformFieldProps,\n isArrayValue: true,\n name,\n });\n\n return (\n <CheckboxesControl\n className={className}\n color={color}\n field={field}\n inline={inline}\n lineThrough={lineThrough}\n options={options}\n >\n {children}\n </CheckboxesControl>\n );\n};\n\nexport default Checkboxes;\n","import Checkboxes from './Checkboxes';\n\nexport type { CheckboxesProps, CheckboxOption } from './Checkboxes';\n\nexport { checkboxesVariants } from './Checkboxes';\n\nexport default Checkboxes;\n"],"mappings":";;;;;;;;;;;AAOA,MAAM,wBAAwB,GAAG;CAC/B,OAAO,EAAE,SAAS,GAAG;CACrB,UAAU,EACR,OAAO;EACL,QAAQ,EACN,SACE,sEACJ;EACA,SAAS,EACP,SACE,yEACJ;EACA,MAAM,EACJ,SACE,gEACJ;EACA,SAAS,EACP,SACE,yEACJ;EACA,WAAW,EACT,SACE,+EACJ;EACA,SAAS,EACP,SACE,yEACJ;EACA,SAAS,EACP,SACE,yEACJ;CACF,EACF;AACF,CAAC;AACD,MAAa,qBAAqB,GAAG;CACnC,QAAQ;CACR,OAAO;;EAEL,MAAM,CAAC,8BAA8B,UAAU;;EAE/C,aAAa,oBAAoB,MAAM;;EAEvC,cAAc,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