@canonical/react-ds-global-form 0.29.0 → 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 (310) hide show
  1. package/dist/esm/lib/common/Wrapper/InvisibleWrapper.js +2 -0
  2. package/dist/esm/lib/common/Wrapper/InvisibleWrapper.js.map +1 -1
  3. package/dist/esm/lib/common/Wrapper/ToggleWrapper.css +35 -0
  4. package/dist/esm/lib/common/Wrapper/ToggleWrapper.js +52 -0
  5. package/dist/esm/lib/common/Wrapper/ToggleWrapper.js.map +1 -0
  6. package/dist/esm/lib/common/Wrapper/Wrapper.js +4 -2
  7. package/dist/esm/lib/common/Wrapper/Wrapper.js.map +1 -1
  8. package/dist/esm/lib/common/Wrapper/hooks/useFieldWrapper.js +1 -1
  9. package/dist/esm/lib/common/Wrapper/hooks/useFieldWrapper.js.map +1 -1
  10. package/dist/esm/lib/common/Wrapper/index.js +2 -0
  11. package/dist/esm/lib/common/Wrapper/index.js.map +1 -1
  12. package/dist/esm/lib/common/Wrapper/withToggleWrapper.js +14 -0
  13. package/dist/esm/lib/common/Wrapper/withToggleWrapper.js.map +1 -0
  14. package/dist/esm/lib/component/CheckboxField/CheckboxField.js +10 -6
  15. package/dist/esm/lib/component/CheckboxField/CheckboxField.js.map +1 -1
  16. package/dist/esm/lib/component/ChoicesField/Choices.js +2 -0
  17. package/dist/esm/lib/component/ChoicesField/Choices.js.map +1 -1
  18. package/dist/esm/lib/component/ChoicesField/ChoicesField.js +4 -2
  19. package/dist/esm/lib/component/ChoicesField/ChoicesField.js.map +1 -1
  20. package/dist/esm/lib/component/ChoicesField/common/Option/Option.js +1 -1
  21. package/dist/esm/lib/component/ChoicesField/common/Option/Option.js.map +1 -1
  22. package/dist/esm/lib/component/ColorField/ColorField.js +3 -3
  23. package/dist/esm/lib/component/ColorField/ColorField.js.map +1 -1
  24. package/dist/esm/lib/component/ComboboxField/ComboboxField.js +5 -3
  25. package/dist/esm/lib/component/ComboboxField/ComboboxField.js.map +1 -1
  26. package/dist/esm/lib/component/DateField/DateField.js +5 -3
  27. package/dist/esm/lib/component/DateField/DateField.js.map +1 -1
  28. package/dist/esm/lib/component/DateTimeField/DateTimeField.js +5 -3
  29. package/dist/esm/lib/component/DateTimeField/DateTimeField.js.map +1 -1
  30. package/dist/esm/lib/component/FileUploadField/FileUploadField.js +5 -3
  31. package/dist/esm/lib/component/FileUploadField/FileUploadField.js.map +1 -1
  32. package/dist/esm/lib/component/HiddenField/HiddenField.js +5 -3
  33. package/dist/esm/lib/component/HiddenField/HiddenField.js.map +1 -1
  34. package/dist/esm/lib/component/NumberField/NumberField.js +5 -3
  35. package/dist/esm/lib/component/NumberField/NumberField.js.map +1 -1
  36. package/dist/esm/lib/component/PasswordField/PasswordField.js +5 -3
  37. package/dist/esm/lib/component/PasswordField/PasswordField.js.map +1 -1
  38. package/dist/esm/lib/component/PhoneField/PhoneField.js +5 -3
  39. package/dist/esm/lib/component/PhoneField/PhoneField.js.map +1 -1
  40. package/dist/esm/lib/component/RangeField/RangeField.js +4 -2
  41. package/dist/esm/lib/component/RangeField/RangeField.js.map +1 -1
  42. package/dist/esm/lib/component/RangeField/common/RangeControl/RangeControl.js +3 -1
  43. package/dist/esm/lib/component/RangeField/common/RangeControl/RangeControl.js.map +1 -1
  44. package/dist/esm/lib/component/RatingField/RatingField.js +12 -0
  45. package/dist/esm/lib/component/RatingField/RatingField.js.map +1 -0
  46. package/dist/esm/lib/component/RatingField/index.js +2 -0
  47. package/dist/esm/lib/component/RatingField/index.js.map +1 -0
  48. package/dist/esm/lib/component/RatingField/types.js +2 -0
  49. package/dist/esm/lib/component/RatingField/types.js.map +1 -0
  50. package/dist/esm/lib/component/RichChoicesField/RichChoices.js +2 -0
  51. package/dist/esm/lib/component/RichChoicesField/RichChoices.js.map +1 -1
  52. package/dist/esm/lib/component/RichChoicesField/RichChoicesField.js +4 -2
  53. package/dist/esm/lib/component/RichChoicesField/RichChoicesField.js.map +1 -1
  54. package/dist/esm/lib/component/RichChoicesField/common/Option/Option.js +1 -1
  55. package/dist/esm/lib/component/RichChoicesField/common/Option/Option.js.map +1 -1
  56. package/dist/esm/lib/component/RichChoicesField/styles.css +6 -0
  57. package/dist/esm/lib/component/SelectField/SelectField.js +5 -3
  58. package/dist/esm/lib/component/SelectField/SelectField.js.map +1 -1
  59. package/dist/esm/lib/component/SwitchField/SwitchField.js +13 -0
  60. package/dist/esm/lib/component/SwitchField/SwitchField.js.map +1 -0
  61. package/dist/esm/lib/component/SwitchField/index.js +2 -0
  62. package/dist/esm/lib/component/SwitchField/index.js.map +1 -0
  63. package/dist/esm/lib/component/SwitchField/types.js +2 -0
  64. package/dist/esm/lib/component/SwitchField/types.js.map +1 -0
  65. package/dist/esm/lib/component/TextField/TextField.js +5 -3
  66. package/dist/esm/lib/component/TextField/TextField.js.map +1 -1
  67. package/dist/esm/lib/component/TextareaField/TextareaField.js +5 -3
  68. package/dist/esm/lib/component/TextareaField/TextareaField.js.map +1 -1
  69. package/dist/esm/lib/component/TimeField/TimeField.js +5 -3
  70. package/dist/esm/lib/component/TimeField/TimeField.js.map +1 -1
  71. package/dist/esm/lib/component/index.js +2 -0
  72. package/dist/esm/lib/component/index.js.map +1 -1
  73. package/dist/esm/lib/index.js +2 -1
  74. package/dist/esm/lib/index.js.map +1 -1
  75. package/dist/esm/lib/pattern/Field/Field.js +25 -17
  76. package/dist/esm/lib/pattern/Field/Field.js.map +1 -1
  77. package/dist/esm/lib/pattern/Form/Form.js +2 -0
  78. package/dist/esm/lib/pattern/Form/Form.js.map +1 -1
  79. package/dist/esm/lib/subcomponent/CheckboxInput/CheckboxInput.js +2 -0
  80. package/dist/esm/lib/subcomponent/CheckboxInput/CheckboxInput.js.map +1 -1
  81. package/dist/esm/lib/subcomponent/ComboboxInput/ComboboxInput.js +2 -0
  82. package/dist/esm/lib/subcomponent/ComboboxInput/ComboboxInput.js.map +1 -1
  83. package/dist/esm/lib/subcomponent/ComboboxInput/MultipleCombobox.js +16 -8
  84. package/dist/esm/lib/subcomponent/ComboboxInput/MultipleCombobox.js.map +1 -1
  85. package/dist/esm/lib/subcomponent/ComboboxInput/common/ResetButton/ResetButton.js +2 -0
  86. package/dist/esm/lib/subcomponent/ComboboxInput/common/ResetButton/ResetButton.js.map +1 -1
  87. package/dist/esm/lib/subcomponent/DateInput/DateInput.js +2 -0
  88. package/dist/esm/lib/subcomponent/DateInput/DateInput.js.map +1 -1
  89. package/dist/esm/lib/subcomponent/DateTimeInput/DateTimeInput.js +2 -0
  90. package/dist/esm/lib/subcomponent/DateTimeInput/DateTimeInput.js.map +1 -1
  91. package/dist/esm/lib/subcomponent/Field/Description/Description.js +2 -0
  92. package/dist/esm/lib/subcomponent/Field/Description/Description.js.map +1 -1
  93. package/dist/esm/lib/subcomponent/Field/Error/Error.js +2 -0
  94. package/dist/esm/lib/subcomponent/Field/Error/Error.js.map +1 -1
  95. package/dist/esm/lib/subcomponent/Field/Label/Label.js +2 -0
  96. package/dist/esm/lib/subcomponent/Field/Label/Label.js.map +1 -1
  97. package/dist/esm/lib/subcomponent/FileUploadInput/FileUploadInput.js +2 -0
  98. package/dist/esm/lib/subcomponent/FileUploadInput/FileUploadInput.js.map +1 -1
  99. package/dist/esm/lib/subcomponent/FileUploadInput/styles.css +3 -0
  100. package/dist/esm/lib/subcomponent/HiddenInput/HiddenInput.js +2 -0
  101. package/dist/esm/lib/subcomponent/HiddenInput/HiddenInput.js.map +1 -1
  102. package/dist/esm/lib/subcomponent/NumberInput/NumberInput.js +2 -0
  103. package/dist/esm/lib/subcomponent/NumberInput/NumberInput.js.map +1 -1
  104. package/dist/esm/lib/subcomponent/PasswordInput/PasswordInput.js +2 -0
  105. package/dist/esm/lib/subcomponent/PasswordInput/PasswordInput.js.map +1 -1
  106. package/dist/esm/lib/subcomponent/PhoneInput/PhoneInput.js +3 -1
  107. package/dist/esm/lib/subcomponent/PhoneInput/PhoneInput.js.map +1 -1
  108. package/dist/esm/lib/subcomponent/RadioInput/RadioInput.js +2 -0
  109. package/dist/esm/lib/subcomponent/RadioInput/RadioInput.js.map +1 -1
  110. package/dist/esm/lib/subcomponent/RangeInput/RangeInput.js +2 -0
  111. package/dist/esm/lib/subcomponent/RangeInput/RangeInput.js.map +1 -1
  112. package/dist/esm/lib/subcomponent/RatingInput/RatingInput.js +48 -0
  113. package/dist/esm/lib/subcomponent/RatingInput/RatingInput.js.map +1 -0
  114. package/dist/esm/lib/subcomponent/RatingInput/index.js +2 -0
  115. package/dist/esm/lib/subcomponent/RatingInput/index.js.map +1 -0
  116. package/dist/esm/lib/subcomponent/RatingInput/styles.css +159 -0
  117. package/dist/esm/lib/subcomponent/RatingInput/types.js +2 -0
  118. package/dist/esm/lib/subcomponent/RatingInput/types.js.map +1 -0
  119. package/dist/esm/lib/subcomponent/SelectInput/SelectInput.js +2 -0
  120. package/dist/esm/lib/subcomponent/SelectInput/SelectInput.js.map +1 -1
  121. package/dist/esm/lib/subcomponent/SwitchInput/SwitchInput.js +26 -0
  122. package/dist/esm/lib/subcomponent/SwitchInput/SwitchInput.js.map +1 -0
  123. package/dist/esm/lib/subcomponent/SwitchInput/index.js +2 -0
  124. package/dist/esm/lib/subcomponent/SwitchInput/index.js.map +1 -0
  125. package/dist/esm/lib/subcomponent/SwitchInput/styles.css +88 -0
  126. package/dist/esm/lib/subcomponent/SwitchInput/types.js +2 -0
  127. package/dist/esm/lib/subcomponent/SwitchInput/types.js.map +1 -0
  128. package/dist/esm/lib/subcomponent/TextInput/TextInput.js +2 -0
  129. package/dist/esm/lib/subcomponent/TextInput/TextInput.js.map +1 -1
  130. package/dist/esm/lib/subcomponent/TextareaInput/TextareaInput.js +2 -0
  131. package/dist/esm/lib/subcomponent/TextareaInput/TextareaInput.js.map +1 -1
  132. package/dist/esm/lib/subcomponent/TimeInput/TimeInput.js +2 -0
  133. package/dist/esm/lib/subcomponent/TimeInput/TimeInput.js.map +1 -1
  134. package/dist/esm/lib/subcomponent/index.js +2 -0
  135. package/dist/esm/lib/subcomponent/index.js.map +1 -1
  136. package/dist/types/lib/common/Wrapper/InvisibleWrapper.d.ts +2 -0
  137. package/dist/types/lib/common/Wrapper/InvisibleWrapper.d.ts.map +1 -1
  138. package/dist/types/lib/common/Wrapper/ToggleWrapper.d.ts +24 -0
  139. package/dist/types/lib/common/Wrapper/ToggleWrapper.d.ts.map +1 -0
  140. package/dist/types/lib/common/Wrapper/Wrapper.d.ts +2 -0
  141. package/dist/types/lib/common/Wrapper/Wrapper.d.ts.map +1 -1
  142. package/dist/types/lib/common/Wrapper/index.d.ts +2 -0
  143. package/dist/types/lib/common/Wrapper/index.d.ts.map +1 -1
  144. package/dist/types/lib/common/Wrapper/withToggleWrapper.d.ts +20 -0
  145. package/dist/types/lib/common/Wrapper/withToggleWrapper.d.ts.map +1 -0
  146. package/dist/types/lib/common/Wrapper/withWrapper.d.ts +1 -1
  147. package/dist/types/lib/common/Wrapper/withWrapper.d.ts.map +1 -1
  148. package/dist/types/lib/common/types.d.ts +24 -2
  149. package/dist/types/lib/common/types.d.ts.map +1 -1
  150. package/dist/types/lib/component/CheckboxField/CheckboxField.d.ts +10 -332
  151. package/dist/types/lib/component/CheckboxField/CheckboxField.d.ts.map +1 -1
  152. package/dist/types/lib/component/CheckboxField/types.d.ts +7 -4
  153. package/dist/types/lib/component/CheckboxField/types.d.ts.map +1 -1
  154. package/dist/types/lib/component/ChoicesField/Choices.d.ts +2 -0
  155. package/dist/types/lib/component/ChoicesField/Choices.d.ts.map +1 -1
  156. package/dist/types/lib/component/ChoicesField/ChoicesField.d.ts +3 -0
  157. package/dist/types/lib/component/ChoicesField/ChoicesField.d.ts.map +1 -1
  158. package/dist/types/lib/component/ChoicesField/common/Option/types.d.ts +1 -1
  159. package/dist/types/lib/component/ChoicesField/common/Option/types.d.ts.map +1 -1
  160. package/dist/types/lib/component/ChoicesField/types.d.ts +2 -2
  161. package/dist/types/lib/component/ChoicesField/types.d.ts.map +1 -1
  162. package/dist/types/lib/component/ColorField/ColorField.d.ts +2 -1
  163. package/dist/types/lib/component/ColorField/ColorField.d.ts.map +1 -1
  164. package/dist/types/lib/component/ColorField/types.d.ts +2 -2
  165. package/dist/types/lib/component/ColorField/types.d.ts.map +1 -1
  166. package/dist/types/lib/component/ComboboxField/ComboboxField.d.ts +3 -0
  167. package/dist/types/lib/component/ComboboxField/ComboboxField.d.ts.map +1 -1
  168. package/dist/types/lib/component/ComboboxField/types.d.ts +2 -2
  169. package/dist/types/lib/component/ComboboxField/types.d.ts.map +1 -1
  170. package/dist/types/lib/component/DateField/DateField.d.ts +3 -0
  171. package/dist/types/lib/component/DateField/DateField.d.ts.map +1 -1
  172. package/dist/types/lib/component/DateField/types.d.ts +2 -2
  173. package/dist/types/lib/component/DateField/types.d.ts.map +1 -1
  174. package/dist/types/lib/component/DateTimeField/DateTimeField.d.ts +3 -0
  175. package/dist/types/lib/component/DateTimeField/DateTimeField.d.ts.map +1 -1
  176. package/dist/types/lib/component/DateTimeField/types.d.ts +2 -2
  177. package/dist/types/lib/component/DateTimeField/types.d.ts.map +1 -1
  178. package/dist/types/lib/component/FileUploadField/FileUploadField.d.ts +3 -0
  179. package/dist/types/lib/component/FileUploadField/FileUploadField.d.ts.map +1 -1
  180. package/dist/types/lib/component/FileUploadField/types.d.ts +2 -2
  181. package/dist/types/lib/component/FileUploadField/types.d.ts.map +1 -1
  182. package/dist/types/lib/component/HiddenField/HiddenField.d.ts +3 -0
  183. package/dist/types/lib/component/HiddenField/HiddenField.d.ts.map +1 -1
  184. package/dist/types/lib/component/HiddenField/types.d.ts +2 -2
  185. package/dist/types/lib/component/HiddenField/types.d.ts.map +1 -1
  186. package/dist/types/lib/component/NumberField/NumberField.d.ts +3 -0
  187. package/dist/types/lib/component/NumberField/NumberField.d.ts.map +1 -1
  188. package/dist/types/lib/component/NumberField/types.d.ts +2 -2
  189. package/dist/types/lib/component/NumberField/types.d.ts.map +1 -1
  190. package/dist/types/lib/component/PasswordField/PasswordField.d.ts +3 -0
  191. package/dist/types/lib/component/PasswordField/PasswordField.d.ts.map +1 -1
  192. package/dist/types/lib/component/PasswordField/types.d.ts +2 -2
  193. package/dist/types/lib/component/PasswordField/types.d.ts.map +1 -1
  194. package/dist/types/lib/component/PhoneField/PhoneField.d.ts +5 -2
  195. package/dist/types/lib/component/PhoneField/PhoneField.d.ts.map +1 -1
  196. package/dist/types/lib/component/PhoneField/index.d.ts +1 -1
  197. package/dist/types/lib/component/PhoneField/index.d.ts.map +1 -1
  198. package/dist/types/lib/component/PhoneField/types.d.ts +2 -2
  199. package/dist/types/lib/component/PhoneField/types.d.ts.map +1 -1
  200. package/dist/types/lib/component/RangeField/RangeField.d.ts +3 -0
  201. package/dist/types/lib/component/RangeField/RangeField.d.ts.map +1 -1
  202. package/dist/types/lib/component/RangeField/common/RangeControl/RangeControl.d.ts +2 -0
  203. package/dist/types/lib/component/RangeField/common/RangeControl/RangeControl.d.ts.map +1 -1
  204. package/dist/types/lib/component/RangeField/types.d.ts +1 -1
  205. package/dist/types/lib/component/RangeField/types.d.ts.map +1 -1
  206. package/dist/types/lib/component/RatingField/RatingField.d.ts +46 -0
  207. package/dist/types/lib/component/RatingField/RatingField.d.ts.map +1 -0
  208. package/dist/types/lib/component/RatingField/index.d.ts +3 -0
  209. package/dist/types/lib/component/RatingField/index.d.ts.map +1 -0
  210. package/dist/types/lib/component/RatingField/types.d.ts +9 -0
  211. package/dist/types/lib/component/RatingField/types.d.ts.map +1 -0
  212. package/dist/types/lib/component/RichChoicesField/RichChoices.d.ts +2 -0
  213. package/dist/types/lib/component/RichChoicesField/RichChoices.d.ts.map +1 -1
  214. package/dist/types/lib/component/RichChoicesField/RichChoicesField.d.ts +3 -0
  215. package/dist/types/lib/component/RichChoicesField/RichChoicesField.d.ts.map +1 -1
  216. package/dist/types/lib/component/RichChoicesField/types.d.ts +2 -2
  217. package/dist/types/lib/component/RichChoicesField/types.d.ts.map +1 -1
  218. package/dist/types/lib/component/SelectField/SelectField.d.ts +3 -0
  219. package/dist/types/lib/component/SelectField/SelectField.d.ts.map +1 -1
  220. package/dist/types/lib/component/SelectField/types.d.ts +2 -2
  221. package/dist/types/lib/component/SelectField/types.d.ts.map +1 -1
  222. package/dist/types/lib/component/SwitchField/SwitchField.d.ts +14 -0
  223. package/dist/types/lib/component/SwitchField/SwitchField.d.ts.map +1 -0
  224. package/dist/types/lib/component/SwitchField/index.d.ts +3 -0
  225. package/dist/types/lib/component/SwitchField/index.d.ts.map +1 -0
  226. package/dist/types/lib/component/SwitchField/types.d.ts +8 -0
  227. package/dist/types/lib/component/SwitchField/types.d.ts.map +1 -0
  228. package/dist/types/lib/component/TextField/TextField.d.ts +4 -1
  229. package/dist/types/lib/component/TextField/TextField.d.ts.map +1 -1
  230. package/dist/types/lib/component/TextField/types.d.ts +2 -2
  231. package/dist/types/lib/component/TextField/types.d.ts.map +1 -1
  232. package/dist/types/lib/component/TextareaField/TextareaField.d.ts +3 -0
  233. package/dist/types/lib/component/TextareaField/TextareaField.d.ts.map +1 -1
  234. package/dist/types/lib/component/TextareaField/types.d.ts +2 -2
  235. package/dist/types/lib/component/TextareaField/types.d.ts.map +1 -1
  236. package/dist/types/lib/component/TimeField/TimeField.d.ts +3 -0
  237. package/dist/types/lib/component/TimeField/TimeField.d.ts.map +1 -1
  238. package/dist/types/lib/component/TimeField/types.d.ts +2 -2
  239. package/dist/types/lib/component/TimeField/types.d.ts.map +1 -1
  240. package/dist/types/lib/component/index.d.ts +2 -0
  241. package/dist/types/lib/component/index.d.ts.map +1 -1
  242. package/dist/types/lib/index.d.ts +2 -0
  243. package/dist/types/lib/index.d.ts.map +1 -1
  244. package/dist/types/lib/pattern/Field/Field.d.ts +2 -0
  245. package/dist/types/lib/pattern/Field/Field.d.ts.map +1 -1
  246. package/dist/types/lib/pattern/Field/types.d.ts +27 -21
  247. package/dist/types/lib/pattern/Field/types.d.ts.map +1 -1
  248. package/dist/types/lib/pattern/Form/Form.d.ts +2 -0
  249. package/dist/types/lib/pattern/Form/Form.d.ts.map +1 -1
  250. package/dist/types/lib/subcomponent/CheckboxInput/CheckboxInput.d.ts +2 -0
  251. package/dist/types/lib/subcomponent/CheckboxInput/CheckboxInput.d.ts.map +1 -1
  252. package/dist/types/lib/subcomponent/ComboboxInput/ComboboxInput.d.ts +2 -0
  253. package/dist/types/lib/subcomponent/ComboboxInput/ComboboxInput.d.ts.map +1 -1
  254. package/dist/types/lib/subcomponent/ComboboxInput/MultipleCombobox.d.ts +2 -0
  255. package/dist/types/lib/subcomponent/ComboboxInput/MultipleCombobox.d.ts.map +1 -1
  256. package/dist/types/lib/subcomponent/ComboboxInput/common/ResetButton/ResetButton.d.ts +2 -0
  257. package/dist/types/lib/subcomponent/ComboboxInput/common/ResetButton/ResetButton.d.ts.map +1 -1
  258. package/dist/types/lib/subcomponent/DateInput/DateInput.d.ts +2 -0
  259. package/dist/types/lib/subcomponent/DateInput/DateInput.d.ts.map +1 -1
  260. package/dist/types/lib/subcomponent/DateTimeInput/DateTimeInput.d.ts +2 -0
  261. package/dist/types/lib/subcomponent/DateTimeInput/DateTimeInput.d.ts.map +1 -1
  262. package/dist/types/lib/subcomponent/Field/Description/Description.d.ts +2 -0
  263. package/dist/types/lib/subcomponent/Field/Description/Description.d.ts.map +1 -1
  264. package/dist/types/lib/subcomponent/Field/Error/Error.d.ts +2 -0
  265. package/dist/types/lib/subcomponent/Field/Error/Error.d.ts.map +1 -1
  266. package/dist/types/lib/subcomponent/Field/Label/Label.d.ts +2 -0
  267. package/dist/types/lib/subcomponent/Field/Label/Label.d.ts.map +1 -1
  268. package/dist/types/lib/subcomponent/FileUploadInput/FileUploadInput.d.ts +2 -0
  269. package/dist/types/lib/subcomponent/FileUploadInput/FileUploadInput.d.ts.map +1 -1
  270. package/dist/types/lib/subcomponent/HiddenInput/HiddenInput.d.ts +2 -0
  271. package/dist/types/lib/subcomponent/HiddenInput/HiddenInput.d.ts.map +1 -1
  272. package/dist/types/lib/subcomponent/NumberInput/NumberInput.d.ts +2 -0
  273. package/dist/types/lib/subcomponent/NumberInput/NumberInput.d.ts.map +1 -1
  274. package/dist/types/lib/subcomponent/PasswordInput/PasswordInput.d.ts +2 -0
  275. package/dist/types/lib/subcomponent/PasswordInput/PasswordInput.d.ts.map +1 -1
  276. package/dist/types/lib/subcomponent/PhoneInput/PhoneInput.d.ts +2 -0
  277. package/dist/types/lib/subcomponent/PhoneInput/PhoneInput.d.ts.map +1 -1
  278. package/dist/types/lib/subcomponent/PhoneInput/types.d.ts +2 -2
  279. package/dist/types/lib/subcomponent/PhoneInput/types.d.ts.map +1 -1
  280. package/dist/types/lib/subcomponent/RadioInput/RadioInput.d.ts +2 -0
  281. package/dist/types/lib/subcomponent/RadioInput/RadioInput.d.ts.map +1 -1
  282. package/dist/types/lib/subcomponent/RangeInput/RangeInput.d.ts +2 -0
  283. package/dist/types/lib/subcomponent/RangeInput/RangeInput.d.ts.map +1 -1
  284. package/dist/types/lib/subcomponent/RatingInput/RatingInput.d.ts +23 -0
  285. package/dist/types/lib/subcomponent/RatingInput/RatingInput.d.ts.map +1 -0
  286. package/dist/types/lib/subcomponent/RatingInput/index.d.ts +3 -0
  287. package/dist/types/lib/subcomponent/RatingInput/index.d.ts.map +1 -0
  288. package/dist/types/lib/subcomponent/RatingInput/types.d.ts +52 -0
  289. package/dist/types/lib/subcomponent/RatingInput/types.d.ts.map +1 -0
  290. package/dist/types/lib/subcomponent/SelectInput/SelectInput.d.ts +2 -0
  291. package/dist/types/lib/subcomponent/SelectInput/SelectInput.d.ts.map +1 -1
  292. package/dist/types/lib/subcomponent/SwitchInput/SwitchInput.d.ts +16 -0
  293. package/dist/types/lib/subcomponent/SwitchInput/SwitchInput.d.ts.map +1 -0
  294. package/dist/types/lib/subcomponent/SwitchInput/index.d.ts +3 -0
  295. package/dist/types/lib/subcomponent/SwitchInput/index.d.ts.map +1 -0
  296. package/dist/types/lib/subcomponent/SwitchInput/types.d.ts +8 -0
  297. package/dist/types/lib/subcomponent/SwitchInput/types.d.ts.map +1 -0
  298. package/dist/types/lib/subcomponent/TextInput/TextInput.d.ts +2 -0
  299. package/dist/types/lib/subcomponent/TextInput/TextInput.d.ts.map +1 -1
  300. package/dist/types/lib/subcomponent/TextareaInput/TextareaInput.d.ts +2 -0
  301. package/dist/types/lib/subcomponent/TextareaInput/TextareaInput.d.ts.map +1 -1
  302. package/dist/types/lib/subcomponent/TimeInput/TimeInput.d.ts +2 -0
  303. package/dist/types/lib/subcomponent/TimeInput/TimeInput.d.ts.map +1 -1
  304. package/dist/types/lib/subcomponent/index.d.ts +4 -0
  305. package/dist/types/lib/subcomponent/index.d.ts.map +1 -1
  306. package/dist/types/lib/utils/middleware/addRESTOptions.d.ts +2 -2
  307. package/dist/types/lib/utils/middleware/addRESTOptions.d.ts.map +1 -1
  308. package/dist/types/lib/utils/middleware/addRESTValidation.d.ts +1 -1
  309. package/dist/types/lib/utils/middleware/addRESTValidation.d.ts.map +1 -1
  310. package/package.json +14 -20
