@canonical/react-ds-global-form 0.29.1 → 0.30.0

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 (214) hide show
  1. package/dist/esm/lib/common/Wrapper/ToggleWrapper.css +35 -0
  2. package/dist/esm/lib/common/Wrapper/ToggleWrapper.js +52 -0
  3. package/dist/esm/lib/common/Wrapper/ToggleWrapper.js.map +1 -0
  4. package/dist/esm/lib/common/Wrapper/Wrapper.js +2 -2
  5. package/dist/esm/lib/common/Wrapper/Wrapper.js.map +1 -1
  6. package/dist/esm/lib/common/Wrapper/hooks/useFieldWrapper.js +1 -1
  7. package/dist/esm/lib/common/Wrapper/hooks/useFieldWrapper.js.map +1 -1
  8. package/dist/esm/lib/common/Wrapper/index.js +2 -0
  9. package/dist/esm/lib/common/Wrapper/index.js.map +1 -1
  10. package/dist/esm/lib/common/Wrapper/withToggleWrapper.js +14 -0
  11. package/dist/esm/lib/common/Wrapper/withToggleWrapper.js.map +1 -0
  12. package/dist/esm/lib/component/CheckboxField/CheckboxField.js +8 -6
  13. package/dist/esm/lib/component/CheckboxField/CheckboxField.js.map +1 -1
  14. package/dist/esm/lib/component/ChoicesField/ChoicesField.js +2 -2
  15. package/dist/esm/lib/component/ChoicesField/ChoicesField.js.map +1 -1
  16. package/dist/esm/lib/component/ChoicesField/common/Option/Option.js +1 -1
  17. package/dist/esm/lib/component/ChoicesField/common/Option/Option.js.map +1 -1
  18. package/dist/esm/lib/component/ColorField/ColorField.js +3 -3
  19. package/dist/esm/lib/component/ColorField/ColorField.js.map +1 -1
  20. package/dist/esm/lib/component/ComboboxField/ComboboxField.js +3 -3
  21. package/dist/esm/lib/component/ComboboxField/ComboboxField.js.map +1 -1
  22. package/dist/esm/lib/component/DateField/DateField.js +3 -3
  23. package/dist/esm/lib/component/DateField/DateField.js.map +1 -1
  24. package/dist/esm/lib/component/DateTimeField/DateTimeField.js +3 -3
  25. package/dist/esm/lib/component/DateTimeField/DateTimeField.js.map +1 -1
  26. package/dist/esm/lib/component/FileUploadField/FileUploadField.js +3 -3
  27. package/dist/esm/lib/component/FileUploadField/FileUploadField.js.map +1 -1
  28. package/dist/esm/lib/component/HiddenField/HiddenField.js +3 -3
  29. package/dist/esm/lib/component/HiddenField/HiddenField.js.map +1 -1
  30. package/dist/esm/lib/component/NumberField/NumberField.js +3 -3
  31. package/dist/esm/lib/component/NumberField/NumberField.js.map +1 -1
  32. package/dist/esm/lib/component/PasswordField/PasswordField.js +3 -3
  33. package/dist/esm/lib/component/PasswordField/PasswordField.js.map +1 -1
  34. package/dist/esm/lib/component/PhoneField/PhoneField.js +3 -3
  35. package/dist/esm/lib/component/PhoneField/PhoneField.js.map +1 -1
  36. package/dist/esm/lib/component/RangeField/RangeField.js +2 -2
  37. package/dist/esm/lib/component/RangeField/RangeField.js.map +1 -1
  38. package/dist/esm/lib/component/RangeField/common/RangeControl/RangeControl.js +1 -1
  39. package/dist/esm/lib/component/RangeField/common/RangeControl/RangeControl.js.map +1 -1
  40. package/dist/esm/lib/component/RatingField/RatingField.js +12 -0
  41. package/dist/esm/lib/component/RatingField/RatingField.js.map +1 -0
  42. package/dist/esm/lib/component/RatingField/index.js +2 -0
  43. package/dist/esm/lib/component/RatingField/index.js.map +1 -0
  44. package/dist/esm/lib/component/RatingField/types.js +2 -0
  45. package/dist/esm/lib/component/RatingField/types.js.map +1 -0
  46. package/dist/esm/lib/component/RichChoicesField/RichChoicesField.js +2 -2
  47. package/dist/esm/lib/component/RichChoicesField/RichChoicesField.js.map +1 -1
  48. package/dist/esm/lib/component/RichChoicesField/common/Option/Option.js +1 -1
  49. package/dist/esm/lib/component/RichChoicesField/common/Option/Option.js.map +1 -1
  50. package/dist/esm/lib/component/RichChoicesField/styles.css +6 -0
  51. package/dist/esm/lib/component/SelectField/SelectField.js +3 -3
  52. package/dist/esm/lib/component/SelectField/SelectField.js.map +1 -1
  53. package/dist/esm/lib/component/SwitchField/SwitchField.js +13 -0
  54. package/dist/esm/lib/component/SwitchField/SwitchField.js.map +1 -0
  55. package/dist/esm/lib/component/SwitchField/index.js +2 -0
  56. package/dist/esm/lib/component/SwitchField/index.js.map +1 -0
  57. package/dist/esm/lib/component/SwitchField/types.js +2 -0
  58. package/dist/esm/lib/component/SwitchField/types.js.map +1 -0
  59. package/dist/esm/lib/component/TextField/TextField.js +3 -3
  60. package/dist/esm/lib/component/TextField/TextField.js.map +1 -1
  61. package/dist/esm/lib/component/TextareaField/TextareaField.js +3 -3
  62. package/dist/esm/lib/component/TextareaField/TextareaField.js.map +1 -1
  63. package/dist/esm/lib/component/TimeField/TimeField.js +3 -3
  64. package/dist/esm/lib/component/TimeField/TimeField.js.map +1 -1
  65. package/dist/esm/lib/component/index.js +2 -0
  66. package/dist/esm/lib/component/index.js.map +1 -1
  67. package/dist/esm/lib/index.js +2 -1
  68. package/dist/esm/lib/index.js.map +1 -1
  69. package/dist/esm/lib/pattern/Field/Field.js +23 -17
  70. package/dist/esm/lib/pattern/Field/Field.js.map +1 -1
  71. package/dist/esm/lib/subcomponent/ComboboxInput/MultipleCombobox.js +14 -8
  72. package/dist/esm/lib/subcomponent/ComboboxInput/MultipleCombobox.js.map +1 -1
  73. package/dist/esm/lib/subcomponent/FileUploadInput/styles.css +3 -0
  74. package/dist/esm/lib/subcomponent/PhoneInput/PhoneInput.js +1 -1
  75. package/dist/esm/lib/subcomponent/PhoneInput/PhoneInput.js.map +1 -1
  76. package/dist/esm/lib/subcomponent/RatingInput/RatingInput.js +48 -0
  77. package/dist/esm/lib/subcomponent/RatingInput/RatingInput.js.map +1 -0
  78. package/dist/esm/lib/subcomponent/RatingInput/index.js +2 -0
  79. package/dist/esm/lib/subcomponent/RatingInput/index.js.map +1 -0
  80. package/dist/esm/lib/subcomponent/RatingInput/styles.css +159 -0
  81. package/dist/esm/lib/subcomponent/RatingInput/types.js +2 -0
  82. package/dist/esm/lib/subcomponent/RatingInput/types.js.map +1 -0
  83. package/dist/esm/lib/subcomponent/SwitchInput/SwitchInput.js +26 -0
  84. package/dist/esm/lib/subcomponent/SwitchInput/SwitchInput.js.map +1 -0
  85. package/dist/esm/lib/subcomponent/SwitchInput/index.js +2 -0
  86. package/dist/esm/lib/subcomponent/SwitchInput/index.js.map +1 -0
  87. package/dist/esm/lib/subcomponent/SwitchInput/styles.css +88 -0
  88. package/dist/esm/lib/subcomponent/SwitchInput/types.js +2 -0
  89. package/dist/esm/lib/subcomponent/SwitchInput/types.js.map +1 -0
  90. package/dist/esm/lib/subcomponent/index.js +2 -0
  91. package/dist/esm/lib/subcomponent/index.js.map +1 -1
  92. package/dist/types/lib/common/Wrapper/ToggleWrapper.d.ts +24 -0
  93. package/dist/types/lib/common/Wrapper/ToggleWrapper.d.ts.map +1 -0
  94. package/dist/types/lib/common/Wrapper/index.d.ts +2 -0
  95. package/dist/types/lib/common/Wrapper/index.d.ts.map +1 -1
  96. package/dist/types/lib/common/Wrapper/withToggleWrapper.d.ts +20 -0
  97. package/dist/types/lib/common/Wrapper/withToggleWrapper.d.ts.map +1 -0
  98. package/dist/types/lib/common/Wrapper/withWrapper.d.ts +1 -1
  99. package/dist/types/lib/common/Wrapper/withWrapper.d.ts.map +1 -1
  100. package/dist/types/lib/common/types.d.ts +24 -2
  101. package/dist/types/lib/common/types.d.ts.map +1 -1
  102. package/dist/types/lib/component/CheckboxField/CheckboxField.d.ts +8 -332
  103. package/dist/types/lib/component/CheckboxField/CheckboxField.d.ts.map +1 -1
  104. package/dist/types/lib/component/CheckboxField/types.d.ts +7 -4
  105. package/dist/types/lib/component/CheckboxField/types.d.ts.map +1 -1
  106. package/dist/types/lib/component/ChoicesField/ChoicesField.d.ts +1 -0
  107. package/dist/types/lib/component/ChoicesField/ChoicesField.d.ts.map +1 -1
  108. package/dist/types/lib/component/ChoicesField/common/Option/types.d.ts +1 -1
  109. package/dist/types/lib/component/ChoicesField/common/Option/types.d.ts.map +1 -1
  110. package/dist/types/lib/component/ChoicesField/types.d.ts +2 -2
  111. package/dist/types/lib/component/ChoicesField/types.d.ts.map +1 -1
  112. package/dist/types/lib/component/ColorField/ColorField.d.ts +2 -1
  113. package/dist/types/lib/component/ColorField/ColorField.d.ts.map +1 -1
  114. package/dist/types/lib/component/ColorField/types.d.ts +2 -2
  115. package/dist/types/lib/component/ColorField/types.d.ts.map +1 -1
  116. package/dist/types/lib/component/ComboboxField/ComboboxField.d.ts +1 -0
  117. package/dist/types/lib/component/ComboboxField/ComboboxField.d.ts.map +1 -1
  118. package/dist/types/lib/component/ComboboxField/types.d.ts +2 -2
  119. package/dist/types/lib/component/ComboboxField/types.d.ts.map +1 -1
  120. package/dist/types/lib/component/DateField/DateField.d.ts +1 -0
  121. package/dist/types/lib/component/DateField/DateField.d.ts.map +1 -1
  122. package/dist/types/lib/component/DateField/types.d.ts +2 -2
  123. package/dist/types/lib/component/DateField/types.d.ts.map +1 -1
  124. package/dist/types/lib/component/DateTimeField/DateTimeField.d.ts +1 -0
  125. package/dist/types/lib/component/DateTimeField/DateTimeField.d.ts.map +1 -1
  126. package/dist/types/lib/component/DateTimeField/types.d.ts +2 -2
  127. package/dist/types/lib/component/DateTimeField/types.d.ts.map +1 -1
  128. package/dist/types/lib/component/FileUploadField/FileUploadField.d.ts +1 -0
  129. package/dist/types/lib/component/FileUploadField/FileUploadField.d.ts.map +1 -1
  130. package/dist/types/lib/component/FileUploadField/types.d.ts +2 -2
  131. package/dist/types/lib/component/FileUploadField/types.d.ts.map +1 -1
  132. package/dist/types/lib/component/HiddenField/HiddenField.d.ts +1 -0
  133. package/dist/types/lib/component/HiddenField/HiddenField.d.ts.map +1 -1
  134. package/dist/types/lib/component/HiddenField/types.d.ts +2 -2
  135. package/dist/types/lib/component/HiddenField/types.d.ts.map +1 -1
  136. package/dist/types/lib/component/NumberField/NumberField.d.ts +1 -0
  137. package/dist/types/lib/component/NumberField/NumberField.d.ts.map +1 -1
  138. package/dist/types/lib/component/NumberField/types.d.ts +2 -2
  139. package/dist/types/lib/component/NumberField/types.d.ts.map +1 -1
  140. package/dist/types/lib/component/PasswordField/PasswordField.d.ts +1 -0
  141. package/dist/types/lib/component/PasswordField/PasswordField.d.ts.map +1 -1
  142. package/dist/types/lib/component/PasswordField/types.d.ts +2 -2
  143. package/dist/types/lib/component/PasswordField/types.d.ts.map +1 -1
  144. package/dist/types/lib/component/PhoneField/PhoneField.d.ts +3 -2
  145. package/dist/types/lib/component/PhoneField/PhoneField.d.ts.map +1 -1
  146. package/dist/types/lib/component/PhoneField/index.d.ts +1 -1
  147. package/dist/types/lib/component/PhoneField/index.d.ts.map +1 -1
  148. package/dist/types/lib/component/PhoneField/types.d.ts +2 -2
  149. package/dist/types/lib/component/PhoneField/types.d.ts.map +1 -1
  150. package/dist/types/lib/component/RangeField/RangeField.d.ts +1 -0
  151. package/dist/types/lib/component/RangeField/RangeField.d.ts.map +1 -1
  152. package/dist/types/lib/component/RangeField/types.d.ts +1 -1
  153. package/dist/types/lib/component/RangeField/types.d.ts.map +1 -1
  154. package/dist/types/lib/component/RatingField/RatingField.d.ts +46 -0
  155. package/dist/types/lib/component/RatingField/RatingField.d.ts.map +1 -0
  156. package/dist/types/lib/component/RatingField/index.d.ts +3 -0
  157. package/dist/types/lib/component/RatingField/index.d.ts.map +1 -0
  158. package/dist/types/lib/component/RatingField/types.d.ts +9 -0
  159. package/dist/types/lib/component/RatingField/types.d.ts.map +1 -0
  160. package/dist/types/lib/component/RichChoicesField/RichChoicesField.d.ts +1 -0
  161. package/dist/types/lib/component/RichChoicesField/RichChoicesField.d.ts.map +1 -1
  162. package/dist/types/lib/component/RichChoicesField/types.d.ts +2 -2
  163. package/dist/types/lib/component/RichChoicesField/types.d.ts.map +1 -1
  164. package/dist/types/lib/component/SelectField/SelectField.d.ts +1 -0
  165. package/dist/types/lib/component/SelectField/SelectField.d.ts.map +1 -1
  166. package/dist/types/lib/component/SelectField/types.d.ts +2 -2
  167. package/dist/types/lib/component/SelectField/types.d.ts.map +1 -1
  168. package/dist/types/lib/component/SwitchField/SwitchField.d.ts +14 -0
  169. package/dist/types/lib/component/SwitchField/SwitchField.d.ts.map +1 -0
  170. package/dist/types/lib/component/SwitchField/index.d.ts +3 -0
  171. package/dist/types/lib/component/SwitchField/index.d.ts.map +1 -0
  172. package/dist/types/lib/component/SwitchField/types.d.ts +8 -0
  173. package/dist/types/lib/component/SwitchField/types.d.ts.map +1 -0
  174. package/dist/types/lib/component/TextField/TextField.d.ts +2 -1
  175. package/dist/types/lib/component/TextField/TextField.d.ts.map +1 -1
  176. package/dist/types/lib/component/TextField/types.d.ts +2 -2
  177. package/dist/types/lib/component/TextField/types.d.ts.map +1 -1
  178. package/dist/types/lib/component/TextareaField/TextareaField.d.ts +1 -0
  179. package/dist/types/lib/component/TextareaField/TextareaField.d.ts.map +1 -1
  180. package/dist/types/lib/component/TextareaField/types.d.ts +2 -2
  181. package/dist/types/lib/component/TextareaField/types.d.ts.map +1 -1
  182. package/dist/types/lib/component/TimeField/TimeField.d.ts +1 -0
  183. package/dist/types/lib/component/TimeField/TimeField.d.ts.map +1 -1
  184. package/dist/types/lib/component/TimeField/types.d.ts +2 -2
  185. package/dist/types/lib/component/TimeField/types.d.ts.map +1 -1
  186. package/dist/types/lib/component/index.d.ts +2 -0
  187. package/dist/types/lib/component/index.d.ts.map +1 -1
  188. package/dist/types/lib/index.d.ts +2 -0
  189. package/dist/types/lib/index.d.ts.map +1 -1
  190. package/dist/types/lib/pattern/Field/Field.d.ts.map +1 -1
  191. package/dist/types/lib/pattern/Field/types.d.ts +27 -21
  192. package/dist/types/lib/pattern/Field/types.d.ts.map +1 -1
  193. package/dist/types/lib/subcomponent/ComboboxInput/MultipleCombobox.d.ts.map +1 -1
  194. package/dist/types/lib/subcomponent/PhoneInput/types.d.ts +2 -2
  195. package/dist/types/lib/subcomponent/PhoneInput/types.d.ts.map +1 -1
  196. package/dist/types/lib/subcomponent/RatingInput/RatingInput.d.ts +23 -0
  197. package/dist/types/lib/subcomponent/RatingInput/RatingInput.d.ts.map +1 -0
  198. package/dist/types/lib/subcomponent/RatingInput/index.d.ts +3 -0
  199. package/dist/types/lib/subcomponent/RatingInput/index.d.ts.map +1 -0
  200. package/dist/types/lib/subcomponent/RatingInput/types.d.ts +52 -0
  201. package/dist/types/lib/subcomponent/RatingInput/types.d.ts.map +1 -0
  202. package/dist/types/lib/subcomponent/SwitchInput/SwitchInput.d.ts +16 -0
  203. package/dist/types/lib/subcomponent/SwitchInput/SwitchInput.d.ts.map +1 -0
  204. package/dist/types/lib/subcomponent/SwitchInput/index.d.ts +3 -0
  205. package/dist/types/lib/subcomponent/SwitchInput/index.d.ts.map +1 -0
  206. package/dist/types/lib/subcomponent/SwitchInput/types.d.ts +8 -0
  207. package/dist/types/lib/subcomponent/SwitchInput/types.d.ts.map +1 -0
  208. package/dist/types/lib/subcomponent/index.d.ts +4 -0
  209. package/dist/types/lib/subcomponent/index.d.ts.map +1 -1
  210. package/dist/types/lib/utils/middleware/addRESTOptions.d.ts +2 -2
  211. package/dist/types/lib/utils/middleware/addRESTOptions.d.ts.map +1 -1
  212. package/dist/types/lib/utils/middleware/addRESTValidation.d.ts +1 -1
  213. package/dist/types/lib/utils/middleware/addRESTValidation.d.ts.map +1 -1
  214. package/package.json +14 -20
