@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
@@ -1 +1 @@
1
- {"version":3,"file":"DatePickerProvider.js","names":["React","useCallback","useContext","isValid","format","differenceInCalendarDays","SharedContext","correctV1Format","isDisabled","DatePickerContext","useViews","useDates","useLastEventCallCache","defaultProps","returnFormat","DatePickerProvider","externalProps","props","_objectSpread","date","startDate","endDate","startMonth","endMonth","minDate","maxDate","dateFormat","range","correctInvalidDate","attributes","returnFormatProp","children","onChange","setReturnObject","hidePicker","sharedContext","dates","updateDates","hasHadValidDate","previousDateProps","isRange","shouldCorrectDate","views","setViews","setHasClickedCalendarDay","lastEventCallCache","setLastEventCallCache","getReturnObject","_ref","arguments","length","undefined","event","rest","_objectWithoutProperties","_excluded","partialStartDate","partialEndDate","invalidStartDate","invalidEndDate","startDateIsValid","Boolean","endDateIsValid","hasMinOrMaxDates","returnObject","days_between","start_date","end_date","is_valid_start_date","is_valid_end_date","partialDate","invalidDate","is_valid","callOnChangeHandler","createElement","Provider","value","translation"],"sources":["../../../../src/components/date-picker/DatePickerProvider.tsx"],"sourcesContent":["/**\n * Web DatePicker Provider\n *\n */\n\nimport React, { useCallback, useContext } from 'react'\nimport type {\n DatePickerEventAttributes,\n DatePickerAllProps,\n DatePickerProps,\n} from './DatePicker'\n\nimport isValid from 'date-fns/isValid'\nimport format from 'date-fns/format'\nimport differenceInCalendarDays from 'date-fns/differenceInCalendarDays'\n\nimport SharedContext from '../../shared/Context'\nimport { correctV1Format, isDisabled } from './DatePickerCalc'\nimport DatePickerContext, {\n DatePickerContextValues,\n} from './DatePickerContext'\nimport useViews, { CalendarView } from './hooks/useViews'\nimport useDates, { DatePickerDates } from './hooks/useDates'\nimport useLastEventCallCache, {\n LastEventCallCache,\n} from './hooks/useLastEventCallCache'\nimport { InvalidDates } from './DatePickerInput'\nimport { PartialDates } from './hooks/usePartialDates'\n\ntype DatePickerProviderProps = DatePickerAllProps & {\n setReturnObject: (\n func: DatePickerContextValues['getReturnObject']\n ) => DatePickerContextValues['getReturnObject']\n hidePicker?: DatePickerContextValues['hidePicker']\n attributes?: DatePickerEventAttributes\n children: React.ReactNode\n}\n\nexport type DatePickerChangeEvent<E> = DatePickerDates &\n InvalidDates & {\n nr?: number\n hidePicker?: boolean\n event?: E\n }\n\nexport type GetReturnObjectParams<E> = DatePickerDates &\n PartialDates &\n InvalidDates & {\n event?: E\n }\n\n// TODO: convert properties on event handler return objects to camelCase, constitutes a breaking change\nexport type ReturnObject<E> = InvalidDates &\n PartialDates & {\n event?: E\n attributes?: Record<string, unknown>\n days_between?: number\n date?: string | null\n start_date?: string | null\n end_date?: string | null\n is_valid?: boolean\n is_valid_start_date?: boolean\n is_valid_end_date?: boolean\n }\n\nexport type DatePickerProviderState = DatePickerDates &\n Array<CalendarView> &\n LastEventCallCache\n\nconst defaultProps: Partial<DatePickerProps> = {\n returnFormat: 'yyyy-MM-dd', // used in date-fns v1: YYYY-MM-DD\n}\n\nfunction DatePickerProvider(externalProps: DatePickerProviderProps) {\n const props = { ...defaultProps, ...externalProps }\n\n const {\n date,\n startDate,\n endDate,\n startMonth,\n endMonth,\n minDate,\n maxDate,\n dateFormat,\n range,\n correctInvalidDate,\n attributes,\n returnFormat: returnFormatProp,\n children,\n onChange,\n setReturnObject,\n hidePicker,\n } = props\n\n const sharedContext = useContext(SharedContext)\n\n const { dates, updateDates, hasHadValidDate, previousDateProps } =\n useDates(\n {\n date,\n startDate,\n endDate,\n startMonth,\n endMonth,\n minDate,\n maxDate,\n },\n {\n dateFormat: dateFormat,\n isRange: range,\n shouldCorrectDate: correctInvalidDate,\n }\n )\n\n const { views, setViews, setHasClickedCalendarDay } = useViews({\n startMonth: dates.startMonth,\n endMonth: dates.endMonth,\n isRange: range,\n })\n\n const [lastEventCallCache, setLastEventCallCache] =\n useLastEventCallCache({\n startDate: dates.startDate,\n endDate: dates.endDate,\n })\n\n const getReturnObject = useCallback(\n <E,>({ event = null, ...rest }: GetReturnObjectParams<E> = {}) => {\n const {\n startDate,\n endDate,\n partialStartDate,\n partialEndDate,\n invalidStartDate,\n invalidEndDate,\n } = {\n ...views,\n ...dates,\n ...rest,\n }\n\n const returnFormat = correctV1Format(returnFormatProp)\n const startDateIsValid = Boolean(startDate && isValid(startDate))\n const endDateIsValid = Boolean(endDate && isValid(endDate))\n const hasMinOrMaxDates = minDate || maxDate\n\n const returnObject: ReturnObject<E> = {\n event,\n attributes: attributes || {},\n }\n\n // Handle range props\n if (range) {\n return {\n ...returnObject,\n days_between:\n startDateIsValid && endDateIsValid\n ? differenceInCalendarDays(endDate, startDate)\n : null,\n start_date: startDateIsValid\n ? format(startDate, returnFormat)\n : null,\n end_date: endDateIsValid ? format(endDate, returnFormat) : null,\n is_valid_start_date:\n hasMinOrMaxDates &&\n startDateIsValid &&\n isDisabled(startDate, dates.minDate, dates.maxDate)\n ? false\n : startDateIsValid,\n is_valid_end_date:\n hasMinOrMaxDates &&\n endDateIsValid &&\n isDisabled(endDate, dates.minDate, dates.maxDate)\n ? false\n : endDateIsValid,\n partialStartDate,\n partialEndDate,\n invalidStartDate,\n invalidEndDate,\n }\n }\n\n return {\n ...returnObject,\n date: startDateIsValid ? format(startDate, returnFormat) : null,\n partialDate: partialStartDate,\n // Can be removed in v11, in favor to partialDate,\n // to keep the naming logic the same as with date and invalidDate when not in range mode\n partialStartDate,\n invalidDate: invalidStartDate,\n is_valid:\n hasMinOrMaxDates &&\n startDateIsValid &&\n isDisabled(startDate, dates.minDate, dates.maxDate)\n ? false\n : startDateIsValid,\n }\n },\n [dates, views, attributes, maxDate, minDate, range, returnFormatProp]\n )\n\n const callOnChangeHandler = useCallback(\n <E,>(event: E & DatePickerDates) => {\n /**\n * Prevent on_change to be fired twice if date not has actually changed\n */\n if (\n lastEventCallCache &&\n lastEventCallCache.startDate === event.startDate &&\n lastEventCallCache.endDate === event.endDate\n ) {\n return // stop here\n }\n\n onChange?.(getReturnObject({ ...dates, ...event }))\n\n setLastEventCallCache({\n startDate: event.startDate,\n endDate: event.endDate,\n })\n },\n [\n getReturnObject,\n dates,\n onChange,\n lastEventCallCache,\n setLastEventCallCache,\n ]\n )\n\n // Is this at any point something other than a function?\n if (typeof setReturnObject === 'function') {\n setReturnObject(getReturnObject)\n }\n\n return (\n <DatePickerContext.Provider\n value={{\n translation: sharedContext.translation,\n updateDates,\n getReturnObject,\n callOnChangeHandler,\n hidePicker: hidePicker,\n props,\n ...dates,\n previousDateProps,\n hasHadValidDate,\n views,\n setViews,\n setHasClickedCalendarDay,\n }}\n >\n {children}\n </DatePickerContext.Provider>\n )\n}\n\nexport default DatePickerProvider\n"],"mappings":";;;;;;;;AAKA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,UAAU,QAAQ,OAAO;AAOtD,OAAOC,OAAO,MAAM,kBAAkB;AACtC,OAAOC,MAAM,MAAM,iBAAiB;AACpC,OAAOC,wBAAwB,MAAM,mCAAmC;AAExE,OAAOC,aAAa,MAAM,sBAAsB;AAChD,SAASC,eAAe,EAAEC,UAAU,QAAQ,kBAAkB;AAC9D,OAAOC,iBAAiB,MAEjB,qBAAqB;AAC5B,OAAOC,QAAQ,MAAwB,kBAAkB;AACzD,OAAOC,QAAQ,MAA2B,kBAAkB;AAC5D,OAAOC,qBAAqB,MAErB,+BAA+B;AA4CtC,MAAMC,YAAsC,GAAG;EAC7CC,YAAY,EAAE;AAChB,CAAC;AAED,SAASC,kBAAkBA,CAACC,aAAsC,EAAE;EAClE,MAAMC,KAAK,GAAAC,aAAA,CAAAA,aAAA,KAAQL,YAAY,GAAKG,aAAa,CAAE;EAEnD,MAAM;IACJG,IAAI;IACJC,SAAS;IACTC,OAAO;IACPC,UAAU;IACVC,QAAQ;IACRC,OAAO;IACPC,OAAO;IACPC,UAAU;IACVC,KAAK;IACLC,kBAAkB;IAClBC,UAAU;IACVf,YAAY,EAAEgB,gBAAgB;IAC9BC,QAAQ;IACRC,QAAQ;IACRC,eAAe;IACfC;EACF,CAAC,GAAGjB,KAAK;EAET,MAAMkB,aAAa,GAAGjC,UAAU,CAACI,aAAa,CAAC;EAE/C,MAAM;IAAE8B,KAAK;IAAEC,WAAW;IAAEC,eAAe;IAAEC;EAAkB,CAAC,GAC9D5B,QAAQ,CACN;IACEQ,IAAI;IACJC,SAAS;IACTC,OAAO;IACPC,UAAU;IACVC,QAAQ;IACRC,OAAO;IACPC;EACF,CAAC,EACD;IACEC,UA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,EAAEG,KAAK,EAAEG,gBAAgB,CACtE,CAAC;EAED,MAAM2C,mBAAmB,GAAGxE,WAAW,CAChCmD,KAA0B,IAAK;IAIlC,IACEP,kBAAkB,IAClBA,kBAAkB,CAACzB,SAAS,KAAKgC,KAAK,CAAChC,SAAS,IAChDyB,kBAAkB,CAACxB,OAAO,KAAK+B,KAAK,CAAC/B,OAAO,EAC5C;MACA;IACF;IAEAW,QAAQ,aAARA,QAAQ,uBAARA,QAAQ,CAAGe,eAAe,CAAA7B,aAAA,CAAAA,aAAA,KAAMkB,KAAK,GAAKgB,KAAK,CAAE,CAAC,CAAC;IAEnDN,qBAAqB,CAAC;MACpB1B,SAAS,EAAEgC,KAAK,CAAChC,SAAS;MAC1BC,OAAO,EAAE+B,KAAK,CAAC/B;IACjB,CAAC,CAAC;EACJ,CAAC,EACD,CACE0B,eAAe,EACfX,KAAK,EACLJ,QAAQ,EACRa,kBAAkB,EAClBC,qBAAqB,CAEzB,CAAC;EAGD,IAAI,OAAOb,eAAe,KAAK,UAAU,EAAE;IACzCA,eAAe,CAACc,eAAe,CAAC;EAClC;EAEA,OACE/C,KAAA,CAAA0E,aAAA,CAACjE,iBAAiB,CAACkE,QAAQ;IACzBC,KAAK,EAAA1D,aAAA,CAAAA,aAAA;MACH2D,WAAW,EAAE1C,aAAa,CAAC0C,WAAW;MACtCxC,WAAW;MACXU,eAAe;MACf0B,mBAAmB;MACnBvC,UAAU,EAAEA,UAAU;MACtBjB;IAAK,GACFmB,KAAK;MACRG,iBAAiB;MACjBD,eAAe;MACfI,KAAK;MACLC,QAAQ;MACRC;IAAwB;EACxB,GAEDb,QACyB,CAAC;AAEjC;AAEA,eAAehB,kBAAkB","ignoreList":[]}
1
+ {"version":3,"file":"DatePickerProvider.js","names":["React","useCallback","useContext","isValid","format","differenceInCalendarDays","SharedContext","correctV1Format","isDisabled","DatePickerContext","useViews","useDates","useLastEventCallCache","defaultProps","returnFormat","DatePickerProvider","externalProps","props","_objectSpread","date","startDate","endDate","startMonth","endMonth","minDate","maxDate","dateFormat","range","correctInvalidDate","attributes","returnFormatProp","children","onChange","setReturnObject","hidePicker","sharedContext","dates","updateDates","previousDateProps","isRange","shouldCorrectDate","views","setViews","setHasClickedCalendarDay","lastEventCallCache","setLastEventCallCache","getReturnObject","_ref","arguments","length","undefined","event","rest","_objectWithoutProperties","_excluded","partialStartDate","partialEndDate","invalidStartDate","invalidEndDate","startDateIsValid","Boolean","endDateIsValid","hasMinOrMaxDates","returnObject","days_between","start_date","end_date","is_valid_start_date","is_valid_end_date","partialDate","invalidDate","is_valid","callOnChangeHandler","createElement","Provider","value","translation"],"sources":["../../../../src/components/date-picker/DatePickerProvider.tsx"],"sourcesContent":["/**\n * Web DatePicker Provider\n *\n */\n\nimport React, { useCallback, useContext } from 'react'\nimport type {\n DatePickerEventAttributes,\n DatePickerAllProps,\n DatePickerProps,\n} from './DatePicker'\n\nimport isValid from 'date-fns/isValid'\nimport format from 'date-fns/format'\nimport differenceInCalendarDays from 'date-fns/differenceInCalendarDays'\n\nimport SharedContext from '../../shared/Context'\nimport { correctV1Format, isDisabled } from './DatePickerCalc'\nimport DatePickerContext, {\n DatePickerContextValues,\n} from './DatePickerContext'\nimport useViews, { CalendarView } from './hooks/useViews'\nimport useDates, { DatePickerDates } from './hooks/useDates'\nimport useLastEventCallCache, {\n LastEventCallCache,\n} from './hooks/useLastEventCallCache'\nimport { InvalidDates } from './DatePickerInput'\nimport { PartialDates } from './hooks/usePartialDates'\n\ntype DatePickerProviderProps = DatePickerAllProps & {\n setReturnObject: (\n func: DatePickerContextValues['getReturnObject']\n ) => DatePickerContextValues['getReturnObject']\n hidePicker?: DatePickerContextValues['hidePicker']\n attributes?: DatePickerEventAttributes\n children: React.ReactNode\n}\n\nexport type DatePickerChangeEvent<E> = DatePickerDates &\n InvalidDates & {\n nr?: number\n hidePicker?: boolean\n event?: E\n }\n\nexport type GetReturnObjectParams<E> = DatePickerDates &\n PartialDates &\n InvalidDates & {\n event?: E\n }\n\n// TODO: convert properties on event handler return objects to camelCase, constitutes a breaking change\nexport type ReturnObject<E> = InvalidDates &\n PartialDates & {\n event?: E\n attributes?: Record<string, unknown>\n days_between?: number\n date?: string | null\n start_date?: string | null\n end_date?: string | null\n is_valid?: boolean\n is_valid_start_date?: boolean\n is_valid_end_date?: boolean\n }\n\nexport type DatePickerProviderState = DatePickerDates &\n Array<CalendarView> &\n LastEventCallCache\n\nconst defaultProps: Partial<DatePickerProps> = {\n returnFormat: 'yyyy-MM-dd', // used in date-fns v1: YYYY-MM-DD\n}\n\nfunction DatePickerProvider(externalProps: DatePickerProviderProps) {\n const props = { ...defaultProps, ...externalProps }\n\n const {\n date,\n startDate,\n endDate,\n startMonth,\n endMonth,\n minDate,\n maxDate,\n dateFormat,\n range,\n correctInvalidDate,\n attributes,\n returnFormat: returnFormatProp,\n children,\n onChange,\n setReturnObject,\n hidePicker,\n } = props\n\n const sharedContext = useContext(SharedContext)\n\n const { dates, updateDates, previousDateProps } = useDates(\n {\n date,\n startDate,\n endDate,\n startMonth,\n endMonth,\n minDate,\n maxDate,\n },\n {\n dateFormat: dateFormat,\n isRange: range,\n shouldCorrectDate: correctInvalidDate,\n }\n )\n\n const { views, setViews, setHasClickedCalendarDay } = useViews({\n startMonth: dates.startMonth,\n endMonth: dates.endMonth,\n isRange: range,\n })\n\n const [lastEventCallCache, setLastEventCallCache] =\n useLastEventCallCache({\n startDate: dates.startDate,\n endDate: dates.endDate,\n })\n\n const getReturnObject = useCallback(\n <E,>({ event = null, ...rest }: GetReturnObjectParams<E> = {}) => {\n const {\n startDate,\n endDate,\n partialStartDate,\n partialEndDate,\n invalidStartDate,\n invalidEndDate,\n } = {\n ...views,\n ...dates,\n ...rest,\n }\n\n const returnFormat = correctV1Format(returnFormatProp)\n const startDateIsValid = Boolean(startDate && isValid(startDate))\n const endDateIsValid = Boolean(endDate && isValid(endDate))\n const hasMinOrMaxDates = minDate || maxDate\n\n const returnObject: ReturnObject<E> = {\n event,\n attributes: attributes || {},\n }\n\n // Handle range props\n if (range) {\n return {\n ...returnObject,\n days_between:\n startDateIsValid && endDateIsValid\n ? differenceInCalendarDays(endDate, startDate)\n : null,\n start_date: startDateIsValid\n ? format(startDate, returnFormat)\n : null,\n end_date: endDateIsValid ? format(endDate, returnFormat) : null,\n is_valid_start_date:\n hasMinOrMaxDates &&\n startDateIsValid &&\n isDisabled(startDate, dates.minDate, dates.maxDate)\n ? false\n : startDateIsValid,\n is_valid_end_date:\n hasMinOrMaxDates &&\n endDateIsValid &&\n isDisabled(endDate, dates.minDate, dates.maxDate)\n ? false\n : endDateIsValid,\n partialStartDate,\n partialEndDate,\n invalidStartDate,\n invalidEndDate,\n }\n }\n\n return {\n ...returnObject,\n date: startDateIsValid ? format(startDate, returnFormat) : null,\n partialDate: partialStartDate,\n // Can be removed in v11, in favor to partialDate,\n // to keep the naming logic the same as with date and invalidDate when not in range mode\n partialStartDate,\n invalidDate: invalidStartDate,\n is_valid:\n hasMinOrMaxDates &&\n startDateIsValid &&\n isDisabled(startDate, dates.minDate, dates.maxDate)\n ? false\n : startDateIsValid,\n }\n },\n [dates, views, attributes, maxDate, minDate, range, returnFormatProp]\n )\n\n const callOnChangeHandler = useCallback(\n <E,>(event: E & DatePickerDates) => {\n /**\n * Prevent on_change to be fired twice if date not has actually changed\n */\n if (\n lastEventCallCache &&\n lastEventCallCache.startDate === event.startDate &&\n lastEventCallCache.endDate === event.endDate\n ) {\n return // stop here\n }\n\n onChange?.(getReturnObject({ ...dates, ...event }))\n\n setLastEventCallCache({\n startDate: event.startDate,\n endDate: event.endDate,\n })\n },\n [\n getReturnObject,\n dates,\n onChange,\n lastEventCallCache,\n setLastEventCallCache,\n ]\n )\n\n // Is this at any point something other than a function?\n if (typeof setReturnObject === 'function') {\n setReturnObject(getReturnObject)\n }\n\n return (\n <DatePickerContext.Provider\n value={{\n translation: sharedContext.translation,\n updateDates,\n getReturnObject,\n callOnChangeHandler,\n hidePicker: hidePicker,\n props,\n ...dates,\n previousDateProps,\n views,\n setViews,\n setHasClickedCalendarDay,\n }}\n >\n {children}\n </DatePickerContext.Provider>\n )\n}\n\nexport default DatePickerProvider\n"],"mappings":";;;;;;;;AAKA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,UAAU,QAAQ,OAAO;AAOtD,OAAOC,OAAO,MAAM,kBAAkB;AACtC,OAAOC,MAAM,MAAM,iBAAiB;AACpC,OAAOC,wBAAwB,MAAM,mCAAmC;AAExE,OAAOC,aAAa,MAAM,sBAAsB;AAChD,SAASC,eAAe,EAAEC,UAAU,QAAQ,kBAAkB;AAC9D,OAAOC,iBAAiB,MAEjB,qBAAqB;AAC5B,OAAOC,QAAQ,MAAwB,kBAAkB;AACzD,OAAOC,QAAQ,MAA2B,kBAAkB;AAC5D,OAAOC,qBAAqB,MAErB,+BAA+B;AA4CtC,MAAMC,YAAsC,GAAG;EAC7CC,YAAY,EAAE;AAChB,CAAC;AAED,SAASC,kBAAkBA,CAACC,aAAsC,EAAE;EAClE,MAAMC,KAAK,GAAAC,aAAA,CAAAA,aAAA,KAAQL,YAAY,GAAKG,aAAa,CAAE;EAEnD,MAAM;IACJG,IAAI;IACJC,SAAS;IACTC,OAAO;IACPC,UAAU;IACVC,QAAQ;IACRC,OAAO;IACPC,OAAO;IACPC,UAAU;IACVC,KAAK;IACLC,kBAAkB;IAClBC,UAAU;IACVf,YAAY,EAAEgB,gBAAgB;IAC9BC,QAAQ;IACRC,QAAQ;IACRC,eAAe;IACfC;EACF,CAAC,GAAGjB,KAAK;EAET,MAAMkB,aAAa,GAAGjC,UAAU,CAACI,aAAa,CAAC;EAE/C,MAAM;IAAE8B,KAAK;IAAEC,WAAW;IAAEC;EAAkB,CAAC,GAAG3B,QAAQ,CACxD;IACEQ,IAAI;IACJC,SAAS;IACTC,OAAO;IACPC,UAAU;IACVC,QAAQ;IACRC,OAAO;IACPC;EACF,CAAC,EACD;IACEC,UAAU,EAAEA,UAAU;IACtBa,OAAO,EAAEZ,KAAK;IACda,iBA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M0C,mBAAmB,GAAGvE,WAAW,CAChCkD,KAA0B,IAAK;IAIlC,IACEP,kBAAkB,IAClBA,kBAAkB,CAACxB,SAAS,KAAK+B,KAAK,CAAC/B,SAAS,IAChDwB,kBAAkB,CAACvB,OAAO,KAAK8B,KAAK,CAAC9B,OAAO,EAC5C;MACA;IACF;IAEAW,QAAQ,aAARA,QAAQ,uBAARA,QAAQ,CAAGc,eAAe,CAAA5B,aAAA,CAAAA,aAAA,KAAMkB,KAAK,GAAKe,KAAK,CAAE,CAAC,CAAC;IAEnDN,qBAAqB,CAAC;MACpBzB,SAAS,EAAE+B,KAAK,CAAC/B,SAAS;MAC1BC,OAAO,EAAE8B,KAAK,CAAC9B;IACjB,CAAC,CAAC;EACJ,CAAC,EACD,CACEyB,eAAe,EACfV,KAAK,EACLJ,QAAQ,EACRY,kBAAkB,EAClBC,qBAAqB,CAEzB,CAAC;EAGD,IAAI,OAAOZ,eAAe,KAAK,UAAU,EAAE;IACzCA,eAAe,CAACa,eAAe,CAAC;EAClC;EAEA,OACE9C,KAAA,CAAAyE,aAAA,CAAChE,iBAAiB,CAACiE,QAAQ;IACzBC,KAAK,EAAAzD,aAAA,CAAAA,aAAA;MACH0D,WAAW,EAAEzC,aAAa,CAACyC,WAAW;MACtCvC,WAAW;MACXS,eAAe;MACf0B,mBAAmB;MACnBtC,UAAU,EAAEA,UAAU;MACtBjB;IAAK,GACFmB,KAAK;MACRE,iBAAiB;MACjBG,KAAK;MACLC,QAAQ;MACRC;IAAwB;EACxB,GAEDZ,QACyB,CAAC;AAEjC;AAEA,eAAehB,kBAAkB","ignoreList":[]}
@@ -30,13 +30,11 @@ export type DatePickerDates = {
30
30
  maxDate?: Date;
31
31
  startMonth?: Date;
32
32
  endMonth?: Date;
33
- hasHadValidDate?: boolean;
34
33
  hoverDate?: Date;
35
34
  } & DatePickerInputDates;
