@dnb/eufemia 9.17.2 → 9.18.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 (382) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/cjs/components/Tag.d.ts +14 -0
  3. package/cjs/components/Tag.js +52 -0
  4. package/cjs/components/accordion/Accordion.d.ts +7 -7
  5. package/cjs/components/autocomplete/Autocomplete.d.ts +13 -13
  6. package/cjs/components/button/Button.d.ts +7 -7
  7. package/cjs/components/button/Button.js +6 -4
  8. package/cjs/components/checkbox/Checkbox.d.ts +3 -3
  9. package/cjs/components/date-picker/DatePicker.d.ts +14 -14
  10. package/cjs/components/date-picker/DatePickerAddon.d.ts +1 -1
  11. package/cjs/components/date-picker/DatePickerCalendar.d.ts +1 -1
  12. package/cjs/components/date-picker/DatePickerInput.d.ts +1 -1
  13. package/cjs/components/dropdown/Dropdown.d.ts +9 -9
  14. package/cjs/components/form-row/FormRow.d.ts +4 -4
  15. package/cjs/components/form-set/FormSet.d.ts +5 -5
  16. package/cjs/components/global-error/GlobalError.d.ts +1 -1
  17. package/cjs/components/global-status/GlobalStatus.d.ts +5 -5
  18. package/cjs/components/heading/Heading.d.ts +2 -2
  19. package/cjs/components/heading/HeadingProvider.d.ts +2 -2
  20. package/cjs/components/icon/Icon.d.ts +1 -1
  21. package/cjs/components/icon-primary/IconPrimary.d.ts +1 -1
  22. package/cjs/components/index.d.ts +2 -0
  23. package/cjs/components/index.js +8 -0
  24. package/cjs/components/input/Input.d.ts +9 -9
  25. package/cjs/components/input-masked/InputMasked.d.ts +11 -11
  26. package/cjs/components/input-masked/InputMasked.js +6 -3
  27. package/cjs/components/input-masked/InputMaskedHooks.js +26 -34
  28. package/cjs/components/input-masked/InputMaskedUtils.js +9 -20
  29. package/cjs/components/lib.js +9 -0
  30. package/cjs/components/modal/Modal.js +123 -271
  31. package/cjs/components/modal/ModalContent.js +145 -243
  32. package/cjs/components/modal/ModalRoot.js +194 -0
  33. package/cjs/components/modal/components/CloseButton.js +125 -0
  34. package/cjs/components/modal/components/ModalHeader.js +124 -0
  35. package/cjs/components/modal/{ModalHeader.js → components/ModalHeaderBar.js} +50 -162
  36. package/cjs/components/modal/{ModalInner.js → components/ModalInner.js} +11 -19
  37. package/cjs/components/modal/helpers.js +80 -0
  38. package/cjs/components/modal/types.js +1 -0
  39. package/cjs/components/number-format/NumberFormat.d.ts +8 -8
  40. package/cjs/components/pagination/Pagination.d.ts +30 -30
  41. package/cjs/components/pagination/PaginationProvider.d.ts +2 -2
  42. package/cjs/components/radio/Radio.d.ts +4 -4
  43. package/cjs/components/radio/RadioGroup.d.ts +3 -3
  44. package/cjs/components/section/Section.d.ts +3 -2
  45. package/cjs/components/skeleton/Skeleton.d.ts +2 -2
  46. package/cjs/components/slider/Slider.d.ts +4 -4
  47. package/cjs/components/step-indicator/StepIndicator.d.ts +5 -5
  48. package/cjs/components/step-indicator/StepIndicatorContext.d.ts +1 -1
  49. package/cjs/components/step-indicator/StepIndicatorItem.d.ts +2 -2
  50. package/cjs/components/step-indicator/StepIndicatorItem.js +1 -0
  51. package/cjs/components/step-indicator/StepIndicatorSidebar.d.ts +3 -3
  52. package/cjs/components/step-indicator/StepIndicatorTriggerButton.d.ts +1 -1
  53. package/cjs/components/switch/Switch.d.ts +5 -5
  54. package/cjs/components/tabs/Tabs.d.ts +4 -4
  55. package/cjs/components/tabs/TabsContentWrapper.d.ts +1 -1
  56. package/cjs/components/tag/Tag.js +97 -0
  57. package/cjs/components/tag/index.d.ts +8 -0
  58. package/cjs/components/tag/index.js +52 -0
  59. package/cjs/components/tag/style/_tag.scss +26 -0
  60. package/cjs/components/tag/style/dnb-tag.css +109 -0
  61. package/cjs/components/tag/style/dnb-tag.min.css +1 -0
  62. package/cjs/components/tag/style/dnb-tag.scss +12 -0
  63. package/cjs/components/tag/style/index.d.ts +6 -0
  64. package/cjs/components/tag/style/index.js +3 -0
  65. package/cjs/components/tag/style.js +3 -0
  66. package/cjs/components/textarea/Textarea.d.ts +4 -4
  67. package/cjs/components/toggle-button/ToggleButton.d.ts +6 -6
  68. package/cjs/components/toggle-button/ToggleButtonGroup.d.ts +3 -3
  69. package/cjs/components/tooltip/Tooltip.d.ts +5 -5
  70. package/cjs/components/tooltip/TooltipContainer.d.ts +3 -3
  71. package/cjs/components/tooltip/TooltipPortal.d.ts +1 -1
  72. package/cjs/components/tooltip/TooltipWithEvents.d.ts +1 -1
  73. package/cjs/fragments/scroll-view/ScrollView.js +7 -16
  74. package/cjs/index.d.ts +2 -0
  75. package/cjs/index.js +8 -0
  76. package/cjs/shared/Context.js +2 -1
  77. package/cjs/style/core/helper-classes/skip-link.scss +1 -1
  78. package/cjs/style/dnb-ui-components.css +40 -0
  79. package/cjs/style/dnb-ui-components.min.css +1 -1
  80. package/cjs/style/dnb-ui-components.scss +1 -0
  81. package/components/Tag.d.ts +14 -0
  82. package/components/Tag.js +3 -0
  83. package/components/accordion/Accordion.d.ts +7 -7
  84. package/components/autocomplete/Autocomplete.d.ts +13 -13
  85. package/components/button/Button.d.ts +7 -7
  86. package/components/button/Button.js +6 -4
  87. package/components/checkbox/Checkbox.d.ts +3 -3
  88. package/components/date-picker/DatePicker.d.ts +14 -14
  89. package/components/date-picker/DatePickerAddon.d.ts +1 -1
  90. package/components/date-picker/DatePickerCalendar.d.ts +1 -1
  91. package/components/date-picker/DatePickerInput.d.ts +1 -1
  92. package/components/dropdown/Dropdown.d.ts +9 -9
  93. package/components/form-row/FormRow.d.ts +4 -4
  94. package/components/form-set/FormSet.d.ts +5 -5
  95. package/components/global-error/GlobalError.d.ts +1 -1
  96. package/components/global-status/GlobalStatus.d.ts +5 -5
  97. package/components/heading/Heading.d.ts +2 -2
  98. package/components/heading/HeadingProvider.d.ts +2 -2
  99. package/components/icon/Icon.d.ts +1 -1
  100. package/components/index.d.ts +2 -0
  101. package/components/index.js +2 -1
  102. package/components/input/Input.d.ts +9 -9
  103. package/components/input-masked/InputMasked.d.ts +11 -11
  104. package/components/input-masked/InputMasked.js +6 -4
  105. package/components/input-masked/InputMaskedHooks.js +24 -28
  106. package/components/input-masked/InputMaskedUtils.js +9 -20
  107. package/components/lib.js +3 -1
  108. package/components/modal/Modal.js +112 -250
  109. package/components/modal/Modal.tsx +524 -0
  110. package/components/modal/ModalContent.js +137 -224
  111. package/components/modal/ModalContent.tsx +515 -0
  112. package/components/modal/ModalContext.tsx +10 -0
  113. package/components/modal/ModalRoot.js +145 -0
  114. package/components/modal/ModalRoot.tsx +131 -0
  115. package/components/modal/components/CloseButton.js +72 -0
  116. package/components/modal/components/CloseButton.tsx +56 -0
  117. package/components/modal/components/ModalHeader.js +70 -0
  118. package/components/modal/components/ModalHeader.tsx +79 -0
  119. package/components/modal/components/ModalHeaderBar.js +122 -0
  120. package/components/modal/components/ModalHeaderBar.tsx +118 -0
  121. package/components/modal/{ModalInner.js → components/ModalInner.js} +11 -17
  122. package/components/modal/components/ModalInner.tsx +45 -0
  123. package/components/modal/helpers.js +64 -0
  124. package/components/modal/helpers.ts +63 -0
  125. package/components/modal/types.js +1 -0
  126. package/{cjs/components/modal/Modal.d.ts → components/modal/types.ts} +124 -182
  127. package/components/number-format/NumberFormat.d.ts +8 -8
  128. package/components/pagination/Pagination.d.ts +30 -30
  129. package/components/pagination/PaginationProvider.d.ts +2 -2
  130. package/components/radio/Radio.d.ts +4 -4
  131. package/components/radio/RadioGroup.d.ts +3 -3
  132. package/components/section/Section.d.ts +3 -1
  133. package/components/skeleton/Skeleton.d.ts +2 -2
  134. package/components/slider/Slider.d.ts +4 -4
  135. package/components/step-indicator/StepIndicator.d.ts +5 -5
  136. package/components/step-indicator/StepIndicatorContext.d.ts +1 -1
  137. package/components/step-indicator/StepIndicatorItem.d.ts +2 -2
  138. package/components/step-indicator/StepIndicatorItem.js +1 -0
  139. package/components/step-indicator/StepIndicatorSidebar.d.ts +3 -3
  140. package/components/step-indicator/StepIndicatorTriggerButton.d.ts +1 -1
  141. package/components/switch/Switch.d.ts +5 -5
  142. package/components/tabs/Tabs.d.ts +4 -4
  143. package/components/tabs/TabsContentWrapper.d.ts +1 -1
  144. package/components/tag/Tag.js +63 -0
  145. package/components/tag/Tag.tsx +95 -0
  146. package/components/tag/index.d.ts +8 -0
  147. package/components/tag/index.js +3 -0
  148. package/components/tag/style/_tag.scss +26 -0
  149. package/components/tag/style/dnb-tag.css +109 -0
  150. package/components/tag/style/dnb-tag.min.css +1 -0
  151. package/components/tag/style/dnb-tag.scss +12 -0
  152. package/components/tag/style/index.d.ts +6 -0
  153. package/components/tag/style/index.js +1 -0
  154. package/components/tag/style.js +1 -0
  155. package/components/textarea/Textarea.d.ts +4 -4
  156. package/components/toggle-button/ToggleButton.d.ts +6 -6
  157. package/components/toggle-button/ToggleButtonGroup.d.ts +3 -3
  158. package/components/tooltip/Tooltip.d.ts +5 -5
  159. package/components/tooltip/TooltipContainer.d.ts +3 -3
  160. package/components/tooltip/TooltipPortal.d.ts +1 -1
  161. package/components/tooltip/TooltipWithEvents.d.ts +1 -1
  162. package/es/components/Tag.d.ts +14 -0
  163. package/es/components/Tag.js +3 -0
  164. package/es/components/accordion/Accordion.d.ts +7 -7
  165. package/es/components/autocomplete/Autocomplete.d.ts +13 -13
  166. package/es/components/button/Button.d.ts +7 -7
  167. package/es/components/button/Button.js +6 -4
  168. package/es/components/checkbox/Checkbox.d.ts +3 -3
  169. package/es/components/date-picker/DatePicker.d.ts +14 -14
  170. package/es/components/date-picker/DatePickerAddon.d.ts +1 -1
  171. package/es/components/date-picker/DatePickerCalendar.d.ts +1 -1
  172. package/es/components/date-picker/DatePickerInput.d.ts +1 -1
  173. package/es/components/dropdown/Dropdown.d.ts +9 -9
  174. package/es/components/form-row/FormRow.d.ts +4 -4
  175. package/es/components/form-set/FormSet.d.ts +5 -5
  176. package/es/components/global-error/GlobalError.d.ts +1 -1
  177. package/es/components/global-status/GlobalStatus.d.ts +5 -5
  178. package/es/components/heading/Heading.d.ts +2 -2
  179. package/es/components/heading/HeadingProvider.d.ts +2 -2
  180. package/es/components/icon/Icon.d.ts +1 -1
  181. package/es/components/icon-primary/IconPrimary.d.ts +1 -1
  182. package/es/components/index.d.ts +2 -0
  183. package/es/components/index.js +2 -1
  184. package/es/components/input/Input.d.ts +9 -9
  185. package/es/components/input-masked/InputMasked.d.ts +11 -11
  186. package/es/components/input-masked/InputMasked.js +6 -4
  187. package/es/components/input-masked/InputMaskedHooks.js +14 -18
  188. package/es/components/input-masked/InputMaskedUtils.js +7 -18
  189. package/es/components/lib.js +3 -1
  190. package/es/components/modal/Modal.js +97 -227
  191. package/es/components/modal/Modal.tsx +524 -0
  192. package/es/components/modal/ModalContent.js +95 -186
  193. package/es/components/modal/ModalContent.tsx +515 -0
  194. package/es/components/modal/ModalContext.tsx +10 -0
  195. package/es/components/modal/ModalRoot.js +108 -0
  196. package/es/components/modal/ModalRoot.tsx +131 -0
  197. package/es/components/modal/components/CloseButton.js +41 -0
  198. package/es/components/modal/components/CloseButton.tsx +56 -0
  199. package/es/components/modal/components/ModalHeader.js +40 -0
  200. package/es/components/modal/components/ModalHeader.tsx +79 -0
  201. package/es/components/modal/components/ModalHeaderBar.js +88 -0
  202. package/es/components/modal/components/ModalHeaderBar.tsx +118 -0
  203. package/es/components/modal/{ModalInner.js → components/ModalInner.js} +8 -18
  204. package/es/components/modal/components/ModalInner.tsx +45 -0
  205. package/es/components/modal/helpers.js +60 -0
  206. package/es/components/modal/helpers.ts +63 -0
  207. package/es/components/modal/types.js +1 -0
  208. package/es/components/modal/{Modal.d.ts → types.ts} +124 -182
  209. package/es/components/number-format/NumberFormat.d.ts +8 -8
  210. package/es/components/pagination/Pagination.d.ts +30 -30
  211. package/es/components/pagination/PaginationProvider.d.ts +2 -2
  212. package/es/components/radio/Radio.d.ts +4 -4
  213. package/es/components/radio/RadioGroup.d.ts +3 -3
  214. package/es/components/section/Section.d.ts +3 -2
  215. package/es/components/skeleton/Skeleton.d.ts +2 -2
  216. package/es/components/slider/Slider.d.ts +4 -4
  217. package/es/components/step-indicator/StepIndicator.d.ts +5 -5
  218. package/es/components/step-indicator/StepIndicatorContext.d.ts +1 -1
  219. package/es/components/step-indicator/StepIndicatorItem.d.ts +2 -2
  220. package/es/components/step-indicator/StepIndicatorItem.js +1 -0
  221. package/es/components/step-indicator/StepIndicatorSidebar.d.ts +3 -3
  222. package/es/components/step-indicator/StepIndicatorTriggerButton.d.ts +1 -1
  223. package/es/components/switch/Switch.d.ts +5 -5
  224. package/es/components/tabs/Tabs.d.ts +4 -4
  225. package/es/components/tabs/TabsContentWrapper.d.ts +1 -1
  226. package/es/components/tag/Tag.js +58 -0
  227. package/es/components/tag/Tag.tsx +95 -0
  228. package/es/components/tag/index.d.ts +8 -0
  229. package/es/components/tag/index.js +3 -0
  230. package/es/components/tag/style/_tag.scss +26 -0
  231. package/es/components/tag/style/dnb-tag.css +109 -0
  232. package/es/components/tag/style/dnb-tag.min.css +1 -0
  233. package/es/components/tag/style/dnb-tag.scss +12 -0
  234. package/es/components/tag/style/index.d.ts +6 -0
  235. package/es/components/tag/style/index.js +1 -0
  236. package/es/components/tag/style.js +1 -0
  237. package/es/components/textarea/Textarea.d.ts +4 -4
  238. package/es/components/toggle-button/ToggleButton.d.ts +6 -6
  239. package/es/components/toggle-button/ToggleButtonGroup.d.ts +3 -3
  240. package/es/components/tooltip/Tooltip.d.ts +5 -5
  241. package/es/components/tooltip/TooltipContainer.d.ts +3 -3
  242. package/es/components/tooltip/TooltipPortal.d.ts +1 -1
  243. package/es/components/tooltip/TooltipWithEvents.d.ts +1 -1
  244. package/es/fragments/scroll-view/ScrollView.js +7 -15
  245. package/es/fragments/scroll-view/ScrollView.tsx +92 -0
  246. package/es/index.d.ts +2 -0
  247. package/es/index.js +2 -1
  248. package/es/shared/Context.js +2 -1
  249. package/es/style/core/helper-classes/skip-link.scss +1 -1
  250. package/es/style/dnb-ui-components.css +40 -0
  251. package/es/style/dnb-ui-components.min.css +1 -1
  252. package/es/style/dnb-ui-components.scss +1 -0
  253. package/esm/components/Tag.d.ts +14 -0
  254. package/esm/components/Tag.js +3 -0
  255. package/esm/components/accordion/Accordion.d.ts +7 -7
  256. package/esm/components/autocomplete/Autocomplete.d.ts +13 -13
  257. package/esm/components/button/Button.d.ts +7 -7
  258. package/esm/components/button/Button.js +6 -4
  259. package/esm/components/checkbox/Checkbox.d.ts +3 -3
  260. package/esm/components/date-picker/DatePicker.d.ts +14 -14
  261. package/esm/components/date-picker/DatePickerAddon.d.ts +1 -1
  262. package/esm/components/date-picker/DatePickerCalendar.d.ts +1 -1
  263. package/esm/components/date-picker/DatePickerInput.d.ts +1 -1
  264. package/esm/components/dropdown/Dropdown.d.ts +9 -9
  265. package/esm/components/form-row/FormRow.d.ts +4 -4
  266. package/esm/components/form-set/FormSet.d.ts +5 -5
  267. package/esm/components/global-error/GlobalError.d.ts +1 -1
  268. package/esm/components/global-status/GlobalStatus.d.ts +5 -5
  269. package/esm/components/heading/Heading.d.ts +2 -2
  270. package/esm/components/heading/HeadingProvider.d.ts +2 -2
  271. package/esm/components/icon/Icon.d.ts +1 -1
  272. package/esm/components/index.d.ts +2 -0
  273. package/esm/components/index.js +2 -1
  274. package/esm/components/input/Input.d.ts +9 -9
  275. package/esm/components/input-masked/InputMasked.d.ts +11 -11
  276. package/esm/components/input-masked/InputMasked.js +6 -4
  277. package/esm/components/input-masked/InputMaskedHooks.js +24 -28
  278. package/esm/components/input-masked/InputMaskedUtils.js +9 -20
  279. package/esm/components/lib.js +3 -1
  280. package/esm/components/modal/Modal.js +112 -250
  281. package/esm/components/modal/Modal.tsx +524 -0
  282. package/esm/components/modal/ModalContent.js +137 -224
  283. package/esm/components/modal/ModalContent.tsx +515 -0
  284. package/esm/components/modal/ModalContext.tsx +10 -0
  285. package/esm/components/modal/ModalRoot.js +145 -0
  286. package/esm/components/modal/ModalRoot.tsx +131 -0
  287. package/esm/components/modal/components/CloseButton.js +72 -0
  288. package/esm/components/modal/components/CloseButton.tsx +56 -0
  289. package/esm/components/modal/components/ModalHeader.js +70 -0
  290. package/esm/components/modal/components/ModalHeader.tsx +79 -0
  291. package/esm/components/modal/components/ModalHeaderBar.js +122 -0
  292. package/esm/components/modal/components/ModalHeaderBar.tsx +118 -0
  293. package/esm/components/modal/{ModalInner.js → components/ModalInner.js} +11 -17
  294. package/esm/components/modal/components/ModalInner.tsx +45 -0
  295. package/esm/components/modal/helpers.js +64 -0
  296. package/esm/components/modal/helpers.ts +63 -0
  297. package/esm/components/modal/types.js +1 -0
  298. package/esm/components/modal/{Modal.d.ts → types.ts} +124 -182
  299. package/esm/components/number-format/NumberFormat.d.ts +8 -8
  300. package/esm/components/pagination/Pagination.d.ts +30 -30
  301. package/esm/components/pagination/PaginationProvider.d.ts +2 -2
  302. package/esm/components/radio/Radio.d.ts +4 -4
  303. package/esm/components/radio/RadioGroup.d.ts +3 -3
  304. package/esm/components/section/Section.d.ts +3 -1
  305. package/esm/components/skeleton/Skeleton.d.ts +2 -2
  306. package/esm/components/slider/Slider.d.ts +4 -4
  307. package/esm/components/step-indicator/StepIndicator.d.ts +5 -5
  308. package/esm/components/step-indicator/StepIndicatorContext.d.ts +1 -1
  309. package/esm/components/step-indicator/StepIndicatorItem.d.ts +2 -2
  310. package/esm/components/step-indicator/StepIndicatorItem.js +1 -0
  311. package/esm/components/step-indicator/StepIndicatorSidebar.d.ts +3 -3
  312. package/esm/components/step-indicator/StepIndicatorTriggerButton.d.ts +1 -1
  313. package/esm/components/switch/Switch.d.ts +5 -5
  314. package/esm/components/tabs/Tabs.d.ts +4 -4
  315. package/esm/components/tabs/TabsContentWrapper.d.ts +1 -1
  316. package/esm/components/tag/Tag.js +63 -0
  317. package/esm/components/tag/Tag.tsx +95 -0
  318. package/esm/components/tag/index.d.ts +8 -0
  319. package/esm/components/tag/index.js +3 -0
  320. package/esm/components/tag/style/_tag.scss +26 -0
  321. package/esm/components/tag/style/dnb-tag.css +109 -0
  322. package/esm/components/tag/style/dnb-tag.min.css +1 -0
  323. package/esm/components/tag/style/dnb-tag.scss +12 -0
  324. package/esm/components/tag/style/index.d.ts +6 -0
  325. package/esm/components/tag/style/index.js +1 -0
  326. package/esm/components/tag/style.js +1 -0
  327. package/esm/components/textarea/Textarea.d.ts +4 -4
  328. package/esm/components/toggle-button/ToggleButton.d.ts +6 -6
  329. package/esm/components/toggle-button/ToggleButtonGroup.d.ts +3 -3
  330. package/esm/components/tooltip/Tooltip.d.ts +5 -5
  331. package/esm/components/tooltip/TooltipContainer.d.ts +3 -3
  332. package/esm/components/tooltip/TooltipPortal.d.ts +1 -1
  333. package/esm/components/tooltip/TooltipWithEvents.d.ts +1 -1
  334. package/esm/dnb-ui-components.min.mjs +1 -1
  335. package/esm/dnb-ui-elements.min.mjs +1 -1
  336. package/esm/dnb-ui-extensions.min.mjs +1 -1
  337. package/esm/dnb-ui-lib.min.mjs +2 -2
  338. package/esm/dnb-ui-web-components.min.mjs +2 -2
  339. package/esm/fragments/scroll-view/ScrollView.js +10 -16
  340. package/esm/fragments/scroll-view/ScrollView.tsx +92 -0
  341. package/esm/index.d.ts +2 -0
  342. package/esm/index.js +2 -1
  343. package/esm/shared/Context.js +2 -1
  344. package/esm/style/core/helper-classes/skip-link.scss +1 -1
  345. package/esm/style/dnb-ui-components.css +40 -0
  346. package/esm/style/dnb-ui-components.min.css +1 -1
  347. package/esm/style/dnb-ui-components.scss +1 -0
  348. package/fragments/scroll-view/ScrollView.js +10 -16
  349. package/fragments/scroll-view/ScrollView.tsx +92 -0
  350. package/index.d.ts +2 -0
  351. package/index.js +2 -1
  352. package/package.json +1 -1
  353. package/shared/Context.js +2 -1
  354. package/style/core/helper-classes/skip-link.scss +1 -1
  355. package/style/dnb-ui-components.css +40 -0
  356. package/style/dnb-ui-components.min.css +1 -1
  357. package/style/dnb-ui-components.scss +1 -0
  358. package/umd/dnb-ui-components.min.js +5 -5
  359. package/umd/dnb-ui-elements.min.js +1 -1
  360. package/umd/dnb-ui-extensions.min.js +1 -1
  361. package/umd/dnb-ui-lib.min.js +4 -4
  362. package/umd/dnb-ui-web-components.min.js +2 -2
  363. package/cjs/components/modal/ModalContent.d.ts +0 -168
  364. package/cjs/components/modal/ModalHeader.d.ts +0 -73
  365. package/cjs/components/modal/ModalInner.d.ts +0 -20
  366. package/cjs/fragments/scroll-view/ScrollView.d.ts +0 -1
  367. package/components/modal/Modal.d.ts +0 -329
  368. package/components/modal/ModalContent.d.ts +0 -168
  369. package/components/modal/ModalHeader.d.ts +0 -73
  370. package/components/modal/ModalHeader.js +0 -224
  371. package/components/modal/ModalInner.d.ts +0 -20
  372. package/es/components/modal/ModalContent.d.ts +0 -168
  373. package/es/components/modal/ModalHeader.d.ts +0 -73
  374. package/es/components/modal/ModalHeader.js +0 -166
  375. package/es/components/modal/ModalInner.d.ts +0 -20
  376. package/es/fragments/scroll-view/ScrollView.d.ts +0 -1
  377. package/esm/components/modal/ModalContent.d.ts +0 -168
  378. package/esm/components/modal/ModalHeader.d.ts +0 -73
  379. package/esm/components/modal/ModalHeader.js +0 -224
  380. package/esm/components/modal/ModalInner.d.ts +0 -20
  381. package/esm/fragments/scroll-view/ScrollView.d.ts +0 -1
  382. package/fragments/scroll-view/ScrollView.d.ts +0 -1
