@dnb/eufemia 10.70.0 → 10.71.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 (478) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/cjs/components/autocomplete/AutocompleteDocs.js +3 -3
  3. package/cjs/components/autocomplete/AutocompleteDocs.js.map +1 -1
  4. package/cjs/components/avatar/Avatar.js +3 -8
  5. package/cjs/components/avatar/Avatar.js.map +1 -1
  6. package/cjs/components/checkbox/CheckboxDocs.js +2 -2
  7. package/cjs/components/checkbox/CheckboxDocs.js.map +1 -1
  8. package/cjs/components/date-picker/DatePickerContext.d.ts +0 -1
  9. package/cjs/components/date-picker/DatePickerContext.js.map +1 -1
  10. package/cjs/components/date-picker/DatePickerDocs.js +1 -1
  11. package/cjs/components/date-picker/DatePickerDocs.js.map +1 -1
  12. package/cjs/components/date-picker/DatePickerInput.js +110 -136
  13. package/cjs/components/date-picker/DatePickerInput.js.map +1 -1
  14. package/cjs/components/date-picker/DatePickerProvider.js +0 -2
  15. package/cjs/components/date-picker/DatePickerProvider.js.map +1 -1
  16. package/cjs/components/date-picker/hooks/useDates.d.ts +0 -2
  17. package/cjs/components/date-picker/hooks/useDates.js +5 -5
  18. package/cjs/components/date-picker/hooks/useDates.js.map +1 -1
  19. package/cjs/components/date-picker/style/dnb-date-picker.css +4 -0
  20. package/cjs/components/date-picker/style/dnb-date-picker.min.css +1 -1
  21. package/cjs/components/date-picker/style/dnb-date-picker.scss +3 -0
  22. package/cjs/components/dialog/DialogDocs.js +7 -2
  23. package/cjs/components/dialog/DialogDocs.js.map +1 -1
  24. package/cjs/components/dropdown/Dropdown.d.ts +20 -20
  25. package/cjs/components/dropdown/DropdownDocs.d.ts +1 -0
  26. package/cjs/components/dropdown/DropdownDocs.js +158 -1
  27. package/cjs/components/dropdown/DropdownDocs.js.map +1 -1
  28. package/cjs/components/flex/ContainerDocs.js +1 -1
  29. package/cjs/components/flex/ContainerDocs.js.map +1 -1
  30. package/cjs/components/flex/ItemDocs.d.ts +2 -0
  31. package/cjs/components/flex/ItemDocs.js +39 -0
  32. package/cjs/components/flex/ItemDocs.js.map +1 -0
  33. package/cjs/components/grid/ItemDocs.d.ts +2 -0
  34. package/cjs/components/grid/ItemDocs.js +19 -0
  35. package/cjs/components/grid/ItemDocs.js.map +1 -0
  36. package/cjs/components/input/InputDocs.js +3 -3
  37. package/cjs/components/input/InputDocs.js.map +1 -1
  38. package/cjs/components/input-masked/InputMasked.d.ts +0 -3
  39. package/cjs/components/input-masked/InputMaskedDocs.d.ts +1 -0
  40. package/cjs/components/input-masked/InputMaskedDocs.js +58 -1
  41. package/cjs/components/input-masked/InputMaskedDocs.js.map +1 -1
  42. package/cjs/components/input-masked/InputMaskedHooks.js +11 -7
  43. package/cjs/components/input-masked/InputMaskedHooks.js.map +1 -1
  44. package/cjs/components/input-masked/InputMaskedUtils.d.ts +1 -1
  45. package/cjs/components/input-masked/InputMaskedUtils.js +2 -1
  46. package/cjs/components/input-masked/InputMaskedUtils.js.map +1 -1
  47. package/cjs/components/input-masked/MultiInputMaskedDocs.d.ts +2 -0
  48. package/cjs/components/input-masked/MultiInputMaskedDocs.js +70 -1
  49. package/cjs/components/input-masked/MultiInputMaskedDocs.js.map +1 -1
  50. package/cjs/components/input-masked/style/dnb-input-masked.css +9 -0
  51. package/cjs/components/input-masked/style/dnb-input-masked.min.css +1 -1
  52. package/cjs/components/input-masked/style/dnb-input-masked.scss +12 -0
  53. package/cjs/components/input-masked/text-mask/InputModeNumber.d.ts +8 -0
  54. package/cjs/components/input-masked/text-mask/InputModeNumber.js +32 -9
  55. package/cjs/components/input-masked/text-mask/InputModeNumber.js.map +1 -1
  56. package/cjs/components/input-masked/text-mask/adjustCaretPosition.d.ts +2 -1
  57. package/cjs/components/input-masked/text-mask/adjustCaretPosition.js +3 -2
  58. package/cjs/components/input-masked/text-mask/adjustCaretPosition.js.map +1 -1
  59. package/cjs/components/input-masked/text-mask/createTextMaskInputElement.js +9 -3
  60. package/cjs/components/input-masked/text-mask/createTextMaskInputElement.js.map +1 -1
  61. package/cjs/components/modal/ModalDocs.d.ts +5 -0
  62. package/cjs/components/modal/ModalDocs.js +201 -0
  63. package/cjs/components/modal/ModalDocs.js.map +1 -0
  64. package/cjs/components/radio/RadioDocs.js +2 -2
  65. package/cjs/components/radio/RadioDocs.js.map +1 -1
  66. package/cjs/components/section/Section.js +2 -7
  67. package/cjs/components/section/Section.js.map +1 -1
  68. package/cjs/components/section/SectionDocs.js +1 -1
  69. package/cjs/components/section/SectionDocs.js.map +1 -1
  70. package/cjs/components/slider/SliderDocs.js +2 -2
  71. package/cjs/components/slider/SliderDocs.js.map +1 -1
  72. package/cjs/components/space/SpaceDocs.d.ts +3 -0
  73. package/cjs/components/space/SpaceDocs.js +61 -0
  74. package/cjs/components/space/SpaceDocs.js.map +1 -0
  75. package/cjs/components/switch/SwitchDocs.js +2 -2
  76. package/cjs/components/switch/SwitchDocs.js.map +1 -1
  77. package/cjs/components/textarea/TextareaDocs.js +3 -3
  78. package/cjs/components/textarea/TextareaDocs.js.map +1 -1
  79. package/cjs/components/toggle-button/ToggleButtonGroupDocs.js +1 -1
  80. package/cjs/components/toggle-button/ToggleButtonGroupDocs.js.map +1 -1
  81. package/cjs/components/tooltip/TooltipDocs.js +1 -1
  82. package/cjs/components/tooltip/TooltipDocs.js.map +1 -1
  83. package/cjs/components/upload/Upload.js +6 -3
  84. package/cjs/components/upload/Upload.js.map +1 -1
  85. package/cjs/components/upload/UploadDocs.d.ts +1 -0
  86. package/cjs/components/upload/UploadDocs.js +43 -1
  87. package/cjs/components/upload/UploadDocs.js.map +1 -1
  88. package/cjs/components/upload/UploadFileListCell.js +32 -12
  89. package/cjs/components/upload/UploadFileListCell.js.map +1 -1
  90. package/cjs/components/upload/types.d.ts +7 -0
  91. package/cjs/components/upload/types.js.map +1 -1
  92. package/cjs/extensions/forms/DataContext/At/AtDocs.d.ts +2 -0
  93. package/cjs/extensions/forms/DataContext/At/AtDocs.js +24 -0
  94. package/cjs/extensions/forms/DataContext/At/AtDocs.js.map +1 -0
  95. package/cjs/extensions/forms/DataContext/Provider/ProviderDocs.js +1 -1
  96. package/cjs/extensions/forms/DataContext/Provider/ProviderDocs.js.map +1 -1
  97. package/cjs/extensions/forms/Field/Number/Number.js +3 -6
  98. package/cjs/extensions/forms/Field/Number/Number.js.map +1 -1
  99. package/cjs/extensions/forms/Field/Password/PasswordDocs.d.ts +1 -0
  100. package/cjs/extensions/forms/Field/Password/PasswordDocs.js +14 -2
  101. package/cjs/extensions/forms/Field/Password/PasswordDocs.js.map +1 -1
  102. package/cjs/extensions/forms/Field/PhoneNumber/PhoneNumber.d.ts +6 -4
  103. package/cjs/extensions/forms/Field/PhoneNumber/PhoneNumber.js +33 -25
  104. package/cjs/extensions/forms/Field/PhoneNumber/PhoneNumber.js.map +1 -1
  105. package/cjs/extensions/forms/Field/PhoneNumber/PhoneNumberDocs.d.ts +2 -2
  106. package/cjs/extensions/forms/Field/PhoneNumber/PhoneNumberDocs.js +8 -3
  107. package/cjs/extensions/forms/Field/PhoneNumber/PhoneNumberDocs.js.map +1 -1
  108. package/cjs/extensions/forms/Field/Provider/useFieldProvider.d.ts +3 -3
  109. package/cjs/extensions/forms/Field/String/StringDocs.js +1 -1
  110. package/cjs/extensions/forms/Field/String/StringDocs.js.map +1 -1
  111. package/cjs/extensions/forms/Field/Upload/Upload.d.ts +1 -1
  112. package/cjs/extensions/forms/Field/Upload/Upload.js +3 -1
  113. package/cjs/extensions/forms/Field/Upload/Upload.js.map +1 -1
  114. package/cjs/extensions/forms/FieldBlock/FieldBlock.js +11 -4
  115. package/cjs/extensions/forms/FieldBlock/FieldBlock.js.map +1 -1
  116. package/cjs/extensions/forms/FieldBlock/FieldBlockContext.d.ts +1 -1
  117. package/cjs/extensions/forms/FieldBlock/FieldBlockContext.js.map +1 -1
  118. package/cjs/extensions/forms/Form/ButtonRow/ButtonRowDocs.d.ts +2 -0
  119. package/cjs/extensions/forms/Form/ButtonRow/ButtonRowDocs.js +19 -0
  120. package/cjs/extensions/forms/Form/ButtonRow/ButtonRowDocs.js.map +1 -0
  121. package/cjs/extensions/forms/Form/Isolation/IsolationDocs.js +1 -1
  122. package/cjs/extensions/forms/Form/Isolation/IsolationDocs.js.map +1 -1
  123. package/cjs/extensions/forms/Wizard/Buttons/ButtonsDocs.d.ts +2 -0
  124. package/cjs/extensions/forms/Wizard/Buttons/ButtonsDocs.js +14 -0
  125. package/cjs/extensions/forms/Wizard/Buttons/ButtonsDocs.js.map +1 -0
  126. package/cjs/extensions/forms/hooks/DataValueWritePropsDocs.js +1 -1
  127. package/cjs/extensions/forms/hooks/DataValueWritePropsDocs.js.map +1 -1
  128. package/cjs/extensions/forms/hooks/useFieldProps.js +55 -18
  129. package/cjs/extensions/forms/hooks/useFieldProps.js.map +1 -1
  130. package/cjs/extensions/forms/types.d.ts +8 -5
  131. package/cjs/extensions/forms/types.js.map +1 -1
  132. package/cjs/extensions/forms/utils/FormError.d.ts +20 -16
  133. package/cjs/extensions/forms/utils/FormError.js.map +1 -1
  134. package/cjs/shared/Eufemia.d.ts +1 -1
  135. package/cjs/shared/Eufemia.js +2 -2
  136. package/cjs/shared/Eufemia.js.map +1 -1
  137. package/cjs/shared/helpers.d.ts +1 -0
  138. package/cjs/shared/helpers.js +7 -0
  139. package/cjs/shared/helpers.js.map +1 -1
  140. package/cjs/shared/locales/sv-SE.js +2 -2
  141. package/cjs/shared/locales/sv-SE.js.map +1 -1
  142. package/cjs/style/core/scopes.scss +1 -1
  143. package/cjs/style/dnb-ui-basis.css +1 -1
  144. package/cjs/style/dnb-ui-basis.min.css +1 -1
  145. package/cjs/style/dnb-ui-body.css +1 -1
  146. package/cjs/style/dnb-ui-body.min.css +1 -1
  147. package/cjs/style/dnb-ui-components.css +13 -0
  148. package/cjs/style/dnb-ui-components.min.css +1 -1
  149. package/cjs/style/dnb-ui-core.css +1 -1
  150. package/cjs/style/dnb-ui-core.min.css +1 -1
  151. package/cjs/style/themes/theme-eiendom/eiendom-theme-components.css +13 -0
  152. package/cjs/style/themes/theme-eiendom/eiendom-theme-components.min.css +1 -1
  153. package/cjs/style/themes/theme-sbanken/sbanken-theme-components.css +13 -0
  154. package/cjs/style/themes/theme-sbanken/sbanken-theme-components.min.css +1 -1
  155. package/cjs/style/themes/theme-ui/ui-theme-components.css +13 -0
  156. package/cjs/style/themes/theme-ui/ui-theme-components.min.css +1 -1
  157. package/components/autocomplete/AutocompleteDocs.js +3 -3
  158. package/components/autocomplete/AutocompleteDocs.js.map +1 -1
  159. package/components/avatar/Avatar.js +1 -6
  160. package/components/avatar/Avatar.js.map +1 -1
  161. package/components/checkbox/CheckboxDocs.js +2 -2
  162. package/components/checkbox/CheckboxDocs.js.map +1 -1
  163. package/components/date-picker/DatePickerContext.d.ts +0 -1
  164. package/components/date-picker/DatePickerContext.js.map +1 -1
  165. package/components/date-picker/DatePickerDocs.js +1 -1
  166. package/components/date-picker/DatePickerDocs.js.map +1 -1
  167. package/components/date-picker/DatePickerInput.js +111 -137
  168. package/components/date-picker/DatePickerInput.js.map +1 -1
  169. package/components/date-picker/DatePickerProvider.js +0 -2
  170. package/components/date-picker/DatePickerProvider.js.map +1 -1
  171. package/components/date-picker/hooks/useDates.d.ts +0 -2
  172. package/components/date-picker/hooks/useDates.js +3 -5
  173. package/components/date-picker/hooks/useDates.js.map +1 -1
  174. package/components/date-picker/style/dnb-date-picker.css +4 -0
  175. package/components/date-picker/style/dnb-date-picker.min.css +1 -1
  176. package/components/date-picker/style/dnb-date-picker.scss +3 -0
  177. package/components/dialog/DialogDocs.js +7 -2
  178. package/components/dialog/DialogDocs.js.map +1 -1
  179. package/components/dropdown/Dropdown.d.ts +20 -20
  180. package/components/dropdown/DropdownDocs.d.ts +1 -0
  181. package/components/dropdown/DropdownDocs.js +157 -0
  182. package/components/dropdown/DropdownDocs.js.map +1 -1
  183. package/components/flex/ContainerDocs.js +1 -1
  184. package/components/flex/ContainerDocs.js.map +1 -1
  185. package/components/flex/ItemDocs.d.ts +2 -0
  186. package/components/flex/ItemDocs.js +33 -0
  187. package/components/flex/ItemDocs.js.map +1 -0
  188. package/components/grid/ItemDocs.d.ts +2 -0
  189. package/components/grid/ItemDocs.js +13 -0
  190. package/components/grid/ItemDocs.js.map +1 -0
  191. package/components/input/InputDocs.js +3 -3
  192. package/components/input/InputDocs.js.map +1 -1
  193. package/components/input-masked/InputMasked.d.ts +0 -3
  194. package/components/input-masked/InputMaskedDocs.d.ts +1 -0
  195. package/components/input-masked/InputMaskedDocs.js +57 -0
  196. package/components/input-masked/InputMaskedDocs.js.map +1 -1
  197. package/components/input-masked/InputMaskedHooks.js +11 -7
  198. package/components/input-masked/InputMaskedHooks.js.map +1 -1
  199. package/components/input-masked/InputMaskedUtils.d.ts +1 -1
  200. package/components/input-masked/InputMaskedUtils.js +2 -1
  201. package/components/input-masked/InputMaskedUtils.js.map +1 -1
  202. package/components/input-masked/MultiInputMaskedDocs.d.ts +2 -0
  203. package/components/input-masked/MultiInputMaskedDocs.js +69 -0
  204. package/components/input-masked/MultiInputMaskedDocs.js.map +1 -1
  205. package/components/input-masked/style/dnb-input-masked.css +9 -0
  206. package/components/input-masked/style/dnb-input-masked.min.css +1 -1
  207. package/components/input-masked/style/dnb-input-masked.scss +12 -0
  208. package/components/input-masked/text-mask/InputModeNumber.d.ts +8 -0
  209. package/components/input-masked/text-mask/InputModeNumber.js +32 -9
  210. package/components/input-masked/text-mask/InputModeNumber.js.map +1 -1
  211. package/components/input-masked/text-mask/adjustCaretPosition.d.ts +2 -1
  212. package/components/input-masked/text-mask/adjustCaretPosition.js +3 -2
  213. package/components/input-masked/text-mask/adjustCaretPosition.js.map +1 -1
  214. package/components/input-masked/text-mask/createTextMaskInputElement.js +9 -3
  215. package/components/input-masked/text-mask/createTextMaskInputElement.js.map +1 -1
  216. package/components/modal/ModalDocs.d.ts +5 -0
  217. package/components/modal/ModalDocs.js +195 -0
  218. package/components/modal/ModalDocs.js.map +1 -0
  219. package/components/radio/RadioDocs.js +2 -2
  220. package/components/radio/RadioDocs.js.map +1 -1
  221. package/components/section/Section.js +1 -6
  222. package/components/section/Section.js.map +1 -1
  223. package/components/section/SectionDocs.js +1 -1
  224. package/components/section/SectionDocs.js.map +1 -1
  225. package/components/slider/SliderDocs.js +2 -2
  226. package/components/slider/SliderDocs.js.map +1 -1
  227. package/components/space/SpaceDocs.d.ts +3 -0
  228. package/components/space/SpaceDocs.js +55 -0
  229. package/components/space/SpaceDocs.js.map +1 -0
  230. package/components/switch/SwitchDocs.js +2 -2
  231. package/components/switch/SwitchDocs.js.map +1 -1
  232. package/components/textarea/TextareaDocs.js +3 -3
  233. package/components/textarea/TextareaDocs.js.map +1 -1
  234. package/components/toggle-button/ToggleButtonGroupDocs.js +1 -1
  235. package/components/toggle-button/ToggleButtonGroupDocs.js.map +1 -1
  236. package/components/tooltip/TooltipDocs.js +1 -1
  237. package/components/tooltip/TooltipDocs.js.map +1 -1
  238. package/components/upload/Upload.js +6 -3
  239. package/components/upload/Upload.js.map +1 -1
  240. package/components/upload/UploadDocs.d.ts +1 -0
  241. package/components/upload/UploadDocs.js +42 -0
  242. package/components/upload/UploadDocs.js.map +1 -1
  243. package/components/upload/UploadFileListCell.js +32 -12
  244. package/components/upload/UploadFileListCell.js.map +1 -1
  245. package/components/upload/types.d.ts +7 -0
  246. package/components/upload/types.js.map +1 -1
  247. package/es/components/autocomplete/AutocompleteDocs.js +3 -3
  248. package/es/components/autocomplete/AutocompleteDocs.js.map +1 -1
  249. package/es/components/avatar/Avatar.js +1 -6
  250. package/es/components/avatar/Avatar.js.map +1 -1
  251. package/es/components/checkbox/CheckboxDocs.js +2 -2
  252. package/es/components/checkbox/CheckboxDocs.js.map +1 -1
  253. package/es/components/date-picker/DatePickerContext.d.ts +0 -1
  254. package/es/components/date-picker/DatePickerContext.js.map +1 -1
  255. package/es/components/date-picker/DatePickerDocs.js +1 -1
  256. package/es/components/date-picker/DatePickerDocs.js.map +1 -1
  257. package/es/components/date-picker/DatePickerInput.js +103 -130
  258. package/es/components/date-picker/DatePickerInput.js.map +1 -1
  259. package/es/components/date-picker/DatePickerProvider.js +0 -2
  260. package/es/components/date-picker/DatePickerProvider.js.map +1 -1
  261. package/es/components/date-picker/hooks/useDates.d.ts +0 -2
  262. package/es/components/date-picker/hooks/useDates.js +3 -5
  263. package/es/components/date-picker/hooks/useDates.js.map +1 -1
  264. package/es/components/date-picker/style/dnb-date-picker.css +4 -0
  265. package/es/components/date-picker/style/dnb-date-picker.min.css +1 -1
  266. package/es/components/date-picker/style/dnb-date-picker.scss +3 -0
  267. package/es/components/dialog/DialogDocs.js +7 -2
  268. package/es/components/dialog/DialogDocs.js.map +1 -1
  269. package/es/components/dropdown/Dropdown.d.ts +20 -20
  270. package/es/components/dropdown/DropdownDocs.d.ts +1 -0
  271. package/es/components/dropdown/DropdownDocs.js +157 -0
  272. package/es/components/dropdown/DropdownDocs.js.map +1 -1
  273. package/es/components/flex/ContainerDocs.js +1 -1
  274. package/es/components/flex/ContainerDocs.js.map +1 -1
  275. package/es/components/flex/ItemDocs.d.ts +2 -0
  276. package/es/components/flex/ItemDocs.js +33 -0
  277. package/es/components/flex/ItemDocs.js.map +1 -0
  278. package/es/components/grid/ItemDocs.d.ts +2 -0
  279. package/es/components/grid/ItemDocs.js +13 -0
  280. package/es/components/grid/ItemDocs.js.map +1 -0
  281. package/es/components/input/InputDocs.js +3 -3
  282. package/es/components/input/InputDocs.js.map +1 -1
  283. package/es/components/input-masked/InputMasked.d.ts +0 -3
  284. package/es/components/input-masked/InputMaskedDocs.d.ts +1 -0
  285. package/es/components/input-masked/InputMaskedDocs.js +57 -0
  286. package/es/components/input-masked/InputMaskedDocs.js.map +1 -1
  287. package/es/components/input-masked/InputMaskedHooks.js +11 -7
  288. package/es/components/input-masked/InputMaskedHooks.js.map +1 -1
  289. package/es/components/input-masked/InputMaskedUtils.d.ts +1 -1
  290. package/es/components/input-masked/InputMaskedUtils.js +2 -1
  291. package/es/components/input-masked/InputMaskedUtils.js.map +1 -1
  292. package/es/components/input-masked/MultiInputMaskedDocs.d.ts +2 -0
  293. package/es/components/input-masked/MultiInputMaskedDocs.js +69 -0
  294. package/es/components/input-masked/MultiInputMaskedDocs.js.map +1 -1
  295. package/es/components/input-masked/style/dnb-input-masked.css +9 -0
  296. package/es/components/input-masked/style/dnb-input-masked.min.css +1 -1
  297. package/es/components/input-masked/style/dnb-input-masked.scss +12 -0
  298. package/es/components/input-masked/text-mask/InputModeNumber.d.ts +8 -0
  299. package/es/components/input-masked/text-mask/InputModeNumber.js +39 -9
  300. package/es/components/input-masked/text-mask/InputModeNumber.js.map +1 -1
  301. package/es/components/input-masked/text-mask/adjustCaretPosition.d.ts +2 -1
  302. package/es/components/input-masked/text-mask/adjustCaretPosition.js +3 -2
  303. package/es/components/input-masked/text-mask/adjustCaretPosition.js.map +1 -1
  304. package/es/components/input-masked/text-mask/createTextMaskInputElement.js +9 -3
  305. package/es/components/input-masked/text-mask/createTextMaskInputElement.js.map +1 -1
  306. package/es/components/modal/ModalDocs.d.ts +5 -0
  307. package/es/components/modal/ModalDocs.js +191 -0
  308. package/es/components/modal/ModalDocs.js.map +1 -0
  309. package/es/components/radio/RadioDocs.js +2 -2
  310. package/es/components/radio/RadioDocs.js.map +1 -1
  311. package/es/components/section/Section.js +1 -6
  312. package/es/components/section/Section.js.map +1 -1
  313. package/es/components/section/SectionDocs.js +1 -1
  314. package/es/components/section/SectionDocs.js.map +1 -1
  315. package/es/components/slider/SliderDocs.js +2 -2
  316. package/es/components/slider/SliderDocs.js.map +1 -1
  317. package/es/components/space/SpaceDocs.d.ts +3 -0
  318. package/es/components/space/SpaceDocs.js +55 -0
  319. package/es/components/space/SpaceDocs.js.map +1 -0
  320. package/es/components/switch/SwitchDocs.js +2 -2
  321. package/es/components/switch/SwitchDocs.js.map +1 -1
  322. package/es/components/textarea/TextareaDocs.js +3 -3
  323. package/es/components/textarea/TextareaDocs.js.map +1 -1
  324. package/es/components/toggle-button/ToggleButtonGroupDocs.js +1 -1
  325. package/es/components/toggle-button/ToggleButtonGroupDocs.js.map +1 -1
  326. package/es/components/tooltip/TooltipDocs.js +1 -1
  327. package/es/components/tooltip/TooltipDocs.js.map +1 -1
  328. package/es/components/upload/Upload.js +6 -3
  329. package/es/components/upload/Upload.js.map +1 -1
  330. package/es/components/upload/UploadDocs.d.ts +1 -0
  331. package/es/components/upload/UploadDocs.js +42 -0
  332. package/es/components/upload/UploadDocs.js.map +1 -1
  333. package/es/components/upload/UploadFileListCell.js +32 -12
  334. package/es/components/upload/UploadFileListCell.js.map +1 -1
  335. package/es/components/upload/types.d.ts +7 -0
  336. package/es/components/upload/types.js.map +1 -1
  337. package/es/extensions/forms/DataContext/At/AtDocs.d.ts +2 -0
  338. package/es/extensions/forms/DataContext/At/AtDocs.js +18 -0
  339. package/es/extensions/forms/DataContext/At/AtDocs.js.map +1 -0
  340. package/es/extensions/forms/DataContext/Provider/ProviderDocs.js +1 -1
  341. package/es/extensions/forms/DataContext/Provider/ProviderDocs.js.map +1 -1
  342. package/es/extensions/forms/Field/Number/Number.js +3 -6
  343. package/es/extensions/forms/Field/Number/Number.js.map +1 -1
  344. package/es/extensions/forms/Field/Password/PasswordDocs.d.ts +1 -0
  345. package/es/extensions/forms/Field/Password/PasswordDocs.js +13 -1
  346. package/es/extensions/forms/Field/Password/PasswordDocs.js.map +1 -1
  347. package/es/extensions/forms/Field/PhoneNumber/PhoneNumber.d.ts +6 -4
  348. package/es/extensions/forms/Field/PhoneNumber/PhoneNumber.js +24 -16
  349. package/es/extensions/forms/Field/PhoneNumber/PhoneNumber.js.map +1 -1
  350. package/es/extensions/forms/Field/PhoneNumber/PhoneNumberDocs.d.ts +2 -2
  351. package/es/extensions/forms/Field/PhoneNumber/PhoneNumberDocs.js +7 -2
  352. package/es/extensions/forms/Field/PhoneNumber/PhoneNumberDocs.js.map +1 -1
  353. package/es/extensions/forms/Field/Provider/useFieldProvider.d.ts +3 -3
  354. package/es/extensions/forms/Field/String/StringDocs.js +1 -1
  355. package/es/extensions/forms/Field/String/StringDocs.js.map +1 -1
  356. package/es/extensions/forms/Field/Upload/Upload.d.ts +1 -1
  357. package/es/extensions/forms/Field/Upload/Upload.js +3 -1
  358. package/es/extensions/forms/Field/Upload/Upload.js.map +1 -1
  359. package/es/extensions/forms/FieldBlock/FieldBlock.js +11 -4
  360. package/es/extensions/forms/FieldBlock/FieldBlock.js.map +1 -1
  361. package/es/extensions/forms/FieldBlock/FieldBlockContext.d.ts +1 -1
  362. package/es/extensions/forms/FieldBlock/FieldBlockContext.js.map +1 -1
  363. package/es/extensions/forms/Form/ButtonRow/ButtonRowDocs.d.ts +2 -0
  364. package/es/extensions/forms/Form/ButtonRow/ButtonRowDocs.js +13 -0
  365. package/es/extensions/forms/Form/ButtonRow/ButtonRowDocs.js.map +1 -0
  366. package/es/extensions/forms/Form/Isolation/IsolationDocs.js +1 -1
  367. package/es/extensions/forms/Form/Isolation/IsolationDocs.js.map +1 -1
  368. package/es/extensions/forms/Wizard/Buttons/ButtonsDocs.d.ts +2 -0
  369. package/es/extensions/forms/Wizard/Buttons/ButtonsDocs.js +8 -0
  370. package/es/extensions/forms/Wizard/Buttons/ButtonsDocs.js.map +1 -0
  371. package/es/extensions/forms/hooks/DataValueWritePropsDocs.js +1 -1
  372. package/es/extensions/forms/hooks/DataValueWritePropsDocs.js.map +1 -1
  373. package/es/extensions/forms/hooks/useFieldProps.js +56 -19
  374. package/es/extensions/forms/hooks/useFieldProps.js.map +1 -1
  375. package/es/extensions/forms/types.d.ts +8 -5
  376. package/es/extensions/forms/types.js.map +1 -1
  377. package/es/extensions/forms/utils/FormError.d.ts +20 -16
  378. package/es/extensions/forms/utils/FormError.js +1 -0
  379. package/es/extensions/forms/utils/FormError.js.map +1 -1
  380. package/es/shared/Eufemia.d.ts +1 -1
  381. package/es/shared/Eufemia.js +2 -2
  382. package/es/shared/Eufemia.js.map +1 -1
  383. package/es/shared/helpers.d.ts +1 -0
  384. package/es/shared/helpers.js +6 -0
  385. package/es/shared/helpers.js.map +1 -1
  386. package/es/shared/locales/sv-SE.js +2 -2
  387. package/es/shared/locales/sv-SE.js.map +1 -1
  388. package/es/style/core/scopes.scss +1 -1
  389. package/es/style/dnb-ui-basis.css +1 -1
  390. package/es/style/dnb-ui-basis.min.css +1 -1
  391. package/es/style/dnb-ui-body.css +1 -1
  392. package/es/style/dnb-ui-body.min.css +1 -1
  393. package/es/style/dnb-ui-components.css +13 -0
  394. package/es/style/dnb-ui-components.min.css +1 -1
  395. package/es/style/dnb-ui-core.css +1 -1
  396. package/es/style/dnb-ui-core.min.css +1 -1
  397. package/es/style/themes/theme-eiendom/eiendom-theme-components.css +13 -0
  398. package/es/style/themes/theme-eiendom/eiendom-theme-components.min.css +1 -1
  399. package/es/style/themes/theme-sbanken/sbanken-theme-components.css +13 -0
  400. package/es/style/themes/theme-sbanken/sbanken-theme-components.min.css +1 -1
  401. package/es/style/themes/theme-ui/ui-theme-components.css +13 -0
  402. package/es/style/themes/theme-ui/ui-theme-components.min.css +1 -1
  403. package/esm/dnb-ui-basis.min.mjs +1 -1
  404. package/esm/dnb-ui-components.min.mjs +1 -1
  405. package/esm/dnb-ui-elements.min.mjs +1 -1
  406. package/esm/dnb-ui-extensions.min.mjs +1 -1
  407. package/esm/dnb-ui-lib.min.mjs +1 -1
  408. package/extensions/forms/DataContext/At/AtDocs.d.ts +2 -0
  409. package/extensions/forms/DataContext/At/AtDocs.js +18 -0
  410. package/extensions/forms/DataContext/At/AtDocs.js.map +1 -0
  411. package/extensions/forms/DataContext/Provider/ProviderDocs.js +1 -1
  412. package/extensions/forms/DataContext/Provider/ProviderDocs.js.map +1 -1
  413. package/extensions/forms/Field/Number/Number.js +3 -6
  414. package/extensions/forms/Field/Number/Number.js.map +1 -1
  415. package/extensions/forms/Field/Password/PasswordDocs.d.ts +1 -0
  416. package/extensions/forms/Field/Password/PasswordDocs.js +13 -1
  417. package/extensions/forms/Field/Password/PasswordDocs.js.map +1 -1
  418. package/extensions/forms/Field/PhoneNumber/PhoneNumber.d.ts +6 -4
  419. package/extensions/forms/Field/PhoneNumber/PhoneNumber.js +33 -25
  420. package/extensions/forms/Field/PhoneNumber/PhoneNumber.js.map +1 -1
  421. package/extensions/forms/Field/PhoneNumber/PhoneNumberDocs.d.ts +2 -2
  422. package/extensions/forms/Field/PhoneNumber/PhoneNumberDocs.js +7 -2
  423. package/extensions/forms/Field/PhoneNumber/PhoneNumberDocs.js.map +1 -1
  424. package/extensions/forms/Field/Provider/useFieldProvider.d.ts +3 -3
  425. package/extensions/forms/Field/String/StringDocs.js +1 -1
  426. package/extensions/forms/Field/String/StringDocs.js.map +1 -1
  427. package/extensions/forms/Field/Upload/Upload.d.ts +1 -1
  428. package/extensions/forms/Field/Upload/Upload.js +3 -1
  429. package/extensions/forms/Field/Upload/Upload.js.map +1 -1
  430. package/extensions/forms/FieldBlock/FieldBlock.js +11 -4
  431. package/extensions/forms/FieldBlock/FieldBlock.js.map +1 -1
  432. package/extensions/forms/FieldBlock/FieldBlockContext.d.ts +1 -1
  433. package/extensions/forms/FieldBlock/FieldBlockContext.js.map +1 -1
  434. package/extensions/forms/Form/ButtonRow/ButtonRowDocs.d.ts +2 -0
  435. package/extensions/forms/Form/ButtonRow/ButtonRowDocs.js +13 -0
  436. package/extensions/forms/Form/ButtonRow/ButtonRowDocs.js.map +1 -0
  437. package/extensions/forms/Form/Isolation/IsolationDocs.js +1 -1
  438. package/extensions/forms/Form/Isolation/IsolationDocs.js.map +1 -1
  439. package/extensions/forms/Wizard/Buttons/ButtonsDocs.d.ts +2 -0
  440. package/extensions/forms/Wizard/Buttons/ButtonsDocs.js +8 -0
  441. package/extensions/forms/Wizard/Buttons/ButtonsDocs.js.map +1 -0
  442. package/extensions/forms/hooks/DataValueWritePropsDocs.js +1 -1
  443. package/extensions/forms/hooks/DataValueWritePropsDocs.js.map +1 -1
  444. package/extensions/forms/hooks/useFieldProps.js +56 -19
  445. package/extensions/forms/hooks/useFieldProps.js.map +1 -1
  446. package/extensions/forms/types.d.ts +8 -5
  447. package/extensions/forms/types.js.map +1 -1
  448. package/extensions/forms/utils/FormError.d.ts +20 -16
  449. package/extensions/forms/utils/FormError.js.map +1 -1
  450. package/package.json +1 -1
  451. package/shared/Eufemia.d.ts +1 -1
  452. package/shared/Eufemia.js +2 -2
  453. package/shared/Eufemia.js.map +1 -1
  454. package/shared/helpers.d.ts +1 -0
  455. package/shared/helpers.js +6 -0
  456. package/shared/helpers.js.map +1 -1
  457. package/shared/locales/sv-SE.js +2 -2
  458. package/shared/locales/sv-SE.js.map +1 -1
  459. package/style/core/scopes.scss +1 -1
  460. package/style/dnb-ui-basis.css +1 -1
  461. package/style/dnb-ui-basis.min.css +1 -1
  462. package/style/dnb-ui-body.css +1 -1
  463. package/style/dnb-ui-body.min.css +1 -1
  464. package/style/dnb-ui-components.css +13 -0
  465. package/style/dnb-ui-components.min.css +1 -1
  466. package/style/dnb-ui-core.css +1 -1
  467. package/style/dnb-ui-core.min.css +1 -1
  468. package/style/themes/theme-eiendom/eiendom-theme-components.css +13 -0
  469. package/style/themes/theme-eiendom/eiendom-theme-components.min.css +1 -1
  470. package/style/themes/theme-sbanken/sbanken-theme-components.css +13 -0
  471. package/style/themes/theme-sbanken/sbanken-theme-components.min.css +1 -1
  472. package/style/themes/theme-ui/ui-theme-components.css +13 -0
  473. package/style/themes/theme-ui/ui-theme-components.min.css +1 -1
  474. package/umd/dnb-ui-basis.min.js +1 -1
  475. package/umd/dnb-ui-components.min.js +1 -1
  476. package/umd/dnb-ui-elements.min.js +1 -1
  477. package/umd/dnb-ui-extensions.min.js +1 -1
  478. package/umd/dnb-ui-lib.min.js +1 -1
