@dnb/eufemia 10.73.2 → 10.74.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 (624) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/cjs/components/autocomplete/Autocomplete.js +7 -4
  3. package/cjs/components/autocomplete/Autocomplete.js.map +1 -1
  4. package/cjs/components/autocomplete/AutocompleteDocs.d.ts +289 -3
  5. package/cjs/components/autocomplete/AutocompleteDocs.js +2 -2
  6. package/cjs/components/autocomplete/AutocompleteDocs.js.map +1 -1
  7. package/cjs/components/button/style/dnb-button.css +1 -0
  8. package/cjs/components/button/style/dnb-button.min.css +1 -1
  9. package/cjs/components/button/style/dnb-button.scss +1 -0
  10. package/cjs/components/checkbox/Checkbox.d.ts +9 -1
  11. package/cjs/components/checkbox/Checkbox.js +59 -34
  12. package/cjs/components/checkbox/Checkbox.js.map +1 -1
  13. package/cjs/components/checkbox/CheckboxDocs.js +6 -1
  14. package/cjs/components/checkbox/CheckboxDocs.js.map +1 -1
  15. package/cjs/components/date-picker/DatePicker.d.ts +4 -0
  16. package/cjs/components/date-picker/DatePicker.js +4 -3
  17. package/cjs/components/date-picker/DatePicker.js.map +1 -1
  18. package/cjs/components/date-picker/DatePickerCalendar.d.ts +2 -16
  19. package/cjs/components/date-picker/DatePickerCalendar.js +27 -86
  20. package/cjs/components/date-picker/DatePickerCalendar.js.map +1 -1
  21. package/cjs/components/date-picker/DatePickerCalendarNavigator.d.ts +37 -0
  22. package/cjs/components/date-picker/DatePickerCalendarNavigator.js +173 -0
  23. package/cjs/components/date-picker/DatePickerCalendarNavigator.js.map +1 -0
  24. package/cjs/components/date-picker/DatePickerContext.d.ts +3 -0
  25. package/cjs/components/date-picker/DatePickerContext.js.map +1 -1
  26. package/cjs/components/date-picker/DatePickerDocs.js +6 -1
  27. package/cjs/components/date-picker/DatePickerDocs.js.map +1 -1
  28. package/cjs/components/date-picker/DatePickerFooter.js +20 -17
  29. package/cjs/components/date-picker/DatePickerFooter.js.map +1 -1
  30. package/cjs/components/date-picker/DatePickerProvider.js +7 -0
  31. package/cjs/components/date-picker/DatePickerProvider.js.map +1 -1
  32. package/cjs/components/date-picker/DatePickerRange.js +2 -28
  33. package/cjs/components/date-picker/DatePickerRange.js.map +1 -1
  34. package/cjs/components/date-picker/hooks/useSubmittedDates.d.ts +7 -0
  35. package/cjs/components/date-picker/hooks/useSubmittedDates.js +19 -0
  36. package/cjs/components/date-picker/hooks/useSubmittedDates.js.map +1 -0
  37. package/cjs/components/date-picker/style/dnb-date-picker.css +1 -1
  38. package/cjs/components/date-picker/style/dnb-date-picker.min.css +1 -1
  39. package/cjs/components/date-picker/style/dnb-date-picker.scss +1 -1
  40. package/cjs/components/date-picker/style/themes/dnb-date-picker-theme-ui.css +17 -0
  41. package/cjs/components/date-picker/style/themes/dnb-date-picker-theme-ui.min.css +1 -1
  42. package/cjs/components/date-picker/style/themes/dnb-date-picker-theme-ui.scss +19 -0
  43. package/cjs/components/drawer/Drawer.js +1 -0
  44. package/cjs/components/drawer/Drawer.js.map +1 -1
  45. package/cjs/components/dropdown/Dropdown.js +6 -4
  46. package/cjs/components/dropdown/Dropdown.js.map +1 -1
  47. package/cjs/components/dropdown/DropdownDocs.d.ts +179 -3
  48. package/cjs/components/dropdown/DropdownDocs.js.map +1 -1
  49. package/cjs/components/heading/HeadingHelpers.js +9 -5
  50. package/cjs/components/heading/HeadingHelpers.js.map +1 -1
  51. package/cjs/components/icon/Icon.d.ts +2 -2
  52. package/cjs/components/input-masked/InputMaskedDocs.js +1 -1
  53. package/cjs/components/input-masked/InputMaskedDocs.js.map +1 -1
  54. package/cjs/components/input-masked/InputMaskedHooks.d.ts +1 -0
  55. package/cjs/components/input-masked/InputMaskedHooks.js +38 -6
  56. package/cjs/components/input-masked/InputMaskedHooks.js.map +1 -1
  57. package/cjs/components/input-masked/InputMaskedUtils.js +5 -4
  58. package/cjs/components/input-masked/InputMaskedUtils.js.map +1 -1
  59. package/cjs/components/number-format/NumberUtils.js +6 -4
  60. package/cjs/components/number-format/NumberUtils.js.map +1 -1
  61. package/cjs/components/switch/SwitchDocs.js +2 -2
  62. package/cjs/components/switch/SwitchDocs.js.map +1 -1
  63. package/cjs/extensions/forms/DataContext/Context.d.ts +1 -1
  64. package/cjs/extensions/forms/DataContext/Context.js.map +1 -1
  65. package/cjs/extensions/forms/DataContext/Provider/Provider.js +9 -0
  66. package/cjs/extensions/forms/DataContext/Provider/Provider.js.map +1 -1
  67. package/cjs/extensions/forms/Field/Boolean/Boolean.d.ts +1 -0
  68. package/cjs/extensions/forms/Field/Boolean/Boolean.js.map +1 -1
  69. package/cjs/extensions/forms/Field/Boolean/BooleanDocs.d.ts +1 -0
  70. package/cjs/extensions/forms/Field/Boolean/BooleanDocs.js +8 -1
  71. package/cjs/extensions/forms/Field/Boolean/BooleanDocs.js.map +1 -1
  72. package/cjs/extensions/forms/Field/Date/Date.d.ts +1 -1
  73. package/cjs/extensions/forms/Field/Date/Date.js +1 -1
  74. package/cjs/extensions/forms/Field/Date/Date.js.map +1 -1
  75. package/cjs/extensions/forms/Field/Expiry/Expiry.js.map +1 -1
  76. package/cjs/extensions/forms/Field/Number/NumberDocs.js +1 -1
  77. package/cjs/extensions/forms/Field/Number/NumberDocs.js.map +1 -1
  78. package/cjs/extensions/forms/Field/Provider/useFieldProvider.d.ts +3 -3
  79. package/cjs/extensions/forms/Field/SelectCountry/SelectCountryDocs.js +2 -2
  80. package/cjs/extensions/forms/Field/SelectCountry/SelectCountryDocs.js.map +1 -1
  81. package/cjs/extensions/forms/Field/SelectCurrency/SelectCurrencyDocs.js +2 -2
  82. package/cjs/extensions/forms/Field/SelectCurrency/SelectCurrencyDocs.js.map +1 -1
  83. package/cjs/extensions/forms/Field/Selection/Selection.d.ts +2 -0
  84. package/cjs/extensions/forms/Field/Selection/Selection.js +10 -9
  85. package/cjs/extensions/forms/Field/Selection/Selection.js.map +1 -1
  86. package/cjs/extensions/forms/Field/Toggle/Toggle.d.ts +7 -0
  87. package/cjs/extensions/forms/Field/Toggle/Toggle.js +24 -8
  88. package/cjs/extensions/forms/Field/Toggle/Toggle.js.map +1 -1
  89. package/cjs/extensions/forms/Field/Toggle/ToggleDocs.d.ts +1 -0
  90. package/cjs/extensions/forms/Field/Toggle/ToggleDocs.js +8 -1
  91. package/cjs/extensions/forms/Field/Toggle/ToggleDocs.js.map +1 -1
  92. package/cjs/extensions/forms/Form/Isolation/IsolatedContainer.d.ts +4 -0
  93. package/cjs/extensions/forms/Form/Isolation/IsolatedContainer.js +64 -0
  94. package/cjs/extensions/forms/Form/Isolation/IsolatedContainer.js.map +1 -0
  95. package/cjs/extensions/forms/Form/Isolation/Isolation.d.ts +16 -0
  96. package/cjs/extensions/forms/Form/Isolation/Isolation.js +39 -14
  97. package/cjs/extensions/forms/Form/Isolation/Isolation.js.map +1 -1
  98. package/cjs/extensions/forms/Form/Isolation/IsolationCommitButton.js +1 -1
  99. package/cjs/extensions/forms/Form/Isolation/IsolationCommitButton.js.map +1 -1
  100. package/cjs/extensions/forms/Form/Isolation/IsolationContext.d.ts +12 -0
  101. package/cjs/extensions/forms/Form/Isolation/IsolationContext.js +11 -0
  102. package/cjs/extensions/forms/Form/Isolation/IsolationContext.js.map +1 -0
  103. package/cjs/extensions/forms/Form/Isolation/IsolationDataReference.d.ts +9 -0
  104. package/cjs/extensions/forms/Form/Isolation/IsolationDataReference.js +31 -0
  105. package/cjs/extensions/forms/Form/Isolation/IsolationDataReference.js.map +1 -0
  106. package/cjs/extensions/forms/Form/Isolation/IsolationDocs.js +15 -0
  107. package/cjs/extensions/forms/Form/Isolation/IsolationDocs.js.map +1 -1
  108. package/cjs/extensions/forms/Form/Isolation/IsolationResetButton.d.ts +7 -0
  109. package/cjs/extensions/forms/Form/Isolation/IsolationResetButton.js +112 -0
  110. package/cjs/extensions/forms/Form/Isolation/IsolationResetButton.js.map +1 -0
  111. package/cjs/extensions/forms/Form/Isolation/useDataContextSnapshot.d.ts +7 -0
  112. package/cjs/extensions/forms/Form/Isolation/useDataContextSnapshot.js +58 -0
  113. package/cjs/extensions/forms/Form/Isolation/useDataContextSnapshot.js.map +1 -0
  114. package/cjs/extensions/forms/Form/Isolation/useHandleStatus.d.ts +9 -0
  115. package/cjs/extensions/forms/Form/Isolation/useHandleStatus.js +57 -0
  116. package/cjs/extensions/forms/Form/Isolation/useHandleStatus.js.map +1 -0
  117. package/cjs/extensions/forms/{Iterate/EditContainer → Form/Isolation}/useHasContentChanged.js +11 -9
  118. package/cjs/extensions/forms/Form/Isolation/useHasContentChanged.js.map +1 -0
  119. package/cjs/extensions/forms/Form/Snapshot/Snapshot.d.ts +2 -1
  120. package/cjs/extensions/forms/Form/Snapshot/Snapshot.js.map +1 -1
  121. package/cjs/extensions/forms/Iterate/EditContainer/ResetButton.js +1 -1
  122. package/cjs/extensions/forms/Iterate/EditContainer/ResetButton.js.map +1 -1
  123. package/cjs/extensions/forms/Iterate/EditContainer/index.d.ts +1 -1
  124. package/cjs/extensions/forms/Iterate/EditContainer/index.js +1 -1
  125. package/cjs/extensions/forms/Iterate/EditContainer/index.js.map +1 -1
  126. package/cjs/extensions/forms/Iterate/PushContainer/PushContainer.d.ts +7 -0
  127. package/cjs/extensions/forms/Iterate/PushContainer/PushContainer.js +15 -56
  128. package/cjs/extensions/forms/Iterate/PushContainer/PushContainer.js.map +1 -1
  129. package/cjs/extensions/forms/Iterate/PushContainer/PushContainerDocs.js +2 -2
  130. package/cjs/extensions/forms/Iterate/PushContainer/PushContainerDocs.js.map +1 -1
  131. package/cjs/extensions/forms/constants/locales/en-GB.d.ts +1 -1
  132. package/cjs/extensions/forms/constants/locales/en-GB.js +3 -3
  133. package/cjs/extensions/forms/constants/locales/en-GB.js.map +1 -1
  134. package/cjs/extensions/forms/constants/locales/en-US.d.ts +1 -1
  135. package/cjs/extensions/forms/constants/locales/index.d.ts +2 -2
  136. package/cjs/extensions/forms/constants/locales/nb-NO.d.ts +1 -1
  137. package/cjs/extensions/forms/constants/locales/nb-NO.js +3 -3
  138. package/cjs/extensions/forms/constants/locales/nb-NO.js.map +1 -1
  139. package/cjs/extensions/forms/constants/locales/sv-SE.d.ts +1 -1
  140. package/cjs/extensions/forms/constants/locales/sv-SE.js +3 -3
  141. package/cjs/extensions/forms/constants/locales/sv-SE.js.map +1 -1
  142. package/cjs/extensions/forms/hooks/useDataContext.js +5 -3
  143. package/cjs/extensions/forms/hooks/useDataContext.js.map +1 -1
  144. package/cjs/extensions/forms/hooks/useSnapshot.js +17 -14
  145. package/cjs/extensions/forms/hooks/useSnapshot.js.map +1 -1
  146. package/cjs/fragments/drawer-list/DrawerList.d.ts +176 -224
  147. package/cjs/fragments/drawer-list/DrawerList.js +70 -175
  148. package/cjs/fragments/drawer-list/DrawerList.js.map +1 -1
  149. package/cjs/fragments/drawer-list/DrawerListContext.d.ts +27 -2
  150. package/cjs/fragments/drawer-list/DrawerListContext.js.map +1 -1
  151. package/cjs/fragments/drawer-list/DrawerListDocs.d.ts +211 -4
  152. package/cjs/fragments/drawer-list/DrawerListDocs.js +2 -2
  153. package/cjs/fragments/drawer-list/DrawerListDocs.js.map +1 -1
  154. package/cjs/fragments/drawer-list/DrawerListHelpers.d.ts +85 -89
  155. package/cjs/fragments/drawer-list/DrawerListHelpers.js +52 -58
  156. package/cjs/fragments/drawer-list/DrawerListHelpers.js.map +1 -1
  157. package/cjs/fragments/drawer-list/DrawerListItem.d.ts +30 -0
  158. package/cjs/fragments/drawer-list/DrawerListItem.js +106 -0
  159. package/cjs/fragments/drawer-list/DrawerListItem.js.map +1 -0
  160. package/cjs/fragments/drawer-list/DrawerListPortal.d.ts +20 -30
  161. package/cjs/fragments/drawer-list/DrawerListPortal.js +93 -125
  162. package/cjs/fragments/drawer-list/DrawerListPortal.js.map +1 -1
  163. package/cjs/fragments/drawer-list/DrawerListProvider.d.ts +217 -11
  164. package/cjs/fragments/drawer-list/DrawerListProvider.js +11 -18
  165. package/cjs/fragments/drawer-list/DrawerListProvider.js.map +1 -1
  166. package/cjs/shared/Eufemia.d.ts +1 -1
  167. package/cjs/shared/Eufemia.js +2 -2
  168. package/cjs/shared/Eufemia.js.map +1 -1
  169. package/cjs/shared/component-helper.d.ts +45 -48
  170. package/cjs/shared/component-helper.js +72 -201
  171. package/cjs/shared/component-helper.js.map +1 -1
  172. package/cjs/shared/helpers/withCamelCaseProps.d.ts +4 -5
  173. package/cjs/shared/helpers/withCamelCaseProps.js +7 -2
  174. package/cjs/shared/helpers/withCamelCaseProps.js.map +1 -1
  175. package/cjs/shared/legacy/component-helper-legacy.d.ts +19 -0
  176. package/cjs/shared/legacy/component-helper-legacy.js +202 -0
  177. package/cjs/shared/legacy/component-helper-legacy.js.map +1 -0
  178. package/cjs/shared/locales/en-GB.d.ts +1 -0
  179. package/cjs/shared/locales/en-GB.js +1 -0
  180. package/cjs/shared/locales/en-GB.js.map +1 -1
  181. package/cjs/shared/locales/en-US.js.map +1 -1
  182. package/cjs/shared/locales/index.d.ts +2 -0
  183. package/cjs/shared/locales/nb-NO.d.ts +1 -0
  184. package/cjs/shared/locales/nb-NO.js +2 -1
  185. package/cjs/shared/locales/nb-NO.js.map +1 -1
  186. package/cjs/shared/locales/sv-SE.d.ts +1 -0
  187. package/cjs/shared/locales/sv-SE.js +1 -0
  188. package/cjs/shared/locales/sv-SE.js.map +1 -1
  189. package/cjs/style/core/scopes.scss +1 -1
  190. package/cjs/style/dnb-ui-basis.css +1 -1
  191. package/cjs/style/dnb-ui-basis.min.css +1 -1
  192. package/cjs/style/dnb-ui-body.css +1 -1
  193. package/cjs/style/dnb-ui-body.min.css +1 -1
  194. package/cjs/style/dnb-ui-components.css +2 -1
  195. package/cjs/style/dnb-ui-components.min.css +1 -1
  196. package/cjs/style/dnb-ui-core.css +1 -1
  197. package/cjs/style/dnb-ui-core.min.css +1 -1
  198. package/cjs/style/themes/theme-eiendom/eiendom-theme-components.css +19 -1
  199. package/cjs/style/themes/theme-eiendom/eiendom-theme-components.min.css +2 -2
  200. package/cjs/style/themes/theme-sbanken/sbanken-theme-components.css +19 -1
  201. package/cjs/style/themes/theme-sbanken/sbanken-theme-components.min.css +2 -2
  202. package/cjs/style/themes/theme-ui/ui-theme-components.css +19 -1
  203. package/cjs/style/themes/theme-ui/ui-theme-components.min.css +2 -2
  204. package/components/autocomplete/Autocomplete.js +6 -3
  205. package/components/autocomplete/Autocomplete.js.map +1 -1
  206. package/components/autocomplete/AutocompleteDocs.d.ts +289 -3
  207. package/components/autocomplete/AutocompleteDocs.js +1 -1
  208. package/components/autocomplete/AutocompleteDocs.js.map +1 -1
  209. package/components/button/style/dnb-button.css +1 -0
  210. package/components/button/style/dnb-button.min.css +1 -1
  211. package/components/button/style/dnb-button.scss +1 -0
  212. package/components/checkbox/Checkbox.d.ts +9 -1
  213. package/components/checkbox/Checkbox.js +60 -35
  214. package/components/checkbox/Checkbox.js.map +1 -1
  215. package/components/checkbox/CheckboxDocs.js +6 -1
  216. package/components/checkbox/CheckboxDocs.js.map +1 -1
  217. package/components/date-picker/DatePicker.d.ts +4 -0
  218. package/components/date-picker/DatePicker.js +4 -3
  219. package/components/date-picker/DatePicker.js.map +1 -1
  220. package/components/date-picker/DatePickerCalendar.d.ts +2 -16
  221. package/components/date-picker/DatePickerCalendar.js +27 -86
  222. package/components/date-picker/DatePickerCalendar.js.map +1 -1
  223. package/components/date-picker/DatePickerCalendarNavigator.d.ts +37 -0
  224. package/components/date-picker/DatePickerCalendarNavigator.js +162 -0
  225. package/components/date-picker/DatePickerCalendarNavigator.js.map +1 -0
  226. package/components/date-picker/DatePickerContext.d.ts +3 -0
  227. package/components/date-picker/DatePickerContext.js.map +1 -1
  228. package/components/date-picker/DatePickerDocs.js +6 -1
  229. package/components/date-picker/DatePickerDocs.js.map +1 -1
  230. package/components/date-picker/DatePickerFooter.js +20 -17
  231. package/components/date-picker/DatePickerFooter.js.map +1 -1
  232. package/components/date-picker/DatePickerProvider.js +7 -0
  233. package/components/date-picker/DatePickerProvider.js.map +1 -1
  234. package/components/date-picker/DatePickerRange.js +2 -28
  235. package/components/date-picker/DatePickerRange.js.map +1 -1
  236. package/components/date-picker/hooks/useSubmittedDates.d.ts +7 -0
  237. package/components/date-picker/hooks/useSubmittedDates.js +14 -0
  238. package/components/date-picker/hooks/useSubmittedDates.js.map +1 -0
  239. package/components/date-picker/style/dnb-date-picker.css +1 -1
  240. package/components/date-picker/style/dnb-date-picker.min.css +1 -1
  241. package/components/date-picker/style/dnb-date-picker.scss +1 -1
  242. package/components/date-picker/style/themes/dnb-date-picker-theme-ui.css +17 -0
  243. package/components/date-picker/style/themes/dnb-date-picker-theme-ui.min.css +1 -1
  244. package/components/date-picker/style/themes/dnb-date-picker-theme-ui.scss +19 -0
  245. package/components/drawer/Drawer.js +1 -0
  246. package/components/drawer/Drawer.js.map +1 -1
  247. package/components/dropdown/Dropdown.js +6 -4
  248. package/components/dropdown/Dropdown.js.map +1 -1
  249. package/components/dropdown/DropdownDocs.d.ts +179 -3
  250. package/components/dropdown/DropdownDocs.js.map +1 -1
  251. package/components/heading/HeadingHelpers.js +9 -5
  252. package/components/heading/HeadingHelpers.js.map +1 -1
  253. package/components/icon/Icon.d.ts +2 -2
  254. package/components/input-masked/InputMaskedDocs.js +1 -1
  255. package/components/input-masked/InputMaskedDocs.js.map +1 -1
  256. package/components/input-masked/InputMaskedHooks.d.ts +1 -0
  257. package/components/input-masked/InputMaskedHooks.js +39 -7
  258. package/components/input-masked/InputMaskedHooks.js.map +1 -1
  259. package/components/input-masked/InputMaskedUtils.js +6 -5
  260. package/components/input-masked/InputMaskedUtils.js.map +1 -1
  261. package/components/number-format/NumberUtils.js +5 -4
  262. package/components/number-format/NumberUtils.js.map +1 -1
  263. package/components/switch/SwitchDocs.js +2 -2
  264. package/components/switch/SwitchDocs.js.map +1 -1
  265. package/es/components/autocomplete/Autocomplete.js +6 -3
  266. package/es/components/autocomplete/Autocomplete.js.map +1 -1
  267. package/es/components/autocomplete/AutocompleteDocs.d.ts +289 -3
  268. package/es/components/autocomplete/AutocompleteDocs.js +1 -1
  269. package/es/components/autocomplete/AutocompleteDocs.js.map +1 -1
  270. package/es/components/button/style/dnb-button.css +1 -0
  271. package/es/components/button/style/dnb-button.min.css +1 -1
  272. package/es/components/button/style/dnb-button.scss +1 -0
  273. package/es/components/checkbox/Checkbox.d.ts +9 -1
  274. package/es/components/checkbox/Checkbox.js +60 -35
  275. package/es/components/checkbox/Checkbox.js.map +1 -1
  276. package/es/components/checkbox/CheckboxDocs.js +6 -1
  277. package/es/components/checkbox/CheckboxDocs.js.map +1 -1
  278. package/es/components/date-picker/DatePicker.d.ts +4 -0
  279. package/es/components/date-picker/DatePicker.js +4 -3
  280. package/es/components/date-picker/DatePicker.js.map +1 -1
  281. package/es/components/date-picker/DatePickerCalendar.d.ts +2 -16
  282. package/es/components/date-picker/DatePickerCalendar.js +23 -80
  283. package/es/components/date-picker/DatePickerCalendar.js.map +1 -1
  284. package/es/components/date-picker/DatePickerCalendarNavigator.d.ts +37 -0
  285. package/es/components/date-picker/DatePickerCalendarNavigator.js +158 -0
  286. package/es/components/date-picker/DatePickerCalendarNavigator.js.map +1 -0
  287. package/es/components/date-picker/DatePickerContext.d.ts +3 -0
  288. package/es/components/date-picker/DatePickerContext.js.map +1 -1
  289. package/es/components/date-picker/DatePickerDocs.js +6 -1
  290. package/es/components/date-picker/DatePickerDocs.js.map +1 -1
  291. package/es/components/date-picker/DatePickerFooter.js +20 -17
  292. package/es/components/date-picker/DatePickerFooter.js.map +1 -1
  293. package/es/components/date-picker/DatePickerProvider.js +7 -0
  294. package/es/components/date-picker/DatePickerProvider.js.map +1 -1
  295. package/es/components/date-picker/DatePickerRange.js +2 -27
  296. package/es/components/date-picker/DatePickerRange.js.map +1 -1
  297. package/es/components/date-picker/hooks/useSubmittedDates.d.ts +7 -0
  298. package/es/components/date-picker/hooks/useSubmittedDates.js +14 -0
  299. package/es/components/date-picker/hooks/useSubmittedDates.js.map +1 -0
  300. package/es/components/date-picker/style/dnb-date-picker.css +1 -1
  301. package/es/components/date-picker/style/dnb-date-picker.min.css +1 -1
  302. package/es/components/date-picker/style/dnb-date-picker.scss +1 -1
  303. package/es/components/date-picker/style/themes/dnb-date-picker-theme-ui.css +17 -0
  304. package/es/components/date-picker/style/themes/dnb-date-picker-theme-ui.min.css +1 -1
  305. package/es/components/date-picker/style/themes/dnb-date-picker-theme-ui.scss +19 -0
  306. package/es/components/drawer/Drawer.js +1 -0
  307. package/es/components/drawer/Drawer.js.map +1 -1
  308. package/es/components/dropdown/Dropdown.js +6 -4
  309. package/es/components/dropdown/Dropdown.js.map +1 -1
  310. package/es/components/dropdown/DropdownDocs.d.ts +179 -3
  311. package/es/components/dropdown/DropdownDocs.js.map +1 -1
  312. package/es/components/heading/HeadingHelpers.js +9 -5
  313. package/es/components/heading/HeadingHelpers.js.map +1 -1
  314. package/es/components/icon/Icon.d.ts +2 -2
  315. package/es/components/input-masked/InputMaskedDocs.js +1 -1
  316. package/es/components/input-masked/InputMaskedDocs.js.map +1 -1
  317. package/es/components/input-masked/InputMaskedHooks.d.ts +1 -0
  318. package/es/components/input-masked/InputMaskedHooks.js +39 -7
  319. package/es/components/input-masked/InputMaskedHooks.js.map +1 -1
  320. package/es/components/input-masked/InputMaskedUtils.js +6 -5
  321. package/es/components/input-masked/InputMaskedUtils.js.map +1 -1
  322. package/es/components/number-format/NumberUtils.js +5 -4
  323. package/es/components/number-format/NumberUtils.js.map +1 -1
  324. package/es/components/switch/SwitchDocs.js +2 -2
  325. package/es/components/switch/SwitchDocs.js.map +1 -1
  326. package/es/extensions/forms/DataContext/Context.d.ts +1 -1
  327. package/es/extensions/forms/DataContext/Context.js.map +1 -1
  328. package/es/extensions/forms/DataContext/Provider/Provider.js +9 -0
  329. package/es/extensions/forms/DataContext/Provider/Provider.js.map +1 -1
  330. package/es/extensions/forms/Field/Boolean/Boolean.d.ts +1 -0
  331. package/es/extensions/forms/Field/Boolean/Boolean.js.map +1 -1
  332. package/es/extensions/forms/Field/Boolean/BooleanDocs.d.ts +1 -0
  333. package/es/extensions/forms/Field/Boolean/BooleanDocs.js +7 -0
  334. package/es/extensions/forms/Field/Boolean/BooleanDocs.js.map +1 -1
  335. package/es/extensions/forms/Field/Date/Date.d.ts +1 -1
  336. package/es/extensions/forms/Field/Date/Date.js +1 -1
  337. package/es/extensions/forms/Field/Date/Date.js.map +1 -1
  338. package/es/extensions/forms/Field/Expiry/Expiry.js.map +1 -1
  339. package/es/extensions/forms/Field/Number/NumberDocs.js +1 -1
  340. package/es/extensions/forms/Field/Number/NumberDocs.js.map +1 -1
  341. package/es/extensions/forms/Field/Provider/useFieldProvider.d.ts +3 -3
  342. package/es/extensions/forms/Field/SelectCountry/SelectCountryDocs.js +3 -3
  343. package/es/extensions/forms/Field/SelectCountry/SelectCountryDocs.js.map +1 -1
  344. package/es/extensions/forms/Field/SelectCurrency/SelectCurrencyDocs.js +3 -3
  345. package/es/extensions/forms/Field/SelectCurrency/SelectCurrencyDocs.js.map +1 -1
  346. package/es/extensions/forms/Field/Selection/Selection.d.ts +2 -0
  347. package/es/extensions/forms/Field/Selection/Selection.js +9 -8
  348. package/es/extensions/forms/Field/Selection/Selection.js.map +1 -1
  349. package/es/extensions/forms/Field/Toggle/Toggle.d.ts +7 -0
  350. package/es/extensions/forms/Field/Toggle/Toggle.js +24 -6
  351. package/es/extensions/forms/Field/Toggle/Toggle.js.map +1 -1
  352. package/es/extensions/forms/Field/Toggle/ToggleDocs.d.ts +1 -0
  353. package/es/extensions/forms/Field/Toggle/ToggleDocs.js +7 -0
  354. package/es/extensions/forms/Field/Toggle/ToggleDocs.js.map +1 -1
  355. package/es/extensions/forms/Form/Isolation/IsolatedContainer.d.ts +4 -0
  356. package/es/extensions/forms/Form/Isolation/IsolatedContainer.js +53 -0
  357. package/es/extensions/forms/Form/Isolation/IsolatedContainer.js.map +1 -0
  358. package/es/extensions/forms/Form/Isolation/Isolation.d.ts +16 -0
  359. package/es/extensions/forms/Form/Isolation/Isolation.js +40 -14
  360. package/es/extensions/forms/Form/Isolation/Isolation.js.map +1 -1
  361. package/es/extensions/forms/Form/Isolation/IsolationCommitButton.js +1 -1
  362. package/es/extensions/forms/Form/Isolation/IsolationCommitButton.js.map +1 -1
  363. package/es/extensions/forms/Form/Isolation/IsolationContext.d.ts +12 -0
  364. package/es/extensions/forms/Form/Isolation/IsolationContext.js +6 -0
  365. package/es/extensions/forms/Form/Isolation/IsolationContext.js.map +1 -0
  366. package/es/extensions/forms/Form/Isolation/IsolationDataReference.d.ts +9 -0
  367. package/es/extensions/forms/Form/Isolation/IsolationDataReference.js +25 -0
  368. package/es/extensions/forms/Form/Isolation/IsolationDataReference.js.map +1 -0
  369. package/es/extensions/forms/Form/Isolation/IsolationDocs.js +15 -0
  370. package/es/extensions/forms/Form/Isolation/IsolationDocs.js.map +1 -1
  371. package/es/extensions/forms/Form/Isolation/IsolationResetButton.d.ts +7 -0
  372. package/es/extensions/forms/Form/Isolation/IsolationResetButton.js +99 -0
  373. package/es/extensions/forms/Form/Isolation/IsolationResetButton.js.map +1 -0
  374. package/es/extensions/forms/Form/Isolation/useDataContextSnapshot.d.ts +7 -0
  375. package/es/extensions/forms/Form/Isolation/useDataContextSnapshot.js +50 -0
  376. package/es/extensions/forms/Form/Isolation/useDataContextSnapshot.js.map +1 -0
  377. package/es/extensions/forms/Form/Isolation/useHandleStatus.d.ts +9 -0
  378. package/es/extensions/forms/Form/Isolation/useHandleStatus.js +48 -0
  379. package/es/extensions/forms/Form/Isolation/useHandleStatus.js.map +1 -0
  380. package/es/extensions/forms/{Iterate/EditContainer → Form/Isolation}/useHasContentChanged.js +12 -10
  381. package/es/extensions/forms/Form/Isolation/useHasContentChanged.js.map +1 -0
  382. package/es/extensions/forms/Form/Snapshot/Snapshot.d.ts +2 -1
  383. package/es/extensions/forms/Form/Snapshot/Snapshot.js.map +1 -1
  384. package/es/extensions/forms/Iterate/EditContainer/ResetButton.js +1 -1
  385. package/es/extensions/forms/Iterate/EditContainer/ResetButton.js.map +1 -1
  386. package/es/extensions/forms/Iterate/EditContainer/index.d.ts +1 -1
  387. package/es/extensions/forms/Iterate/EditContainer/index.js +1 -1
  388. package/es/extensions/forms/Iterate/EditContainer/index.js.map +1 -1
  389. package/es/extensions/forms/Iterate/PushContainer/PushContainer.d.ts +7 -0
  390. package/es/extensions/forms/Iterate/PushContainer/PushContainer.js +16 -55
  391. package/es/extensions/forms/Iterate/PushContainer/PushContainer.js.map +1 -1
  392. package/es/extensions/forms/Iterate/PushContainer/PushContainerDocs.js +2 -2
  393. package/es/extensions/forms/Iterate/PushContainer/PushContainerDocs.js.map +1 -1
  394. package/es/extensions/forms/constants/locales/en-GB.d.ts +1 -1
  395. package/es/extensions/forms/constants/locales/en-GB.js +3 -3
  396. package/es/extensions/forms/constants/locales/en-GB.js.map +1 -1
  397. package/es/extensions/forms/constants/locales/en-US.d.ts +1 -1
  398. package/es/extensions/forms/constants/locales/index.d.ts +2 -2
  399. package/es/extensions/forms/constants/locales/nb-NO.d.ts +1 -1
  400. package/es/extensions/forms/constants/locales/nb-NO.js +3 -3
  401. package/es/extensions/forms/constants/locales/nb-NO.js.map +1 -1
  402. package/es/extensions/forms/constants/locales/sv-SE.d.ts +1 -1
  403. package/es/extensions/forms/constants/locales/sv-SE.js +3 -3
  404. package/es/extensions/forms/constants/locales/sv-SE.js.map +1 -1
  405. package/es/extensions/forms/hooks/useDataContext.js +5 -3
  406. package/es/extensions/forms/hooks/useDataContext.js.map +1 -1
  407. package/es/extensions/forms/hooks/useSnapshot.js +18 -15
  408. package/es/extensions/forms/hooks/useSnapshot.js.map +1 -1
  409. package/es/fragments/drawer-list/DrawerList.d.ts +176 -224
  410. package/es/fragments/drawer-list/DrawerList.js +72 -173
  411. package/es/fragments/drawer-list/DrawerList.js.map +1 -1
  412. package/es/fragments/drawer-list/DrawerListContext.d.ts +27 -2
  413. package/es/fragments/drawer-list/DrawerListContext.js.map +1 -1
  414. package/es/fragments/drawer-list/DrawerListDocs.d.ts +211 -4
  415. package/es/fragments/drawer-list/DrawerListDocs.js +2 -2
  416. package/es/fragments/drawer-list/DrawerListDocs.js.map +1 -1
  417. package/es/fragments/drawer-list/DrawerListHelpers.d.ts +85 -89
  418. package/es/fragments/drawer-list/DrawerListHelpers.js +45 -54
  419. package/es/fragments/drawer-list/DrawerListHelpers.js.map +1 -1
  420. package/es/fragments/drawer-list/DrawerListItem.d.ts +30 -0
  421. package/es/fragments/drawer-list/DrawerListItem.js +90 -0
  422. package/es/fragments/drawer-list/DrawerListItem.js.map +1 -0
  423. package/es/fragments/drawer-list/DrawerListPortal.d.ts +20 -30
  424. package/es/fragments/drawer-list/DrawerListPortal.js +88 -120
  425. package/es/fragments/drawer-list/DrawerListPortal.js.map +1 -1
  426. package/es/fragments/drawer-list/DrawerListProvider.d.ts +217 -11
  427. package/es/fragments/drawer-list/DrawerListProvider.js +33 -19
  428. package/es/fragments/drawer-list/DrawerListProvider.js.map +1 -1
  429. package/es/shared/Eufemia.d.ts +1 -1
  430. package/es/shared/Eufemia.js +2 -2
  431. package/es/shared/Eufemia.js.map +1 -1
  432. package/es/shared/component-helper.d.ts +45 -48
  433. package/es/shared/component-helper.js +20 -183
  434. package/es/shared/component-helper.js.map +1 -1
  435. package/es/shared/helpers/withCamelCaseProps.d.ts +4 -5
  436. package/es/shared/helpers/withCamelCaseProps.js +7 -2
  437. package/es/shared/helpers/withCamelCaseProps.js.map +1 -1
  438. package/es/shared/legacy/component-helper-legacy.d.ts +19 -0
  439. package/es/shared/legacy/component-helper-legacy.js +180 -0
  440. package/es/shared/legacy/component-helper-legacy.js.map +1 -0
  441. package/es/shared/locales/en-GB.d.ts +1 -0
  442. package/es/shared/locales/en-GB.js +1 -0
  443. package/es/shared/locales/en-GB.js.map +1 -1
  444. package/es/shared/locales/en-US.js.map +1 -1
  445. package/es/shared/locales/index.d.ts +2 -0
  446. package/es/shared/locales/nb-NO.d.ts +1 -0
  447. package/es/shared/locales/nb-NO.js +2 -1
  448. package/es/shared/locales/nb-NO.js.map +1 -1
  449. package/es/shared/locales/sv-SE.d.ts +1 -0
  450. package/es/shared/locales/sv-SE.js +1 -0
  451. package/es/shared/locales/sv-SE.js.map +1 -1
  452. package/es/style/core/scopes.scss +1 -1
  453. package/es/style/dnb-ui-basis.css +1 -1
  454. package/es/style/dnb-ui-basis.min.css +1 -1
  455. package/es/style/dnb-ui-body.css +1 -1
  456. package/es/style/dnb-ui-body.min.css +1 -1
  457. package/es/style/dnb-ui-components.css +2 -1
  458. package/es/style/dnb-ui-components.min.css +1 -1
  459. package/es/style/dnb-ui-core.css +1 -1
  460. package/es/style/dnb-ui-core.min.css +1 -1
  461. package/es/style/themes/theme-eiendom/eiendom-theme-components.css +19 -1
  462. package/es/style/themes/theme-eiendom/eiendom-theme-components.min.css +2 -2
  463. package/es/style/themes/theme-sbanken/sbanken-theme-components.css +19 -1
  464. package/es/style/themes/theme-sbanken/sbanken-theme-components.min.css +2 -2
  465. package/es/style/themes/theme-ui/ui-theme-components.css +19 -1
  466. package/es/style/themes/theme-ui/ui-theme-components.min.css +2 -2
  467. package/esm/dnb-ui-basis.min.mjs +1 -1
  468. package/esm/dnb-ui-components.min.mjs +1 -1
  469. package/esm/dnb-ui-elements.min.mjs +1 -1
  470. package/esm/dnb-ui-extensions.min.mjs +2 -2
  471. package/esm/dnb-ui-lib.min.mjs +1 -1
  472. package/extensions/forms/DataContext/Context.d.ts +1 -1
  473. package/extensions/forms/DataContext/Context.js.map +1 -1
  474. package/extensions/forms/DataContext/Provider/Provider.js +9 -0
  475. package/extensions/forms/DataContext/Provider/Provider.js.map +1 -1
  476. package/extensions/forms/Field/Boolean/Boolean.d.ts +1 -0
  477. package/extensions/forms/Field/Boolean/Boolean.js.map +1 -1
  478. package/extensions/forms/Field/Boolean/BooleanDocs.d.ts +1 -0
  479. package/extensions/forms/Field/Boolean/BooleanDocs.js +7 -0
  480. package/extensions/forms/Field/Boolean/BooleanDocs.js.map +1 -1
  481. package/extensions/forms/Field/Date/Date.d.ts +1 -1
  482. package/extensions/forms/Field/Date/Date.js +1 -1
  483. package/extensions/forms/Field/Date/Date.js.map +1 -1
  484. package/extensions/forms/Field/Expiry/Expiry.js.map +1 -1
  485. package/extensions/forms/Field/Number/NumberDocs.js +1 -1
  486. package/extensions/forms/Field/Number/NumberDocs.js.map +1 -1
  487. package/extensions/forms/Field/Provider/useFieldProvider.d.ts +3 -3
  488. package/extensions/forms/Field/SelectCountry/SelectCountryDocs.js +3 -3
  489. package/extensions/forms/Field/SelectCountry/SelectCountryDocs.js.map +1 -1
  490. package/extensions/forms/Field/SelectCurrency/SelectCurrencyDocs.js +3 -3
  491. package/extensions/forms/Field/SelectCurrency/SelectCurrencyDocs.js.map +1 -1
  492. package/extensions/forms/Field/Selection/Selection.d.ts +2 -0
  493. package/extensions/forms/Field/Selection/Selection.js +10 -9
  494. package/extensions/forms/Field/Selection/Selection.js.map +1 -1
  495. package/extensions/forms/Field/Toggle/Toggle.d.ts +7 -0
  496. package/extensions/forms/Field/Toggle/Toggle.js +26 -9
  497. package/extensions/forms/Field/Toggle/Toggle.js.map +1 -1
  498. package/extensions/forms/Field/Toggle/ToggleDocs.d.ts +1 -0
  499. package/extensions/forms/Field/Toggle/ToggleDocs.js +7 -0
  500. package/extensions/forms/Field/Toggle/ToggleDocs.js.map +1 -1
  501. package/extensions/forms/Form/Isolation/IsolatedContainer.d.ts +4 -0
  502. package/extensions/forms/Form/Isolation/IsolatedContainer.js +54 -0
  503. package/extensions/forms/Form/Isolation/IsolatedContainer.js.map +1 -0
  504. package/extensions/forms/Form/Isolation/Isolation.d.ts +16 -0
  505. package/extensions/forms/Form/Isolation/Isolation.js +40 -15
  506. package/extensions/forms/Form/Isolation/Isolation.js.map +1 -1
  507. package/extensions/forms/Form/Isolation/IsolationCommitButton.js +1 -1
  508. package/extensions/forms/Form/Isolation/IsolationCommitButton.js.map +1 -1
  509. package/extensions/forms/Form/Isolation/IsolationContext.d.ts +12 -0
  510. package/extensions/forms/Form/Isolation/IsolationContext.js +6 -0
  511. package/extensions/forms/Form/Isolation/IsolationContext.js.map +1 -0
  512. package/extensions/forms/Form/Isolation/IsolationDataReference.d.ts +9 -0
  513. package/extensions/forms/Form/Isolation/IsolationDataReference.js +25 -0
  514. package/extensions/forms/Form/Isolation/IsolationDataReference.js.map +1 -0
  515. package/extensions/forms/Form/Isolation/IsolationDocs.js +15 -0
  516. package/extensions/forms/Form/Isolation/IsolationDocs.js.map +1 -1
  517. package/extensions/forms/Form/Isolation/IsolationResetButton.d.ts +7 -0
  518. package/extensions/forms/Form/Isolation/IsolationResetButton.js +100 -0
  519. package/extensions/forms/Form/Isolation/IsolationResetButton.js.map +1 -0
  520. package/extensions/forms/Form/Isolation/useDataContextSnapshot.d.ts +7 -0
  521. package/extensions/forms/Form/Isolation/useDataContextSnapshot.js +52 -0
  522. package/extensions/forms/Form/Isolation/useDataContextSnapshot.js.map +1 -0
  523. package/extensions/forms/Form/Isolation/useHandleStatus.d.ts +9 -0
  524. package/extensions/forms/Form/Isolation/useHandleStatus.js +51 -0
  525. package/extensions/forms/Form/Isolation/useHandleStatus.js.map +1 -0
  526. package/extensions/forms/{Iterate/EditContainer → Form/Isolation}/useHasContentChanged.js +12 -10
  527. package/extensions/forms/Form/Isolation/useHasContentChanged.js.map +1 -0
  528. package/extensions/forms/Form/Snapshot/Snapshot.d.ts +2 -1
  529. package/extensions/forms/Form/Snapshot/Snapshot.js.map +1 -1
  530. package/extensions/forms/Iterate/EditContainer/ResetButton.js +1 -1
  531. package/extensions/forms/Iterate/EditContainer/ResetButton.js.map +1 -1
  532. package/extensions/forms/Iterate/EditContainer/index.d.ts +1 -1
  533. package/extensions/forms/Iterate/EditContainer/index.js +1 -1
  534. package/extensions/forms/Iterate/EditContainer/index.js.map +1 -1
  535. package/extensions/forms/Iterate/PushContainer/PushContainer.d.ts +7 -0
  536. package/extensions/forms/Iterate/PushContainer/PushContainer.js +16 -57
  537. package/extensions/forms/Iterate/PushContainer/PushContainer.js.map +1 -1
  538. package/extensions/forms/Iterate/PushContainer/PushContainerDocs.js +2 -2
  539. package/extensions/forms/Iterate/PushContainer/PushContainerDocs.js.map +1 -1
  540. package/extensions/forms/constants/locales/en-GB.d.ts +1 -1
  541. package/extensions/forms/constants/locales/en-GB.js +3 -3
  542. package/extensions/forms/constants/locales/en-GB.js.map +1 -1
  543. package/extensions/forms/constants/locales/en-US.d.ts +1 -1
  544. package/extensions/forms/constants/locales/index.d.ts +2 -2
  545. package/extensions/forms/constants/locales/nb-NO.d.ts +1 -1
  546. package/extensions/forms/constants/locales/nb-NO.js +3 -3
  547. package/extensions/forms/constants/locales/nb-NO.js.map +1 -1
  548. package/extensions/forms/constants/locales/sv-SE.d.ts +1 -1
  549. package/extensions/forms/constants/locales/sv-SE.js +3 -3
  550. package/extensions/forms/constants/locales/sv-SE.js.map +1 -1
  551. package/extensions/forms/hooks/useDataContext.js +5 -3
  552. package/extensions/forms/hooks/useDataContext.js.map +1 -1
  553. package/extensions/forms/hooks/useSnapshot.js +18 -15
  554. package/extensions/forms/hooks/useSnapshot.js.map +1 -1
  555. package/fragments/drawer-list/DrawerList.d.ts +176 -224
  556. package/fragments/drawer-list/DrawerList.js +71 -175
  557. package/fragments/drawer-list/DrawerList.js.map +1 -1
  558. package/fragments/drawer-list/DrawerListContext.d.ts +27 -2
  559. package/fragments/drawer-list/DrawerListContext.js.map +1 -1
  560. package/fragments/drawer-list/DrawerListDocs.d.ts +211 -4
  561. package/fragments/drawer-list/DrawerListDocs.js +2 -2
  562. package/fragments/drawer-list/DrawerListDocs.js.map +1 -1
  563. package/fragments/drawer-list/DrawerListHelpers.d.ts +85 -89
  564. package/fragments/drawer-list/DrawerListHelpers.js +45 -53
  565. package/fragments/drawer-list/DrawerListHelpers.js.map +1 -1
  566. package/fragments/drawer-list/DrawerListItem.d.ts +30 -0
  567. package/fragments/drawer-list/DrawerListItem.js +91 -0
  568. package/fragments/drawer-list/DrawerListItem.js.map +1 -0
  569. package/fragments/drawer-list/DrawerListPortal.d.ts +20 -30
  570. package/fragments/drawer-list/DrawerListPortal.js +91 -121
  571. package/fragments/drawer-list/DrawerListPortal.js.map +1 -1
  572. package/fragments/drawer-list/DrawerListProvider.d.ts +217 -11
  573. package/fragments/drawer-list/DrawerListProvider.js +12 -19
  574. package/fragments/drawer-list/DrawerListProvider.js.map +1 -1
  575. package/package.json +1 -1
  576. package/shared/Eufemia.d.ts +1 -1
  577. package/shared/Eufemia.js +2 -2
  578. package/shared/Eufemia.js.map +1 -1
  579. package/shared/component-helper.d.ts +45 -48
  580. package/shared/component-helper.js +23 -189
  581. package/shared/component-helper.js.map +1 -1
  582. package/shared/helpers/withCamelCaseProps.d.ts +4 -5
  583. package/shared/helpers/withCamelCaseProps.js +7 -2
  584. package/shared/helpers/withCamelCaseProps.js.map +1 -1
  585. package/shared/legacy/component-helper-legacy.d.ts +19 -0
  586. package/shared/legacy/component-helper-legacy.js +185 -0
  587. package/shared/legacy/component-helper-legacy.js.map +1 -0
  588. package/shared/locales/en-GB.d.ts +1 -0
  589. package/shared/locales/en-GB.js +1 -0
  590. package/shared/locales/en-GB.js.map +1 -1
  591. package/shared/locales/en-US.js.map +1 -1
  592. package/shared/locales/index.d.ts +2 -0
  593. package/shared/locales/nb-NO.d.ts +1 -0
  594. package/shared/locales/nb-NO.js +2 -1
  595. package/shared/locales/nb-NO.js.map +1 -1
  596. package/shared/locales/sv-SE.d.ts +1 -0
  597. package/shared/locales/sv-SE.js +1 -0
  598. package/shared/locales/sv-SE.js.map +1 -1
  599. package/style/core/scopes.scss +1 -1
  600. package/style/dnb-ui-basis.css +1 -1
  601. package/style/dnb-ui-basis.min.css +1 -1
  602. package/style/dnb-ui-body.css +1 -1
  603. package/style/dnb-ui-body.min.css +1 -1
  604. package/style/dnb-ui-components.css +2 -1
  605. package/style/dnb-ui-components.min.css +1 -1
  606. package/style/dnb-ui-core.css +1 -1
  607. package/style/dnb-ui-core.min.css +1 -1
  608. package/style/themes/theme-eiendom/eiendom-theme-components.css +19 -1
  609. package/style/themes/theme-eiendom/eiendom-theme-components.min.css +2 -2
  610. package/style/themes/theme-sbanken/sbanken-theme-components.css +19 -1
  611. package/style/themes/theme-sbanken/sbanken-theme-components.min.css +2 -2
  612. package/style/themes/theme-ui/ui-theme-components.css +19 -1
  613. package/style/themes/theme-ui/ui-theme-components.min.css +2 -2
  614. package/umd/dnb-ui-basis.min.js +1 -1
  615. package/umd/dnb-ui-components.min.js +1 -1
  616. package/umd/dnb-ui-elements.min.js +1 -1
  617. package/umd/dnb-ui-extensions.min.js +1 -1
  618. package/umd/dnb-ui-lib.min.js +1 -1
  619. package/cjs/extensions/forms/Iterate/EditContainer/useHasContentChanged.js.map +0 -1
  620. package/es/extensions/forms/Iterate/EditContainer/useHasContentChanged.js.map +0 -1
  621. package/extensions/forms/Iterate/EditContainer/useHasContentChanged.js.map +0 -1
  622. /package/cjs/extensions/forms/{Iterate/EditContainer → Form/Isolation}/useHasContentChanged.d.ts +0 -0
  623. /package/es/extensions/forms/{Iterate/EditContainer → Form/Isolation}/useHasContentChanged.d.ts +0 -0
  624. /package/extensions/forms/{Iterate/EditContainer → Form/Isolation}/useHasContentChanged.d.ts +0 -0