36
35
  export default function useDates(dateProps: DatePickerDateProps, { dateFormat, isRange, shouldCorrectDate, }: UseDatesOptions): {
37
36
  readonly dates: DatePickerDates;
38
37
  readonly updateDates: (newDates: DatePickerDates, callback?: (dates: DatePickerDates) => void) => void;
39
- readonly hasHadValidDate: boolean;
40
38
  readonly previousDateProps: DatePickerDateProps;
41
39
  };
42
40
  export declare function pad(date: string, size: number): string;
@@ -4,11 +4,12 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
4
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
5
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
6
  import "core-js/modules/web.dom-collections.iterator.js";
7
- import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
7
+ import React, { useCallback, useMemo, useState } from 'react';
8
8
  import { convertStringToDate, isDisabled } from '../DatePickerCalc';
9
9
  import isValid from 'date-fns/isValid';
10
10
  import format from 'date-fns/format';
11
11
  import { addMonths, isSameDay } from 'date-fns';
12
+ const useLayoutEffect = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;
12
13
  export default function useDates(dateProps, _ref) {
13
14
  let {
14
15
  dateFormat,
@@ -46,7 +47,6 @@ export default function useDates(dateProps, _ref) {
46
47
  setDates(currentDates => _objectSpread(_objectSpread({}, currentDates), derivedDates));
47
48
  setPreviousDateProps(dateProps);
48
49
  }
49
- const hasHadValidDate = useRef(false);
50
50
  const updateDates = useCallback((newDates, callback) => {
51
51
  var _newDates$startDate, _newDates$endDate;
52
52
  const correctedDates = shouldCorrectDate ? correctDates({
@@ -65,16 +65,14 @@ export default function useDates(dateProps, _ref) {
65
65
  });
66
66
  callback === null || callback === void 0 ? void 0 : callback(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, dates), newDates), months), correctedDates));
67
67
  }, [dates, shouldCorrectDate, isRange]);