@@ -91,12 +91,12 @@ export const SliderProperties = {
91
91
  },
92
92
  status: {
93
93
  doc: 'Text with a status message. The style defaults to an error message. You can use `true` to only get the status color, without a message.',
94
- type: 'string',
94
+ type: ['error', 'info', 'boolean'],
95
95
  status: 'optional'
96
96
  },
97
97
  statusState: {
98
98
  doc: 'Defines the state of the status. Currently, there are two statuses `[error, info]`. Defaults to `error`.',
99
- type: 'string',
99
+ type: ['error', 'info'],
100
100
  status: 'optional'
101
101
  },
102
102
  statusProps: {
@@ -1 +1 @@
1
- {"version":3,"file":"SliderDocs.js","names":["SliderProperties","value","doc","type","status","min","max","step","vertical","reverse","stretch","hideButtons","multiThumbBehavior","thumbTitle","subtractTitle","addTitle","numberFormat","tooltip","alwaysShowTooltip","label","labelDirection","labelSrOnly","statusState","statusProps","globalStatusId","suffix","skeleton","extensions","SliderEvents","onChange","onDragStart","onDragEnd"],"sources":["../../../../src/components/slider/SliderDocs.ts"],"sourcesContent":["import { PropertiesTableProps } from '../../shared/types'\n\nexport const SliderProperties: PropertiesTableProps = {\n value: {\n doc: 'The `value` of the slider as a number or an array. If an array with numbers is provided, each number will represent a thumb button (the `+` and `-` button will be hidden on multiple thumbs).',\n type: ['number', 'Array<number>'],\n status: 'required',\n },\n min: {\n doc: 'The minimum value. Can be a negative number as well. Defaults to `0`.',\n type: 'number',\n status: 'optional',\n },\n max: {\n doc: 'The maximum value. Defaults to `100`.',\n type: 'number',\n status: 'optional',\n },\n step: {\n doc: 'The steps the slider takes on changing the value. Defaults to `null`.',\n type: 'number',\n status: 'optional',\n },\n vertical: {\n doc: 'Show the slider vertically. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n reverse: {\n doc: 'Show the slider reversed. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n stretch: {\n doc: 'If set to `true`, then the slider will be 100% in `width`.',\n type: 'boolean',\n status: 'optional',\n },\n hideButtons: {\n doc: 'Removes the helper buttons. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n multiThumbBehavior: {\n doc: 'Use either `omit`, `push` or `swap`. This property only works for two (range) or more thumb buttons, while `omit` will stop the thumb from swapping, `push` will push its nearest thumb along. Defaults to `swap`.',\n type: 'string',\n status: 'optional',\n },\n thumbTitle: {\n doc: 'Give the slider thumb button a title for accessibility reasons. Defaults to `null`.',\n type: 'string',\n status: 'optional',\n },\n subtractTitle: {\n doc: 'Give the subtract button a title for accessibility reasons. Defaults to `Decrease (%s)`.',\n type: 'string',\n status: 'optional',\n },\n addTitle: {\n doc: 'Give the add button a title for accessibility reasons. Defaults to `Increase (%s)`.',\n type: 'string',\n status: 'optional',\n },\n numberFormat: {\n doc: 'Will extend the return object with a `number` property (from `onChange` event). You can use all the options from the [NumberFormat](/uilib/components/number-format/properties) component. It also will use that formatted number in the increase/decrease buttons. If it has to represent a currency, then use e.g. `numberFormat={{ currency: true, decimals: 0 }}`',\n type: 'object',\n status: 'optional',\n },\n tooltip: {\n doc: 'Use `true` to show a tooltip on `mouseOver`, `touchStart` and `focus`, showing the current number (if `numberFormat` is given) or the raw value.',\n type: 'boolean',\n status: 'optional',\n },\n alwaysShowTooltip: {\n doc: 'Use `true` to always show the tooltip, in addition to the `tooltip` property.',\n type: 'boolean',\n status: 'optional',\n },\n label: {\n doc: 'Prepends the Form Label component. If no ID is provided, a random ID is created.',\n type: 'string',\n status: 'optional',\n },\n labelDirection: {\n doc: 'Use `labelDirection=\"vertical\"` to change the label layout direction. Defaults to `horizontal`.',\n type: 'string',\n status: 'optional',\n },\n labelSrOnly: {\n doc: 'Use `true` to make the label only readable by screen readers.',\n type: 'boolean',\n status: 'optional',\n },\n status: {\n doc: 'Text with a status message. The style defaults to an error message. You can use `true` to only get the status color, without a message.',\n type: 'string',\n status: 'optional',\n },\n statusState: {\n doc: 'Defines the state of the status. Currently, there are two statuses `[error, info]`. Defaults to `error`.',\n type: 'string',\n status: 'optional',\n },\n statusProps: {\n doc: 'Use an object to define additional FormStatus properties.',\n type: 'object',\n status: 'optional',\n },\n globalStatusId: {\n doc: 'The `status_id` used for the target [GlobalStatus](/uilib/components/global-status).',\n type: 'string',\n status: 'optional',\n },\n suffix: {\n doc: 'Text describing the content of the Slider more than the label. You can also send in a React component, so it gets wrapped inside the Slider component.',\n type: 'string',\n status: 'optional',\n },\n skeleton: {\n doc: 'If set to `true`, an overlaying skeleton with animation will be shown.',\n type: 'boolean',\n status: 'optional',\n },\n extensions: {\n doc: 'Makes it possible to display overlays with other functionality such as a marker on the slider marking a given value.',\n type: 'object',\n status: 'optional',\n },\n '[Space](/uilib/layout/space/properties)': {\n doc: 'Spacing properties like `top` or `bottom` are supported.',\n type: ['string', 'object'],\n status: 'optional',\n },\n}\n\nexport const SliderEvents: PropertiesTableProps = {\n onChange: {\n doc: 'will be called on state changes made by the user. The callback `value` and `rawValue` is a number `{ value, rawValue, event }`. But if the prop `numberFormat` is given, then it will return an additional `number` with the given format `{ value, number, rawValue, event }`.',\n type: 'function',\n status: 'optional',\n },\n onDragStart: {\n doc: 'will be called once the user stops dragging. Returns `{ event }`.',\n type: 'function',\n status: 'optional',\n },\n onDragEnd: {\n doc: 'will be called once the user starts dragging. Returns `{ event }`.',\n type: 'function',\n status: 'optional',\n },\n}\n"],"mappings":"AAEA,OAAO,MAAMA,gBAAsC,GAAG;EACpDC,KAAK,EAAE;IACLC,GAAG,EAAE,gMAAgM;IACrMC,IAAI,EAAE,CAAC,QAAQ,EAAE,eAAe,CAAC;IACjCC,MAAM,EAAE;EACV,CAAC;EACDC,GAAG,EAAE;IACHH,GAAG,EAAE,uEAAuE;IAC5EC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDE,GAAG,EAAE;IACHJ,GAAG,EAAE,uCAAuC;IAC5CC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDG,IAAI,EAAE;IACJL,GAAG,EAAE,uEAAuE;IAC5EC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDI,QAAQ,EAAE;IACRN,GAAG,EAAE,kDAAkD;IACvDC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDK,OAAO,EAAE;IACPP,GAAG,EAAE,gDAAgD;IACrDC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EAC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.js","names":["SliderProperties","value","doc","type","status","min","max","step","vertical","reverse","stretch","hideButtons","multiThumbBehavior","thumbTitle","subtractTitle","addTitle","numberFormat","tooltip","alwaysShowTooltip","label","labelDirection","labelSrOnly","statusState","statusProps","globalStatusId","suffix","skeleton","extensions","SliderEvents","onChange","onDragStart","onDragEnd"],"sources":["../../../../src/components/slider/SliderDocs.ts"],"sourcesContent":["import { PropertiesTableProps } from '../../shared/types'\n\nexport const SliderProperties: PropertiesTableProps = {\n value: {\n doc: 'The `value` of the slider as a number or an array. If an array with numbers is provided, each number will represent a thumb button (the `+` and `-` button will be hidden on multiple thumbs).',\n type: ['number', 'Array<number>'],\n status: 'required',\n },\n min: {\n doc: 'The minimum value. Can be a negative number as well. Defaults to `0`.',\n type: 'number',\n status: 'optional',\n },\n max: {\n doc: 'The maximum value. Defaults to `100`.',\n type: 'number',\n status: 'optional',\n },\n step: {\n doc: 'The steps the slider takes on changing the value. Defaults to `null`.',\n type: 'number',\n status: 'optional',\n },\n vertical: {\n doc: 'Show the slider vertically. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n reverse: {\n doc: 'Show the slider reversed. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n stretch: {\n doc: 'If set to `true`, then the slider will be 100% in `width`.',\n type: 'boolean',\n status: 'optional',\n },\n hideButtons: {\n doc: 'Removes the helper buttons. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n multiThumbBehavior: {\n doc: 'Use either `omit`, `push` or `swap`. This property only works for two (range) or more thumb buttons, while `omit` will stop the thumb from swapping, `push` will push its nearest thumb along. Defaults to `swap`.',\n type: 'string',\n status: 'optional',\n },\n thumbTitle: {\n doc: 'Give the slider thumb button a title for accessibility reasons. Defaults to `null`.',\n type: 'string',\n status: 'optional',\n },\n subtractTitle: {\n doc: 'Give the subtract button a title for accessibility reasons. Defaults to `Decrease (%s)`.',\n type: 'string',\n status: 'optional',\n },\n addTitle: {\n doc: 'Give the add button a title for accessibility reasons. Defaults to `Increase (%s)`.',\n type: 'string',\n status: 'optional',\n },\n numberFormat: {\n doc: 'Will extend the return object with a `number` property (from `onChange` event). You can use all the options from the [NumberFormat](/uilib/components/number-format/properties) component. It also will use that formatted number in the increase/decrease buttons. If it has to represent a currency, then use e.g. `numberFormat={{ currency: true, decimals: 0 }}`',\n type: 'object',\n status: 'optional',\n },\n tooltip: {\n doc: 'Use `true` to show a tooltip on `mouseOver`, `touchStart` and `focus`, showing the current number (if `numberFormat` is given) or the raw value.',\n type: 'boolean',\n status: 'optional',\n },\n alwaysShowTooltip: {\n doc: 'Use `true` to always show the tooltip, in addition to the `tooltip` property.',\n type: 'boolean',\n status: 'optional',\n },\n label: {\n doc: 'Prepends the Form Label component. If no ID is provided, a random ID is created.',\n type: 'string',\n status: 'optional',\n },\n labelDirection: {\n doc: 'Use `labelDirection=\"vertical\"` to change the label layout direction. Defaults to `horizontal`.',\n type: 'string',\n status: 'optional',\n },\n labelSrOnly: {\n doc: 'Use `true` to make the label only readable by screen readers.',\n type: 'boolean',\n status: 'optional',\n },\n status: {\n doc: 'Text with a status message. The style defaults to an error message. You can use `true` to only get the status color, without a message.',\n type: ['error', 'info', 'boolean'],\n status: 'optional',\n },\n statusState: {\n doc: 'Defines the state of the status. Currently, there are two statuses `[error, info]`. Defaults to `error`.',\n type: ['error', 'info'],\n status: 'optional',\n },\n statusProps: {\n doc: 'Use an object to define additional FormStatus properties.',\n type: 'object',\n status: 'optional',\n },\n globalStatusId: {\n doc: 'The `status_id` used for the target [GlobalStatus](/uilib/components/global-status).',\n type: 'string',\n status: 'optional',\n },\n suffix: {\n doc: 'Text describing the content of the Slider more than the label. You can also send in a React component, so it gets wrapped inside the Slider component.',\n type: 'string',\n status: 'optional',\n },\n skeleton: {\n doc: 'If set to `true`, an overlaying skeleton with animation will be shown.',\n type: 'boolean',\n status: 'optional',\n },\n extensions: {\n doc: 'Makes it possible to display overlays with other functionality such as a marker on the slider marking a given value.',\n type: 'object',\n status: 'optional',\n },\n '[Space](/uilib/layout/space/properties)': {\n doc: 'Spacing properties like `top` or `bottom` are supported.',\n type: ['string', 'object'],\n status: 'optional',\n },\n}\n\nexport const SliderEvents: PropertiesTableProps = {\n onChange: {\n doc: 'will be called on state changes made by the user. The callback `value` and `rawValue` is a number `{ value, rawValue, event }`. But if the prop `numberFormat` is given, then it will return an additional `number` with the given format `{ value, number, rawValue, event }`.',\n type: 'function',\n status: 'optional',\n },\n onDragStart: {\n doc: 'will be called once the user stops dragging. Returns `{ event }`.',\n type: 'function',\n status: 'optional',\n },\n onDragEnd: {\n doc: 'will be called once the user starts dragging. Returns `{ event }`.',\n type: 'function',\n status: 'optional',\n },\n}\n"],"mappings":"AAEA,OAAO,MAAMA,gBAAsC,GAAG;EACpDC,KAAK,EAAE;IACLC,GAAG,EAAE,gMAAgM;IACrMC,IAAI,EAAE,CAAC,QAAQ,EAAE,eAAe,CAAC;IACjCC,MAAM,EAAE;EACV,CAAC;EACDC,GAAG,EAAE;IACHH,GAAG,EAAE,uEAAuE;IAC5EC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDE,GAAG,EAAE;IACHJ,GAAG,EAAE,uCAAuC;IAC5CC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDG,IAAI,EAAE;IACJL,GAAG,EAAE,uEAAuE;IAC5EC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDI,QAAQ,EAAE;IACRN,GAAG,EAAE,kDAAkD;IACvDC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDK,OAAO,EAAE;IACPP,GAAG,EAAE,gDAAgD;IACrDC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDM,OAAO,EAAE;IACPR,GAAG,EAAE,4DAA4D;IACjEC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDO,WAAW,EAAE;IACXT,GAAG,EAAE,kDA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E;IACXpB,GAAG,EAAE,0GAA0G;IAC/GC,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;IACvBC,MAAM,EAAE;EACV,CAAC;EACDmB,WAAW,EAAE;IACXrB,GAAG,EAAE,2DAA2D;IAChEC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDoB,cAAc,EAAE;IACdtB,GAAG,EAAE,sFAAsF;IAC3FC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDqB,MAAM,EAAE;IACNvB,GAAG,EAAE,wJAAwJ;IAC7JC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDsB,QAAQ,EAAE;IACRxB,GAAG,EAAE,wEAAwE;IAC7EC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDuB,UAAU,EAAE;IACVzB,GAAG,EAAE,sHAAsH;IAC3HC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACD,yCAAyC,EAAE;IACzCF,GAAG,EAAE,0DAA0D;IAC/DC,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC1BC,MAAM,EAAE;EACV;AACF,CAAC;AAED,OAAO,MAAMwB,YAAkC,GAAG;EAChDC,QAAQ,EAAE;IACR3B,GAAG,EAAE,iRAAiR;IACtRC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACD0B,WAAW,EAAE;IACX5B,GAAG,EAAE,mEAAmE;IACxEC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACD2B,SAAS,EAAE;IACT7B,GAAG,EAAE,oEAAoE;IACzEC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV;AACF,CAAC","ignoreList":[]}
@@ -0,0 +1,3 @@
1
+ import { PropertiesTableProps } from '../../shared/types';
2
+ export declare const SpaceGlobalProperties: PropertiesTableProps;
3
+ export declare const SpaceProperties: PropertiesTableProps;
@@ -0,0 +1,55 @@
1
+ export const SpaceGlobalProperties = {
2
+ space: {
3
+ doc: 'Has to be an object with either: `top`, `right`, `bottom` or `left`. Use spacing values like: `small`, `1rem`, `1` or , `16px`.',
4
+ type: ['object'],
5
+ status: 'optional'
6
+ },
7
+ top: {
8
+ doc: 'Use spacing values like: `small`, `1rem`, `1` or , `16px`. Will use `margin-top`.',
9
+ type: ['string', 'number', 'boolean'],
10
+ status: 'optional'
11
+ },
12
+ right: {
13
+ doc: 'Use spacing values like: `small`, `1rem`, `1` or , `16px`. will use `margin-right`.',
14
+ type: ['string', 'number', 'boolean'],
15
+ status: 'optional'
16
+ },
17
+ bottom: {
18
+ doc: 'Use spacing values like: `small`, `1rem`, `1` or , `16px`. will use `margin-bottom`.',
19
+ type: ['string', 'number', 'boolean'],
20
+ status: 'optional'
21
+ },
22
+ left: {
23
+ doc: 'Use spacing values like: `small`, `1rem`, `1` or , `16px`. will use `margin-left`.',
24
+ type: ['string', 'number', 'boolean'],
25
+ status: 'optional'
26
+ }
27
+ };
28
+ export const SpaceProperties = {
29
+ element: {
30
+ doc: 'defines the HTML element used. Defaults to `div`.',
31
+ type: 'React.Element',
32
+ status: 'optional'
33
+ },
34
+ stretch: {
35
+ doc: 'if set to `true`, then the space element will be 100% in width.',
36
+ type: 'boolean',
37
+ status: 'optional'
38
+ },
39
+ inline: {
40
+ doc: 'if set to `true`, then `display: inline-block;` is used, so the HTML elements get aligned horizontally. Defaults to `false`.',
41
+ type: 'boolean',
42
+ status: 'optional'
43
+ },
44
+ innerSpace: {
45
+ doc: "Will add a padding around the content. Supports also media query breakpoints like `{small: { top: 'medium' }}`.",
46
+ type: ['object', 'string', 'number', 'boolean'],
47
+ status: 'optional'
48
+ },
49
+ no_collapse: {
50
+ doc: "if set to `true`, then a wrapper with `display: flow-root;` is used. This way you avoid **Margin Collapsing**. Defaults to `false`. _Note:_ You can't use `inline={true}` in combination.",
51
+ type: 'boolean',
52
+ status: 'optional'
53
+ }
54
+ };
55
+ //# sourceMappingURL=SpaceDocs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SpaceDocs.js","names":["SpaceGlobalProperties","space","doc","type","status","top","right","bottom","left","SpaceProperties","element","stretch","inline","innerSpace","no_collapse"],"sources":["../../../../src/components/space/SpaceDocs.ts"],"sourcesContent":["import { PropertiesTableProps } from '../../shared/types'\n\nexport const SpaceGlobalProperties: PropertiesTableProps = {\n space: {\n doc: 'Has to be an object with either: `top`, `right`, `bottom` or `left`. Use spacing values like: `small`, `1rem`, `1` or , `16px`.',\n type: ['object'],\n status: 'optional',\n },\n top: {\n doc: 'Use spacing values like: `small`, `1rem`, `1` or , `16px`. Will use `margin-top`.',\n type: ['string', 'number', 'boolean'],\n status: 'optional',\n },\n right: {\n doc: 'Use spacing values like: `small`, `1rem`, `1` or , `16px`. will use `margin-right`.',\n type: ['string', 'number', 'boolean'],\n status: 'optional',\n },\n bottom: {\n doc: 'Use spacing values like: `small`, `1rem`, `1` or , `16px`. will use `margin-bottom`.',\n type: ['string', 'number', 'boolean'],\n status: 'optional',\n },\n left: {\n doc: 'Use spacing values like: `small`, `1rem`, `1` or , `16px`. will use `margin-left`.',\n type: ['string', 'number', 'boolean'],\n status: 'optional',\n },\n}\n\nexport const SpaceProperties: PropertiesTableProps = {\n element: {\n doc: 'defines the HTML element used. Defaults to `div`.',\n type: 'React.Element',\n status: 'optional',\n },\n stretch: {\n doc: 'if set to `true`, then the space element will be 100% in width.',\n type: 'boolean',\n status: 'optional',\n },\n inline: {\n doc: 'if set to `true`, then `display: inline-block;` is used, so the HTML elements get aligned horizontally. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n innerSpace: {\n doc: \"Will add a padding around the content. Supports also media query breakpoints like `{small: { top: 'medium' }}`.\",\n type: ['object', 'string', 'number', 'boolean'],\n status: 'optional',\n },\n no_collapse: {\n doc: \"if set to `true`, then a wrapper with `display: flow-root;` is used. This way you avoid **Margin Collapsing**. Defaults to `false`. _Note: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CC,MAAM,EAAE;EACV,CAAC;EACDU,WAAW,EAAE;IACXZ,GAAG,EAAE,2LAA2L;IAChMC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV;AACF,CAAC","ignoreList":[]}
@@ -31,7 +31,7 @@ export const SwitchProperties = {
31
31
  },
32
32
  status: {
33
33
  doc: 'Text with a status message. The style defaults to an error message. You can use `true` to only get the status color, without a message.',
34
- type: 'ReactNode',
34
+ type: ['error', 'info', 'boolean'],
35
35
  status: 'optional'
36
36
  },
37
37
  statusState: {
@@ -61,7 +61,7 @@ export const SwitchProperties = {
61
61
  },
62
62
  innerRef: {
63
63
  doc: 'By providing a React.ref we can get the internally used input element (DOM). E.g. `innerRef={myRef}` by using `React.createRef()` or `React.useRef()`.',
64
- type: 'string',
64
+ type: 'React.RefObject',
65
65
  status: 'optional'
66
66
  },
67
67
  '[Space](/uilib/layout/space/properties)': {
@@ -1 +1 @@
1
- {"version":3,"file":"SwitchDocs.js","names":["SwitchProperties","checked","doc","type","status","title","label","labelPosition","labelSrOnly","size","statusState","statusProps","globalStatus","suffix","skeleton","innerRef","SwitchEvents","onChange","onChangeEnd"],"sources":["../../../../src/components/switch/SwitchDocs.ts"],"sourcesContent":["import { PropertiesTableProps } from '../../shared/types'\n\nexport const SwitchProperties: PropertiesTableProps = {\n checked: {\n doc: 'Determine whether the switch is checked or not. The default will be `false`.',\n type: 'boolean',\n status: 'optional',\n },\n title: {\n doc: 'The `title` of the input - describing it a bit further for accessibility reasons.',\n type: 'string',\n status: 'required',\n },\n label: {\n doc: 'Use either the `label` property or provide a custom one.',\n type: 'ReactNode',\n status: 'optional',\n },\n labelPosition: {\n doc: 'Defines the position of the `label`. Use either `left` or `right`. Defaults to `right`.',\n type: ['left', 'right'],\n status: 'optional',\n },\n labelSrOnly: {\n doc: 'Use `true` to make the label only readable by screen readers.',\n type: 'string',\n status: 'optional',\n },\n size: {\n doc: 'The size of the switch. For now there is **medium** (default) and **large**.',\n type: ['default', 'medium', 'large'],\n status: 'optional',\n },\n status: {\n doc: 'Text with a status message. The style defaults to an error message. You can use `true` to only get the status color, without a message.',\n type: 'ReactNode',\n status: 'optional',\n },\n statusState: {\n doc: 'Defines the state of the status. Defaults to `error`.',\n type: ['error', 'warn', 'info', 'success', 'marketing'],\n status: 'optional',\n },\n statusProps: {\n doc: 'Use an object to define additional [FormStatus](/uilib/components/form-status/properties/) properties.',\n type: 'FormStatus',\n status: 'optional',\n },\n globalStatus: {\n doc: 'The [configuration](/uilib/components/global-status/properties/#configuration-object) used for the target [GlobalStatus](/uilib/components/global-status).',\n type: 'GlobalStatus',\n status: 'optional',\n },\n suffix: {\n doc: 'Text describing the content of the Switch more than the label. You can also send in a React component, so it gets wrapped inside the Switch component.',\n type: 'ReactNode',\n status: 'optional',\n },\n skeleton: {\n doc: 'If set to `true`, an overlaying skeleton with animation will be shown.',\n type: 'boolean',\n status: 'optional',\n },\n innerRef: {\n doc: 'By providing a React.ref we can get the internally used input element (DOM). E.g. `innerRef={myRef}` by using `React.createRef()` or `React.useRef()`.',\n type: 'string',\n status: 'optional',\n },\n '[Space](/uilib/layout/space/properties)': {\n doc: 'Spacing properties like `top` or `bottom` are supported.',\n type: ['string', 'object'],\n status: 'optional',\n },\n}\n\nexport const SwitchEvents: PropertiesTableProps = {\n onChange: {\n doc: 'Will be called on state changes made by the user.',\n type: '() => {checked: boolean; event: ChangeEvent}',\n status: 'optional',\n },\n onChangeEnd: {\n doc: 'Will be called on state changes made by the user, but with a delay. This way the user sees the animation before e.g. an error will be removed. Returns a boolean { checked, event }.',\n type: '() => {checked: boolean; event: ChangeEvent}',\n status: 'optional',\n },\n}\n"],"mappings":"AAEA,OAAO,MAAMA,gBAAsC,GAAG;EACpDC,OAAO,EAAE;IACPC,GAAG,EAAE,8EAA8E;IACnFC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDC,KAAK,EAAE;IACLH,GAAG,EAAE,mFAAmF;IACxFC,IAAI,EAAE,QAAQ;I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Q;IACdC,MAAM,EAAE;EACV,CAAC;EACD,yCAAyC,EAAE;IACzCF,GAAG,EAAE,0DAA0D;IAC/DC,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC1BC,MAAM,EAAE;EACV;AACF,CAAC;AAED,OAAO,MAAMY,YAAkC,GAAG;EAChDC,QAAQ,EAAE;IACRf,GAAG,EAAE,mDAAmD;IACxDC,IAAI,EAAE,8CAA8C;IACpDC,MAAM,EAAE;EACV,CAAC;EACDc,WAAW,EAAE;IACXhB,GAAG,EAAE,sLAAsL;IAC3LC,IAAI,EAAE,8CAA8C;IACpDC,MAAM,EAAE;EACV;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"SwitchDocs.js","names":["SwitchProperties","checked","doc","type","status","title","label","labelPosition","labelSrOnly","size","statusState","statusProps","globalStatus","suffix","skeleton","innerRef","SwitchEvents","onChange","onChangeEnd"],"sources":["../../../../src/components/switch/SwitchDocs.ts"],"sourcesContent":["import { PropertiesTableProps } from '../../shared/types'\n\nexport const SwitchProperties: PropertiesTableProps = {\n checked: {\n doc: 'Determine whether the switch is checked or not. The default will be `false`.',\n type: 'boolean',\n status: 'optional',\n },\n title: {\n doc: 'The `title` of the input - describing it a bit further for accessibility reasons.',\n type: 'string',\n status: 'required',\n },\n label: {\n doc: 'Use either the `label` property or provide a custom one.',\n type: 'ReactNode',\n status: 'optional',\n },\n labelPosition: {\n doc: 'Defines the position of the `label`. Use either `left` or `right`. Defaults to `right`.',\n type: ['left', 'right'],\n status: 'optional',\n },\n labelSrOnly: {\n doc: 'Use `true` to make the label only readable by screen readers.',\n type: 'string',\n status: 'optional',\n },\n size: {\n doc: 'The size of the switch. For now there is **medium** (default) and **large**.',\n type: ['default', 'medium', 'large'],\n status: 'optional',\n },\n status: {\n doc: 'Text with a status message. The style defaults to an error message. You can use `true` to only get the status color, without a message.',\n type: ['error', 'info', 'boolean'],\n status: 'optional',\n },\n statusState: {\n doc: 'Defines the state of the status. Defaults to `error`.',\n type: ['error', 'warn', 'info', 'success', 'marketing'],\n status: 'optional',\n },\n statusProps: {\n doc: 'Use an object to define additional [FormStatus](/uilib/components/form-status/properties/) properties.',\n type: 'FormStatus',\n status: 'optional',\n },\n globalStatus: {\n doc: 'The [configuration](/uilib/components/global-status/properties/#configuration-object) used for the target [GlobalStatus](/uilib/components/global-status).',\n type: 'GlobalStatus',\n status: 'optional',\n },\n suffix: {\n doc: 'Text describing the content of the Switch more than the label. You can also send in a React component, so it gets wrapped inside the Switch component.',\n type: 'ReactNode',\n status: 'optional',\n },\n skeleton: {\n doc: 'If set to `true`, an overlaying skeleton with animation will be shown.',\n type: 'boolean',\n status: 'optional',\n },\n innerRef: {\n doc: 'By providing a React.ref we can get the internally used input element (DOM). E.g. `innerRef={myRef}` by using `React.createRef()` or `React.useRef()`.',\n type: 'React.RefObject',\n status: 'optional',\n },\n '[Space](/uilib/layout/space/properties)': {\n doc: 'Spacing properties like `top` or `bottom` are supported.',\n type: ['string', 'object'],\n status: 'optional',\n },\n}\n\nexport const SwitchEvents: PropertiesTableProps = {\n onChange: {\n doc: 'Will be called on state changes made by the user.',\n type: '() => {checked: boolean; event: ChangeEvent}',\n status: 'optional',\n },\n onChangeEnd: {\n doc: 'Will be called on state changes made by the user, but with a delay. This way the user sees the animation before e.g. an error will be removed. Returns a boolean { checked, event }.',\n type: '() => {checked: boolean; event: ChangeEvent}',\n status: 'optional',\n },\n}\n"],"mappings":"AAEA,OAAO,MAAMA,gBAAsC,GAAG;EACpDC,OAAO,EAAE;IACPC,GAAG,EAAE,8EAA8E;IACnFC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDC,KAAK,EAAE;IACLH,GAAG,EAAE,mFAAmF;IACxFC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDE,KAAK,EAAE;IACLJ,GAAG,EAAE,0DAA0D;IAC/DC,IAAI,EAAE,WAAW;IACjBC,MAAM,EAAE;EACV,CAAC;E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,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC1BC,MAAM,EAAE;EACV;AACF,CAAC;AAED,OAAO,MAAMY,YAAkC,GAAG;EAChDC,QAAQ,EAAE;IACRf,GAAG,EAAE,mDAAmD;IACxDC,IAAI,EAAE,8CAA8C;IACpDC,MAAM,EAAE;EACV,CAAC;EACDc,WAAW,EAAE;IACXhB,GAAG,EAAE,sLAAsL;IAC3LC,IAAI,EAAE,8CAA8C;IACpDC,MAAM,EAAE;EACV;AACF,CAAC","ignoreList":[]}
@@ -66,12 +66,12 @@ export const textareaProperties = {
66
66
  },
67
67
  status: {
68
68
  doc: 'Text with a status message. The style defaults to an error message. You can use `true` to only get the status color, without a message.',
69
- type: ['string', 'boolean'],
69
+ type: ['error', 'info', 'boolean'],
70
70
  status: 'optional'
71
71
  },
72
72
  status_state: {
73
73
  doc: 'Defines the state of the status. Currently, there are two statuses `[error, info]`. Defaults to `error`.',
74
- type: 'string',
74
+ type: ['error', 'info'],
75
75
  status: 'optional'
76
76
  },
77
77
  status_props: {
@@ -91,7 +91,7 @@ export const textareaProperties = {
91
91
  },
92
92
  inner_ref: {
93
93
  doc: 'By providing a React.Ref we can get the internally used Textarea element (DOM). E.g. `inner_ref={myRef}` by using `React.createRef()` or `React.useRef()`.',
94
- type: 'React.Ref',
94
+ type: 'React.RefObject',
95
95
  status: 'optional'
96
96
  },
97
97
  skeleton: {
@@ -1 +1 @@
1
- {"version":3,"file":"TextareaDocs.js","names":["textareaProperties","value","doc","type","status","align","stretch","placeholder","keepPlaceholder","label","label_direction","suffix","label_sr_only","autoresize","autoresize_max_rows","characterCounter","size","status_state","status_props","globalStatus","textarea_state","inner_ref","skeleton","textareaEvents","on_change","on_focus","on_blur","on_key_down"],"sources":["../../../../src/components/textarea/TextareaDocs.ts"],"sourcesContent":["import { PropertiesTableProps } from '../../shared/types'\n\nexport const textareaProperties: PropertiesTableProps = {\n value: {\n doc: 'The content value of the Textarea.',\n type: 'string',\n status: 'optional',\n },\n align: {\n doc: 'Defines the `text-align` of the Textarea. Defaults to `left`.',\n type: 'string',\n status: 'optional',\n },\n stretch: {\n doc: 'If set to `true`, then the Textarea field will be 100% in `width`.',\n type: 'boolean',\n status: 'optional',\n },\n placeholder: {\n doc: 'The placeholder which shows up once the Textarea value is empty.',\n type: 'string',\n status: 'optional',\n },\n keepPlaceholder: {\n doc: 'Use `true` to keep the placeholder visible even when the Textarea has focus. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n label: {\n doc: 'Prepends the Form Label component. If no ID is provided, a random ID is created.',\n type: 'string',\n status: 'optional',\n },\n label_direction: {\n doc: 'Use `label_direction=\"vertical\"` to change the label layout direction. Defaults to `horizontal`.',\n type: 'string',\n status: 'optional',\n },\n suffix: {\n doc: 'Text describing the content of the Textarea more than the label. You can also send in a React component, so it gets wrapped inside the Textarea component.',\n type: 'string',\n status: 'optional',\n },\n label_sr_only: {\n doc: 'Use `true` to make the label only readable by screen readers.',\n type: 'boolean',\n status: 'optional',\n },\n autoresize: {\n doc: 'Use `true` to make the Textarea grow and shrink depending on how many lines the user has filled.',\n type: 'boolean',\n status: 'optional',\n },\n autoresize_max_rows: {\n doc: 'Set a number to define how many rows the Textarea can auto grow.',\n type: 'number',\n status: 'optional',\n },\n characterCounter: {\n doc: 'Use a number to define the displayed max length. You can also use an object defining the [TextCounter](uilib/components/fragments/text-counter/) `variant` or properties. Please avoid using `maxLength` for accessibility reasons.',\n type: ['number', 'object'],\n status: 'optional',\n },\n size: {\n doc: 'The sizes you can choose for 1 row is `small` (2rem), `medium` (2.5rem) and `large` (3rem). Defaults to `small`.',\n type: 'string',\n status: 'optional',\n },\n status: {\n doc: 'Text with a status message. The style defaults to an error message. You can use `true` to only get the status color, without a message.',\n type: ['string', 'boolean'],\n status: 'optional',\n },\n status_state: {\n doc: 'Defines the state of the status. Currently, there are two statuses `[error, info]`. Defaults to `error`.',\n type: 'string',\n status: 'optional',\n },\n status_props: {\n doc: 'Use an object to define additional FormStatus properties.',\n type: 'object',\n status: 'optional',\n },\n globalStatus: {\n doc: 'The [configuration](/uilib/components/global-status/properties/#configuration-object) used for the target [GlobalStatus](/uilib/components/global-status).',\n type: 'object',\n status: 'optional',\n },\n textarea_state: {\n doc: 'To control the visual focus state as a prop, like `focus` or `blur`.',\n type: 'string',\n status: 'optional',\n },\n inner_ref: {\n doc: 'By providing a React.Ref we can get the internally used Textarea element (DOM). E.g. `inner_ref={myRef}` by using `React.createRef()` or `React.useRef()`.',\n type: 'React.Ref',\n status: 'optional',\n },\n skeleton: {\n doc: 'If set to `true`, an overlaying skeleton with animation will be shown.',\n type: 'boolean',\n status: 'optional',\n },\n '[Space](/uilib/layout/space/properties)': {\n doc: 'Spacing properties like `top` or `bottom` are supported.',\n type: ['string', 'object'],\n status: 'optional',\n },\n}\n\nexport const textareaEvents: PropertiesTableProps = {\n on_change: {\n doc: 'will be called on value changes made by the user. Returns an object with a string value and the native event: `{ value, rows, event }`.',\n type: 'function',\n status: 'optional',\n },\n on_focus: {\n doc: 'will be called on the focus set by the user. Returns `{ value, event }`.',\n type: 'function',\n status: 'optional',\n },\n on_blur: {\n doc: 'will be called on blur set by the user. Returns `{ value, event }`.',\n type: 'function',\n status: 'optional',\n },\n on_key_down: {\n doc: 'will be called during every keystroke. Returns `{ value, rows, event }`.',\n type: 'function',\n status: 'optional',\n },\n}\n"],"mappings":"AAEA,OAAO,MAAMA,kBAAwC,GAAG;EACtDC,KAAK,EAAE;IACLC,GAAG,EAAE,oCAAoC;IACzCC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDC,KAAK,EAAE;IACLH,GAAG,EAAE,+DAA+D;IACpEC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDE,OAAO,EAAE;IACPJ,GAAG,EAAE,oEAAoE;IACzEC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDG,WAAW,EAAE;IACXL,GAAG,EAAE,kEAAkE;I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E;IACZhB,GAAG,EAAE,2DAA2D;IAChEC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDe,YAAY,EAAE;IACZjB,GAAG,EAAE,4JAA4J;IACjKC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDgB,cAAc,EAAE;IACdlB,GAAG,EAAE,sEAAsE;IAC3EC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDiB,SAAS,EAAE;IACTnB,GAAG,EAAE,4JAA4J;IACjKC,IAAI,EAAE,WAAW;IACjBC,MAAM,EAAE;EACV,CAAC;EACDkB,QAAQ,EAAE;IACRpB,GAAG,EAAE,wEAAwE;IAC7EC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACD,yCAAyC,EAAE;IACzCF,GAAG,EAAE,0DAA0D;IAC/DC,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC1BC,MAAM,EAAE;EACV;AACF,CAAC;AAED,OAAO,MAAMmB,cAAoC,GAAG;EAClDC,SAAS,EAAE;IACTtB,GAAG,EAAE,yIAAyI;IAC9IC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDqB,QAAQ,EAAE;IACRvB,GAAG,EAAE,0EAA0E;IAC/EC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDsB,OAAO,EAAE;IACPxB,GAAG,EAAE,qEAAqE;IAC1EC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDuB,WAAW,EAAE;IACXzB,GAAG,EAAE,0EAA0E;IAC/EC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"TextareaDocs.js","names":["textareaProperties","value","doc","type","status","align","stretch","placeholder","keepPlaceholder","label","label_direction","suffix","label_sr_only","autoresize","autoresize_max_rows","characterCounter","size","status_state","status_props","globalStatus","textarea_state","inner_ref","skeleton","textareaEvents","on_change","on_focus","on_blur","on_key_down"],"sources":["../../../../src/components/textarea/TextareaDocs.ts"],"sourcesContent":["import { PropertiesTableProps } from '../../shared/types'\n\nexport const textareaProperties: PropertiesTableProps = {\n value: {\n doc: 'The content value of the Textarea.',\n type: 'string',\n status: 'optional',\n },\n align: {\n doc: 'Defines the `text-align` of the Textarea. Defaults to `left`.',\n type: 'string',\n status: 'optional',\n },\n stretch: {\n doc: 'If set to `true`, then the Textarea field will be 100% in `width`.',\n type: 'boolean',\n status: 'optional',\n },\n placeholder: {\n doc: 'The placeholder which shows up once the Textarea value is empty.',\n type: 'string',\n status: 'optional',\n },\n keepPlaceholder: {\n doc: 'Use `true` to keep the placeholder visible even when the Textarea has focus. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n label: {\n doc: 'Prepends the Form Label component. If no ID is provided, a random ID is created.',\n type: 'string',\n status: 'optional',\n },\n label_direction: {\n doc: 'Use `label_direction=\"vertical\"` to change the label layout direction. Defaults to `horizontal`.',\n type: 'string',\n status: 'optional',\n },\n suffix: {\n doc: 'Text describing the content of the Textarea more than the label. You can also send in a React component, so it gets wrapped inside the Textarea component.',\n type: 'string',\n status: 'optional',\n },\n label_sr_only: {\n doc: 'Use `true` to make the label only readable by screen readers.',\n type: 'boolean',\n status: 'optional',\n },\n autoresize: {\n doc: 'Use `true` to make the Textarea grow and shrink depending on how many lines the user has filled.',\n type: 'boolean',\n status: 'optional',\n },\n autoresize_max_rows: {\n doc: 'Set a number to define how many rows the Textarea can auto grow.',\n type: 'number',\n status: 'optional',\n },\n characterCounter: {\n doc: 'Use a number to define the displayed max length. You can also use an object defining the [TextCounter](uilib/components/fragments/text-counter/) `variant` or properties. Please avoid using `maxLength` for accessibility reasons.',\n type: ['number', 'object'],\n status: 'optional',\n },\n size: {\n doc: 'The sizes you can choose for 1 row is `small` (2rem), `medium` (2.5rem) and `large` (3rem). Defaults to `small`.',\n type: 'string',\n status: 'optional',\n },\n status: {\n doc: 'Text with a status message. The style defaults to an error message. You can use `true` to only get the status color, without a message.',\n type: ['error', 'info', 'boolean'],\n status: 'optional',\n },\n status_state: {\n doc: 'Defines the state of the status. Currently, there are two statuses `[error, info]`. Defaults to `error`.',\n type: ['error', 'info'],\n status: 'optional',\n },\n status_props: {\n doc: 'Use an object to define additional FormStatus properties.',\n type: 'object',\n status: 'optional',\n },\n globalStatus: {\n doc: 'The [configuration](/uilib/components/global-status/properties/#configuration-object) used for the target [GlobalStatus](/uilib/components/global-status).',\n type: 'object',\n status: 'optional',\n },\n textarea_state: {\n doc: 'To control the visual focus state as a prop, like `focus` or `blur`.',\n type: 'string',\n status: 'optional',\n },\n inner_ref: {\n doc: 'By providing a React.Ref we can get the internally used Textarea element (DOM). E.g. `inner_ref={myRef}` by using `React.createRef()` or `React.useRef()`.',\n type: 'React.RefObject',\n status: 'optional',\n },\n skeleton: {\n doc: 'If set to `true`, an overlaying skeleton with animation will be shown.',\n type: 'boolean',\n status: 'optional',\n },\n '[Space](/uilib/layout/space/properties)': {\n doc: 'Spacing properties like `top` or `bottom` are supported.',\n type: ['string', 'object'],\n status: 'optional',\n },\n}\n\nexport const textareaEvents: PropertiesTableProps = {\n on_change: {\n doc: 'will be called on value changes made by the user. Returns an object with a string value and the native event: `{ value, rows, event }`.',\n type: 'function',\n status: 'optional',\n },\n on_focus: {\n doc: 'will be called on the focus set by the user. Returns `{ value, event }`.',\n type: 'function',\n status: 'optional',\n },\n on_blur: {\n doc: 'will be called on blur set by the user. Returns `{ value, event }`.',\n type: 'function',\n status: 'optional',\n },\n on_key_down: {\n doc: 'will be called during every keystroke. Returns `{ value, rows, event }`.',\n type: 'function',\n status: 'optional',\n },\n}\n"],"mappings":"AAEA,OAAO,MAAMA,kBAAwC,GAAG;EACtDC,KAAK,EAAE;IACLC,GAAG,EAAE,oCAAoC;IACzCC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDC,KAAK,EAAE;IACL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AC;EACDuB,WAAW,EAAE;IACXzB,GAAG,EAAE,0EAA0E;IAC/EC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV;AACF,CAAC","ignoreList":[]}
@@ -26,7 +26,7 @@ export const ToggleButtonGroupProperties = {
26
26
  },
27
27
  status: {
28
28
  doc: 'Uses the `form-status` component to show failure messages.',
29
- type: 'string',
29
+ type: ['error', 'info', 'boolean'],
30
30
  status: 'optional'
31
31
  },
32
32
  status_state: {
@@ -1 +1 @@
1
- {"version":3,"file":"ToggleButtonGroupDocs.js","names":["ToggleButtonGroupProperties","value","doc","type","status","values","multiselect","layout_direction","title","status_state","status_props","globalStatus","label","label_direction","label_sr_only","vertical","suffix","skeleton","ToggleButtonGroupEvents","on_change"],"sources":["../../../../src/components/toggle-button/ToggleButtonGroupDocs.ts"],"sourcesContent":["import { PropertiesTableProps } from '../../shared/types'\n\nexport const ToggleButtonGroupProperties: PropertiesTableProps = {\n value: {\n doc: 'Defines the pre-selected ToggleButton button. The value has to match the one provided in the ToggleButton button. Use a string value.',\n type: 'string',\n status: 'optional',\n },\n values: {\n doc: 'Defines the pre-selected ToggleButton buttons in `multiselect` mode. The values have to match the one provided in the ToggleButton buttons. Use array, either as JS or JSON string.',\n type: 'array',\n status: 'optional',\n },\n multiselect: {\n doc: \"Defines if the ToggleButton's should act as a multi-selectable list of toggle buttons. Defaults to `false`.\",\n type: 'boolean',\n status: 'optional',\n },\n layout_direction: {\n doc: 'Define the layout direction of the ToggleButton buttons. Can be either `column` or `row`. Defaults to `column`.',\n type: ['column', 'row'],\n status: 'optional',\n },\n title: {\n doc: 'The `title` of group, describing it a bit further for accessibility reasons.',\n type: 'string',\n status: 'optional',\n },\n status: {\n doc: 'Uses the `form-status` component to show failure messages.',\n type: 'string',\n status: 'optional',\n },\n status_state: {\n doc: 'Defines the state of the status. Currently, there are two statuses `[error, info]`. Defaults to `error`.',\n type: ['error', 'info'],\n status: 'optional',\n },\n status_props: {\n doc: 'Use an object to define additional FormStatus properties.',\n type: 'object',\n status: 'optional',\n },\n globalStatus: {\n doc: 'The [configuration](/uilib/components/global-status/properties/#configuration-object) used for the target [GlobalStatus](/uilib/components/global-status).',\n type: 'object',\n status: 'optional',\n },\n label: {\n doc: 'Use either the `label` property or provide a custom one.',\n type: 'string',\n status: 'optional',\n },\n label_direction: {\n doc: 'To define the `label` layout direction on how the next element should be placed on. Can be either `vertical` or `horizontal`. Defaults to `horizontal`.',\n type: ['vertical', 'horizontal'],\n status: 'optional',\n },\n label_sr_only: {\n doc: 'Use `true` to make the label only readable by screen readers.',\n type: 'boolean',\n status: 'optional',\n },\n vertical: {\n doc: 'Will force both `direction` and `label_direction` to be **vertical** if set to `true`.',\n type: 'boolean',\n status: 'optional',\n },\n suffix: {\n doc: 'Text describing the content of the ToggleButtonGroup more than the label. You can also send in a React component, so it gets wrapped inside the ToggleButtonGroup component.',\n type: 'string',\n status: 'optional',\n },\n skeleton: {\n doc: 'If set to `true`, an overlaying skeleton with animation will be shown.',\n type: 'boolean',\n status: 'optional',\n },\n '[Space](/uilib/layout/space/properties)': {\n doc: 'Spacing properties like `top` or `bottom` are supported.',\n type: ['string', 'object'],\n status: 'optional',\n },\n}\n\nexport const ToggleButtonGroupEvents: PropertiesTableProps = {\n on_change: {\n doc: 'will be called once a ToggleButton button changes the state. Returns an object `{ value, values, event }`. <br /><br /> **NB**: `values` is only available if `multiselect` is used / true.',\n type: 'function',\n status: 'optional',\n },\n}\n"],"mappings":"AAEA,OAAO,MAAMA,2BAAiD,GAAG;EAC/DC,KAAK,EAAE;IACLC,GAAG,EAAE,uIAAuI;IAC5IC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDC,MAAM,EAAE;IACNH,GAAG,EAAE,qLAAqL;IAC1LC,IAAI,EAAE,OAAO;IACbC,MAAM,EAAE;EACV,CAAC;EACDE,WAAW,EAAE;IACXJ,GAAG,EAAE,6GAA6G;IAClHC,IAAI,EAAE,SAAS;IACfC,MAAM,E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AE,wEAAwE;IAC7EC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACD,yCAAyC,EAAE;IACzCF,GAAG,EAAE,0DAA0D;IAC/DC,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC1BC,MAAM,EAAE;EACV;AACF,CAAC;AAED,OAAO,MAAMc,uBAA6C,GAAG;EAC3DC,SAAS,EAAE;IACTjB,GAAG,EAAE,6LAA6L;IAClMC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"ToggleButtonGroupDocs.js","names":["ToggleButtonGroupProperties","value","doc","type","status","values","multiselect","layout_direction","title","status_state","status_props","globalStatus","label","label_direction","label_sr_only","vertical","suffix","skeleton","ToggleButtonGroupEvents","on_change"],"sources":["../../../../src/components/toggle-button/ToggleButtonGroupDocs.ts"],"sourcesContent":["import { PropertiesTableProps } from '../../shared/types'\n\nexport const ToggleButtonGroupProperties: PropertiesTableProps = {\n value: {\n doc: 'Defines the pre-selected ToggleButton button. The value has to match the one provided in the ToggleButton button. Use a string value.',\n type: 'string',\n status: 'optional',\n },\n values: {\n doc: 'Defines the pre-selected ToggleButton buttons in `multiselect` mode. The values have to match the one provided in the ToggleButton buttons. Use array, either as JS or JSON string.',\n type: 'array',\n status: 'optional',\n },\n multiselect: {\n doc: \"Defines if the ToggleButton's should act as a multi-selectable list of toggle buttons. Defaults to `false`.\",\n type: 'boolean',\n status: 'optional',\n },\n layout_direction: {\n doc: 'Define the layout direction of the ToggleButton buttons. Can be either `column` or `row`. Defaults to `column`.',\n type: ['column', 'row'],\n status: 'optional',\n },\n title: {\n doc: 'The `title` of group, describing it a bit further for accessibility reasons.',\n type: 'string',\n status: 'optional',\n },\n status: {\n doc: 'Uses the `form-status` component to show failure messages.',\n type: ['error', 'info', 'boolean'],\n status: 'optional',\n },\n status_state: {\n doc: 'Defines the state of the status. Currently, there are two statuses `[error, info]`. Defaults to `error`.',\n type: ['error', 'info'],\n status: 'optional',\n },\n status_props: {\n doc: 'Use an object to define additional FormStatus properties.',\n type: 'object',\n status: 'optional',\n },\n globalStatus: {\n doc: 'The [configuration](/uilib/components/global-status/properties/#configuration-object) used for the target [GlobalStatus](/uilib/components/global-status).',\n type: 'object',\n status: 'optional',\n },\n label: {\n doc: 'Use either the `label` property or provide a custom one.',\n type: 'string',\n status: 'optional',\n },\n label_direction: {\n doc: 'To define the `label` layout direction on how the next element should be placed on. Can be either `vertical` or `horizontal`. Defaults to `horizontal`.',\n type: ['vertical', 'horizontal'],\n status: 'optional',\n },\n label_sr_only: {\n doc: 'Use `true` to make the label only readable by screen readers.',\n type: 'boolean',\n status: 'optional',\n },\n vertical: {\n doc: 'Will force both `direction` and `label_direction` to be **vertical** if set to `true`.',\n type: 'boolean',\n status: 'optional',\n },\n suffix: {\n doc: 'Text describing the content of the ToggleButtonGroup more than the label. You can also send in a React component, so it gets wrapped inside the ToggleButtonGroup component.',\n type: 'string',\n status: 'optional',\n },\n skeleton: {\n doc: 'If set to `true`, an overlaying skeleton with animation will be shown.',\n type: 'boolean',\n status: 'optional',\n },\n '[Space](/uilib/layout/space/properties)': {\n doc: 'Spacing properties like `top` or `bottom` are supported.',\n type: ['string', 'object'],\n status: 'optional',\n },\n}\n\nexport const ToggleButtonGroupEvents: PropertiesTableProps = {\n on_change: {\n doc: 'will be called once a ToggleButton button changes the state. Returns an object `{ value, values, event }`. <br /><br /> **NB**: `values` is only available if `multiselect` is used / true.',\n type: 'function',\n status: 'optional',\n },\n}\n"],"mappings":"AAEA,OAAO,MAAMA,2BAAiD,GAAG;EAC/DC,KAAK,EAAE;IACLC,GAAG,EAAE,uIAAuI;IAC5IC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDC,MAAM,EAAE;IACNH,GAAG,EAAE,qLAAqL;IAC1LC,IAAI,EAAE,OAAO;IACbC,MAAM,EAAE;EACV,CAAC;EACDE,WAAW,EAAE;IACXJ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8KAA8K;IACnLC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDa,QAAQ,EAAE;IACRf,GAAG,EAAE,wEAAwE;IAC7EC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACD,yCAAyC,EAAE;IACzCF,GAAG,EAAE,0DAA0D;IAC/DC,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC1BC,MAAM,EAAE;EACV;AACF,CAAC;AAED,OAAO,MAAMc,uBAA6C,GAAG;EAC3DC,SAAS,EAAE;IACTjB,GAAG,EAAE,6LAA6L;IAClMC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV;AACF,CAAC","ignoreList":[]}
@@ -46,7 +46,7 @@ export const TooltipProperties = {
46
46
  },
47
47
  targetElement: {
48
48
  doc: 'provide an element directly as a React Node or a React Ref that will be wrapped and rendered.',
49
- type: ['React.Node', 'React.Ref'],
49
+ type: ['React.Node', 'React.RefObject'],
50
50
  status: 'optional'
51
51
  },
52
52
  targetSelector: {
@@ -1 +1 @@
1
- {"version":3,"file":"TooltipDocs.js","names":["TooltipProperties","children","doc","type","status","active","position","align","arrow","skipPortal","showDelay","hideDelay","size","targetElement","targetSelector","noAnimation","fixedPosition"],"sources":["../../../../src/components/tooltip/TooltipDocs.ts"],"sourcesContent":["import { PropertiesTableProps } from '../../shared/types'\n\nexport const TooltipProperties: PropertiesTableProps = {\n children: {\n doc: 'Provide a string or a React Element to be shown as the tooltip content.',\n type: 'React.Node',\n status: 'optional',\n },\n active: {\n doc: 'set to `true` the tooltip will show up.',\n type: 'boolean',\n status: 'optional',\n },\n position: {\n doc: 'defines the offset position to the target element the arrow appears. Can be `top`, `right`, `left` and `bottom`. Defaults to `top`.',\n type: ['top', 'right', 'left', 'bottom'],\n status: 'optional',\n },\n align: {\n doc: 'defines the offset alignment to the target element the arrow appears. Can be `center`, `right` and `left`. Defaults to `center`.',\n type: ['center', 'right', 'left'],\n status: 'optional',\n },\n arrow: {\n doc: 'defines the direction where the arrow appears. Can be `center`, `top`, `right`, `bottom` and `left`. Defaults to `center`.',\n type: ['center', 'top', 'right', 'bottom', 'left'],\n status: 'optional',\n },\n skipPortal: {\n doc: 'set to `true` to disable the React Portal behavior. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n showDelay: {\n doc: 'define the delay until the tooltip should show up after the initial hover / active state.',\n type: 'boolean',\n status: 'optional',\n },\n hideDelay: {\n doc: 'define the delay until the tooltip should disappear up after initial visibility.',\n type: 'boolean',\n status: 'optional',\n },\n size: {\n doc: 'defines the spacing size of the tooltip. Can be `large` or `basis`. Defaults to `basis`.',\n type: ['large', 'basis'],\n status: 'optional',\n },\n targetElement: {\n doc: 'provide an element directly as a React Node or a React Ref that will be wrapped and rendered.',\n type: ['React.Node', 'React.Ref'],\n status: 'optional',\n },\n targetSelector: {\n doc: 'specify a vanilla HTML selector by a string as the target element.',\n type: 'string',\n status: 'optional',\n },\n noAnimation: {\n doc: 'set to `true` if no fade-in animation should be used.',\n type: 'boolean',\n status: 'optional',\n },\n fixedPosition: {\n doc: 'If set to `true`, the Tooltip will be fixed in its scroll position by using CSS `position: fixed;`. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n '[Space](/uilib/layout/space/properties)': {\n doc: 'Spacing properties like `top` or `bottom` are supported.',\n type: ['string', 'object'],\n status: 'optional',\n },\n}\n"],"mappings":"AAEA,OAAO,MAAMA,iBAAuC,GAAG;EACrDC,QAAQ,EAAE;IACRC,GAAG,EAAE,yEAAyE;IAC9EC,IAAI,EAAE,YAAY;IAClBC,MAAM,EAAE;EACV,CAAC;EACDC,MAAM,EAAE;IACNH,GAAG,EAAE,yCAAyC;IAC9CC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDE,QAAQ,EAAE;IACRJ,GAAG,EAAE,qIAAqI;IAC1IC,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,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AC/DC,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC1BC,MAAM,EAAE;EACV;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"TooltipDocs.js","names":["TooltipProperties","children","doc","type","status","active","position","align","arrow","skipPortal","showDelay","hideDelay","size","targetElement","targetSelector","noAnimation","fixedPosition"],"sources":["../../../../src/components/tooltip/TooltipDocs.ts"],"sourcesContent":["import { PropertiesTableProps } from '../../shared/types'\n\nexport const TooltipProperties: PropertiesTableProps = {\n children: {\n doc: 'Provide a string or a React Element to be shown as the tooltip content.',\n type: 'React.Node',\n status: 'optional',\n },\n active: {\n doc: 'set to `true` the tooltip will show up.',\n type: 'boolean',\n status: 'optional',\n },\n position: {\n doc: 'defines the offset position to the target element the arrow appears. Can be `top`, `right`, `left` and `bottom`. Defaults to `top`.',\n type: ['top', 'right', 'left', 'bottom'],\n status: 'optional',\n },\n align: {\n doc: 'defines the offset alignment to the target element the arrow appears. Can be `center`, `right` and `left`. Defaults to `center`.',\n type: ['center', 'right', 'left'],\n status: 'optional',\n },\n arrow: {\n doc: 'defines the direction where the arrow appears. Can be `center`, `top`, `right`, `bottom` and `left`. Defaults to `center`.',\n type: ['center', 'top', 'right', 'bottom', 'left'],\n status: 'optional',\n },\n skipPortal: {\n doc: 'set to `true` to disable the React Portal behavior. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n showDelay: {\n doc: 'define the delay until the tooltip should show up after the initial hover / active state.',\n type: 'boolean',\n status: 'optional',\n },\n hideDelay: {\n doc: 'define the delay until the tooltip should disappear up after initial visibility.',\n type: 'boolean',\n status: 'optional',\n },\n size: {\n doc: 'defines the spacing size of the tooltip. Can be `large` or `basis`. Defaults to `basis`.',\n type: ['large', 'basis'],\n status: 'optional',\n },\n targetElement: {\n doc: 'provide an element directly as a React Node or a React Ref that will be wrapped and rendered.',\n type: ['React.Node', 'React.RefObject'],\n status: 'optional',\n },\n targetSelector: {\n doc: 'specify a vanilla HTML selector by a string as the target element.',\n type: 'string',\n status: 'optional',\n },\n noAnimation: {\n doc: 'set to `true` if no fade-in animation should be used.',\n type: 'boolean',\n status: 'optional',\n },\n fixedPosition: {\n doc: 'If set to `true`, the Tooltip will be fixed in its scroll position by using CSS `position: fixed;`. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n '[Space](/uilib/layout/space/properties)': {\n doc: 'Spacing properties like `top` or `bottom` are supported.',\n type: ['string', 'object'],\n status: 'optional',\n },\n}\n"],"mappings":"AAEA,OAAO,MAAMA,iBAAuC,GAAG;EACrDC,QAAQ,EAAE;IACRC,GAAG,EAAE,yEAAyE;IAC9EC,IAAI,EAAE,YAAY;IAClBC,MAAM,EAAE;EACV,CAAC;EACDC,MAAM,EAAE;IACNH,GAAG,EAAE,yCAAyC;IAC9CC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDE,QAAQ,EAAE;IACRJ,GAAG,EAAE,qIAAqI;IAC1IC,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC;IACxCC,MAAM,EAAE;EACV,CAAC;EACDG,KAAK,EAAE;IACLL,GAAG,EAAE,kIAAkI;IACvIC,IAAI,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC;IACjCC,MAAM,EAAE;EACV,CAAC;EACDI,KAAK,EAAE;IACLN,GAAG,EAAE,4HAA4H;IACjIC,IAAI,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC;IAClDC,MAAM,EAAE;EACV,CAAC;EACDK,UAAU,EAAE;IACVP,GAAG,EAAE,0EAA0E;IAC/EC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDM,SAAS,EAAE;IACTR,GAAG,EAAE,2FAA2F;IAChGC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDO,SAAS,EAAE;IACTT,GAAG,EAAE,kFAAkF;IACvFC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDQ,IAAI,EAAE;IACJV,GAAG,EAAE,0FAA0F;IAC/FC,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;IACxBC,MAAM,EAAE;EACV,CAAC;EACDS,aAAa,EAAE;IACbX,GAAG,EAAE,+FAA+F;IACpGC,IAAI,EAAE,CAAC,YAAY,EAAE,iBAAiB,CAAC;IACvCC,MAAM,EAAE;EACV,CAAC;EACDU,cAAc,EAAE;IACdZ,GAAG,EAAE,oEAAoE;IACzEC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDW,WAAW,EAAE;IACXb,GAAG,EAAE,uDAAuD;IAC5DC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDY,aAAa,EAAE;IACbd,GAAG,EAAE,0HAA0H;IAC/HC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACD,yCAAyC,EAAE;IACzCF,GAAG,EAAE,0DAA0D;IAC/DC,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC1BC,MAAM,EAAE;EACV;AACF,CAAC","ignoreList":[]}
@@ -4,7 +4,7 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
5
  var _UploadInfo, _UploadFileList;
6
6
  const _excluded = ["buttonTextSingular", "textSingular"],
7
- _excluded2 = ["id", "skeleton", "className", "acceptedFileTypes", "filesAmountLimit", "fileMaxSize", "onChange", "onFileDelete", "onFileClick", "download", "allowDuplicates", "title", "text", "fileTypeTableCaption", "fileTypeDescription", "fileSizeDescription", "fileAmountDescription", "fileSizeContent", "buttonText", "loadingText", "errorLargeFile", "errorUnsupportedFile", "errorAmountLimit", "deleteButton", "fileListAriaLabel"];
7
+ _excluded2 = ["id", "skeleton", "className", "acceptedFileTypes", "filesAmountLimit", "fileMaxSize", "onChange", "onFileDelete", "onFileClick", "download", "allowDuplicates", "title", "text", "fileTypeTableCaption", "fileTypeDescription", "fileSizeDescription", "fileAmountDescription", "fileSizeContent", "buttonText", "loadingText", "errorLargeFile", "errorUnsupportedFile", "errorAmountLimit", "deleteButton", "fileListAriaLabel", "disableDragAndDrop"];
8
8
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
9
9
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
10
10
  import React, { useCallback } from 'react';
@@ -14,6 +14,7 @@ import Provider from '../../shared/Provider';
14
14
  import Context from '../../shared/Context';
15
15
  import { extendPropsWithContext, makeUniqueId } from '../../shared/component-helper';
16
16
  import useId from '../../shared/helpers/useId';
17
+ import HeightAnimation from '../height-animation/HeightAnimation';
17
18
  import UploadFileInput from './UploadFileInput';
18
19
  import useUpload from './useUpload';
19
20
  import UploadDropzone from './UploadDropzone';
@@ -62,7 +63,8 @@ const Upload = localProps => {
62
63
  errorUnsupportedFile,
63
64
  errorAmountLimit,
64
65
  deleteButton,
65
- fileListAriaLabel
66
+ fileListAriaLabel,
67
+ disableDragAndDrop
66
68
  } = extendedProps,
67
69
  props = _objectWithoutProperties(extendedProps, _excluded2);
68
70
  const spacingClasses = createSpacingClasses(props);
@@ -102,6 +104,7 @@ const Upload = localProps => {
102
104
  }
103
105
  return validFiles;
104
106
  }, [acceptedFileTypes, errorLargeFile, errorUnsupportedFile, fileMaxSize, files, filesAmountLimit, getExistingFile, onChange, setFiles, setInternalFiles]);
107
+ const UploadWrapper = disableDragAndDrop ? HeightAnimation : UploadDropzone;
105
108
  return React.createElement(UploadContext.Provider, {
106
109
  value: _objectSpread(_objectSpread({}, extendedProps), {}, {
107
110
  id,
@@ -109,7 +112,7 @@ const Upload = localProps => {
109
112
  })
110
113
  }, React.createElement(Provider, {
111
114
  skeleton: skeleton
112
- }, React.createElement(UploadDropzone, {
115
+ }, React.createElement(UploadWrapper, {
113
116
  className: classnames('dnb-upload', spacingClasses, className)
114
117
  }, _UploadInfo || (_UploadInfo = React.createElement(UploadInfo, null)), React.createElement(UploadFileInput, props), _UploadFileList || (_UploadFileList = React.createElement(UploadFileList, null)))));
115
118
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Upload.js","names":["React","useCallback","classnames","createSpacingClasses","Provider","Context","extendPropsWithContext","makeUniqueId","useId","UploadFileInput","useUpload","UploadDropzone","UploadContext","defaultProps","verifyFiles","UploadFileList","UploadInfo","Upload","localProps","context","useContext","_context$getTranslati","getTranslation","buttonTextSingular","textSingular","translations","_objectWithoutProperties","_excluded","filesAmountLimit","buttonText","text","extendedProps","skeleton","id","idProp","className","acceptedFileTypes","fileMaxSize","onChange","onFileDelete","onFileClick","download","allowDuplicates","title","fileTypeTableCaption","fileTypeDescription","fileSizeDescription","fileAmountDescription","fileSizeContent","loadingText","errorLargeFile","errorUnsupportedFile","errorAmountLimit","deleteButton","fileListAriaLabel","props","_excluded2","spacingClasses","files","setFiles","setInternalFiles","getExistingFile","onInputUpload","newFiles","mergedFiles","map","fileItem","file","existingFile","exists","Boolean","filesToVerify","filter","verifiedFiles","validFiles","slice","createElement","value","_objectSpread","_UploadInfo","_UploadFileList","_formElement","_supportsSpacingProps"],"sources":["../../../../src/components/upload/Upload.tsx"],"sourcesContent":["import React, { useCallback } from 'react'\nimport classnames from 'classnames'\n\n// Shared\nimport { createSpacingClasses } from '../space/SpacingHelper'\nimport Provider from '../../shared/Provider'\nimport Context from '../../shared/Context'\nimport {\n extendPropsWithContext,\n makeUniqueId,\n} from '../../shared/component-helper'\nimport useId from '../../shared/helpers/useId'\n\n// Internal\nimport UploadFileInput from './UploadFileInput'\nimport useUpload from './useUpload'\nimport UploadDropzone from './UploadDropzone'\nimport { UploadContext, defaultProps } from './UploadContext'\nimport { verifyFiles } from './UploadVerify'\n\nimport type { UploadFile, UploadAllProps } from './types'\nimport UploadFileList from './UploadFileList'\nimport UploadInfo from './UploadInfo'\n\nexport type * from './types'\nexport { defaultProps }\n\nconst Upload = (localProps: UploadAllProps) => {\n const context = React.useContext(Context)\n\n const { buttonTextSingular, textSingular, ...translations } =\n context.getTranslation(localProps).Upload\n\n if (localProps?.filesAmountLimit === 1) {\n translations.buttonText = buttonTextSingular\n translations.text = textSingular\n }\n\n const extendedProps = extendPropsWithContext(\n localProps,\n defaultProps,\n { skeleton: context?.skeleton },\n translations,\n context.Upload\n )\n\n const {\n id: idProp,\n skeleton,\n className,\n acceptedFileTypes,\n filesAmountLimit,\n fileMaxSize,\n onChange,\n onFileDelete, // eslint-disable-line\n onFileClick, // eslint-disable-line\n download, // eslint-disable-line\n allowDuplicates, // eslint-disable-line\n title, // eslint-disable-line\n text, // eslint-disable-line\n fileTypeTableCaption, // eslint-disable-line\n fileTypeDescription, // eslint-disable-line\n fileSizeDescription, // eslint-disable-line\n fileAmountDescription, // eslint-disable-line\n fileSizeContent, // eslint-disable-line\n buttonText, // eslint-disable-line\n loadingText, // eslint-disable-line\n errorLargeFile,\n errorUnsupportedFile,\n errorAmountLimit, // eslint-disable-line\n deleteButton, // eslint-disable-line\n fileListAriaLabel, // eslint-disable-line\n ...props\n } = extendedProps\n\n const spacingClasses = createSpacingClasses(props)\n\n const id = useId(idProp)\n\n const { files, setFiles, setInternalFiles, getExistingFile } =\n useUpload(id)\n\n const onInputUpload = useCallback(\n (newFiles: Array<UploadFile>) => {\n const mergedFiles = [\n ...files,\n ...newFiles.map((fileItem) => {\n const { file } = fileItem\n\n const existingFile = getExistingFile(file, files)\n\n fileItem.exists = Boolean(existingFile)\n fileItem.id =\n fileItem.exists && !allowDuplicates\n ? existingFile.id\n : makeUniqueId()\n\n return fileItem\n }),\n ]\n\n const filesToVerify = allowDuplicates\n ? mergedFiles\n : mergedFiles.filter(({ exists }) => !exists)\n\n const verifiedFiles = verifyFiles(filesToVerify, {\n fileMaxSize,\n acceptedFileTypes,\n errorUnsupportedFile,\n errorLargeFile,\n })\n\n const validFiles = [...verifiedFiles].slice(\n 0,\n filesAmountLimit\n ) as Array<UploadFile>\n\n setFiles(validFiles)\n setInternalFiles(mergedFiles)\n\n if (typeof onChange === 'function') {\n onChange({ files: validFiles })\n }\n\n return validFiles\n },\n [\n acceptedFileTypes,\n errorLargeFile,\n errorUnsupportedFile,\n fileMaxSize,\n files,\n filesAmountLimit,\n getExistingFile,\n onChange,\n setFiles,\n setInternalFiles,\n ]\n )\n\n return (\n <UploadContext.Provider\n value={{\n ...extendedProps,\n id,\n onInputUpload,\n }}\n >\n <Provider skeleton={skeleton}>\n <UploadDropzone\n className={classnames('dnb-upload', spacingClasses, className)}\n >\n <UploadInfo />\n\n <UploadFileInput {...props} />\n\n <UploadFileList />\n </UploadDropzone>\n </Provider>\n </UploadContext.Provider>\n )\n}\n\nUpload.useUpload = useUpload\n\nUpload._formElement = true\nUpload._supportsSpacingProps = true\n\nexport default Upload\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAK,IAAIC,WAAW,QAAQ,OAAO;AAC1C,OAAOC,UAAU,MAAM,YAAY;AAGnC,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,OAAOC,QAAQ,MAAM,uBAAuB;AAC5C,OAAOC,OAAO,MAAM,sBAAsB;AAC1C,SACEC,sBAAsB,EACtBC,YAAY,QACP,+BAA+B;AACtC,OAAOC,KAAK,MAAM,4BAA4B;AAG9C,OAAOC,eAAe,MAAM,mBAAmB;AAC/C,OAAOC,SAAS,MAAM,aAAa;AACnC,OAAOC,cAAc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E;MAClCA,QAAQ,CAAC;QAAEoB,KAAK,EAAEgB;MAAW,CAAC,CAAC;IACjC;IAEA,OAAOA,UAAU;EACnB,CAAC,EACD,CACEtC,iBAAiB,EACjBc,cAAc,EACdC,oBAAoB,EACpBd,WAAW,EACXqB,KAAK,EACL9B,gBAAgB,EAChBiC,eAAe,EACfvB,QAAQ,EACRqB,QAAQ,EACRC,gBAAgB,CAEpB,CAAC;EAED,OACE5D,KAAA,CAAA4E,aAAA,CAAChE,aAAa,CAACR,QAAQ;IACrByE,KAAK,EAAAC,aAAA,CAAAA,aAAA,KACA/C,aAAa;MAChBE,EAAE;MACF6B;IAAa;EACb,GAEF9D,KAAA,CAAA4E,aAAA,CAACxE,QAAQ;IAAC4B,QAAQ,EAAEA;EAAS,GAC3BhC,KAAA,CAAA4E,aAAA,CAACjE,cAAc;IACbwB,SAAS,EAAEjC,UAAU,CAAC,YAAY,EAAEuD,cAAc,EAAEtB,SAAS;EAAE,GAAA4C,WAAA,KAAAA,WAAA,GAE/D/E,KAAA,CAAA4E,aAAA,CAAC5D,UAAU,MAAE,CAAC,GAEdhB,KAAA,CAAA4E,aAAA,CAACnE,eAAe,EAAK8C,KAAQ,CAAC,EAAAyB,eAAA,KAAAA,eAAA,GAE9BhF,KAAA,CAAA4E,aAAA,CAAC7D,cAAc,MAAE,CAAC,CACJ,CACR,CACY,CAAC;AAE7B,CAAC;AAEDE,MAAM,CAACP,SAAS,GAAGA,SAAS;AAE5BO,MAAM,CAACgE,YAAY,GAAG,IAAI;AAC1BhE,MAAM,CAACiE,qBAAqB,GAAG,IAAI;AAEnC,eAAejE,MAAM","ignoreList":[]}
1
+ {"version":3,"file":"Upload.js","names":["React","useCallback","classnames","createSpacingClasses","Provider","Context","extendPropsWithContext","makeUniqueId","useId","HeightAnimation","UploadFileInput","useUpload","UploadDropzone","UploadContext","defaultProps","verifyFiles","UploadFileList","UploadInfo","Upload","localProps","context","useContext","_context$getTranslati","getTranslation","buttonTextSingular","textSingular","translations","_objectWithoutProperties","_excluded","filesAmountLimit","buttonText","text","extendedProps","skeleton","id","idProp","className","acceptedFileTypes","fileMaxSize","onChange","onFileDelete","onFileClick","download","allowDuplicates","title","fileTypeTableCaption","fileTypeDescription","fileSizeDescription","fileAmountDescription","fileSizeContent","loadingText","errorLargeFile","errorUnsupportedFile","errorAmountLimit","deleteButton","fileListAriaLabel","disableDragAndDrop","props","_excluded2","spacingClasses","files","setFiles","setInternalFiles","getExistingFile","onInputUpload","newFiles","mergedFiles","map","fileItem","file","existingFile","exists","Boolean","filesToVerify","filter","verifiedFiles","validFiles","slice","UploadWrapper","createElement","value","_objectSpread","_UploadInfo","_UploadFileList","_formElement","_supportsSpacingProps"],"sources":["../../../../src/components/upload/Upload.tsx"],"sourcesContent":["import React, { useCallback } from 'react'\nimport classnames from 'classnames'\n\n// Shared\nimport { createSpacingClasses } from '../space/SpacingHelper'\nimport Provider from '../../shared/Provider'\nimport Context from '../../shared/Context'\nimport {\n extendPropsWithContext,\n makeUniqueId,\n} from '../../shared/component-helper'\nimport useId from '../../shared/helpers/useId'\nimport HeightAnimation from '../height-animation/HeightAnimation'\n\n// Internal\nimport UploadFileInput from './UploadFileInput'\nimport useUpload from './useUpload'\nimport UploadDropzone from './UploadDropzone'\nimport { UploadContext, defaultProps } from './UploadContext'\nimport { verifyFiles } from './UploadVerify'\n\nimport type { UploadFile, UploadAllProps } from './types'\nimport UploadFileList from './UploadFileList'\nimport UploadInfo from './UploadInfo'\n\nexport type * from './types'\nexport { defaultProps }\n\nconst Upload = (localProps: UploadAllProps) => {\n const context = React.useContext(Context)\n\n const { buttonTextSingular, textSingular, ...translations } =\n context.getTranslation(localProps).Upload\n\n if (localProps?.filesAmountLimit === 1) {\n translations.buttonText = buttonTextSingular\n translations.text = textSingular\n }\n\n const extendedProps = extendPropsWithContext(\n localProps,\n defaultProps,\n { skeleton: context?.skeleton },\n translations,\n context.Upload\n )\n\n const {\n id: idProp,\n skeleton,\n className,\n acceptedFileTypes,\n filesAmountLimit,\n fileMaxSize,\n onChange,\n onFileDelete, // eslint-disable-line\n onFileClick, // eslint-disable-line\n download, // eslint-disable-line\n allowDuplicates,\n title, // eslint-disable-line\n text, // eslint-disable-line\n fileTypeTableCaption, // eslint-disable-line\n fileTypeDescription, // eslint-disable-line\n fileSizeDescription, // eslint-disable-line\n fileAmountDescription, // eslint-disable-line\n fileSizeContent, // eslint-disable-line\n buttonText, // eslint-disable-line\n loadingText, // eslint-disable-line\n errorLargeFile,\n errorUnsupportedFile,\n errorAmountLimit, // eslint-disable-line\n deleteButton, // eslint-disable-line\n fileListAriaLabel, // eslint-disable-line\n disableDragAndDrop,\n ...props\n } = extendedProps\n\n const spacingClasses = createSpacingClasses(props)\n\n const id = useId(idProp)\n\n const { files, setFiles, setInternalFiles, getExistingFile } =\n useUpload(id)\n\n const onInputUpload = useCallback(\n (newFiles: Array<UploadFile>) => {\n const mergedFiles = [\n ...files,\n ...newFiles.map((fileItem) => {\n const { file } = fileItem\n\n const existingFile = getExistingFile(file, files)\n\n fileItem.exists = Boolean(existingFile)\n fileItem.id =\n fileItem.exists && !allowDuplicates\n ? existingFile.id\n : makeUniqueId()\n\n return fileItem\n }),\n ]\n\n const filesToVerify = allowDuplicates\n ? mergedFiles\n : mergedFiles.filter(({ exists }) => !exists)\n\n const verifiedFiles = verifyFiles(filesToVerify, {\n fileMaxSize,\n acceptedFileTypes,\n errorUnsupportedFile,\n errorLargeFile,\n })\n\n const validFiles = [...verifiedFiles].slice(\n 0,\n filesAmountLimit\n ) as Array<UploadFile>\n\n setFiles(validFiles)\n setInternalFiles(mergedFiles)\n\n if (typeof onChange === 'function') {\n onChange({ files: validFiles })\n }\n\n return validFiles\n },\n [\n acceptedFileTypes,\n errorLargeFile,\n errorUnsupportedFile,\n fileMaxSize,\n files,\n filesAmountLimit,\n getExistingFile,\n onChange,\n setFiles,\n setInternalFiles,\n ]\n )\n\n const UploadWrapper = disableDragAndDrop\n ? HeightAnimation\n : UploadDropzone\n\n return (\n <UploadContext.Provider\n value={{\n ...extendedProps,\n id,\n onInputUpload,\n }}\n >\n <Provider skeleton={skeleton}>\n <UploadWrapper\n className={classnames('dnb-upload', spacingClasses, className)}\n >\n <UploadInfo />\n\n <UploadFileInput {...props} />\n\n <UploadFileList />\n </UploadWrapper>\n </Provider>\n </UploadContext.Provider>\n )\n}\n\nUpload.useUpload = useUpload\n\nUpload._formElement = true\nUpload._supportsSpacingProps = true\n\nexport default Upload\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAK,IAAIC,WAAW,QAAQ,OAAO;AAC1C,OAAOC,UAAU,MAAM,YAAY;AAGnC,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,OAAOC,QAAQ,MAAM,uBAAuB;AAC5C,OAAOC,OAAO,MAAM,sBAAsB;AAC1C,SACEC,sBAAsB,EACtBC,YAAY,QACP,+BAA+B;AACtC,OAAOC,KAAK,MAAM,4BAA4B;AAC9C,OAAOC,eAAe,MAAM,qCAAqC;AAGjE,OAAOC,eAAe,MAAM,mBAAmB;AAC/C,OAAOC,SAAS,MAAM,aAAa;AACnC,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,SAASC,aAAa,EAAEC,YAAY,QAAQ,iBAAiB;AAC7D,SAASC,WAAW,QAAQ,gBAAgB;AAG5C,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,UAAU,MAAM,cAAc;AAGrC,SAASH,YAAY;AAErB,MAAMI,MAAM,GAAIC,UAA0B,IAAK;EAC7C,MAAMC,OAAO,GAAGpB,KAAK,CAACqB,UAAU,CAAChB,OAAO,CAAC;EAEzC,MAAAiB,qBAAA,GACEF,OAAO,CAACG,cAAc,CAACJ,UAAU,CAAC,CAACD,MAAM;IADrC;MAAEM,kBAAkB;MAAEC;IAA8B,CAAC,GAAAH,qBAAA;IAAdI,YAAY,GAAAC,wBAAA,CAAAL,qBAAA,EAAAM,SAAA;EAGzD,IAAI,CAAAT,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAA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B,QAAQ,EAAEA;EAAS,GAC3BjC,KAAA,CAAA+E,aAAA,CAACD,aAAa;IACZ1C,SAAS,EAAElC,UAAU,CAAC,YAAY,EAAEyD,cAAc,EAAEvB,SAAS;EAAE,GAAA8C,WAAA,KAAAA,WAAA,GAE/DlF,KAAA,CAAA+E,aAAA,CAAC9D,UAAU,MAAE,CAAC,GAEdjB,KAAA,CAAA+E,aAAA,CAACrE,eAAe,EAAK+C,KAAQ,CAAC,EAAA0B,eAAA,KAAAA,eAAA,GAE9BnF,KAAA,CAAA+E,aAAA,CAAC/D,cAAc,MAAE,CAAC,CACL,CACP,CACY,CAAC;AAE7B,CAAC;AAEDE,MAAM,CAACP,SAAS,GAAGA,SAAS;AAE5BO,MAAM,CAACkE,YAAY,GAAG,IAAI;AAC1BlE,MAAM,CAACmE,qBAAqB,GAAG,IAAI;AAEnC,eAAenE,MAAM","ignoreList":[]}
@@ -2,3 +2,4 @@ import { PropertiesTableProps } from '../../shared/types';
2
2
  export declare const UploadProperties: PropertiesTableProps;
3
3
  export declare const AcceptedFileTypeProperties: PropertiesTableProps;
4
4
  export declare const UploadEvents: PropertiesTableProps;
5
+ export declare const FileItemProperties: PropertiesTableProps;
@@ -39,6 +39,11 @@ export const UploadProperties = {
39
39
  type: 'boolean',
40
40
  status: 'optional'
41
41
  },
42
+ disableDragAndDrop: {
43
+ doc: 'Disables file drag and drop, by removing the drop zone. Defaults to `false`.',
44
+ type: 'boolean',
45
+ status: 'optional'
46
+ },
42
47
  skeleton: {
43
48
  doc: 'Skeleton should be applied when loading content.',
44
49
  type: 'boolean',
@@ -79,4 +84,41 @@ export const UploadEvents = {
79
84
  status: 'optional'
80
85
  }
81
86
  };
87
+ export const FileItemProperties = {
88
+ file: {
89
+ doc: 'The file object. This is the same object as the one returned by the `File` API.',
90
+ type: 'File',
91
+ status: 'required'
92
+ },
93
+ id: {
94
+ doc: 'Unique ID for the file item. This ID is generated by the component and is not user-defined.',
95
+ type: 'string',
96
+ status: 'required'
97
+ },
98
+ exists: {
99
+ doc: 'Indicates if the file item already exists in the list of files. This is useful for distinguishing between new and existing files.',
100
+ type: 'boolean',
101
+ status: 'optional'
102
+ },
103
+ isLoading: {
104
+ doc: 'Indicates if the file item is currently being loaded. This is useful for showing a loading state while the file is being processed.',
105
+ type: 'boolean',
106
+ status: 'optional'
107
+ },
108
+ errorMessage: {
109
+ doc: 'Provide an error message to be displayed. This is useful for indicating issues with the file upload process.',
110
+ type: 'React.ReactNode',
111
+ status: 'optional'
112
+ },
113
+ description: {
114
+ doc: 'Provide a description to be displayed. This is useful for providing additional information about the file.',
115
+ type: 'React.ReactNode',
116
+ status: 'optional'
117
+ },
118
+ removeDeleteButton: {
119
+ doc: 'Set to `true` to remove the delete button from the file item. This is useful for preventing users from deleting files.',
120
+ type: 'boolean',
121
+ status: 'optional'
122
+ }
123
+ };
82
124
  //# sourceMappingURL=UploadDocs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"UploadDocs.js","names":["UploadProperties","id","doc","type","status","acceptedFileTypes","filesAmountLimit","fileMaxSize","title","text","download","allowDuplicates","skeleton","AcceptedFileTypeProperties","fileType","UploadEvents","onChange","onFileDelete","onFileClick"],"sources":["../../../../src/components/upload/UploadDocs.ts"],"sourcesContent":["import { PropertiesTableProps } from '../../shared/types'\n\nexport const UploadProperties: PropertiesTableProps = {\n id: {\n doc: 'Unique id used with the useUpload hook to manage the files. Needed when wanting to connect with the useUpload hook.',\n type: ['string', 'Function', 'Object', 'React.Context'],\n status: 'optional',\n },\n acceptedFileTypes: {\n doc: 'List of accepted file types. Either as string or [AcceptedFileType](/uilib/components/upload/properties/#acceptedfiletype). When providing a list of [AcceptedFileType](/uilib/components/upload/properties/#acceptedfiletype), the accepted file types will be presented in a table(see [example](/uilib/components/upload/demos/#upload-with-file-max-size-based-on-file-type)).',\n type: ['Array<string>', 'Array<AcceptedFileType>'],\n status: 'required',\n },\n filesAmountLimit: {\n doc: 'Defines the amount of files the user can select and upload. Defaults to 100.',\n type: 'number',\n status: 'optional',\n },\n fileMaxSize: {\n doc: 'Defines the max file size of each file in MB. Use either `0` or `false` to disable. Defaults to 5 MB.',\n type: ['number', 'false'],\n status: 'optional',\n },\n title: {\n doc: 'Custom text property. Replaces the default title. Can be disabled using `false`.',\n type: 'string',\n status: 'optional',\n },\n text: {\n doc: 'Custom text property. Replaces the default text. Can be disabled using `false`.',\n type: 'string',\n status: 'optional',\n },\n download: {\n doc: 'Causes the browser to treat all listed files as downloadable instead of opening them in a new browser tab or window. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n allowDuplicates: {\n doc: 'Allows uploading of duplicate files. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n skeleton: {\n doc: 'Skeleton should be applied when loading content.',\n type: 'boolean',\n status: 'optional',\n },\n '[Space](/uilib/layout/space/properties)': {\n doc: 'Spacing properties like `top` or `bottom` are supported.',\n type: ['string', 'object'],\n status: 'optional',\n },\n}\n\nexport const AcceptedFileTypeProperties: PropertiesTableProps = {\n fileType: {\n doc: 'The name of the accepted file type.',\n type: 'string',\n status: 'required',\n },\n fileMaxSize: {\n doc: 'Defines the max file size of the given file type in MB. Use either `0` or `false` to disable. If not provided, it defaults to the value of [Uploads](/uilib/components/upload/properties/#properties) `fileMaxSize` which defaults to 5 MB.',\n type: ['number', 'false'],\n status: 'optional',\n },\n}\n\nexport const UploadEvents: PropertiesTableProps = {\n onChange: {\n doc: 'Will be called on `files` changes made by the user. Access the files with `{ files }` (containing each a `fileItem`).',\n type: 'function',\n status: 'optional',\n },\n onFileDelete: {\n doc: 'Will be called once a file gets deleted by the user. Access the deleted file with `{ fileItem }`.',\n type: 'function',\n status: 'optional',\n },\n onFileClick: {\n doc: 'Will be called once a file gets clicked on by the user. Access the clicked file with `{ fileItem }`.',\n type: 'function',\n status: 'optional',\n },\n}\n"],"mappings":"AAEA,OAAO,MAAMA,gBAAsC,GAAG;EACpDC,EAAE,EAAE;IACFC,GAAG,EAAE,qHAAqH;IAC1HC,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;EACDG,WAAW,EAAE;IACXL,GAAG,EAAE,6OAA6O;IAClPC,IAAI,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;IACzBC,MAAM,EAAE;EACV;AACF,CAAC;AAED,OAAO,MAAMW,YAAkC,GAAG;EAChDC,QAAQ,EAAE;IACRd,GAAG,EAAE,uHAAuH;IAC5HC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDa,YAAY,EAAE;IACZf,GAAG,EAAE,mGAAmG;IACxGC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDc,WAAW,EAAE;IACXhB,GAAG,EAAE,sGAAsG;IAC3GC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"UploadDocs.js","names":["UploadProperties","id","doc","type","status","acceptedFileTypes","filesAmountLimit","fileMaxSize","title","text","download","allowDuplicates","disableDragAndDrop","skeleton","AcceptedFileTypeProperties","fileType","UploadEvents","onChange","onFileDelete","onFileClick","FileItemProperties","file","exists","isLoading","errorMessage","description","removeDeleteButton"],"sources":["../../../../src/components/upload/UploadDocs.ts"],"sourcesContent":["import { PropertiesTableProps } from '../../shared/types'\n\nexport const UploadProperties: PropertiesTableProps = {\n id: {\n doc: 'Unique id used with the useUpload hook to manage the files. Needed when wanting to connect with the useUpload hook.',\n type: ['string', 'Function', 'Object', 'React.Context'],\n status: 'optional',\n },\n acceptedFileTypes: {\n doc: 'List of accepted file types. Either as string or [AcceptedFileType](/uilib/components/upload/properties/#acceptedfiletype). When providing a list of [AcceptedFileType](/uilib/components/upload/properties/#acceptedfiletype), the accepted file types will be presented in a table(see [example](/uilib/components/upload/demos/#upload-with-file-max-size-based-on-file-type)).',\n type: ['Array<string>', 'Array<AcceptedFileType>'],\n status: 'required',\n },\n filesAmountLimit: {\n doc: 'Defines the amount of files the user can select and upload. Defaults to 100.',\n type: 'number',\n status: 'optional',\n },\n fileMaxSize: {\n doc: 'Defines the max file size of each file in MB. Use either `0` or `false` to disable. Defaults to 5 MB.',\n type: ['number', 'false'],\n status: 'optional',\n },\n title: {\n doc: 'Custom text property. Replaces the default title. Can be disabled using `false`.',\n type: 'string',\n status: 'optional',\n },\n text: {\n doc: 'Custom text property. Replaces the default text. Can be disabled using `false`.',\n type: 'string',\n status: 'optional',\n },\n download: {\n doc: 'Causes the browser to treat all listed files as downloadable instead of opening them in a new browser tab or window. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n allowDuplicates: {\n doc: 'Allows uploading of duplicate files. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n disableDragAndDrop: {\n doc: 'Disables file drag and drop, by removing the drop zone. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n skeleton: {\n doc: 'Skeleton should be applied when loading content.',\n type: 'boolean',\n status: 'optional',\n },\n '[Space](/uilib/layout/space/properties)': {\n doc: 'Spacing properties like `top` or `bottom` are supported.',\n type: ['string', 'object'],\n status: 'optional',\n },\n}\n\nexport const AcceptedFileTypeProperties: PropertiesTableProps = {\n fileType: {\n doc: 'The name of the accepted file type.',\n type: 'string',\n status: 'required',\n },\n fileMaxSize: {\n doc: 'Defines the max file size of the given file type in MB. Use either `0` or `false` to disable. If not provided, it defaults to the value of [Uploads](/uilib/components/upload/properties/#properties) `fileMaxSize` which defaults to 5 MB.',\n type: ['number', 'false'],\n status: 'optional',\n },\n}\n\nexport const UploadEvents: PropertiesTableProps = {\n onChange: {\n doc: 'Will be called on `files` changes made by the user. Access the files with `{ files }` (containing each a `fileItem`).',\n type: 'function',\n status: 'optional',\n },\n onFileDelete: {\n doc: 'Will be called once a file gets deleted by the user. Access the deleted file with `{ fileItem }`.',\n type: 'function',\n status: 'optional',\n },\n onFileClick: {\n doc: 'Will be called once a file gets clicked on by the user. Access the clicked file with `{ fileItem }`.',\n type: 'function',\n status: 'optional',\n },\n}\n\nexport const FileItemProperties: PropertiesTableProps = {\n file: {\n doc: 'The file object. This is the same object as the one returned by the `File` API.',\n type: 'File',\n status: 'required',\n },\n id: {\n doc: 'Unique ID for the file item. This ID is generated by the component and is not user-defined.',\n type: 'string',\n status: 'required',\n },\n exists: {\n doc: 'Indicates if the file item already exists in the list of files. This is useful for distinguishing between new and existing files.',\n type: 'boolean',\n status: 'optional',\n },\n isLoading: {\n doc: 'Indicates if the file item is currently being loaded. This is useful for showing a loading state while the file is being processed.',\n type: 'boolean',\n status: 'optional',\n },\n errorMessage: {\n doc: 'Provide an error message to be displayed. This is useful for indicating issues with the file upload process.',\n type: 'React.ReactNode',\n status: 'optional',\n },\n description: {\n doc: 'Provide a description to be displayed. This is useful for providing additional information about the file.',\n type: 'React.ReactNode',\n status: 'optional',\n },\n removeDeleteButton: {\n doc: 'Set to `true` to remove the delete button from the file item. This is useful for preventing users from deleting files.',\n type: 'boolean',\n status: 'optional',\n },\n}\n"],"mappings":"AAEA,OAAO,MAAMA,gBAAsC,GAAG;EACpDC,EAAE,EAAE;IACFC,GAAG,EAAE,qHAAqH;IAC1HC,IAAI,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,eAAe,CAAC;IACvDC,MAAM,EAAE;EACV,CAAC;EACDC,iBAAiB,EAAE;IACjBH,GAAG,EAAE,oXAAoX;IACzXC,IAAI,EAAE,CAAC,eAAe,EAAE,yBAAyB,CAAC;IAClDC,MAAM,EAAE;EACV,CAAC;EACDE,gBAAgB,EAAE;IAChBJ,GAAG,EAAE,8EAA8E;IACnFC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDG,WAAW,EAAE;IACXL,GAAG,EAAE,uGAAuG;IAC5GC,IAAI,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;IACzBC,MAAM,EAAE;EACV,CAAC;EACDI,KAAK,EAAE;IACLN,GAAG,EAAE,kFAAkF;IACvFC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDK,IAAI,EAAE;IACJP,GAA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