@@ -1,3 +1,289 @@
1
- import { PropertiesTableProps } from '../../shared/types';
2
- export declare const autocompleteProperties: PropertiesTableProps;
3
- export declare const AutocompleteEvents: PropertiesTableProps;
1
+ export declare const AutocompleteProperties: {
2
+ mode: {
3
+ doc: string;
4
+ type: string;
5
+ status: "optional";
6
+ };
7
+ input_value: {
8
+ doc: string;
9
+ type: string;
10
+ status: "optional";
11
+ };
12
+ placeholder: {
13
+ doc: string;
14
+ type: string;
15
+ status: "optional";
16
+ };
17
+ title: {
18
+ doc: string;
19
+ type: string;
20
+ status: "optional";
21
+ };
22
+ disable_filter: {
23
+ doc: string;
24
+ type: string;
25
+ status: "optional";
26
+ };
27
+ disable_highlighting: {
28
+ doc: string;
29
+ type: string;
30
+ status: "optional";
31
+ };
32
+ disable_reorder: {
33
+ doc: string;
34
+ type: string;
35
+ status: "optional";
36
+ };
37
+ search_numbers: {
38
+ doc: string;
39
+ type: string;
40
+ status: "optional";
41
+ };
42
+ search_in_word_index: {
43
+ doc: string;
44
+ type: string;
45
+ status: "optional";
46
+ };
47
+ keep_value: {
48
+ doc: string;
49
+ type: string;
50
+ status: "optional";
51
+ };
52
+ keep_selection: {
53
+ doc: string;
54
+ type: string;
55
+ status: "optional";
56
+ };
57
+ keep_value_and_selection: {
58
+ doc: string;
59
+ type: string;
60
+ status: "optional";
61
+ };
62
+ prevent_selection: {
63
+ doc: string;
64
+ type: string;
65
+ status: "optional";
66
+ };
67
+ show_clear_button: {
68
+ doc: string;
69
+ type: string;
70
+ status: "optional";
71
+ };
72
+ icon: {
73
+ doc: string;
74
+ type: string[];
75
+ status: "optional";
76
+ };
77
+ icon_size: {
78
+ doc: string;
79
+ type: string;
80
+ status: "optional";
81
+ };
82
+ icon_position: {
83
+ doc: string;
84
+ type: string;
85
+ status: "optional";
86
+ };
87
+ input_icon: {
88
+ doc: string;
89
+ type: string[];
90
+ status: "optional";
91
+ };
92
+ triangle_position: {
93
+ doc: string;
94
+ type: string;
95
+ status: "optional";
96
+ };
97
+ size: {
98
+ doc: string;
99
+ type: string;
100
+ status: "optional";
101
+ };
102
+ drawer_class: {
103
+ doc: string;
104
+ type: string;
105
+ status: "optional";
106
+ };
107
+ show_submit_button: {
108
+ doc: string;
109
+ type: string;
110
+ status: "optional";
111
+ };
112
+ align_autocomplete: {
113
+ doc: string;
114
+ type: string;
115
+ status: "optional";
116
+ };
117
+ no_options: {
118
+ doc: string;
119
+ type: string;
120
+ status: "optional";
121
+ };
122
+ aria_live_options: {
123
+ doc: string;
124
+ type: string;
125
+ status: "optional";
126
+ };
127
+ show_all: {
128
+ doc: string;
129
+ type: string;
130
+ status: "optional";
131
+ };
132
+ indicator_label: {
133
+ doc: string;
134
+ type: string;
135
+ status: "optional";
136
+ };
137
+ show_options_sr: {
138
+ doc: string;
139
+ type: string;
140
+ status: "optional";
141
+ };
142
+ selected_sr: {
143
+ doc: string;
144
+ type: string;
145
+ status: "optional";
146
+ };
147
+ selectall: {
148
+ doc: string;
149
+ type: string;
150
+ status: "optional";
151
+ };
152
+ submit_button_title: {
153
+ doc: string;
154
+ type: string;
155
+ status: "optional";
156
+ };
157
+ submit_button_icon: {
158
+ doc: string;
159
+ type: string[];
160
+ status: "optional";
161
+ };
162
+ submit_element: {
163
+ doc: string;
164
+ type: string;
165
+ status: "optional";
166
+ };
167
+ opened: {
168
+ doc: string;
169
+ type: string;
170
+ status: "optional";
171
+ };
172
+ open_on_focus: {
173
+ doc: string;
174
+ type: string;
175
+ status: "optional";
176
+ };
177
+ stretch: {
178
+ doc: string;
179
+ type: string;
180
+ status: "optional";
181
+ };
182
+ skip_portal: {
183
+ doc: string;
184
+ type: string;
185
+ status: "optional";
186
+ };
187
+ status: {
188
+ doc: string;
189
+ type: string[];
190
+ status: "optional";
191
+ };
192
+ status_state: {
193
+ doc: string;
194
+ type: string[];
195
+ status: "optional";
196
+ };
197
+ status_props: {
198
+ doc: string;
199
+ type: string;
200
+ status: "optional";
201
+ };
202
+ globalStatus: {
203
+ doc: string;
204
+ type: string;
205
+ status: "optional";
206
+ };
207
+ label: {
208
+ doc: string;
209
+ type: string;
210
+ status: "optional";
211
+ };
212
+ label_direction: {
213
+ doc: string;
214
+ type: string;
215
+ status: "optional";
216
+ };
217
+ label_sr_only: {
218
+ doc: string;
219
+ type: string;
220
+ status: "optional";
221
+ };
222
+ suffix: {
223
+ doc: string;
224
+ type: string;
225
+ status: "optional";
226
+ };
227
+ skeleton: {
228
+ doc: string;
229
+ type: string;
230
+ status: "optional";
231
+ };
232
+ input_ref: {
233
+ doc: string;
234
+ type: string;
235
+ status: "optional";
236
+ };
237
+ input_element: {
238
+ doc: string;
239
+ type: string[];
240
+ status: "optional";
241
+ };
242
+ '[DrawerList](/uilib/components/fragments/drawer-list/properties)': {
243
+ doc: string;
244
+ type: string;
245
+ status: "optional";
246
+ };
247
+ '[Space](/uilib/layout/space/properties)': {
248
+ doc: string;
249
+ type: string[];
250
+ status: "optional";
251
+ };
252
+ };
253
+ export declare const AutocompleteEvents: {
254
+ on_type: {
255
+ doc: string;
256
+ type: string;
257
+ status: "optional";
258
+ };
259
+ on_focus: {
260
+ doc: string;
261
+ type: string;
262
+ status: "optional";
263
+ };
264
+ on_blur: {
265
+ doc: string;
266
+ type: string;
267
+ status: "optional";
268
+ };
269
+ on_change: {
270
+ doc: string;
271
+ type: string;
272
+ status: "optional";
273
+ };
274
+ on_select: {
275
+ doc: string;
276
+ type: string;
277
+ status: "optional";
278
+ };
279
+ on_show: {
280
+ doc: string;
281
+ type: string;
282
+ status: "optional";
283
+ };
284
+ on_hide: {
285
+ doc: string;
286
+ type: string;
287
+ status: "optional";
288
+ };
289
+ };
@@ -1,4 +1,4 @@
1
- export const autocompleteProperties = {
1
+ export const AutocompleteProperties = {
2
2
  mode: {
3
3
  doc: 'If set to `async`, it prevents showing the "no options" message during typing / filtering. Defaults to `sync`.',
4
4
  type: 'string',
@@ -1 +1 @@
1
- {"version":3,"file":"AutocompleteDocs.js","names":["autocompleteProperties","mode","doc","type","status","input_value","placeholder","title","disable_filter","disable_highlighting","disable_reorder","search_numbers","search_in_word_index","keep_value","keep_selection","keep_value_and_selection","prevent_selection","show_clear_button","icon","icon_size","icon_position","input_icon","triangle_position","size","drawer_class","show_submit_button","align_autocomplete","no_options","aria_live_options","show_all","indicator_label","show_options_sr","selected_sr","selectall","submit_button_title","submit_button_icon","submit_element","opened","open_on_focus","stretch","skip_portal","status_state","status_props","globalStatus","label","label_direction","label_sr_only","suffix","skeleton","input_ref","input_element","AutocompleteEvents","on_type","on_focus","on_blur","on_change","on_select","on_show","on_hide"],"sources":["../../../../src/components/autocomplete/AutocompleteDocs.ts"],"sourcesContent":["import { PropertiesTableProps } from '../../shared/types'\n\nexport const autocompleteProperties: PropertiesTableProps = {\n mode: {\n doc: 'If set to `async`, it prevents showing the \"no options\" message during typing / filtering. Defaults to `sync`.',\n type: 'string',\n status: 'optional',\n },\n input_value: {\n doc: 'Lets you define a custom input value.',\n type: 'string',\n status: 'optional',\n },\n placeholder: {\n doc: 'Use this to define the pre-filled placeholder text in the input. Defaults to `title=\"Skriv og velg\"`.',\n type: 'string',\n status: 'optional',\n },\n title: {\n doc: 'Give a title to let the user know what they have to do. Defaults to `Skriv og få alternativer`.',\n type: 'React.Node',\n status: 'optional',\n },\n disable_filter: {\n doc: 'If set to `true`, word highlighting will still be active, but no options will be filtered out. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n disable_highlighting: {\n doc: 'If set to `true`, word highlighting will be disabled, but the options will still get filtered. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n disable_reorder: {\n doc: 'If set to `true`, reordering of search results will be disabled. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n search_numbers: {\n doc: 'If set to `true` and `search_in_word_index` is not set, the user will be able to more easily search and filter e.g. bank account numbers. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n search_in_word_index: {\n doc: 'This gives you the possibility to change the threshold number, which defines from what word on we search \"inside words\". Defaults to `3`.',\n type: 'boolean',\n status: 'optional',\n },\n keep_value: {\n doc: 'Use `true` to not remove the typed value on input blur, if it is invalid. By default, the typed value will disappear / replaced by a selected value from the data list during the input field blur. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n keep_selection: {\n doc: 'Use `true` to not remove selected item on input blur, when the input value is empty. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n keep_value_and_selection: {\n doc: 'Like `keep_value` – but would not reset to the selected value during input field blur. Also, the selected value would still be kept. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n prevent_selection: {\n doc: 'If set to `true`, no permanent selection will be made. Also, the typed value will not disappear on input blur (like `keep_value`). Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n show_clear_button: {\n doc: 'If set to `true`, a clear button is shown inside the input field. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n icon: {\n doc: 'To be included in the autocomplete input.',\n type: ['string', 'React.Node'],\n status: 'optional',\n },\n icon_size: {\n doc: 'Change the size of the icon pragmatically.',\n type: 'string',\n status: 'optional',\n },\n icon_position: {\n doc: 'Position of the icon inside the autocomplete. Set to `left` or `right`. Defaults to `left`.',\n type: 'string',\n status: 'optional',\n },\n input_icon: {\n doc: 'Same as `icon`.',\n type: ['string', 'React.Node'],\n status: 'optional',\n },\n triangle_position: {\n doc: 'Position of icon arrow / triangle the drawer. Set to `left` or `right`. Defaults to `left`.',\n type: 'string',\n status: 'optional',\n },\n size: {\n doc: 'Define the height of the Autocomplete. Can be set to `small`, `default`, `medium` and `large`. Defaults to `default`.',\n type: 'string',\n status: 'optional',\n },\n drawer_class: {\n doc: 'Define a custom class for the internal drawer-list. This makes it possible more easily customize the drawer-list style with styled-components and the `css` style method. Defaults to `null`.',\n type: 'string',\n status: 'optional',\n },\n show_submit_button: {\n doc: 'Use `true` to show a Autocomplete button to toggle the [DrawerList](/uilib/components/fragments/drawer-list). Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n align_autocomplete: {\n doc: 'Use `right` to change the options alignment direction. Defaults to `left`.',\n type: 'string',\n status: 'optional',\n },\n no_options: {\n doc: 'Text show in the \"no options\" item. Defaults to `Ingen alternativer`.',\n type: 'boolean',\n status: 'optional',\n },\n aria_live_options: {\n doc: 'Text read out by screen readers. This way users with screen readers know how many options they got during typing. Defaults to `%s alternativer`.',\n type: 'React.Node',\n status: 'optional',\n },\n show_all: {\n doc: 'Text that lets a user unravel all the available options. Defaults to `Vis alt`.',\n type: 'boolean',\n status: 'optional',\n },\n indicator_label: {\n doc: 'Text show on indicator \"options\" item. Defaults to `Henter data ...`.',\n type: 'React.Node',\n status: 'optional',\n },\n show_options_sr: {\n doc: 'Only for screen readers. Title of the button to show the suggestions / options. It is always present and when activating, it opens the DrawerList and sets the focus on it. Defaults to `Bla gjennom alternativer`.',\n type: 'string',\n status: 'optional',\n },\n selected_sr: {\n doc: 'Only for screen readers (VoiceOver). The label used to announce the selected item. Defaults to `Valgt:`.',\n type: 'string',\n status: 'optional',\n },\n selectall: {\n doc: 'If set to `true`, then the whole input value gets selected on the entry focus. A second click will place the cursor on the wanted position.',\n type: 'boolean',\n status: 'optional',\n },\n submit_button_title: {\n doc: 'Title on submit button. Defaults to `Vis alternativer`.',\n type: 'React.Node',\n status: 'optional',\n },\n submit_button_icon: {\n doc: 'The icon used in the submit button. Defaults to `chevron_down`.',\n type: ['string', 'React.Element'],\n status: 'optional',\n },\n submit_element: {\n doc: 'Replace the dropdown / submit button with a custom React element. Defaults to the input SubmitButton `import { SubmitButton } from '@dnb/eufemia/components/input/Input'`.',\n type: 'React.Node',\n status: 'optional',\n },\n opened: {\n doc: 'If set to `true`, the Autocomplete will be rendered initially with a visible and accessible data list / options.',\n type: 'boolean',\n status: 'optional',\n },\n open_on_focus: {\n doc: 'Use `true` to auto open the list once the user is entering the input field with the keyboard.',\n type: 'boolean',\n status: 'optional',\n },\n stretch: {\n doc: 'If set to `true`, then the autocomplete will be 100% in available `width`.',\n type: 'boolean',\n status: 'optional',\n },\n skip_portal: {\n doc: 'Set to `true` to disable the React Portal behavior. Defaults to `false`.',\n type: 'string',\n status: 'optional',\n },\n status: {\n doc: 'Text with a status message. The style defaults to an error message. You can use `true` to only get the status color, without a message.',\n type: ['error', 'info', 'boolean'],\n status: 'optional',\n },\n status_state: {\n doc: 'Defines the state of the status. Currently, there are two statuses `[error, info]`. Defaults to `error`.',\n type: ['error', 'info'],\n status: 'optional',\n },\n status_props: {\n doc: 'Use an object to define additional FormStatus properties.',\n type: 'object',\n status: 'optional',\n },\n globalStatus: {\n doc: 'The [configuration](/uilib/components/global-status/properties/#configuration-object) used for the target [GlobalStatus](/uilib/components/global-status).',\n type: 'object',\n status: 'optional',\n },\n label: {\n doc: 'Prepends the Form Label component. If no ID is provided, a random ID is created.',\n type: 'React.Node',\n status: 'optional',\n },\n label_direction: {\n doc: 'Use `label_direction=\"vertical\"` to change the label layout direction. Defaults to `horizontal`.',\n type: 'React.Node',\n status: 'optional',\n },\n label_sr_only: {\n doc: 'Use `true` to make the label only readable by screen readers.',\n type: 'boolean',\n status: 'optional',\n },\n suffix: {\n doc: 'Text describing the content of the Autocomplete more than the label. You can also send in a React component, so it gets wrapped inside the Autocomplete component.',\n type: 'React.Node',\n status: 'optional',\n },\n skeleton: {\n doc: 'If set to `true`, an overlaying skeleton with animation will be shown.',\n type: 'boolean',\n status: 'optional',\n },\n input_ref: {\n doc: 'Use a React.Ref to get access to the `input` DOM element.',\n type: 'React.RefObject',\n status: 'optional',\n },\n input_element: {\n doc: 'Lets you provide a custom React element as the input HTML element.',\n type: ['string', 'React.Element'],\n status: 'optional',\n },\n '[DrawerList](/uilib/components/fragments/drawer-list/properties)': {\n doc: 'all DrawerList properties.',\n type: 'Various',\n status: 'optional',\n },\n '[Space](/uilib/layout/space/properties)': {\n doc: 'Spacing properties like `top` or `bottom` are supported.',\n type: ['string', 'object'],\n status: 'optional',\n },\n}\n\nexport const AutocompleteEvents: PropertiesTableProps = {\n on_type: {\n doc: 'Will be called for every key change the users makes. Returns an object with the input `value` inside `{ value, event, attributes }` including [these methods](/uilib/components/autocomplete/events#dynamically-change-data)',\n type: 'function',\n status: 'optional',\n },\n on_focus: {\n doc: 'Will be called on user generated focus action. Returns an object with the input `value` inside `{ value, event, attributes }` including [these methods](/uilib/components/autocomplete/events#dynamically-change-data).',\n type: 'function',\n status: 'optional',\n },\n on_blur: {\n doc: 'Will be called on user generated blur action. Returns an object with the input `value` inside `{ value, event, attributes }` including [these methods](/uilib/components/autocomplete/events#dynamically-change-data).',\n type: 'function',\n status: 'optional',\n },\n on_change: {\n doc: 'Will be called on state changes made by the user. Returns an object with the new selected `data` item `{ data, event, attributes, value }` including [these methods](/uilib/components/autocomplete/events#dynamically-change-data).',\n type: 'function',\n status: 'optional',\n },\n on_select: {\n doc: 'Will be called once the users focuses or selects an item by a click or keyboard navigation. Returns an object with the new selected `data` item `{ data, event, attributes, value, active_item }` including [these methods](/uilib/components/autocomplete/events#dynamically-change-data). The \"active_item\" property is the currently selected item by keyboard navigation',\n type: 'function',\n status: 'optional',\n },\n on_show: {\n doc: 'Will be called once the user presses the autocomplete. Returns the data item `{ data, attributes }`.',\n type: 'function',\n status: 'optional',\n },\n on_hide: {\n doc: 'Will be called once the user presses the autocomplete again, or clicks somewhere else. Returns the data item `{ data, attributes }`.',\n type: 'function',\n status: 'optional',\n },\n}\n"],"mappings":"AAEA,OAAO,MAAMA,sBAA4C,GAAG;EAC1DC,IAAI,EAAE;IACJC,GAAG,EAAE,gHAAgH;IACrHC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDC,WAAW,EAAE;IACXH,GAAG,EAAE,uCAAuC;IAC5CC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDE,WAAW,EAAE;IACXJ,GAAG,EAAE,uGAAuG;IAC5GC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDG,KAAK,EAAE;IACLL,GAAG,EAAE,iGAAiG;IACtGC,IAAI,EAAE,YAAY;IAClBC,MAAM,EAAE;EACV,CAAC;EACDI,cAAc,EAAE;IACdN,GAAG,EAAE,qHAAqH;IAC1HC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDK,oBAAoB,EAAE;IACpBP,GAAG,EAAE,qHAAqH;IAC1HC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDM,eAAe,EAAE;IACfR,GAAG,EAAE,uFAAuF;IAC5FC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDO,cAAc,EAAE;IACdT,GAAG,EAAE,gKAAgK;IACrKC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDQ,oBAAoB,EAAE;IACpBV,GAAG,EAAE,2IAA2I;IAChJC,IAAI,EAAE,SAAS;IACfC,M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ACnXC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDqD,OAAO,EAAE;IACPvD,GAAG,EAAE,sGAAsG;IAC3GC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDsD,OAAO,EAAE;IACPxD,GAAG,EAAE,sIAAsI;IAC3IC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"AutocompleteDocs.js","names":["AutocompleteProperties","mode","doc","type","status","input_value","placeholder","title","disable_filter","disable_highlighting","disable_reorder","search_numbers","search_in_word_index","keep_value","keep_selection","keep_value_and_selection","prevent_selection","show_clear_button","icon","icon_size","icon_position","input_icon","triangle_position","size","drawer_class","show_submit_button","align_autocomplete","no_options","aria_live_options","show_all","indicator_label","show_options_sr","selected_sr","selectall","submit_button_title","submit_button_icon","submit_element","opened","open_on_focus","stretch","skip_portal","status_state","status_props","globalStatus","label","label_direction","label_sr_only","suffix","skeleton","input_ref","input_element","AutocompleteEvents","on_type","on_focus","on_blur","on_change","on_select","on_show","on_hide"],"sources":["../../../../src/components/autocomplete/AutocompleteDocs.ts"],"sourcesContent":["import { PropertiesTableProps } from '../../shared/types'\n\nexport const AutocompleteProperties = {\n mode: {\n doc: 'If set to `async`, it prevents showing the \"no options\" message during typing / filtering. Defaults to `sync`.',\n type: 'string',\n status: 'optional',\n },\n input_value: {\n doc: 'Lets you define a custom input value.',\n type: 'string',\n status: 'optional',\n },\n placeholder: {\n doc: 'Use this to define the pre-filled placeholder text in the input. Defaults to `title=\"Skriv og velg\"`.',\n type: 'string',\n status: 'optional',\n },\n title: {\n doc: 'Give a title to let the user know what they have to do. Defaults to `Skriv og få alternativer`.',\n type: 'React.Node',\n status: 'optional',\n },\n disable_filter: {\n doc: 'If set to `true`, word highlighting will still be active, but no options will be filtered out. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n disable_highlighting: {\n doc: 'If set to `true`, word highlighting will be disabled, but the options will still get filtered. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n disable_reorder: {\n doc: 'If set to `true`, reordering of search results will be disabled. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n search_numbers: {\n doc: 'If set to `true` and `search_in_word_index` is not set, the user will be able to more easily search and filter e.g. bank account numbers. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n search_in_word_index: {\n doc: 'This gives you the possibility to change the threshold number, which defines from what word on we search \"inside words\". Defaults to `3`.',\n type: 'boolean',\n status: 'optional',\n },\n keep_value: {\n doc: 'Use `true` to not remove the typed value on input blur, if it is invalid. By default, the typed value will disappear / replaced by a selected value from the data list during the input field blur. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n keep_selection: {\n doc: 'Use `true` to not remove selected item on input blur, when the input value is empty. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n keep_value_and_selection: {\n doc: 'Like `keep_value` – but would not reset to the selected value during input field blur. Also, the selected value would still be kept. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n prevent_selection: {\n doc: 'If set to `true`, no permanent selection will be made. Also, the typed value will not disappear on input blur (like `keep_value`). Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n show_clear_button: {\n doc: 'If set to `true`, a clear button is shown inside the input field. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n icon: {\n doc: 'To be included in the autocomplete input.',\n type: ['string', 'React.Node'],\n status: 'optional',\n },\n icon_size: {\n doc: 'Change the size of the icon pragmatically.',\n type: 'string',\n status: 'optional',\n },\n icon_position: {\n doc: 'Position of the icon inside the autocomplete. Set to `left` or `right`. Defaults to `left`.',\n type: 'string',\n status: 'optional',\n },\n input_icon: {\n doc: 'Same as `icon`.',\n type: ['string', 'React.Node'],\n status: 'optional',\n },\n triangle_position: {\n doc: 'Position of icon arrow / triangle the drawer. Set to `left` or `right`. Defaults to `left`.',\n type: 'string',\n status: 'optional',\n },\n size: {\n doc: 'Define the height of the Autocomplete. Can be set to `small`, `default`, `medium` and `large`. Defaults to `default`.',\n type: 'string',\n status: 'optional',\n },\n drawer_class: {\n doc: 'Define a custom class for the internal drawer-list. This makes it possible more easily customize the drawer-list style with styled-components and the `css` style method. Defaults to `null`.',\n type: 'string',\n status: 'optional',\n },\n show_submit_button: {\n doc: 'Use `true` to show a Autocomplete button to toggle the [DrawerList](/uilib/components/fragments/drawer-list). Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n align_autocomplete: {\n doc: 'Use `right` to change the options alignment direction. Defaults to `left`.',\n type: 'string',\n status: 'optional',\n },\n no_options: {\n doc: 'Text show in the \"no options\" item. Defaults to `Ingen alternativer`.',\n type: 'boolean',\n status: 'optional',\n },\n aria_live_options: {\n doc: 'Text read out by screen readers. This way users with screen readers know how many options they got during typing. Defaults to `%s alternativer`.',\n type: 'React.Node',\n status: 'optional',\n },\n show_all: {\n doc: 'Text that lets a user unravel all the available options. Defaults to `Vis alt`.',\n type: 'boolean',\n status: 'optional',\n },\n indicator_label: {\n doc: 'Text show on indicator \"options\" item. Defaults to `Henter data ...`.',\n type: 'React.Node',\n status: 'optional',\n },\n show_options_sr: {\n doc: 'Only for screen readers. Title of the button to show the suggestions / options. It is always present and when activating, it opens the DrawerList and sets the focus on it. Defaults to `Bla gjennom alternativer`.',\n type: 'string',\n status: 'optional',\n },\n selected_sr: {\n doc: 'Only for screen readers (VoiceOver). The label used to announce the selected item. Defaults to `Valgt:`.',\n type: 'string',\n status: 'optional',\n },\n selectall: {\n doc: 'If set to `true`, then the whole input value gets selected on the entry focus. A second click will place the cursor on the wanted position.',\n type: 'boolean',\n status: 'optional',\n },\n submit_button_title: {\n doc: 'Title on submit button. Defaults to `Vis alternativer`.',\n type: 'React.Node',\n status: 'optional',\n },\n submit_button_icon: {\n doc: 'The icon used in the submit button. Defaults to `chevron_down`.',\n type: ['string', 'React.Element'],\n status: 'optional',\n },\n submit_element: {\n doc: 'Replace the dropdown / submit button with a custom React element. Defaults to the input SubmitButton `import { SubmitButton } from '@dnb/eufemia/components/input/Input'`.',\n type: 'React.Node',\n status: 'optional',\n },\n opened: {\n doc: 'If set to `true`, the Autocomplete will be rendered initially with a visible and accessible data list / options.',\n type: 'boolean',\n status: 'optional',\n },\n open_on_focus: {\n doc: 'Use `true` to auto open the list once the user is entering the input field with the keyboard.',\n type: 'boolean',\n status: 'optional',\n },\n stretch: {\n doc: 'If set to `true`, then the autocomplete will be 100% in available `width`.',\n type: 'boolean',\n status: 'optional',\n },\n skip_portal: {\n doc: 'Set to `true` to disable the React Portal behavior. Defaults to `false`.',\n type: 'string',\n status: 'optional',\n },\n status: {\n doc: 'Text with a status message. The style defaults to an error message. You can use `true` to only get the status color, without a message.',\n type: ['error', 'info', 'boolean'],\n status: 'optional',\n },\n status_state: {\n doc: 'Defines the state of the status. Currently, there are two statuses `[error, info]`. Defaults to `error`.',\n type: ['error', 'info'],\n status: 'optional',\n },\n status_props: {\n doc: 'Use an object to define additional FormStatus properties.',\n type: 'object',\n status: 'optional',\n },\n globalStatus: {\n doc: 'The [configuration](/uilib/components/global-status/properties/#configuration-object) used for the target [GlobalStatus](/uilib/components/global-status).',\n type: 'object',\n status: 'optional',\n },\n label: {\n doc: 'Prepends the Form Label component. If no ID is provided, a random ID is created.',\n type: 'React.Node',\n status: 'optional',\n },\n label_direction: {\n doc: 'Use `label_direction=\"vertical\"` to change the label layout direction. Defaults to `horizontal`.',\n type: 'React.Node',\n status: 'optional',\n },\n label_sr_only: {\n doc: 'Use `true` to make the label only readable by screen readers.',\n type: 'boolean',\n status: 'optional',\n },\n suffix: {\n doc: 'Text describing the content of the Autocomplete more than the label. You can also send in a React component, so it gets wrapped inside the Autocomplete component.',\n type: 'React.Node',\n status: 'optional',\n },\n skeleton: {\n doc: 'If set to `true`, an overlaying skeleton with animation will be shown.',\n type: 'boolean',\n status: 'optional',\n },\n input_ref: {\n doc: 'Use a React.Ref to get access to the `input` DOM element.',\n type: 'React.RefObject',\n status: 'optional',\n },\n input_element: {\n doc: 'Lets you provide a custom React element as the input HTML element.',\n type: ['string', 'React.Element'],\n status: 'optional',\n },\n '[DrawerList](/uilib/components/fragments/drawer-list/properties)': {\n doc: 'all DrawerList properties.',\n type: 'Various',\n status: 'optional',\n },\n '[Space](/uilib/layout/space/properties)': {\n doc: 'Spacing properties like `top` or `bottom` are supported.',\n type: ['string', 'object'],\n status: 'optional',\n },\n} satisfies PropertiesTableProps\n\nexport const AutocompleteEvents = {\n on_type: {\n doc: 'Will be called for every key change the users makes. Returns an object with the input `value` inside `{ value, event, attributes }` including [these methods](/uilib/components/autocomplete/events#dynamically-change-data)',\n type: 'function',\n status: 'optional',\n },\n on_focus: {\n doc: 'Will be called on user generated focus action. Returns an object with the input `value` inside `{ value, event, attributes }` including [these methods](/uilib/components/autocomplete/events#dynamically-change-data).',\n type: 'function',\n status: 'optional',\n },\n on_blur: {\n doc: 'Will be called on user generated blur action. Returns an object with the input `value` inside `{ value, event, attributes }` including [these methods](/uilib/components/autocomplete/events#dynamically-change-data).',\n type: 'function',\n status: 'optional',\n },\n on_change: {\n doc: 'Will be called on state changes made by the user. Returns an object with the new selected `data` item `{ data, event, attributes, value }` including [these methods](/uilib/components/autocomplete/events#dynamically-change-data).',\n type: 'function',\n status: 'optional',\n },\n on_select: {\n doc: 'Will be called once the users focuses or selects an item by a click or keyboard navigation. Returns an object with the new selected `data` item `{ data, event, attributes, value, active_item }` including [these methods](/uilib/components/autocomplete/events#dynamically-change-data). The \"active_item\" property is the currently selected item by keyboard navigation',\n type: 'function',\n status: 'optional',\n },\n on_show: {\n doc: 'Will be called once the user presses the autocomplete. Returns the data item `{ data, attributes }`.',\n type: 'function',\n status: 'optional',\n },\n on_hide: {\n doc: 'Will be called once the user presses the autocomplete again, or clicks somewhere else. Returns the data item `{ data, attributes }`.',\n type: 'function',\n status: 'optional',\n },\n} satisfies PropertiesTableProps\n"],"mappings":"AAEA,OAAO,MAAMA,sBAAsB,GAAG;EACpCC,IA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,EAAE;EACV,CAAC;EACD8C,aAAa,EAAE;IACbhD,GAAG,EAAE,oEAAoE;IACzEC,IAAI,EAAE,CAAC,QAAQ,EAAE,eAAe,CAAC;IACjCC,MAAM,EAAE;EACV,CAAC;EACD,kEAAkE,EAAE;IAClEF,GAAG,EAAE,4BAA4B;IACjCC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACD,yCAAyC,EAAE;IACzCF,GAAG,EAAE,0DAA0D;IAC/DC,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC1BC,MAAM,EAAE;EACV;AACF,CAAgC;AAEhC,OAAO,MAAM+C,kBAAkB,GAAG;EAChCC,OAAO,EAAE;IACPlD,GAAG,EAAE,8NAA8N;IACnOC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDiD,QAAQ,EAAE;IACRnD,GAAG,EAAE,yNAAyN;IAC9NC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDkD,OAAO,EAAE;IACPpD,GAAG,EAAE,wNAAwN;IAC7NC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDmD,SAAS,EAAE;IACTrD,GAAG,EAAE,sOAAsO;IAC3OC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDoD,SAAS,EAAE;IACTtD,GAAG,EAAE,8WAA8W;IACnXC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDqD,OAAO,EAAE;IACPvD,GAAG,EAAE,sGAAsG;IAC3GC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV,CAAC;EACDsD,OAAO,EAAE;IACPxD,GAAG,EAAE,sIAAsI;IAC3IC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV;AACF,CAAgC","ignoreList":[]}
@@ -54,6 +54,7 @@
54
54
  border-radius: var(--button-border-radius);
55
55
  text-align: left;
56
56
  font-size: var(--font-size-small);
57
+ font-weight: var(--font-weight-regular);
57
58
  -webkit-text-decoration: none;
58
59
  text-decoration: none;
59
60
  box-shadow: none;
@@ -1 +1 @@
1
- :root{--button-icon-size:1rem;--button-height:2.5rem}.dnb-button{--button-font-size:var(--font-size-basis);--button-font-size-small:var(--font-size-small);--button-icon-size--small:0.75rem;--button-icon-size--medium:1.5rem;--button-icon-size--large:2rem;--button-icon-gutter:0.5rem;--button-width:2.5rem;--button-width--small:1.5rem;--button-height--small:1.5rem;--button-width--medium:2rem;--button-height--medium:2rem;--button-width--large:3rem;--button-height--large:3rem;--button-border-width:0.0625rem;--button-border-width--hover:0.1875rem;--button-border-radius:calc(var(--button-height)/2);--button-border-radius--control-button:0.25rem;--button-padding-left:0;--button-padding-right:0;--button-padding-icon:1rem;--button-padding--default:1.5rem;--button-padding--small:1rem;--button-padding--medium:1rem;--button-padding--large:2rem;--button-icon-margin-top:0;--button-icon-margin-left:0;--button-icon-margin-right:0;align-items:center;border:none;border-radius:var(--button-border-radius);box-shadow:none;cursor:pointer;display:inline-flex;font-size:var(--font-size-small);height:auto;justify-content:center;padding:0 var(--button-padding-right) 0 var(--button-padding-left);position:relative;text-align:left;-webkit-text-decoration:none;text-decoration:none;user-select:none;-webkit-user-select:none;white-space:nowrap;width:var(--button-width)}.dnb-button--wrap{overflow-wrap:break-word;white-space:normal}.dnb-button,.dnb-core-style .dnb-button{line-height:var(--button-height)}.dnb-button__text{color:inherit;font-size:var(--button-font-size);line-height:var(--line-height-basis);margin:.5rem 0;transform:translateY(-.03125rem)}.dnb-button__text [data-os=linux]{transform:translateY(-.035rem)}.dnb-button__alignment{display:inline-block;width:0}.dnb-button__bounding{background-color:transparent;border-radius:var(--button-border-radius);bottom:0;left:0;position:absolute;right:0;top:0;transform:scale(1.1,1.4)}.dnb-button--size-small{--button-height:var(--button-height--small);font-size:var(--button-font-size-small);width:var(--button-width--small)}.dnb-button--size-small .dnb-button__text{margin:0}.dnb-button--has-text.dnb-button--size-small{--button-padding-left:var(--button-padding--small);--button-padding-right:var(--button-padding--small)}.dnb-button--size-medium{--button-height:var(--button-height--medium);width:var(--button-width--medium)}.dnb-button--size-medium .dnb-button__text{margin:0}.dnb-button--has-text.dnb-button--size-medium{--button-padding-left:var(--button-padding--medium);--button-padding-right:var(--button-padding--medium)}.dnb-button--control-after.dnb-button--size-medium,.dnb-button--control-before.dnb-button--size-medium{line-height:var(--button-height)}.dnb-button--size-large{--button-height:var(--button-height--large);--button-padding-icon:1.5rem;width:var(--button-width--large)}.dnb-button--has-text.dnb-button--size-large{--button-padding-left:var(--button-padding--large);--button-padding-right:var(--button-padding--large)}.dnb-button--has-text{--button-padding-left:var(--button-padding--default);--button-padding-right:var(--button-padding--default);width:auto}.dnb-button__icon{margin:var(--button-icon-margin-top) var(--button-icon-margin-right) 0 var(--button-icon-margin-left)}.dnb-button--has-text.dnb-button--icon-position-left{--button-padding-left:var(--button-padding-icon);--button-icon-margin-right:var(--button-icon-gutter)}.dnb-button--has-text.dnb-button--icon-position-right{--button-padding-right:var(--button-padding-icon);--button-icon-margin-left:var(--button-icon-gutter)}.dnb-button--icon-size-small{--button-icon-size:var(--button-icon-size--small)}.dnb-button--icon-size-medium{--button-icon-size:var(--button-icon-size--medium)}.dnb-button--icon-size-large{--button-icon-size:var(--button-icon-size--large)}.dnb-button--has-text.dnb-button--has-icon .dnb-button__icon{order:2}.dnb-button--has-text.dnb-button--has-icon .dnb-button__text{order:1}.dnb-button:not(.dnb-button--has-text) .dnb-button__icon{width:inherit}.dnb-button__icon.dnb-icon svg:not([width]):not([height]){height:var(--button-icon-size);width:var(--button-icon-size)}[href]>.dnb-button__icon.dnb-icon{line-height:var(--button-font-size)}.dnb-button--has-text.dnb-button--has-icon.dnb-button--icon-position-left .dnb-button__icon,.dnb-button--has-text.dnb-button--has-icon.dnb-button--icon-position-top .dnb-button__icon{order:1}.dnb-button--has-text.dnb-button--has-icon.dnb-button--icon-position-left .dnb-button__text,.dnb-button--has-text.dnb-button--has-icon.dnb-button--icon-position-top .dnb-button__text{order:2}.dnb-button--stretch{width:100%}.dnb-button--control-before{border-radius:var(--button-border-radius--control-button) 0 0 var(--button-border-radius--control-button)}.dnb-button--control-after{border-radius:0 var(--button-border-radius--control-button) var(--button-border-radius--control-button) 0}.dnb-button--reset{-webkit-appearance:none;appearance:none;background-color:transparent;border:none;border-radius:0;box-shadow:none;color:inherit;font:inherit;height:auto;line-height:inherit;margin:0;overflow:visible;padding:0;text-align:inherit;width:auto}html:not([data-whatintent=touch]) .dnb-button--reset:hover[disabled]{cursor:not-allowed}html:not([data-whatintent=touch]) .dnb-button--reset:hover:not([disabled]){border:none;box-shadow:none}.dnb-button--reset:not([disabled]):active,.dnb-button--reset:not([disabled]):focus{outline:none}html[data-whatinput=keyboard] .dnb-button--reset:not([disabled]):active,html[data-whatinput=keyboard] .dnb-button--reset:not([disabled]):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)}html[data-whatinput=mouse] .dnb-button--reset:not([disabled]):active,html[data-whatinput=mouse] .dnb-button--reset:not([disabled]):focus{border:none;box-shadow:none;color:inherit}.dnb-button[type=button],.dnb-button[type=reset],.dnb-button[type=submit]{appearance:none;-moz-appearance:none;-webkit-appearance:none}.dnb-button[disabled]{cursor:not-allowed;outline:none}.dnb-form-row--vertical .dnb-form-row__content>.dnb-button{align-self:flex-start}.dnb-form-row--horizontal .dnb-form-row__content .dnb-button__text{white-space:nowrap}.dnb-button+.dnb-form-status{margin-top:.5rem}button.dnb-button::-moz-focus-inner{border:none}
1
+ :root{--button-icon-size:1rem;--button-height:2.5rem}.dnb-button{--button-font-size:var(--font-size-basis);--button-font-size-small:var(--font-size-small);--button-icon-size--small:0.75rem;--button-icon-size--medium:1.5rem;--button-icon-size--large:2rem;--button-icon-gutter:0.5rem;--button-width:2.5rem;--button-width--small:1.5rem;--button-height--small:1.5rem;--button-width--medium:2rem;--button-height--medium:2rem;--button-width--large:3rem;--button-height--large:3rem;--button-border-width:0.0625rem;--button-border-width--hover:0.1875rem;--button-border-radius:calc(var(--button-height)/2);--button-border-radius--control-button:0.25rem;--button-padding-left:0;--button-padding-right:0;--button-padding-icon:1rem;--button-padding--default:1.5rem;--button-padding--small:1rem;--button-padding--medium:1rem;--button-padding--large:2rem;--button-icon-margin-top:0;--button-icon-margin-left:0;--button-icon-margin-right:0;align-items:center;border:none;border-radius:var(--button-border-radius);box-shadow:none;cursor:pointer;display:inline-flex;font-size:var(--font-size-small);font-weight:var(--font-weight-regular);height:auto;justify-content:center;padding:0 var(--button-padding-right) 0 var(--button-padding-left);position:relative;text-align:left;-webkit-text-decoration:none;text-decoration:none;user-select:none;-webkit-user-select:none;white-space:nowrap;width:var(--button-width)}.dnb-button--wrap{overflow-wrap:break-word;white-space:normal}.dnb-button,.dnb-core-style .dnb-button{line-height:var(--button-height)}.dnb-button__text{color:inherit;font-size:var(--button-font-size);line-height:var(--line-height-basis);margin:.5rem 0;transform:translateY(-.03125rem)}.dnb-button__text [data-os=linux]{transform:translateY(-.035rem)}.dnb-button__alignment{display:inline-block;width:0}.dnb-button__bounding{background-color:transparent;border-radius:var(--button-border-radius);bottom:0;left:0;position:absolute;right:0;top:0;transform:scale(1.1,1.4)}.dnb-button--size-small{--button-height:var(--button-height--small);font-size:var(--button-font-size-small);width:var(--button-width--small)}.dnb-button--size-small .dnb-button__text{margin:0}.dnb-button--has-text.dnb-button--size-small{--button-padding-left:var(--button-padding--small);--button-padding-right:var(--button-padding--small)}.dnb-button--size-medium{--button-height:var(--button-height--medium);width:var(--button-width--medium)}.dnb-button--size-medium .dnb-button__text{margin:0}.dnb-button--has-text.dnb-button--size-medium{--button-padding-left:var(--button-padding--medium);--button-padding-right:var(--button-padding--medium)}.dnb-button--control-after.dnb-button--size-medium,.dnb-button--control-before.dnb-button--size-medium{line-height:var(--button-height)}.dnb-button--size-large{--button-height:var(--button-height--large);--button-padding-icon:1.5rem;width:var(--button-width--large)}.dnb-button--has-text.dnb-button--size-large{--button-padding-left:var(--button-padding--large);--button-padding-right:var(--button-padding--large)}.dnb-button--has-text{--button-padding-left:var(--button-padding--default);--button-padding-right:var(--button-padding--default);width:auto}.dnb-button__icon{margin:var(--button-icon-margin-top) var(--button-icon-margin-right) 0 var(--button-icon-margin-left)}.dnb-button--has-text.dnb-button--icon-position-left{--button-padding-left:var(--button-padding-icon);--button-icon-margin-right:var(--button-icon-gutter)}.dnb-button--has-text.dnb-button--icon-position-right{--button-padding-right:var(--button-padding-icon);--button-icon-margin-left:var(--button-icon-gutter)}.dnb-button--icon-size-small{--button-icon-size:var(--button-icon-size--small)}.dnb-button--icon-size-medium{--button-icon-size:var(--button-icon-size--medium)}.dnb-button--icon-size-large{--button-icon-size:var(--button-icon-size--large)}.dnb-button--has-text.dnb-button--has-icon .dnb-button__icon{order:2}.dnb-button--has-text.dnb-button--has-icon .dnb-button__text{order:1}.dnb-button:not(.dnb-button--has-text) .dnb-button__icon{width:inherit}.dnb-button__icon.dnb-icon svg:not([width]):not([height]){height:var(--button-icon-size);width:var(--button-icon-size)}[href]>.dnb-button__icon.dnb-icon{line-height:var(--button-font-size)}.dnb-button--has-text.dnb-button--has-icon.dnb-button--icon-position-left .dnb-button__icon,.dnb-button--has-text.dnb-button--has-icon.dnb-button--icon-position-top .dnb-button__icon{order:1}.dnb-button--has-text.dnb-button--has-icon.dnb-button--icon-position-left .dnb-button__text,.dnb-button--has-text.dnb-button--has-icon.dnb-button--icon-position-top .dnb-button__text{order:2}.dnb-button--stretch{width:100%}.dnb-button--control-before{border-radius:var(--button-border-radius--control-button) 0 0 var(--button-border-radius--control-button)}.dnb-button--control-after{border-radius:0 var(--button-border-radius--control-button) var(--button-border-radius--control-button) 0}.dnb-button--reset{-webkit-appearance:none;appearance:none;background-color:transparent;border:none;border-radius:0;box-shadow:none;color:inherit;font:inherit;height:auto;line-height:inherit;margin:0;overflow:visible;padding:0;text-align:inherit;width:auto}html:not([data-whatintent=touch]) .dnb-button--reset:hover[disabled]{cursor:not-allowed}html:not([data-whatintent=touch]) .dnb-button--reset:hover:not([disabled]){border:none;box-shadow:none}.dnb-button--reset:not([disabled]):active,.dnb-button--reset:not([disabled]):focus{outline:none}html[data-whatinput=keyboard] .dnb-button--reset:not([disabled]):active,html[data-whatinput=keyboard] .dnb-button--reset:not([disabled]):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)}html[data-whatinput=mouse] .dnb-button--reset:not([disabled]):active,html[data-whatinput=mouse] .dnb-button--reset:not([disabled]):focus{border:none;box-shadow:none;color:inherit}.dnb-button[type=button],.dnb-button[type=reset],.dnb-button[type=submit]{appearance:none;-moz-appearance:none;-webkit-appearance:none}.dnb-button[disabled]{cursor:not-allowed;outline:none}.dnb-form-row--vertical .dnb-form-row__content>.dnb-button{align-self:flex-start}.dnb-form-row--horizontal .dnb-form-row__content .dnb-button__text{white-space:nowrap}.dnb-button+.dnb-form-status{margin-top:.5rem}button.dnb-button::-moz-focus-inner{border:none}
@@ -68,6 +68,7 @@
68
68
 
69
69
  text-align: left;
70
70
  font-size: var(--font-size-small); // reset
71
+ font-weight: var(--font-weight-regular); // reset
71
72
  text-decoration: none;
72
73
 
73
74
  box-shadow: none;
@@ -13,6 +13,10 @@ export type OnChangeParams = {
13
13
  checked: boolean;
14
14
  event: React.ChangeEvent<HTMLInputElement>;
15
15
  };
16
+ export type OnClickParams = React.MouseEvent<HTMLInputElement> & {
17
+ checked: boolean;
18
+ event: React.MouseEvent<HTMLInputElement>;
19
+ };
16
20
  export type CheckboxProps = {
17
21
  /**
18
22
  * Use either the `label` property or provide a custom one.
@@ -74,11 +78,15 @@ export type CheckboxProps = {
74
78
  * Will be called on state changes made by the user. Returns an boolean `{ checked, event }`.
75
79
  */
76
80
  onChange?: (args: OnChangeParams) => void;
81
+ /**
82
+ * Will be called on click made by the user. Returns the ClickEvent.
83
+ */
84
+ onClick?: (args: OnClickParams) => void;
77
85
  /**
78
86
  * By providing a React.ref we can get the internally used input element (DOM). E.g. `innerRef={myRef}` by using `React.createRef()` or `React.useRef()`.
79
87
  */
80
88
  innerRef?: React.MutableRefObject<HTMLInputElement> | ((elem: HTMLInputElement) => void);
81
- } & SpacingProps & Omit<React.HTMLProps<HTMLInputElement>, 'ref' | 'label' | 'size' | 'onChange'> & DeprecatedCheckboxProps;
89
+ } & SpacingProps & Omit<React.HTMLProps<HTMLInputElement>, 'ref' | 'label' | 'size' | 'onChange' | 'onClick'> & DeprecatedCheckboxProps;
82
90
  type DeprecatedCheckboxProps = {
83
91
  /** @deprecated use the `label` prop instead */
84
92
  children?: React.ReactNode;
@@ -1,14 +1,14 @@
1
1
  "use client";
2
2
 
3
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
5
5
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
6
6
  var _AlignmentHelper, _span, _span2;
7
- const _excluded = ["value", "status", "statusState", "statusProps", "statusNoAnimation", "globalStatus", "suffix", "size", "label", "labelPosition", "labelSrOnly", "title", "element", "disabled", "readOnly", "skeleton", "className", "id", "indeterminate", "checked", "onChange", "innerRef"];
7
+ const _excluded = ["value", "status", "statusState", "statusProps", "statusNoAnimation", "globalStatus", "suffix", "size", "label", "labelPosition", "labelSrOnly", "title", "element", "disabled", "readOnly", "skeleton", "className", "id", "indeterminate", "checked", "onChange", "onClick", "innerRef"];
8
8
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
9
9
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
10
10
  import "core-js/modules/web.dom-collections.iterator.js";
11
- import React, { useCallback, useContext, useEffect, useRef, useState } from 'react';
11
+ import React, { useCallback, useContext, useEffect, useReducer, useRef } from 'react';
12
12
  import classnames from 'classnames';
13
13
  import { validateDOMAttributes, getStatusState, combineDescribedBy, extendPropsWithContext, keycode } from '../../shared/component-helper';
14
14
  import AlignmentHelper from '../../shared/AlignmentHelper';
@@ -27,6 +27,11 @@ const defaultProps = {
27
27
  };
28
28
  function Checkbox(localProps) {
29
29
  const context = useContext(Context);
30
+ const extractPropsFromContext = useCallback(() => {
31
+ return extendPropsWithContext(convertSnakeCaseProps(localProps), defaultProps, context.Checkbox, {
32
+ skeleton: context === null || context === void 0 ? void 0 : context.Checkbox
33
+ }, pickFormElementProps(context === null || context === void 0 ? void 0 : context.FormRow), pickFormElementProps(context === null || context === void 0 ? void 0 : context.formElement));
34
+ }, [context.Checkbox, context === null || context === void 0 ? void 0 : context.FormRow, context === null || context === void 0 ? void 0 : context.formElement, localProps]);
30
35
  const props = extractPropsFromContext();
31
36
  const {
32
37
  value,
@@ -50,9 +55,11 @@ function Checkbox(localProps) {
50
55
  indeterminate,
51
56
  checked,
52
57
  onChange,
58
+ onClick,
53
59
  innerRef
54
60
  } = props,
55
61
  rest = _objectWithoutProperties(props, _excluded);
62
+ const [, forceUpdate] = useReducer(() => ({}), {});
56
63
  const id = useId(idProp);
57
64
  const isFn = typeof innerRef === 'function';
58
65
  const refHook = useRef();
@@ -62,14 +69,16 @@ function Checkbox(localProps) {
62
69
  innerRef === null || innerRef === void 0 ? void 0 : innerRef(ref.current);
63
70
  }
64
71
  }, [innerRef, isFn, ref]);
65
- const [isChecked, setIsChecked] = useState(checked !== null && checked !== void 0 ? checked : false);
66
- const [prevChecked, setPrevChecked] = useState(checked);
72
+ const preventChangeRef = useRef(false);
73
+ const isCheckedRef = useRef(checked !== null && checked !== void 0 ? checked : false);
74
+ const prevCheckedRef = useRef(checked);
67
75
  useEffect(() => {
68
- if (checked !== prevChecked) {
69
- setIsChecked(!!checked);
70
- setPrevChecked(!!checked);
76
+ if (checked !== prevCheckedRef.current) {
77
+ isCheckedRef.current = !!checked;
78
+ prevCheckedRef.current = !!checked;
79
+ forceUpdate();
71
80
  }
72
- }, [checked, prevChecked]);
81
+ }, [checked]);
73
82
  useEffect(() => {
74
83
  ref.current.indeterminate = indeterminate;
75
84
  }, [indeterminate, ref]);
@@ -77,11 +86,13 @@ function Checkbox(localProps) {
77
86
  onChange === null || onChange === void 0 ? void 0 : onChange(args);
78
87
  }, [onChange]);
79
88
  const handleChange = useCallback(event => {
80
- if (readOnly) {
81
- return event.preventDefault();
89
+ if (preventChangeRef.current) {
90
+ return;
82
91
  }
83
- const updatedCheck = !isChecked;
84
- setIsChecked(updatedCheck);
92
+ preventChangeRef.current = false;
93
+ const updatedCheck = !isCheckedRef.current;
94
+ isCheckedRef.current = updatedCheck;
95
+ forceUpdate();
85
96
  callOnChange({
86
97
  checked: updatedCheck,
87
98
  event
@@ -89,10 +100,28 @@ function Checkbox(localProps) {
89
100
  if (ref.current) {
90
101
  ref.current.focus();
91
102
  }
92
- }, [callOnChange, isChecked, readOnly, ref]);
103
+ }, [callOnChange, ref]);
93
104
  const onChangeHandler = useCallback(event => {
94
105
  handleChange(event);
95
106
  }, [handleChange]);
107
+ const onClickHandler = useCallback(event => {
108
+ const preventDefault = () => {
109
+ event.preventDefault();
110
+ if (event.target['checked'] !== isCheckedRef.current) {
111
+ preventChangeRef.current = true;
112
+ isCheckedRef.current = !isCheckedRef.current;
113
+ forceUpdate();
114
+ }
115
+ };
116
+ if (readOnly) {
117
+ return preventDefault();
118
+ }
119
+ onClick === null || onClick === void 0 ? void 0 : onClick(_objectSpread({
120
+ checked: isCheckedRef.current,
121
+ preventDefault,
122
+ event
123
+ }, event));
124
+ }, [onClick, readOnly]);
96
125
  const onKeyDownHandler = useCallback(event => {
97
126
  switch (keycode(event)) {
98
127
  case 'enter':
@@ -100,10 +129,24 @@ function Checkbox(localProps) {
100
129
  break;
101
130
  }
102
131
  }, [handleChange]);
132
+ const showStatus = getStatusState(status);
133
+ const handleInputAttributes = useCallback(() => {
134
+ const inputParams = _objectSpread({
135
+ disabled,
136
+ checked: isCheckedRef.current,
137
+ readOnly
138
+ }, rest);
139
+ if (showStatus || suffix) {
140
+ inputParams['aria-describedby'] = combineDescribedBy(inputParams, showStatus ? id + '-status' : null, suffix ? id + '-suffix' : null);
141
+ }
142
+ if (readOnly) {
143
+ inputParams['aria-readonly'] = inputParams.readOnly = true;
144
+ }
145
+ return validateDOMAttributes(props, skeletonDOMAttributes(inputParams, skeleton, context));
146
+ }, [context, disabled, id, props, readOnly, rest, showStatus, skeleton, suffix]);
103
147
  const mainParams = {
104
148
  className: classnames("dnb-checkbox dnb-form-component", createSkeletonClass(null, skeleton, context), createSpacingClasses(props), className, status && `dnb-checkbox__status--${statusState}`, size && `dnb-checkbox--${size}`, label && `dnb-checkbox--label-position-${labelPosition || 'right'}`)
105
149
  };
106
- const showStatus = getStatusState(status);
107
150
  const inputParams = handleInputAttributes();
108
151
  const statusComp = React.createElement(FormStatus, _extends({
109
152
  show: showStatus,
@@ -137,10 +180,11 @@ function Checkbox(localProps) {
137
180
  type: "checkbox",
138
181
  title: title,
139
182
  className: "dnb-checkbox__input",
140
- value: isChecked ? value || '' : '',
183
+ value: isCheckedRef.current ? value || '' : '',
141
184
  disabled: disabled
142
185
  }, inputParams, {
143
186
  onChange: onChangeHandler,
187
+ onClick: onClickHandler,
144
188
  onKeyDown: onKeyDownHandler,
145
189
  ref: ref
146
190
  })), React.createElement("span", {
@@ -157,25 +201,6 @@ function Checkbox(localProps) {
157
201
  id: id + '-suffix',
158
202
  context: props
159
203
  }, suffix)), (labelPosition === 'right' || !labelPosition) && statusComp);
160
- function handleInputAttributes() {
161
- const inputParams = _objectSpread({
162
- disabled,
163
- checked: isChecked,
164
- readOnly
165
- }, rest);
166
- if (showStatus || suffix) {
167
- inputParams['aria-describedby'] = combineDescribedBy(inputParams, showStatus ? id + '-status' : null, suffix ? id + '-suffix' : null);
168
- }
169
- if (readOnly) {
170
- inputParams['aria-readonly'] = inputParams.readOnly = true;
171
- }
172
- return validateDOMAttributes(props, skeletonDOMAttributes(inputParams, skeleton, context));
173
- }
174
- function extractPropsFromContext() {
175
- return extendPropsWithContext(convertSnakeCaseProps(localProps), defaultProps, context.Checkbox, {
176
- skeleton: context === null || context === void 0 ? void 0 : context.Checkbox
177
- }, pickFormElementProps(context === null || context === void 0 ? void 0 : context.FormRow), pickFormElementProps(context === null || context === void 0 ? void 0 : context.formElement));
178
- }
179
204
  }
180
205
  export default Checkbox;
181
206
  //# sourceMappingURL=Checkbox.js.map