68
- useEffect(() => {
68
+ useLayoutEffect(() => {
69
69
  const startDates = updateInputDates('start', dates.startDate);
70
70
  const endDates = updateInputDates('end', dates.endDate);
71
- hasHadValidDate.current = isValid(dates.startDate) || isValid(dates.endDate);
72
71
  setDates(currentDates => _objectSpread(_objectSpread(_objectSpread({}, currentDates), startDates), endDates));
73
72
  }, [dates.startDate, dates.endDate]);
74
73
  return {
75
74
  dates,
76
75
  updateDates,
77
- hasHadValidDate: hasHadValidDate.current,
78
76
  previousDateProps
79
77
  };
80
78
  }
@@ -1 +1 @@
1
- {"version":3,"file":"useDates.js","names":["useCallback","useEffect","useMemo","useRef","useState","convertStringToDate","isDisabled","isValid","format","addMonths","isSameDay","useDates","dateProps","_ref","dateFormat","isRange","shouldCorrectDate","previousDateProps","setPreviousDateProps","dates","setDates","_objectSpread","mapDates","hasDatePropChanges","Object","keys","some","date","dateProp","previousDate","convertedDateProp","convertedPreviousDate","Date","derivedDates","deriveDatesFromProps","currentDates","hasHadValidDate","updateDates","newDates","callback","_newDates$startDate","_newDates$endDate","correctedDates","correctDates","startDate","endDate","minDate","maxDate","months","updateMonths","startDates","updateInputDates","endDates","current","type","updatedDates","pad","undefined","_ref2","_ref3","_convertStringToDate","_convertStringToDate2","getDate","startMonth","endMonth","hasValidStartDate","hasValidEndDate","__startDay","__startMonth","__startYear","__endDay","__endMonth","__endYear","_ref4","getStartDate","_ref5","_ref6","_ref7","_newDates$startMonth","_ref8","_newDates$endMonth","size","dateWithPadding","substring","length"],"sources":["../../../../../src/components/date-picker/hooks/useDates.ts"],"sourcesContent":["import { useCallback, useEffect, useMemo, useRef, useState } from 'react'\nimport { convertStringToDate, isDisabled } from '../DatePickerCalc'\nimport isValid from 'date-fns/isValid'\nimport format from 'date-fns/format'\nimport { addMonths, isSameDay } from 'date-fns'\nimport { DateType } from '../DatePickerContext'\n\nexport type DatePickerDateProps = {\n date?: DateType\n startDate?: DateType\n endDate?: DateType\n startMonth?: DateType\n endMonth?: DateType\n minDate?: DateType\n maxDate?: DateType\n hoverDate?: DateType | null\n}\n\ntype UseDatesOptions = {\n dateFormat: string\n isRange: boolean\n shouldCorrectDate: boolean\n}\n// TODO: Move to DatePickerInput\nexport type DatePickerInputDates = {\n __startDay?: string\n __startMonth?: string\n __startYear?: string\n __endDay?: string\n __endMonth?: string\n __endYear?: string\n}\n\nexport type DatePickerDates = {\n date?: DateType\n startDate?: Date\n endDate?: Date\n minDate?: Date\n maxDate?: Date\n startMonth?: Date\n endMonth?: Date\n hasHadValidDate?: boolean\n hoverDate?: Date\n} & DatePickerInputDates\n\nexport default function useDates(\n dateProps: DatePickerDateProps,\n {\n dateFormat,\n isRange = false,\n shouldCorrectDate = false,\n }: UseDatesOptions\n) {\n const [previousDateProps, setPreviousDateProps] = useState(dateProps)\n const [dates, setDates] = useState<DatePickerDates>({\n ...mapDates(dateProps, {\n dateFormat,\n isRange,\n shouldCorrectDate,\n }),\n })\n\n const hasDatePropChanges = useMemo(\n () =>\n Object.keys(dateProps).some((date) => {\n const dateProp = dateProps[date]\n const previousDate = previousDateProps[date]\n\n const convertedDateProp = convertStringToDate(dateProp, {\n dateFormat,\n })\n const convertedPreviousDate = convertStringToDate(previousDate, {\n dateFormat,\n })\n // Make sure that same dates does not trigger a change\n // i.e. 2021-01-01 and new Date('2021-01-01')\n if (\n convertedDateProp instanceof Date &&\n convertedPreviousDate instanceof Date\n ) {\n return !isSameDay(convertedDateProp, convertedPreviousDate)\n }\n\n return dateProp !== previousDate\n }),\n [dateProps, previousDateProps, dateFormat]\n )\n\n // Update dates on prop change\n if (hasDatePropChanges) {\n const derivedDates = deriveDatesFromProps({\n dates,\n dateProps,\n previousDateProps,\n dateFormat,\n isRange,\n })\n\n setDates((currentDates) => ({ ...currentDates, ...derivedDates }))\n setPreviousDateProps(dateProps)\n }\n\n const hasHadValidDate = useRef<boolean>(false)\n\n const updateDates = useCallback(\n (\n newDates: DatePickerDates,\n callback?: (dates: DatePickerDates) => void\n ) => {\n // Correct dates based on min and max date\n const correctedDates = shouldCorrectDate\n ? correctDates({\n startDate: newDates.startDate ?? dates.startDate,\n endDate: newDates.endDate ?? dates.endDate,\n minDate: dates.minDate,\n maxDate: dates.maxDate,\n isRange,\n })\n : {}\n\n // Update months based on month or start/end date changes\n const months = updateMonths({\n newDates,\n currentDates: dates,\n })\n\n setDates((currentDates) => {\n return {\n ...currentDates,\n ...newDates,\n ...months,\n ...correctedDates,\n }\n })\n\n callback?.({\n ...dates,\n ...newDates,\n ...months,\n ...correctedDates,\n })\n },\n [dates, shouldCorrectDate, isRange]\n )\n\n // Updated input dates based on start and end dates, move to DatePickerInput\n // TODO: Move to DatePickerInput\n useEffect(() => {\n const startDates = updateInputDates('start', dates.startDate)\n const endDates = updateInputDates('end', dates.endDate)\n\n hasHadValidDate.current =\n isValid(dates.startDate) || isValid(dates.endDate)\n\n setDates((currentDates) => ({\n ...currentDates,\n ...startDates,\n ...endDates,\n }))\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [dates.startDate, dates.endDate])\n\n return {\n dates,\n updateDates,\n hasHadValidDate: hasHadValidDate.current,\n previousDateProps,\n } as const\n}\n\n// TODO: Move to DatePickerInput\nfunction updateInputDates(type: 'start' | 'end', date: Date | undefined) {\n const updatedDates = {}\n\n if (isValid(date)) {\n updatedDates[`__${type}Day`] = pad(format(date, 'dd'), 2)\n updatedDates[`__${type}Month`] = pad(format(date, 'MM'), 2)\n updatedDates[`__${type}Year`] = format(date, 'yyyy')\n } else if (date === undefined) {\n updatedDates[`__${type}Day`] = null\n updatedDates[`__${type}Month`] = null\n updatedDates[`__${type}Year`] = null\n }\n\n return updatedDates\n}\n\nfunction mapDates(\n dateProps: DatePickerDateProps,\n {\n dateFormat,\n isRange,\n shouldCorrectDate,\n }: Omit<UseDatesOptions, 'isLinked'>\n) {\n const date = dateProps.date\n\n const startDate =\n typeof dateProps?.startDate !== 'undefined'\n ? getDate(dateProps.startDate, dateFormat)\n : typeof date !== 'undefined'\n ? getDate(date, dateFormat)\n : undefined\n\n const endDate = !isRange\n ? startDate\n : convertStringToDate(dateProps?.endDate, {\n dateFormat,\n }) || undefined\n\n // Ensure that the calendar view displays the correct start and end months, and to prevent date flickering bug\n const startMonth =\n convertStringToDate(dateProps.startMonth, {\n dateFormat,\n }) ??\n startDate ??\n new Date()\n\n const endMonth =\n convertStringToDate(dateProps.endMonth, {\n dateFormat: dateFormat,\n }) ?? (isRange ? endDate ?? addMonths(startMonth, 1) : startMonth)\n\n const minDate = convertStringToDate(dateProps.minDate, {\n dateFormat,\n })\n\n const maxDate = convertStringToDate(dateProps.maxDate, {\n dateFormat,\n })\n\n const correctedDates = shouldCorrectDate\n ? correctDates({ startDate, endDate, minDate, maxDate, isRange })\n : {}\n\n const dates = {\n date,\n startDate,\n endDate,\n startMonth,\n endMonth,\n minDate,\n maxDate,\n ...correctedDates,\n }\n\n const hasValidStartDate = isValid(dates.startDate)\n const hasValidEndDate = isValid(dates.endDate)\n\n return {\n ...dates,\n __startDay: hasValidStartDate\n ? pad(format(dates.startDate, 'dd'), 2)\n : null,\n __startMonth: hasValidStartDate\n ? pad(format(dates.startDate, 'MM'), 2)\n : null,\n __startYear: hasValidStartDate\n ? format(dates.startDate, 'yyyy')\n : null,\n __endDay: hasValidEndDate ? pad(format(dates.endDate, 'dd'), 2) : null,\n __endMonth: hasValidEndDate\n ? pad(format(dates.endDate, 'MM'), 2)\n : null,\n __endYear: hasValidEndDate ? format(dates.endDate, 'yyyy') : null,\n }\n}\n\nfunction deriveDatesFromProps({\n dates,\n dateProps,\n previousDateProps,\n dateFormat,\n isRange,\n}: {\n dates: DatePickerDates\n dateProps: DatePickerDateProps\n previousDateProps: DatePickerDateProps\n dateFormat: UseDatesOptions['dateFormat']\n isRange: UseDatesOptions['isRange']\n}) {\n const derivedDates: DatePickerDates = {}\n\n const startDate = getStartDate(dateProps, previousDateProps)\n\n // Handle updates related to date and startDate changes when not in range mode\n if (typeof startDate !== 'undefined' && startDate !== dates.startDate) {\n derivedDates.startDate =\n convertStringToDate(startDate, {\n dateFormat,\n }) || undefined\n\n // Set endDate and startMonth to startDate if not in range mode\n if (!isRange) {\n derivedDates.startMonth =\n convertStringToDate(startDate, {\n dateFormat,\n }) || undefined\n\n derivedDates.endDate = derivedDates.startDate\n }\n }\n\n // update endDate based on endDate prop if in range mode\n if (\n isRange &&\n typeof dateProps.endDate !== 'undefined' &&\n dateProps.endDate !== dates.endDate\n ) {\n derivedDates.endDate =\n convertStringToDate(dateProps.endDate, {\n dateFormat,\n }) || undefined\n }\n\n // Handle startMonth/endMonth\n if (\n typeof dateProps.startMonth !== 'undefined' &&\n dateProps.startMonth !== previousDateProps.startMonth\n ) {\n derivedDates.startMonth = convertStringToDate(dateProps.startMonth, {\n dateFormat,\n })\n }\n if (\n typeof dateProps.endMonth !== 'undefined' &&\n dateProps.endMonth !== previousDateProps.endMonth\n ) {\n derivedDates.endMonth = convertStringToDate(dateProps.endMonth, {\n dateFormat,\n })\n }\n\n // Handle minDate/maxDate\n if (\n typeof dateProps.minDate !== 'undefined' &&\n dateProps.minDate !== previousDateProps.minDate\n ) {\n derivedDates.minDate = convertStringToDate(dateProps.minDate, {\n dateFormat,\n })\n }\n if (\n typeof dateProps.maxDate !== 'undefined' &&\n dateProps.maxDate !== previousDateProps.maxDate\n ) {\n derivedDates.maxDate = convertStringToDate(dateProps.maxDate, {\n dateFormat,\n })\n }\n\n return derivedDates\n}\n\nfunction correctDates({\n startDate,\n endDate,\n minDate,\n maxDate,\n isRange,\n}: {\n startDate: Date\n endDate: Date\n minDate: Date\n maxDate: Date\n isRange: boolean\n}) {\n const correctedDates = {}\n\n if (isDisabled(startDate, minDate, maxDate)) {\n correctedDates['startDate'] = minDate\n }\n if (isDisabled(endDate, minDate, maxDate)) {\n // state.endDate is only used by the input if range is set to true.\n // this is done to make maxDate correction work if the input is not a range and only maxDate is defined.\n if (!isRange && !minDate) {\n correctedDates['startDate'] = maxDate\n } else {\n correctedDates['endDate'] = maxDate\n }\n }\n\n return correctedDates\n}\n\nfunction updateMonths({\n newDates,\n currentDates,\n}: {\n newDates: DatePickerDates\n currentDates: DatePickerDates\n}) {\n const startMonth =\n newDates.startMonth ?? newDates.startDate ?? currentDates.startMonth\n const endMonth =\n newDates.endMonth ?? newDates.endDate ?? currentDates.endMonth\n\n return {\n startMonth,\n endMonth,\n }\n}\n\nfunction getDate(date: DateType, dateFormat: string) {\n return date instanceof Date\n ? date\n : convertStringToDate(date ?? '', {\n dateFormat,\n })\n}\n\nfunction getStartDate(\n dateProps: DatePickerDateProps,\n previousDateProps: DatePickerDateProps\n) {\n // prioritize startDate over date if provided\n if (\n typeof dateProps.startDate !== 'undefined' &&\n dateProps.startDate !== previousDateProps.startDate\n ) {\n return dateProps.startDate\n }\n\n if (\n typeof dateProps.date !== 'undefined' &&\n dateProps.date !== previousDateProps.date\n ) {\n return dateProps.date\n }\n\n return undefined\n}\n\nexport function pad(date: string, size: number) {\n const dateWithPadding = '000000000' + date\n\n return dateWithPadding.substring(dateWithPadding.length - size)\n}\n"],"mappings":";;;;;;AAAA,SAASA,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACzE,SAASC,mBAAmB,EAAEC,UAAU,QAAQ,mBAAmB;AACnE,OAAOC,OAAO,MAAM,kBAAkB;AACtC,OAAOC,MAAM,MAAM,iBAAiB;AACpC,SAASC,SAAS,EAAEC,SAAS,QAAQ,UAAU;AAyC/C,eAAe,SAASC,QAAQA,CAC9BC,SAA8B,EAAAC,IAAA,EAM9B;EAAA,IALA;IACEC,UAAU;IACVC,OAAO,GAAG,KAAK;IACfC,iBAAiB,GAAG;EACL,CAAC,GAAAH,IAAA;EAElB,MAAM,CAACI,iBAAi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Callback","useMemo","useState","convertStringToDate","isDisabled","isValid","format","addMonths","isSameDay","useLayoutEffect","window","useEffect","useDates","dateProps","_ref","dateFormat","isRange","shouldCorrectDate","previousDateProps","setPreviousDateProps","dates","setDates","_objectSpread","mapDates","hasDatePropChanges","Object","keys","some","date","dateProp","previousDate","convertedDateProp","convertedPreviousDate","Date","derivedDates","deriveDatesFromProps","currentDates","updateDates","newDates","callback","_newDates$startDate","_newDates$endDate","correctedDates","correctDates","startDate","endDate","minDate","maxDate","months","updateMonths","startDates","updateInputDates","endDates","type","updatedDates","pad","undefined","_ref2","_ref3","_convertStringToDate","_convertStringToDate2","getDate","startMonth","endMonth","hasValidStartDate","hasValidEndDate","__startDay","__startMonth","__startYear","__endDay","__endMonth","__endYear","_ref4","getStartDate","_ref5","_ref6","_ref7","_newDates$startMonth","_ref8","_newDates$endMonth","size","dateWithPadding","substring","length"],"sources":["../../../../../src/components/date-picker/hooks/useDates.ts"],"sourcesContent":["import React, { useCallback, useMemo, useState } from 'react'\nimport { convertStringToDate, isDisabled } from '../DatePickerCalc'\nimport isValid from 'date-fns/isValid'\nimport format from 'date-fns/format'\nimport { addMonths, isSameDay } from 'date-fns'\nimport { DateType } from '../DatePickerContext'\n\n// SSR warning fix: https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85\nconst useLayoutEffect =\n typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect\n\nexport type DatePickerDateProps = {\n date?: DateType\n startDate?: DateType\n endDate?: DateType\n startMonth?: DateType\n endMonth?: DateType\n minDate?: DateType\n maxDate?: DateType\n hoverDate?: DateType | null\n}\n\ntype UseDatesOptions = {\n dateFormat: string\n isRange: boolean\n shouldCorrectDate: boolean\n}\n// TODO: Move to DatePickerInput\nexport type DatePickerInputDates = {\n __startDay?: string\n __startMonth?: string\n __startYear?: string\n __endDay?: string\n __endMonth?: string\n __endYear?: string\n}\n\nexport type DatePickerDates = {\n date?: DateType\n startDate?: Date\n endDate?: Date\n minDate?: Date\n maxDate?: Date\n startMonth?: Date\n endMonth?: Date\n hoverDate?: Date\n} & DatePickerInputDates\n\nexport default function useDates(\n dateProps: DatePickerDateProps,\n {\n dateFormat,\n isRange = false,\n shouldCorrectDate = false,\n }: UseDatesOptions\n) {\n const [previousDateProps, setPreviousDateProps] = useState(dateProps)\n const [dates, setDates] = useState<DatePickerDates>({\n ...mapDates(dateProps, {\n dateFormat,\n isRange,\n shouldCorrectDate,\n }),\n })\n\n const hasDatePropChanges = useMemo(\n () =>\n Object.keys(dateProps).some((date) => {\n const dateProp = dateProps[date]\n const previousDate = previousDateProps[date]\n\n const convertedDateProp = convertStringToDate(dateProp, {\n dateFormat,\n })\n const convertedPreviousDate = convertStringToDate(previousDate, {\n dateFormat,\n })\n // Make sure that same dates does not trigger a change\n // i.e. 2021-01-01 and new Date('2021-01-01')\n if (\n convertedDateProp instanceof Date &&\n convertedPreviousDate instanceof Date\n ) {\n return !isSameDay(convertedDateProp, convertedPreviousDate)\n }\n\n return dateProp !== previousDate\n }),\n [dateProps, previousDateProps, dateFormat]\n )\n\n // Update dates on prop change\n if (hasDatePropChanges) {\n const derivedDates = deriveDatesFromProps({\n dates,\n dateProps,\n previousDateProps,\n dateFormat,\n isRange,\n })\n\n setDates((currentDates) => ({ ...currentDates, ...derivedDates }))\n setPreviousDateProps(dateProps)\n }\n\n const updateDates = useCallback(\n (\n newDates: DatePickerDates,\n callback?: (dates: DatePickerDates) => void\n ) => {\n // Correct dates based on min and max date\n const correctedDates = shouldCorrectDate\n ? correctDates({\n startDate: newDates.startDate ?? dates.startDate,\n endDate: newDates.endDate ?? dates.endDate,\n minDate: dates.minDate,\n maxDate: dates.maxDate,\n isRange,\n })\n : {}\n\n // Update months based on month or start/end date changes\n const months = updateMonths({\n newDates,\n currentDates: dates,\n })\n\n setDates((currentDates) => {\n return {\n ...currentDates,\n ...newDates,\n ...months,\n ...correctedDates,\n }\n })\n\n callback?.({\n ...dates,\n ...newDates,\n ...months,\n ...correctedDates,\n })\n },\n [dates, shouldCorrectDate, isRange]\n )\n\n // Updated input dates based on start and end dates, move to DatePickerInput\n // TODO: Move to DatePickerInput\n useLayoutEffect(() => {\n const startDates = updateInputDates('start', dates.startDate)\n const endDates = updateInputDates('end', dates.endDate)\n\n setDates((currentDates) => ({\n ...currentDates,\n ...startDates,\n ...endDates,\n }))\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [dates.startDate, dates.endDate])\n\n return {\n dates,\n updateDates,\n previousDateProps,\n } as const\n}\n\n// TODO: Move to DatePickerInput\nfunction updateInputDates(type: 'start' | 'end', date: Date | undefined) {\n const updatedDates = {}\n\n if (isValid(date)) {\n updatedDates[`__${type}Day`] = pad(format(date, 'dd'), 2)\n updatedDates[`__${type}Month`] = pad(format(date, 'MM'), 2)\n updatedDates[`__${type}Year`] = format(date, 'yyyy')\n } else if (date === undefined) {\n updatedDates[`__${type}Day`] = null\n updatedDates[`__${type}Month`] = null\n updatedDates[`__${type}Year`] = null\n }\n\n return updatedDates\n}\n\nfunction mapDates(\n dateProps: DatePickerDateProps,\n {\n dateFormat,\n isRange,\n shouldCorrectDate,\n }: Omit<UseDatesOptions, 'isLinked'>\n) {\n const date = dateProps.date\n\n const startDate =\n typeof dateProps?.startDate !== 'undefined'\n ? getDate(dateProps.startDate, dateFormat)\n : typeof date !== 'undefined'\n ? getDate(date, dateFormat)\n : undefined\n\n const endDate = !isRange\n ? startDate\n : convertStringToDate(dateProps?.endDate, {\n dateFormat,\n }) || undefined\n\n // Ensure that the calendar view displays the correct start and end months, and to prevent date flickering bug\n const startMonth =\n convertStringToDate(dateProps.startMonth, {\n dateFormat,\n }) ??\n startDate ??\n new Date()\n\n const endMonth =\n convertStringToDate(dateProps.endMonth, {\n dateFormat: dateFormat,\n }) ?? (isRange ? endDate ?? addMonths(startMonth, 1) : startMonth)\n\n const minDate = convertStringToDate(dateProps.minDate, {\n dateFormat,\n })\n\n const maxDate = convertStringToDate(dateProps.maxDate, {\n dateFormat,\n })\n\n const correctedDates = shouldCorrectDate\n ? correctDates({ startDate, endDate, minDate, maxDate, isRange })\n : {}\n\n const dates = {\n date,\n startDate,\n endDate,\n startMonth,\n endMonth,\n minDate,\n maxDate,\n ...correctedDates,\n }\n\n const hasValidStartDate = isValid(dates.startDate)\n const hasValidEndDate = isValid(dates.endDate)\n\n return {\n ...dates,\n __startDay: hasValidStartDate\n ? pad(format(dates.startDate, 'dd'), 2)\n : null,\n __startMonth: hasValidStartDate\n ? pad(format(dates.startDate, 'MM'), 2)\n : null,\n __startYear: hasValidStartDate\n ? format(dates.startDate, 'yyyy')\n : null,\n __endDay: hasValidEndDate ? pad(format(dates.endDate, 'dd'), 2) : null,\n __endMonth: hasValidEndDate\n ? pad(format(dates.endDate, 'MM'), 2)\n : null,\n __endYear: hasValidEndDate ? format(dates.endDate, 'yyyy') : null,\n }\n}\n\nfunction deriveDatesFromProps({\n dates,\n dateProps,\n previousDateProps,\n dateFormat,\n isRange,\n}: {\n dates: DatePickerDates\n dateProps: DatePickerDateProps\n previousDateProps: DatePickerDateProps\n dateFormat: UseDatesOptions['dateFormat']\n isRange: UseDatesOptions['isRange']\n}) {\n const derivedDates: DatePickerDates = {}\n\n const startDate = getStartDate(dateProps, previousDateProps)\n\n // Handle updates related to date and startDate changes when not in range mode\n if (typeof startDate !== 'undefined' && startDate !== dates.startDate) {\n derivedDates.startDate =\n convertStringToDate(startDate, {\n dateFormat,\n }) || undefined\n\n // Set endDate and startMonth to startDate if not in range mode\n if (!isRange) {\n derivedDates.startMonth =\n convertStringToDate(startDate, {\n dateFormat,\n }) || undefined\n\n derivedDates.endDate = derivedDates.startDate\n }\n }\n\n // update endDate based on endDate prop if in range mode\n if (\n isRange &&\n typeof dateProps.endDate !== 'undefined' &&\n dateProps.endDate !== dates.endDate\n ) {\n derivedDates.endDate =\n convertStringToDate(dateProps.endDate, {\n dateFormat,\n }) || undefined\n }\n\n // Handle startMonth/endMonth\n if (\n typeof dateProps.startMonth !== 'undefined' &&\n dateProps.startMonth !== previousDateProps.startMonth\n ) {\n derivedDates.startMonth = convertStringToDate(dateProps.startMonth, {\n dateFormat,\n })\n }\n if (\n typeof dateProps.endMonth !== 'undefined' &&\n dateProps.endMonth !== previousDateProps.endMonth\n ) {\n derivedDates.endMonth = convertStringToDate(dateProps.endMonth, {\n dateFormat,\n })\n }\n\n // Handle minDate/maxDate\n if (\n typeof dateProps.minDate !== 'undefined' &&\n dateProps.minDate !== previousDateProps.minDate\n ) {\n derivedDates.minDate = convertStringToDate(dateProps.minDate, {\n dateFormat,\n })\n }\n if (\n typeof dateProps.maxDate !== 'undefined' &&\n dateProps.maxDate !== previousDateProps.maxDate\n ) {\n derivedDates.maxDate = convertStringToDate(dateProps.maxDate, {\n dateFormat,\n })\n }\n\n return derivedDates\n}\n\nfunction correctDates({\n startDate,\n endDate,\n minDate,\n maxDate,\n isRange,\n}: {\n startDate: Date\n endDate: Date\n minDate: Date\n maxDate: Date\n isRange: boolean\n}) {\n const correctedDates = {}\n\n if (isDisabled(startDate, minDate, maxDate)) {\n correctedDates['startDate'] = minDate\n }\n if (isDisabled(endDate, minDate, maxDate)) {\n // state.endDate is only used by the input if range is set to true.\n // this is done to make maxDate correction work if the input is not a range and only maxDate is defined.\n if (!isRange && !minDate) {\n correctedDates['startDate'] = maxDate\n } else {\n correctedDates['endDate'] = maxDate\n }\n }\n\n return correctedDates\n}\n\nfunction updateMonths({\n newDates,\n currentDates,\n}: {\n newDates: DatePickerDates\n currentDates: DatePickerDates\n}) {\n const startMonth =\n newDates.startMonth ?? newDates.startDate ?? currentDates.startMonth\n const endMonth =\n newDates.endMonth ?? newDates.endDate ?? currentDates.endMonth\n\n return {\n startMonth,\n endMonth,\n }\n}\n\nfunction getDate(date: DateType, dateFormat: string) {\n return date instanceof Date\n ? date\n : convertStringToDate(date ?? '', {\n dateFormat,\n })\n}\n\nfunction getStartDate(\n dateProps: DatePickerDateProps,\n previousDateProps: DatePickerDateProps\n) {\n // prioritize startDate over date if provided\n if (\n typeof dateProps.startDate !== 'undefined' &&\n dateProps.startDate !== previousDateProps.startDate\n ) {\n return dateProps.startDate\n }\n\n if (\n typeof dateProps.date !== 'undefined' &&\n dateProps.date !== previousDateProps.date\n ) {\n return dateProps.date\n }\n\n return undefined\n}\n\nexport function pad(date: string, size: number) {\n const dateWithPadding = '000000000' + date\n\n return dateWithPadding.substring(dateWithPadding.length - size)\n}\n"],"mappings":";;;;;;AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAC7D,SAASC,mBAAmB,EAAEC,UAAU,QAAQ,mBAAmB;AACnE,OAAOC,OAAO,MAAM,kBAAkB;AACtC,OAAOC,MAAM,MAAM,iBAAiB;AACpC,SAASC,SAAS,EAAEC,SAAS,QAAQ,UAAU;AAI/C,MAAMC,eAAe,GACnB,OAAOC,MAAM,KAAK,WAAW,GAAGX,KAAK,CAACY,SAAS,GAAGZ,KAAK,CAACU,eAAe;AAuCzE,eAAe,SAASG,QAAQA,CAC9BC,SAA8B,EAAAC,IAAA,EAM9B;EAAA,IALA;IACEC,UAAU;IACVC,OAAO,GAAG,KAAK;IACfC,iBAAiB,GAAG;EACL,CAAC,GAAAH,IAAA;EAElB,MAAM,CAACI,iBAAiB,EAAEC,oBAAoB,CAAC,GAAGjB,QAAQ,CAACW,SAAS,CAAC;EACrE,MAAM,CAACO,KAAK,EAAEC,QAAQ,CAAC,GAAGnB,QAAQ,CAAAoB,aAAA,KAC7BC,QAAQ,CAACV,SAAS,EAAE;IACrBE,UAAU;IACVC,OAAO;IACPC;EACF,CAAC,CAAC,CACH,CAAC;EAEF,MAAMO,kBAAkB,GAAGvB,OAAO,CAChC,MACEwB,MAAM,CAACC,IAAI,CAACb,SAAS,CAAC,CAACc,IAAI,CAAEC,IAAI,IAAK;IACpC,MAAMC,QAAQ,GAAGhB,SAAS,CAACe,IAAI,CAAC;IAChC,MAAME,YAAY,GAAGZ,iBAAiB,CAACU,IAAI,CAAC;IAE5C,MA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OL,SAAS,CAAC+B,SAAS,KAAK,WAAW,IAC1C/B,SAAS,CAAC+B,SAAS,KAAK1B,iBAAiB,CAAC0B,SAAS,EACnD;IACA,OAAO/B,SAAS,CAAC+B,SAAS;EAC5B;EAEA,IACE,OAAO/B,SAAS,CAACe,IAAI,KAAK,WAAW,IACrCf,SAAS,CAACe,IAAI,KAAKV,iBAAiB,CAACU,IAAI,EACzC;IACA,OAAOf,SAAS,CAACe,IAAI;EACvB;EAEA,OAAO4B,SAAS;AAClB;AAEA,OAAO,SAASD,GAAGA,CAAC3B,IAAY,EAAEoD,IAAY,EAAE;EAC9C,MAAMC,eAAe,GAAG,WAAW,GAAGrD,IAAI;EAE1C,OAAOqD,eAAe,CAACC,SAAS,CAACD,eAAe,CAACE,MAAM,GAAGH,IAAI,CAAC;AACjE","ignoreList":[]}
@@ -146,6 +146,10 @@ html[data-whatinput=keyboard] .dnb-date-picker__container table.dnb-no-focus:foc
146
146
  }
