@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
@@ -1 +1 @@
1
- {"version":3,"file":"PhoneInput.d.ts","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/PhoneInput/PhoneInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,KAAK,EAAE,eAAe,EAAc,MAAM,YAAY,CAAC;AAC9D,OAAO,cAAc,CAAC;AAkCtB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU,GAAI,2JAcxB,eAAe,KAAG,KAAK,CAAC,YAgI1B,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"PhoneInput.d.ts","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/PhoneInput/PhoneInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,KAAK,EAAE,eAAe,EAAc,MAAM,YAAY,CAAC;AAC9D,OAAO,cAAc,CAAC;AAkCtB;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,UAAU,GAAI,2JAcxB,eAAe,KAAG,KAAK,CAAC,YAgI1B,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1,6 +1,6 @@
1
- import type { CountryData, KnownCountryCode } from "#lib/utils/countries/index.js";
1
+ import type { CountryData, KnownCountryCode } from "../../utils/countries/index.js";
2
2
  import type { BaseProps } from "../types.js";
3
- export type { CountryCode, CountryData, KnownCountryCode, } from "#lib/utils/countries/index.js";
3
+ export type { CountryCode, CountryData, KnownCountryCode, } from "../../utils/countries/index.js";
4
4
  /** Props for the presentational Phone input (controlled, no react-hook-form). */
5
5
  export type PhoneInputProps = BaseProps & {
6
6
  /** Controlled value — E.164 string or structured object. */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/PhoneInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,gBAAgB,EACjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAI7C,YAAY,EACV,WAAW,EACX,WAAW,EACX,gBAAgB,GACjB,MAAM,+BAA+B,CAAC;AAEvC,iFAAiF;AACjF,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG;IACxC,4DAA4D;IAC5D,KAAK,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAE5B,kEAAkE;IAClE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,KAAK,IAAI,CAAC;IAEhD,0EAA0E;IAC1E,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAElC;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAEvC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAExC;;;OAGG;IACH,SAAS,CAAC,EAAE,WAAW,EAAE,CAAC;IAE1B,uDAAuD;IACvD,WAAW,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IAEpC;;;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,CAAC;IAEf,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC"}
@@ -7,6 +7,8 @@ import "./styles.css";
7
7
  * Usable standalone (controlled via `checked`/`onChange`, or uncontrolled) or
8
8
  * via a host that spreads its props onto it.
9
9
  * @returns {ReactElement} - Rendered RadioInput
10
+ *
11
+ * `import { RadioInput } from "@canonical/react-ds-global-form";`
10
12
  */
11
13
  export declare const RadioInput: import("react").ForwardRefExoticComponent<{
12
14
  name?: string | undefined | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"RadioInput.d.ts","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/RadioInput/RadioInput.tsx"],"names":[],"mappings":"AAIA,OAAO,cAAc,CAAC;AAItB;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oDAiBtB,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"RadioInput.d.ts","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/RadioInput/RadioInput.tsx"],"names":[],"mappings":"AAIA,OAAO,cAAc,CAAC;AAItB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oDAiBtB,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -5,6 +5,8 @@ import "./styles.css";
5
5
  * injects it via `bindField(..., { injectValue: true })`. The `<input>` itself
6
6
  * stays uncontrolled (driven by register / the consumer).
7
7
  * @returns {ReactElement} - Rendered Range
8
+ *
9
+ * `import { RangeInput } from "@canonical/react-ds-global-form";`
8
10
  */
9
11
  export declare const RangeInput: import("react").ForwardRefExoticComponent<import("react").InputHTMLAttributes<HTMLInputElement> & {
10
12
  min: number;
@@ -1 +1 @@
1
- {"version":3,"file":"RangeInput.d.ts","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/RangeInput/RangeInput.tsx"],"names":[],"mappings":"AAEA,OAAO,cAAc,CAAC;AAItB;;;;;;GAMG;AACH,eAAO,MAAM,UAAU;;;oDA2BtB,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"RangeInput.d.ts","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/RangeInput/RangeInput.tsx"],"names":[],"mappings":"AAEA,OAAO,cAAc,CAAC;AAItB;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU;;;oDA2BtB,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { type ReactElement } from "react";
2
+ import type { RatingInputProps } from "./types.js";
3
+ import "./styles.css";
4
+ /**
5
+ * Presentational star-rating input — pure markup, no react-hook-form. It is a
6
+ * radio group of `count` stars (5 or 10): exactly one value is selectable, so it
7
+ * inherits the native radio semantics — arrow keys move and select, Tab reaches
8
+ * the group once, and each choice is announced with its name and position.
9
+ *
10
+ * With `allowHalf`, every star carries two overlaid radio targets — the left
11
+ * half selects a half rating (n − 0.5), the right half the full star (n) — so
12
+ * the same five (or ten) stars stay on screen and clicking a star's left side
13
+ * gives a half. The fill is masked: a star is fully or half filled by clipping
14
+ * the solid-star glyph over the outline one.
15
+ *
16
+ * Usable standalone (controlled via `value`/`onChange`, or uncontrolled via
17
+ * `defaultValue`).
18
+ *
19
+ * `import { RatingInput } from "@canonical/react-ds-global-form";`
20
+ */
21
+ export declare const RatingInput: ({ id, className, style, name, count, allowHalf, value, defaultValue, onChange, disabled, formatStarLabel, ...labelling }: RatingInputProps) => ReactElement;
22
+ export default RatingInput;
23
+ //# sourceMappingURL=RatingInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RatingInput.d.ts","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/RatingInput/RatingInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAS,MAAM,OAAO,CAAC;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,cAAc,CAAC;AAOtB;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,WAAW,GAAI,0HAazB,gBAAgB,KAAG,YAoErB,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default, RatingInput } from "./RatingInput.js";
2
+ export type * from "./types.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/RatingInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACxD,mBAAmB,YAAY,CAAC"}
@@ -0,0 +1,52 @@
1
+ import type React from "react";
2
+ /** The number of stars offered. Ratings are conventionally out of 5 or 10. */
3
+ export type RatingScale = 5 | 10;
4
+ /**
5
+ * Props for the presentational RatingInput (no react-hook-form). The control is
6
+ * a radio group under the hood — a single-select from `count` options — so it
7
+ * inherits native keyboard support and screen-reader announcements; the props
8
+ * mirror a controlled/uncontrolled radio group rather than a single input.
9
+ */
10
+ export interface RatingInputProps {
11
+ /** A unique identifier for the group. */
12
+ id?: string;
13
+ /** Additional CSS classes on the group wrapper. */
14
+ className?: string;
15
+ style?: React.CSSProperties;
16
+ /**
17
+ * The radio group name — shared by every star so they form one group.
18
+ * (Per-star input ids are derived from the group `id`, or a generated id when
19
+ * `id` is omitted.)
20
+ */
21
+ name: string;
22
+ /** How many stars to offer. @default 5 */
23
+ count?: RatingScale;
24
+ /**
25
+ * Allow half-star ratings. Each star splits into two selectable halves, so
26
+ * the value can be 0.5, 1, 1.5 … up to `count`. @default false
27
+ */
28
+ allowHalf?: boolean;
29
+ /**
30
+ * The selected rating (controlled): 1..count, or in half steps (0.5, 1, 1.5,
31
+ * …) when `allowHalf` is set.
32
+ */
33
+ value?: number;
34
+ /** The initial rating (uncontrolled), same scale as `value`. */
35
+ defaultValue?: number;
36
+ /** Called with the newly selected rating when a star (or half) is chosen. */
37
+ onChange?: (value: number) => void;
38
+ /** Disables the whole group. */
39
+ disabled?: boolean;
40
+ /**
41
+ * Accessible name for the group (e.g. "Rate this article"). Falls back to
42
+ * "Rating" — always provide a meaningful one in context.
43
+ */
44
+ "aria-label"?: string;
45
+ "aria-labelledby"?: string;
46
+ /**
47
+ * How each star is named to assistive technology. Receives the star's value
48
+ * and the total; defaults to "{value} of {count} stars".
49
+ */
50
+ formatStarLabel?: (value: number, count: number) => string;
51
+ }
52
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/RatingInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,8EAA8E;AAC9E,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,CAAC;AAEjC;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,yCAAyC;IACzC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,0CAA0C;IAC1C,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,gCAAgC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;OAGG;IACH,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CAC5D"}
@@ -5,6 +5,8 @@ import "./styles.css";
5
5
  * Usable standalone (controlled via `value`/`onChange`, or uncontrolled) or via
6
6
  * the field tier, which spreads react-hook-form's `register()` result onto it.
7
7
  * @returns {ReactElement} - Rendered Select
8
+ *
9
+ * `import { SelectInput } from "@canonical/react-ds-global-form";`
8
10
  */
9
11
  export declare const SelectInput: import("react").ForwardRefExoticComponent<import("react").SelectHTMLAttributes<HTMLSelectElement> & import("../types.js").OptionsProps & import("react").RefAttributes<HTMLSelectElement>>;
10
12
  export default SelectInput;
@@ -1 +1 @@
1
- {"version":3,"file":"SelectInput.d.ts","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/SelectInput/SelectInput.tsx"],"names":[],"mappings":"AAEA,OAAO,cAAc,CAAC;AAItB;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,4LAyBvB,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"SelectInput.d.ts","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/SelectInput/SelectInput.tsx"],"names":[],"mappings":"AAEA,OAAO,cAAc,CAAC;AAItB;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,4LAyBvB,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { SwitchInputProps } from "./types.js";
2
+ import "./styles.css";
3
+ /**
4
+ * Presentational switch input — pure markup, no react-hook-form.
5
+ *
6
+ * A switch is a checkbox with `role="switch"`, styled as a sliding toggle.
7
+ * Usable standalone (controlled via `checked`/`onChange`, or uncontrolled) or
8
+ * via the field tier, which spreads react-hook-form's `register()` result onto
9
+ * it. Do not use directly in a form — use SwitchField instead.
10
+ * @returns {ReactElement} - Rendered Switch
11
+ *
12
+ * `import { SwitchInput } from "@canonical/react-ds-global-form";`
13
+ */
14
+ export declare const SwitchInput: import("react").ForwardRefExoticComponent<SwitchInputProps & import("react").RefAttributes<HTMLInputElement>>;
15
+ export default SwitchInput;
16
+ //# sourceMappingURL=SwitchInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SwitchInput.d.ts","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/SwitchInput/SwitchInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,cAAc,CAAC;AAItB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,+GAqBvB,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as SwitchInput } from "./SwitchInput.js";
2
+ export type { SwitchInputProps } from "./types.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/SwitchInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC1D,YAAY,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type React from "react";
2
+ /**
3
+ * Props for the presentational Switch input (no react-hook-form). `type` and
4
+ * `role` are fixed by the component (`checkbox` / `switch`) and omitted here so
5
+ * a consumer cannot override the switch semantics.
6
+ */
7
+ export type SwitchInputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "role">;
8
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/SwitchInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAC3C,MAAM,GAAG,MAAM,CAChB,CAAC"}
@@ -5,6 +5,8 @@ import "./styles.css";
5
5
  * Usable standalone (controlled via `value`/`onChange`, or uncontrolled) or via
6
6
  * the field tier, which spreads react-hook-form's `register()` result onto it.
7
7
  * @returns {ReactElement} - Rendered Text
8
+ *
9
+ * `import { TextInput } from "@canonical/react-ds-global-form";`
8
10
  */
9
11
  export declare const TextInput: import("react").ForwardRefExoticComponent<import("react").InputHTMLAttributes<HTMLInputElement> & {
10
12
  inputType?: import("./types.js").TextInputType;
@@ -1 +1 @@
1
- {"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/TextInput/TextInput.tsx"],"names":[],"mappings":"AAEA,OAAO,cAAc,CAAC;AAItB;;;;;;GAMG;AACH,eAAO,MAAM,SAAS;;;;oDAyBrB,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/TextInput/TextInput.tsx"],"names":[],"mappings":"AAEA,OAAO,cAAc,CAAC;AAItB;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS;;;;oDAyBrB,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -5,6 +5,8 @@ import "./styles.css";
5
5
  * Usable standalone (controlled via `value`/`onChange`, or uncontrolled) or via
6
6
  * the field tier, which spreads react-hook-form's `register()` result onto it.
7
7
  * @returns {ReactElement} - Rendered TextareaInput
8
+ *
9
+ * `import { TextareaInput } from "@canonical/react-ds-global-form";`
8
10
  */
9
11
  export declare const TextareaInput: import("react").ForwardRefExoticComponent<import("react").TextareaHTMLAttributes<HTMLTextAreaElement> & import("react").RefAttributes<HTMLTextAreaElement>>;
10
12
  export default TextareaInput;
@@ -1 +1 @@
1
- {"version":3,"file":"TextareaInput.d.ts","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/TextareaInput/TextareaInput.tsx"],"names":[],"mappings":"AAEA,OAAO,cAAc,CAAC;AAItB;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,6JAkBxB,CAAC;AAEH,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"TextareaInput.d.ts","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/TextareaInput/TextareaInput.tsx"],"names":[],"mappings":"AAEA,OAAO,cAAc,CAAC;AAItB;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,6JAkBxB,CAAC;AAEH,eAAe,aAAa,CAAC"}
@@ -11,6 +11,8 @@ import "./styles.css";
11
11
  * there is no `hour12`/format lever for a native picker. The `value` is always
12
12
  * 24-hour ISO `HH:mm`. Forcing 12/24h would require a custom (non-native) control.
13
13
  * @returns {ReactElement} - Rendered TimeInput
14
+ *
15
+ * `import { TimeInput } from "@canonical/react-ds-global-form";`
14
16
  */
15
17
  export declare const TimeInput: import("react").ForwardRefExoticComponent<import("react").InputHTMLAttributes<HTMLInputElement> & {
16
18
  min?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"TimeInput.d.ts","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/TimeInput/TimeInput.tsx"],"names":[],"mappings":"AAEA,OAAO,cAAc,CAAC;AAItB;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,SAAS;;;;oDAmBrB,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"TimeInput.d.ts","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/TimeInput/TimeInput.tsx"],"names":[],"mappings":"AAEA,OAAO,cAAc,CAAC;AAItB;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,SAAS;;;;oDAmBrB,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -23,8 +23,12 @@ export type { RadioInputProps } from "./RadioInput/index.js";
23
23
  export { RadioInput } from "./RadioInput/index.js";
24
24
  export type { RangeInputProps } from "./RangeInput/index.js";
25
25
  export { RangeInput } from "./RangeInput/index.js";
26
+ export type { RatingInputProps, RatingScale } from "./RatingInput/index.js";
27
+ export { RatingInput } from "./RatingInput/index.js";
26
28
  export type { SelectInputProps } from "./SelectInput/index.js";
27
29
  export { SelectInput } from "./SelectInput/index.js";
30
+ export type { SwitchInputProps } from "./SwitchInput/index.js";
31
+ export { SwitchInput } from "./SwitchInput/index.js";
28
32
  export type { TextareaInputProps } from "./TextareaInput/index.js";
29
33
  export { TextareaInput } from "./TextareaInput/index.js";
30
34
  export type { TextInputProps, TextInputType } from "./TextInput/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/subcomponent/index.ts"],"names":[],"mappings":"AAIA,YAAY,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAGnE,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,YAAY,EAAE,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"#lib/common/types.js";
2
- import type { Option } from "#lib/subcomponent/types.js";
1
+ import type { Middleware } from "../../common/types.js";
2
+ import type { Option } from "../../subcomponent/types.js";
3
3
  interface OptionsFetchOptions {
4
4
  method?: string;
5
5
  headers?: Record<string, string>;
@@ -1 +1 @@
1
- {"version":3,"file":"addRESTOptions.d.ts","sourceRoot":"","sources":["../../../../../src/lib/utils/middleware/addRESTOptions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEzD,UAAU,mBAAmB;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEjC,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,MAAM,EAAE,CAAC;CACzC;AAED,iBAAS,mBAAmB,CAC1B,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,mBAAwB,GAEhC,UAAU,CAAC,GAAG,CAAC,CA+CjB;AAED,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"addRESTOptions.d.ts","sourceRoot":"","sources":["../../../../../src/lib/utils/middleware/addRESTOptions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAE1D,UAAU,mBAAmB;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEjC,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,MAAM,EAAE,CAAC;CACzC;AAED,iBAAS,mBAAmB,CAC1B,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,mBAAwB,GAEhC,UAAU,CAAC,GAAG,CAAC,CA+CjB;AAED,eAAe,mBAAmB,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { Middleware } from "#lib/common/types.js";
1
+ import type { Middleware } from "../../common/types.js";
2
2
  interface ValidationOptions {
3
3
  method?: string;
4
4
  headers?: Record<string, string>;
@@ -1 +1 @@
1
- {"version":3,"file":"addRESTValidation.d.ts","sourceRoot":"","sources":["../../../../../src/lib/utils/middleware/addRESTValidation.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,UAAU,iBAAiB;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEjC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC;IACpC,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,iBAAS,sBAAsB,CAC7B,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,iBAAsB,GAE9B,UAAU,CAAC,GAAG,CAAC,CA4CjB;AAED,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"addRESTValidation.d.ts","sourceRoot":"","sources":["../../../../../src/lib/utils/middleware/addRESTValidation.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,UAAU,iBAAiB;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEjC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC;IACpC,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,iBAAS,sBAAsB,CAC7B,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,iBAAsB,GAE9B,UAAU,CAAC,GAAG,CAAC,CA4CjB;AAED,eAAe,sBAAsB,CAAC"}
package/package.json CHANGED
@@ -1,14 +1,7 @@
1
1
  {
2
2
  "name": "@canonical/react-ds-global-form",
3
- "version": "0.29.0",
3
+ "version": "0.30.0",
4
4
  "type": "module",
5
- "imports": {
6
- "#lib/*": {
7
- "development": "./src/lib/*",
8
- "types": "./dist/types/lib/*",
9
- "default": "./dist/esm/lib/*"
10
- }
11
- },
12
5
  "module": "dist/esm/index.js",
13
6
  "types": "dist/types/index.d.ts",
14
7
  "style": "dist/esm/index.css",
@@ -50,10 +43,10 @@
50
43
  "test:vitest:watch": "vitest"
51
44
  },
52
45
  "dependencies": {
53
- "@canonical/react-ds-global": "^0.29.0",
54
- "@canonical/storybook-config": "^0.29.0",
55
- "@canonical/styles": "^0.29.0",
56
- "@canonical/utils": "^0.29.0",
46
+ "@canonical/react-ds-global": "^0.30.0",
47
+ "@canonical/storybook-config": "^0.30.0",
48
+ "@canonical/styles": "^0.30.0",
49
+ "@canonical/utils": "^0.30.0",
57
50
  "downshift": "^9.3.2",
58
51
  "react": "^19.2.4",
59
52
  "react-dom": "^19.2.4",
@@ -61,13 +54,14 @@
61
54
  },
62
55
  "devDependencies": {
63
56
  "@biomejs/biome": "2.4.9",
64
- "@canonical/biome-config": "^0.29.0",
65
- "@canonical/design-tokens": "^0.6.0",
66
- "@canonical/storybook-addon-form-state": "^0.29.0",
67
- "@canonical/storybook-addon-msw": "^0.29.0",
68
- "@canonical/storybook-helpers": "^0.29.0",
69
- "@canonical/typescript-config-react": "^0.29.0",
70
- "@canonical/webarchitect": "^0.29.0",
57
+ "@canonical/biome-config": "^0.30.0",
58
+ "@canonical/design-tokens": "0.6.2-contrasted.0",
59
+ "@canonical/storybook-addon-form-state": "^0.30.0",
60
+ "@canonical/storybook-addon-msw": "^0.30.0",
61
+ "@canonical/storybook-helpers": "^0.30.0",
62
+ "@canonical/typescript-config-react": "^0.30.0",
63
+ "@canonical/vitest-config-react": "^0.30.0",
64
+ "@canonical/webarchitect": "^0.30.0",
71
65
  "@chromatic-com/storybook": "^5.0.1",
72
66
  "@storybook/addon-docs": "^10.3.1",
73
67
  "@storybook/react-vite": "^10.3.1",
@@ -87,5 +81,5 @@
87
81
  "vite": "^8.0.1",
88
82
  "vitest": "^4.0.18"
89
83
  },
90
- "gitHead": "535302c1e1e5dd8fa9bc2da4144de57ec4e63005"
84
+ "gitHead": "40fe86ac955473536ac14f074812a9821f5b65c0"
91
85
  }