@@ -0,0 +1,88 @@
1
+ /* A switch is a checkbox (role="switch") styled as a sliding pill toggle.
2
+ * The track is the <input> box; the knob is a `::before` pseudo-element that
3
+ * slides from left (off) to right (on). Colours come from the switch token
4
+ * channel; the geometry is in baseline multiples. */
5
+ .ds.form-switch {
6
+ /* Geometry, all derived from the track size and a 1px inset. */
7
+ --switch-track-width: calc(var(--space-baseline) * 4); /* 32px — 4bU */
8
+ --switch-track-height: calc(var(--space-baseline) * 2); /* 16px — 2bU */
9
+ --switch-knob-inset: 1px;
10
+ --switch-knob-size: calc(
11
+ var(--switch-track-height) -
12
+ (var(--switch-knob-inset) * 2)
13
+ );
14
+
15
+ appearance: none;
16
+ box-sizing: border-box;
17
+ position: relative;
18
+
19
+ /* Align to the field edge like the label, not the input's inner padding. */
20
+ margin-inline: var(--form-label-padding-inline, 0);
21
+
22
+ /* Track: a 2:1 pill. No border, so the width/height are the exact track box
23
+ and the absolutely-positioned knob is measured against the same box (a
24
+ border under `box-sizing: border-box` would shrink the padding box the knob
25
+ is anchored to, throwing off the inset and slide). */
26
+ width: var(--switch-track-width);
27
+ height: var(--switch-track-height);
28
+ border-radius: var(--dimension-radius-full);
29
+ background: var(--color-foreground-switch-unselected);
30
+ cursor: pointer;
31
+ transition: background-color 150ms ease;
32
+
33
+ /* Knob: a circle inset from the track edges, sliding on the inline axis. */
34
+ &::before {
35
+ content: "";
36
+ position: absolute;
37
+ inset-block: var(--switch-knob-inset);
38
+ inset-inline-start: var(--switch-knob-inset);
39
+ width: var(--switch-knob-size);
40
+ height: var(--switch-knob-size);
41
+ border-radius: var(--dimension-radius-full);
42
+ background: var(--color-foreground-switch-knob);
43
+ transition: translate 150ms ease;
44
+ }
45
+
46
+ &:checked {
47
+ background: var(--color-foreground-switch-selected);
48
+
49
+ &::before {
50
+ /* Slide to the far edge: the space left over after the knob and both
51
+ insets are removed from the track width. */
52
+ translate: calc(
53
+ var(--switch-track-width) -
54
+ var(--switch-knob-size) -
55
+ (var(--switch-knob-inset) * 2)
56
+ )
57
+ 0;
58
+ }
59
+ }
60
+
61
+ &:hover:not(:disabled):not(:checked) {
62
+ background: var(--color-foreground-switch-unselected);
63
+ filter: brightness(0.95);
64
+ }
65
+
66
+ &:checked:hover:not(:disabled) {
67
+ background: var(--color-foreground-switch-selected);
68
+ filter: brightness(0.9);
69
+ }
70
+
71
+ &:focus-visible {
72
+ outline: none;
73
+ box-shadow: 0 0 0 1px var(--color-focusRing);
74
+ }
75
+
76
+ &:disabled {
77
+ cursor: not-allowed;
78
+ background: var(--color-foreground-switch-unselected-disabled);
79
+
80
+ &::before {
81
+ background: var(--color-foreground-switch-knob-disabled);
82
+ }
83
+ }
84
+
85
+ &:checked:disabled {
86
+ background: var(--color-foreground-switch-selected-disabled);
87
+ }
88
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/SwitchInput/types.ts"],"names":[],"mappings":""}
@@ -16,7 +16,9 @@ export { PasswordInput } from "./PasswordInput/index.js";
16
16
  export { PhoneInput } from "./PhoneInput/index.js";
17
17
  export { RadioInput } from "./RadioInput/index.js";
18
18
  export { RangeInput } from "./RangeInput/index.js";
19
+ export { RatingInput } from "./RatingInput/index.js";
19
20
  export { SelectInput } from "./SelectInput/index.js";
21
+ export { SwitchInput } from "./SwitchInput/index.js";
20
22
  export { TextareaInput } from "./TextareaInput/index.js";
21
23
  export { TextInput } from "./TextInput/index.js";
22
24
  export { TimeInput } from "./TimeInput/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/subcomponent/index.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,6EAA6E;AAC7E,wEAAwE;AAIxE,sBAAsB;AACtB,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,6EAA6E;AAC7E,cAAc,kBAAkB,CAAC;AAEjC,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,gFAAgF;AAChF,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/subcomponent/index.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,6EAA6E;AAC7E,wEAAwE;AAIxE,sBAAsB;AACtB,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,6EAA6E;AAC7E,cAAc,kBAAkB,CAAC;AAEjC,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,gFAAgF;AAChF,cAAc,YAAY,CAAC"}