@@ -8,6 +8,8 @@ const componentCssClassName = "ds form-rich-choices";
8
8
  * out via `onChange` (a single value for radios, an array for checkboxes).
9
9
  * Each option is rendered by the `Option` subcomponent (common/Option).
10
10
  * @returns {React.ReactElement} - Rendered RichChoices
11
+ *
12
+ * `import { RichChoices } from "@canonical/react-ds-global-form";`
11
13
  */
12
14
  export const RichChoices = ({ id, className, style, name, isMultiple = false, disabled = false, options, value, onChange, }) => {
13
15
  const type = isMultiple ? "checkbox" : "radio";
@@ -1 +1 @@
1
- {"version":3,"file":"RichChoices.js","sourceRoot":"","sources":["../../../../../src/lib/component/RichChoicesField/RichChoices.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,sBAAsB,CAAC;AAErD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAC1B,EAAE,EACF,SAAS,EACT,KAAK,EACL,IAAI,EACJ,UAAU,GAAG,KAAK,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B,IAAI,UAAU,EAAE,CAAC;oBACf,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;oBAC9C,QAAQ,EAAE,CACR,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC;wBACxB,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,KAAK,CAAC;wBACvC,CAAC,CAAC,CAAC,GAAG,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,CAC3B,CAAC;gBACJ,CAAC;qBAAM,CAAC;oBACN,QAAQ,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBAC3B,CAAC;YACH,CAAC,CAAC;YACF,OAAO,CACL,KAAC,MAAM,IAEL,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,EAC9C,QAAQ,EAAE,YAAY,IANjB,MAAM,CAAC,KAAK,CAOjB,CACH,CAAC;QACJ,CAAC,CAAC,GACO,CACZ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1,10 +1,12 @@
1
- import bindField from "#lib/common/bindField/index.js";
2
- import withWrapper from "#lib/common/Wrapper/withWrapper.js";
1
+ import bindField from "../../common/bindField/index.js";
2
+ import withWrapper from "../../common/Wrapper/withWrapper.js";
3
3
  import { RichChoices } from "./RichChoices.js";
4
4
  /**
5
5
  * RichChoices bound to react-hook-form (controlled), wrapped with field chrome.
6
6
  * The label is mocked into the fieldset legend, as the per-option labels are
7
7
  * rendered by the individual options.
8
+ *
9
+ * `import { RichChoicesField } from "@canonical/react-ds-global-form";`
8
10
  */
9
11
  export default withWrapper(bindField(RichChoices, "controlled"), { mockLabel: true });
10
12
  //# sourceMappingURL=RichChoicesField.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RichChoicesField.js","sourceRoot":"","sources":["../../../../../src/lib/component/RichChoicesField/RichChoicesField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gCAAgC,CAAC;AACvD,OAAO,WAAW,MAAM,oCAAoC,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG/C;;;;GAIG;AACH,eAAe,WAAW,CACxB,SAAS,CAAwB,WAAW,EAAE,YAAY,CAAC,EAC3D,EAAE,SAAS,EAAE,IAAI,EAAE,CACpB,CAAC"}
1
+ {"version":3,"file":"RichChoicesField.js","sourceRoot":"","sources":["../../../../../src/lib/component/RichChoicesField/RichChoicesField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iCAAiC,CAAC;AACxD,OAAO,WAAW,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG/C;;;;;;GAMG;AACH,eAAe,WAAW,CACxB,SAAS,CAAwB,WAAW,EAAE,YAAY,CAAC,EAC3D,EAAE,SAAS,EAAE,IAAI,EAAE,CACpB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import useOptionAriaProperties from "#lib/utils/hooks/useOptionAriaProperties.js";
2
+ import useOptionAriaProperties from "../../../../utils/hooks/useOptionAriaProperties.js";
3
3
  const componentCssClassName = "ds option";
4
4
  /**
5
5
  * A single selectable option within a `RichChoices` group: a hidden native input
@@ -1 +1 @@
1
- {"version":3,"file":"Option.js","sourceRoot":"","sources":["../../../../../../../src/lib/component/RichChoicesField/common/Option/Option.tsx"],"names":[],"mappings":";AAGA,OAAO,uBAAuB,MAAM,6CAA6C,CAAC;AAGlF,MAAM,qBAAqB,GAAG,WAAW,CAAC;AAE1C;;;;;GAKG;AACH,MAAM,MAAM,GAAG,CAAC,EACd,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,OAAO,EACP,QAAQ,EACR,QAAQ,GACI,EAAsB,EAAE;IACpC,MAAM,SAAS,GAAG,uBAAuB,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9D,OAAO,CACL,eACE,SAAS,EAAE,CAAC,qBAAqB,EAAE,QAAQ,IAAI,UAAU,CAAC;aACvD,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,GAAG,CAAC,aAEZ,gBACE,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,KACd,SAAS,CAAC,KAAK,GACnB,EAEF,gBAAO,SAAS,EAAC,GAAG,KAAK,SAAS,CAAC,KAAK,YACrC,MAAM,CAAC,KAAK,GACP,IACJ,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Option.js","sourceRoot":"","sources":["../../../../../../../src/lib/component/RichChoicesField/common/Option/Option.tsx"],"names":[],"mappings":";AAGA,OAAO,uBAAuB,MAAM,oDAAoD,CAAC;AAGzF,MAAM,qBAAqB,GAAG,WAAW,CAAC;AAE1C;;;;;GAKG;AACH,MAAM,MAAM,GAAG,CAAC,EACd,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,OAAO,EACP,QAAQ,EACR,QAAQ,GACI,EAAsB,EAAE;IACpC,MAAM,SAAS,GAAG,uBAAuB,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9D,OAAO,CACL,eACE,SAAS,EAAE,CAAC,qBAAqB,EAAE,QAAQ,IAAI,UAAU,CAAC;aACvD,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,GAAG,CAAC,aAEZ,gBACE,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,KACd,SAAS,CAAC,KAAK,GACnB,EAEF,gBAAO,SAAS,EAAC,GAAG,KAAK,SAAS,CAAC,KAAK,YACrC,MAAM,CAAC,KAAK,GACP,IACJ,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -66,6 +66,10 @@
66
66
  }
67
67
 
68
68
  /* Focus */
69
+ /* biome-ignore lint/style/noDescendingSpecificity: state rules are ordered by
70
+ interaction semantics (hover → focus → checked → disabled); the preceding
71
+ :hover rule only reads as higher specificity because of its :not(:disabled)
72
+ guard. Reordering to satisfy the linter would change the cascade. */
69
73
  & > input:focus-visible + label {
70
74
  outline: none;
71
75
  border-color: var(--form-input-border-color-focus);
@@ -73,6 +77,7 @@
73
77
  }
74
78
 
75
79
  /* Checked / selected */
80
+ /* biome-ignore lint/style/noDescendingSpecificity: see the focus rule above. */
76
81
  & > input:checked + label {
77
82
  border-color: var(--form-input-border-color-focus);
78
83
  background-color: var(
@@ -83,6 +88,7 @@
83
88
  }
84
89
 
85
90
  /* Disabled */
91
+ /* biome-ignore lint/style/noDescendingSpecificity: see the focus rule above. */
86
92
  & > input:disabled + label {
87
93
  border-color: var(--form-input-border-color-disabled);
88
94
  background-color: var(--form-input-background-disabled);
@@ -1,9 +1,11 @@
1
- import bindField from "#lib/common/bindField/index.js";
2
- import withWrapper from "#lib/common/Wrapper/withWrapper.js";
3
- import { SelectInput } from "#lib/subcomponent/SelectInput/index.js";
1
+ import bindField from "../../common/bindField/index.js";
2
+ import withWrapper from "../../common/Wrapper/withWrapper.js";
3
+ import { SelectInput } from "../../subcomponent/SelectInput/index.js";
4
4
  /**
5
5
  * SelectInput bound to react-hook-form, wrapped with field chrome
6
6
  * (label, description, error) and middleware/conditional-display support.
7
+ *
8
+ * `import { SelectField } from "@canonical/react-ds-global-form";`
7
9
  */
8
10
  export default withWrapper(bindField(SelectInput, "native"));
9
11
  //# sourceMappingURL=SelectField.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SelectField.js","sourceRoot":"","sources":["../../../../../src/lib/component/SelectField/SelectField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gCAAgC,CAAC;AACvD,OAAO,WAAW,MAAM,oCAAoC,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAGrE;;;GAGG;AACH,eAAe,WAAW,CACxB,SAAS,CAAmB,WAAW,EAAE,QAAQ,CAAC,CACnD,CAAC"}
1
+ {"version":3,"file":"SelectField.js","sourceRoot":"","sources":["../../../../../src/lib/component/SelectField/SelectField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iCAAiC,CAAC;AACxD,OAAO,WAAW,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAGtE;;;;;GAKG;AACH,eAAe,WAAW,CACxB,SAAS,CAAmB,WAAW,EAAE,QAAQ,CAAC,CACnD,CAAC"}
@@ -0,0 +1,13 @@
1
+ import bindField from "../../common/bindField/index.js";
2
+ import withToggleWrapper from "../../common/Wrapper/withToggleWrapper.js";
3
+ import { SwitchInput } from "../../subcomponent/SwitchInput/index.js";
4
+ /**
5
+ * SwitchInput 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`.
9
+ *
10
+ * `import { SwitchField } from "@canonical/react-ds-global-form";`
11
+ */
12
+ export default withToggleWrapper(bindField(SwitchInput, "native"));
13
+ //# sourceMappingURL=SwitchField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SwitchField.js","sourceRoot":"","sources":["../../../../../src/lib/component/SwitchField/SwitchField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iCAAiC,CAAC;AAExD,OAAO,iBAAiB,MAAM,2CAA2C,CAAC;AAE1E,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAItE;;;;;;;GAOG;AACH,eAAe,iBAAiB,CAC9B,SAAS,CAAwB,WAAW,EAAE,QAAQ,CAAC,CACxD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default as SwitchField } from "./SwitchField.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/component/SwitchField/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/lib/component/SwitchField/types.ts"],"names":[],"mappings":""}
@@ -1,9 +1,11 @@
1
- import bindField from "#lib/common/bindField/index.js";
2
- import withWrapper from "#lib/common/Wrapper/withWrapper.js";
3
- import { TextInput } from "#lib/subcomponent/TextInput/index.js";
1
+ import bindField from "../../common/bindField/index.js";
2
+ import withWrapper from "../../common/Wrapper/withWrapper.js";
3
+ import { TextInput } from "../../subcomponent/TextInput/index.js";
4
4
  /**
5
5
  * TextInput bound to react-hook-form, wrapped with field chrome
6
6
  * (label, description, error) and middleware/conditional-display support.
7
+ *
8
+ * `import { TextField } from "@canonical/react-ds-global-form";`
7
9
  */
8
10
  export default withWrapper(bindField(TextInput, "native"));
9
11
  //# sourceMappingURL=TextField.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextField.js","sourceRoot":"","sources":["../../../../../src/lib/component/TextField/TextField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gCAAgC,CAAC;AACvD,OAAO,WAAW,MAAM,oCAAoC,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAGjE;;;GAGG;AACH,eAAe,WAAW,CACxB,SAAS,CAAiB,SAAS,EAAE,QAAQ,CAAC,CAC/C,CAAC"}
1
+ {"version":3,"file":"TextField.js","sourceRoot":"","sources":["../../../../../src/lib/component/TextField/TextField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iCAAiC,CAAC;AACxD,OAAO,WAAW,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAGlE;;;;;GAKG;AACH,eAAe,WAAW,CACxB,SAAS,CAAiB,SAAS,EAAE,QAAQ,CAAC,CAC/C,CAAC"}
@@ -1,9 +1,11 @@
1
- import bindField from "#lib/common/bindField/index.js";
2
- import withWrapper from "#lib/common/Wrapper/withWrapper.js";
3
- import { TextareaInput } from "#lib/subcomponent/TextareaInput/index.js";
1
+ import bindField from "../../common/bindField/index.js";
2
+ import withWrapper from "../../common/Wrapper/withWrapper.js";
3
+ import { TextareaInput } from "../../subcomponent/TextareaInput/index.js";
4
4
  /**
5
5
  * TextareaInput bound to react-hook-form, wrapped with field chrome
6
6
  * (label, description, error) and middleware/conditional-display support.
7
+ *
8
+ * `import { TextareaField } from "@canonical/react-ds-global-form";`
7
9
  */
8
10
  export default withWrapper(bindField(TextareaInput, "native"));
9
11
  //# sourceMappingURL=TextareaField.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextareaField.js","sourceRoot":"","sources":["../../../../../src/lib/component/TextareaField/TextareaField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gCAAgC,CAAC;AACvD,OAAO,WAAW,MAAM,oCAAoC,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AAGzE;;;GAGG;AACH,eAAe,WAAW,CACxB,SAAS,CAAqB,aAAa,EAAE,QAAQ,CAAC,CACvD,CAAC"}
1
+ {"version":3,"file":"TextareaField.js","sourceRoot":"","sources":["../../../../../src/lib/component/TextareaField/TextareaField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iCAAiC,CAAC;AACxD,OAAO,WAAW,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAG1E;;;;;GAKG;AACH,eAAe,WAAW,CACxB,SAAS,CAAqB,aAAa,EAAE,QAAQ,CAAC,CACvD,CAAC"}
@@ -1,9 +1,11 @@
1
- import bindField from "#lib/common/bindField/index.js";
2
- import withWrapper from "#lib/common/Wrapper/withWrapper.js";
3
- import { TimeInput } from "#lib/subcomponent/TimeInput/index.js";
1
+ import bindField from "../../common/bindField/index.js";
2
+ import withWrapper from "../../common/Wrapper/withWrapper.js";
3
+ import { TimeInput } from "../../subcomponent/TimeInput/index.js";
4
4
  /**
5
5
  * Time input bound to react-hook-form, wrapped with field chrome
6
6
  * (label, description, error) and middleware/conditional-display support.
7
+ *
8
+ * `import { TimeField } from "@canonical/react-ds-global-form";`
7
9
  */
8
10
  export default withWrapper(bindField(TimeInput, "native"));
9
11
  //# sourceMappingURL=TimeField.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TimeField.js","sourceRoot":"","sources":["../../../../../src/lib/component/TimeField/TimeField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gCAAgC,CAAC;AACvD,OAAO,WAAW,MAAM,oCAAoC,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAGjE;;;GAGG;AACH,eAAe,WAAW,CACxB,SAAS,CAAiB,SAAS,EAAE,QAAQ,CAAC,CAC/C,CAAC"}
1
+ {"version":3,"file":"TimeField.js","sourceRoot":"","sources":["../../../../../src/lib/component/TimeField/TimeField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iCAAiC,CAAC;AACxD,OAAO,WAAW,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAGlE;;;;;GAKG;AACH,eAAe,WAAW,CACxB,SAAS,CAAiB,SAAS,EAAE,QAAQ,CAAC,CAC/C,CAAC"}
@@ -12,8 +12,10 @@ export * from "./NumberField/index.js";
12
12
  export * from "./PasswordField/index.js";
13
13
  export * from "./PhoneField/index.js";
14
14
  export * from "./RangeField/index.js";
15
+ export * from "./RatingField/index.js";
15
16
  export * from "./RichChoicesField/index.js";
16
17
  export * from "./SelectField/index.js";
18
+ export * from "./SwitchField/index.js";
17
19
  export * from "./TextareaField/index.js";
18
20
  export * from "./TextField/index.js";
19
21
  export * from "./TimeField/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/component/index.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,oEAAoE;AACpE,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/component/index.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,oEAAoE;AACpE,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC"}
@@ -1,7 +1,8 @@
1
1
  // Public package surface (unchanged by the tier restructure): the Field pattern
2
2
  // (Field + FieldProps + the shared/machinery types it re-exports), the Form
3
3
  // pattern, and the form middleware. The component/ and subcomponent/ tiers are
4
- // internal — composed by the Field pattern, not exported at the root.
4
+ // otherwise internal — composed by the Field pattern, not exported at the root.
5
5
  export * from "./pattern/index.js";
6
+ export { RatingInput } from "./subcomponent/index.js";
6
7
  export * from "./utils/middleware/index.js";
7
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,4EAA4E;AAC5E,+EAA+E;AAC/E,sEAAsE;AACtE,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,4EAA4E;AAC5E,+EAA+E;AAC/E,gFAAgF;AAChF,cAAc,oBAAoB,CAAC;AAUnC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,cAAc,6BAA6B,CAAC"}
@@ -1,24 +1,28 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { CheckboxField } from "#lib/component/CheckboxField/index.js";
3
- import { ChoicesField } from "#lib/component/ChoicesField/index.js";
4
- import { ColorField } from "#lib/component/ColorField/index.js";
5
- import { ComboboxField } from "#lib/component/ComboboxField/index.js";
6
- import { DateField } from "#lib/component/DateField/index.js";
7
- import { DateTimeField } from "#lib/component/DateTimeField/index.js";
8
- import { FileUploadField } from "#lib/component/FileUploadField/index.js";
9
- import { HiddenField } from "#lib/component/HiddenField/index.js";
10
- import { NumberField } from "#lib/component/NumberField/index.js";
11
- import { PasswordField } from "#lib/component/PasswordField/index.js";
12
- import { PhoneField } from "#lib/component/PhoneField/index.js";
13
- import { RangeField } from "#lib/component/RangeField/index.js";
14
- import { RichChoicesField } from "#lib/component/RichChoicesField/index.js";
15
- import { SelectField } from "#lib/component/SelectField/index.js";
16
- import { TextareaField } from "#lib/component/TextareaField/index.js";
17
- import { TextField } from "#lib/component/TextField/index.js";
18
- import { TimeField } from "#lib/component/TimeField/index.js";
2
+ import { CheckboxField } from "../../component/CheckboxField/index.js";
3
+ import { ChoicesField } from "../../component/ChoicesField/index.js";
4
+ import { ColorField } from "../../component/ColorField/index.js";
5
+ import { ComboboxField } from "../../component/ComboboxField/index.js";
6
+ import { DateField } from "../../component/DateField/index.js";
7
+ import { DateTimeField } from "../../component/DateTimeField/index.js";
8
+ import { FileUploadField } from "../../component/FileUploadField/index.js";
9
+ import { HiddenField } from "../../component/HiddenField/index.js";
10
+ import { NumberField } from "../../component/NumberField/index.js";
11
+ import { PasswordField } from "../../component/PasswordField/index.js";
12
+ import { PhoneField } from "../../component/PhoneField/index.js";
13
+ import { RangeField } from "../../component/RangeField/index.js";
14
+ import { RatingField } from "../../component/RatingField/index.js";
15
+ import { RichChoicesField } from "../../component/RichChoicesField/index.js";
16
+ import { SelectField } from "../../component/SelectField/index.js";
17
+ import { SwitchField } from "../../component/SwitchField/index.js";
18
+ import { TextareaField } from "../../component/TextareaField/index.js";
19
+ import { TextField } from "../../component/TextField/index.js";
20
+ import { TimeField } from "../../component/TimeField/index.js";
19
21
  /**
20
22
  * description of the Field component
21
23
  * @returns {React.ReactElement} - Rendered Field
24
+ *
25
+ * `import { Field } from "@canonical/react-ds-global-form";`
22
26
  */
23
27
  const Field = ({ inputType, CustomComponent, ...props }) => {
24
28
  switch (inputType) {
@@ -26,6 +30,10 @@ const Field = ({ inputType, CustomComponent, ...props }) => {
26
30
  return _jsx(TextareaField, { ...props });
27
31
  case "checkbox":
28
32
  return _jsx(CheckboxField, { ...props });
33
+ case "switch":
34
+ return _jsx(SwitchField, { ...props });
35
+ case "rating":
36
+ return _jsx(RatingField, { ...props });
29
37
  case "range":
30
38
  return _jsx(RangeField, { ...props });
31
39
  case "select":
@@ -1 +1 @@
1
- {"version":3,"file":"Field.js","sourceRoot":"","sources":["../../../../../src/lib/pattern/Field/Field.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,OAAO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AU;YACb,OAAO,KAAC,aAAa,OAAK,KAAK,GAAI,CAAC;QACtC,KAAK,QAAQ;YACX,OAAO,KAAC,WAAW,OAAK,KAAK,GAAI,CAAC;QACpC,KAAK,cAAc;YACjB,OAAO,KAAC,gBAAgB,OAAK,KAAK,GAAI,CAAC;QACzC,KAAK,QAAQ;YACX,IAAI,CAAC,eAAe,EAAE,CAAC;gBACrB,MAAM,IAAI,KAAK,CACb,gEAAgE,CACjE,CAAC;YACJ,CAAC;YACD,OAAO,KAAC,eAAe,OAAK,KAAK,GAAI,CAAC;QACxC;YACE,OAAO,KAAC,SAAS,IAAC,SAAS,EAAE,SAAS,KAAM,KAAK,GAAI,CAAC;IAC1D,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -25,6 +25,8 @@ function InternalForm({ defaultValues, mode, ...rest }) {
25
25
  /**
26
26
  * Public Form component that routes to the appropriate implementation
27
27
  * depending on whether external `methods` are provided.
28
+ *
29
+ * `import { Form } from "@canonical/react-ds-global-form";`
28
30
  */
29
31
  const Form = ({ methods, defaultValues, mode, ...rest }) => {
30
32
  if (methods) {
@@ -1 +1 @@
1
- {"version":3,"file":"Form.js","sourceRoot":"","sources":["../../../../../src/lib/pattern/Form/Form.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAGxD,MAAM,qBAAqB,GAAG,SAAS,CAAC;AAExC;;GAEG;AACH,SAAS,SAAS,CAAC,EACjB,EAAE,EACF,SAAS,EACT,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,OAAO,GAGR;IACC,OAAO,CACL,KAAC,YAAY,OAAK,OAAO,YACvB,eACE,EAAE,EAAE,EAAE,EACN,SAAS,EAAE,CAAC,qBAAqB,EAAE,SAAS,EAAE,SAAS,CAAC;iBACrD,MAAM,CAAC,OAAO,CAAC;iBACf,IAAI,CAAC,GAAG,CAAC,EACZ,KAAK,EAAE,KAAK,EACZ,QAA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S,EAAE,CAAC,qBAAqB,EAAE,SAAS,EAAE,SAAS,CAAC;iBACrD,MAAM,CAAC,OAAO,CAAC;iBACf,IAAI,CAAC,GAAG,CAAC,EACZ,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,OAAO,CAAC,YAAY,CAAC,QAAQ,CAAC,YAEvC,QAAQ,GACJ,GACM,CAChB,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAS,YAAY,CAAC,EACpB,OAAO,EACP,GAAG,IAAI,EAGR;IACC,OAAO,KAAC,SAAS,OAAK,IAAI,EAAE,OAAO,EAAE,OAAO,GAAI,CAAC;AACnD,CAAC;AAED;;GAEG;AACH,SAAS,YAAY,CAAC,EACpB,aAAa,EACb,IAAI,EACJ,GAAG,IAAI,EACoB;IAC3B,MAAM,OAAO,GAAG,OAAO,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;IACjD,OAAO,KAAC,SAAS,OAAK,IAAI,EAAE,OAAO,EAAE,OAAO,GAAI,CAAC;AACnD,CAAC;AAED;;;;;GAKG;AACH,MAAM,IAAI,GAAG,CAAC,EACZ,OAAO,EACP,aAAa,EACb,IAAI,EACJ,GAAG,IAAI,EACG,EAAsB,EAAE;IAClC,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,KAAC,YAAY,OAAK,IAAI,EAAE,OAAO,EAAE,OAAO,GAAI,CAAC;IACtD,CAAC;IACD,OAAO,KAAC,YAAY,OAAK,IAAI,EAAE,aAAa,EAAE,aAAa,EAAE,IAAI,EAAE,IAAI,GAAI,CAAC;AAC9E,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -9,6 +9,8 @@ const componentCssClassName = "ds form-checkbox";
9
9
  * via the field tier, which spreads react-hook-form's `register()` result onto
10
10
  * it.
11
11
  * @returns {ReactElement} - Rendered Checkbox
12
+ *
13
+ * `import { CheckboxInput } from "@canonical/react-ds-global-form";`
12
14
  */
13
15
  export const CheckboxInput = forwardRef(function CheckboxInput({ id, className, style, ...nativeProps }, ref) {
14
16
  return (_jsx("input", { id: id, style: style, type: "checkbox", className: [componentCssClassName, className].filter(Boolean).join(" "), ref: ref, ...nativeProps }));
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxInput.js","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/CheckboxInput/CheckboxInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAqB,MAAM,OAAO,CAAC;AAEtD,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,kBAAkB,CAAC;AAEjD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CACrC,SAAS,aAAa,CACpB,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,WAAW,EAAE,EACxC,GAAG;IAEH,OAAO,CACL,gBACE,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,KAAK,EACZ,IAAI,EAAC,UAAU,EACf,SAAS,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EACvE,GAAG,EAAE,GAAG,KACJ,WAAW,GACf,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"CheckboxInput.js","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/CheckboxInput/CheckboxInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAqB,MAAM,OAAO,CAAC;AAEtD,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,kBAAkB,CAAC;AAEjD;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CACrC,SAAS,aAAa,CACpB,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,WAAW,EAAE,EACxC,GAAG;IAEH,OAAO,CACL,gBACE,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,KAAK,EACZ,IAAI,EAAC,UAAU,EACf,SAAS,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EACvE,GAAG,EAAE,GAAG,KACJ,WAAW,GACf,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -9,6 +9,8 @@ const componentCssClassName = "ds combobox";
9
9
  * Presentational combobox (controlled, no react-hook-form). Routes to the
10
10
  * single- or multiple-select implementation. The forwarded ref targets the
11
11
  * text input of the single-select variant.
12
+ *
13
+ * `import { ComboboxInput } from "@canonical/react-ds-global-form";`
12
14
  */
13
15
  export const ComboboxInput = forwardRef(function ComboboxInput({ className, isMultiple = false, ...otherProps }, ref) {
14
16
  const composedClassName = [componentCssClassName, className]
@@ -1 +1 @@
1
- {"version":3,"file":"ComboboxInput.js","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/ComboboxInput/ComboboxInput.tsx"],"names":[],"mappings":";AAAA,kDAAkD;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AACrD,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAEjD,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,aAAa,CAAC;AAE5C;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CACrC,SAAS,aAAa,CACpB,EAAE,SAAS,EAAE,UAAU,GAAG,KAAK,EAAE,GAAG,UAAU,EAAE,EAChD,GAAG;IAEH,MAAM,iBAAiB,GAAG,CAAC,qBAAqB,EAAE,SAAS,CAAC;SACzD,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,CAAC;IACb,IAAI,UAAU,EAAE,CAAC;QACf,OAAO,KAAC,gBAAgB,IAAC,SAAS,EAAE,iBAAiB,KAAM,UAAU,GAAI,CAAC;IAC5E,CAAC;IACD,OAAO,CACL,KAAC,cAAc,IAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,iBAAiB,KAAM,UAAU,GAAI,CAC3E,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"ComboboxInput.js","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/ComboboxInput/ComboboxInput.tsx"],"names":[],"mappings":";AAAA,kDAAkD;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AACrD,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAEjD,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,aAAa,CAAC;AAE5C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CACrC,SAAS,aAAa,CACpB,EAAE,SAAS,EAAE,UAAU,GAAG,KAAK,EAAE,GAAG,UAAU,EAAE,EAChD,GAAG;IAEH,MAAM,iBAAiB,GAAG,CAAC,qBAAqB,EAAE,SAAS,CAAC;SACzD,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,CAAC;IACb,IAAI,UAAU,EAAE,CAAC;QACf,OAAO,KAAC,gBAAgB,IAAC,SAAS,EAAE,iBAAiB,KAAM,UAAU,GAAI,CAAC;IAC5E,CAAC;IACD,OAAO,CACL,KAAC,cAAc,IAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,iBAAiB,KAAM,UAAU,GAAI,CAC3E,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -13,6 +13,8 @@ const componentCssClassName = "ds form-combobox";
13
13
  *
14
14
  * @param {ComboboxInputProps} props - The component props
15
15
  * @returns {React.ReactElement} - Rendered MultipleCombobox component
16
+ *
17
+ * `import { MultipleCombobox } from "@canonical/react-ds-global-form";`
16
18
  */
17
19
  const MultipleCombobox = ({ id, className, style, options, value, onChange, disabled = false, placeholder, valueKey = VALUE_KEY, convertItemToString = defaultConvertItemToString, convertValueToItem = defaultConvertValueToItem, filterItems = defaultFilterItems, onInputValueChangeFactory, }) => {
18
20
  // State for selected items and filtered items
@@ -24,12 +26,13 @@ const MultipleCombobox = ({ id, className, style, options, value, onChange, disa
24
26
  .map((val) => convertValueToItem(val, options, valueKey))
25
27
  .filter(Boolean);
26
28
  }, [convertValueToItem, options, valueKey]);
27
- // Initialise selectedItems from the controlled value on mount / when it changes
29
+ // Keep selectedItems in sync with the controlled value — on mount and on every
30
+ // change. Must clear as well as populate: an empty/undefined `value` (e.g. after
31
+ // reset) has to drive `selectedItems` back to [], otherwise a later re-render
32
+ // that re-supplies the previous array would resurrect the cleared chips.
28
33
  useEffect(() => {
29
- const values = value;
30
- if (values && values.length > 0) {
31
- setSelectedItems(convertValuesToItems(values));
32
- }
34
+ const values = value ?? [];
35
+ setSelectedItems(values.length > 0 ? convertValuesToItems(values) : []);
33
36
  }, [value, convertValuesToItems]);
34
37
  // Downshift's useMultipleSelection hook for managing multiple selections
35
38
  const { getSelectedItemProps, getDropdownProps, addSelectedItem, removeSelectedItem, } = useMultipleSelection({
@@ -37,8 +40,11 @@ const MultipleCombobox = ({ id, className, style, options, value, onChange, disa
37
40
  onSelectedItemsChange: ({ selectedItems: newSelectedItems }) => {
38
41
  if (newSelectedItems) {
39
42
  setSelectedItems(newSelectedItems);
43
+ // Emit [] (never undefined) when the list empties: with a react-hook-form
44
+ // Controller that has a defaultValue, onChange(undefined) reverts the field
45
+ // to that default, resurrecting the removed chips. [] clears cleanly.
40
46
  const newValue = newSelectedItems.map((item) => item[valueKey]);
41
- onChange?.(newValue.length > 0 ? newValue : undefined);
47
+ onChange?.(newValue);
42
48
  }
43
49
  },
44
50
  });
@@ -64,11 +70,13 @@ const MultipleCombobox = ({ id, className, style, options, value, onChange, disa
64
70
  },
65
71
  itemToString: convertItemToString,
66
72
  });
67
- // Reset function to clear selections and input
73
+ // Reset function to clear selections and input. Emits [] (not undefined) so a
74
+ // react-hook-form Controller with a defaultValue stores the cleared state
75
+ // rather than falling back to its default and repopulating the chips.
68
76
  const resetSelection = useCallback(() => {
69
77
  setSelectedItems([]);
70
78
  setInputValue("");
71
- onChange?.(undefined);
79
+ onChange?.([]);
72
80
  }, [onChange, setInputValue]);
73
81
  return (_jsxs("div", { id: id, style: style, className: [componentCssClassName, className].filter(Boolean).join(" "), children: [_jsx("div", { className: "selected-items", children: selectedItems.map((selectedItem, index) => (_jsxs("button", { ...getSelectedItemProps({ selectedItem, index }), onClick: () => removeSelectedItem(selectedItem), className: "chip", children: [convertItemToString(selectedItem), _jsx("span", { className: "remove-icon", children: "\u00D7" })] }, String(selectedItem[valueKey])))) }), _jsxs("div", { className: "ds input combobox-input chrome", children: [_jsx("input", { className: "p", ...getInputProps(getDropdownProps({ preventKeyAction: isOpen })), placeholder: placeholder, disabled: disabled }), _jsx(ResetButton, { onClick: resetSelection })] }), _jsx(List, { isOpen: isOpen, getMenuProps: getMenuProps, getItemProps: getItemProps, items: items, highlightedIndex: highlightedIndex, convertItemToString: convertItemToString, valueKey: valueKey, fieldValue: selectedItems.map((item) => String(item[valueKey])) })] }));
74
82
  };
@@ -1 +1 @@
1
- {"version":3,"file":"MultipleCombobox.js","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/ComboboxInput/MultipleCombobox.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAE9D,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzD,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EACL,mBAAmB,IAAI,0BAA0B,EACjD,kBAAkB,IAAI,yBAAyB,EAC/C,WAAW,IAAI,kBAAkB,GACl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ACH,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,KAAK,EACZ,gBAAgB,EAAE,gBAAgB,EAClC,mBAAmB,EAAE,mBAAmB,EACxC,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,GAC/D,IACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"MultipleCombobox.js","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/ComboboxInput/MultipleCombobox.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAE9D,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzD,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EACL,mBAAmB,IAAI,0BAA0B,EACjD,kBAAkB,IAAI,yBAAyB,EAC/C,WAAW,IAAI,kBAAkB,GAClC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,kBAAkB,CAAC;AAEjD;;;;;;;;;GASG;AACH,MAAM,gBAAgB,GAAG,CAAC,EACxB,EAAE,EACF,SAAS,EACT,KAAK,EACL,OAAO,EACP,KAAK,EACL,QAAQ,EACR,QAAQ,GAAG,KAAK,EAChB,WAAW,EACX,QAAQ,GAAG,SAAS,EACpB,mBAAmB,GAAG,0BAA0B,EAChD,kBAAkB,GAAG,yBAAyB,EAC9C,WAAW,GAAG,kBAAkB,EAChC,yBAAyB,GACN,EAAsB,EAAE;IAC3C,8CAA8C;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EF,eAAe,gBAAgB,CAAC"}
@@ -6,6 +6,8 @@ const componentCssClassName = "ds combobox-reset-button";
6
6
  /**
7
7
  * description of the ResetButton component
8
8
  * @returns {React.ReactElement} - Rendered ResetButton
9
+ *
10
+ * `import { ResetButton } from "@canonical/react-ds-global-form";`
9
11
  */
10
12
  const ResetButton = ({ id, className, messages = defaultMessages, style, onClick, }) => {
11
13
  return (_jsx(Button, { id: id, style: style, className: [componentCssClassName, className].filter(Boolean).join(" "), "aria-label": messages.reset(), type: "button", onClick: onClick, children: "x" }));
@@ -1 +1 @@
1
- {"version":3,"file":"ResetButton.js","sourceRoot":"","sources":["../../../../../../../src/lib/subcomponent/ComboboxInput/common/ResetButton/ResetButton.tsx"],"names":[],"mappings":";AAGA,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,MAAM,qBAAqB,GAAG,0BAA0B,CAAC;AAEzD;;;GAGG;AACH,MAAM,WAAW,GAAG,CAAC,EACnB,EAAE,EACF,SAAS,EACT,QAAQ,GAAG,eAAe,EAC1B,KAAK,EACL,OAAO,GACU,EAAsB,EAAE;IACzC,OAAO,CACL,KAAC,MAAM,IACL,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,gBAC3D,QAAQ,CAAC,KAAK,EAAE,EAC5B,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,OAAO,kBAGT,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"ResetButton.js","sourceRoot":"","sources":["../../../../../../../src/lib/subcomponent/ComboboxInput/common/ResetButton/ResetButton.tsx"],"names":[],"mappings":";AAGA,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,MAAM,qBAAqB,GAAG,0BAA0B,CAAC;AAEzD;;;;;GAKG;AACH,MAAM,WAAW,GAAG,CAAC,EACnB,EAAE,EACF,SAAS,EACT,QAAQ,GAAG,eAAe,EAC1B,KAAK,EACL,OAAO,GACU,EAAsB,EAAE;IACzC,OAAO,CACL,KAAC,MAAM,IACL,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,gBAC3D,QAAQ,CAAC,KAAK,EAAE,EAC5B,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,OAAO,kBAGT,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -15,6 +15,8 @@ const componentCssClassName = "ds input date chrome";
15
15
  * The `value` is always locale-independent ISO `yyyy-mm-dd`. To control the
16
16
  * displayed format you would need a custom (non-native) date control.
17
17
  * @returns {ReactElement} - Rendered DateInput
18
+ *
19
+ * `import { DateInput } from "@canonical/react-ds-global-form";`
18
20
  */
19
21
  export const DateInput = forwardRef(function DateInput({ id, className, style, min, max, ...nativeProps }, ref) {
20
22
  return (_jsx("input", { id: id, style: style, type: "date", min: min, max: max, className: [componentCssClassName, className].filter(Boolean).join(" "), ref: ref, ...nativeProps }));
@@ -1 +1 @@
1
- {"version":3,"file":"DateInput.js","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/DateInput/DateInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAqB,MAAM,OAAO,CAAC;AAEtD,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,sBAAsB,CAAC;AAErD;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CACjC,SAAS,SAAS,CAChB,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,WAAW,EAAE,EAClD,GAAG;IAEH,OAAO,CACL,gBACE,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,KAAK,EACZ,IAAI,EAAC,MAAM,EACX,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EACvE,GAAG,EAAE,GAAG,KACJ,WAAW,GACf,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"DateInput.js","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/DateInput/DateInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAqB,MAAM,OAAO,CAAC;AAEtD,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,sBAAsB,CAAC;AAErD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CACjC,SAAS,SAAS,CAChB,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,WAAW,EAAE,EAClD,GAAG;IAEH,OAAO,CACL,gBACE,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,KAAK,EACZ,IAAI,EAAC,MAAM,EACX,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EACvE,GAAG,EAAE,GAAG,KACJ,WAAW,GACf,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -15,6 +15,8 @@ const componentCssClassName = "ds input datetime chrome";
15
15
  * ISO `yyyy-mm-ddTHH:mm`. Controlling the display would require a custom
16
16
  * (non-native) control.
17
17
  * @returns {ReactElement} - Rendered DateTimeInput
18
+ *
19
+ * `import { DateTimeInput } from "@canonical/react-ds-global-form";`
18
20
  */
19
21
  export const DateTimeInput = forwardRef(function DateTimeInput({ id, className, style, min, max, step, ...nativeProps }, ref) {
20
22
  return (_jsx("input", { id: id, style: style, type: "datetime-local", min: min, max: max, step: step, className: [componentCssClassName, className].filter(Boolean).join(" "), ref: ref, ...nativeProps }));
@@ -1 +1 @@
1
- {"version":3,"file":"DateTimeInput.js","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/DateTimeInput/DateTimeInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAqB,MAAM,OAAO,CAAC;AAEtD,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,0BAA0B,CAAC;AAEzD;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CACrC,SAAS,aAAa,CACpB,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,WAAW,EAAE,EACxD,GAAG;IAEH,OAAO,CACL,gBACE,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,KAAK,EACZ,IAAI,EAAC,gBAAgB,EACrB,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EACvE,GAAG,EAAE,GAAG,KACJ,WAAW,GACf,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"DateTimeInput.js","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/DateTimeInput/DateTimeInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAqB,MAAM,OAAO,CAAC;AAEtD,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,0BAA0B,CAAC;AAEzD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CACrC,SAAS,aAAa,CACpB,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,WAAW,EAAE,EACxD,GAAG;IAEH,OAAO,CACL,gBACE,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,KAAK,EACZ,IAAI,EAAC,gBAAgB,EACrB,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EACvE,GAAG,EAAE,GAAG,KACJ,WAAW,GACf,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -4,6 +4,8 @@ const componentCssClassName = "ds field-description";
4
4
  /**
5
5
  * description of the Description component
6
6
  * @returns {React.ReactElement} - Rendered Description
7
+ *
8
+ * `import { Description } from "@canonical/react-ds-global-form";`
7
9
  */
8
10
  const Description = ({ id, children, className, style, }) => {
9
11
  return (_jsx("p", { id: id, style: style, className: [componentCssClassName, "p", className]
@@ -1 +1 @@
1
- {"version":3,"file":"Description.js","sourceRoot":"","sources":["../../../../../../src/lib/subcomponent/Field/Description/Description.tsx"],"names":[],"mappings":";AAGA,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,sBAAsB,CAAC;AAErD;;;GAGG;AACH,MAAM,WAAW,GAAG,CAAC,EACnB,EAAE,EACF,QAAQ,EACR,SAAS,EACT,KAAK,GACY,EAAsB,EAAE;IACzC,OAAO,CACL,YACE,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,CAAC,qBAAqB,EAAE,GAAG,EAAE,SAAS,CAAC;aAC/C,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,GAAG,CAAC,YAEX,QAAQ,GACP,CACL,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"Description.js","sourceRoot":"","sources":["../../../../../../src/lib/subcomponent/Field/Description/Description.tsx"],"names":[],"mappings":";AAGA,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,sBAAsB,CAAC;AAErD;;;;;GAKG;AACH,MAAM,WAAW,GAAG,CAAC,EACnB,EAAE,EACF,QAAQ,EACR,SAAS,EACT,KAAK,GACY,EAAsB,EAAE;IACzC,OAAO,CACL,YACE,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,CAAC,qBAAqB,EAAE,GAAG,EAAE,SAAS,CAAC;aAC/C,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,GAAG,CAAC,YAEX,QAAQ,GACP,CACL,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -4,6 +4,8 @@ const componentCssClassName = "ds field-error";
4
4
  /**
5
5
  * description of the Error component
6
6
  * @returns {React.ReactElement} - Rendered Error
7
+ *
8
+ * `import { Error } from "@canonical/react-ds-global-form";`
7
9
  */
8
10
  const FieldError = ({ id, children, className, style, }) => {
9
11
  return (_jsx("p", { id: id, style: style, className: [componentCssClassName, "p", className]
@@ -1 +1 @@
1
- {"version":3,"file":"Error.js","sourceRoot":"","sources":["../../../../../../src/lib/subcomponent/Field/Error/Error.tsx"],"names":[],"mappings":";AAGA,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAE/C;;;GAGG;AACH,MAAM,UAAU,GAAG,CAAC,EAClB,EAAE,EACF,QAAQ,EACR,SAAS,EACT,KAAK,GACM,EAAsB,EAAE;IACnC,OAAO,CACL,YACE,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,CAAC,qBAAqB,EAAE,GAAG,EAAE,SAAS,CAAC;aAC/C,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,GAAG,CAAC,EACZ,IAAI,EAAC,OAAO,YAEX,QAAQ,GACP,CACL,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"Error.js","sourceRoot":"","sources":["../../../../../../src/lib/subcomponent/Field/Error/Error.tsx"],"names":[],"mappings":";AAGA,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAE/C;;;;;GAKG;AACH,MAAM,UAAU,GAAG,CAAC,EAClB,EAAE,EACF,QAAQ,EACR,SAAS,EACT,KAAK,GACM,EAAsB,EAAE;IACnC,OAAO,CACL,YACE,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,CAAC,qBAAqB,EAAE,GAAG,EAAE,SAAS,CAAC;aAC/C,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,GAAG,CAAC,EACZ,IAAI,EAAC,OAAO,YAEX,QAAQ,GACP,CACL,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -8,6 +8,8 @@ const defaultMessages = {
8
8
  /**
9
9
  * description of the Label component
10
10
  * @returns {React.ReactElement} - Rendered Label
11
+ *
12
+ * `import { Label } from "@canonical/react-ds-global-form";`
11
13
  */
12
14
  const Label = ({ id, children, className, style, name, isOptional, requiredIndicator = "required", messages = defaultMessages, htmlFor, tag: Element = "label", }) => {
13
15
  // "required" mode marks the required fields, "optional" marks the optional
@@ -1 +1 @@
1
- {"version":3,"file":"Label.js","sourceRoot":"","sources":["../../../../../../src/lib/subcomponent/Field/Label/Label.tsx"],"names":[],"mappings":";AAGA,OAAO,cAAc,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AqB,GAAG,gBAAgB,CAAC;AAE/C,iDAAiD;AACjD,MAAM,eAAe,GAAG;IACtB,QAAQ,EAAE,GAAG,EAAE,CAAC,UAAU;CAC3B,CAAC;AAEF;;;;;GAKG;AACH,MAAM,KAAK,GAAG,CAAC,EACb,EAAE,EACF,QAAQ,EACR,SAAS,EACT,KAAK,EACL,IAAI,EACJ,UAAU,EACV,iBAAiB,GAAG,UAAU,EAC9B,QAAQ,GAAG,eAAe,EAC1B,OAAO,EACP,GAAG,EAAE,OAAO,GAAG,OAAO,GACX,EAAsB,EAAE;IACnC,2EAA2E;IAC3E,uEAAuE;IACvE,8EAA8E;IAC9E,wEAAwE;IACxE,mFAAmF;IACnF,mEAAmE;IACnE,oDAAoD;IACpD,MAAM,YAAY,GAAG,iBAAiB,KAAK,UAAU,IAAI,CAAC,UAAU,CAAC;IACrE,MAAM,kBAAkB,GAAG,iBAAiB,KAAK,UAAU,IAAI,UAAU,CAAC;IAE1E,OAAO,CACL,MAAC,OAAO,IACN,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,mBACnC,YAAY,IAAI,SAAS,EACxC,SAAS,EAAE,CAAC,qBAAqB,EAAE,GAAG,EAAE,SAAS,CAAC;aAC/C,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,GAAG,CAAC,aAEX,QAAQ,IAAI,IAAI,EAChB,kBAAkB,IAAI,CACrB,gBAAM,SAAS,EAAC,UAAU,mBAAI,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAC3D,IACO,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -7,6 +7,8 @@ const componentCssClassName = "ds input file-upload";
7
7
  * image preview. Controlled via `value`/`onChange` (no react-hook-form). The
8
8
  * field tier supplies the binding.
9
9
  * @returns {React.ReactElement} - Rendered FileUploadInput
10
+ *
11
+ * `import { FileUploadInput } from "@canonical/react-ds-global-form";`
10
12
  */
11
13
  export const FileUploadInput = ({ id, className, style, value, onChange, accept, maxSize, maxFiles, multiple = false, disabled = false, ...otherProps }) => {
12
14
  const inputRef = useRef(null);