@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
@@ -11,6 +11,7 @@ import Button from '../button/Button';
11
11
  import Icon from '../../components/Icon';
12
12
  import FormStatus from '../../components/FormStatus';
13
13
  import ProgressIndicator from '../../components/progress-indicator';
14
+ import P from '../../elements/P';
14
15
  import { trash as TrashIcon, exclamation_medium as ExclamationIcon, file_png_medium as png, file_jpg_medium as jpg, file_word_medium as doc, file_pdf_medium as pdf, file_xls_medium as xls, file_ppt_medium as ppt, file_csv_medium as csv, file_txt_medium as txt, file_xml_medium as xml, file_medium as file } from '../../icons';
15
16
  import { getPreviousSibling } from '../../shared/component-helper';
16
17
  import useUpload, { isFileEqual } from './useUpload';
@@ -31,7 +32,7 @@ export const fileExtensionImages = {
31
32
  file
32
33
  };
33
34
  const UploadFileListCell = _ref => {
34
- var _div, _FormStatus;
35
+ var _div, _div2, _P, _FormStatus;
35
36
  let {
36
37
  id,
37
38
  uploadFile,
@@ -45,7 +46,9 @@ const UploadFileListCell = _ref => {
45
46
  const {
46
47
  file,
47
48
  errorMessage,
48
- isLoading
49
+ isLoading,
50
+ description,
51
+ removeDeleteButton
49
52
  } = uploadFile;
50
53
  const hasWarning = errorMessage != null;
51
54
  const imageUrl = (file === null || file === void 0 ? void 0 : file.size) > 0 ? URL.createObjectURL(file) : null;
@@ -73,13 +76,7 @@ const UploadFileListCell = _ref => {
73
76
  className: "dnb-upload__file-cell__content__left"
74
77
  }, getFileIcon(file, {
75
78
  isLoading
76
- }, hasWarning), getTitle()), React.createElement("div", null, React.createElement(Button, {
77
- icon: TrashIcon,
78
- variant: "tertiary",
79
- onClick: onDeleteHandler,
80
- icon_position: "left",
81
- disabled: isLoading
82
- }, deleteButtonText))), getWarning());
79
+ }, hasWarning), getTitle()), getDeleteButton()), getWarning());
83
80
  function getTitle() {
84
81
  return isLoading ? _div || (_div = React.createElement("div", {
85
82
  className: "dnb-upload__file-cell__text-container dnb-upload__file-cell__text-container--loading"
@@ -91,14 +88,37 @@ const UploadFileListCell = _ref => {
91
88
  download: download,
92
89
  onClick: onClick,
93
90
  bottom: 0
94
- }));
91
+ }), getDescription());
92
+ }
93
+ function getDeleteButton() {
94
+ if (removeDeleteButton) {
95
+ return null;
96
+ }
97
+ return _div2 || (_div2 = React.createElement("div", null, React.createElement(Button, {
98
+ icon: TrashIcon,
99
+ variant: "tertiary",
100
+ onClick: onDeleteHandler,
101
+ icon_position: "left",
102
+ disabled: isLoading
103
+ }, deleteButtonText)));
104
+ }
105
+ function getDescription() {
106
+ if (!description) {
107
+ return null;
108
+ }
109
+ return _P || (_P = React.createElement(P, {
110
+ className: "dnb-upload__text"
111
+ }, description));
95
112
  }
96
113
  function getWarning() {
97
- return hasWarning ? _FormStatus || (_FormStatus = React.createElement(FormStatus, {
114
+ if (!hasWarning) {
115
+ return null;
116
+ }
117
+ return _FormStatus || (_FormStatus = React.createElement(FormStatus, {
98
118
  top: "small",
99
119
  text: errorMessage,
100
120
  stretch: true
101
- })) : null;
121
+ }));
102
122
  }
103
123
  };
104
124
  export default UploadFileListCell;