@@ -0,0 +1,24 @@
1
+ import type React from "react";
2
+ import type { BaseInputProps, WrapperProps } from "../types.js";
3
+ import "./styles.css";
4
+ import "./ToggleWrapper.css";
5
+ /**
6
+ * Field wrapper for toggle inputs (checkbox, switch), where the control sits
7
+ * inline beside its label instead of stacked below it.
8
+ *
9
+ * Two label slots:
10
+ * - `controlLabel` — the inline label beside the control; it carries the real
11
+ * `htmlFor` binding. Falls back to `label` when omitted, so a uniform field
12
+ * map (`{ label, name, inputType }`) still produces a properly labelled
13
+ * control.
14
+ * - `label` — an optional heading rendered above the control (and description).
15
+ * It only shows as a heading when `controlLabel` is also set; otherwise it is
16
+ * used as the inline control label.
17
+ *
18
+ * @returns {React.ReactElement} - Rendered toggle field
19
+ *
20
+ * `import { ToggleWrapper } from "@canonical/react-ds-global-form";`
21
+ */
22
+ declare const ToggleWrapper: <ComponentProps extends BaseInputProps>({ id, className, style, name, Component, description, label, controlLabel, isOptional, requiredIndicator, registerProps: userRegisterProps, nestedRegisterProps, unregisterOnUnmount, ...otherProps }: WrapperProps<ComponentProps>) => React.ReactElement;
23
+ export default ToggleWrapper;
24
+ //# sourceMappingURL=ToggleWrapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToggleWrapper.d.ts","sourceRoot":"","sources":["../../../../../src/lib/common/Wrapper/ToggleWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhE,OAAO,cAAc,CAAC;AACtB,OAAO,qBAAqB,CAAC;AAI7B;;;;;;;;;;;;;;;;GAgBG;AACH,QAAA,MAAM,aAAa,GAAI,cAAc,SAAS,cAAc,EAAE,uMAiB3D,YAAY,CAAC,cAAc,CAAC,KAAG,KAAK,CAAC,YAqEvC,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1,5 +1,7 @@
1
1
  export { default as InvisibleWrapper } from "./InvisibleWrapper.js";