147
147
  }
148
148
  @supports (-webkit-touch-callout: none) {
149
+ .dnb-date-picker__input,
150
+ .dnb-date-picker .dnb-input__input.dnb-date-picker__input, .dnb-core-style .dnb-date-picker__input {
151
+ text-indent: -2px;
152
+ }
149
153
  .dnb-date-picker__input:not(*:root),
150
154
  .dnb-date-picker .dnb-input__input.dnb-date-picker__input:not(*:root), .dnb-core-style .dnb-date-picker__input:not(*:root) {
151
155
  margin: 0;
@@ -1 +1 @@
1
- .dnb-date-picker{--date-picker-input-height:2rem;--date-picker-day-width:2rem;--date-picker-day-horizontal-spacing:4px;align-items:center;display:inline-flex;font-size:var(--font-size-small);line-height:var(--line-height-basis)}.dnb-date-picker__inner{display:inline-flex;flex-direction:column;line-height:var(--date-picker-input-height)}.dnb-date-picker__row{display:inline-flex}.dnb-date-picker__shell{display:inline-flex;flex-direction:column;position:relative;top:0}.dnb-date-picker__input__wrapper{display:inline-flex;height:inherit;white-space:nowrap}.dnb-date-picker__triangle{margin:0 1.5rem;overflow:hidden;pointer-events:none;right:auto;top:calc(2px - var(--date-picker-input-height)/2)}.dnb-date-picker__triangle,.dnb-date-picker__triangle:before{height:calc(var(--date-picker-input-height)/2);left:0;position:absolute;width:calc(var(--date-picker-input-height)/2)}.dnb-date-picker__triangle:before{background-color:var(--color-white);border:1px solid var(--color-black-border);content:"";top:0;transform:translateY(60%) rotate(45deg)}.dnb-date-picker__container{display:block;left:-1rem;position:absolute;top:var(--date-picker-input-height);z-index:3}.dnb-date-picker__container--small{top:1.5rem}.dnb-date-picker__container--medium{top:2.5rem}.dnb-date-picker__container--large{top:3rem}.dnb-date-picker__container--show-input{left:0}.dnb-date-picker__container--right{left:auto;right:-1rem}.dnb-date-picker__container--show-input.dnb-date-picker__container--right{left:auto;right:0}.dnb-date-picker__container--opened{z-index:100}.dnb-date-picker__container--opened:not(.dnb-date-picker__container--opened--no-animation){animation:date-picker-slide-down .2s ease-out 1 forwards}.dnb-date-picker__container--opened--no-animation,html[data-visual-test] .dnb-date-picker__container--opened{animation:date-picker-slide-down 1ms ease-out 1 forwards}.dnb-date-picker__container--hidden{display:none}.dnb-date-picker__container--closed:not(.dnb-date-picker__container--closed--no-animation){animation:date-picker-slide-up .15s ease-out 1 forwards}.dnb-date-picker__container--closed--no-animation,html[data-visual-test] .dnb-date-picker__container--closed{animation:date-picker-slide-up 1ms ease-out 1 forwards}.dnb-date-picker__container--right .dnb-date-picker__triangle{left:auto;right:0}.dnb-date-picker__container table{margin:0;position:relative;z-index:1}.dnb-date-picker__container table.dnb-no-focus:focus{outline:none}html[data-whatinput=keyboard] .dnb-date-picker__container table.dnb-no-focus:focus{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-core-style .dnb-date-picker__input,.dnb-date-picker .dnb-input__input.dnb-date-picker__input,.dnb-date-picker__input{background:transparent;border:none;display:inline-block;font-family:var(--font-family-monospace);margin:0;outline:none;overflow:visible;padding:0 .125rem;text-align:center;transform:translateY(0);white-space:nowrap;width:auto}@supports (-webkit-appearance:none) and (not (overflow:-webkit-marquee)) and (not (-ms-ime-align:auto)) and (not (-moz-appearance:none)){.dnb-core-style .dnb-date-picker__input,.dnb-date-picker .dnb-input__input.dnb-date-picker__input,.dnb-date-picker__input{margin:0 -4px}}@supports (-ms-ime-align:auto){.dnb-core-style .dnb-date-picker__input,.dnb-date-picker .dnb-input__input.dnb-date-picker__input,.dnb-date-picker__input{margin:0 -5px}}@supports (-webkit-touch-callout:none){.dnb-core-style .dnb-date-picker__input:not(:root),.dnb-date-picker .dnb-input__input.dnb-date-picker__input:not(:root),.dnb-date-picker__input:not(:root){margin:0}}@supports (-webkit-appearance:none) and (stroke-color:transparent) and (not (-webkit-touch-callout:none)){.dnb-core-style .dnb-date-picker__input:not(:root),.dnb-date-picker .dnb-input__input.dnb-date-picker__input:not(:root),.dnb-date-picker__input:not(:root){margin:0 -4px}.dnb-core-style .dnb-date-picker__input:first-of-type:not(:root),.dnb-date-picker .dnb-input__input.dnb-date-picker__input:first-of-type:not(:root),.dnb-date-picker__input:first-of-type:not(:root){margin-left:.8rem}.dnb-core-style .dnb-date-picker__input:last-of-type:not(:root),.dnb-date-picker .dnb-input__input.dnb-date-picker__input:last-of-type:not(:root),.dnb-date-picker__input:last-of-type:not(:root){margin-right:2.2rem}}.dnb-core-style .dnb-date-picker__input--small .dnb-date-picker .dnb-input__input.dnb-date-picker__input--small,.dnb-core-style .dnb-date-picker__input--small--has-submit-element .dnb-core-style .dnb-date-picker__input--small__input,.dnb-core-style .dnb-date-picker__input--small--has-submit-element .dnb-date-picker .dnb-input__input.dnb-date-picker__input--small__input,.dnb-core-style .dnb-date-picker__input--small--has-submit-element .dnb-date-picker__input--small__input,.dnb-core-style .dnb-date-picker__input--small.dnb-date-picker__input--small,.dnb-date-picker .dnb-input__input.dnb-date-picker__input--small .dnb-date-picker .dnb-input__input.dnb-date-picker__input--small,.dnb-date-picker .dnb-input__input.dnb-date-picker__input--small.dnb-date-picker__input--small,.dnb-date-picker__input--small .dnb-date-picker .dnb-input__input.dnb-date-picker__input--small,.dnb-date-picker__input--small.dnb-date-picker__input--small{padding-right:.125rem}.dnb-core-style .dnb-date-picker__input--small:last-of-type:not(:root),.dnb-date-picker .dnb-input__input.dnb-date-picker__input--small:last-of-type:not(:root),.dnb-date-picker__input--small:last-of-type:not(:root){margin-right:2.2rem}.dnb-core-style .dnb-date-picker__input--medium .dnb-date-picker .dnb-input__input.dnb-date-picker__input--medium,.dnb-core-style .dnb-date-picker__input--medium--has-submit-element .dnb-core-style .dnb-date-picker__input--medium__input,.dnb-core-style .dnb-date-picker__input--medium--has-submit-element .dnb-date-picker .dnb-input__input.dnb-date-picker__input--medium__input,.dnb-core-style .dnb-date-picker__input--medium--has-submit-element .dnb-date-picker__input--medium__input,.dnb-core-style .dnb-date-picker__input--medium.dnb-date-picker__input--medium,.dnb-date-picker .dnb-input__input.dnb-date-picker__input--medium .dnb-date-picker .dnb-input__input.dnb-date-picker__input--medium,.dnb-date-picker .dnb-input__input.dnb-date-picker__input--medium.dnb-date-picker__input--medium,.dnb-date-picker__input--medium .dnb-date-picker .dnb-input__input.dnb-date-picker__input--medium,.dnb-date-picker__input--medium.dnb-date-picker__input--medium{padding-right:.125rem}.dnb-core-style .dnb-date-picker__input--medium:last-of-type:not(:root),.dnb-date-picker .dnb-input__input.dnb-date-picker__input--medium:last-of-type:not(:root),.dnb-date-picker__input--medium:last-of-type:not(:root){margin-right:3.2rem}.dnb-core-style .dnb-date-picker__input--large .dnb-date-picker .dnb-input__input.dnb-date-picker__input--large,.dnb-core-style .dnb-date-picker__input--large--has-submit-element .dnb-core-style .dnb-date-picker__input--large__input,.dnb-core-style .dnb-date-picker__input--large--has-submit-element .dnb-date-picker .dnb-input__input.dnb-date-picker__input--large__input,.dnb-core-style .dnb-date-picker__input--large--has-submit-element .dnb-date-picker__input--large__input,.dnb-core-style .dnb-date-picker__input--large.dnb-date-picker__input--large,.dnb-date-picker .dnb-input__input.dnb-date-picker__input--large .dnb-date-picker .dnb-input__input.dnb-date-picker__input--large,.dnb-date-picker .dnb-input__input.dnb-date-picker__input--large.dnb-date-picker__input--large,.dnb-date-picker__input--large .dnb-date-picker .dnb-input__input.dnb-date-picker__input--large,.dnb-date-picker__input--large.dnb-date-picker__input--large{padding-right:.125rem}.dnb-core-style .dnb-date-picker__input--large:last-of-type:not(:root),.dnb-date-picker .dnb-input__input.dnb-date-picker__input--large:last-of-type:not(:root),.dnb-date-picker__input--large:last-of-type:not(:root){margin-right:4rem}.dnb-date-picker .dnb-input__input.dnb-date-picker__input:first-of-type,.dnb-date-picker__input:first-of-type{margin-left:.8rem}.dnb-date-picker .dnb-input__input.dnb-date-picker__input:last-of-type,.dnb-date-picker__input:last-of-type{margin-right:2.2rem}.dnb-date-picker .dnb-input__shell{display:none}.dnb-date-picker--show-input .dnb-input__shell{display:flex}.dnb-date-picker:not(.dnb-date-picker--show-input) .dnb-input__status--error .dnb-input__shell{box-shadow:none}.dnb-input__submit-button button:focus~.dnb-date-picker__input__wrapper{display:block}.dnb-date-picker:not(.dnb-date-picker--show-input) .dnb-input__submit-element,.dnb-input__submit-element>.dnb-date-picker .dnb-input__submit-element{margin-left:0}.dnb-date-picker__views{display:flex;user-select:none;-webkit-user-select:none}@media screen and (max-width:60em){.dnb-date-picker__views{flex-direction:column}}.dnb-date-picker__calendar{padding:1rem;position:relative}.dnb-date-picker__calendar:after{bottom:0;content:"";height:1px;position:absolute;width:calc(100% - 2rem)}.dnb-date-picker:not(.dnb-date-picker--show-footer) .dnb-date-picker__calendar:after{content:none}.dnb-date-picker__header{height:2.5rem;line-height:var(--line-height-basis)}.dnb-date-picker__addon,.dnb-date-picker__header{display:flex;justify-content:space-between;padding-bottom:1rem;position:relative}.dnb-date-picker__addon:after,.dnb-date-picker__header:after{bottom:0;content:"";height:1px;position:absolute;width:100%}.dnb-date-picker__addon{display:flex;flex-flow:row wrap;gap:1rem;justify-content:flex-start;padding:1rem}.dnb-date-picker__addon:after{left:1rem;width:calc(100% - 2rem)}.dnb-date-picker__footer{display:flex;justify-content:space-between;padding:1rem;position:relative}.dnb-date-picker__labels__day{padding-bottom:.5rem;padding-top:1.5rem}.dnb-date-picker__days,.dnb-date-picker__labels{display:flex;flex-wrap:wrap;list-style:none;margin:0;max-width:18rem;min-width:18rem;padding:0}.dnb-date-picker__day,.dnb-date-picker__labels__day{display:flex;flex-basis:14.2857142857%;justify-content:center}.dnb-date-picker__day{margin:var(--date-picker-day-horizontal-spacing) 0;position:relative}.dnb-date-picker__day,.dnb-date-picker__day .dnb-button{height:var(--date-picker-day-width);width:var(--date-picker-day-width)}.dnb-date-picker__day .dnb-button{box-shadow:none;position:absolute;top:0;white-space:nowrap}.dnb-date-picker__day .dnb-button__bounding{border-radius:0;transform:scale(1.28)}.dnb-date-picker__day .dnb-button__text{transform:translateY(0)}.dnb-date-picker__day--selectable:hover{z-index:2}.dnb-date-picker__day--end-date .dnb-button,.dnb-date-picker__day--start-date .dnb-button{z-index:1}.dnb-date-picker__day--end-date,.dnb-date-picker__day--start-date{position:relative}.dnb-date-picker__day--end-date:after,.dnb-date-picker__day--start-date:after{content:"";height:100%;position:absolute;top:0;width:calc(var(--date-picker-day-width)/2)}.dnb-date-picker__day--start-date:after{left:auto;right:0}.dnb-date-picker__day--end-date:after{left:0;right:auto}.dnb-date-picker__day--start-date.dnb-date-picker__day--end-date:after{content:none}.dnb-date-picker .rtl{direction:rtl}.dnb-date-picker .rtl .dnb-date-picker__next:before,.dnb-date-picker .rtl .dnb-date-picker__prev:before{transform:scaleX(-1)}.dnb-date-picker__inner>.dnb-form-status{margin-top:.5rem;order:2}.dnb-date-picker--vertical{align-items:flex-start;display:flex;flex-direction:column}.dnb-date-picker>.dnb-form-label{line-height:var(--line-height-basis)}@media screen and (max-width:40em){.dnb-date-picker{flex-wrap:wrap}.dnb-date-picker>.dnb-form-label{margin-bottom:.5rem;margin-top:.5rem}}.dnb-date-picker--stretch{display:flex;flex-grow:1}.dnb-date-picker--stretch .dnb-date-picker__inner,.dnb-date-picker--stretch .dnb-date-picker__shell,.dnb-form-row--horizontal .dnb-date-picker--stretch{width:100%}.dnb-date-picker:not(.dnb-date-picker--vertical)[class*=__status]{align-items:flex-start}.dnb-date-picker:not(.dnb-date-picker--vertical)[class*=__status]>.dnb-form-label{margin-top:.25rem}.dnb-date-picker:not(.dnb-date-picker--show-input) .dnb-input__submit-button .dnb-button{border-radius:50%}@media screen and (max-width:40em){.dnb-responsive-component .dnb-date-picker{align-items:flex-start;display:flex;flex-direction:column;margin-bottom:.5rem}.dnb-responsive-component .dnb-date-picker>.dnb-form-label{margin-bottom:.5rem}.dnb-responsive-component .dnb-date-picker__helper{display:none}}.dnb-date-picker .dnb-input__submit-button .dnb-button.dnb-skeleton{visibility:hidden}.dnb-core-style .dnb-date-picker__fieldset,.dnb-date-picker__fieldset{border:none;padding:0}.dnb-core-style .dnb-date-picker__fieldset:not([class*=space__top]),.dnb-date-picker__fieldset:not([class*=space__top]){margin-top:0}.dnb-core-style .dnb-date-picker__fieldset:not([class*=space__bottom]),.dnb-date-picker__fieldset:not([class*=space__bottom]){margin-bottom:0}.dnb-core-style .dnb-date-picker__fieldset:not([class*=space__left]),.dnb-date-picker__fieldset:not([class*=space__left]){margin-left:0}.dnb-core-style .dnb-date-picker__fieldset:not([class*=space__right]),.dnb-date-picker__fieldset:not([class*=space__right]){margin-right:0}.dnb-date-picker__portal{--date-picker-input-height:2rem;--date-picker-day-width:2rem;--date-picker-day-horizontal-spacing:4px;left:0;line-height:var(--date-picker-input-height);position:absolute;z-index:calc(var(--modal-z-index) + 10)}@keyframes date-picker-slide-down{0%{opacity:0}to{opacity:1}}@keyframes date-picker-slide-up{0%{opacity:1}to{opacity:0}}
1
+ .dnb-date-picker{--date-picker-input-height:2rem;--date-picker-day-width:2rem;--date-picker-day-horizontal-spacing:4px;align-items:center;display:inline-flex;font-size:var(--font-size-small);line-height:var(--line-height-basis)}.dnb-date-picker__inner{display:inline-flex;flex-direction:column;line-height:var(--date-picker-input-height)}.dnb-date-picker__row{display:inline-flex}.dnb-date-picker__shell{display:inline-flex;flex-direction:column;position:relative;top:0}.dnb-date-picker__input__wrapper{display:inline-flex;height:inherit;white-space:nowrap}.dnb-date-picker__triangle{margin:0 1.5rem;overflow:hidden;pointer-events:none;right:auto;top:calc(2px - var(--date-picker-input-height)/2)}.dnb-date-picker__triangle,.dnb-date-picker__triangle:before{height:calc(var(--date-picker-input-height)/2);left:0;position:absolute;width:calc(var(--date-picker-input-height)/2)}.dnb-date-picker__triangle:before{background-color:var(--color-white);border:1px solid var(--color-black-border);content:"";top:0;transform:translateY(60%) rotate(45deg)}.dnb-date-picker__container{display:block;left:-1rem;position:absolute;top:var(--date-picker-input-height);z-index:3}.dnb-date-picker__container--small{top:1.5rem}.dnb-date-picker__container--medium{top:2.5rem}.dnb-date-picker__container--large{top:3rem}.dnb-date-picker__container--show-input{left:0}.dnb-date-picker__container--right{left:auto;right:-1rem}.dnb-date-picker__container--show-input.dnb-date-picker__container--right{left:auto;right:0}.dnb-date-picker__container--opened{z-index:100}.dnb-date-picker__container--opened:not(.dnb-date-picker__container--opened--no-animation){animation:date-picker-slide-down .2s ease-out 1 forwards}.dnb-date-picker__container--opened--no-animation,html[data-visual-test] .dnb-date-picker__container--opened{animation:date-picker-slide-down 1ms ease-out 1 forwards}.dnb-date-picker__container--hidden{display:none}.dnb-date-picker__container--closed:not(.dnb-date-picker__container--closed--no-animation){animation:date-picker-slide-up .15s ease-out 1 forwards}.dnb-date-picker__container--closed--no-animation,html[data-visual-test] .dnb-date-picker__container--closed{animation:date-picker-slide-up 1ms ease-out 1 forwards}.dnb-date-picker__container--right .dnb-date-picker__triangle{left:auto;right:0}.dnb-date-picker__container table{margin:0;position:relative;z-index:1}.dnb-date-picker__container table.dnb-no-focus:focus{outline:none}html[data-whatinput=keyboard] .dnb-date-picker__container table.dnb-no-focus:focus{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-core-style .dnb-date-picker__input,.dnb-date-picker .dnb-input__input.dnb-date-picker__input,.dnb-date-picker__input{background:transparent;border:none;display:inline-block;font-family:var(--font-family-monospace);margin:0;outline:none;overflow:visible;padding:0 .125rem;text-align:center;transform:translateY(0);white-space:nowrap;width:auto}@supports (-webkit-appearance:none) and (not (overflow:-webkit-marquee)) and (not (-ms-ime-align:auto)) and (not (-moz-appearance:none)){.dnb-core-style .dnb-date-picker__input,.dnb-date-picker .dnb-input__input.dnb-date-picker__input,.dnb-date-picker__input{margin:0 -4px}}@supports (-ms-ime-align:auto){.dnb-core-style .dnb-date-picker__input,.dnb-date-picker .dnb-input__input.dnb-date-picker__input,.dnb-date-picker__input{margin:0 -5px}}@supports (-webkit-touch-callout:none){.dnb-core-style .dnb-date-picker__input,.dnb-date-picker .dnb-input__input.dnb-date-picker__input,.dnb-date-picker__input{text-indent:-2px}.dnb-core-style .dnb-date-picker__input:not(:root),.dnb-date-picker .dnb-input__input.dnb-date-picker__input:not(:root),.dnb-date-picker__input:not(:root){margin:0}}@supports (-webkit-appearance:none) and (stroke-color:transparent) and (not (-webkit-touch-callout:none)){.dnb-core-style .dnb-date-picker__input:not(:root),.dnb-date-picker .dnb-input__input.dnb-date-picker__input:not(:root),.dnb-date-picker__input:not(:root){margin:0 -4px}.dnb-core-style .dnb-date-picker__input:first-of-type:not(:root),.dnb-date-picker .dnb-input__input.dnb-date-picker__input:first-of-type:not(:root),.dnb-date-picker__input:first-of-type:not(:root){margin-left:.8rem}.dnb-core-style .dnb-date-picker__input:last-of-type:not(:root),.dnb-date-picker .dnb-input__input.dnb-date-picker__input:last-of-type:not(:root),.dnb-date-picker__input:last-of-type:not(:root){margin-right:2.2rem}}.dnb-core-style .dnb-date-picker__input--small .dnb-date-picker .dnb-input__input.dnb-date-picker__input--small,.dnb-core-style .dnb-date-picker__input--small--has-submit-element .dnb-core-style .dnb-date-picker__input--small__input,.dnb-core-style .dnb-date-picker__input--small--has-submit-element .dnb-date-picker .dnb-input__input.dnb-date-picker__input--small__input,.dnb-core-style .dnb-date-picker__input--small--has-submit-element .dnb-date-picker__input--small__input,.dnb-core-style .dnb-date-picker__input--small.dnb-date-picker__input--small,.dnb-date-picker .dnb-input__input.dnb-date-picker__input--small .dnb-date-picker .dnb-input__input.dnb-date-picker__input--small,.dnb-date-picker .dnb-input__input.dnb-date-picker__input--small.dnb-date-picker__input--small,.dnb-date-picker__input--small .dnb-date-picker .dnb-input__input.dnb-date-picker__input--small,.dnb-date-picker__input--small.dnb-date-picker__input--small{padding-right:.125rem}.dnb-core-style .dnb-date-picker__input--small:last-of-type:not(:root),.dnb-date-picker .dnb-input__input.dnb-date-picker__input--small:last-of-type:not(:root),.dnb-date-picker__input--small:last-of-type:not(:root){margin-right:2.2rem}.dnb-core-style .dnb-date-picker__input--medium .dnb-date-picker .dnb-input__input.dnb-date-picker__input--medium,.dnb-core-style .dnb-date-picker__input--medium--has-submit-element .dnb-core-style .dnb-date-picker__input--medium__input,.dnb-core-style .dnb-date-picker__input--medium--has-submit-element .dnb-date-picker .dnb-input__input.dnb-date-picker__input--medium__input,.dnb-core-style .dnb-date-picker__input--medium--has-submit-element .dnb-date-picker__input--medium__input,.dnb-core-style .dnb-date-picker__input--medium.dnb-date-picker__input--medium,.dnb-date-picker .dnb-input__input.dnb-date-picker__input--medium .dnb-date-picker .dnb-input__input.dnb-date-picker__input--medium,.dnb-date-picker .dnb-input__input.dnb-date-picker__input--medium.dnb-date-picker__input--medium,.dnb-date-picker__input--medium .dnb-date-picker .dnb-input__input.dnb-date-picker__input--medium,.dnb-date-picker__input--medium.dnb-date-picker__input--medium{padding-right:.125rem}.dnb-core-style .dnb-date-picker__input--medium:last-of-type:not(:root),.dnb-date-picker .dnb-input__input.dnb-date-picker__input--medium:last-of-type:not(:root),.dnb-date-picker__input--medium:last-of-type:not(:root){margin-right:3.2rem}.dnb-core-style .dnb-date-picker__input--large .dnb-date-picker .dnb-input__input.dnb-date-picker__input--large,.dnb-core-style .dnb-date-picker__input--large--has-submit-element .dnb-core-style .dnb-date-picker__input--large__input,.dnb-core-style .dnb-date-picker__input--large--has-submit-element .dnb-date-picker .dnb-input__input.dnb-date-picker__input--large__input,.dnb-core-style .dnb-date-picker__input--large--has-submit-element .dnb-date-picker__input--large__input,.dnb-core-style .dnb-date-picker__input--large.dnb-date-picker__input--large,.dnb-date-picker .dnb-input__input.dnb-date-picker__input--large .dnb-date-picker .dnb-input__input.dnb-date-picker__input--large,.dnb-date-picker .dnb-input__input.dnb-date-picker__input--large.dnb-date-picker__input--large,.dnb-date-picker__input--large .dnb-date-picker .dnb-input__input.dnb-date-picker__input--large,.dnb-date-picker__input--large.dnb-date-picker__input--large{padding-right:.125rem}.dnb-core-style .dnb-date-picker__input--large:last-of-type:not(:root),.dnb-date-picker .dnb-input__input.dnb-date-picker__input--large:last-of-type:not(:root),.dnb-date-picker__input--large:last-of-type:not(:root){margin-right:4rem}.dnb-date-picker .dnb-input__input.dnb-date-picker__input:first-of-type,.dnb-date-picker__input:first-of-type{margin-left:.8rem}.dnb-date-picker .dnb-input__input.dnb-date-picker__input:last-of-type,.dnb-date-picker__input:last-of-type{margin-right:2.2rem}.dnb-date-picker .dnb-input__shell{display:none}.dnb-date-picker--show-input .dnb-input__shell{display:flex}.dnb-date-picker:not(.dnb-date-picker--show-input) .dnb-input__status--error .dnb-input__shell{box-shadow:none}.dnb-input__submit-button button:focus~.dnb-date-picker__input__wrapper{display:block}.dnb-date-picker:not(.dnb-date-picker--show-input) .dnb-input__submit-element,.dnb-input__submit-element>.dnb-date-picker .dnb-input__submit-element{margin-left:0}.dnb-date-picker__views{display:flex;user-select:none;-webkit-user-select:none}@media screen and (max-width:60em){.dnb-date-picker__views{flex-direction:column}}.dnb-date-picker__calendar{padding:1rem;position:relative}.dnb-date-picker__calendar:after{bottom:0;content:"";height:1px;position:absolute;width:calc(100% - 2rem)}.dnb-date-picker:not(.dnb-date-picker--show-footer) .dnb-date-picker__calendar:after{content:none}.dnb-date-picker__header{height:2.5rem;line-height:var(--line-height-basis)}.dnb-date-picker__addon,.dnb-date-picker__header{display:flex;justify-content:space-between;padding-bottom:1rem;position:relative}.dnb-date-picker__addon:after,.dnb-date-picker__header:after{bottom:0;content:"";height:1px;position:absolute;width:100%}.dnb-date-picker__addon{display:flex;flex-flow:row wrap;gap:1rem;justify-content:flex-start;padding:1rem}.dnb-date-picker__addon:after{left:1rem;width:calc(100% - 2rem)}.dnb-date-picker__footer{display:flex;justify-content:space-between;padding:1rem;position:relative}.dnb-date-picker__labels__day{padding-bottom:.5rem;padding-top:1.5rem}.dnb-date-picker__days,.dnb-date-picker__labels{display:flex;flex-wrap:wrap;list-style:none;margin:0;max-width:18rem;min-width:18rem;padding:0}.dnb-date-picker__day,.dnb-date-picker__labels__day{display:flex;flex-basis:14.2857142857%;justify-content:center}.dnb-date-picker__day{margin:var(--date-picker-day-horizontal-spacing) 0;position:relative}.dnb-date-picker__day,.dnb-date-picker__day .dnb-button{height:var(--date-picker-day-width);width:var(--date-picker-day-width)}.dnb-date-picker__day .dnb-button{box-shadow:none;position:absolute;top:0;white-space:nowrap}.dnb-date-picker__day .dnb-button__bounding{border-radius:0;transform:scale(1.28)}.dnb-date-picker__day .dnb-button__text{transform:translateY(0)}.dnb-date-picker__day--selectable:hover{z-index:2}.dnb-date-picker__day--end-date .dnb-button,.dnb-date-picker__day--start-date .dnb-button{z-index:1}.dnb-date-picker__day--end-date,.dnb-date-picker__day--start-date{position:relative}.dnb-date-picker__day--end-date:after,.dnb-date-picker__day--start-date:after{content:"";height:100%;position:absolute;top:0;width:calc(var(--date-picker-day-width)/2)}.dnb-date-picker__day--start-date:after{left:auto;right:0}.dnb-date-picker__day--end-date:after{left:0;right:auto}.dnb-date-picker__day--start-date.dnb-date-picker__day--end-date:after{content:none}.dnb-date-picker .rtl{direction:rtl}.dnb-date-picker .rtl .dnb-date-picker__next:before,.dnb-date-picker .rtl .dnb-date-picker__prev:before{transform:scaleX(-1)}.dnb-date-picker__inner>.dnb-form-status{margin-top:.5rem;order:2}.dnb-date-picker--vertical{align-items:flex-start;display:flex;flex-direction:column}.dnb-date-picker>.dnb-form-label{line-height:var(--line-height-basis)}@media screen and (max-width:40em){.dnb-date-picker{flex-wrap:wrap}.dnb-date-picker>.dnb-form-label{margin-bottom:.5rem;margin-top:.5rem}}.dnb-date-picker--stretch{display:flex;flex-grow:1}.dnb-date-picker--stretch .dnb-date-picker__inner,.dnb-date-picker--stretch .dnb-date-picker__shell,.dnb-form-row--horizontal .dnb-date-picker--stretch{width:100%}.dnb-date-picker:not(.dnb-date-picker--vertical)[class*=__status]{align-items:flex-start}.dnb-date-picker:not(.dnb-date-picker--vertical)[class*=__status]>.dnb-form-label{margin-top:.25rem}.dnb-date-picker:not(.dnb-date-picker--show-input) .dnb-input__submit-button .dnb-button{border-radius:50%}@media screen and (max-width:40em){.dnb-responsive-component .dnb-date-picker{align-items:flex-start;display:flex;flex-direction:column;margin-bottom:.5rem}.dnb-responsive-component .dnb-date-picker>.dnb-form-label{margin-bottom:.5rem}.dnb-responsive-component .dnb-date-picker__helper{display:none}}.dnb-date-picker .dnb-input__submit-button .dnb-button.dnb-skeleton{visibility:hidden}.dnb-core-style .dnb-date-picker__fieldset,.dnb-date-picker__fieldset{border:none;padding:0}.dnb-core-style .dnb-date-picker__fieldset:not([class*=space__top]),.dnb-date-picker__fieldset:not([class*=space__top]){margin-top:0}.dnb-core-style .dnb-date-picker__fieldset:not([class*=space__bottom]),.dnb-date-picker__fieldset:not([class*=space__bottom]){margin-bottom:0}.dnb-core-style .dnb-date-picker__fieldset:not([class*=space__left]),.dnb-date-picker__fieldset:not([class*=space__left]){margin-left:0}.dnb-core-style .dnb-date-picker__fieldset:not([class*=space__right]),.dnb-date-picker__fieldset:not([class*=space__right]){margin-right:0}.dnb-date-picker__portal{--date-picker-input-height:2rem;--date-picker-day-width:2rem;--date-picker-day-horizontal-spacing:4px;left:0;line-height:var(--date-picker-input-height);position:absolute;z-index:calc(var(--modal-z-index) + 10)}@keyframes date-picker-slide-down{0%{opacity:0}to{opacity:1}}@keyframes date-picker-slide-up{0%{opacity:1}to{opacity:0}}
@@ -192,6 +192,9 @@
192
192
  &:not(*:root) {
193
193
  margin: 0;
194
194
  }
195
+
196
+ // Avoid artifact (moving the value 2px) when focusing the input
197
+ text-indent: -2px; // The width of the cursor
195
198
  }
196
199
 
197
200
  // Safari Desktop fix
@@ -101,12 +101,17 @@ export const DialogProperties = {
101
101
  },
102
102
  scrollRef: {
103
103
  doc: 'To get the scroll Element, pass in your own React ref.',
104
- type: 'React.Ref',
104
+ type: 'React.RefObject',
105
105
  status: 'optional'
106
106
  },
107
107
  contentRef: {
108
108
  doc: 'To get the inner content Element, pass in your own React ref.',
109
- type: 'React.Ref',
109
+ type: 'React.RefObject',
110
+ status: 'optional'
111
+ },
112
+ '[Space](/uilib/layout/space/properties)': {
113
+ doc: 'Spacing properties like `top` or `bottom` are supported.',
114
+ type: ['string', 'object'],
110
115
  status: 'optional'
111
116
  }
112
117
  };
@@ -1 +1 @@
1
- {"version":3,"file":"DialogDocs.js","names":["DialogProperties","variant","doc","type","status","title","minWidth","maxWidth","className","spacing","preventCoreStyle","navContent","headerContent","modalContent","description","verticalAlignment","alignContent","fullscreen","icon","confirmType","declineText","confirmText","hideDecline","hideConfirm","scrollRef","contentRef","DialogEvents","onConfirm","onDecline"],"sources":["../../../../src/components/dialog/DialogDocs.ts"],"sourcesContent":["import { PropertiesTableProps } from '../../shared/types'\n\nexport const DialogProperties: PropertiesTableProps = {\n variant: {\n doc: 'The dialog variant. Can either be `information` or `confirmation`. Defaults to `information`.',\n type: 'string',\n status: 'optional',\n },\n title: {\n doc: 'The dialog title. Displays on the very top of the content.',\n type: 'string',\n status: 'optional',\n },\n minWidth: {\n doc: \"The minimum Dialog content width, defined by a CSS width value like `50vw` (50% of the viewport). Be careful on using fixed `minWidth` so you don't break responsiveness. Defaults to `30rem` (average width is set to `60vw`).\",\n type: 'string',\n status: 'optional',\n },\n maxWidth: {\n doc: 'The maximum Dialog content width, defined by a CSS width value like `20rem`. Defaults to `60rem` (average width is set to `60vw`).',\n type: 'string',\n status: 'optional',\n },\n className: {\n doc: 'Give the Dialog content a class name (maps to `dnb-dialog`).',\n type: 'string',\n status: 'optional',\n },\n spacing: {\n doc: 'If set to `false` then the dialog content will be shown without any spacing. Defaults to `true`.',\n type: 'boolean',\n status: 'optional',\n },\n preventCoreStyle: {\n doc: 'By default the dialog content gets added the core style class `dnb-core-style`. Use `false` to disable this behavior.',\n type: 'boolean',\n status: 'optional',\n },\n navContent: {\n doc: 'The content which will appear in the navigation, above the header, and side-by-side the close button.',\n type: 'React.Node',\n status: 'optional',\n },\n headerContent: {\n doc: 'The content which will appear in the header of the dialog.',\n type: 'React.Node',\n status: 'optional',\n },\n modalContent: {\n doc: 'The content which will appear when triggering the dialog.',\n type: 'React.Node',\n status: 'optional',\n },\n description: {\n doc: 'A description will be positioned below the title, but before the content. Used for Dialog variant `confirmation` to further describe what the actions will do.',\n type: 'string',\n status: 'optional',\n },\n verticalAlignment: {\n doc: 'Define the vertical alignment of the container. Can be set to `top` or `center`. Defaults to `center`.',\n type: 'string',\n status: 'optional',\n },\n alignContent: {\n doc: 'Define the inner horizontal alignment of the content. Can be set to `left`, `center`, `right` and `centered`. If `centered`, then the content will also be centered vertically. Defaults to `left`.',\n type: 'string',\n status: 'optional',\n },\n fullscreen: {\n doc: 'If set to `true` then the dialog content will be shown as fullscreen, without showing the original content behind. Can be set to `false` to omit the auto fullscreen. Defaults to `auto`.',\n type: 'boolean',\n status: 'optional',\n },\n icon: {\n doc: 'An icon to display at the top of the component. Should be of size medium, so make sure you import the `_medium` version of the Eufemia icon.',\n type: 'React.Node',\n status: 'optional',\n },\n confirmType: {\n doc: 'For variant confirmation, the dialog is either an informational (`info`) or a warning (`warning`) message. Defaults to `info`.',\n type: 'string',\n status: 'optional',\n },\n declineText: {\n doc: 'For dialog actions, give a custom text for the decline button.',\n type: 'string',\n status: 'optional',\n },\n confirmText: {\n doc: 'For dialog actions, give a custom text for the confirmation button.',\n type: 'string',\n status: 'optional',\n },\n hideDecline: {\n doc: 'For variant confirmation, hide the default decline button and only show the confirmation button.',\n type: 'boolean',\n status: 'optional',\n },\n hideConfirm: {\n doc: 'For variant confirmation, hide the default confirm button and only show the decline button.',\n type: 'boolean',\n status: 'optional',\n },\n scrollRef: {\n doc: 'To get the scroll Element, pass in your own React ref.',\n type: 'React.Ref',\n status: 'optional',\n },\n contentRef: {\n doc: 'To get the inner content Element, pass in your own React ref.',\n type: 'React.Ref',\n status: 'optional',\n },\n}\n\nexport const DialogEvents: PropertiesTableProps = {\n onConfirm: {\n doc: 'For variant confirmation, handle the confirm action click. Provided with the mouse event and the Modal function `close` as arguments.',\n type: 'function',\n status: 'optional',\n },\n onDecline: {\n doc: 'For variant confirmation, handle the decline action click. Provided with the mouse event and the Modal function `close` as arguments.',\n type: 'function',\n status: 'optional',\n },\n}\n"],"mappings":"AAEA,OAAO,MAAMA,gBAAsC,GAAG;EACpDC,OAAO,EAAE;IACPC,GAAG,EAAE,+FAA+F;IACpGC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDC,KAAK,EAAE;IACLH,GAAG,EAAE,4DAA4D;IACjEC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDE,QAAQ,EAAE;IACRJ,GAAG,EAAE,iOAAiO;IACtOC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDG,QAAQ,EAAE;IACRL,GAAG,EAAE,oIAAoI;IACzIC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDI,SAAS,EAAE;IACTN,GAAG,EAAE,8DAA8D;IACnEC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDK,OAAO,EAAE;IACPP,GAAG,EAAE,kGAAkG;IACvGC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAA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W,EAAE;IACXpB,GAAG,EAAE,kGAAkG;IACvGC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDmB,WAAW,EAAE;IACXrB,GAAG,EAAE,6FAA6F;IAClGC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDoB,SAAS,EAAE;IACTtB,GAAG,EAAE,wDAAwD;IAC7DC,IAAI,EAAE,WAAW;IACjBC,MAAM,EAAE;EACV,CAAC;EACDqB,UAAU,EAAE;IACVvB,GAAG,EAAE,+DAA+D;IACpEC,IAAI,EAAE,WAAW;IACjBC,MAAM,EAAE;EACV;AACF,CAAC;AAED,OAAO,MAAMsB,YAAkC,GAAG;EAChDC,SAAS,EAAE;IACTzB,GAAG,EAAE,uIAAuI;IAC5IC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDwB,SAAS,EAAE;IACT1B,GAAG,EAAE,uIAAuI;IAC5IC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"DialogDocs.js","names":["DialogProperties","variant","doc","type","status","title","minWidth","maxWidth","className","spacing","preventCoreStyle","navContent","headerContent","modalContent","description","verticalAlignment","alignContent","fullscreen","icon","confirmType","declineText","confirmText","hideDecline","hideConfirm","scrollRef","contentRef","DialogEvents","onConfirm","onDecline"],"sources":["../../../../src/components/dialog/DialogDocs.ts"],"sourcesContent":["import { PropertiesTableProps } from '../../shared/types'\n\nexport const DialogProperties: PropertiesTableProps = {\n variant: {\n doc: 'The dialog variant. Can either be `information` or `confirmation`. Defaults to `information`.',\n type: 'string',\n status: 'optional',\n },\n title: {\n doc: 'The dialog title. Displays on the very top of the content.',\n type: 'string',\n status: 'optional',\n },\n minWidth: {\n doc: \"The minimum Dialog content width, defined by a CSS width value like `50vw` (50% of the viewport). Be careful on using fixed `minWidth` so you don't break responsiveness. Defaults to `30rem` (average width is set to `60vw`).\",\n type: 'string',\n status: 'optional',\n },\n maxWidth: {\n doc: 'The maximum Dialog content width, defined by a CSS width value like `20rem`. Defaults to `60rem` (average width is set to `60vw`).',\n type: 'string',\n status: 'optional',\n },\n className: {\n doc: 'Give the Dialog content a class name (maps to `dnb-dialog`).',\n type: 'string',\n status: 'optional',\n },\n spacing: {\n doc: 'If set to `false` then the dialog content will be shown without any spacing. Defaults to `true`.',\n type: 'boolean',\n status: 'optional',\n },\n preventCoreStyle: {\n doc: 'By default the dialog content gets added the core style class `dnb-core-style`. Use `false` to disable this behavior.',\n type: 'boolean',\n status: 'optional',\n },\n navContent: {\n doc: 'The content which will appear in the navigation, above the header, and side-by-side the close button.',\n type: 'React.Node',\n status: 'optional',\n },\n headerContent: {\n doc: 'The content which will appear in the header of the dialog.',\n type: 'React.Node',\n status: 'optional',\n },\n modalContent: {\n doc: 'The content which will appear when triggering the dialog.',\n type: 'React.Node',\n status: 'optional',\n },\n description: {\n doc: 'A description will be positioned below the title, but before the content. Used for Dialog variant `confirmation` to further describe what the actions will do.',\n type: 'string',\n status: 'optional',\n },\n verticalAlignment: {\n doc: 'Define the vertical alignment of the container. Can be set to `top` or `center`. Defaults to `center`.',\n type: 'string',\n status: 'optional',\n },\n alignContent: {\n doc: 'Define the inner horizontal alignment of the content. Can be set to `left`, `center`, `right` and `centered`. If `centered`, then the content will also be centered vertically. Defaults to `left`.',\n type: 'string',\n status: 'optional',\n },\n fullscreen: {\n doc: 'If set to `true` then the dialog content will be shown as fullscreen, without showing the original content behind. Can be set to `false` to omit the auto fullscreen. Defaults to `auto`.',\n type: 'boolean',\n status: 'optional',\n },\n icon: {\n doc: 'An icon to display at the top of the component. Should be of size medium, so make sure you import the `_medium` version of the Eufemia icon.',\n type: 'React.Node',\n status: 'optional',\n },\n confirmType: {\n doc: 'For variant confirmation, the dialog is either an informational (`info`) or a warning (`warning`) message. Defaults to `info`.',\n type: 'string',\n status: 'optional',\n },\n declineText: {\n doc: 'For dialog actions, give a custom text for the decline button.',\n type: 'string',\n status: 'optional',\n },\n confirmText: {\n doc: 'For dialog actions, give a custom text for the confirmation button.',\n type: 'string',\n status: 'optional',\n },\n hideDecline: {\n doc: 'For variant confirmation, hide the default decline button and only show the confirmation button.',\n type: 'boolean',\n status: 'optional',\n },\n hideConfirm: {\n doc: 'For variant confirmation, hide the default confirm button and only show the decline button.',\n type: 'boolean',\n status: 'optional',\n },\n scrollRef: {\n doc: 'To get the scroll Element, pass in your own React ref.',\n type: 'React.RefObject',\n status: 'optional',\n },\n contentRef: {\n doc: 'To get the inner content Element, pass in your own React ref.',\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 DialogEvents: PropertiesTableProps = {\n onConfirm: {\n doc: 'For variant confirmation, handle the confirm action click. Provided with the mouse event and the Modal function `close` as arguments.',\n type: 'function',\n status: 'optional',\n },\n onDecline: {\n doc: 'For variant confirmation, handle the decline action click. Provided with the mouse event and the Modal function `close` as arguments.',\n type: 'function',\n status: 'optional',\n },\n}\n"],"mappings":"AAEA,OAAO,MAAMA,gBAAsC,GAAG;EACpDC,OAAO,EAAE;IACPC,GAAG,EAAE,+FAA+F;IACpGC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDC,KAAK,EAAE;IACLH,GAAG,EAAE,4DAA4D;IACjEC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDE,QAAQ,EAAE;IACRJ,GAAG,EAAE,iOAAiO;IACtOC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDG,QAAQ,EAAE;IACRL,GAAG,EAAE,oIAAoI;IACzIC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDI,SAAS,EAAE;IACTN,GAAG,EAAE,8DAA8D;IACnEC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CA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AAE;IACXnB,GAAG,EAAE,qEAAqE;IAC1EC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDkB,WAAW,EAAE;IACXpB,GAAG,EAAE,kGAAkG;IACvGC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDmB,WAAW,EAAE;IACXrB,GAAG,EAAE,6FAA6F;IAClGC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDoB,SAAS,EAAE;IACTtB,GAAG,EAAE,wDAAwD;IAC7DC,IAAI,EAAE,iBAAiB;IACvBC,MAAM,EAAE;EACV,CAAC;EACDqB,UAAU,EAAE;IACVvB,GAAG,EAAE,+DAA+D;IACpEC,IAAI,EAAE,iBAAiB;IACvBC,MAAM,EAAE;EACV,CAAC;EACD,yCAAyC,EAAE;IACzCF,GAAG,EAAE,0DAA0D;IAC/DC,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC1BC,MAAM,EAAE;EACV;AACF,CAAC;AAED,OAAO,MAAMsB,YAAkC,GAAG;EAChDC,SAAS,EAAE;IACTzB,GAAG,EAAE,uIAAuI;IAC5IC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDwB,SAAS,EAAE;IACT1B,GAAG,EAAE,uIAAuI;IAC5IC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV;AACF,CAAC","ignoreList":[]}
@@ -20,81 +20,81 @@ type DropdownAlignDropdown = 'left' | 'right';
20
20
  type DropdownTriggerElement = ((...args: any[]) => any) | React.ReactNode;
21
21
  export interface DropdownProps {
22
22
  /**
23
- * Give a title to let the users know what they have to do. Defaults to `Valgmeny`.
23
+ * give a title to let the users know what they have to do. Defaults to `Valgmeny`.
24
24
  */
25
25
  title?: DropdownTitle;
26
26
  /**
27
- * Defines the kind of dropdown. Possible values are `primary`, `secondary`, `tertiary` and `signal`. Defaults to `secondary`.
27
+ * defines the kind of dropdown. Possible values are `primary`, `secondary`, `tertiary` and `signal`. Defaults to `secondary`.
28
28
  */
29
29
  variant?: ButtonVariant;
30
30
  /**
31
- * Icon to be included in the dropdown.
31
+ * icon to be included in the dropdown.
32
32
  */
33
33
  icon?: IconIcon;
34
34
  /**
35
- * Change the size of the icon pragmatically.
35
+ * change the size of the icon pragmatically.
36
36
  */
37
37
  icon_size?: IconSize;
38
38
  /**
39
- * Position of the icon inside the dropdown. Set to `left` or `right`. Defaults to `right`.
39
+ * position of the icon inside the dropdown. Set to `left` or `right`. Defaults to `right`.
40
40
  */
41
41
  icon_position?: ButtonIconPosition;
42
42
  /**
43
- * Prepends the Form Label component. If no ID is provided, a random ID is created.
43
+ * prepends the Form Label component. If no ID is provided, a random ID is created.
44
44
  */
45
45
  label?: React.ReactNode;
46
46
  /**
47
- * Use `label_direction="vertical"` to change the label layout direction. Defaults to `horizontal`.
47
+ * use `label_direction="vertical"` to change the label layout direction. Defaults to `horizontal`.
48
48
  */
49
49
  label_direction?: FormLabelLabelDirection;
50
50
  /**
51
- * Use `true` to make the label only readable by screen readers.
51
+ * use `true` to make the label only readable by screen readers.
52
52
  */
53
53
  label_sr_only?: boolean;
54
54
  /**
55
- * 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.
55
+ * 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.
56
56
  */
57
57
  status?: FormStatusText;
58
58
  /**
59
- * Defines the state of the status. It&#39;s two statuses `[error, info]`. Defaults to `error`.
59
+ * defines the state of the status. It's two statuses `[error, info]`. Defaults to `error`.
60
60
  */
61
61
  status_state?: FormStatusState;
62
62
  /**
63
- * Use an object to define additional FormStatus properties.
63
+ * use an object to define additional FormStatus properties.
64
64
  */
65
65
  status_props?: FormStatusProps;
66
66
  status_no_animation?: boolean;
67
67
  /**
68
- * The <a href="/uilib/components/global-status/properties/#configuration-object">configuration</a> used for the target <a href="/uilib/components/global-status">GlobalStatus</a>.
68
+ * the [configuration](/uilib/components/global-status/properties/#configuration-object) used for the target [GlobalStatus](/uilib/components/global-status).
69
69
  */
70
70
  globalStatus?: GlobalStatusConfigObject;
71
71
  /**
72
- * By providing a React.ref you can get the internally used main element (DOM). E.g. `innerRef={myRef}` by using `React.createRef()` or `React.useRef()`.
72
+ * by providing a React.ref you can get the internally used main element (DOM). E.g. `innerRef={myRef}` by using `React.createRef()` or `React.useRef()`.
73
73
  */
74
74
  innerRef?: React.Ref;
75
75
  /**
76
- * By providing a React.ref you can get the internally used button element (DOM). E.g. `buttonRef={myRef}` by using `React.createRef()` or `React.useRef()`.
76
+ * by providing a React.ref you can get the internally used button element (DOM). E.g. `buttonRef={myRef}` by using `React.createRef()` or `React.useRef()`.
77
77
  */
78
78
  buttonRef?: React.Ref;
79
79
  /**
80
- * Same as `prevent_selection`, but the "selection area" (given title) will not be visible and the icon `more` (three dots) is used. Defaults to `false`.
80
+ * same as `prevent_selection`, but the "selection area" (given title) will not be visible and the icon `more` (three dots) is used. Defaults to `false`.
81
81
  */
82
82
  more_menu?: boolean;
83
83
  /**
84
- * Use `right` to change the options alignment direction. Makes only sense to use in combination with `prevent_selection` or `more_menu`. Defaults to `left`.
84
+ * use `right` to change the options alignment direction. Makes only sense to use in combination with `prevent_selection` or `more_menu`. Defaults to `left`.
85
85
  */
86
86
  align_dropdown?: DropdownAlignDropdown;
87
87
  /**
88
- * Lets you provide a custom React element as the trigger HTML element.
88
+ * lets you provide a custom React element as the trigger HTML element.
89
89
  */
90
90
  trigger_element?: DropdownTriggerElement;
91
91
  /**
92
- * If set to `true`, the Dropdown will be opened when the users enter the trigger button with a focus action.
92
+ * if set to `true`, the Dropdown will be opened when the users enter the trigger button with a focus action.
93
93
  */
94
94
  open_on_focus?: boolean;
95
95
  disabled?: boolean;
96
96
  /**
97
- * If set to `true`, then the dropdown will be 100% in available `width`.
97
+ * if set to `true`, then the dropdown will be 100% in available `width`.
98
98
  */
99
99
  stretch?: boolean;
100
100
  /**
@@ -102,7 +102,7 @@ export interface DropdownProps {
102
102
  */
103
103
  skeleton?: SkeletonShow;
104
104
  /**
105
- * Text describing the content of the Dropdown more than the label. You can also send in a React component, so it gets wrapped inside the Dropdown component.
105
+ * text describing the content of the Dropdown more than the label. You can also send in a React component, so it gets wrapped inside the Dropdown component.
106
106
  */
107
107
  suffix?: DrawerListSuffix;
108
108
  on_show_focus?: (...args: any[]) => any;
@@ -1,2 +1,3 @@
1
1
  import { PropertiesTableProps } from '../../shared/types';
2
2
  export declare const DropdownEvents: PropertiesTableProps;
3
+ export declare const DropdownProperties: PropertiesTableProps;