@@ -1 +1 @@
1
- {"version":3,"file":"UploadFileListCell.js","names":["React","useCallback","useRef","classnames","Button","Icon","FormStatus","ProgressIndicator","trash","TrashIcon","exclamation_medium","ExclamationIcon","file_png_medium","png","file_jpg_medium","jpg","file_word_medium","doc","file_pdf_medium","pdf","file_xls_medium","xls","file_ppt_medium","ppt","file_csv_medium","csv","file_txt_medium","txt","file_xml_medium","xml","file_medium","file","getPreviousSibling","useUpload","isFileEqual","getFileTypeFromExtension","UploadFileLink","fileExtensionImages","docx","odt","UploadFileListCell","_ref","_div","_FormStatus","id","uploadFile","onDelete","onClick","loadingText","deleteButtonText","download","allowDuplicates","errorMessage","isLoading","hasWarning","imageUrl","size","URL","createObjectURL","cellRef","exists","useExistsHighlight","isDuplicate","handleDisappearFocus","_getPreviousSibling","cellElement","current","focusElement","querySelector","focus","preventScroll","onDeleteHandler","createElement","className","ref","getFileIcon","getTitle","icon","variant","icon_position","disabled","getWarning","text","name","href","bottom","top","stretch","internalFiles","updateExists","useState","timerRef","clearTimers","clearTimeout","useEffect","some","_ref2","f","setTimeout","loading","_loading$size","_Icon","iconFileType","mimeParts","type","split","Object","prototype","hasOwnProperty","call"],"sources":["../../../../src/components/upload/UploadFileListCell.tsx"],"sourcesContent":["import React, { useCallback, useRef } from 'react'\nimport classnames from 'classnames'\n\n// Components\nimport Button from '../button/Button'\nimport Icon from '../../components/Icon'\nimport FormStatus from '../../components/FormStatus'\nimport ProgressIndicator from '../../components/progress-indicator'\n\n// Icons\nimport {\n trash as TrashIcon,\n exclamation_medium as ExclamationIcon,\n file_png_medium as png,\n file_jpg_medium as jpg,\n file_word_medium as doc,\n file_pdf_medium as pdf,\n file_xls_medium as xls,\n file_ppt_medium as ppt,\n file_csv_medium as csv,\n file_txt_medium as txt,\n file_xml_medium as xml,\n file_medium as file,\n} from '../../icons'\nimport { UploadFile, UploadFileNative } from './types'\n\n// Shared\nimport { getPreviousSibling } from '../../shared/component-helper'\nimport useUpload, { isFileEqual } from './useUpload'\nimport { getFileTypeFromExtension } from './UploadVerify'\nimport UploadFileLink from './UploadFileListLink'\nimport { ProgressIndicatorAllProps } from '../progress-indicator/types'\n\n// Will be deprecated - and then default to only showing the file icon,\n// and not file icon per file extension type\nexport const fileExtensionImages = {\n png,\n jpg,\n pdf,\n doc,\n docx: doc,\n odt: doc,\n xls,\n ppt,\n csv,\n txt,\n xml,\n file,\n}\n\nexport type UploadFileListCellProps = {\n id: string\n\n /**\n * Uploaded file\n */\n uploadFile: UploadFile | UploadFileNative\n\n /**\n * Calls onDelete when clicking the delete button\n */\n onDelete: () => void\n\n /**\n * Calls onClick when clicking the file name\n */\n onClick?: () => void\n\n /**\n * Causes the browser to treat all listed files as downloadable instead of opening them in a new browser tab or window.\n * Default: false\n */\n download?: boolean\n\n /**\n * Allows uploading of duplicate files.\n * Default: false\n */\n allowDuplicates?: boolean\n\n /**\n * Text\n */\n loadingText: React.ReactNode\n deleteButtonText: React.ReactNode\n}\n\nconst UploadFileListCell = ({\n id,\n uploadFile,\n onDelete,\n onClick,\n loadingText,\n deleteButtonText,\n download,\n allowDuplicates,\n}: UploadFileListCellProps) => {\n const { file, errorMessage, isLoading } = uploadFile\n const hasWarning = errorMessage != null\n\n const imageUrl = file?.size > 0 ? URL.createObjectURL(file) : null\n const cellRef = useRef<HTMLLIElement>()\n const exists = useExistsHighlight(id, file)\n const isDuplicate = !allowDuplicates && exists\n\n const handleDisappearFocus = useCallback(() => {\n const cellElement = cellRef.current\n const focusElement = getPreviousSibling(\n '.dnb-upload',\n cellElement\n )?.querySelector('.dnb-upload__file-input-button') as HTMLButtonElement\n focusElement?.focus({ preventScroll: true })\n }, [cellRef])\n\n const onDeleteHandler = useCallback(() => {\n handleDisappearFocus()\n\n onDelete()\n }, [handleDisappearFocus, onDelete])\n\n return (\n <li\n className={classnames(\n 'dnb-upload__file-cell',\n hasWarning && 'dnb-upload__file-cell--warning',\n isDuplicate && 'dnb-upload__file-cell--highlight'\n )}\n ref={cellRef}\n >\n <div className=\"dnb-upload__file-cell__content\">\n <div className=\"dnb-upload__file-cell__content__left\">\n {getFileIcon(file, { isLoading }, hasWarning)}\n {getTitle()}\n </div>\n <div>\n <Button\n icon={TrashIcon}\n variant=\"tertiary\"\n onClick={onDeleteHandler}\n icon_position=\"left\"\n disabled={isLoading}\n >\n {deleteButtonText}\n </Button>\n </div>\n </div>\n\n {getWarning()}\n </li>\n )\n\n function getTitle() {\n return isLoading ? (\n <div\n className={classnames(\n 'dnb-upload__file-cell__text-container',\n 'dnb-upload__file-cell__text-container--loading'\n )}\n >\n {loadingText}\n </div>\n ) : (\n <div className=\"dnb-upload__file-cell__text-container\">\n <UploadFileLink\n text={file.name}\n href={imageUrl}\n download={download}\n onClick={onClick}\n bottom={0}\n />\n </div>\n )\n }\n\n function getWarning() {\n return hasWarning ? (\n <FormStatus top=\"small\" text={errorMessage} stretch />\n ) : null\n }\n}\n\nexport default UploadFileListCell\n\nfunction useExistsHighlight(id: string, file: File) {\n const { internalFiles } = useUpload(id)\n const [exists, updateExists] = React.useState(false)\n const timerRef = React.useRef<NodeJS.Timer>()\n\n const clearTimers = () => {\n clearTimeout(timerRef.current)\n }\n\n React.useEffect(() => {\n const exists = internalFiles.some(({ exists, file: f }) => {\n return exists && isFileEqual(file, f)\n })\n\n if (exists) {\n updateExists(true)\n clearTimers()\n timerRef.current = setTimeout(() => updateExists(false), 1500) // transition-duration in CSS\n }\n\n return clearTimers\n }, [file, internalFiles])\n\n return exists\n}\n\nexport function getFileIcon(\n file: File,\n loading?: {\n isLoading: UploadFile['isLoading']\n size?: ProgressIndicatorAllProps['size']\n },\n hasWarning?: boolean\n) {\n if (loading?.isLoading) {\n return <ProgressIndicator size={loading?.size ?? 'default'} />\n }\n\n if (hasWarning) return <Icon icon={ExclamationIcon} />\n\n let iconFileType = getFileTypeFromExtension(file)\n\n if (!iconFileType) {\n const mimeParts = file.type.split('/')\n iconFileType =\n fileExtensionImages[mimeParts[0]] ||\n fileExtensionImages[mimeParts[1]]\n }\n\n if (\n !Object.prototype.hasOwnProperty.call(\n fileExtensionImages,\n iconFileType\n )\n ) {\n iconFileType = 'file'\n }\n\n return <Icon icon={fileExtensionImages[iconFileType]} />\n}\n"],"mappings":";;;;;;;AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,MAAM,QAAQ,OAAO;AAClD,OAAOC,UAAU,MAAM,YAAY;AAGnC,OAAOC,MAAM,MAAM,kBAAkB;AACrC,OAAOC,IAAI,MAAM,uBAAuB;AACxC,OAAOC,UAAU,MAAM,6BAA6B;AACpD,OAAOC,iBAAiB,MAAM,qCAAqC;AAGnE,SACEC,KAAK,IAAIC,SAAS,EAClBC,kBAAkB,IAAIC,eAAe,EACrCC,eAAe,IAAIC,GAAG,EACtBC,eAAe,IAAIC,GAAG,EACtBC,gBAAgB,IAAIC,GAAG,EACvBC,eAAe,IAAIC,GAAG,EACtBC,eAAe,IAAIC,GAAG,EACtBC,eAAe,IAAIC,GAAG,EACtBC,eAAe,IAAIC,GAAG,EACtBC,eAAe,IAAIC,GAAG,EACtBC,eAAe,IAAIC,GAAG,EACtBC,WAAW,IAAIC,IAAI,QACd,aAAa;AAIpB,SAASC,kBAAkB,QAAQ,+BAA+B;AAClE,OAAOC,SAAS,IAAIC,WAAW,QAAQ,aAAa;AACpD,SAASC,w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a,CAAC,CAAC;EAEzB,OAAO5B,MAAM;AACf;AAEA,OAAO,SAASe,WAAWA,CACzB5C,IAAU,EACVoE,OAGC,EACD7C,UAAoB,EACpB;EACA,IAAI6C,OAAO,aAAPA,OAAO,eAAPA,OAAO,CAAE9C,SAAS,EAAE;IAAA,IAAA+C,aAAA;IACtB,OAAOpG,KAAA,CAAAwE,aAAA,CAACjE,iBAAiB;MAACiD,IAAI,GAAA4C,aAAA,GAAED,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAE3C,IAAI,cAAA4C,aAAA,cAAAA,aAAA,GAAI;IAAU,CAAE,CAAC;EAChE;EAEA,IAAI9C,UAAU,EAAE,OAAA+C,KAAA,KAAAA,KAAA,GAAOrG,KAAA,CAAAwE,aAAA,CAACnE,IAAI;IAACwE,IAAI,EAAElE;EAAgB,CAAE,CAAC;EAEtD,IAAI2F,YAAY,GAAGnE,wBAAwB,CAACJ,IAAI,CAAC;EAEjD,IAAI,CAACuE,YAAY,EAAE;IACjB,MAAMC,SAAS,GAAGxE,IAAI,CAACyE,IAAI,CAACC,KAAK,CAAC,GAAG,CAAC;IACtCH,YAAY,GACVjE,mBAAmB,CAACkE,SAAS,CAAC,CAAC,CAAC,CAAC,IACjClE,mBAAmB,CAACkE,SAAS,CAAC,CAAC,CAAC,CAAC;EACrC;EAEA,IACE,CAACG,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CACnCxE,mBAAmB,EACnBiE,YACF,CAAC,EACD;IACAA,YAAY,GAAG,MAAM;EACvB;EAEA,OAAOtG,KAAA,CAAAwE,aAAA,CAACnE,IAAI;IAACwE,IAAI,EAAExC,mBAAmB,CAACiE,YAAY;EAAE,CAAE,CAAC;AAC1D","ignoreList":[]}
1
+ {"version":3,"file":"UploadFileListCell.js","names":["React","useCallback","useRef","classnames","Button","Icon","FormStatus","ProgressIndicator","P","trash","TrashIcon","exclamation_medium","ExclamationIcon","file_png_medium","png","file_jpg_medium","jpg","file_word_medium","doc","file_pdf_medium","pdf","file_xls_medium","xls","file_ppt_medium","ppt","file_csv_medium","csv","file_txt_medium","txt","file_xml_medium","xml","file_medium","file","getPreviousSibling","useUpload","isFileEqual","getFileTypeFromExtension","UploadFileLink","fileExtensionImages","docx","odt","UploadFileListCell","_ref","_div","_div2","_P","_FormStatus","id","uploadFile","onDelete","onClick","loadingText","deleteButtonText","download","allowDuplicates","errorMessage","isLoading","description","removeDeleteButton","hasWarning","imageUrl","size","URL","createObjectURL","cellRef","exists","useExistsHighlight","isDuplicate","handleDisappearFocus","_getPreviousSibling","cellElement","current","focusElement","querySelector","focus","preventScroll","onDeleteHandler","createElement","className","ref","getFileIcon","getTitle","getDeleteButton","getWarning","text","name","href","bottom","getDescription","icon","variant","icon_position","disabled","top","stretch","internalFiles","updateExists","useState","timerRef","clearTimers","clearTimeout","useEffect","some","_ref2","f","setTimeout","loading","_loading$size","_Icon","iconFileType","mimeParts","type","split","Object","prototype","hasOwnProperty","call"],"sources":["../../../../src/components/upload/UploadFileListCell.tsx"],"sourcesContent":["import React, { useCallback, useRef } from 'react'\nimport classnames from 'classnames'\n\n// Components\nimport Button from '../button/Button'\nimport Icon from '../../components/Icon'\nimport FormStatus from '../../components/FormStatus'\nimport ProgressIndicator from '../../components/progress-indicator'\n\n// Elements\nimport P from '../../elements/P'\n\n// Icons\nimport {\n trash as TrashIcon,\n exclamation_medium as ExclamationIcon,\n file_png_medium as png,\n file_jpg_medium as jpg,\n file_word_medium as doc,\n file_pdf_medium as pdf,\n file_xls_medium as xls,\n file_ppt_medium as ppt,\n file_csv_medium as csv,\n file_txt_medium as txt,\n file_xml_medium as xml,\n file_medium as file,\n} from '../../icons'\nimport { UploadFile, UploadFileNative } from './types'\n\n// Shared\nimport { getPreviousSibling } from '../../shared/component-helper'\nimport useUpload, { isFileEqual } from './useUpload'\nimport { getFileTypeFromExtension } from './UploadVerify'\nimport UploadFileLink from './UploadFileListLink'\nimport { ProgressIndicatorAllProps } from '../progress-indicator/types'\n\n// Will be deprecated - and then default to only showing the file icon,\n// and not file icon per file extension type\nexport const fileExtensionImages = {\n png,\n jpg,\n pdf,\n doc,\n docx: doc,\n odt: doc,\n xls,\n ppt,\n csv,\n txt,\n xml,\n file,\n}\n\nexport type UploadFileListCellProps = {\n id: string\n\n /**\n * Uploaded file\n */\n uploadFile: UploadFile | UploadFileNative\n\n /**\n * Calls onDelete when clicking the delete button\n */\n onDelete: () => void\n\n /**\n * Calls onClick when clicking the file name\n */\n onClick?: () => void\n\n /**\n * Causes the browser to treat all listed files as downloadable instead of opening them in a new browser tab or window.\n * Default: false\n */\n download?: boolean\n\n /**\n * Allows uploading of duplicate files.\n * Default: false\n */\n allowDuplicates?: boolean\n\n /**\n * Text\n */\n loadingText: React.ReactNode\n deleteButtonText: React.ReactNode\n}\n\nconst UploadFileListCell = ({\n id,\n uploadFile,\n onDelete,\n onClick,\n loadingText,\n deleteButtonText,\n download,\n allowDuplicates,\n}: UploadFileListCellProps) => {\n const {\n file,\n errorMessage,\n isLoading,\n description,\n removeDeleteButton,\n } = uploadFile\n const hasWarning = errorMessage != null\n\n const imageUrl = file?.size > 0 ? URL.createObjectURL(file) : null\n const cellRef = useRef<HTMLLIElement>()\n const exists = useExistsHighlight(id, file)\n const isDuplicate = !allowDuplicates && exists\n\n const handleDisappearFocus = useCallback(() => {\n const cellElement = cellRef.current\n const focusElement = getPreviousSibling(\n '.dnb-upload',\n cellElement\n )?.querySelector('.dnb-upload__file-input-button') as HTMLButtonElement\n focusElement?.focus({ preventScroll: true })\n }, [cellRef])\n\n const onDeleteHandler = useCallback(() => {\n handleDisappearFocus()\n\n onDelete()\n }, [handleDisappearFocus, onDelete])\n\n return (\n <li\n className={classnames(\n 'dnb-upload__file-cell',\n hasWarning && 'dnb-upload__file-cell--warning',\n isDuplicate && 'dnb-upload__file-cell--highlight'\n )}\n ref={cellRef}\n >\n <div className=\"dnb-upload__file-cell__content\">\n <div className=\"dnb-upload__file-cell__content__left\">\n {getFileIcon(file, { isLoading }, hasWarning)}\n {getTitle()}\n </div>\n {getDeleteButton()}\n </div>\n {getWarning()}\n </li>\n )\n\n function getTitle() {\n return isLoading ? (\n <div\n className={classnames(\n 'dnb-upload__file-cell__text-container',\n 'dnb-upload__file-cell__text-container--loading'\n )}\n >\n {loadingText}\n </div>\n ) : (\n <div className=\"dnb-upload__file-cell__text-container\">\n <UploadFileLink\n text={file.name}\n href={imageUrl}\n download={download}\n onClick={onClick}\n bottom={0}\n />\n {getDescription()}\n </div>\n )\n }\n\n function getDeleteButton() {\n if (removeDeleteButton) {\n return null\n }\n return (\n <div>\n <Button\n icon={TrashIcon}\n variant=\"tertiary\"\n onClick={onDeleteHandler}\n icon_position=\"left\"\n disabled={isLoading}\n >\n {deleteButtonText}\n </Button>\n </div>\n )\n }\n\n function getDescription() {\n if (!description) {\n return null\n }\n return <P className=\"dnb-upload__text\">{description}</P>\n }\n\n function getWarning() {\n if (!hasWarning) {\n return null\n }\n return <FormStatus top=\"small\" text={errorMessage} stretch />\n }\n}\n\nexport default UploadFileListCell\n\nfunction useExistsHighlight(id: string, file: File) {\n const { internalFiles } = useUpload(id)\n const [exists, updateExists] = React.useState(false)\n const timerRef = React.useRef<NodeJS.Timer>()\n\n const clearTimers = () => {\n clearTimeout(timerRef.current)\n }\n\n React.useEffect(() => {\n const exists = internalFiles.some(({ exists, file: f }) => {\n return exists && isFileEqual(file, f)\n })\n\n if (exists) {\n updateExists(true)\n clearTimers()\n timerRef.current = setTimeout(() => updateExists(false), 1500) // transition-duration in CSS\n }\n\n return clearTimers\n }, [file, internalFiles])\n\n return exists\n}\n\nexport function getFileIcon(\n file: File,\n loading?: {\n isLoading: UploadFile['isLoading']\n size?: ProgressIndicatorAllProps['size']\n },\n hasWarning?: boolean\n) {\n if (loading?.isLoading) {\n return <ProgressIndicator size={loading?.size ?? 'default'} />\n }\n\n if (hasWarning) return <Icon icon={ExclamationIcon} />\n\n let iconFileType = getFileTypeFromExtension(file)\n\n if (!iconFileType) {\n const mimeParts = file.type.split('/')\n iconFileType =\n fileExtensionImages[mimeParts[0]] ||\n fileExtensionImages[mimeParts[1]]\n }\n\n if (\n !Object.prototype.hasOwnProperty.call(\n fileExtensionImages,\n iconFileType\n )\n ) {\n iconFileType = 'file'\n }\n\n return <Icon icon={fileExtensionImages[iconFileType]} />\n}\n"],"mappings":";;;;;;;AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,MAAM,QAAQ,OAAO;AAClD,OAAOC,UAAU,MAAM,YAAY;AAGnC,OAAOC,MAAM,MAAM,kBAAkB;AACrC,OAAOC,IAAI,MAAM,uBAAuB;AACxC,OAAOC,UAAU,MAAM,6BAA6B;AACpD,OAAOC,iBAAiB,MAAM,qCAAqC;AAGnE,OAAOC,CAAC,MAAM,kBAAkB;AAGhC,SACEC,KAAK,IAAIC,SAAS,EAClBC,kBAAkB,IAAIC,eAAe,EACrCC,eAAe,IAAIC,GAAG,EACtBC,eAAe,IAAIC,GAAG,EACtBC,gBAAgB,IAAIC,GAAG,EACvBC,eAAe,IAAIC,GAAG,EACtBC,eAAe,IAAIC,GAAG,EACtBC,eAAe,IAAIC,GAAG,EACtBC,eAAe,IAAIC,GAAG,EACtBC,eAAe,IAAIC,GAAG,EACtBC,eAAe,IAAIC,GAAG,EACtBC,WAAW,IAAIC,IAAI,QACd,aAAa;AAIpB,SAASC,kBAAkB,QAAQ,+BAA+B;AAClE,OAAOC,SAAS,IAAIC,WAAW,QAAQ,aAAa;AACpD,SAASC,wBAAwB,QAAQ,gBAAgB;AACzD,OAAOC,cAAc,MAAM,sBAAsB;AAKjD,OAAO,MAAMC,mBAAmB,GAAG;EACjCxB,GAAG;EACHE,GAAG;EACHI,GAAG;EACHF,GAAG;EACHqB,IAAI,EAAErB,GAAG;EACTsB,GAAG,EAAEtB,GAAG;EACRI,GAAG;EACHE,GAAG;EACHE,GAAG;EACHE,GAAG;EACHE,GAAG;EACHE;AACF,CAAC;AAuCD,MAAMS,kBAAkB,GAAGC,IAAA,IASI;EAAA,IA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export type UploadProps = {
60
60
  * Default: false
61
61
  */
62
62
  allowDuplicates?: boolean;
63
+ /**
64
+ * Disables file drag and drop, by removing the drop zone.
65
+ * Default: false
66
+ */
67
+ disableDragAndDrop?: boolean;
63
68
  /**
64
69
  * Custom text properties
65
70
  */
@@ -90,5 +95,7 @@ export type UploadFile = {
90
95
  exists: boolean;
91
96
  isLoading?: boolean;
92
97
  errorMessage?: React.ReactNode;
98
+ description?: React.ReactNode;
99
+ removeDeleteButton?: boolean;
93
100
  };
94
101
  export type UploadFileNative = Omit<UploadFile, 'id' | 'exists'> & Partial<Pick<UploadFile, 'id' | 'exists'>>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../../../src/components/upload/types.ts"],"sourcesContent":["import React from 'react'\nimport type { SkeletonShow } from '../skeleton/Skeleton'\nimport type { LocaleProps, SpacingProps } from '../../shared/types'\nimport type { SharedStateId } from '../../shared/helpers/useSharedState'\n\nexport type UploadAcceptedFileTypes = string[]\n\nexport type UploadAcceptedFileTypesWithFileMaxSize =\n UploadAcceptedFileTypeObject[]\n\nexport type UploadAcceptedFileTypeObject = {\n fileType: string\n fileMaxSize?: number | false\n}\n\nexport type UploadProps = {\n /**\n * unique id used with the useUpload hook to manage the files\n */\n id?: SharedStateId\n\n /**\n * list of accepted file types.\n */\n acceptedFileTypes:\n | UploadAcceptedFileTypes\n | UploadAcceptedFileTypesWithFileMaxSize\n\n /**\n * Skeleton should be applied when loading content\n * Default: null\n */\n skeleton?: SkeletonShow\n\n /**\n * Defines the amount of files the user can select and upload\n * Default: 100\n */\n filesAmountLimit?: number\n\n /**\n * Defines the max file size of each file in MB. Use either `0` or `false` to disable.\n * Default: 5 MB\n */\n fileMaxSize?: number | false\n\n /**\n * will be called on `files` changes made by the user. Access the files with `{ files }`.\n */\n onChange?: ({ files }: { files: Array<UploadFile> }) => void\n\n /**\n * will be called once a file gets deleted by the user. Access the deleted file with `{ fileItem }`.\n */\n onFileDelete?: ({\n fileItem,\n }: {\n fileItem: UploadFile\n }) => void | Promise<void>\n\n /**\n * Will be called once a file gets clicked on by the user. Access the clicked file with `{ fileItem }`.\n */\n onFileClick?: ({\n fileItem,\n }: {\n fileItem: UploadFile\n }) => void | Promise<void>\n\n /**\n * Causes the browser to treat all listed files as downloadable instead of opening them in a new browser tab or window.\n * Default: false\n */\n download?: boolean\n\n /**\n * Allows uploading of duplicate files.\n * Default: false\n */\n allowDuplicates?: boolean\n\n /**\n * Custom text properties\n */\n title?: React.ReactNode\n text?: React.ReactNode\n fileTypeTableCaption?: React.ReactNode\n fileTypeDescription?: React.ReactNode\n fileSizeDescription?: React.ReactNode\n fileAmountDescription?: React.ReactNode\n fileSizeContent?: React.ReactNode\n buttonText?: React.ReactNode\n errorLargeFile?: React.ReactNode\n errorUnsupportedFile?: React.ReactNode\n errorAmountLimit?: React.ReactNode\n loadingText?: React.ReactNode\n deleteButton?: React.ReactNode\n fileListAriaLabel?: string\n children?: React.ReactNode\n}\n\nexport type UploadAllProps = UploadProps &\n SpacingProps &\n LocaleProps &\n Omit<React.HTMLProps<HTMLElement>, 'onChange' | 'title'>\n\nexport type UploadContextProps = {\n id?: string\n onInputUpload: (files: Array<UploadFileNative>) => void\n} & Partial<UploadAllProps>\n\nexport type UploadFile = {\n file: File\n id: string\n exists: boolean\n isLoading?: boolean\n errorMessage?: React.ReactNode\n}\n\nexport type UploadFileNative = Omit<UploadFile, 'id' | 'exists'> &\n Partial<Pick<UploadFile, 'id' | 'exists'>>\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../../src/components/upload/types.ts"],"sourcesContent":["import React from 'react'\nimport type { SkeletonShow } from '../skeleton/Skeleton'\nimport type { LocaleProps, SpacingProps } from '../../shared/types'\nimport type { SharedStateId } from '../../shared/helpers/useSharedState'\n\nexport type UploadAcceptedFileTypes = string[]\n\nexport type UploadAcceptedFileTypesWithFileMaxSize =\n UploadAcceptedFileTypeObject[]\n\nexport type UploadAcceptedFileTypeObject = {\n fileType: string\n fileMaxSize?: number | false\n}\n\nexport type UploadProps = {\n /**\n * unique id used with the useUpload hook to manage the files\n */\n id?: SharedStateId\n\n /**\n * list of accepted file types.\n */\n acceptedFileTypes:\n | UploadAcceptedFileTypes\n | UploadAcceptedFileTypesWithFileMaxSize\n\n /**\n * Skeleton should be applied when loading content\n * Default: null\n */\n skeleton?: SkeletonShow\n\n /**\n * Defines the amount of files the user can select and upload\n * Default: 100\n */\n filesAmountLimit?: number\n\n /**\n * Defines the max file size of each file in MB. Use either `0` or `false` to disable.\n * Default: 5 MB\n */\n fileMaxSize?: number | false\n\n /**\n * will be called on `files` changes made by the user. Access the files with `{ files }`.\n */\n onChange?: ({ files }: { files: Array<UploadFile> }) => void\n\n /**\n * will be called once a file gets deleted by the user. Access the deleted file with `{ fileItem }`.\n */\n onFileDelete?: ({\n fileItem,\n }: {\n fileItem: UploadFile\n }) => void | Promise<void>\n\n /**\n * Will be called once a file gets clicked on by the user. Access the clicked file with `{ fileItem }`.\n */\n onFileClick?: ({\n fileItem,\n }: {\n fileItem: UploadFile\n }) => void | Promise<void>\n\n /**\n * Causes the browser to treat all listed files as downloadable instead of opening them in a new browser tab or window.\n * Default: false\n */\n download?: boolean\n\n /**\n * Allows uploading of duplicate files.\n * Default: false\n */\n allowDuplicates?: boolean\n\n /**\n * Disables file drag and drop, by removing the drop zone.\n * Default: false\n */\n disableDragAndDrop?: boolean\n\n /**\n * Custom text properties\n */\n title?: React.ReactNode\n text?: React.ReactNode\n fileTypeTableCaption?: React.ReactNode\n fileTypeDescription?: React.ReactNode\n fileSizeDescription?: React.ReactNode\n fileAmountDescription?: React.ReactNode\n fileSizeContent?: React.ReactNode\n buttonText?: React.ReactNode\n errorLargeFile?: React.ReactNode\n errorUnsupportedFile?: React.ReactNode\n errorAmountLimit?: React.ReactNode\n loadingText?: React.ReactNode\n deleteButton?: React.ReactNode\n fileListAriaLabel?: string\n children?: React.ReactNode\n}\n\nexport type UploadAllProps = UploadProps &\n SpacingProps &\n LocaleProps &\n Omit<React.HTMLProps<HTMLElement>, 'onChange' | 'title'>\n\nexport type UploadContextProps = {\n id?: string\n onInputUpload: (files: Array<UploadFileNative>) => void\n} & Partial<UploadAllProps>\n\nexport type UploadFile = {\n file: File\n id: string\n exists: boolean\n isLoading?: boolean\n errorMessage?: React.ReactNode\n description?: React.ReactNode\n removeDeleteButton?: boolean\n}\n\nexport type UploadFileNative = Omit<UploadFile, 'id' | 'exists'> &\n Partial<Pick<UploadFile, 'id' | 'exists'>>\n"],"mappings":"","ignoreList":[]}
@@ -181,12 +181,12 @@ export const autocompleteProperties = {
181
181
  },
182
182
  status: {
183
183
  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.',
184
- type: 'string',
184
+ type: ['error', 'info', 'boolean'],
185
185
  status: 'optional'
186
186
  },
187
187
  status_state: {
188
188
  doc: 'Defines the state of the status. Currently, there are two statuses `[error, info]`. Defaults to `error`.',
189
- type: 'string',
189
+ type: ['error', 'info'],
190
190
  status: 'optional'
191
191
  },
192
192
  status_props: {
@@ -226,7 +226,7 @@ export const autocompleteProperties = {
226
226
  },
227
227
  input_ref: {
228
228
  doc: 'Use a React.Ref to get access to the `input` DOM element.',
229
- type: 'React.Ref',
229
+ type: 'React.RefObject',
230
230
  status: 'optional'
231
231
  },
232
232
  input_element: {
@@ -1 +1 @@
1
- {"version":3,"file":"AutocompleteDocs.js","names":["autocompleteProperties","mode","doc","type","status","input_value","placeholder","title","disable_filter","disable_highlighting","disable_reorder","search_numbers","search_in_word_index","keep_value","keep_selection","keep_value_and_selection","prevent_selection","show_clear_button","icon","icon_size","icon_position","input_icon","triangle_position","size","drawer_class","show_submit_button","align_autocomplete","no_options","aria_live_options","show_all","indicator_label","show_options_sr","selected_sr","submit_button_title","submit_button_icon","submit_element","opened","open_on_focus","stretch","skip_portal","status_state","status_props","globalStatus","label","label_direction","label_sr_only","suffix","skeleton","input_ref","input_element","AutocompleteEvents","on_type","on_focus","on_blur","on_change","on_select","on_show","on_hide"],"sources":["../../../../src/components/autocomplete/AutocompleteDocs.ts"],"sourcesContent":["import { PropertiesTableProps } from '../../shared/types'\n\nexport const autocompleteProperties: PropertiesTableProps = {\n mode: {\n doc: 'If set to `async`, it prevents showing the \"no options\" message during typing / filtering. Defaults to `sync`.',\n type: 'string',\n status: 'optional',\n },\n input_value: {\n doc: 'Lets you define a custom input value.',\n type: 'string',\n status: 'optional',\n },\n placeholder: {\n doc: 'Use this to define the pre-filled placeholder text in the input. Defaults to `title=\"Skriv og velg\"`.',\n type: 'string',\n status: 'optional',\n },\n title: {\n doc: 'Give a title to let the user know what they have to do. Defaults to `Skriv og få alternativer`.',\n type: 'React.Node',\n status: 'optional',\n },\n disable_filter: {\n doc: 'If set to `true`, word highlighting will still be active, but no options will be filtered out. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n disable_highlighting: {\n doc: 'If set to `true`, word highlighting will be disabled, but the options will still get filtered. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n disable_reorder: {\n doc: 'If set to `true`, reordering of search results will be disabled. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n search_numbers: {\n doc: 'If set to `true` and `search_in_word_index` is not set, the user will be able to more easily search and filter e.g. bank account numbers. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n search_in_word_index: {\n doc: 'This gives you the possibility to change the threshold number, which defines from what word on we search \"inside words\". Defaults to `3`.',\n type: 'boolean',\n status: 'optional',\n },\n keep_value: {\n doc: 'Use `true` to not remove the typed value on input blur, if it is invalid. By default, the typed value will disappear / replaced by a selected value from the data list during the input field blur. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n keep_selection: {\n doc: 'Use `true` to not remove selected item on input blur, when the input value is empty. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n keep_value_and_selection: {\n doc: 'Like `keep_value` – but would not reset to the selected value during input field blur. Also, the selected value would still be kept. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n prevent_selection: {\n doc: 'If set to `true`, no permanent selection will be made. Also, the typed value will not disappear on input blur (like `keep_value`). Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n show_clear_button: {\n doc: 'If set to `true`, a clear button is shown inside the input field. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n icon: {\n doc: 'To be included in the autocomplete input.',\n type: ['string', 'React.Node'],\n status: 'optional',\n },\n icon_size: {\n doc: 'Change the size of the icon pragmatically.',\n type: 'string',\n status: 'optional',\n },\n icon_position: {\n doc: 'Position of the icon inside the autocomplete. Set to `left` or `right`. Defaults to `left`.',\n type: 'string',\n status: 'optional',\n },\n input_icon: {\n doc: 'Same as `icon`.',\n type: ['string', 'React.Node'],\n status: 'optional',\n },\n triangle_position: {\n doc: 'Position of icon arrow / triangle the drawer. Set to `left` or `right`. Defaults to `left`.',\n type: 'string',\n status: 'optional',\n },\n size: {\n doc: 'Define the height of the Autocomplete. Can be set to `small`, `default`, `medium` and `large`. Defaults to `default`.',\n type: 'string',\n status: 'optional',\n },\n drawer_class: {\n doc: 'Define a custom class for the internal drawer-list. This makes it possible more easily customize the drawer-list style with styled-components and the `css` style method. Defaults to `null`.',\n type: 'string',\n status: 'optional',\n },\n show_submit_button: {\n doc: 'Use `true` to show a Autocomplete button to toggle the [DrawerList](/uilib/components/fragments/drawer-list). Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n align_autocomplete: {\n doc: 'Use `right` to change the options alignment direction. Defaults to `left`.',\n type: 'string',\n status: 'optional',\n },\n no_options: {\n doc: 'Text show in the \"no options\" item. Defaults to `Ingen alternativer`.',\n type: 'boolean',\n status: 'optional',\n },\n aria_live_options: {\n doc: 'Text read out by screen readers. This way users with screen readers know how many options they got during typing. Defaults to `%s alternativer`.',\n type: 'React.Node',\n status: 'optional',\n },\n show_all: {\n doc: 'Text that lets a user unravel all the available options. Defaults to `Vis alt`.',\n type: 'boolean',\n status: 'optional',\n },\n indicator_label: {\n doc: 'Text show on indicator \"options\" item. Defaults to `Henter data ...`.',\n type: 'React.Node',\n status: 'optional',\n },\n show_options_sr: {\n doc: 'Only for screen readers. Title of the button to show the suggestions / options. It is always present and when activating, it opens the DrawerList and sets the focus on it. Defaults to `Bla gjennom alternativer`.',\n type: 'string',\n status: 'optional',\n },\n selected_sr: {\n doc: 'Only for screen readers (VoiceOver). The label used to announce the selected item. Defaults to `Valgt:`.',\n type: 'string',\n status: 'optional',\n },\n submit_button_title: {\n doc: 'Title on submit button. Defaults to `Vis alternativer`.',\n type: 'React.Node',\n status: 'optional',\n },\n submit_button_icon: {\n doc: 'The icon used in the submit button. Defaults to `chevron_down`.',\n type: ['string', 'React.Element'],\n status: 'optional',\n },\n submit_element: {\n doc: 'Replace the dropdown / submit button with a custom React element. Defaults to the input SubmitButton `import { SubmitButton } from &#39;@dnb/eufemia/components/input/Input&#39;`.',\n type: 'React.Node',\n status: 'optional',\n },\n opened: {\n doc: 'If set to `true`, the Autocomplete will be rendered initially with a visible and accessible data list / options.',\n type: 'boolean',\n status: 'optional',\n },\n open_on_focus: {\n doc: 'Use `true` to auto open the list once the user is entering the input field with the keyboard.',\n type: 'boolean',\n status: 'optional',\n },\n stretch: {\n doc: 'If set to `true`, then the autocomplete will be 100% in available `width`.',\n type: 'boolean',\n status: 'optional',\n },\n skip_portal: {\n doc: 'Set to `true` to disable the React Portal behavior. Defaults to `false`.',\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',\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 label: {\n doc: 'Prepends the Form Label component. If no ID is provided, a random ID is created.',\n type: 'React.Node',\n status: 'optional',\n },\n label_direction: {\n doc: 'Use `label_direction=\"vertical\"` to change the label layout direction. Defaults to `horizontal`.',\n type: 'React.Node',\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 suffix: {\n doc: 'Text describing the content of the Autocomplete more than the label. You can also send in a React component, so it gets wrapped inside the Autocomplete component.',\n type: 'React.Node',\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 input_ref: {\n doc: 'Use a React.Ref to get access to the `input` DOM element.',\n type: 'React.Ref',\n status: 'optional',\n },\n input_element: {\n doc: 'Lets you provide a custom React element as the input HTML element.',\n type: ['string', 'React.Element'],\n status: 'optional',\n },\n '[DrawerList](/uilib/components/fragments/drawer-list/properties)': {\n doc: 'all DrawerList properties.',\n type: 'Various',\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 AutocompleteEvents: PropertiesTableProps = {\n on_type: {\n doc: 'Will be called for every key change the users makes. Returns an object with the input `value` inside `{ value, event, attributes }` including [these methods](/uilib/components/autocomplete/events#dynamically-change-data)',\n type: 'function',\n status: 'optional',\n },\n on_focus: {\n doc: 'Will be called on user generated focus action. Returns an object with the input `value` inside `{ value, event, attributes }` including [these methods](/uilib/components/autocomplete/events#dynamically-change-data).',\n type: 'function',\n status: 'optional',\n },\n on_blur: {\n doc: 'Will be called on user generated blur action. Returns an object with the input `value` inside `{ value, event, attributes }` including [these methods](/uilib/components/autocomplete/events#dynamically-change-data).',\n type: 'function',\n status: 'optional',\n },\n on_change: {\n doc: 'Will be called on state changes made by the user. Returns an object with the new selected `data` item `{ data, event, attributes, value }` including [these methods](/uilib/components/autocomplete/events#dynamically-change-data).',\n type: 'function',\n status: 'optional',\n },\n on_select: {\n doc: 'Will be called once the users focuses or selects an item by a click or keyboard navigation. Returns an object with the new selected `data` item `{ data, event, attributes, value, active_item }` including [these methods](/uilib/components/autocomplete/events#dynamically-change-data). The \"active_item\" property is the currently selected item by keyboard navigation',\n type: 'function',\n status: 'optional',\n },\n on_show: {\n doc: 'Will be called once the user presses the autocomplete. Returns the data item `{ data, attributes }`.',\n type: 'function',\n status: 'optional',\n },\n on_hide: {\n doc: 'Will be called once the user presses the autocomplete again, or clicks somewhere else. Returns the data item `{ data, attributes }`.',\n type: 'function',\n status: 'optional',\n },\n}\n"],"mappings":"AAEA,OAAO,MAAMA,sBAA4C,GAAG;EAC1DC,IAAI,EAAE;IACJC,GAAG,EAAE,gHAAgH;IACrHC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDC,WAAW,EAAE;IACXH,GAAG,EAAE,uCAAuC;IAC5CC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDE,WAAW,EAAE;IACXJ,GAAG,EAAE,uGAAuG;IAC5GC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDG,KAAK,EAAE;IACLL,GAAG,EAAE,iGAAiG;IACtGC,IAAI,EAAE,YAAY;IAClBC,MAAM,EAAE;EACV,CAAC;EACDI,cAAc,EAAE;IACdN,GAAG,EAAE,qHAAqH;IAC1HC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDK,oBAAoB,EAAE;IACpBP,GAAG,EAAE,qHAAqH;IAC1HC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDM,eAAe,EAAE;IACfR,GAAG,EAAE,uFAAuF;IAC5FC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDO,cAAc,EAAE;IACdT,GAAG,EAAE,gKAAgK;IACrKC,IAAI,EAAE,SAAS;IACfC,MAAM,EA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EAAE;IACPtD,GAAG,EAAE,sGAAsG;IAC3GC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDqD,OAAO,EAAE;IACPvD,GAAG,EAAE,sIAAsI;IAC3IC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"AutocompleteDocs.js","names":["autocompleteProperties","mode","doc","type","status","input_value","placeholder","title","disable_filter","disable_highlighting","disable_reorder","search_numbers","search_in_word_index","keep_value","keep_selection","keep_value_and_selection","prevent_selection","show_clear_button","icon","icon_size","icon_position","input_icon","triangle_position","size","drawer_class","show_submit_button","align_autocomplete","no_options","aria_live_options","show_all","indicator_label","show_options_sr","selected_sr","submit_button_title","submit_button_icon","submit_element","opened","open_on_focus","stretch","skip_portal","status_state","status_props","globalStatus","label","label_direction","label_sr_only","suffix","skeleton","input_ref","input_element","AutocompleteEvents","on_type","on_focus","on_blur","on_change","on_select","on_show","on_hide"],"sources":["../../../../src/components/autocomplete/AutocompleteDocs.ts"],"sourcesContent":["import { PropertiesTableProps } from '../../shared/types'\n\nexport const autocompleteProperties: PropertiesTableProps = {\n mode: {\n doc: 'If set to `async`, it prevents showing the \"no options\" message during typing / filtering. Defaults to `sync`.',\n type: 'string',\n status: 'optional',\n },\n input_value: {\n doc: 'Lets you define a custom input value.',\n type: 'string',\n status: 'optional',\n },\n placeholder: {\n doc: 'Use this to define the pre-filled placeholder text in the input. Defaults to `title=\"Skriv og velg\"`.',\n type: 'string',\n status: 'optional',\n },\n title: {\n doc: 'Give a title to let the user know what they have to do. Defaults to `Skriv og få alternativer`.',\n type: 'React.Node',\n status: 'optional',\n },\n disable_filter: {\n doc: 'If set to `true`, word highlighting will still be active, but no options will be filtered out. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n disable_highlighting: {\n doc: 'If set to `true`, word highlighting will be disabled, but the options will still get filtered. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n disable_reorder: {\n doc: 'If set to `true`, reordering of search results will be disabled. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n search_numbers: {\n doc: 'If set to `true` and `search_in_word_index` is not set, the user will be able to more easily search and filter e.g. bank account numbers. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n search_in_word_index: {\n doc: 'This gives you the possibility to change the threshold number, which defines from what word on we search \"inside words\". Defaults to `3`.',\n type: 'boolean',\n status: 'optional',\n },\n keep_value: {\n doc: 'Use `true` to not remove the typed value on input blur, if it is invalid. By default, the typed value will disappear / replaced by a selected value from the data list during the input field blur. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n keep_selection: {\n doc: 'Use `true` to not remove selected item on input blur, when the input value is empty. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n keep_value_and_selection: {\n doc: 'Like `keep_value` – but would not reset to the selected value during input field blur. Also, the selected value would still be kept. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n prevent_selection: {\n doc: 'If set to `true`, no permanent selection will be made. Also, the typed value will not disappear on input blur (like `keep_value`). Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n show_clear_button: {\n doc: 'If set to `true`, a clear button is shown inside the input field. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n icon: {\n doc: 'To be included in the autocomplete input.',\n type: ['string', 'React.Node'],\n status: 'optional',\n },\n icon_size: {\n doc: 'Change the size of the icon pragmatically.',\n type: 'string',\n status: 'optional',\n },\n icon_position: {\n doc: 'Position of the icon inside the autocomplete. Set to `left` or `right`. Defaults to `left`.',\n type: 'string',\n status: 'optional',\n },\n input_icon: {\n doc: 'Same as `icon`.',\n type: ['string', 'React.Node'],\n status: 'optional',\n },\n triangle_position: {\n doc: 'Position of icon arrow / triangle the drawer. Set to `left` or `right`. Defaults to `left`.',\n type: 'string',\n status: 'optional',\n },\n size: {\n doc: 'Define the height of the Autocomplete. Can be set to `small`, `default`, `medium` and `large`. Defaults to `default`.',\n type: 'string',\n status: 'optional',\n },\n drawer_class: {\n doc: 'Define a custom class for the internal drawer-list. This makes it possible more easily customize the drawer-list style with styled-components and the `css` style method. Defaults to `null`.',\n type: 'string',\n status: 'optional',\n },\n show_submit_button: {\n doc: 'Use `true` to show a Autocomplete button to toggle the [DrawerList](/uilib/components/fragments/drawer-list). Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n align_autocomplete: {\n doc: 'Use `right` to change the options alignment direction. Defaults to `left`.',\n type: 'string',\n status: 'optional',\n },\n no_options: {\n doc: 'Text show in the \"no options\" item. Defaults to `Ingen alternativer`.',\n type: 'boolean',\n status: 'optional',\n },\n aria_live_options: {\n doc: 'Text read out by screen readers. This way users with screen readers know how many options they got during typing. Defaults to `%s alternativer`.',\n type: 'React.Node',\n status: 'optional',\n },\n show_all: {\n doc: 'Text that lets a user unravel all the available options. Defaults to `Vis alt`.',\n type: 'boolean',\n status: 'optional',\n },\n indicator_label: {\n doc: 'Text show on indicator \"options\" item. Defaults to `Henter data ...`.',\n type: 'React.Node',\n status: 'optional',\n },\n show_options_sr: {\n doc: 'Only for screen readers. Title of the button to show the suggestions / options. It is always present and when activating, it opens the DrawerList and sets the focus on it. Defaults to `Bla gjennom alternativer`.',\n type: 'string',\n status: 'optional',\n },\n selected_sr: {\n doc: 'Only for screen readers (VoiceOver). The label used to announce the selected item. Defaults to `Valgt:`.',\n type: 'string',\n status: 'optional',\n },\n submit_button_title: {\n doc: 'Title on submit button. Defaults to `Vis alternativer`.',\n type: 'React.Node',\n status: 'optional',\n },\n submit_button_icon: {\n doc: 'The icon used in the submit button. Defaults to `chevron_down`.',\n type: ['string', 'React.Element'],\n status: 'optional',\n },\n submit_element: {\n doc: 'Replace the dropdown / submit button with a custom React element. Defaults to the input SubmitButton `import { SubmitButton } from &#39;@dnb/eufemia/components/input/Input&#39;`.',\n type: 'React.Node',\n status: 'optional',\n },\n opened: {\n doc: 'If set to `true`, the Autocomplete will be rendered initially with a visible and accessible data list / options.',\n type: 'boolean',\n status: 'optional',\n },\n open_on_focus: {\n doc: 'Use `true` to auto open the list once the user is entering the input field with the keyboard.',\n type: 'boolean',\n status: 'optional',\n },\n stretch: {\n doc: 'If set to `true`, then the autocomplete will be 100% in available `width`.',\n type: 'boolean',\n status: 'optional',\n },\n skip_portal: {\n doc: 'Set to `true` to disable the React Portal behavior. Defaults to `false`.',\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 label: {\n doc: 'Prepends the Form Label component. If no ID is provided, a random ID is created.',\n type: 'React.Node',\n status: 'optional',\n },\n label_direction: {\n doc: 'Use `label_direction=\"vertical\"` to change the label layout direction. Defaults to `horizontal`.',\n type: 'React.Node',\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 suffix: {\n doc: 'Text describing the content of the Autocomplete more than the label. You can also send in a React component, so it gets wrapped inside the Autocomplete component.',\n type: 'React.Node',\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 input_ref: {\n doc: 'Use a React.Ref to get access to the `input` DOM element.',\n type: 'React.RefObject',\n status: 'optional',\n },\n input_element: {\n doc: 'Lets you provide a custom React element as the input HTML element.',\n type: ['string', 'React.Element'],\n status: 'optional',\n },\n '[DrawerList](/uilib/components/fragments/drawer-list/properties)': {\n doc: 'all DrawerList properties.',\n type: 'Various',\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 AutocompleteEvents: PropertiesTableProps = {\n on_type: {\n doc: 'Will be called for every key change the users makes. Returns an object with the input `value` inside `{ value, event, attributes }` including [these methods](/uilib/components/autocomplete/events#dynamically-change-data)',\n type: 'function',\n status: 'optional',\n },\n on_focus: {\n doc: 'Will be called on user generated focus action. Returns an object with the input `value` inside `{ value, event, attributes }` including [these methods](/uilib/components/autocomplete/events#dynamically-change-data).',\n type: 'function',\n status: 'optional',\n },\n on_blur: {\n doc: 'Will be called on user generated blur action. Returns an object with the input `value` inside `{ value, event, attributes }` including [these methods](/uilib/components/autocomplete/events#dynamically-change-data).',\n type: 'function',\n status: 'optional',\n },\n on_change: {\n doc: 'Will be called on state changes made by the user. Returns an object with the new selected `data` item `{ data, event, attributes, value }` including [these methods](/uilib/components/autocomplete/events#dynamically-change-data).',\n type: 'function',\n status: 'optional',\n },\n on_select: {\n doc: 'Will be called once the users focuses or selects an item by a click or keyboard navigation. Returns an object with the new selected `data` item `{ data, event, attributes, value, active_item }` including [these methods](/uilib/components/autocomplete/events#dynamically-change-data). The \"active_item\" property is the currently selected item by keyboard navigation',\n type: 'function',\n status: 'optional',\n },\n on_show: {\n doc: 'Will be called once the user presses the autocomplete. Returns the data item `{ data, attributes }`.',\n type: 'function',\n status: 'optional',\n },\n on_hide: {\n doc: 'Will be called once the user presses the autocomplete again, or clicks somewhere else. Returns the data item `{ data, attributes }`.',\n type: 'function',\n status: 'optional',\n },\n}\n"],"mappings":"AAEA,OAAO,MAAMA,sBAA4C,GAAG;EAC1DC,IAAI,EAAE;IACJC,GAAG,EAAE,gHAAgH;IACrHC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDC,WAAW,EAAE;IACXH,GAAG,EAAE,uCAAuC;IAC5CC,IAAI,EAAE,QAAQ;IAC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ACzCF,GAAG,EAAE,0DAA0D;IAC/DC,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC1BC,MAAM,EAAE;EACV;AACF,CAAC;AAED,OAAO,MAAM8C,kBAAwC,GAAG;EACtDC,OAAO,EAAE;IACPjD,GAAG,EAAE,8NAA8N;IACnOC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDgD,QAAQ,EAAE;IACRlD,GAAG,EAAE,yNAAyN;IAC9NC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDiD,OAAO,EAAE;IACPnD,GAAG,EAAE,wNAAwN;IAC7NC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDkD,SAAS,EAAE;IACTpD,GAAG,EAAE,sOAAsO;IAC3OC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDmD,SAAS,EAAE;IACTrD,GAAG,EAAE,8WAA8W;IACnXC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDoD,OAAO,EAAE;IACPtD,GAAG,EAAE,sGAAsG;IAC3GC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDqD,OAAO,EAAE;IACPvD,GAAG,EAAE,sIAAsI;IAC3IC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV;AACF,CAAC","ignoreList":[]}
@@ -14,6 +14,7 @@ import Img from '../../elements/img/Img';
14
14
  import Context from '../../shared/Context';
15
15
  import { validateDOMAttributes, extendPropsWithContext, warn } from '../../shared/component-helper';
16
16
  import AvatarGroup, { AvatarGroupContext } from './AvatarGroup';
17
+ import { getColor } from '../../shared/helpers';
17
18
  export const defaultProps = {
18
19
  size: 'medium',
19
20
  variant: 'primary',
@@ -73,12 +74,6 @@ const Avatar = localProps => {
73
74
  className: "dnb-sr-only"
74
75
  }, childrenProp), children);
75
76
  };
76
- function getColor(value) {
77
- if (String(value).includes('--')) {
78
- return value;
79
- }
80
- return value ? !/#|var/.test(value) ? `var(--color-${value})` : value : undefined;
81
- }
82
77
  Avatar.Group = AvatarGroup;
83
78
  export { AvatarGroup };
84
79
  Avatar._supportsSpacingProps = true;
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.js","names":["React","classnames","createSpacingClasses","createSkeletonClass","Img","Context","validateDOMAttributes","extendPropsWithContext","warn","AvatarGroup","AvatarGroupContext","defaultProps","size","variant","skeleton","Avatar","localProps","context","useContext","avatarGroupContext","allProps","alt","className","children","childrenProp","src","imgProps","hasLabel","backgroundColor","color","props","_objectWithoutProperties","_excluded","skeletonClasses","spacingClasses","childrenIsString","imageProps","_objectSpread","createElement","firstLetterUpperCase","charAt","toUpperCase","style","getColor","_extends","value","String","includes","test","undefined","Group","_supportsSpacingProps"],"sources":["../../../../src/components/avatar/Avatar.tsx"],"sourcesContent":["import React from 'react'\nimport classnames from 'classnames'\n\n// Components\nimport { createSpacingClasses } from '../space/SpacingHelper'\nimport { createSkeletonClass } from '../skeleton/SkeletonHelper'\n\n// Elements\nimport Img, { ImgProps } from '../../elements/img/Img'\n\n// Shared\nimport Context from '../../shared/Context'\nimport type { SpacingProps } from '../../shared/types'\nimport type { SkeletonShow } from '../skeleton/Skeleton'\nimport {\n validateDOMAttributes,\n extendPropsWithContext,\n warn,\n} from '../../shared/component-helper'\n\n// Internal\nimport AvatarGroup, { AvatarGroupContext } from './AvatarGroup'\n\nexport type AvatarSizes = 'small' | 'medium' | 'large' | 'x-large'\nexport type AvatarVariants = 'primary' | 'secondary' | 'tertiary'\n\nexport type AvatarImgProps = ImgProps\n\nexport interface AvatarProps\n extends Omit<React.HTMLProps<HTMLElement>, 'size'> {\n /**\n * Used in combination with `src` to provide an alt attribute for the `img` element.\n * Default: null\n */\n alt?: string\n\n /**\n * Custom className on the component root\n * Default: null\n */\n className?: string\n\n /**\n * Skeleton should be applied when loading content\n * Default: null\n */\n skeleton?: SkeletonShow\n\n /**\n * The content of the component. Can be used instead of prop \"data\".\n * Default: null\n */\n children?: React.ReactNode\n\n /**\n * The size of the component.\n * Default: medium.\n */\n size?: AvatarSizes\n\n /**\n * Specifies the path to the image\n * Default: null\n */\n src?: string\n\n /**\n * Props applied to the `img` element if the component is used to display an image.\n * Default: null\n */\n imgProps?: ImgProps\n\n /**\n * The variant of the component.\n * Default: primary.\n */\n variant?: AvatarVariants\n\n /**\n * If an avatar is hidden from the screen reader (by setting aria-hidden={true}) or if label is given, typical inside a table or dl (definition list), then you can disable Avatar.Group as a dependent of Avatar.\n * Use `true` to omit the `Avatar group required:` warning.\n * Default: null\n */\n hasLabel?: boolean\n\n /**\n * Define a custom background color, instead of a variant. Use a Eufemia color.\n * Default: undefined\n */\n backgroundColor?: string\n\n /**\n * Define a custom color to compliment the backgroundColor. Use a Eufemia color.\n * Default: undefined\n */\n color?: string\n}\n\nexport const defaultProps = {\n size: 'medium',\n variant: 'primary',\n skeleton: false,\n}\n\nconst Avatar = (localProps: AvatarProps & SpacingProps) => {\n // Every component should have a context\n const context = React.useContext(Context)\n const avatarGroupContext = React.useContext(AvatarGroupContext)\n\n // Extract additional props from global context\n const allProps = extendPropsWithContext(\n localProps,\n defaultProps,\n context?.Avatar,\n { skeleton: context?.skeleton },\n avatarGroupContext\n )\n\n const {\n alt,\n className,\n children: childrenProp,\n size,\n skeleton,\n variant,\n src,\n imgProps,\n hasLabel,\n backgroundColor,\n color,\n ...props\n } = allProps\n\n let children = null\n\n const skeletonClasses = createSkeletonClass('shape', skeleton, context)\n const spacingClasses = createSpacingClasses(props)\n\n const childrenIsString = typeof childrenProp === 'string'\n\n if (src || imgProps) {\n const imageProps = { src, alt, ...imgProps }\n children = <Img {...imageProps} />\n } else if (childrenIsString) {\n const firstLetterUpperCase = childrenProp.charAt(0).toUpperCase()\n children = <span aria-hidden>{firstLetterUpperCase}</span>\n } else {\n children = childrenProp\n }\n\n if (!avatarGroupContext && !hasLabel) {\n warn(\n `Avatar group required: An Avatar requires an Avatar.Group with label description as a parent component. This is to ensure correct semantic and accessibility.`\n )\n }\n\n validateDOMAttributes(allProps, props)\n\n const style = {\n '--background-color': getColor(backgroundColor),\n '--color': getColor(color),\n ...props?.style,\n } as React.CSSProperties\n\n return (\n <span\n className={classnames(\n 'dnb-avatar',\n `dnb-avatar--${variant || 'primary'}`,\n `dnb-avatar--size-${size || 'medium'}`,\n skeletonClasses,\n spacingClasses,\n className\n )}\n {...props}\n style={style}\n >\n {childrenIsString && (\n <span className=\"dnb-sr-only\">{childrenProp}</span>\n )}\n {children}\n </span>\n )\n}\n\nfunction getColor(value: string) {\n if (String(value).includes('--')) {\n return value\n }\n return value\n ? !/#|var/.test(value)\n ? `var(--color-${value})`\n : value\n : undefined\n}\n\nAvatar.Group = AvatarGroup\n\nexport { AvatarGroup }\n\nAvatar._supportsSpacingProps = true\n\nexport default Avatar\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,UAAU,MAAM,YAAY;AAGnC,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,SAASC,mBAAmB,QAAQ,4BAA4B;AAGhE,OAAOC,GAAG,MAAoB,wBAAwB;AAGtD,OAAOC,OAAO,MAAM,sBAAsB;AAG1C,SACEC,qBAAqB,EACrBC,sBAAsB,EACtBC,IAAI,QACC,+BAA+B;AAGtC,OAAOC,WAAW,IAAIC,kBAAkB,QAAQ,eAAe;AA6E/D,OAAO,MAAMC,YAAY,GAAG;EAC1BC,IAAI,EAAE,QAAQ;EACdC,OAAO,EAAE,SAAS;EAClBC,QAAQ,EAAE;AACZ,CAAC;AAED,MAAMC,MAAM,GAAIC,UAAsC,IAAK;EAEzD,MAAMC,OAAO,GAAGjB,KAAK,CAACkB,UAAU,CAACb,OAAO,CAAC;EACzC,MAAMc,kBAAkB,GAAGnB,KAAK,CAACkB,UAAU,CAACR,kBAAkB,CAAC;EAG/D,MAAMU,QAAQ,GAAGb,sBAAsB,CACrCS,UAAU,EACVL,YAAY,EACZM,O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AL,aAAA;IACT,oBAAoB,EAAEM,QAAQ,CAACf,eAAe,CAAC;IAC/C,SAAS,EAAEe,QAAQ,CAACd,KAAK;EAAC,GACvBC,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEY,KAAK,CACO;EAExB,OACE1C,KAAA,CAAAsC,aAAA,SAAAM,QAAA;IACEtB,SAAS,EAAErB,UAAU,2BAEJY,OAAO,IAAI,SAAS,qBACfD,IAAI,IAAI,QAAQ,IACpCqB,eAAe,EACfC,cAAc,EACdZ,SACF;EAAE,GACEQ,KAAK;IACTY,KAAK,EAAEA;EAAM,IAEZP,gBAAgB,IACfnC,KAAA,CAAAsC,aAAA;IAAMhB,SAAS,EAAC;EAAa,GAAEE,YAAmB,CACnD,EACAD,QACG,CAAC;AAEX,CAAC;AAED,SAASoB,QAAQA,CAACE,KAAa,EAAE;EAC/B,IAAIC,MAAM,CAACD,KAAK,CAAC,CAACE,QAAQ,CAAC,IAAI,CAAC,EAAE;IAChC,OAAOF,KAAK;EACd;EACA,OAAOA,KAAK,GACR,CAAC,OAAO,CAACG,IAAI,CAACH,KAAK,CAAC,GAClB,eAAeA,KAAK,GAAG,GACvBA,KAAK,GACPI,SAAS;AACf;AAEAlC,MAAM,CAACmC,KAAK,GAAGzC,WAAW;AAE1B,SAASA,WAAW;AAEpBM,MAAM,CAACoC,qBAAqB,GAAG,IAAI;AAEnC,eAAepC,MAAM","ignoreList":[]}
1
+ {"version":3,"file":"Avatar.js","names":["React","classnames","createSpacingClasses","createSkeletonClass","Img","Context","validateDOMAttributes","extendPropsWithContext","warn","AvatarGroup","AvatarGroupContext","getColor","defaultProps","size","variant","skeleton","Avatar","localProps","context","useContext","avatarGroupContext","allProps","alt","className","children","childrenProp","src","imgProps","hasLabel","backgroundColor","color","props","_objectWithoutProperties","_excluded","skeletonClasses","spacingClasses","childrenIsString","imageProps","_objectSpread","createElement","firstLetterUpperCase","charAt","toUpperCase","style","_extends","Group","_supportsSpacingProps"],"sources":["../../../../src/components/avatar/Avatar.tsx"],"sourcesContent":["import React from 'react'\nimport classnames from 'classnames'\n\n// Components\nimport { createSpacingClasses } from '../space/SpacingHelper'\nimport { createSkeletonClass } from '../skeleton/SkeletonHelper'\n\n// Elements\nimport Img, { ImgProps } from '../../elements/img/Img'\n\n// Shared\nimport Context from '../../shared/Context'\nimport type { SpacingProps } from '../../shared/types'\nimport type { SkeletonShow } from '../skeleton/Skeleton'\nimport {\n validateDOMAttributes,\n extendPropsWithContext,\n warn,\n} from '../../shared/component-helper'\n\n// Internal\nimport AvatarGroup, { AvatarGroupContext } from './AvatarGroup'\nimport { getColor } from '../../shared/helpers'\n\nexport type AvatarSizes = 'small' | 'medium' | 'large' | 'x-large'\nexport type AvatarVariants = 'primary' | 'secondary' | 'tertiary'\n\nexport type AvatarImgProps = ImgProps\n\nexport interface AvatarProps\n extends Omit<React.HTMLProps<HTMLElement>, 'size'> {\n /**\n * Used in combination with `src` to provide an alt attribute for the `img` element.\n * Default: null\n */\n alt?: string\n\n /**\n * Custom className on the component root\n * Default: null\n */\n className?: string\n\n /**\n * Skeleton should be applied when loading content\n * Default: null\n */\n skeleton?: SkeletonShow\n\n /**\n * The content of the component. Can be used instead of prop \"data\".\n * Default: null\n */\n children?: React.ReactNode\n\n /**\n * The size of the component.\n * Default: medium.\n */\n size?: AvatarSizes\n\n /**\n * Specifies the path to the image\n * Default: null\n */\n src?: string\n\n /**\n * Props applied to the `img` element if the component is used to display an image.\n * Default: null\n */\n imgProps?: ImgProps\n\n /**\n * The variant of the component.\n * Default: primary.\n */\n variant?: AvatarVariants\n\n /**\n * If an avatar is hidden from the screen reader (by setting aria-hidden={true}) or if label is given, typical inside a table or dl (definition list), then you can disable Avatar.Group as a dependent of Avatar.\n * Use `true` to omit the `Avatar group required:` warning.\n * Default: null\n */\n hasLabel?: boolean\n\n /**\n * Define a custom background color, instead of a variant. Use a Eufemia color.\n * Default: undefined\n */\n backgroundColor?: string\n\n /**\n * Define a custom color to compliment the backgroundColor. Use a Eufemia color.\n * Default: undefined\n */\n color?: string\n}\n\nexport const defaultProps = {\n size: 'medium',\n variant: 'primary',\n skeleton: false,\n}\n\nconst Avatar = (localProps: AvatarProps & SpacingProps) => {\n // Every component should have a context\n const context = React.useContext(Context)\n const avatarGroupContext = React.useContext(AvatarGroupContext)\n\n // Extract additional props from global context\n const allProps = extendPropsWithContext(\n localProps,\n defaultProps,\n context?.Avatar,\n { skeleton: context?.skeleton },\n avatarGroupContext\n )\n\n const {\n alt,\n className,\n children: childrenProp,\n size,\n skeleton,\n variant,\n src,\n imgProps,\n hasLabel,\n backgroundColor,\n color,\n ...props\n } = allProps\n\n let children = null\n\n const skeletonClasses = createSkeletonClass('shape', skeleton, context)\n const spacingClasses = createSpacingClasses(props)\n\n const childrenIsString = typeof childrenProp === 'string'\n\n if (src || imgProps) {\n const imageProps = { src, alt, ...imgProps }\n children = <Img {...imageProps} />\n } else if (childrenIsString) {\n const firstLetterUpperCase = childrenProp.charAt(0).toUpperCase()\n children = <span aria-hidden>{firstLetterUpperCase}</span>\n } else {\n children = childrenProp\n }\n\n if (!avatarGroupContext && !hasLabel) {\n warn(\n `Avatar group required: An Avatar requires an Avatar.Group with label description as a parent component. This is to ensure correct semantic and accessibility.`\n )\n }\n\n validateDOMAttributes(allProps, props)\n\n const style = {\n '--background-color': getColor(backgroundColor),\n '--color': getColor(color),\n ...props?.style,\n } as React.CSSProperties\n\n return (\n <span\n className={classnames(\n 'dnb-avatar',\n `dnb-avatar--${variant || 'primary'}`,\n `dnb-avatar--size-${size || 'medium'}`,\n skeletonClasses,\n spacingClasses,\n className\n )}\n {...props}\n style={style}\n >\n {childrenIsString && (\n <span className=\"dnb-sr-only\">{childrenProp}</span>\n )}\n {children}\n </span>\n )\n}\n\nAvatar.Group = AvatarGroup\n\nexport { AvatarGroup }\n\nAvatar._supportsSpacingProps = true\n\nexport default Avatar\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,UAAU,MAAM,Y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8B,qBAAqB,GAAG,IAAI;AAEnC,eAAe9B,MAAM","ignoreList":[]}
@@ -36,7 +36,7 @@ export const CheckboxProperties = {
36
36
  },
37
37
  status: {
38
38
  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.',
39
- type: 'string',
39
+ type: ['error', 'info', 'boolean'],
40
40
  status: 'optional'
41
41
  },
42
42
  statusState: {
@@ -66,7 +66,7 @@ export const CheckboxProperties = {
66
66
  },
67
67
  innerRef: {
68
68
  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()`.',
69
- type: 'React.Ref',
69
+ type: 'React.RefObject',
70
70
  status: 'optional'
71
71
  },
72
72
  '[Space](/uilib/layout/space/properties)': {
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxDocs.js","names":["CheckboxProperties","checked","doc","type","status","title","label","labelPosition","labelSrOnly","size","indeterminate","statusState","statusProps","globalStatus","skeleton","suffix","innerRef","CheckboxEvents","onChange"],"sources":["../../../../src/components/checkbox/CheckboxDocs.ts"],"sourcesContent":["import { PropertiesTableProps } from '../../shared/types'\n\nexport const CheckboxProperties: PropertiesTableProps = {\n checked: {\n doc: 'Determine whether the checkbox is checked or not. The default is `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: 'ReactNode',\n status: 'optional',\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: 'string',\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 checkbox. For now there is \"medium\" (default) and \"large\".',\n type: ['string', 'number'],\n status: 'optional',\n },\n indeterminate: {\n doc: 'Controls the checkbox indeterminate (partial) state.',\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: ['error', 'info'],\n status: 'optional',\n },\n statusProps: {\n doc: 'Use an object to define additional FormStatus properties. See [FormStatus](/uilib/components/form-status/properties/)',\n type: 'FormStatusProps',\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 skeleton: {\n doc: 'If set to `true`, an overlaying skeleton with animation will be shown.',\n type: 'boolean',\n status: 'optional',\n },\n suffix: {\n doc: 'Text describing the content of the Checkbox more than the label. You can also send in a React component, so it gets wrapped inside the Checkbox component.',\n type: 'ReactNode',\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.Ref',\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 CheckboxEvents: 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}\n"],"mappings":"AAEA,OAAO,MAAMA,kBAAwC,GAAG;EACtDC,OAAO,EAAE;IACPC,GAAG,EAAE,2EAA2E;IAChFC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDC,KAAK,EAAE;IACLH,GAAG,EAAE,mFAAmF;IACxFC,IAAI,EAAE,WAAW;IACjBC,MAAM,EAAE;EACV,CAAC;EACDE,KAAK,EAAE;IACLJ,GAAG,EAAE,0DAA0D;IAC/DC,IAAI,EAAE,WAAW;IACjBC,MAAM,EAAE;EACV,CAA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E,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC1BC,MAAM,EAAE;EACV;AACF,CAAC;AAED,OAAO,MAAMa,cAAoC,GAAG;EAClDC,QAAQ,EAAE;IACRhB,GAAG,EAAE,mDAAmD;IACxDC,IAAI,EAAE,8CAA8C;IACpDC,MAAM,EAAE;EACV;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"CheckboxDocs.js","names":["CheckboxProperties","checked","doc","type","status","title","label","labelPosition","labelSrOnly","size","indeterminate","statusState","statusProps","globalStatus","skeleton","suffix","innerRef","CheckboxEvents","onChange"],"sources":["../../../../src/components/checkbox/CheckboxDocs.ts"],"sourcesContent":["import { PropertiesTableProps } from '../../shared/types'\n\nexport const CheckboxProperties: PropertiesTableProps = {\n checked: {\n doc: 'Determine whether the checkbox is checked or not. The default is `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: 'ReactNode',\n status: 'optional',\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: 'string',\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 checkbox. For now there is \"medium\" (default) and \"large\".',\n type: ['string', 'number'],\n status: 'optional',\n },\n indeterminate: {\n doc: 'Controls the checkbox indeterminate (partial) state.',\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. See [FormStatus](/uilib/components/form-status/properties/)',\n type: 'FormStatusProps',\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 skeleton: {\n doc: 'If set to `true`, an overlaying skeleton with animation will be shown.',\n type: 'boolean',\n status: 'optional',\n },\n suffix: {\n doc: 'Text describing the content of the Checkbox more than the label. You can also send in a React component, so it gets wrapped inside the Checkbox component.',\n type: 'ReactNode',\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 CheckboxEvents: 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}\n"],"mappings":"AAEA,OAAO,MAAMA,kBAAwC,GAAG;EACtDC,OAAO,EAAE;IACPC,GAAG,EAAE,2EAA2E;IAChFC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDC,KAAK,EAAE;IACLH,GAAG,EAAE,mFAAmF;IACxFC,IAAI,EAAE,WAAW;IACjBC,MAAM,EAAE;EACV,CAAC;EACDE,KAAK,EAAE;IACLJ,GAAG,EAAE,0DAA0D;IAC/DC,IAAI,EAAE,WAAW;IACjBC,MAAM,EAAE;EACV,CAAC;EACDG,aAAa,EAAE;IACbL,GAAG,EAAE,yFAAyF;IAC9FC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDI,WAAW,EAAE;IACXN,GAAG,EAAE,+DAA+D;IACpEC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDK,IAAI,EAAE;IACJP,GAAG,EAAE,4EAA4E;I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C","ignoreList":[]}
@@ -13,7 +13,6 @@ export type DatePickerContextValues = ContextProps & DatePickerDates & {
13
13
  props: DatePickerAllProps;
14
14
  translation: ContextProps['translation'];
15
15
  views: Array<CalendarView>;
16
- hasHadValidDate: boolean;
17
16
  previousDateProps: DatePickerDateProps;
18
17
  updateDates: (dates: DatePickerDates, callback?: (dates: DatePickerDates) => void) => void;
19
18
  setState?: (state: DatePickerProviderState) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"DatePickerContext.js","names":["React","DatePickerContext","createContext"],"sources":["../../../../src/components/date-picker/DatePickerContext.ts"],"sourcesContent":["/**\n * Web DatePicker Context\n *\n */\n\nimport React from 'react'\nimport { DatePickerAllProps, DisplayPickerEvent } from './DatePicker'\nimport { ContextProps } from '../../shared/Context'\nimport {\n DatePickerChangeEvent,\n DatePickerProviderState,\n GetReturnObjectParams,\n ReturnObject,\n} from './DatePickerProvider'\nimport { DatePickerDateProps, DatePickerDates } from './hooks/useDates'\nimport { CalendarView } from './hooks/useViews'\n\nexport type DateType = Date | string\n\nexport type DatePickerContextValues = ContextProps &\n DatePickerDates & {\n props: DatePickerAllProps\n translation: ContextProps['translation']\n views: Array<CalendarView>\n hasHadValidDate: boolean\n previousDateProps: DatePickerDateProps\n updateDates: (\n dates: DatePickerDates,\n callback?: (dates: DatePickerDates) => void\n ) => void\n setState?: (state: DatePickerProviderState) => void\n setViews: (views: Array<CalendarView>, callback?: () => void) => void\n setHasClickedCalendarDay: (hasClicked: boolean) => void\n callOnChangeHandler: <E>(event: DatePickerChangeEvent<E>) => void\n hidePicker: (event: DisplayPickerEvent) => void\n getReturnObject: <E>(\n params: GetReturnObjectParams<E>\n ) => ReturnObject<E>\n }\n\nconst DatePickerContext = React.createContext<DatePickerContextValues>(\n {} as DatePickerContextValues\n)\n\nexport default DatePickerContext\n"],"mappings":"AAKA,OAAOA,KAAK,MAAM,OAAO;AAmCzB,MAAMC,iBAAiB,GAAGD,KAAK,CAACE,aAAa,CAC3C,CAAC,CACH,CAAC;AAED,eAAeD,iBAAiB","ignoreList":[]}
1
+ {"version":3,"file":"DatePickerContext.js","names":["React","DatePickerContext","createContext"],"sources":["../../../../src/components/date-picker/DatePickerContext.ts"],"sourcesContent":["/**\n * Web DatePicker Context\n *\n */\n\nimport React from 'react'\nimport { DatePickerAllProps, DisplayPickerEvent } from './DatePicker'\nimport { ContextProps } from '../../shared/Context'\nimport {\n DatePickerChangeEvent,\n DatePickerProviderState,\n GetReturnObjectParams,\n ReturnObject,\n} from './DatePickerProvider'\nimport { DatePickerDateProps, DatePickerDates } from './hooks/useDates'\nimport { CalendarView } from './hooks/useViews'\n\nexport type DateType = Date | string\n\nexport type DatePickerContextValues = ContextProps &\n DatePickerDates & {\n props: DatePickerAllProps\n translation: ContextProps['translation']\n views: Array<CalendarView>\n previousDateProps: DatePickerDateProps\n updateDates: (\n dates: DatePickerDates,\n callback?: (dates: DatePickerDates) => void\n ) => void\n setState?: (state: DatePickerProviderState) => void\n setViews: (views: Array<CalendarView>, callback?: () => void) => void\n setHasClickedCalendarDay: (hasClicked: boolean) => void\n callOnChangeHandler: <E>(event: DatePickerChangeEvent<E>) => void\n hidePicker: (event: DisplayPickerEvent) => void\n getReturnObject: <E>(\n params: GetReturnObjectParams<E>\n ) => ReturnObject<E>\n }\n\nconst DatePickerContext = React.createContext<DatePickerContextValues>(\n {} as DatePickerContextValues\n)\n\nexport default DatePickerContext\n"],"mappings":"AAKA,OAAOA,KAAK,MAAM,OAAO;AAkCzB,MAAMC,iBAAiB,GAAGD,KAAK,CAACE,aAAa,CAC3C,CAAC,CACH,CAAC;AAED,eAAeD,iBAAiB","ignoreList":[]}
@@ -177,7 +177,7 @@ export const DatePickerProperties = {
177
177
  },
178
178
  status: {
179
179
  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.',
180
- type: 'string | boolean',
180
+ type: ['error', 'info', 'boolean'],
181
181
  status: 'optional'
182
182
  },
183
183
  statusState: {
@@ -1 +1 @@
1
- {"version":3,"file":"DatePickerDocs.js","names":["dateType","DatePickerProperties","date","doc","type","status","startDate","endDate","month","startMonth","endMonth","minDate","maxDate","dateFormat","returnFormat","range","showInput","maskOrder","opened","maskPlaceholder","hideNavigation","hideDays","showSubmitButton","showCancelButton","showResetButton","link","sync","firstDay","alignPicker","skipPortal","onlyMonth","hideLastWeek","stretch","label","labelDirection","suffix","labelSrOnly","shortcuts","addonElement","inputElement","statusState","statusProps","disableAutofocus","correctInvalidDate","globalStatus","tooltip","skeleton","size","DatePickerEvents","onChange","onType","onSubmit","onCancel","onReset","onShow","onHide","onDaysRender","onFocus","onBlur"],"sources":["../../../../src/components/date-picker/DatePickerDocs.ts"],"sourcesContent":["import { PropertiesTableProps } from '../../shared/types'\n\nconst dateType = ['string', 'Date']\n\nexport const DatePickerProperties: PropertiesTableProps = {\n date: {\n doc: 'Defines the pre-filled date by either a JavaScript DateInstance or (ISO 8601) like `date=\"2019-05-05\"` and `content`.',\n type: dateType,\n status: 'optional',\n },\n startDate: {\n doc: 'To set the pre-filled starting date. Is used if `range={true}` is set to `true`. Defaults to `null`, showing the `maskPlaceholder`.',\n type: dateType,\n status: 'optional',\n },\n endDate: {\n doc: 'To set the pre-filled ending date. Is used if `range={true}` is set to `true`. Defaults to `null`, showing the `maskPlaceholder`',\n type: dateType,\n status: 'optional',\n },\n month: {\n doc: 'To display what month should be shown in the first calendar by default. Defaults to the `date` respective `startDate`.',\n type: dateType,\n status: 'optional',\n },\n startMonth: {\n doc: 'To display what month should be shown in the first calendar by default. Defaults to the `date` respective `startDate`.',\n type: dateType,\n status: 'optional',\n },\n endMonth: {\n doc: 'To display what month should be shown in the second calendar by default. Defaults to the `date` respective `startDate`.',\n type: dateType,\n status: 'optional',\n },\n minDate: {\n doc: 'To limit a date range to a minimum `startDate`. Defaults to `null`.',\n type: dateType,\n status: 'optional',\n },\n maxDate: {\n doc: 'To limit a date range to a maximum `endDate`. Defaults to `null`.',\n type: dateType,\n status: 'optional',\n },\n dateFormat: {\n doc: 'Defines how the property dates (`date`, `startDate` and `endDate`) should be parsed, e.g. `yyyy/MM/dd`. Defaults to `yyyy-MM-dd`.',\n type: 'string',\n status: 'optional',\n },\n returnFormat: {\n doc: 'Defines how the returned date, as a string, should be formatted as. Defaults to `yyyy-MM-dd`.',\n type: 'string',\n status: 'optional',\n },\n range: {\n doc:\n 'Defines if the date picker should support a range of two dates (starting and ending date).' +\n 'Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n showInput: {\n doc: 'If the input fields with the mask should be visible. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n maskOrder: {\n doc: 'To define the order of the masked placeholder input fields. Defaults to `dd/mm/yyyy`.',\n type: 'string',\n status: 'optional',\n },\n opened: {\n doc: 'To open the date-picker by default. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n maskPlaceholder: {\n doc: 'To display the placeholder on input. Defaults to `dd/mm/åååå`.',\n type: 'string',\n status: 'optional',\n },\n hideNavigation: {\n doc: 'If set to `true`, the navigation will be hidden. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n hideDays: {\n doc: 'If set to `true`, the week days will be hidden. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n showSubmitButton: {\n doc: 'If set to `true`, a submit button will be shown. You can change the default text by using `submitButtonText=\"Ok\"`. Defaults to `false`. If the `range` property is `true`, then the submit button is shown.',\n type: 'boolean',\n status: 'optional',\n },\n showCancelButton: {\n doc: 'If set to `true`, a cancel button will be shown. You can change the default text by using `cancelButtonText=\"Avbryt\"`. If the `range` property is `true`, then the cancel button is shown. Defaults to `false`',\n type: 'boolean',\n status: 'optional',\n },\n showResetButton: {\n doc: 'If set to `true`, a reset button will be shown. You can change the default text by using `resetButtonText=\"Tilbakestill\"`. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n link: {\n doc: 'Link both calendars, once to the user is navigating between months. Only meant to use if the range is set to `true`. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n sync: {\n doc: 'Sync input values with the calendars views. Once the input values get changed, the calendar changes its views in sync. Defaults to `true`.',\n type: 'boolean',\n status: 'optional',\n },\n firstDay: {\n doc: 'To define the first day of the week. Defaults to `monday`.',\n type: [\n 'monday',\n 'tuesday',\n 'wednesday',\n 'thursday',\n 'friday',\n 'saturday',\n 'sunday',\n ],\n status: 'optional',\n },\n alignPicker: {\n doc: 'Use `right` to change the calendar alignment direction. Defaults to `left`.',\n type: 'string',\n status: 'optional',\n },\n skipPortal: {\n doc: ' If set to `true`, the calendar will not be rendered inside a react portal. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n onlyMonth: {\n doc: 'Use `true` to only show the defined month. Disables the month navigation possibility. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n hideLastWeek: {\n doc: 'Use `true` to only show the last week in the current month if it needs to be shown. The result is that there will mainly be shows five (5) weeks (rows) instead of six (6). Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n stretch: {\n doc: 'If set to `true`, then the date-picker input field will be 100% in `width`',\n type: 'boolean',\n status: 'optional',\n },\n label: {\n doc: 'A prepending label in sync with the date input field.',\n type: 'React.ReactNode',\n status: 'optional',\n },\n labelDirection: {\n doc: ' Use `label_direction=\"vertical\"` to change the label layout direction. Defaults to `horizontal`.',\n type: ['vertical', 'horizontal'],\n status: 'optional',\n },\n suffix: {\n doc: 'Text describing the content of the DatePicker more than the label. You can also send in a React component, so it gets wrapped inside the DatePicker component.',\n type: 'React.ReactNode',\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 shortcuts: {\n doc: 'Gives you the possibility to set predefined dates and date ranges so the user can select these by one click. Define either a JSON or an object with the defined shortcuts. More info is below.',\n type: 'object',\n status: 'optional',\n },\n addonElement: {\n doc: 'Gives you the possibility to inject a React element showing up over the footer. Use it to customize `shortcuts`.',\n type: 'object',\n status: 'optional',\n },\n inputElement: {\n doc: 'Gives you the possibility to use a plain/vanilla `<input />` HTML element by defining it as a string `inputElement=\"input\"`, a React element, or a render function `inputElement={(internalProps) => (<Return />)}`. Can also be used in circumstances where the `react-text-mask` should not be used, e.g. in testing environments. Defaults to custom masked input.',\n type: 'React.ReactNode',\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 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 disableAutofocus: {\n doc: 'Once the date picker gets opened, there is a focus handling to ensure good accessibility. This can be disabled with this property. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n correctInvalidDate: {\n doc: 'Corrects the input date value to be the same as either `minDate` or `maxDate`, when the user types in a date that is either before or after one of these. Defaults to `false`.',\n type: 'boolean',\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 tooltip: {\n doc: 'Provide a short Tooltip content that shows up on the picker button.',\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 size: {\n doc: 'The sizes you can choose is `small` (1.5rem), `default` (2rem), `medium` (2.5rem) and `large` (3rem) are supported component sizes. Defaults to `default` / `null`.',\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 DatePickerEvents: PropertiesTableProps = {\n onChange: {\n doc: 'Will be called on a date change event. Returns an object. See Returned Object below.',\n type: 'function',\n status: 'optional',\n },\n onType: {\n doc: 'Will be called on every input and date picker interaction. Returns an `object`. See Returned Object below.',\n type: 'function',\n status: 'optional',\n },\n onSubmit: {\n doc: 'Will be called once a user presses the submit button.',\n type: 'function',\n status: 'optional',\n },\n onCancel: {\n doc: 'Will be called once a user presses the cancel button.',\n type: 'function',\n status: 'optional',\n },\n onReset: {\n doc: 'Will be called once a user presses the reset button.',\n type: 'function',\n status: 'optional',\n },\n onShow: {\n doc: 'Will be called once date-picker is visible.',\n type: 'function',\n status: 'optional',\n },\n onHide: {\n doc: 'Will be called once date-picker is hidden.',\n type: 'function',\n status: 'optional',\n },\n onDaysRender: {\n doc: 'Will be called right before every new calendar view gets rendered. See the example above.',\n type: 'function',\n status: 'optional',\n },\n onFocus: {\n doc: 'Will be called once the input gets focus.',\n type: 'function',\n status: 'optional',\n },\n onBlur: {\n doc: 'Will be called once the input lose focus.',\n type: 'function',\n status: 'optional',\n },\n}\n"],"mappings":"AAEA,MAAMA,QAAQ,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC;AAEnC,OAAO,MAAMC,oBAA0C,GAAG;EACxDC,IAAI,EAAE;IACJC,GAAG,EAAE,uHAAuH;IAC5HC,IAAI,EAAEJ,QAAQ;IACdK,MAAM,EAAE;EACV,CAAC;EACDC,SAAS,EAAE;IACTH,GAAG,EAAE,qIAAqI;IAC1IC,IAAI,EAAEJ,QAAQ;IACdK,MAAM,EAAE;EACV,CAAC;EACDE,OAAO,EAAE;IACPJ,GAAG,EAAE,kIAAkI;IACvIC,IAAI,EAAEJ,QAAQ;IACdK,MAAM,EAAE;EACV,CAAC;EACDG,KAAK,EAAE;IACLL,GAAG,EAAE,wHAAwH;IAC7HC,IAAI,EAAEJ,QAAQ;IACdK,MAAM,EAAE;EACV,CAAC;EACDI,UAAU,EAAE;IACVN,GAAG,EAAE,wHAAwH;IAC7HC,IAAI,EAAEJ,QAAQ;IACdK,MAAM,EAAE;EACV,CAAC;EACDK,QAAQ,EAAE;IACRP,GAAG,EAAE,yHAAyH;IAC9HC,IAAI,EAAEJ,Q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E;EACV,CAAC;EACDmD,YAAY,EAAE;IACZrD,GAAG,EAAE,2FAA2F;IAChGC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDoD,OAAO,EAAE;IACPtD,GAAG,EAAE,2CAA2C;IAChDC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDqD,MAAM,EAAE;IACNvD,GAAG,EAAE,2CAA2C;IAChDC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"DatePickerDocs.js","names":["dateType","DatePickerProperties","date","doc","type","status","startDate","endDate","month","startMonth","endMonth","minDate","maxDate","dateFormat","returnFormat","range","showInput","maskOrder","opened","maskPlaceholder","hideNavigation","hideDays","showSubmitButton","showCancelButton","showResetButton","link","sync","firstDay","alignPicker","skipPortal","onlyMonth","hideLastWeek","stretch","label","labelDirection","suffix","labelSrOnly","shortcuts","addonElement","inputElement","statusState","statusProps","disableAutofocus","correctInvalidDate","globalStatus","tooltip","skeleton","size","DatePickerEvents","onChange","onType","onSubmit","onCancel","onReset","onShow","onHide","onDaysRender","onFocus","onBlur"],"sources":["../../../../src/components/date-picker/DatePickerDocs.ts"],"sourcesContent":["import { PropertiesTableProps } from '../../shared/types'\n\nconst dateType = ['string', 'Date']\n\nexport const DatePickerProperties: PropertiesTableProps = {\n date: {\n doc: 'Defines the pre-filled date by either a JavaScript DateInstance or (ISO 8601) like `date=\"2019-05-05\"` and `content`.',\n type: dateType,\n status: 'optional',\n },\n startDate: {\n doc: 'To set the pre-filled starting date. Is used if `range={true}` is set to `true`. Defaults to `null`, showing the `maskPlaceholder`.',\n type: dateType,\n status: 'optional',\n },\n endDate: {\n doc: 'To set the pre-filled ending date. Is used if `range={true}` is set to `true`. Defaults to `null`, showing the `maskPlaceholder`',\n type: dateType,\n status: 'optional',\n },\n month: {\n doc: 'To display what month should be shown in the first calendar by default. Defaults to the `date` respective `startDate`.',\n type: dateType,\n status: 'optional',\n },\n startMonth: {\n doc: 'To display what month should be shown in the first calendar by default. Defaults to the `date` respective `startDate`.',\n type: dateType,\n status: 'optional',\n },\n endMonth: {\n doc: 'To display what month should be shown in the second calendar by default. Defaults to the `date` respective `startDate`.',\n type: dateType,\n status: 'optional',\n },\n minDate: {\n doc: 'To limit a date range to a minimum `startDate`. Defaults to `null`.',\n type: dateType,\n status: 'optional',\n },\n maxDate: {\n doc: 'To limit a date range to a maximum `endDate`. Defaults to `null`.',\n type: dateType,\n status: 'optional',\n },\n dateFormat: {\n doc: 'Defines how the property dates (`date`, `startDate` and `endDate`) should be parsed, e.g. `yyyy/MM/dd`. Defaults to `yyyy-MM-dd`.',\n type: 'string',\n status: 'optional',\n },\n returnFormat: {\n doc: 'Defines how the returned date, as a string, should be formatted as. Defaults to `yyyy-MM-dd`.',\n type: 'string',\n status: 'optional',\n },\n range: {\n doc:\n 'Defines if the date picker should support a range of two dates (starting and ending date).' +\n 'Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n showInput: {\n doc: 'If the input fields with the mask should be visible. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n maskOrder: {\n doc: 'To define the order of the masked placeholder input fields. Defaults to `dd/mm/yyyy`.',\n type: 'string',\n status: 'optional',\n },\n opened: {\n doc: 'To open the date-picker by default. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n maskPlaceholder: {\n doc: 'To display the placeholder on input. Defaults to `dd/mm/åååå`.',\n type: 'string',\n status: 'optional',\n },\n hideNavigation: {\n doc: 'If set to `true`, the navigation will be hidden. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n hideDays: {\n doc: 'If set to `true`, the week days will be hidden. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n showSubmitButton: {\n doc: 'If set to `true`, a submit button will be shown. You can change the default text by using `submitButtonText=\"Ok\"`. Defaults to `false`. If the `range` property is `true`, then the submit button is shown.',\n type: 'boolean',\n status: 'optional',\n },\n showCancelButton: {\n doc: 'If set to `true`, a cancel button will be shown. You can change the default text by using `cancelButtonText=\"Avbryt\"`. If the `range` property is `true`, then the cancel button is shown. Defaults to `false`',\n type: 'boolean',\n status: 'optional',\n },\n showResetButton: {\n doc: 'If set to `true`, a reset button will be shown. You can change the default text by using `resetButtonText=\"Tilbakestill\"`. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n link: {\n doc: 'Link both calendars, once to the user is navigating between months. Only meant to use if the range is set to `true`. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n sync: {\n doc: 'Sync input values with the calendars views. Once the input values get changed, the calendar changes its views in sync. Defaults to `true`.',\n type: 'boolean',\n status: 'optional',\n },\n firstDay: {\n doc: 'To define the first day of the week. Defaults to `monday`.',\n type: [\n 'monday',\n 'tuesday',\n 'wednesday',\n 'thursday',\n 'friday',\n 'saturday',\n 'sunday',\n ],\n status: 'optional',\n },\n alignPicker: {\n doc: 'Use `right` to change the calendar alignment direction. Defaults to `left`.',\n type: 'string',\n status: 'optional',\n },\n skipPortal: {\n doc: ' If set to `true`, the calendar will not be rendered inside a react portal. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n onlyMonth: {\n doc: 'Use `true` to only show the defined month. Disables the month navigation possibility. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n hideLastWeek: {\n doc: 'Use `true` to only show the last week in the current month if it needs to be shown. The result is that there will mainly be shows five (5) weeks (rows) instead of six (6). Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n stretch: {\n doc: 'If set to `true`, then the date-picker input field will be 100% in `width`',\n type: 'boolean',\n status: 'optional',\n },\n label: {\n doc: 'A prepending label in sync with the date input field.',\n type: 'React.ReactNode',\n status: 'optional',\n },\n labelDirection: {\n doc: ' Use `label_direction=\"vertical\"` to change the label layout direction. Defaults to `horizontal`.',\n type: ['vertical', 'horizontal'],\n status: 'optional',\n },\n suffix: {\n doc: 'Text describing the content of the DatePicker more than the label. You can also send in a React component, so it gets wrapped inside the DatePicker component.',\n type: 'React.ReactNode',\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 shortcuts: {\n doc: 'Gives you the possibility to set predefined dates and date ranges so the user can select these by one click. Define either a JSON or an object with the defined shortcuts. More info is below.',\n type: 'object',\n status: 'optional',\n },\n addonElement: {\n doc: 'Gives you the possibility to inject a React element showing up over the footer. Use it to customize `shortcuts`.',\n type: 'object',\n status: 'optional',\n },\n inputElement: {\n doc: 'Gives you the possibility to use a plain/vanilla `<input />` HTML element by defining it as a string `inputElement=\"input\"`, a React element, or a render function `inputElement={(internalProps) => (<Return />)}`. Can also be used in circumstances where the `react-text-mask` should not be used, e.g. in testing environments. Defaults to custom masked input.',\n type: 'React.ReactNode',\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: '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 disableAutofocus: {\n doc: 'Once the date picker gets opened, there is a focus handling to ensure good accessibility. This can be disabled with this property. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n correctInvalidDate: {\n doc: 'Corrects the input date value to be the same as either `minDate` or `maxDate`, when the user types in a date that is either before or after one of these. Defaults to `false`.',\n type: 'boolean',\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 tooltip: {\n doc: 'Provide a short Tooltip content that shows up on the picker button.',\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 size: {\n doc: 'The sizes you can choose is `small` (1.5rem), `default` (2rem), `medium` (2.5rem) and `large` (3rem) are supported component sizes. Defaults to `default` / `null`.',\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 DatePickerEvents: PropertiesTableProps = {\n onChange: {\n doc: 'Will be called on a date change event. Returns an object. See Returned Object below.',\n type: 'function',\n status: 'optional',\n },\n onType: {\n doc: 'Will be called on every input and date picker interaction. Returns an `object`. See Returned Object below.',\n type: 'function',\n status: 'optional',\n },\n onSubmit: {\n doc: 'Will be called once a user presses the submit button.',\n type: 'function',\n status: 'optional',\n },\n onCancel: {\n doc: 'Will be called once a user presses the cancel button.',\n type: 'function',\n status: 'optional',\n },\n onReset: {\n doc: 'Will be called once a user presses the reset button.',\n type: 'function',\n status: 'optional',\n },\n onShow: {\n doc: 'Will be called once date-picker is visible.',\n type: 'function',\n status: 'optional',\n },\n onHide: {\n doc: 'Will be called once date-picker is hidden.',\n type: 'function',\n status: 'optional',\n },\n onDaysRender: {\n doc: 'Will be called right before every new calendar view gets rendered. See the example above.',\n type: 'function',\n status: 'optional',\n },\n onFocus: {\n doc: 'Will be called once the input gets focus.',\n type: 'function',\n status: 'optional',\n },\n onBlur: {\n doc: 'Will be called once the input lose focus.',\n type: 'function',\n status: 'optional',\n },\n}\n"],"mappings":"AAEA,MAAMA,QAAQ,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC;AAEnC,OAAO,MAAMC,oBAA0C,GAAG;EACxDC,IAAI,EAAE;IACJC,GAAG,EAAE,uHAAuH;IAC5HC,IAAI,EAAEJ,QAAQ;IACdK,MAAM,EAAE;EACV,CAAC;EACDC,SAAS,EAAE;IACTH,GAAG,EAAE,qIAAqI;IAC1IC,IAAI,EAAEJ,QAAQ;IACdK,MAAM,EAAE;EACV,CAAC;EACDE,OAAO,EAAE;IACPJ,GA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