2
+ export { default as ToggleWrapper } from "./ToggleWrapper.js";
2
3
  export * from "./types.js";
3
4
  export { default as Wrapper } from "./Wrapper.js";
5
+ export { default as withToggleWrapper } from "./withToggleWrapper.js";
4
6
  export { default as withWrapper } from "./withWrapper.js";
5
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/common/Wrapper/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACpE,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/common/Wrapper/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC9D,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { ComponentType, FC } from "react";
2
+ import type { BaseInputProps, ToggleLabelProps, WrapperProps } from "../types.js";
3
+ /**
4
+ * Public props of a toggle field: everything the wrapper accepts, but with the
5
+ * optional `label`/`controlLabel` replaced by the "at least one" union so a
6
+ * label-less toggle is a compile error.
7
+ */
8
+ type ToggleWrapperProps<ComponentProps extends BaseInputProps> = Omit<WrapperProps<ComponentProps>, "Component" | "label" | "controlLabel"> & ToggleLabelProps;
9
+ /**
10
+ * Field HOC for toggle inputs (checkbox, switch). Like `withWrapper`, but bakes
11
+ * in `ToggleWrapper` (control inline with its label) and types the result to
12
+ * require at least one of `label`/`controlLabel`. Applying the label constraint
13
+ * here — in the HOC's return type — keeps it out of the shared `withWrapper`
14
+ * generics, which would otherwise widen the union back to all-optional.
15
+ *
16
+ * `import { withToggleWrapper } from "@canonical/react-ds-global-form";`
17
+ */
18
+ declare const withToggleWrapper: <ComponentProps extends BaseInputProps>(Component: ComponentType<ComponentProps>) => FC<ToggleWrapperProps<ComponentProps>>;
19
+ export default withToggleWrapper;
20
+ //# sourceMappingURL=withToggleWrapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"withToggleWrapper.d.ts","sourceRoot":"","sources":["../../../../../src/lib/common/Wrapper/withToggleWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,YAAY,EACb,MAAM,aAAa,CAAC;AAIrB;;;;GAIG;AACH,KAAK,kBAAkB,CAAC,cAAc,SAAS,cAAc,IAAI,IAAI,CACnE,YAAY,CAAC,cAAc,CAAC,EAC5B,WAAW,GAAG,OAAO,GAAG,cAAc,CACvC,GACC,gBAAgB,CAAC;AAEnB;;;;;;;;GAQG;AACH,QAAA,MAAM,iBAAiB,GAAI,cAAc,SAAS,cAAc,EAC9D,WAAW,aAAa,CAAC,cAAc,CAAC,KACvC,EAAE,CAAC,kBAAkB,CAAC,cAAc,CAAC,CAGrC,CAAC;AAEJ,eAAe,iBAAiB,CAAC"}
@@ -3,6 +3,6 @@ import type { BaseInputProps, BaseWrapperProps, Condition, WrappedComponentProps
3
3
  type WrappedComponentPropsInternal<ComponentProps extends BaseInputProps> = Omit<WrappedComponentProps<ComponentProps>, "Component"> & {
4
4
  condition?: Condition;
5
5
  };
6
- declare const withWrapper: <ComponentProps extends BaseInputProps, ComponentWrapperProps extends BaseWrapperProps<ComponentProps> = WrapperProps<ComponentProps>>(Component: React.ComponentType<ComponentProps>, options?: Partial<ComponentWrapperProps>, Wrapper?: React.ComponentType<WrapperProps<ComponentProps>>) => (props: "id" | "label" | "style" | "className" | "description" | "isOptional" | "requiredIndicator" | "nestedRegisterProps" | "unregisterOnUnmount" | "mockLabel" | "middleware" | "WrapperComponent" | "condition" | Exclude<Exclude<keyof ComponentProps, "Component">, "Component"> extends infer T extends keyof WrappedComponentProps<WrappedComponentPropsInternal<ComponentProps>> ? { [P in T]: WrappedComponentProps<WrappedComponentPropsInternal<ComponentProps>>[P]; } : never) => React.ReactElement<WrappedComponentPropsInternal<ComponentProps>, string | React.JSXElementConstructor<any>> | null;
6
+ declare const withWrapper: <ComponentProps extends BaseInputProps, ComponentWrapperProps extends BaseWrapperProps<ComponentProps> = WrapperProps<ComponentProps>>(Component: React.ComponentType<ComponentProps>, options?: Partial<ComponentWrapperProps>, Wrapper?: React.ComponentType<WrapperProps<ComponentProps>>) => (props: "id" | "label" | "style" | "className" | "description" | "isOptional" | "requiredIndicator" | "nestedRegisterProps" | "unregisterOnUnmount" | "controlLabel" | "mockLabel" | "middleware" | "WrapperComponent" | "condition" | Exclude<Exclude<keyof ComponentProps, "Component">, "Component"> extends infer T extends keyof WrappedComponentProps<WrappedComponentPropsInternal<ComponentProps>> ? { [P in T]: WrappedComponentProps<WrappedComponentPropsInternal<ComponentProps>>[P]; } : never) => React.ReactElement<WrappedComponentPropsInternal<ComponentProps>, string | React.JSXElementConstructor<any>> | null;
7
7
  export default withWrapper;
8
8
  //# sourceMappingURL=withWrapper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"withWrapper.d.ts","sourceRoot":"","sources":["../../../../../src/lib/common/Wrapper/withWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,qBAAqB,EACrB,YAAY,EACb,MAAM,aAAa,CAAC;AAIrB,KAAK,6BAA6B,CAAC,cAAc,SAAS,cAAc,IACtE,IAAI,CAAC,qBAAqB,CAAC,cAAc,CAAC,EAAE,WAAW,CAAC,GAAG;IACzD,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEJ,QAAA,MAAM,WAAW,GACf,cAAc,SAAS,cAAc,EACrC,qBAAqB,SACnB,gBAAgB,CAAC,cAAc,CAAC,GAAG,YAAY,CAAC,cAAc,CAAC,EAEjE,WAAW,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,EAC9C,UAAU,OAAO,CAAC,qBAAqB,CAAC,EACxC,UAAS,KAAK,CAAC,aAAa,CAAC,YAAY,CAAC,cAAc,CAAC,CAAkB,ulBA0C5E,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"withWrapper.d.ts","sourceRoot":"","sources":["../../../../../src/lib/common/Wrapper/withWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,qBAAqB,EACrB,YAAY,EACb,MAAM,aAAa,CAAC;AAIrB,KAAK,6BAA6B,CAAC,cAAc,SAAS,cAAc,IACtE,IAAI,CAAC,qBAAqB,CAAC,cAAc,CAAC,EAAE,WAAW,CAAC,GAAG;IACzD,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEJ,QAAA,MAAM,WAAW,GACf,cAAc,SAAS,cAAc,EACrC,qBAAqB,SACnB,gBAAgB,CAAC,cAAc,CAAC,GAAG,YAAY,CAAC,cAAc,CAAC,EAEjE,WAAW,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,EAC9C,UAAU,OAAO,CAAC,qBAAqB,CAAC,EACxC,UAAS,KAAK,CAAC,aAAa,CAAC,YAAY,CAAC,cAAc,CAAC,CAAkB,wmBA0C5E,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import type React from "react";
2
2
  import type { RegisterOptions } from "react-hook-form";
3
- import type { RequiredIndicator } from "#lib/subcomponent/Field/Label/types.js";
4
- import type { BaseProps } from "#lib/subcomponent/types.js";
3
+ import type { RequiredIndicator } from "../subcomponent/Field/Label/types.js";
4
+ import type { BaseProps } from "../subcomponent/types.js";
5
5
  export type BaseInputProps = BaseProps & {
6
6
  name: string;
7
7
  registerProps?: RegisterOptions;
@@ -11,12 +11,34 @@ export type BaseInputProps = BaseProps & {
11
11
  "aria-invalid"?: boolean;
12
12
  };
13
13
  export type InputProps<AdditionalComponentProps extends Record<string, any> = {}> = BaseInputProps & AdditionalComponentProps;
14
+ /**
15
+ * At least one of `label`/`controlLabel` — the toggle-field label requirement,
16
+ * expressed as a union so a label-less toggle is a compile error rather than a
17
+ * runtime check.
18
+ */
19
+ export type ToggleLabelProps = {
20
+ label: string;
21
+ controlLabel?: string;
22
+ } | {
23
+ label?: string;
24
+ controlLabel: string;
25
+ };
26
+ /**
27
+ * Props for toggle fields (checkbox, switch), which render the control inline
28
+ * with its label via the ToggleWrapper. On top of the usual input props they
29
+ * add `controlLabel` (the inline label beside the control) and require at least
30
+ * one of `label`/`controlLabel`. `label` alone is the inline label (the
31
+ * field-map case); `label` + `controlLabel` renders `label` as a heading above
32
+ * and `controlLabel` inline.
33
+ */
34
+ export type ToggleFieldProps<AdditionalComponentProps extends Record<string, any> = {}> = InputProps<AdditionalComponentProps> & ToggleLabelProps;
14
35
  export type BaseWrapperProps<ComponentProps> = BaseProps & {
15
36
  Component: React.ComponentType<ComponentProps>;
16
37
  };
17
38
  export type WrapperProps<ComponentProps> = BaseWrapperProps<ComponentProps> & {
18
39
  description?: string;
19
40
  label?: string;
41
+ controlLabel?: string;
20
42
  isOptional?: boolean;
21
43
  requiredIndicator?: RequiredIndicator;
22
44
  nestedRegisterProps?: RegisterOptions;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/common/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAO5D,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,eAAe,CAAC;IAChC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,UAAU,CAGpB,wBAAwB,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE,IACvD,cAAc,GAAG,wBAAwB,CAAC;AAE9C,MAAM,MAAM,gBAAgB,CAAC,cAAc,IAAI,SAAS,GAAG;IAEzD,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,YAAY,CAAC,cAAc,IAAI,gBAAgB,CAAC,cAAc,CAAC,GAAG;IAE5E,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,UAAU,CAAC,EAAE,OAAO,CAAC;IAIrB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IAGtC,mBAAmB,CAAC,EAAE,eAAe,CAAC;IAGtC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAG9B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,GAAG,cAAc,CAAC;AAEnB,MAAM,MAAM,UAAU,CAAC,cAAc,IAAI,CACvC,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,KAC3C,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;AAEzC,MAAM,MAAM,SAAS,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,CAAC;AAEvE,MAAM,MAAM,yBAAyB,CACnC,cAAc,SAAS,cAAc,EACrC,qBAAqB,SACnB,gBAAgB,CAAC,cAAc,CAAC,GAAG,YAAY,CAAC,cAAc,CAAC,IAC/D;IACF;;QAEI;IACJ,UAAU,CAAC,EAAE,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC;IAE1C;;OAEG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC;IAE9D;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,qBAAqB,CAC/B,cAAc,SAAS,cAAc,EACrC,qBAAqB,SACnB,gBAAgB,CAAC,cAAc,CAAC,GAAG,YAAY,CAAC,cAAc,CAAC,IAC/D,qBAAqB,GACvB,yBAAyB,CAAC,cAAc,EAAE,qBAAqB,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/common/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAO1D,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,eAAe,CAAC;IAChC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,UAAU,CAGpB,wBAAwB,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE,IACvD,cAAc,GAAG,wBAAwB,CAAC;AAE9C;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GACxB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,GACxC;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7C;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,CAG1B,wBAAwB,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE,IACvD,UAAU,CAAC,wBAAwB,CAAC,GAAG,gBAAgB,CAAC;AAE5D,MAAM,MAAM,gBAAgB,CAAC,cAAc,IAAI,SAAS,GAAG;IAEzD,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,YAAY,CAAC,cAAc,IAAI,gBAAgB,CAAC,cAAc,CAAC,GAAG;IAE5E,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,KAAK,CAAC,EAAE,MAAM,CAAC;IAMf,YAAY,CAAC,EAAE,MAAM,CAAC;IAGtB,UAAU,CAAC,EAAE,OAAO,CAAC;IAIrB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IAGtC,mBAAmB,CAAC,EAAE,eAAe,CAAC;IAGtC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAG9B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,GAAG,cAAc,CAAC;AAEnB,MAAM,MAAM,UAAU,CAAC,cAAc,IAAI,CACvC,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,KAC3C,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;AAEzC,MAAM,MAAM,SAAS,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,CAAC;AAEvE,MAAM,MAAM,yBAAyB,CACnC,cAAc,SAAS,cAAc,EACrC,qBAAqB,SACnB,gBAAgB,CAAC,cAAc,CAAC,GAAG,YAAY,CAAC,cAAc,CAAC,IAC/D;IACF;;QAEI;IACJ,UAAU,CAAC,EAAE,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC;IAE1C;;OAEG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC;IAE9D;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,qBAAqB,CAC/B,cAAc,SAAS,cAAc,EACrC,qBAAqB,SACnB,gBAAgB,CAAC,cAAc,CAAC,GAAG,YAAY,CAAC,cAAc,CAAC,IAC/D,qBAAqB,GACvB,yBAAyB,CAAC,cAAc,EAAE,qBAAqB,CAAC,CAAC"}
@@ -1,338 +1,14 @@
1
- import type { CheckboxFieldProps } from "./types.js";
1
+ import type { InputProps } from "../../common/types.js";
2
+ import type { CheckboxInputProps } from "../../subcomponent/CheckboxInput/index.js";
3
+ type CheckboxInputFieldProps = InputProps<CheckboxInputProps>;
2
4
  /**
3
- * CheckboxInput bound to react-hook-form, wrapped with field chrome
4
- * (label, description, error) and middleware/conditional-display support.
5
+ * CheckboxInput bound to react-hook-form, wrapped with the toggle field chrome
6
+ * (inline label, optional heading, description, error) and
7
+ * middleware/conditional-display support. Requires at least one of
8
+ * `label`/`controlLabel`.
5
9
  *
6
10
  * `import { CheckboxField } from "@canonical/react-ds-global-form";`
7
11
  */
8
- declare const _default: (props: {
9
- name: string;
10
- max?: number | string | undefined | undefined;
11
- required?: boolean | undefined | undefined;
12
- type?: import("react").HTMLInputTypeAttribute | undefined;
13
- id?: string | undefined;
14
- height?: number | string | undefined | undefined;
15
- width?: number | string | undefined | undefined;
16
- min?: number | string | undefined | undefined;
17
- color?: string | undefined | undefined;
18
- content?: string | undefined | undefined;
19
- translate?: "yes" | "no" | undefined | undefined;
20
- value?: string | number | readonly string[] | undefined;
21
- hidden?: boolean | undefined | undefined;
22
- form?: string | undefined | undefined;
23
- label?: string | undefined;
24
- slot?: string | undefined | undefined;
25
- style?: React.CSSProperties | undefined;
26
- title?: string | undefined | undefined;
27
- dir?: string | undefined | undefined;
28
- pattern?: string | undefined | undefined;
29
- rel?: string | undefined | undefined;
30
- accessKey?: string | undefined | undefined;
31
- draggable?: (boolean | "false" | "true") | undefined;
32
- inert?: boolean | undefined | undefined;
33
- lang?: string | undefined | undefined;
34
- popover?: "" | "auto" | "manual" | "hint" | undefined | undefined;
35
- className?: string | undefined;
36
- part?: string | undefined | undefined;
37
- prefix?: string | undefined | undefined;
38
- role?: import("react").AriaRole | undefined;
39
- children?: import("react").ReactNode;
40
- contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
41
- enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
42
- inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
43
- nonce?: string | undefined | undefined;
44
- tabIndex?: number | undefined | undefined;
45
- disabled?: boolean | undefined | undefined;
46
- multiple?: boolean | undefined | undefined;
47
- size?: number | undefined | undefined;
48
- description?: string | undefined;
49
- accept?: string | undefined | undefined;
50
- alt?: string | undefined | undefined;
51
- autoComplete?: import("react").HTMLInputAutoCompleteAttribute | undefined;
52
- capture?: boolean | "user" | "environment" | undefined | undefined;
53
- checked?: boolean | undefined | undefined;
54
- formAction?: string | ((formData: FormData) => void | Promise<void>) | undefined;
55
- formEncType?: string | undefined | undefined;
56
- formMethod?: string | undefined | undefined;
57
- formNoValidate?: boolean | undefined | undefined;
58
- formTarget?: string | undefined | undefined;
59
- list?: string | undefined | undefined;
60
- maxLength?: number | undefined | undefined;
61
- minLength?: number | undefined | undefined;
62
- placeholder?: string | undefined | undefined;
63
- readOnly?: boolean | undefined | undefined;
64
- src?: string | undefined | undefined;
65
- step?: number | string | undefined | undefined;
66
- defaultChecked?: boolean | undefined | undefined;
67
- defaultValue?: string | number | readonly string[] | undefined;
68
- suppressContentEditableWarning?: boolean | undefined | undefined;
69
- suppressHydrationWarning?: boolean | undefined | undefined;
70
- autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
71
- autoFocus?: boolean | undefined | undefined;
72
- contextMenu?: string | undefined | undefined;
73
- spellCheck?: (boolean | "false" | "true") | undefined;
74
- radioGroup?: string | undefined | undefined;
75
- about?: string | undefined | undefined;
76
- datatype?: string | undefined | undefined;
77
- inlist?: any;
78
- property?: string | undefined | undefined;
79
- resource?: string | undefined | undefined;
80
- rev?: string | undefined | undefined;
81
- typeof?: string | undefined | undefined;
82
- vocab?: string | undefined | undefined;
83
- autoCorrect?: string | undefined | undefined;
84
- autoSave?: string | undefined | undefined;
85
- itemProp?: string | undefined | undefined;
86
- itemScope?: boolean | undefined | undefined;
87
- itemType?: string | undefined | undefined;
88
- itemID?: string | undefined | undefined;
89
- itemRef?: string | undefined | undefined;
90
- results?: number | undefined | undefined;
91
- security?: string | undefined | undefined;
92
- unselectable?: "on" | "off" | undefined | undefined;
93
- popoverTargetAction?: "toggle" | "show" | "hide" | undefined | undefined;
94
- popoverTarget?: string | undefined | undefined;
95
- is?: string | undefined | undefined;
96
- exportparts?: string | undefined | undefined;
97
- "aria-activedescendant"?: string | undefined | undefined;
98
- "aria-atomic"?: (boolean | "false" | "true") | undefined;
99
- "aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined | undefined;
100
- "aria-braillelabel"?: string | undefined | undefined;
101
- "aria-brailleroledescription"?: string | undefined | undefined;
102
- "aria-busy"?: (boolean | "false" | "true") | undefined;
103
- "aria-checked"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
104
- "aria-colcount"?: number | undefined | undefined;
105
- "aria-colindex"?: number | undefined | undefined;
106
- "aria-colindextext"?: string | undefined | undefined;
107
- "aria-colspan"?: number | undefined | undefined;
108
- "aria-controls"?: string | undefined | undefined;
109
- "aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined | undefined;
110
- "aria-describedby"?: string | undefined;
111
- "aria-description"?: string | undefined | undefined;
112
- "aria-details"?: string | undefined | undefined;
113
- "aria-disabled"?: (boolean | "false" | "true") | undefined;
114
- "aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined | undefined;
115
- "aria-errormessage"?: string | undefined;
116
- "aria-expanded"?: (boolean | "false" | "true") | undefined;
117
- "aria-flowto"?: string | undefined | undefined;
118
- "aria-grabbed"?: (boolean | "false" | "true") | undefined;
119
- "aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined | undefined;
120
- "aria-hidden"?: (boolean | "false" | "true") | undefined;
121
- "aria-invalid"?: boolean | undefined;
122
- "aria-keyshortcuts"?: string | undefined | undefined;
123
- "aria-label"?: string | undefined | undefined;
124
- "aria-labelledby"?: string | undefined;
125
- "aria-level"?: number | undefined | undefined;
126
- "aria-live"?: "off" | "assertive" | "polite" | undefined | undefined;
127
- "aria-modal"?: (boolean | "false" | "true") | undefined;
128
- "aria-multiline"?: (boolean | "false" | "true") | undefined;
129
- "aria-multiselectable"?: (boolean | "false" | "true") | undefined;
130
- "aria-orientation"?: "horizontal" | "vertical" | undefined | undefined;
131
- "aria-owns"?: string | undefined | undefined;
132
- "aria-placeholder"?: string | undefined | undefined;
133
- "aria-posinset"?: number | undefined | undefined;
134
- "aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
135
- "aria-readonly"?: (boolean | "false" | "true") | undefined;
136
- "aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined | undefined;
137
- "aria-required"?: (boolean | "false" | "true") | undefined;
138
- "aria-roledescription"?: string | undefined | undefined;
139
- "aria-rowcount"?: number | undefined | undefined;
140
- "aria-rowindex"?: number | undefined | undefined;
141
- "aria-rowindextext"?: string | undefined | undefined;
142
- "aria-rowspan"?: number | undefined | undefined;
143
- "aria-selected"?: (boolean | "false" | "true") | undefined;
144
- "aria-setsize"?: number | undefined | undefined;
145
- "aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined | undefined;
146
- "aria-valuemax"?: number | undefined | undefined;
147
- "aria-valuemin"?: number | undefined | undefined;
148
- "aria-valuenow"?: number | undefined | undefined;
149
- "aria-valuetext"?: string | undefined | undefined;
150
- dangerouslySetInnerHTML?: {
151
- __html: string | TrustedHTML;
152
- } | undefined | undefined;
153
- onCopy?: import("react").ClipboardEventHandler<HTMLInputElement> | undefined;
154
- onCopyCapture?: import("react").ClipboardEventHandler<HTMLInputElement> | undefined;
155
- onCut?: import("react").ClipboardEventHandler<HTMLInputElement> | undefined;
156
- onCutCapture?: import("react").ClipboardEventHandler<HTMLInputElement> | undefined;
157
- onPaste?: import("react").ClipboardEventHandler<HTMLInputElement> | undefined;
158
- onPasteCapture?: import("react").ClipboardEventHandler<HTMLInputElement> | undefined;
159
- onCompositionEnd?: import("react").CompositionEventHandler<HTMLInputElement> | undefined;
160
- onCompositionEndCapture?: import("react").CompositionEventHandler<HTMLInputElement> | undefined;
161
- onCompositionStart?: import("react").CompositionEventHandler<HTMLInputElement> | undefined;
162
- onCompositionStartCapture?: import("react").CompositionEventHandler<HTMLInputElement> | undefined;
163
- onCompositionUpdate?: import("react").CompositionEventHandler<HTMLInputElement> | undefined;
164
- onCompositionUpdateCapture?: import("react").CompositionEventHandler<HTMLInputElement> | undefined;
165
- onFocus?: import("react").FocusEventHandler<HTMLInputElement> | undefined;
166
- onFocusCapture?: import("react").FocusEventHandler<HTMLInputElement> | undefined;
167
- onBlur?: import("react").FocusEventHandler<HTMLInputElement> | undefined;
168
- onBlurCapture?: import("react").FocusEventHandler<HTMLInputElement> | undefined;
169
- onChange?: import("react").ChangeEventHandler<HTMLInputElement, HTMLInputElement> | undefined;
170
- onChangeCapture?: import("react").ChangeEventHandler<HTMLInputElement, Element> | undefined;
171
- onBeforeInput?: import("react").InputEventHandler<HTMLInputElement> | undefined;
172
- onBeforeInputCapture?: import("react").InputEventHandler<HTMLInputElement> | undefined;
173
- onInput?: import("react").InputEventHandler<HTMLInputElement> | undefined;
174
- onInputCapture?: import("react").InputEventHandler<HTMLInputElement> | undefined;
175
- onReset?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
176
- onResetCapture?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
177
- onSubmit?: import("react").SubmitEventHandler<HTMLInputElement> | undefined;
178
- onSubmitCapture?: import("react").SubmitEventHandler<HTMLInputElement> | undefined;
179
- onInvalid?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
180
- onInvalidCapture?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
181
- onLoad?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
182
- onLoadCapture?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
183
- onError?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
184
- onErrorCapture?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
185
- onKeyDown?: import("react").KeyboardEventHandler<HTMLInputElement> | undefined;
186
- onKeyDownCapture?: import("react").KeyboardEventHandler<HTMLInputElement> | undefined;
187
- onKeyPress?: import("react").KeyboardEventHandler<HTMLInputElement> | undefined;
188
- onKeyPressCapture?: import("react").KeyboardEventHandler<HTMLInputElement> | undefined;
189
- onKeyUp?: import("react").KeyboardEventHandler<HTMLInputElement> | undefined;
190
- onKeyUpCapture?: import("react").KeyboardEventHandler<HTMLInputElement> | undefined;
191
- onAbort?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
192
- onAbortCapture?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
193
- onCanPlay?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
194
- onCanPlayCapture?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
195
- onCanPlayThrough?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
196
- onCanPlayThroughCapture?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
197
- onDurationChange?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
198
- onDurationChangeCapture?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
199
- onEmptied?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
200
- onEmptiedCapture?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
201
- onEncrypted?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
202
- onEncryptedCapture?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
203
- onEnded?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
204
- onEndedCapture?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
205
- onLoadedData?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
206
- onLoadedDataCapture?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
207
- onLoadedMetadata?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
208
- onLoadedMetadataCapture?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
209
- onLoadStart?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
210
- onLoadStartCapture?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
211
- onPause?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
212
- onPauseCapture?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
213
- onPlay?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
214
- onPlayCapture?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
215
- onPlaying?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
216
- onPlayingCapture?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
217
- onProgress?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
218
- onProgressCapture?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
219
- onRateChange?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
220
- onRateChangeCapture?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
221
- onSeeked?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
222
- onSeekedCapture?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
223
- onSeeking?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
224
- onSeekingCapture?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
225
- onStalled?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
226
- onStalledCapture?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
227
- onSuspend?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
228
- onSuspendCapture?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
229
- onTimeUpdate?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
230
- onTimeUpdateCapture?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
231
- onVolumeChange?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
232
- onVolumeChangeCapture?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
233
- onWaiting?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
234
- onWaitingCapture?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
235
- onAuxClick?: import("react").MouseEventHandler<HTMLInputElement> | undefined;
236
- onAuxClickCapture?: import("react").MouseEventHandler<HTMLInputElement> | undefined;
237
- onClick?: import("react").MouseEventHandler<HTMLInputElement> | undefined;
238
- onClickCapture?: import("react").MouseEventHandler<HTMLInputElement> | undefined;
239
- onContextMenu?: import("react").MouseEventHandler<HTMLInputElement> | undefined;
240
- onContextMenuCapture?: import("react").MouseEventHandler<HTMLInputElement> | undefined;
241
- onDoubleClick?: import("react").MouseEventHandler<HTMLInputElement> | undefined;
242
- onDoubleClickCapture?: import("react").MouseEventHandler<HTMLInputElement> | undefined;
243
- onDrag?: import("react").DragEventHandler<HTMLInputElement> | undefined;
244
- onDragCapture?: import("react").DragEventHandler<HTMLInputElement> | undefined;
245
- onDragEnd?: import("react").DragEventHandler<HTMLInputElement> | undefined;
246
- onDragEndCapture?: import("react").DragEventHandler<HTMLInputElement> | undefined;
247
- onDragEnter?: import("react").DragEventHandler<HTMLInputElement> | undefined;
248
- onDragEnterCapture?: import("react").DragEventHandler<HTMLInputElement> | undefined;
249
- onDragExit?: import("react").DragEventHandler<HTMLInputElement> | undefined;
250
- onDragExitCapture?: import("react").DragEventHandler<HTMLInputElement> | undefined;
251
- onDragLeave?: import("react").DragEventHandler<HTMLInputElement> | undefined;
252
- onDragLeaveCapture?: import("react").DragEventHandler<HTMLInputElement> | undefined;
253
- onDragOver?: import("react").DragEventHandler<HTMLInputElement> | undefined;
254
- onDragOverCapture?: import("react").DragEventHandler<HTMLInputElement> | undefined;
255
- onDragStart?: import("react").DragEventHandler<HTMLInputElement> | undefined;
256
- onDragStartCapture?: import("react").DragEventHandler<HTMLInputElement> | undefined;
257
- onDrop?: import("react").DragEventHandler<HTMLInputElement> | undefined;
258
- onDropCapture?: import("react").DragEventHandler<HTMLInputElement> | undefined;
259
- onMouseDown?: import("react").MouseEventHandler<HTMLInputElement> | undefined;
260
- onMouseDownCapture?: import("react").MouseEventHandler<HTMLInputElement> | undefined;
261
- onMouseEnter?: import("react").MouseEventHandler<HTMLInputElement> | undefined;
262
- onMouseLeave?: import("react").MouseEventHandler<HTMLInputElement> | undefined;
263
- onMouseMove?: import("react").MouseEventHandler<HTMLInputElement> | undefined;
264
- onMouseMoveCapture?: import("react").MouseEventHandler<HTMLInputElement> | undefined;
265
- onMouseOut?: import("react").MouseEventHandler<HTMLInputElement> | undefined;
266
- onMouseOutCapture?: import("react").MouseEventHandler<HTMLInputElement> | undefined;
267
- onMouseOver?: import("react").MouseEventHandler<HTMLInputElement> | undefined;
268
- onMouseOverCapture?: import("react").MouseEventHandler<HTMLInputElement> | undefined;
269
- onMouseUp?: import("react").MouseEventHandler<HTMLInputElement> | undefined;
270
- onMouseUpCapture?: import("react").MouseEventHandler<HTMLInputElement> | undefined;
271
- onSelect?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
272
- onSelectCapture?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
273
- onTouchCancel?: import("react").TouchEventHandler<HTMLInputElement> | undefined;
274
- onTouchCancelCapture?: import("react").TouchEventHandler<HTMLInputElement> | undefined;
275
- onTouchEnd?: import("react").TouchEventHandler<HTMLInputElement> | undefined;
276
- onTouchEndCapture?: import("react").TouchEventHandler<HTMLInputElement> | undefined;
277
- onTouchMove?: import("react").TouchEventHandler<HTMLInputElement> | undefined;
278
- onTouchMoveCapture?: import("react").TouchEventHandler<HTMLInputElement> | undefined;
279
- onTouchStart?: import("react").TouchEventHandler<HTMLInputElement> | undefined;
280
- onTouchStartCapture?: import("react").TouchEventHandler<HTMLInputElement> | undefined;
281
- onPointerDown?: import("react").PointerEventHandler<HTMLInputElement> | undefined;
282
- onPointerDownCapture?: import("react").PointerEventHandler<HTMLInputElement> | undefined;
283
- onPointerMove?: import("react").PointerEventHandler<HTMLInputElement> | undefined;
284
- onPointerMoveCapture?: import("react").PointerEventHandler<HTMLInputElement> | undefined;
285
- onPointerUp?: import("react").PointerEventHandler<HTMLInputElement> | undefined;
286
- onPointerUpCapture?: import("react").PointerEventHandler<HTMLInputElement> | undefined;
287
- onPointerCancel?: import("react").PointerEventHandler<HTMLInputElement> | undefined;
288
- onPointerCancelCapture?: import("react").PointerEventHandler<HTMLInputElement> | undefined;
289
- onPointerEnter?: import("react").PointerEventHandler<HTMLInputElement> | undefined;
290
- onPointerLeave?: import("react").PointerEventHandler<HTMLInputElement> | undefined;
291
- onPointerOver?: import("react").PointerEventHandler<HTMLInputElement> | undefined;
292
- onPointerOverCapture?: import("react").PointerEventHandler<HTMLInputElement> | undefined;
293
- onPointerOut?: import("react").PointerEventHandler<HTMLInputElement> | undefined;
294
- onPointerOutCapture?: import("react").PointerEventHandler<HTMLInputElement> | undefined;
295
- onGotPointerCapture?: import("react").PointerEventHandler<HTMLInputElement> | undefined;
296
- onGotPointerCaptureCapture?: import("react").PointerEventHandler<HTMLInputElement> | undefined;
297
- onLostPointerCapture?: import("react").PointerEventHandler<HTMLInputElement> | undefined;
298
- onLostPointerCaptureCapture?: import("react").PointerEventHandler<HTMLInputElement> | undefined;
299
- onScroll?: import("react").UIEventHandler<HTMLInputElement> | undefined;
300
- onScrollCapture?: import("react").UIEventHandler<HTMLInputElement> | undefined;
301
- onScrollEnd?: import("react").UIEventHandler<HTMLInputElement> | undefined;
302
- onScrollEndCapture?: import("react").UIEventHandler<HTMLInputElement> | undefined;
303
- onWheel?: import("react").WheelEventHandler<HTMLInputElement> | undefined;
304
- onWheelCapture?: import("react").WheelEventHandler<HTMLInputElement> | undefined;
305
- onAnimationStart?: import("react").AnimationEventHandler<HTMLInputElement> | undefined;
306
- onAnimationStartCapture?: import("react").AnimationEventHandler<HTMLInputElement> | undefined;
307
- onAnimationEnd?: import("react").AnimationEventHandler<HTMLInputElement> | undefined;
308
- onAnimationEndCapture?: import("react").AnimationEventHandler<HTMLInputElement> | undefined;
309
- onAnimationIteration?: import("react").AnimationEventHandler<HTMLInputElement> | undefined;
310
- onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLInputElement> | undefined;
311
- onToggle?: import("react").ToggleEventHandler<HTMLInputElement> | undefined;
312
- onBeforeToggle?: import("react").ToggleEventHandler<HTMLInputElement> | undefined;
313
- onTransitionCancel?: import("react").TransitionEventHandler<HTMLInputElement> | undefined;
314
- onTransitionCancelCapture?: import("react").TransitionEventHandler<HTMLInputElement> | undefined;
315
- onTransitionEnd?: import("react").TransitionEventHandler<HTMLInputElement> | undefined;
316
- onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLInputElement> | undefined;
317
- onTransitionRun?: import("react").TransitionEventHandler<HTMLInputElement> | undefined;
318
- onTransitionRunCapture?: import("react").TransitionEventHandler<HTMLInputElement> | undefined;
319
- onTransitionStart?: import("react").TransitionEventHandler<HTMLInputElement> | undefined;
320
- onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLInputElement> | undefined;
321
- registerProps?: import("react-hook-form").RegisterOptions | undefined;
322
- isOptional?: boolean | undefined;
323
- requiredIndicator?: import("../../subcomponent/index.js").RequiredIndicator | undefined;
324
- nestedRegisterProps?: import("react-hook-form").RegisterOptions | undefined;
325
- unregisterOnUnmount?: boolean | undefined;
326
- mockLabel?: boolean | undefined;
327
- middleware?: (import("../../index.js").Middleware<CheckboxFieldProps>[] & import("../../index.js").Middleware<Omit<import("../../index.js").WrappedComponentProps<CheckboxFieldProps>, "Component"> & {
328
- condition?: import("../../index.js").Condition;
329
- }>[]) | undefined;
330
- WrapperComponent?: (import("react").ComponentType<import("../../index.js").WrapperProps<CheckboxFieldProps>> & import("react").ComponentType<import("../../index.js").WrapperProps<Omit<import("../../index.js").WrappedComponentProps<CheckboxFieldProps>, "Component"> & {
331
- condition?: import("../../index.js").Condition;
332
- }>>) | undefined;
333
- condition?: import("../../index.js").Condition | undefined;
334
- }) => import("react").ReactElement<Omit<import("../../index.js").WrappedComponentProps<CheckboxFieldProps>, "Component"> & {
335
- condition?: import("../../index.js").Condition;
336
- }, string | import("react").JSXElementConstructor<any>> | null;
12
+ declare const _default: import("react").FC<Omit<import("../../common/types.js").WrapperProps<CheckboxInputFieldProps>, "label" | "Component" | "controlLabel"> & import("../../common/types.js").ToggleLabelProps>;
337
13
  export default _default;
338
14
  //# sourceMappingURL=CheckboxField.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxField.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/CheckboxField/CheckboxField.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAErD;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACH,wBAEE"}
1
+ {"version":3,"file":"CheckboxField.d.ts","sourceRoot":"","sources":["../../../../../src/lib/component/CheckboxField/CheckboxField.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAGpF,KAAK,uBAAuB,GAAG,UAAU,CAAC,kBAAkB,CAAC,CAAC;AAE9D;;;;;;;GAOG;;AACH,wBAEE"}