@@ -89,7 +89,7 @@ export interface InputProps extends React.HTMLProps<HTMLElement> {
89
89
  type?: string;
90
90
 
91
91
  /**
92
- * The sizes you can sue is `small` (1.5rem), `default` (2rem), `medium` (2.5rem) and `large` (3rem) are supported component sizes. Defaults to `default` / `null`. Also, if You define a number like `size="2"` then the it will be forwarded as the input element attribute.
92
+ * The sizes you can sue is `small` (1.5rem), `default` (2rem), `medium` (2.5rem) and `large` (3rem) are supported component sizes. Defaults to `default` / `null`. Also, if You define a number like `size="2"` then it will be forwarded as the input element attribute.
93
93
  */
94
94
  size?: InputSize;
95
95
 
@@ -120,7 +120,7 @@ export interface InputProps extends React.HTMLProps<HTMLElement> {
120
120
  status?: InputStatus;
121
121
 
122
122
  /**
123
- * Defines the state of the status. Currently there are two statuses `[error, info]`. Defaults to `error`.
123
+ * Defines the state of the status. Currently, there are two statuses `[error, info]`. Defaults to `error`.
124
124
  */
125
125
  status_state?: string;
126
126
 
@@ -141,7 +141,7 @@ export interface InputProps extends React.HTMLProps<HTMLElement> {
141
141
  global_status_id?: string;
142
142
 
143
143
  /**
144
- * Defaults to `off`. Set to `on` or any of <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-autocomplete">allowed `attributes`</a>. Keep in mind, 1. you may have to define a `name`, 2. have the input as a descendants of a `<form>` element, 3. and have a submit button inside the form.
144
+ * Defaults to `off`. Set to `on` or any of <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-autocomplete">allowed `attributes`</a>. Keep in mind, 1. you may have to define a `name`, 2. have the input as a descendant of a `<form>` element, 3. and have a submit button inside the form.
145
145
  */
146
146
  autocomplete?: string;
147
147
 
@@ -162,7 +162,7 @@ export interface InputProps extends React.HTMLProps<HTMLElement> {
162
162
  clear?: InputClear;
163
163
 
164
164
  /**
165
- * Set to `true` in case the `placeholder` has to be kept during focus. By default the placeholder disappears on focus.
165
+ * Set to `true` in case the `placeholder` has to be kept during focus. By default, the placeholder disappears on focus.
166
166
  */
167
167
  keep_placeholder?: InputKeepPlaceholder;
168
168
 
@@ -199,17 +199,17 @@ export interface InputProps extends React.HTMLProps<HTMLElement> {
199
199
  input_class?: string;
200
200
 
201
201
  /**
202
- * Provide the Input element with any attributes by using an Object `input_attributes={{size:&#39;2&#39;}}` or a JSON Object `input_attributes=&#39;{"size":"2"}&#39;`. "NB:" Keep in mind, that also every not listed component property will be send along and set as a Input element attribute.
202
+ * Provide the Input element with any attributes by using an Object `input_attributes={{size:&#39;2&#39;}}` or a JSON Object `input_attributes=&#39;{"size":"2"}&#39;`. "NB:" Keep in mind, that also every not listed component property will be sent along and set as an Input element attribute.
203
203
  */
204
204
  input_attributes?: InputInputAttributes;
205
205
 
206
206
  /**
207
- * <em>(internal)</em> by providing a new component we can change the internal used element. Also supports a string only, like `input_element="input"`.
207
+ * <em>(internal)</em> by providing a new component we can change the internally used element. Also supports a string only, like `input_element="input"`.
208
208
  */
209
209
  input_element?: InputInputElement;
210
210
 
211
211
  /**
212
- * Icon to show before or after the input / placeholder. Can be either a string defining a primary icon, or a Component using a SVG icon of either 16px or 24px.
212
+ * Icon to show before or after the input / placeholder. Can be either a string defining a primary icon or a Component using an SVG icon of either 16px or 24px.
213
213
  */
214
214
  icon?: InputIcon;
215
215
 
@@ -224,7 +224,7 @@ export interface InputProps extends React.HTMLProps<HTMLElement> {
224
224
  icon_position?: InputIconPosition;
225
225
 
226
226
  /**
227
- * By providing a React.ref we can get the internal used input element (DOM). E.g. `inner_ref={myRef}` by using `React.createRef()` or `React.useRef()`.
227
+ * By providing a React.ref we can get the internally used input element (DOM). E.g. `inner_ref={myRef}` by using `React.createRef()` or `React.useRef()`.
228
228
  */
229
229
  inner_ref?: InputInnerRef;
230
230
  readOnly?: InputReadOnly;
@@ -267,7 +267,7 @@ export interface InputProps extends React.HTMLProps<HTMLElement> {
267
267
  custom_method?: (...args: any[]) => any;
268
268
 
269
269
  /**
270
- * Will be called on value changes made by the user. Returns an object with the value as a string and the a native event: `{ value, event }`.
270
+ * Will be called on value changes made by the user. Returns an object with the value as a string and the native event: `{ value, event }`.
271
271
  */
272
272
  on_change?: (...args: any[]) => any;
273
273
 
@@ -96,7 +96,7 @@ export type InputMaskedChildren =
96
96
  */
97
97
  export interface InputMaskedProps extends React.HTMLProps<HTMLElement> {
98
98
  /**
99
- * A mask can be define both as a <a href="https://github.com/text-mask/text-mask/blob/master/componentDocumentation.md#readme">RegExp style of characters</a> or a callback function. Example below.
99
+ * A mask can be defined both as a <a href="https://github.com/text-mask/text-mask/blob/master/componentDocumentation.md#readme">RegExp style of characters</a> or a callback function. Example below.
100
100
  */
101
101
  mask?: InputMaskedMask;
102
102
 
@@ -106,7 +106,7 @@ export interface InputMaskedProps extends React.HTMLProps<HTMLElement> {
106
106
  number_mask?: InputMaskedNumberMask;
107
107
 
108
108
  /**
109
- * Set to `true` or set the <em>valuta</em> (currency_mask="kr") to enable the a custom currency mask – or give an `object` containing the number mask properties. More details below. Can be a JSON string as well, containing the number mask properties. Is disabled by default. Defaults to `kr`.
109
+ * Set to `true` or set the <em>valuta</em> (currency_mask="kr") to enable a custom currency mask – or give an `object` containing the number mask properties. More details below. Can be a JSON string as well, containing the number mask properties. Is disabled by default. Defaults to `kr`.
110
110
  */
111
111
  currency_mask?: InputMaskedCurrencyMask;
112
112
 
@@ -162,12 +162,12 @@ export interface InputMaskedProps extends React.HTMLProps<HTMLElement> {
162
162
  placeholder_char?: string;
163
163
 
164
164
  /**
165
- * By providing a React.ref we can get the internal used input element (DOM). E.g. `inner_ref={myRef}` by using `React.createRef()` or `React.useRef()`.
165
+ * By providing a React.ref we can get the internally used input element (DOM). E.g. `inner_ref={myRef}` by using `React.createRef()` or `React.useRef()`.
166
166
  */
167
167
  inner_ref?: Object;
168
168
 
169
169
  /**
170
- * Will be called on value changes made by the user. Returns an object with the value as a string and the a native event: `{ value, event }`.
170
+ * Will be called on value changes made by the user. Returns an object with the value as a string and the native event: `{ value, event }`.
171
171
  */
172
172
  on_change?: (...args: any[]) => any;
173
173
 
@@ -194,7 +194,7 @@ export interface InputMaskedProps extends React.HTMLProps<HTMLElement> {
194
194
  type?: string;
195
195
 
196
196
  /**
197
- * The sizes you can sue is `small` (1.5rem), `default` (2rem), `medium` (2.5rem) and `large` (3rem) are supported component sizes. Defaults to `default` / `null`. Also, if You define a number like `size="2"` then the it will be forwarded as the input element attribute.
197
+ * The sizes you can sue is `small` (1.5rem), `default` (2rem), `medium` (2.5rem) and `large` (3rem) are supported component sizes. Defaults to `default` / `null`. Also, if You define a number like `size="2"` then it will be forwarded as the input element attribute.
198
198
  */
199
199
  size?: InputMaskedSize;
200
200
 
@@ -225,7 +225,7 @@ export interface InputMaskedProps extends React.HTMLProps<HTMLElement> {
225
225
  status?: InputMaskedStatus;
226
226
 
227
227
  /**
228
- * Defines the state of the status. Currently there are two statuses `[error, info]`. Defaults to `error`.
228
+ * Defines the state of the status. Currently, there are two statuses `[error, info]`. Defaults to `error`.
229
229
  */
230
230
  status_state?: string;
231
231
 
@@ -246,7 +246,7 @@ export interface InputMaskedProps extends React.HTMLProps<HTMLElement> {
246
246
  global_status_id?: string;
247
247
 
248
248
  /**
249
- * Defaults to `off`. Set to `on` or any of <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-autocomplete">allowed `attributes`</a>. Keep in mind, 1. you may have to define a `name`, 2. have the input as a descendants of a `<form>` element, 3. and have a submit button inside the form.
249
+ * Defaults to `off`. Set to `on` or any of <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-autocomplete">allowed `attributes`</a>. Keep in mind, 1. you may have to define a `name`, 2. have the input as a descendant of a `<form>` element, 3. and have a submit button inside the form.
250
250
  */
251
251
  autocomplete?: string;
252
252
 
@@ -267,7 +267,7 @@ export interface InputMaskedProps extends React.HTMLProps<HTMLElement> {
267
267
  clear?: InputMaskedClear;
268
268
 
269
269
  /**
270
- * Set to `true` in case the `placeholder` has to be kept during focus. By default the placeholder disappears on focus.
270
+ * Set to `true` in case the `placeholder` has to be kept during focus. By default, the placeholder disappears on focus.
271
271
  */
272
272
  keep_placeholder?: InputMaskedKeepPlaceholder;
273
273
 
@@ -304,17 +304,17 @@ export interface InputMaskedProps extends React.HTMLProps<HTMLElement> {
304
304
  input_class?: string;
305
305
 
306
306
  /**
307
- * Provide the Input element with any attributes by using an Object `input_attributes={{size:&#39;2&#39;}}` or a JSON Object `input_attributes=&#39;{"size":"2"}&#39;`. "NB:" Keep in mind, that also every not listed component property will be send along and set as a Input element attribute.
307
+ * Provide the Input element with any attributes by using an Object `input_attributes={{size:&#39;2&#39;}}` or a JSON Object `input_attributes=&#39;{"size":"2"}&#39;`. "NB:" Keep in mind, that also every not listed component property will be sent along and set as an Input element attribute.
308
308
  */
309
309
  input_attributes?: InputMaskedInputAttributes;
310
310
 
311
311
  /**
312
- * <em>(internal)</em> by providing a new component we can change the internal used element. Also supports a string only, like `input_element="input"`.
312
+ * <em>(internal)</em> by providing a new component we can change the internally used element. Also supports a string only, like `input_element="input"`.
313
313
  */
314
314
  input_element?: InputMaskedInputElement;
315
315
 
316
316
  /**
317
- * Icon to show before or after the input / placeholder. Can be either a string defining a primary icon, or a Component using a SVG icon of either 16px or 24px.
317
+ * Icon to show before or after the input / placeholder. Can be either a string defining a primary icon or a Component using an SVG icon of either 16px or 24px.
318
318
  */
319
319
  icon?: InputMaskedIcon;
320
320
 
@@ -8,18 +8,20 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
8
8
 
9
9
  import React from 'react';
10
10
  import PropTypes from 'prop-types';
11
- import { registerElement } from '../../shared/component-helper';
11
+ import { registerElement, extendPropsWithContext } from '../../shared/component-helper';
12
12
  import InputMaskedContext from './InputMaskedContext';
13
13
  import InputMaskedElement from './InputMaskedElement';
14
14
  import Input, { inputPropTypes } from '../input/Input';
15
15
  import Context from '../../shared/Context';
16
16
  const InputMasked = React.forwardRef((props, ref) => {
17
17
  const context = React.useContext(Context);
18
+ const contextAndProps = React.useCallback(extendPropsWithContext(props, InputMasked.defaultProps, context === null || context === void 0 ? void 0 : context.InputMasked), [props, InputMasked.defaultProps, context === null || context === void 0 ? void 0 : context.InputMasked]);
18
19
  return React.createElement(InputMaskedContext.Provider, {
19
- value: _objectSpread({
20
+ value: {
20
21
  inner_ref: ref,
21
- props
22
- }, context)
22
+ props: contextAndProps,
23
+ context
24
+ }
23
25
  }, _InputMaskedElement || (_InputMaskedElement = React.createElement(InputMaskedElement, null)));
24
26
  });
25
27
  export default InputMasked;
@@ -11,7 +11,6 @@ import React from 'react';
11
11
  import classnames from 'classnames';
12
12
  import { cleanNumber, getCurrencySymbol } from '../number-format/NumberUtils';
13
13
  import { isTrue, dispatchCustomElementEvent } from '../../shared/component-helper';
14
- import Context from '../../shared/Context';
15
14
  import TextMask from './TextMask';
16
15
  import createNumberMask from './addons/createNumberMask';
17
16
  import keycode from 'keycode';
@@ -55,9 +54,9 @@ export const useInputElementRef = () => {
55
54
  };
56
55
  export const useLocale = () => {
57
56
  const {
58
- props
57
+ props,
58
+ context
59
59
  } = React.useContext(InputMaskedContext);
60
- const context = React.useContext(Context);
61
60
  let {
62
61
  locale
63
62
  } = props;
@@ -70,23 +69,21 @@ export const useLocale = () => {
70
69
  };
71
70
  export const useLocalValue = () => {
72
71
  const {
73
- props
72
+ props,
73
+ context
74
74
  } = React.useContext(InputMaskedContext);
75
- const context = React.useContext(Context);
76
75
  const maskParams = useNumberMaskParams() || {};
77
76
  const locale = useLocale();
78
77
  const [localValue, setLocalValue] = React.useState(() => correctNumberValue({
79
- props,
80
- context,
81
78
  locale,
79
+ props,
82
80
  maskParams
83
81
  }));
84
82
  React.useEffect(() => {
85
83
  const value = correctNumberValue({
86
84
  localValue,
87
- props,
88
- context,
89
85
  locale,
86
+ props,
90
87
  maskParams
91
88
  });
92
89
  setLocalValue(value);
@@ -98,8 +95,11 @@ export const useLocalValue = () => {
98
95
  };
99
96
  export const useNumberMask = () => {
100
97
  const maskParams = useNumberMaskParams();
98
+ const {
99
+ props
100
+ } = React.useContext(InputMaskedContext);
101
101
 
102
- if (!maskParams) {
102
+ if (!maskParams || !isRequestingNumberMask(props)) {
103
103
  return null;
104
104
  }
105
105
 
@@ -107,7 +107,7 @@ export const useNumberMask = () => {
107
107
  mask.maskParams = maskParams;
108
108
  return mask;
109
109
  };
110
- export const useInternalMask = () => {
110
+ export const useMask = () => {
111
111
  const {
112
112
  props
113
113
  } = React.useContext(InputMaskedContext);
@@ -130,7 +130,7 @@ export const useMaskParams = () => {
130
130
  placeholder_char,
131
131
  placeholder
132
132
  } = props;
133
- const mask = useInternalMask();
133
+ const mask = useMask();
134
134
  const maskParams = useNumberMaskParams() || {};
135
135
  maskParams.showMask = !placeholder && isTrue(show_mask);
136
136
  maskParams.placeholderChar = placeholder_char;
@@ -159,7 +159,7 @@ export const useInputElement = () => {
159
159
  const {
160
160
  pipe
161
161
  } = props;
162
- const mask = useInternalMask();
162
+ const mask = useMask();
163
163
  const {
164
164
  showMask,
165
165
  showGuide,
@@ -253,7 +253,6 @@ const useCallEvent = ({
253
253
 
254
254
  if (/^0/.test(testValue)) {
255
255
  event.preventDefault();
256
- return;
257
256
  }
258
257
  }
259
258
 
@@ -334,11 +333,10 @@ const useNumberMaskParams = () => {
334
333
  const {
335
334
  props
336
335
  } = React.useContext(InputMaskedContext);
337
- const context = React.useContext(Context);
338
336
  const locale = useLocale();
339
337
 
340
338
  if (!isRequestingNumberMask(props)) {
341
- return null;
339
+ return _objectSpread({}, fromJSON(props.mask_options));
342
340
  }
343
341
 
344
342
  let {
@@ -383,7 +381,6 @@ const useNumberMaskParams = () => {
383
381
 
384
382
  if (number_mask) {
385
383
  maskParams = handleNumberMask({
386
- context,
387
384
  mask_options,
388
385
  number_mask
389
386
  });
@@ -397,7 +394,6 @@ const useNumberMaskParams = () => {
397
394
  }
398
395
  } else if (currency_mask) {
399
396
  maskParams = handleCurrencyMask({
400
- context,
401
397
  mask_options,
402
398
  currency_mask
403
399
  });
@@ -19,12 +19,9 @@ export const isRequestingNumberMask = props => {
19
19
  export const correctNumberValue = ({
20
20
  localValue = null,
21
21
  props,
22
- context,
23
22
  locale,
24
23
  maskParams
25
24
  }) => {
26
- var _context$InputMasked;
27
-
28
25
  let value = String(props.value);
29
26
 
30
27
  if (isNaN(parseFloat(value))) {
@@ -41,13 +38,11 @@ export const correctNumberValue = ({
41
38
  }
42
39
  }
43
40
 
44
- const numberFormatFromContext = context === null || context === void 0 ? void 0 : (_context$InputMasked = context.InputMasked) === null || _context$InputMasked === void 0 ? void 0 : _context$InputMasked.number_format;
45
-
46
- if (props.number_format || numberFormatFromContext) {
47
- const options = _objectSpread(_objectSpread({
41
+ if (props.number_format) {
42
+ const options = _objectSpread({
48
43
  locale,
49
44
  decimals: 0
50
- }, fromJSON(props.number_format)), numberFormatFromContext);
45
+ }, props.number_format);
51
46
 
52
47
  if (shouldHaveDecimals) {
53
48
  options.decimals = maskParams.decimalLimit;
@@ -151,34 +146,28 @@ export const handlePercentMask = ({
151
146
  return maskParams;
152
147
  };
153
148
  export const handleCurrencyMask = ({
154
- context,
155
149
  mask_options,
156
150
  currency_mask
157
151
  }) => {
158
- var _context$InputMasked2, _context$InputMasked3;
159
-
160
- const maskParams = _objectSpread(_objectSpread(_objectSpread(_objectSpread({
152
+ const maskParams = _objectSpread(_objectSpread({
161
153
  showMask: true,
162
154
  placeholderChar: null,
163
155
  allowDecimal: true,
164
156
  decimalLimit: 2,
165
157
  decimalSymbol: ','
166
- }, context === null || context === void 0 ? void 0 : (_context$InputMasked2 = context.InputMasked) === null || _context$InputMasked2 === void 0 ? void 0 : _context$InputMasked2.mask_options), context === null || context === void 0 ? void 0 : (_context$InputMasked3 = context.InputMasked) === null || _context$InputMasked3 === void 0 ? void 0 : _context$InputMasked3.currency_mask), mask_options), currency_mask);
158
+ }, mask_options), currency_mask);
167
159
 
168
160
  const fix = typeof currency_mask === 'string' ? currency_mask : typeof maskParams.currency === 'string' ? maskParams.currency : 'kr';
169
161
  maskParams.suffix = ` ${fix}`;
170
162
  return maskParams;
171
163
  };
172
164
  export const handleNumberMask = ({
173
- context,
174
165
  mask_options,
175
166
  number_mask
176
167
  }) => {
177
- var _context$InputMasked4, _context$InputMasked5;
178
-
179
- const maskParams = _objectSpread(_objectSpread(_objectSpread(_objectSpread({
168
+ const maskParams = _objectSpread(_objectSpread({
180
169
  decimalSymbol: ','
181
- }, context === null || context === void 0 ? void 0 : (_context$InputMasked4 = context.InputMasked) === null || _context$InputMasked4 === void 0 ? void 0 : _context$InputMasked4.mask_options), context === null || context === void 0 ? void 0 : (_context$InputMasked5 = context.InputMasked) === null || _context$InputMasked5 === void 0 ? void 0 : _context$InputMasked5.number_mask), mask_options), number_mask);
170
+ }, mask_options), number_mask);
182
171
 
183
172
  if (typeof maskParams.allowDecimal === 'undefined') {
184
173
  maskParams.allowDecimal = maskParams.decimalLimit > 0;
@@ -31,10 +31,11 @@ import Space from './space/Space';
31
31
  import StepIndicator from './step-indicator/StepIndicator';
32
32
  import Switch from './switch/Switch';
33
33
  import Tabs from './tabs/Tabs';
34
+ import Tag from './tag/Tag';
34
35
  import Textarea from './textarea/Textarea';
35
36
  import ToggleButton from './toggle-button/ToggleButton';
36
37
  import Tooltip from './tooltip/Tooltip';
37
- export { Accordion, Autocomplete, Breadcrumb, Button, Checkbox, DatePicker, Dropdown, FormLabel, FormRow, FormSet, FormStatus, GlobalError, GlobalStatus, Heading, HelpButton, Icon, IconPrimary, Input, InputMasked, Logo, Modal, NumberFormat, Pagination, ProgressIndicator, Radio, Section, Skeleton, Slider, Space, StepIndicator, Switch, Tabs, Textarea, ToggleButton, Tooltip };
38
+ export { Accordion, Autocomplete, Breadcrumb, Button, Checkbox, DatePicker, Dropdown, FormLabel, FormRow, FormSet, FormStatus, GlobalError, GlobalStatus, Heading, HelpButton, Icon, IconPrimary, Input, InputMasked, Logo, Modal, NumberFormat, Pagination, ProgressIndicator, Radio, Section, Skeleton, Slider, Space, StepIndicator, Switch, Tabs, Tag, Textarea, ToggleButton, Tooltip };
38
39
  export const getComponents = () => {
39
40
  return {
40
41
  Accordion,
@@ -69,6 +70,7 @@ export const getComponents = () => {
69
70
  StepIndicator,
70
71
  Switch,
71
72
  Tabs,
73
+ Tag,
72
74
  Textarea,
73
75
  ToggleButton,
74
76
  Tooltip