@fremtind/jokul 0.28.1 → 0.29.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 (264) hide show
  1. package/build/build-stats.html +1 -1
  2. package/build/cjs/components/breadcrumb/index.d.cts +2 -4
  3. package/build/cjs/components/button/index.d.cts +1 -1
  4. package/build/cjs/components/button/types.cjs.map +1 -1
  5. package/build/cjs/components/button/types.d.cts +1 -2
  6. package/build/cjs/components/card/NavCard.cjs.map +1 -1
  7. package/build/cjs/components/card/NavCard.d.cts +1 -10
  8. package/build/cjs/components/card/index.d.cts +2 -2
  9. package/build/cjs/components/card/types.cjs.map +1 -1
  10. package/build/cjs/components/card/types.d.cts +8 -0
  11. package/build/cjs/components/combobox/Combobox.cjs.map +1 -1
  12. package/build/cjs/components/combobox/Combobox.d.cts +6 -7
  13. package/build/cjs/components/combobox/index.d.cts +1 -1
  14. package/build/cjs/components/cookie-consent/index.d.cts +2 -4
  15. package/build/cjs/components/datepicker/index.cjs +1 -1
  16. package/build/cjs/components/datepicker/index.d.cts +3 -3
  17. package/build/cjs/components/datepicker/types.d.cts +7 -0
  18. package/build/cjs/components/datepicker/utils.cjs +1 -1
  19. package/build/cjs/components/datepicker/utils.cjs.map +1 -1
  20. package/build/cjs/components/datepicker/utils.d.cts +0 -1
  21. package/build/cjs/components/datepicker/validation.cjs.map +1 -1
  22. package/build/cjs/components/datepicker/validation.d.cts +1 -8
  23. package/build/cjs/components/description-list/index.d.cts +1 -1
  24. package/build/cjs/components/expander/Expander.cjs.map +1 -1
  25. package/build/cjs/components/expander/Expander.d.cts +1 -2
  26. package/build/cjs/components/expander/index.d.cts +2 -4
  27. package/build/cjs/components/feedback/Feedback.cjs.map +1 -1
  28. package/build/cjs/components/feedback/Feedback.d.cts +4 -9
  29. package/build/cjs/components/feedback/followup/Followup.cjs.map +1 -1
  30. package/build/cjs/components/feedback/followup/Followup.d.cts +3 -14
  31. package/build/cjs/components/feedback/index.d.cts +3 -3
  32. package/build/cjs/components/feedback/presets.cjs.map +1 -1
  33. package/build/cjs/components/feedback/presets.d.cts +2 -5
  34. package/build/cjs/components/feedback/questions/ContactQuestion.cjs.map +1 -1
  35. package/build/cjs/components/feedback/questions/ContactQuestion.d.cts +3 -28
  36. package/build/cjs/components/feedback/types.d.cts +42 -7
  37. package/build/cjs/components/icon-button/index.d.cts +1 -2
  38. package/build/cjs/components/image/index.d.cts +1 -3
  39. package/build/cjs/components/index.cjs +1 -1
  40. package/build/cjs/components/index.d.cts +1 -1
  41. package/build/cjs/components/input-panel/BasePanel.cjs +2 -0
  42. package/build/cjs/components/input-panel/BasePanel.cjs.map +1 -0
  43. package/build/cjs/components/input-panel/BasePanel.d.cts +10 -0
  44. package/build/cjs/components/input-panel/CheckboxPanel.cjs +2 -0
  45. package/build/cjs/components/input-panel/CheckboxPanel.cjs.map +1 -0
  46. package/build/cjs/components/input-panel/CheckboxPanel.d.cts +7 -0
  47. package/build/cjs/components/input-panel/RadioPanel.cjs +2 -0
  48. package/build/cjs/components/input-panel/RadioPanel.cjs.map +1 -0
  49. package/build/cjs/components/{radio-panel → input-panel}/RadioPanel.d.cts +2 -4
  50. package/build/cjs/components/input-panel/RadioPanelGroup.cjs +2 -0
  51. package/build/cjs/components/input-panel/RadioPanelGroup.cjs.map +1 -0
  52. package/build/cjs/components/input-panel/RadioPanelGroup.d.cts +4 -0
  53. package/build/cjs/components/input-panel/documentation/checkbox-panel/ControlledExample.d.cts +4 -0
  54. package/build/cjs/components/input-panel/documentation/checkbox-panel/UncontrolledExample.d.cts +4 -0
  55. package/build/cjs/components/input-panel/documentation/radio-panel/ControlledExample.d.cts +4 -0
  56. package/build/cjs/components/input-panel/documentation/radio-panel/UncontrolledExample.d.cts +4 -0
  57. package/build/cjs/components/input-panel/index.cjs +2 -0
  58. package/build/cjs/components/input-panel/index.d.cts +3 -0
  59. package/build/cjs/components/input-panel/radioPanelContext.cjs +2 -0
  60. package/build/cjs/components/input-panel/radioPanelContext.cjs.map +1 -0
  61. package/build/cjs/components/input-panel/radioPanelContext.d.cts +7 -0
  62. package/build/cjs/components/link-list/LinkList.cjs.map +1 -1
  63. package/build/cjs/components/link-list/LinkList.d.cts +2 -11
  64. package/build/cjs/components/link-list/index.d.cts +1 -0
  65. package/build/cjs/components/link-list/types.cjs +2 -0
  66. package/build/cjs/components/link-list/types.cjs.map +1 -0
  67. package/build/cjs/components/link-list/types.d.cts +11 -0
  68. package/build/cjs/components/list/index.d.cts +2 -3
  69. package/build/cjs/components/loader/index.d.cts +9 -18
  70. package/build/cjs/components/logo/index.d.cts +2 -4
  71. package/build/cjs/components/modal/Modal.cjs.map +1 -1
  72. package/build/cjs/components/modal/Modal.d.cts +8 -2
  73. package/build/cjs/components/modal/index.d.cts +2 -4
  74. package/build/cjs/components/pagination/Pagination.cjs.map +1 -1
  75. package/build/cjs/components/pagination/Pagination.d.cts +2 -1
  76. package/build/cjs/components/pagination/index.d.cts +1 -1
  77. package/build/cjs/components/popover/Popover.cjs.map +1 -1
  78. package/build/cjs/components/popover/Popover.d.cts +6 -6
  79. package/build/cjs/components/popover/index.d.cts +1 -1
  80. package/build/cjs/components/progress-bar/index.d.cts +2 -4
  81. package/build/cjs/components/radio-button/index.d.cts +3 -6
  82. package/build/cjs/components/select/Select.cjs.map +1 -1
  83. package/build/cjs/components/select/Select.d.cts +5 -6
  84. package/build/cjs/components/select/index.d.cts +2 -4
  85. package/build/cjs/components/summary-table/SummaryTable.cjs.map +1 -1
  86. package/build/cjs/components/summary-table/SummaryTable.d.cts +2 -2
  87. package/build/cjs/components/summary-table/index.d.cts +2 -2
  88. package/build/cjs/components/system-message/SystemMessage.cjs.map +1 -1
  89. package/build/cjs/components/system-message/SystemMessage.d.cts +5 -6
  90. package/build/cjs/components/system-message/index.d.cts +1 -1
  91. package/build/cjs/components/tabs/index.d.cts +6 -6
  92. package/build/cjs/components/tag/index.d.cts +1 -3
  93. package/build/cjs/components/text-input/BaseTextArea.cjs.map +1 -1
  94. package/build/cjs/components/text-input/BaseTextArea.d.cts +1 -2
  95. package/build/cjs/components/text-input/index.d.cts +2 -2
  96. package/build/cjs/components/toast/index.d.cts +1 -1
  97. package/build/cjs/components/toast/toastContext.cjs.map +1 -1
  98. package/build/cjs/components/toast/toastContext.d.cts +1 -13
  99. package/build/cjs/components/toast/types.d.cts +11 -0
  100. package/build/cjs/components/toggle-switch/ToggleSlider.cjs.map +1 -1
  101. package/build/cjs/components/toggle-switch/ToggleSlider.d.cts +2 -3
  102. package/build/cjs/components/toggle-switch/ToggleSwitch.cjs.map +1 -1
  103. package/build/cjs/components/toggle-switch/ToggleSwitch.d.cts +1 -1
  104. package/build/cjs/components/toggle-switch/index.d.cts +2 -2
  105. package/build/cjs/components/tooltip/Tooltip.cjs +1 -1
  106. package/build/cjs/components/tooltip/Tooltip.cjs.map +1 -1
  107. package/build/cjs/components/tooltip/Tooltip.d.cts +1 -1
  108. package/build/cjs/index.cjs +1 -1
  109. package/build/es/components/breadcrumb/index.d.ts +2 -4
  110. package/build/es/components/button/index.d.ts +1 -1
  111. package/build/es/components/button/types.d.ts +1 -2
  112. package/build/es/components/button/types.js.map +1 -1
  113. package/build/es/components/card/NavCard.d.ts +1 -10
  114. package/build/es/components/card/NavCard.js.map +1 -1
  115. package/build/es/components/card/index.d.ts +2 -2
  116. package/build/es/components/card/types.d.ts +8 -0
  117. package/build/es/components/card/types.js.map +1 -1
  118. package/build/es/components/combobox/Combobox.d.ts +6 -7
  119. package/build/es/components/combobox/Combobox.js.map +1 -1
  120. package/build/es/components/combobox/index.d.ts +1 -1
  121. package/build/es/components/cookie-consent/index.d.ts +2 -4
  122. package/build/es/components/datepicker/index.d.ts +3 -3
  123. package/build/es/components/datepicker/index.js +1 -1
  124. package/build/es/components/datepicker/types.d.ts +7 -0
  125. package/build/es/components/datepicker/utils.d.ts +0 -1
  126. package/build/es/components/datepicker/utils.js +1 -1
  127. package/build/es/components/datepicker/utils.js.map +1 -1
  128. package/build/es/components/datepicker/validation.d.ts +1 -8
  129. package/build/es/components/datepicker/validation.js.map +1 -1
  130. package/build/es/components/description-list/index.d.ts +1 -1
  131. package/build/es/components/expander/Expander.d.ts +1 -2
  132. package/build/es/components/expander/Expander.js.map +1 -1
  133. package/build/es/components/expander/index.d.ts +2 -4
  134. package/build/es/components/feedback/Feedback.d.ts +4 -9
  135. package/build/es/components/feedback/Feedback.js.map +1 -1
  136. package/build/es/components/feedback/followup/Followup.d.ts +3 -14
  137. package/build/es/components/feedback/followup/Followup.js.map +1 -1
  138. package/build/es/components/feedback/index.d.ts +3 -3
  139. package/build/es/components/feedback/presets.d.ts +2 -5
  140. package/build/es/components/feedback/presets.js.map +1 -1
  141. package/build/es/components/feedback/questions/ContactQuestion.d.ts +3 -28
  142. package/build/es/components/feedback/questions/ContactQuestion.js.map +1 -1
  143. package/build/es/components/feedback/types.d.ts +42 -7
  144. package/build/es/components/icon-button/index.d.ts +1 -2
  145. package/build/es/components/image/index.d.ts +1 -3
  146. package/build/es/components/index.d.ts +1 -1
  147. package/build/es/components/index.js +1 -1
  148. package/build/es/components/input-panel/BasePanel.d.ts +10 -0
  149. package/build/es/components/input-panel/BasePanel.js +2 -0
  150. package/build/es/components/input-panel/BasePanel.js.map +1 -0
  151. package/build/es/components/input-panel/CheckboxPanel.d.ts +7 -0
  152. package/build/es/components/input-panel/CheckboxPanel.js +2 -0
  153. package/build/es/components/input-panel/CheckboxPanel.js.map +1 -0
  154. package/build/es/components/{radio-panel → input-panel}/RadioPanel.d.ts +2 -4
  155. package/build/es/components/input-panel/RadioPanel.js +2 -0
  156. package/build/es/components/input-panel/RadioPanel.js.map +1 -0
  157. package/build/es/components/input-panel/RadioPanelGroup.d.ts +4 -0
  158. package/build/es/components/input-panel/RadioPanelGroup.js +2 -0
  159. package/build/es/components/input-panel/RadioPanelGroup.js.map +1 -0
  160. package/build/es/components/input-panel/documentation/checkbox-panel/ControlledExample.d.ts +4 -0
  161. package/build/es/components/input-panel/documentation/checkbox-panel/UncontrolledExample.d.ts +4 -0
  162. package/build/es/components/input-panel/documentation/radio-panel/ControlledExample.d.ts +4 -0
  163. package/build/es/components/input-panel/documentation/radio-panel/UncontrolledExample.d.ts +4 -0
  164. package/build/es/components/input-panel/index.d.ts +3 -0
  165. package/build/es/components/input-panel/index.js +2 -0
  166. package/build/es/components/input-panel/radioPanelContext.d.ts +7 -0
  167. package/build/es/components/input-panel/radioPanelContext.js +2 -0
  168. package/build/es/components/input-panel/radioPanelContext.js.map +1 -0
  169. package/build/es/components/link-list/LinkList.d.ts +2 -11
  170. package/build/es/components/link-list/LinkList.js.map +1 -1
  171. package/build/es/components/link-list/index.d.ts +1 -0
  172. package/build/es/components/link-list/types.d.ts +11 -0
  173. package/build/es/components/link-list/types.js +2 -0
  174. package/build/es/components/link-list/types.js.map +1 -0
  175. package/build/es/components/list/index.d.ts +2 -3
  176. package/build/es/components/loader/index.d.ts +9 -18
  177. package/build/es/components/logo/index.d.ts +2 -4
  178. package/build/es/components/modal/Modal.d.ts +8 -2
  179. package/build/es/components/modal/Modal.js.map +1 -1
  180. package/build/es/components/modal/index.d.ts +2 -4
  181. package/build/es/components/pagination/Pagination.d.ts +2 -1
  182. package/build/es/components/pagination/Pagination.js.map +1 -1
  183. package/build/es/components/pagination/index.d.ts +1 -1
  184. package/build/es/components/popover/Popover.d.ts +6 -6
  185. package/build/es/components/popover/Popover.js.map +1 -1
  186. package/build/es/components/popover/index.d.ts +1 -1
  187. package/build/es/components/progress-bar/index.d.ts +2 -4
  188. package/build/es/components/radio-button/index.d.ts +3 -6
  189. package/build/es/components/select/Select.d.ts +5 -6
  190. package/build/es/components/select/Select.js.map +1 -1
  191. package/build/es/components/select/index.d.ts +2 -4
  192. package/build/es/components/summary-table/SummaryTable.d.ts +2 -2
  193. package/build/es/components/summary-table/SummaryTable.js.map +1 -1
  194. package/build/es/components/summary-table/index.d.ts +2 -2
  195. package/build/es/components/system-message/SystemMessage.d.ts +5 -6
  196. package/build/es/components/system-message/SystemMessage.js.map +1 -1
  197. package/build/es/components/system-message/index.d.ts +1 -1
  198. package/build/es/components/tabs/index.d.ts +6 -6
  199. package/build/es/components/tag/index.d.ts +1 -3
  200. package/build/es/components/text-input/BaseTextArea.d.ts +1 -2
  201. package/build/es/components/text-input/BaseTextArea.js.map +1 -1
  202. package/build/es/components/text-input/index.d.ts +2 -2
  203. package/build/es/components/toast/index.d.ts +1 -1
  204. package/build/es/components/toast/toastContext.d.ts +1 -13
  205. package/build/es/components/toast/toastContext.js.map +1 -1
  206. package/build/es/components/toast/types.d.ts +11 -0
  207. package/build/es/components/toggle-switch/ToggleSlider.d.ts +2 -3
  208. package/build/es/components/toggle-switch/ToggleSlider.js.map +1 -1
  209. package/build/es/components/toggle-switch/ToggleSwitch.d.ts +1 -1
  210. package/build/es/components/toggle-switch/ToggleSwitch.js.map +1 -1
  211. package/build/es/components/toggle-switch/index.d.ts +2 -2
  212. package/build/es/components/tooltip/Tooltip.d.ts +1 -1
  213. package/build/es/components/tooltip/Tooltip.js +1 -1
  214. package/build/es/components/tooltip/Tooltip.js.map +1 -1
  215. package/build/es/index.js +1 -1
  216. package/package.json +12 -2
  217. package/styles/components/button/button.css +2 -2
  218. package/styles/components/button/button.min.css +1 -1
  219. package/styles/components/checkbox/checkbox.css +4 -4
  220. package/styles/components/checkbox/checkbox.min.css +1 -1
  221. package/styles/components/feedback/feedback.css +2 -2
  222. package/styles/components/feedback/feedback.min.css +1 -1
  223. package/styles/components/input-group/input-group.css +2 -2
  224. package/styles/components/input-group/input-group.min.css +1 -1
  225. package/styles/components/input-panel/_index.scss +2 -0
  226. package/styles/components/input-panel/checkbox-panel.css +132 -0
  227. package/styles/components/input-panel/checkbox-panel.min.css +1 -0
  228. package/styles/components/input-panel/checkbox-panel.scss +88 -0
  229. package/styles/components/{radio-panel → input-panel}/radio-panel.css +67 -56
  230. package/styles/components/input-panel/radio-panel.min.css +1 -0
  231. package/styles/components/input-panel/radio-panel.scss +79 -0
  232. package/styles/components/input-panel/shared.css +61 -0
  233. package/styles/components/input-panel/shared.min.css +1 -0
  234. package/styles/components/input-panel/shared.scss +75 -0
  235. package/styles/components/loader/loader.css +6 -6
  236. package/styles/components/loader/loader.min.css +1 -1
  237. package/styles/components/loader/skeleton-loader.css +5 -5
  238. package/styles/components/loader/skeleton-loader.min.css +1 -1
  239. package/styles/components/message/message.css +2 -2
  240. package/styles/components/message/message.min.css +1 -1
  241. package/styles/components/progress-bar/progress-bar.css +2 -2
  242. package/styles/components/progress-bar/progress-bar.min.css +1 -1
  243. package/styles/components/radio-button/radio-button.css +2 -2
  244. package/styles/components/radio-button/radio-button.min.css +1 -1
  245. package/styles/components/system-message/system-message.css +2 -2
  246. package/styles/components/system-message/system-message.min.css +1 -1
  247. package/styles/components/toast/toast.css +4 -4
  248. package/styles/components/toast/toast.min.css +1 -1
  249. package/styles/styles.css +222 -140
  250. package/styles/styles.min.css +1 -1
  251. package/styles/styles.scss +1 -1
  252. package/build/cjs/components/radio-panel/RadioPanel.cjs +0 -2
  253. package/build/cjs/components/radio-panel/RadioPanel.cjs.map +0 -1
  254. package/build/cjs/components/radio-panel/index.cjs +0 -2
  255. package/build/cjs/components/radio-panel/index.d.cts +0 -1
  256. package/build/es/components/radio-panel/RadioPanel.js +0 -2
  257. package/build/es/components/radio-panel/RadioPanel.js.map +0 -1
  258. package/build/es/components/radio-panel/index.d.ts +0 -1
  259. package/build/es/components/radio-panel/index.js +0 -2
  260. package/styles/components/radio-panel/_index.scss +0 -1
  261. package/styles/components/radio-panel/radio-panel.min.css +0 -1
  262. package/styles/components/radio-panel/radio-panel.scss +0 -140
  263. /package/build/cjs/components/{radio-panel → input-panel}/index.cjs.map +0 -0
  264. /package/build/es/components/{radio-panel → input-panel}/index.js.map +0 -0
@@ -1,28 +1,3 @@
1
- import { FC, ReactNode } from 'react';
2
- interface Props {
3
- /**
4
- * Lar deg tilpasse spørsmålsteksten.
5
- * @default "Kan vi kontakte deg for flere innspill?"
6
- * */
7
- label?: string;
8
- /**
9
- * Lar deg tilpasse teksten på knappen for innsending.
10
- * @default "Sett meg på lista!"
11
- * */
12
- sendButtonLabel?: string;
13
- /** Sett til true om du også vil spørre om brukjerens telefonnummer i tillegg til epost */
14
- withPhone?: boolean;
15
- /** Her kan du legge inn eventuelt annet innhold du vil ha med. Kommer mellom overskriften og feltene for utfylling */
16
- children?: ReactNode;
17
- onSubmit: (values: {
18
- email: string;
19
- phone?: string;
20
- }) => void;
21
- /** Lar deg tilpasse meldingen som kommer når brukeren sender inn skjemaet. */
22
- successMessage?: {
23
- title: string;
24
- children: ReactNode;
25
- };
26
- }
27
- export declare const ContactQuestion: FC<Props>;
28
- export {};
1
+ import { FC } from 'react';
2
+ import { ContactQuestionProps } from '../types.js';
3
+ export declare const ContactQuestion: FC<ContactQuestionProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"ContactQuestion.js","sources":["../../../../../src/components/feedback/questions/ContactQuestion.tsx"],"sourcesContent":["import React, {\n ChangeEvent,\n FC,\n ReactNode,\n useEffect,\n useRef,\n useState,\n} from \"react\";\nimport { isValidEpost } from \"../../../utilities/validators/isValidEpost/isValidEpost.js\";\nimport { isValidTelefonnummer } from \"../../../utilities/validators/isValidTelefonnummer/isValidTelefonnummer.js\";\nimport { PrimaryButton, TertiaryButton } from \"../../button/Button.js\";\nimport { TextInput } from \"../../text-input/TextInput.js\";\nimport { useFeedbackContext } from \"../feedbackContext.js\";\nimport { FeedbackSuccess } from \"../FeedbackSuccess.js\";\n\nconst validateEmail = (email?: string) => {\n if (!email || email === \"\") {\n return \"Du må oppgi e-postadresse for at vi kan kontakte deg\";\n }\n if (!isValidEpost(email)) {\n return \"Skriv inn en gyldig e-postadresse\";\n }\n return;\n};\n\nconst validatePhone = (phone?: string) => {\n if (!phone || phone === \"\") {\n return \"Du må oppgi telefonnummer for at vi kan kontakte deg\";\n }\n if (!isValidTelefonnummer(phone)) {\n return \"Skriv inn et gyldig telefonnummer\";\n }\n return;\n};\n\nconst defaultSuccessMessage = {\n title: \"Takk for tiden din!\",\n children:\n \"Neste gang vi gjennomfører intervjuer og tester kan det hende vi tar kontakt med deg. Dine innspill hjelper oss med å gjøre nettsidene bedre for deg og alle andre som bruker dem.\",\n};\n\ninterface Props {\n /**\n * Lar deg tilpasse spørsmålsteksten.\n * @default \"Kan vi kontakte deg for flere innspill?\"\n * */\n label?: string;\n /**\n * Lar deg tilpasse teksten på knappen for innsending.\n * @default \"Sett meg på lista!\"\n * */\n sendButtonLabel?: string;\n /** Sett til true om du også vil spørre om brukjerens telefonnummer i tillegg til epost */\n withPhone?: boolean;\n /** Her kan du legge inn eventuelt annet innhold du vil ha med. Kommer mellom overskriften og feltene for utfylling */\n children?: ReactNode;\n onSubmit: (values: { email: string; phone?: string }) => void;\n /** Lar deg tilpasse meldingen som kommer når brukeren sender inn skjemaet. */\n successMessage?: {\n title: string;\n children: ReactNode;\n };\n}\n\nexport const ContactQuestion: FC<Props> = ({\n label = \"Kan vi kontakte deg for flere innspill?\",\n sendButtonLabel = \"Sett meg på lista!\",\n withPhone = false,\n onSubmit,\n successMessage = defaultSuccessMessage,\n children,\n}) => {\n const [email, setEmail] = useState(\"\");\n const [phone, setPhone] = useState(\"\");\n const [errors, setErrors] = useState<{ email?: string; phone?: string }>(\n {},\n );\n const emailRef = useRef<HTMLInputElement>(null);\n const phoneRef = useRef<HTMLInputElement>(null);\n const [shouldValidate, setShouldValidate] = useState(false);\n\n const [noThanks, setNoThanks] = useState(false);\n const { contactSubmitted, setContactSubmitted, landmarkLabel } =\n useFeedbackContext();\n\n const ChildrenWrapper = typeof children === \"string\" ? \"p\" : \"div\";\n\n const validate = (email: string, phone: string) => {\n const emailError = validateEmail(email);\n const phoneError = validatePhone(phone);\n setErrors({ email: emailError, phone: phoneError });\n return { emailError, phoneError };\n };\n\n useEffect(() => {\n if (shouldValidate) {\n const { emailError, phoneError } = validate(email, phone);\n\n if (!emailError && (!withPhone || !phoneError)) {\n setShouldValidate(false);\n }\n }\n }, [email, phone, shouldValidate, withPhone]);\n\n const handleChange =\n (consumer: (value: string) => void) =>\n (e: ChangeEvent<HTMLInputElement>) =>\n consumer(e.target.value);\n\n const handleSubmit: React.FormEventHandler = (e) => {\n e.preventDefault();\n\n const { emailError, phoneError } = validate(email, phone);\n if (emailError) {\n setShouldValidate(true);\n emailRef.current?.focus();\n return;\n }\n if (withPhone && phoneError) {\n setShouldValidate(true);\n phoneRef.current?.focus();\n return;\n }\n\n onSubmit({ email, phone: withPhone ? phone : undefined });\n setContactSubmitted(true);\n };\n\n if (noThanks) {\n return null;\n }\n\n if (contactSubmitted) {\n return <FeedbackSuccess {...successMessage} />;\n }\n\n return (\n <form\n className=\"jkl-spacing-xl--top\"\n onSubmit={handleSubmit}\n aria-label={landmarkLabel}\n >\n <p className=\"jkl-heading-4 jkl-spacing-xs--bottom\">{label}</p>\n {children && (\n <ChildrenWrapper className=\"jkl-body\">\n {children}\n </ChildrenWrapper>\n )}\n\n <TextInput\n ref={emailRef}\n className=\"jkl-spacing-l--top\"\n label=\"E-post\"\n labelProps={{ variant: \"small\" }}\n autoComplete=\"email\"\n name=\"email\"\n value={email}\n onChange={handleChange(setEmail)}\n errorLabel={errors.email}\n />\n {withPhone && (\n <TextInput\n ref={phoneRef}\n className=\"jkl-spacing-l--top\"\n label=\"Telefonnummer\"\n labelProps={{ variant: \"small\" }}\n autoComplete=\"tel\"\n name=\"phone\"\n value={phone}\n onChange={handleChange(setPhone)}\n errorLabel={errors.phone}\n />\n )}\n\n <div className=\"jkl-spacing-xl--top\">\n <PrimaryButton type=\"submit\" className=\"jkl-spacing-xl--right\">\n {sendButtonLabel}\n </PrimaryButton>\n <TertiaryButton onClick={() => setNoThanks(true)}>\n Nei takk\n </TertiaryButton>\n </div>\n </form>\n );\n};\n"],"names":["defaultSuccessMessage","title","children","ContactQuestion","label","sendButtonLabel","withPhone","onSubmit","successMessage","email","setEmail","useState","phone","setPhone","errors","setErrors","emailRef","useRef","phoneRef","shouldValidate","setShouldValidate","noThanks","setNoThanks","contactSubmitted","setContactSubmitted","landmarkLabel","useFeedbackContext","ChildrenWrapper","validate","emailError","isValidEpost","validateEmail","phoneError","isValidTelefonnummer","validatePhone","useEffect","handleChange","consumer","e","target","value","jsx","FeedbackSuccess","jsxs","className","preventDefault","_a","current","focus","_b","TextInput","ref","labelProps","variant","autoComplete","name","onChange","errorLabel","PrimaryButton","type","TertiaryButton","onClick"],"mappings":"kjBAeA,MAoBMA,EAAwB,CAC1BC,MAAO,sBACPC,SACI,sLA0BKC,EAA6B,EACtCC,MAAAA,EAAQ,0CACRC,gBAAAA,EAAkB,qBAClBC,UAAAA,GAAY,EACZC,SAAAA,EACAC,eAAAA,EAAiBR,EACjBE,SAAAA,MAEA,MAAOO,EAAOC,GAAYC,EAAS,KAC5BC,EAAOC,GAAYF,EAAS,KAC5BG,EAAQC,GAAaJ,EACxB,CAAC,GAECK,EAAWC,EAAyB,MACpCC,EAAWD,EAAyB,OACnCE,EAAgBC,GAAqBT,GAAS,IAE9CU,EAAUC,GAAeX,GAAS,IACjCY,iBAAAA,EAAkBC,oBAAAA,EAAqBC,cAAAA,GAC3CC,IAEEC,EAAsC,iBAAbzB,EAAwB,IAAM,MAEvD0B,EAAW,CAACnB,EAAeG,KACvB,MAAAiB,EAzEQ,CAACpB,GACdA,GAAmB,KAAVA,EAGTqB,EAAarB,QAAd,EACO,oCAHA,uDAuEYsB,CAActB,GAC3BuB,EAhEQ,CAACpB,GACdA,GAAmB,KAAVA,EAGTqB,EAAqBrB,QAAtB,EACO,oCAHA,uDA8DYsB,CAActB,GACjC,OAAAG,EAAU,CAAEN,MAAOoB,EAAYjB,MAAOoB,IAC/B,CAAEH,WAAAA,EAAYG,WAAAA,IAGzBG,GAAU,KACN,GAAIhB,EAAgB,CACV,MAAEU,WAAAA,EAAYG,WAAAA,GAAeJ,EAASnB,EAAOG,IAE9CiB,KAAgBvB,IAAc0B,IAC/BZ,GAAkB,EAE1B,IACD,CAACX,EAAOG,EAAOO,EAAgBb,IAE5B,MAAA8B,EACDC,GACAC,GACGD,EAASC,EAAEC,OAAOC,OAqBtBnB,OAAAA,EACO,KAGPE,EACOkB,EAACC,EAAiB,IAAGlC,IAI5BmC,EAAC,OAAA,CACGC,UAAU,sBACVrC,SA9BsC+B,YAC1CA,EAAEO,iBAEI,MAAEhB,WAAAA,EAAYG,WAAAA,GAAeJ,EAASnB,EAAOG,GACnD,OAAIiB,GACAT,GAAkB,QAClB,OAAA0B,EAAA9B,EAAS+B,UAATD,EAAkBE,UAGlB1C,GAAa0B,GACbZ,GAAkB,QAClB,OAAA6B,EAAA/B,EAAS6B,UAATE,EAAkBD,WAItBzC,EAAS,CAAEE,MAAAA,EAAOG,MAAON,EAAYM,OAAQ,SAC7CY,GAAoB,GAAI,EAepB,aAAYC,EAEZvB,SAAA,CAACuC,EAAA,IAAA,CAAEG,UAAU,uCAAwC1C,SAAME,IAC1DF,GACGuC,EAACd,EAAgB,CAAAiB,UAAU,WACtB1C,SAAAA,IAITuC,EAACS,EAAA,CACGC,IAAKnC,EACL4B,UAAU,qBACVxC,MAAM,SACNgD,WAAY,CAAEC,QAAS,SACvBC,aAAa,QACbC,KAAK,QACLf,MAAO/B,EACP+C,SAAUpB,EAAa1B,GACvB+C,WAAY3C,EAAOL,QAEtBH,GACGmC,EAACS,EAAA,CACGC,IAAKjC,EACL0B,UAAU,qBACVxC,MAAM,gBACNgD,WAAY,CAAEC,QAAS,SACvBC,aAAa,MACbC,KAAK,QACLf,MAAO5B,EACP4C,SAAUpB,EAAavB,GACvB4C,WAAY3C,EAAOF,QAI3B+B,EAAC,MAAI,CAAAC,UAAU,sBACX1C,SAAA,CAAAuC,EAACiB,EAAc,CAAAC,KAAK,SAASf,UAAU,wBAClC1C,SACLG,MACCuD,EAAe,CAAAC,QAAS,IAAMvC,GAAY,GAAOpB,SAElD,kBACJ"}
1
+ {"version":3,"file":"ContactQuestion.js","sources":["../../../../../src/components/feedback/questions/ContactQuestion.tsx"],"sourcesContent":["import React, { ChangeEvent, FC, useEffect, useRef, useState } from \"react\";\nimport { isValidEpost } from \"../../../utilities/validators/isValidEpost/isValidEpost.js\";\nimport { isValidTelefonnummer } from \"../../../utilities/validators/isValidTelefonnummer/isValidTelefonnummer.js\";\nimport { PrimaryButton, TertiaryButton } from \"../../button/Button.js\";\nimport { TextInput } from \"../../text-input/TextInput.js\";\nimport { useFeedbackContext } from \"../feedbackContext.js\";\nimport { FeedbackSuccess } from \"../FeedbackSuccess.js\";\nimport { ContactQuestionProps } from \"../types.js\";\n\nconst validateEmail = (email?: string) => {\n if (!email || email === \"\") {\n return \"Du må oppgi e-postadresse for at vi kan kontakte deg\";\n }\n if (!isValidEpost(email)) {\n return \"Skriv inn en gyldig e-postadresse\";\n }\n return;\n};\n\nconst validatePhone = (phone?: string) => {\n if (!phone || phone === \"\") {\n return \"Du må oppgi telefonnummer for at vi kan kontakte deg\";\n }\n if (!isValidTelefonnummer(phone)) {\n return \"Skriv inn et gyldig telefonnummer\";\n }\n return;\n};\n\nconst defaultSuccessMessage = {\n title: \"Takk for tiden din!\",\n children:\n \"Neste gang vi gjennomfører intervjuer og tester kan det hende vi tar kontakt med deg. Dine innspill hjelper oss med å gjøre nettsidene bedre for deg og alle andre som bruker dem.\",\n};\n\nexport const ContactQuestion: FC<ContactQuestionProps> = ({\n label = \"Kan vi kontakte deg for flere innspill?\",\n sendButtonLabel = \"Sett meg på lista!\",\n withPhone = false,\n onSubmit,\n successMessage = defaultSuccessMessage,\n children,\n}) => {\n const [email, setEmail] = useState(\"\");\n const [phone, setPhone] = useState(\"\");\n const [errors, setErrors] = useState<{ email?: string; phone?: string }>(\n {},\n );\n const emailRef = useRef<HTMLInputElement>(null);\n const phoneRef = useRef<HTMLInputElement>(null);\n const [shouldValidate, setShouldValidate] = useState(false);\n\n const [noThanks, setNoThanks] = useState(false);\n const { contactSubmitted, setContactSubmitted, landmarkLabel } =\n useFeedbackContext();\n\n const ChildrenWrapper = typeof children === \"string\" ? \"p\" : \"div\";\n\n const validate = (email: string, phone: string) => {\n const emailError = validateEmail(email);\n const phoneError = validatePhone(phone);\n setErrors({ email: emailError, phone: phoneError });\n return { emailError, phoneError };\n };\n\n useEffect(() => {\n if (shouldValidate) {\n const { emailError, phoneError } = validate(email, phone);\n\n if (!emailError && (!withPhone || !phoneError)) {\n setShouldValidate(false);\n }\n }\n }, [email, phone, shouldValidate, withPhone]);\n\n const handleChange =\n (consumer: (value: string) => void) =>\n (e: ChangeEvent<HTMLInputElement>) =>\n consumer(e.target.value);\n\n const handleSubmit: React.FormEventHandler = (e) => {\n e.preventDefault();\n\n const { emailError, phoneError } = validate(email, phone);\n if (emailError) {\n setShouldValidate(true);\n emailRef.current?.focus();\n return;\n }\n if (withPhone && phoneError) {\n setShouldValidate(true);\n phoneRef.current?.focus();\n return;\n }\n\n onSubmit({ email, phone: withPhone ? phone : undefined });\n setContactSubmitted(true);\n };\n\n if (noThanks) {\n return null;\n }\n\n if (contactSubmitted) {\n return <FeedbackSuccess {...successMessage} />;\n }\n\n return (\n <form\n className=\"jkl-spacing-xl--top\"\n onSubmit={handleSubmit}\n aria-label={landmarkLabel}\n >\n <p className=\"jkl-heading-4 jkl-spacing-xs--bottom\">{label}</p>\n {children && (\n <ChildrenWrapper className=\"jkl-body\">\n {children}\n </ChildrenWrapper>\n )}\n\n <TextInput\n ref={emailRef}\n className=\"jkl-spacing-l--top\"\n label=\"E-post\"\n labelProps={{ variant: \"small\" }}\n autoComplete=\"email\"\n name=\"email\"\n value={email}\n onChange={handleChange(setEmail)}\n errorLabel={errors.email}\n />\n {withPhone && (\n <TextInput\n ref={phoneRef}\n className=\"jkl-spacing-l--top\"\n label=\"Telefonnummer\"\n labelProps={{ variant: \"small\" }}\n autoComplete=\"tel\"\n name=\"phone\"\n value={phone}\n onChange={handleChange(setPhone)}\n errorLabel={errors.phone}\n />\n )}\n\n <div className=\"jkl-spacing-xl--top\">\n <PrimaryButton type=\"submit\" className=\"jkl-spacing-xl--right\">\n {sendButtonLabel}\n </PrimaryButton>\n <TertiaryButton onClick={() => setNoThanks(true)}>\n Nei takk\n </TertiaryButton>\n </div>\n </form>\n );\n};\n"],"names":["defaultSuccessMessage","title","children","ContactQuestion","label","sendButtonLabel","withPhone","onSubmit","successMessage","email","setEmail","useState","phone","setPhone","errors","setErrors","emailRef","useRef","phoneRef","shouldValidate","setShouldValidate","noThanks","setNoThanks","contactSubmitted","setContactSubmitted","landmarkLabel","useFeedbackContext","ChildrenWrapper","validate","emailError","isValidEpost","validateEmail","phoneError","isValidTelefonnummer","validatePhone","useEffect","handleChange","consumer","e","target","value","jsx","FeedbackSuccess","jsxs","className","preventDefault","_a","current","focus","_b","TextInput","ref","labelProps","variant","autoComplete","name","onChange","errorLabel","PrimaryButton","type","TertiaryButton","onClick"],"mappings":"kjBASA,MAoBMA,EAAwB,CAC1BC,MAAO,sBACPC,SACI,sLAGKC,EAA4C,EACrDC,MAAAA,EAAQ,0CACRC,gBAAAA,EAAkB,qBAClBC,UAAAA,GAAY,EACZC,SAAAA,EACAC,eAAAA,EAAiBR,EACjBE,SAAAA,MAEA,MAAOO,EAAOC,GAAYC,EAAS,KAC5BC,EAAOC,GAAYF,EAAS,KAC5BG,EAAQC,GAAaJ,EACxB,CAAC,GAECK,EAAWC,EAAyB,MACpCC,EAAWD,EAAyB,OACnCE,EAAgBC,GAAqBT,GAAS,IAE9CU,EAAUC,GAAeX,GAAS,IACjCY,iBAAAA,EAAkBC,oBAAAA,EAAqBC,cAAAA,GAC3CC,IAEEC,EAAsC,iBAAbzB,EAAwB,IAAM,MAEvD0B,EAAW,CAACnB,EAAeG,KACvB,MAAAiB,EAlDQ,CAACpB,GACdA,GAAmB,KAAVA,EAGTqB,EAAarB,QAAd,EACO,oCAHA,uDAgDYsB,CAActB,GAC3BuB,EAzCQ,CAACpB,GACdA,GAAmB,KAAVA,EAGTqB,EAAqBrB,QAAtB,EACO,oCAHA,uDAuCYsB,CAActB,GACjC,OAAAG,EAAU,CAAEN,MAAOoB,EAAYjB,MAAOoB,IAC/B,CAAEH,WAAAA,EAAYG,WAAAA,IAGzBG,GAAU,KACN,GAAIhB,EAAgB,CACV,MAAEU,WAAAA,EAAYG,WAAAA,GAAeJ,EAASnB,EAAOG,IAE9CiB,KAAgBvB,IAAc0B,IAC/BZ,GAAkB,EAE1B,IACD,CAACX,EAAOG,EAAOO,EAAgBb,IAE5B,MAAA8B,EACDC,GACAC,GACGD,EAASC,EAAEC,OAAOC,OAqBtBnB,OAAAA,EACO,KAGPE,EACOkB,EAACC,EAAiB,IAAGlC,IAI5BmC,EAAC,OAAA,CACGC,UAAU,sBACVrC,SA9BsC+B,YAC1CA,EAAEO,iBAEI,MAAEhB,WAAAA,EAAYG,WAAAA,GAAeJ,EAASnB,EAAOG,GACnD,OAAIiB,GACAT,GAAkB,QAClB,OAAA0B,EAAA9B,EAAS+B,UAATD,EAAkBE,UAGlB1C,GAAa0B,GACbZ,GAAkB,QAClB,OAAA6B,EAAA/B,EAAS6B,UAATE,EAAkBD,WAItBzC,EAAS,CAAEE,MAAAA,EAAOG,MAAON,EAAYM,OAAQ,SAC7CY,GAAoB,GAAI,EAepB,aAAYC,EAEZvB,SAAA,CAACuC,EAAA,IAAA,CAAEG,UAAU,uCAAwC1C,SAAME,IAC1DF,GACGuC,EAACd,EAAgB,CAAAiB,UAAU,WACtB1C,SAAAA,IAITuC,EAACS,EAAA,CACGC,IAAKnC,EACL4B,UAAU,qBACVxC,MAAM,SACNgD,WAAY,CAAEC,QAAS,SACvBC,aAAa,QACbC,KAAK,QACLf,MAAO/B,EACP+C,SAAUpB,EAAa1B,GACvB+C,WAAY3C,EAAOL,QAEtBH,GACGmC,EAACS,EAAA,CACGC,IAAKjC,EACL0B,UAAU,qBACVxC,MAAM,gBACNgD,WAAY,CAAEC,QAAS,SACvBC,aAAa,MACbC,KAAK,QACLf,MAAO5B,EACP4C,SAAUpB,EAAavB,GACvB4C,WAAY3C,EAAOF,QAI3B+B,EAAC,MAAI,CAAAC,UAAU,sBACX1C,SAAA,CAAAuC,EAACiB,EAAc,CAAAC,KAAK,SAASf,UAAU,wBAClC1C,SACLG,MACCuD,EAAe,CAAAC,QAAS,IAAMvC,GAAY,GAAOpB,SAElD,kBACJ"}
@@ -1,4 +1,4 @@
1
- import { Dispatch, FormEvent, FormEventHandler, SetStateAction } from 'react';
1
+ import { Dispatch, FormEvent, FormEventHandler, ReactNode, SetStateAction } from 'react';
2
2
  export type FeedbackOption<T = string | number> = {
3
3
  /** Teksten som vises ved alternativet */
4
4
  label: string;
@@ -13,19 +13,19 @@ interface BaseQuestion {
13
13
  helpLabel?: string;
14
14
  name?: string;
15
15
  }
16
- interface RadioQuestion extends BaseQuestion {
16
+ export interface RadioQuestion extends BaseQuestion {
17
17
  type: "radio";
18
18
  options: FeedbackOption[];
19
19
  }
20
- interface CheckboxQuestion extends BaseQuestion {
20
+ export interface CheckboxQuestion extends BaseQuestion {
21
21
  type: "checkbox";
22
22
  options: FeedbackOption[];
23
23
  }
24
- interface SmileyQuestion extends BaseQuestion {
24
+ export interface SmileyQuestion extends BaseQuestion {
25
25
  type: "smiley";
26
26
  options: FeedbackOption<number>[];
27
27
  }
28
- interface TextQuestion extends BaseQuestion {
28
+ export interface TextQuestion extends BaseQuestion {
29
29
  type: "text";
30
30
  }
31
31
  export type MainQuestion = RadioQuestion | SmileyQuestion;
@@ -35,11 +35,11 @@ interface BaseFeedbackAnswer {
35
35
  name: string;
36
36
  type: "radio" | "checkbox" | "text";
37
37
  }
38
- interface MultiFeedbackAnswer extends BaseFeedbackAnswer {
38
+ export interface MultiFeedbackAnswer extends BaseFeedbackAnswer {
39
39
  type: "checkbox";
40
40
  value: string[];
41
41
  }
42
- interface SingleFeedbackAnswer extends BaseFeedbackAnswer {
42
+ export interface SingleFeedbackAnswer extends BaseFeedbackAnswer {
43
43
  type: "radio" | "text";
44
44
  value: string;
45
45
  }
@@ -75,6 +75,16 @@ export type FollowupState = {
75
75
  handleAbort: () => void;
76
76
  setCurrentValue: Dispatch<SetStateAction<FeedbackOption | FeedbackOption[] | undefined>>;
77
77
  };
78
+ export type FollowupProps = {
79
+ /** Spørsmålet/ene som skal stilles. Kan være av typen radio, checkbox eller text */
80
+ questions: FollowupQuestion[];
81
+ /** Lar deg tilpasse meldingen som kommer når brukeren har svart på spørsmålene. */
82
+ successMessage?: {
83
+ title: string;
84
+ children: ReactNode;
85
+ };
86
+ onSubmit: (values: FeedbackAnswer[]) => void;
87
+ };
78
88
  export interface QuestionProps {
79
89
  type?: QuestionType;
80
90
  label: string;
@@ -83,4 +93,29 @@ export interface QuestionProps {
83
93
  options?: FeedbackOption[];
84
94
  autoFocus?: boolean;
85
95
  }
96
+ export type ContactQuestionProps = {
97
+ /**
98
+ * Lar deg tilpasse spørsmålsteksten.
99
+ * @default "Kan vi kontakte deg for flere innspill?"
100
+ * */
101
+ label?: string;
102
+ /**
103
+ * Lar deg tilpasse teksten på knappen for innsending.
104
+ * @default "Sett meg på lista!"
105
+ * */
106
+ sendButtonLabel?: string;
107
+ /** Sett til true om du også vil spørre om brukjerens telefonnummer i tillegg til epost */
108
+ withPhone?: boolean;
109
+ /** Her kan du legge inn eventuelt annet innhold du vil ha med. Kommer mellom overskriften og feltene for utfylling */
110
+ children?: ReactNode;
111
+ onSubmit: (values: {
112
+ email: string;
113
+ phone?: string;
114
+ }) => void;
115
+ /** Lar deg tilpasse meldingen som kommer når brukeren sender inn skjemaet. */
116
+ successMessage?: {
117
+ title: string;
118
+ children: ReactNode;
119
+ };
120
+ };
86
121
  export {};
@@ -1,2 +1 @@
1
- export type { IconButtonProps } from './IconButton.js';
2
- export { IconButton } from './IconButton.js';
1
+ export { IconButton, type IconButtonProps } from './IconButton.js';
@@ -1,3 +1 @@
1
- import { Image, ImageProps } from './Image.js';
2
- export type { ImageProps };
3
- export { Image };
1
+ export { Image, type ImageProps } from './Image.js';
@@ -14,6 +14,7 @@ export * from './icon/index.js';
14
14
  export * from './icon-button/index.js';
15
15
  export * from './image/index.js';
16
16
  export * from './input-group/index.js';
17
+ export * from './input-panel/index.js';
17
18
  export * from './link/index.js';
18
19
  export * from './link-list/index.js';
19
20
  export * from './list/index.js';
@@ -26,7 +27,6 @@ export * from './pagination/index.js';
26
27
  export * from './popover/index.js';
27
28
  export * from './progress-bar/index.js';
28
29
  export * from './radio-button/index.js';
29
- export * from './radio-panel/index.js';
30
30
  export * from './select/index.js';
31
31
  export * from './summary-table/index.js';
32
32
  export * from './system-message/index.js';
@@ -1,2 +1,2 @@
1
- import{Accordion as o}from"./accordion/Accordion.js";import{AccordionItem as a}from"./accordion/AccordionItem.js";import{Breadcrumb as s}from"./breadcrumb/Breadcrumb.js";import{BreadcrumbItem as e}from"./breadcrumb/BreadcrumbItem.js";import{Button as r,PrimaryButton as t,SecondaryButton as n,TertiaryButton as i}from"./button/Button.js";import{Card as m}from"./card/Card.js";import{CardImage as c}from"./card/CardImage.js";import{InfoBlock as l,NavCard as p}from"./card/NavCard.js";import{TaskCard as d}from"./card/TaskCard.js";import{InfoCard as u}from"./card/InfoCard.js";import{Checkbox as b}from"./checkbox/Checkbox.js";import{Combobox as f,getComboboxValuePair as T}from"./combobox/Combobox.js";import{CookieConsent as I}from"./cookie-consent/CookieConsent.js";import{CookieConsentProvider as j,useCookieConsent as g}from"./cookie-consent/CookieConsentContext.js";import{isCorrectFormat as C,isWithinLowerBound as k,isWithinUpperBound as S}from"./datepicker/validation.js";import{dayMonthYearRegex as x,formatInput as h,isBlurTargetOutside as B,parseDateString as L}from"./datepicker/utils.js";import{DatePicker as M}from"./datepicker/DatePicker.js";import{Feedback as v}from"./feedback/Feedback.js";import{PRESETS as w}from"./feedback/presets.js";import{Flex as A}from"./flex/Flex.js";import{DescriptionDetail as R,DescriptionList as P,DescriptionTerm as F}from"./description-list/DescriptionList.js";import{Expander as y}from"./expander/Expander.js";import{ExpandSection as D}from"./expander/ExpandSection.js";import{Icon as E}from"./icon/Icon.js";import{ArrowVerticalAnimated as G}from"./icon/icons/animated/ArrowVerticalAnimated.js";import{ArrowHorizontalAnimated as N}from"./icon/icons/animated/ArrowHorizontalAnimated.js";import{PlusRemoveAnimated as H}from"./icon/icons/animated/PlusRemoveAnimated.js";import{ArrowDownIcon as U}from"./icon/icons/ArrowDownIcon.js";import{ArrowLeftIcon as W}from"./icon/icons/ArrowLeftIcon.js";import{ArrowNorthEastIcon as V}from"./icon/icons/ArrowNorthEastIcon.js";import{ArrowRightIcon as O}from"./icon/icons/ArrowRightIcon.js";import{ArrowUpIcon as z}from"./icon/icons/ArrowUpIcon.js";import{CalendarIcon as Q}from"./icon/icons/CalendarIcon.js";import{CheckIcon as Y}from"./icon/icons/CheckIcon.js";import{ChevronDownIcon as q}from"./icon/icons/ChevronDownIcon.js";import{ChevronLeftIcon as J}from"./icon/icons/ChevronLeftIcon.js";import{ChevronRightIcon as K}from"./icon/icons/ChevronRightIcon.js";import{ChevronUpIcon as X}from"./icon/icons/ChevronUpIcon.js";import{CloseIcon as Z}from"./icon/icons/CloseIcon.js";import{CopyIcon as $}from"./icon/icons/CopyIcon.js";import{DotsIcon as _}from"./icon/icons/DotsIcon.js";import{DragIcon as oo}from"./icon/icons/DragIcon.js";import{ErrorIcon as ao}from"./icon/icons/ErrorIcon.js";import{GreenCheckIcon as so}from"./icon/icons/GreenCheckIcon.js";import{HamburgerIcon as eo}from"./icon/icons/HamburgerIcon.js";import{InfoIcon as ro}from"./icon/icons/InfoIcon.js";import{LinkIcon as to}from"./icon/icons/LinkIcon.js";import{PlusIcon as no}from"./icon/icons/PlusIcon.js";import{QuestionIcon as io}from"./icon/icons/QuestionIcon.js";import{RedCrossIcon as mo}from"./icon/icons/RedCrossIcon.js";import{SearchIcon as co}from"./icon/icons/SearchIcon.js";import{SuccessIcon as lo}from"./icon/icons/SuccessIcon.js";import{WarningIcon as po}from"./icon/icons/WarningIcon.js";import{MinusIcon as uo}from"./icon/icons/MinusIcon.js";import{ThumbDownIcon as bo}from"./icon/icons/ThumbDownIcon.js";import{ThumbUpIcon as fo}from"./icon/icons/ThumbUpIcon.js";import{TrashCanIcon as To}from"./icon/icons/TrashCanIcon.js";import{PenIcon as Io}from"./icon/icons/PenIcon.js";import{IconButton as jo}from"./icon-button/IconButton.js";import{Image as go}from"./image/Image.js";import{FieldGroup as Co}from"./input-group/FieldGroup.js";import{InputGroup as ko}from"./input-group/InputGroup.js";import{Label as So}from"./input-group/Label.js";import{SupportLabel as xo}from"./input-group/SupportLabel.js";import{Link as ho}from"./link/Link.js";import{NavLink as Bo}from"./link/NavLink.js";import{LinkList as Lo}from"./link-list/LinkList.js";import{List as Mo,OrderedList as vo,UnorderedList as wo}from"./list/List.js";import{CheckListItem as Ao,CrossListItem as Ro,ListItem as Po}from"./list/ListItem.js";import{Loader as Fo}from"./loader/Loader.js";import{SkeletonAnimation as yo}from"./loader/skeletons/SkeletonAnimation.js";import{SkeletonButton as Do}from"./loader/skeletons/SkeletonButton.js";import{SkeletonCheckboxGroup as Eo}from"./loader/skeletons/SkeletonCheckboxGroup.js";import{SkeletonElement as Go}from"./loader/skeletons/SkeletonElement.js";import{SkeletonInput as No}from"./loader/skeletons/SkeletonInput.js";import{SkeletonRadioButtonGroup as Ho}from"./loader/skeletons/SkeletonRadioButtonGroup.js";import{SkeletonTable as Uo,SkeletonTableHeader as Wo,SkeletonTableRow as Vo}from"./loader/skeletons/SkeletonTable.js";import{SkeletonTextArea as Oo}from"./loader/skeletons/SkeletonTextArea.js";import{Logo as zo}from"./logo/Logo.js";import{LogoStamp as Qo}from"./logo/LogoStamp.js";import{ForsikringLevertAvFremtind as Yo}from"./logo/text-paths/ForsikringLevertAvFremtind.js";import{FraSB1ogDNB as qo}from"./logo/text-paths/FraSB1ogDNB.js";import{InnovasjonFraFremtind as Jo}from"./logo/text-paths/InnovasjonFraFremtind.js";import{TeknologiFraFremtind as Ko}from"./logo/text-paths/TeknologiFraFremtind.js";import{VartEgetForsikringsselskap as Xo}from"./logo/text-paths/VartEgetForsikringsselskap.js";import{VartForsikringsselskap as Zo}from"./logo/text-paths/VartForsikringsselskap.js";import{Menu as $o}from"./menu/Menu.js";import{MenuItem as _o}from"./menu/MenuItem.js";import{MenuItemCheckbox as oa}from"./menu/MenuItemCheckbox.js";import{MenuDivider as aa}from"./menu/MenuDivider.js";import{ErrorMessage as sa,InfoMessage as ea,SuccessMessage as ra,WarningMessage as ta}from"./message/Message.js";import{FormErrorMessage as na}from"./message/FormErrorMessage.js";import{Modal as ia,ModalActions as ma,ModalBody as ca,ModalCloseButton as la,ModalContainer as pa,ModalHeader as da,ModalOverlay as ua,ModalTitle as ba}from"./modal/Modal.js";import{useModal as fa}from"./modal/useModal.js";import{Pagination as Ta}from"./pagination/Pagination.js";import{Popover as Ia}from"./popover/Popover.js";import{Countdown as ja}from"./progress-bar/Countdown.js";import{ProgressBar as ga}from"./progress-bar/ProgressBar.js";import{RadioButton as Ca}from"./radio-button/RadioButton.js";import{RadioButtonGroup as ka}from"./radio-button/RadioButtonGroup.js";import{BaseRadioButton as Sa}from"./radio-button/BaseRadioButton.js";import{RadioPanel as xa}from"./radio-panel/RadioPanel.js";import{Select as ha}from"./select/Select.js";import{NativeSelect as Ba}from"./select/NativeSelect.js";import{SummaryTable as La}from"./summary-table/SummaryTable.js";import{SummaryTableRow as Ma}from"./summary-table/SummaryTableRow.js";import{ErrorSystemMessage as va,InfoSystemMessage as wa,SuccessSystemMessage as Aa,WarningSystemMessage as Ra}from"./system-message/SystemMessage.js";import{DataTable as Pa}from"./table/DataTable.js";import{Table as Fa}from"./table/Table.js";import{TableBody as ya}from"./table/TableBody.js";import{TableCaption as Da}from"./table/TableCaption.js";import{TableCell as Ea}from"./table/TableCell.js";import{TableColumn as Ga}from"./table/TableColumn.js";import{TableColumnGroup as Na}from"./table/TableColumnGroup.js";import{TableContextProvider as Ha,useTableContext as Ua}from"./table/tableContext.js";import{TableSectionContextProvider as Wa,useTableSectionContext as Va}from"./table/tableSectionContext.js";import{TableFooter as Oa}from"./table/TableFooter.js";import{TableHead as za}from"./table/TableHead.js";import{TableHeader as Qa}from"./table/TableHeader.js";import{TablePagination as Ya}from"./table/TablePagination.js";import{TableRow as qa}from"./table/TableRow.js";import{ExpandableTableRow as Ja}from"./table/ExpandableTableRow.js";import{ExpandableTableRowController as Ka}from"./table/ExpandableTableRowController.js";import{useSortableTableHeader as Xa}from"./table/utils.js";import{NavTab as Za}from"./tabs/NavTab.js";import{NavTabs as $a}from"./tabs/NavTabs.js";import{Tabs as _a}from"./tabs/Tabs.js";import{TabList as os}from"./tabs/TabList.js";import{Tab as as}from"./tabs/Tab.js";import{TabPanel as ss}from"./tabs/TabPanel.js";import{ErrorTag as es,InfoTag as rs,SuccessTag as ts,Tag as ns,WarningTag as is}from"./tag/Tag.js";import{BaseTextArea as ms}from"./text-input/BaseTextArea.js";import{BaseTextInput as cs}from"./text-input/BaseTextInput.js";import{TextArea as ls}from"./text-input/TextArea.js";import{TextInput as ps}from"./text-input/TextInput.js";import{ToastProvider as ds,useToast as us}from"./toast/toastContext.js";import{ToggleSwitch as bs}from"./toggle-switch/ToggleSwitch.js";import{ToggleSlider as fs}from"./toggle-switch/ToggleSlider.js";import{Tooltip as Ts}from"./tooltip/Tooltip.js";import{TooltipContent as Is}from"./tooltip/TooltipContent.js";import{TooltipTrigger as js}from"./tooltip/TooltipTrigger.js";import{PopupTip as gs}from"./tooltip/PopupTip.js";import{ScreenReaderOnly as Cs}from"./ScreenReaderOnly.js";export{o as Accordion,a as AccordionItem,U as ArrowDownIcon,N as ArrowHorizontalAnimated,W as ArrowLeftIcon,V as ArrowNorthEastIcon,O as ArrowRightIcon,z as ArrowUpIcon,G as ArrowVerticalAnimated,Sa as BaseRadioButton,ms as BaseTextArea,cs as BaseTextInput,s as Breadcrumb,e as BreadcrumbItem,r as Button,Q as CalendarIcon,m as Card,c as CardImage,Y as CheckIcon,Ao as CheckListItem,b as Checkbox,q as ChevronDownIcon,J as ChevronLeftIcon,K as ChevronRightIcon,X as ChevronUpIcon,Z as CloseIcon,f as Combobox,I as CookieConsent,j as CookieConsentProvider,$ as CopyIcon,ja as Countdown,Ro as CrossListItem,Pa as DataTable,M as DatePicker,R as DescriptionDetail,P as DescriptionList,F as DescriptionTerm,_ as DotsIcon,oo as DragIcon,ao as ErrorIcon,sa as ErrorMessage,va as ErrorSystemMessage,es as ErrorTag,D as ExpandSection,Ja as ExpandableTableRow,Ka as ExpandableTableRowController,y as Expander,v as Feedback,Co as FieldGroup,A as Flex,na as FormErrorMessage,Yo as ForsikringLevertAvFremtind,qo as FraSB1ogDNB,so as GreenCheckIcon,eo as HamburgerIcon,E as Icon,jo as IconButton,go as Image,l as InfoBlock,u as InfoCard,ro as InfoIcon,ea as InfoMessage,wa as InfoSystemMessage,rs as InfoTag,Jo as InnovasjonFraFremtind,ko as InputGroup,So as Label,ho as Link,to as LinkIcon,Lo as LinkList,Mo as List,Po as ListItem,Fo as Loader,zo as Logo,Qo as LogoStamp,$o as Menu,aa as MenuDivider,_o as MenuItem,oa as MenuItemCheckbox,uo as MinusIcon,ia as Modal,ma as ModalActions,ca as ModalBody,la as ModalCloseButton,pa as ModalContainer,da as ModalHeader,ua as ModalOverlay,ba as ModalTitle,Ba as NativeSelect,p as NavCard,Bo as NavLink,Za as NavTab,$a as NavTabs,vo as OrderedList,w as PRESETS,Ta as Pagination,Io as PenIcon,no as PlusIcon,H as PlusRemoveAnimated,Ia as Popover,gs as PopupTip,t as PrimaryButton,ga as ProgressBar,io as QuestionIcon,Ca as RadioButton,ka as RadioButtonGroup,xa as RadioPanel,mo as RedCrossIcon,Cs as ScreenReaderOnly,co as SearchIcon,n as SecondaryButton,ha as Select,yo as SkeletonAnimation,Do as SkeletonButton,Eo as SkeletonCheckboxGroup,Go as SkeletonElement,No as SkeletonInput,Ho as SkeletonRadioButtonGroup,Uo as SkeletonTable,Wo as SkeletonTableHeader,Vo as SkeletonTableRow,Oo as SkeletonTextArea,lo as SuccessIcon,ra as SuccessMessage,Aa as SuccessSystemMessage,ts as SuccessTag,La as SummaryTable,Ma as SummaryTableRow,xo as SupportLabel,as as Tab,os as TabList,ss as TabPanel,Fa as Table,ya as TableBody,Da as TableCaption,Ea as TableCell,Ga as TableColumn,Na as TableColumnGroup,Ha as TableContextProvider,Oa as TableFooter,za as TableHead,Qa as TableHeader,Ya as TablePagination,qa as TableRow,Wa as TableSectionContextProvider,_a as Tabs,ns as Tag,d as TaskCard,Ko as TeknologiFraFremtind,i as TertiaryButton,ls as TextArea,ps as TextInput,bo as ThumbDownIcon,fo as ThumbUpIcon,ds as ToastProvider,fs as ToggleSlider,bs as ToggleSwitch,Ts as Tooltip,Is as TooltipContent,js as TooltipTrigger,To as TrashCanIcon,wo as UnorderedList,Xo as VartEgetForsikringsselskap,Zo as VartForsikringsselskap,po as WarningIcon,ta as WarningMessage,Ra as WarningSystemMessage,is as WarningTag,x as dayMonthYearRegex,h as formatInput,T as getComboboxValuePair,B as isBlurTargetOutside,C as isCorrectFormat,k as isWithinLowerBound,S as isWithinUpperBound,L as parseDateString,g as useCookieConsent,fa as useModal,Xa as useSortableTableHeader,Ua as useTableContext,Va as useTableSectionContext,us as useToast};
1
+ import{Accordion as o}from"./accordion/Accordion.js";import{AccordionItem as a}from"./accordion/AccordionItem.js";import{Breadcrumb as s}from"./breadcrumb/Breadcrumb.js";import{BreadcrumbItem as e}from"./breadcrumb/BreadcrumbItem.js";import{Button as r,PrimaryButton as t,SecondaryButton as n,TertiaryButton as i}from"./button/Button.js";import{Card as m}from"./card/Card.js";import{CardImage as l}from"./card/CardImage.js";import{InfoBlock as c,NavCard as p}from"./card/NavCard.js";import{TaskCard as d}from"./card/TaskCard.js";import{InfoCard as u}from"./card/InfoCard.js";import{Checkbox as b}from"./checkbox/Checkbox.js";import{Combobox as f,getComboboxValuePair as T}from"./combobox/Combobox.js";import{CookieConsent as I}from"./cookie-consent/CookieConsent.js";import{CookieConsentProvider as j,useCookieConsent as g}from"./cookie-consent/CookieConsentContext.js";import{DatePicker as C}from"./datepicker/DatePicker.js";import{isCorrectFormat as k,isWithinLowerBound as S,isWithinUpperBound as x}from"./datepicker/validation.js";import{formatInput as h,isBlurTargetOutside as B,parseDateString as L}from"./datepicker/utils.js";import{Feedback as v}from"./feedback/Feedback.js";import{PRESETS as M}from"./feedback/presets.js";import{Flex as w}from"./flex/Flex.js";import{DescriptionDetail as A,DescriptionList as P,DescriptionTerm as R}from"./description-list/DescriptionList.js";import{Expander as F}from"./expander/Expander.js";import{ExpandSection as D}from"./expander/ExpandSection.js";import{Icon as y}from"./icon/Icon.js";import{ArrowVerticalAnimated as E}from"./icon/icons/animated/ArrowVerticalAnimated.js";import{ArrowHorizontalAnimated as G}from"./icon/icons/animated/ArrowHorizontalAnimated.js";import{PlusRemoveAnimated as N}from"./icon/icons/animated/PlusRemoveAnimated.js";import{ArrowDownIcon as H}from"./icon/icons/ArrowDownIcon.js";import{ArrowLeftIcon as U}from"./icon/icons/ArrowLeftIcon.js";import{ArrowNorthEastIcon as W}from"./icon/icons/ArrowNorthEastIcon.js";import{ArrowRightIcon as V}from"./icon/icons/ArrowRightIcon.js";import{ArrowUpIcon as O}from"./icon/icons/ArrowUpIcon.js";import{CalendarIcon as z}from"./icon/icons/CalendarIcon.js";import{CheckIcon as Q}from"./icon/icons/CheckIcon.js";import{ChevronDownIcon as q}from"./icon/icons/ChevronDownIcon.js";import{ChevronLeftIcon as J}from"./icon/icons/ChevronLeftIcon.js";import{ChevronRightIcon as K}from"./icon/icons/ChevronRightIcon.js";import{ChevronUpIcon as X}from"./icon/icons/ChevronUpIcon.js";import{CloseIcon as Y}from"./icon/icons/CloseIcon.js";import{CopyIcon as Z}from"./icon/icons/CopyIcon.js";import{DotsIcon as $}from"./icon/icons/DotsIcon.js";import{DragIcon as _}from"./icon/icons/DragIcon.js";import{ErrorIcon as oo}from"./icon/icons/ErrorIcon.js";import{GreenCheckIcon as ao}from"./icon/icons/GreenCheckIcon.js";import{HamburgerIcon as so}from"./icon/icons/HamburgerIcon.js";import{InfoIcon as eo}from"./icon/icons/InfoIcon.js";import{LinkIcon as ro}from"./icon/icons/LinkIcon.js";import{PlusIcon as to}from"./icon/icons/PlusIcon.js";import{QuestionIcon as no}from"./icon/icons/QuestionIcon.js";import{RedCrossIcon as io}from"./icon/icons/RedCrossIcon.js";import{SearchIcon as mo}from"./icon/icons/SearchIcon.js";import{SuccessIcon as lo}from"./icon/icons/SuccessIcon.js";import{WarningIcon as co}from"./icon/icons/WarningIcon.js";import{MinusIcon as po}from"./icon/icons/MinusIcon.js";import{ThumbDownIcon as uo}from"./icon/icons/ThumbDownIcon.js";import{ThumbUpIcon as bo}from"./icon/icons/ThumbUpIcon.js";import{TrashCanIcon as fo}from"./icon/icons/TrashCanIcon.js";import{PenIcon as To}from"./icon/icons/PenIcon.js";import{IconButton as Io}from"./icon-button/IconButton.js";import{Image as jo}from"./image/Image.js";import{FieldGroup as go}from"./input-group/FieldGroup.js";import{InputGroup as Co}from"./input-group/InputGroup.js";import{Label as ko}from"./input-group/Label.js";import{SupportLabel as So}from"./input-group/SupportLabel.js";import{CheckboxPanel as xo}from"./input-panel/CheckboxPanel.js";import{RadioPanel as ho}from"./input-panel/RadioPanel.js";import{RadioPanelGroup as Bo}from"./input-panel/RadioPanelGroup.js";import{Link as Lo}from"./link/Link.js";import{NavLink as vo}from"./link/NavLink.js";import{LinkList as Mo}from"./link-list/LinkList.js";import{List as wo,OrderedList as Ao,UnorderedList as Po}from"./list/List.js";import{CheckListItem as Ro,CrossListItem as Fo,ListItem as Do}from"./list/ListItem.js";import{Loader as yo}from"./loader/Loader.js";import{SkeletonAnimation as Eo}from"./loader/skeletons/SkeletonAnimation.js";import{SkeletonButton as Go}from"./loader/skeletons/SkeletonButton.js";import{SkeletonCheckboxGroup as No}from"./loader/skeletons/SkeletonCheckboxGroup.js";import{SkeletonElement as Ho}from"./loader/skeletons/SkeletonElement.js";import{SkeletonInput as Uo}from"./loader/skeletons/SkeletonInput.js";import{SkeletonRadioButtonGroup as Wo}from"./loader/skeletons/SkeletonRadioButtonGroup.js";import{SkeletonTable as Vo,SkeletonTableHeader as Oo,SkeletonTableRow as zo}from"./loader/skeletons/SkeletonTable.js";import{SkeletonTextArea as Qo}from"./loader/skeletons/SkeletonTextArea.js";import{Logo as qo}from"./logo/Logo.js";import{LogoStamp as Jo}from"./logo/LogoStamp.js";import{ForsikringLevertAvFremtind as Ko}from"./logo/text-paths/ForsikringLevertAvFremtind.js";import{FraSB1ogDNB as Xo}from"./logo/text-paths/FraSB1ogDNB.js";import{InnovasjonFraFremtind as Yo}from"./logo/text-paths/InnovasjonFraFremtind.js";import{TeknologiFraFremtind as Zo}from"./logo/text-paths/TeknologiFraFremtind.js";import{VartEgetForsikringsselskap as $o}from"./logo/text-paths/VartEgetForsikringsselskap.js";import{VartForsikringsselskap as _o}from"./logo/text-paths/VartForsikringsselskap.js";import{Menu as oa}from"./menu/Menu.js";import{MenuItem as aa}from"./menu/MenuItem.js";import{MenuItemCheckbox as sa}from"./menu/MenuItemCheckbox.js";import{MenuDivider as ea}from"./menu/MenuDivider.js";import{ErrorMessage as ra,InfoMessage as ta,SuccessMessage as na,WarningMessage as ia}from"./message/Message.js";import{FormErrorMessage as ma}from"./message/FormErrorMessage.js";import{Modal as la,ModalActions as ca,ModalBody as pa,ModalCloseButton as da,ModalContainer as ua,ModalHeader as ba,ModalOverlay as fa,ModalTitle as Ta}from"./modal/Modal.js";import{useModal as Ia}from"./modal/useModal.js";import{Pagination as ja}from"./pagination/Pagination.js";import{Popover as ga}from"./popover/Popover.js";import{Countdown as Ca}from"./progress-bar/Countdown.js";import{ProgressBar as ka}from"./progress-bar/ProgressBar.js";import{RadioButton as Sa}from"./radio-button/RadioButton.js";import{RadioButtonGroup as xa}from"./radio-button/RadioButtonGroup.js";import{BaseRadioButton as ha}from"./radio-button/BaseRadioButton.js";import{Select as Ba}from"./select/Select.js";import{NativeSelect as La}from"./select/NativeSelect.js";import{SummaryTable as va}from"./summary-table/SummaryTable.js";import{SummaryTableRow as Ma}from"./summary-table/SummaryTableRow.js";import{ErrorSystemMessage as wa,InfoSystemMessage as Aa,SuccessSystemMessage as Pa,WarningSystemMessage as Ra}from"./system-message/SystemMessage.js";import{DataTable as Fa}from"./table/DataTable.js";import{Table as Da}from"./table/Table.js";import{TableBody as ya}from"./table/TableBody.js";import{TableCaption as Ea}from"./table/TableCaption.js";import{TableCell as Ga}from"./table/TableCell.js";import{TableColumn as Na}from"./table/TableColumn.js";import{TableColumnGroup as Ha}from"./table/TableColumnGroup.js";import{TableContextProvider as Ua,useTableContext as Wa}from"./table/tableContext.js";import{TableSectionContextProvider as Va,useTableSectionContext as Oa}from"./table/tableSectionContext.js";import{TableFooter as za}from"./table/TableFooter.js";import{TableHead as Qa}from"./table/TableHead.js";import{TableHeader as qa}from"./table/TableHeader.js";import{TablePagination as Ja}from"./table/TablePagination.js";import{TableRow as Ka}from"./table/TableRow.js";import{ExpandableTableRow as Xa}from"./table/ExpandableTableRow.js";import{ExpandableTableRowController as Ya}from"./table/ExpandableTableRowController.js";import{useSortableTableHeader as Za}from"./table/utils.js";import{NavTab as $a}from"./tabs/NavTab.js";import{NavTabs as _a}from"./tabs/NavTabs.js";import{Tabs as os}from"./tabs/Tabs.js";import{TabList as as}from"./tabs/TabList.js";import{Tab as ss}from"./tabs/Tab.js";import{TabPanel as es}from"./tabs/TabPanel.js";import{ErrorTag as rs,InfoTag as ts,SuccessTag as ns,Tag as is,WarningTag as ms}from"./tag/Tag.js";import{BaseTextArea as ls}from"./text-input/BaseTextArea.js";import{BaseTextInput as cs}from"./text-input/BaseTextInput.js";import{TextArea as ps}from"./text-input/TextArea.js";import{TextInput as ds}from"./text-input/TextInput.js";import{ToastProvider as us,useToast as bs}from"./toast/toastContext.js";import{ToggleSwitch as fs}from"./toggle-switch/ToggleSwitch.js";import{ToggleSlider as Ts}from"./toggle-switch/ToggleSlider.js";import{Tooltip as Is}from"./tooltip/Tooltip.js";import{TooltipContent as js}from"./tooltip/TooltipContent.js";import{TooltipTrigger as gs}from"./tooltip/TooltipTrigger.js";import{PopupTip as Cs}from"./tooltip/PopupTip.js";import{ScreenReaderOnly as ks}from"./ScreenReaderOnly.js";export{o as Accordion,a as AccordionItem,H as ArrowDownIcon,G as ArrowHorizontalAnimated,U as ArrowLeftIcon,W as ArrowNorthEastIcon,V as ArrowRightIcon,O as ArrowUpIcon,E as ArrowVerticalAnimated,ha as BaseRadioButton,ls as BaseTextArea,cs as BaseTextInput,s as Breadcrumb,e as BreadcrumbItem,r as Button,z as CalendarIcon,m as Card,l as CardImage,Q as CheckIcon,Ro as CheckListItem,b as Checkbox,xo as CheckboxPanel,q as ChevronDownIcon,J as ChevronLeftIcon,K as ChevronRightIcon,X as ChevronUpIcon,Y as CloseIcon,f as Combobox,I as CookieConsent,j as CookieConsentProvider,Z as CopyIcon,Ca as Countdown,Fo as CrossListItem,Fa as DataTable,C as DatePicker,A as DescriptionDetail,P as DescriptionList,R as DescriptionTerm,$ as DotsIcon,_ as DragIcon,oo as ErrorIcon,ra as ErrorMessage,wa as ErrorSystemMessage,rs as ErrorTag,D as ExpandSection,Xa as ExpandableTableRow,Ya as ExpandableTableRowController,F as Expander,v as Feedback,go as FieldGroup,w as Flex,ma as FormErrorMessage,Ko as ForsikringLevertAvFremtind,Xo as FraSB1ogDNB,ao as GreenCheckIcon,so as HamburgerIcon,y as Icon,Io as IconButton,jo as Image,c as InfoBlock,u as InfoCard,eo as InfoIcon,ta as InfoMessage,Aa as InfoSystemMessage,ts as InfoTag,Yo as InnovasjonFraFremtind,Co as InputGroup,ko as Label,Lo as Link,ro as LinkIcon,Mo as LinkList,wo as List,Do as ListItem,yo as Loader,qo as Logo,Jo as LogoStamp,oa as Menu,ea as MenuDivider,aa as MenuItem,sa as MenuItemCheckbox,po as MinusIcon,la as Modal,ca as ModalActions,pa as ModalBody,da as ModalCloseButton,ua as ModalContainer,ba as ModalHeader,fa as ModalOverlay,Ta as ModalTitle,La as NativeSelect,p as NavCard,vo as NavLink,$a as NavTab,_a as NavTabs,Ao as OrderedList,M as PRESETS,ja as Pagination,To as PenIcon,to as PlusIcon,N as PlusRemoveAnimated,ga as Popover,Cs as PopupTip,t as PrimaryButton,ka as ProgressBar,no as QuestionIcon,Sa as RadioButton,xa as RadioButtonGroup,ho as RadioPanel,Bo as RadioPanelGroup,io as RedCrossIcon,ks as ScreenReaderOnly,mo as SearchIcon,n as SecondaryButton,Ba as Select,Eo as SkeletonAnimation,Go as SkeletonButton,No as SkeletonCheckboxGroup,Ho as SkeletonElement,Uo as SkeletonInput,Wo as SkeletonRadioButtonGroup,Vo as SkeletonTable,Oo as SkeletonTableHeader,zo as SkeletonTableRow,Qo as SkeletonTextArea,lo as SuccessIcon,na as SuccessMessage,Pa as SuccessSystemMessage,ns as SuccessTag,va as SummaryTable,Ma as SummaryTableRow,So as SupportLabel,ss as Tab,as as TabList,es as TabPanel,Da as Table,ya as TableBody,Ea as TableCaption,Ga as TableCell,Na as TableColumn,Ha as TableColumnGroup,Ua as TableContextProvider,za as TableFooter,Qa as TableHead,qa as TableHeader,Ja as TablePagination,Ka as TableRow,Va as TableSectionContextProvider,os as Tabs,is as Tag,d as TaskCard,Zo as TeknologiFraFremtind,i as TertiaryButton,ps as TextArea,ds as TextInput,uo as ThumbDownIcon,bo as ThumbUpIcon,us as ToastProvider,Ts as ToggleSlider,fs as ToggleSwitch,Is as Tooltip,js as TooltipContent,gs as TooltipTrigger,fo as TrashCanIcon,Po as UnorderedList,$o as VartEgetForsikringsselskap,_o as VartForsikringsselskap,co as WarningIcon,ia as WarningMessage,Ra as WarningSystemMessage,ms as WarningTag,h as formatInput,T as getComboboxValuePair,B as isBlurTargetOutside,k as isCorrectFormat,S as isWithinLowerBound,x as isWithinUpperBound,L as parseDateString,g as useCookieConsent,Ia as useModal,Za as useSortableTableHeader,Wa as useTableContext,Oa as useTableSectionContext,bs as useToast};
2
2
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,10 @@
1
+ import { default as React, ComponentPropsWithRef, ReactNode } from 'react';
2
+ type Props = ComponentPropsWithRef<"input"> & {
3
+ isChecked: boolean;
4
+ alwaysOpen: boolean;
5
+ label: string;
6
+ extraLabel?: ReactNode;
7
+ type: "radio" | "checkbox";
8
+ };
9
+ export declare const BasePanel: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLInputElement>>;
10
+ export {};
@@ -0,0 +1,2 @@
1
+ import{jsxs as a,jsx as e}from"react/jsx-runtime";import{c as l}from"../../../clsx-BeLtu-UY.js";import{forwardRef as n,useId as s,Children as t}from"react";import{useAutoAnimatedHeight as i}from"../../hooks/useAnimatedHeight/useAutoAnimateHeight.js";const r=n((function({className:n,isChecked:r,children:p,alwaysOpen:c,label:o,extraLabel:d,type:m,...u},h){const j=`content-${s()}`,_=t.count(p)>0,k=i(r);return a("div",{className:l("jkl-input-panel",`jkl-${m}-panel`,n),children:[a("label",{className:"jkl-input-panel__label",children:[e("input",{ref:h,className:"jkl-input-panel__input",type:m,"aria-controls":c?void 0:j,"aria-expanded":c?void 0:r,...u}),e("span",{"aria-hidden":"true",className:`jkl-${m}-panel__decorator`}),e("span",{className:"jkl-input-panel__main-label",children:o}),e("span",{className:l("jkl-input-panel__extra-label",{"jkl-input-panel__extra-label--text":"string"==typeof d}),children:d})]}),_&&e("div",{ref:k,"aria-hidden":!r&&!c,children:e("div",{className:"jkl-input-panel__content",id:j,"data-alwaysopen":c,children:p})})]})}));export{r as BasePanel};
2
+ //# sourceMappingURL=BasePanel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BasePanel.js","sources":["../../../../src/components/input-panel/BasePanel.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, {\n Children,\n ComponentPropsWithRef,\n ForwardedRef,\n forwardRef,\n ReactNode,\n useId,\n} from \"react\";\nimport { useAutoAnimatedHeight } from \"../../hooks/useAnimatedHeight/useAutoAnimateHeight.js\";\n\ntype Props = ComponentPropsWithRef<\"input\"> & {\n isChecked: boolean;\n alwaysOpen: boolean;\n label: string;\n extraLabel?: ReactNode;\n type: \"radio\" | \"checkbox\";\n};\n\nexport const BasePanel = forwardRef(function BasePanel(\n {\n className,\n isChecked,\n children,\n alwaysOpen,\n label,\n extraLabel,\n type,\n ...rest\n }: Props,\n ref: ForwardedRef<HTMLInputElement>,\n) {\n const contentId = `content-${useId()}`;\n const hasChildren = Children.count(children) > 0;\n const animationRef = useAutoAnimatedHeight<HTMLDivElement>(isChecked);\n\n return (\n <div\n className={clsx(\"jkl-input-panel\", `jkl-${type}-panel`, className)}\n >\n <label className=\"jkl-input-panel__label\">\n <input\n ref={ref}\n className=\"jkl-input-panel__input\"\n type={type}\n aria-controls={!alwaysOpen ? contentId : undefined}\n aria-expanded={!alwaysOpen ? isChecked : undefined}\n {...rest}\n />\n <span\n aria-hidden=\"true\"\n className={`jkl-${type}-panel__decorator`}\n />\n <span className=\"jkl-input-panel__main-label\">{label}</span>\n <span\n className={clsx(\"jkl-input-panel__extra-label\", {\n \"jkl-input-panel__extra-label--text\":\n typeof extraLabel === \"string\",\n })}\n >\n {extraLabel}\n </span>\n </label>\n {hasChildren && (\n <div ref={animationRef} aria-hidden={!isChecked && !alwaysOpen}>\n <div\n className=\"jkl-input-panel__content\"\n id={contentId}\n data-alwaysopen={alwaysOpen}\n >\n {children}\n </div>\n </div>\n )}\n </div>\n );\n});\n"],"names":["BasePanel","forwardRef","className","isChecked","children","alwaysOpen","label","extraLabel","type","rest","ref","contentId","useId","hasChildren","Children","count","animationRef","useAutoAnimatedHeight","jsxs","clsx","jsx","id"],"mappings":"0PAmBa,MAAAA,EAAYC,GAAW,UAE5BC,UAAAA,EACAC,UAAAA,EACAC,SAAAA,EACAC,WAAAA,EACAC,MAAAA,EACAC,WAAAA,EACAC,KAAAA,KACGC,GAEPC,GAEM,MAAAC,EAAY,WAAWC,MACvBC,EAAcC,EAASC,MAAMX,GAAY,EACzCY,EAAeC,EAAsCd,GAGvD,OAAAe,EAAC,MAAA,CACGhB,UAAWiB,EAAK,kBAAmB,OAAOX,UAAcN,GAExDE,SAAA,CAACc,EAAA,QAAA,CAAMhB,UAAU,yBACbE,SAAA,CAAAgB,EAAC,QAAA,CACGV,IAAAA,EACAR,UAAU,yBACVM,KAAAA,EACA,gBAAgBH,OAAyB,EAAZM,EAC7B,gBAAgBN,OAAyB,EAAZF,KACzBM,IAERW,EAAC,OAAA,CACG,cAAY,OACZlB,UAAW,OAAOM,uBAErBY,EAAA,OAAA,CAAKlB,UAAU,8BAA+BE,SAAME,IACrDc,EAAC,OAAA,CACGlB,UAAWiB,EAAK,+BAAgC,CAC5C,qCAC0B,iBAAfZ,IAGdH,SAAAG,OAGRM,KACI,MAAI,CAAAH,IAAKM,EAAc,eAAcb,IAAcE,EAChDD,SAAAgB,EAAC,MAAA,CACGlB,UAAU,2BACVmB,GAAIV,EACJ,kBAAiBN,EAEhBD,SAAAA,QAMzB"}
@@ -0,0 +1,7 @@
1
+ import { default as React, ComponentPropsWithRef } from 'react';
2
+ export type CheckboxPanelProps = Omit<ComponentPropsWithRef<"input">, "type"> & {
3
+ label: string;
4
+ extraLabel?: React.ReactNode;
5
+ alwaysOpen?: boolean;
6
+ };
7
+ export declare const CheckboxPanel: React.ForwardRefExoticComponent<Omit<CheckboxPanelProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,2 @@
1
+ import{jsx as e}from"react/jsx-runtime";import{forwardRef as a,useState as t,useCallback as c}from"react";import{BasePanel as r}from"./BasePanel.js";const s=a((function({label:a,extraLabel:s,alwaysOpen:l=!1,checked:o,defaultChecked:n,onChange:d,...f},h){const[k,u]=t(n||!1),p=c((e=>{null==d||d(e),u(e.target.checked)}),[d,u]),b=typeof o<"u";return e(r,{ref:h,type:"checkbox",isChecked:b?o:k,defaultChecked:n,checked:b?o:void 0,onChange:p,alwaysOpen:l,label:a,extraLabel:s,...f})}));export{s as CheckboxPanel};
2
+ //# sourceMappingURL=CheckboxPanel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CheckboxPanel.js","sources":["../../../../src/components/input-panel/CheckboxPanel.tsx"],"sourcesContent":["import React, {\n ChangeEvent,\n ComponentPropsWithRef,\n ForwardedRef,\n forwardRef,\n useCallback,\n useState,\n} from \"react\";\nimport { BasePanel } from \"./BasePanel.js\";\n\nexport type CheckboxPanelProps = Omit<\n ComponentPropsWithRef<\"input\">,\n \"type\"\n> & {\n label: string;\n extraLabel?: React.ReactNode;\n alwaysOpen?: boolean;\n};\n\nexport const CheckboxPanel = forwardRef(function CheckboxPanel(\n {\n label,\n extraLabel,\n alwaysOpen = false,\n checked,\n defaultChecked,\n onChange,\n ...rest\n }: CheckboxPanelProps,\n ref: ForwardedRef<HTMLInputElement>,\n) {\n const [_isChecked, setIsChecked] = useState(defaultChecked || false);\n\n const handleChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n onChange?.(e);\n setIsChecked(e.target.checked);\n },\n [onChange, setIsChecked],\n );\n\n const isControlled = typeof checked !== \"undefined\";\n const isChecked = isControlled ? checked : _isChecked;\n\n return (\n <BasePanel\n ref={ref}\n type=\"checkbox\"\n isChecked={isChecked}\n defaultChecked={defaultChecked}\n checked={isControlled ? checked : undefined}\n onChange={handleChange}\n alwaysOpen={alwaysOpen}\n label={label}\n extraLabel={extraLabel}\n {...rest}\n />\n );\n});\n"],"names":["CheckboxPanel","forwardRef","label","extraLabel","alwaysOpen","checked","defaultChecked","onChange","rest","ref","_isChecked","setIsChecked","useState","handleChange","useCallback","e","target","isControlled","jsx","BasePanel","type","isChecked"],"mappings":"qJAmBa,MAAAA,EAAgBC,GAAW,UAEhCC,MAAAA,EACAC,WAAAA,EACAC,WAAAA,GAAa,EACbC,QAAAA,EACAC,eAAAA,EACAC,SAAAA,KACGC,GAEPC,GAEM,MAACC,EAAYC,GAAgBC,EAASN,IAAkB,GAExDO,EAAeC,GAChBC,IACG,MAAAR,GAAAA,EAAWQ,GACEJ,EAAAI,EAAEC,OAAOX,QAAO,GAEjC,CAACE,EAAUI,IAGTM,SAAsBZ,EAAY,IAIpC,OAAAa,EAACC,EAAA,CACGV,IAAAA,EACAW,KAAK,WACLC,UANUJ,EAAeZ,EAAUK,EAOnCJ,eAAAA,EACAD,QAASY,EAAeZ,OAAU,EAClCE,SAAUM,EACVT,WAAAA,EACAF,MAAAA,EACAC,WAAAA,KACIK,GAGhB"}
@@ -1,10 +1,8 @@
1
1
  import { default as React, ComponentPropsWithRef } from 'react';
2
- type Props = Omit<ComponentPropsWithRef<"input">, "type"> & {
3
- name: string;
2
+ export type RadioPanelProps = Omit<ComponentPropsWithRef<"input">, "type" | "aria-invalid"> & {
4
3
  value: string;
5
4
  label: string;
6
5
  extraLabel?: React.ReactNode;
7
6
  alwaysOpen?: boolean;
8
7
  };
9
- export declare const RadioPanel: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
- export {};
8
+ export declare const RadioPanel: React.ForwardRefExoticComponent<Omit<RadioPanelProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,2 @@
1
+ import{jsx as e}from"react/jsx-runtime";import{forwardRef as a,useContext as o,useCallback as r,useEffect as n}from"react";import{BasePanel as l}from"./BasePanel.js";import{context as t}from"./radioPanelContext.js";const s=a((function({alwaysOpen:a=!1,label:s,extraLabel:i,checked:d,onChange:u,value:c,defaultChecked:f,...p},h){const{onValueChange:w,checkedValue:k}=o(t),m=r((e=>{if(null==u||u(e),!w)throw new Error("RadioPanel will not work properly when used outside a RadioPanelGroup");w(c)}),[u,w,c]);n((()=>{if(f){if(!w)throw new Error("RadioPanel will not work properly when used outside a RadioPanelGroup");w(c)}}),[]);const C=typeof d<"u";return e(l,{ref:h,type:"radio",value:c,isChecked:C?d:k===c,defaultChecked:f,checked:C?d:void 0,onChange:m,alwaysOpen:a,label:s,extraLabel:i,...p})}));export{s as RadioPanel};
2
+ //# sourceMappingURL=RadioPanel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioPanel.js","sources":["../../../../src/components/input-panel/RadioPanel.tsx"],"sourcesContent":["import React, {\n ChangeEvent,\n ComponentPropsWithRef,\n ForwardedRef,\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n} from \"react\";\nimport { BasePanel } from \"./BasePanel.js\";\nimport { context } from \"./radioPanelContext.js\";\n\n// aria-invalid has been deprecated for the \"radio\" role, it should go on the\n// parent radiogroup\nexport type RadioPanelProps = Omit<\n ComponentPropsWithRef<\"input\">,\n \"type\" | \"aria-invalid\"\n> & {\n value: string;\n label: string;\n extraLabel?: React.ReactNode;\n alwaysOpen?: boolean;\n};\n\nexport const RadioPanel = forwardRef(function RadioPanel(\n {\n alwaysOpen = false,\n label,\n extraLabel,\n checked,\n onChange,\n value,\n defaultChecked,\n ...rest\n }: RadioPanelProps,\n ref: ForwardedRef<HTMLInputElement>,\n) {\n const { onValueChange, checkedValue } = useContext(context);\n\n const handleChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n onChange?.(e);\n if (!onValueChange) {\n throw new Error(\n \"RadioPanel will not work properly when used outside a RadioPanelGroup\",\n );\n }\n onValueChange(value);\n },\n [onChange, onValueChange, value],\n );\n\n useEffect(() => {\n if (defaultChecked) {\n if (!onValueChange) {\n throw new Error(\n \"RadioPanel will not work properly when used outside a RadioPanelGroup\",\n );\n }\n onValueChange(value);\n }\n // We never want to rerun this effect. Changing the default value after the\n // input control is first mounted should not cause any updates\n /* eslint-disable-next-line react-hooks/exhaustive-deps */\n }, []);\n\n const isControlled = typeof checked !== \"undefined\";\n const isChecked = isControlled ? checked : checkedValue === value;\n\n return (\n <BasePanel\n ref={ref}\n type=\"radio\"\n value={value}\n isChecked={isChecked}\n defaultChecked={defaultChecked}\n checked={isControlled ? checked : undefined}\n onChange={handleChange}\n alwaysOpen={alwaysOpen}\n label={label}\n extraLabel={extraLabel}\n {...rest}\n />\n );\n});\n"],"names":["RadioPanel","forwardRef","alwaysOpen","label","extraLabel","checked","onChange","value","defaultChecked","rest","ref","onValueChange","checkedValue","useContext","context","handleChange","useCallback","e","Error","useEffect","isControlled","jsx","BasePanel","type","isChecked"],"mappings":"uNAwBa,MAAAA,EAAaC,GAAW,UAE7BC,WAAAA,GAAa,EACbC,MAAAA,EACAC,WAAAA,EACAC,QAAAA,EACAC,SAAAA,EACAC,MAAAA,EACAC,eAAAA,KACGC,GAEPC,GAEM,MAAEC,cAAAA,EAAeC,aAAAA,GAAiBC,EAAWC,GAE7CC,EAAeC,GAChBC,IAEG,GADA,MAAAX,GAAAA,EAAWW,IACNN,EACD,MAAM,IAAIO,MACN,yEAGRP,EAAcJ,EAAK,GAEvB,CAACD,EAAUK,EAAeJ,IAG9BY,GAAU,KACN,GAAIX,EAAgB,CAChB,IAAKG,EACD,MAAM,IAAIO,MACN,yEAGRP,EAAcJ,EAClB,IAID,IAEGa,MAAAA,SAAsBf,EAAY,IAIpC,OAAAgB,EAACC,EAAA,CACGZ,IAAAA,EACAa,KAAK,QACLhB,MAAAA,EACAiB,UAPUJ,EAAef,EAAUO,IAAiBL,EAQpDC,eAAAA,EACAH,QAASe,EAAef,OAAU,EAClCC,SAAUS,EACVb,WAAAA,EACAC,MAAAA,EACAC,WAAAA,KACIK,GAGhB"}
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { FieldGroupProps } from '../input-group/FieldGroup.js';
3
+ export type RadioPanelGroupProps = FieldGroupProps & {};
4
+ export declare const RadioPanelGroup: FC<RadioPanelGroupProps>;
@@ -0,0 +1,2 @@
1
+ import{jsx as r}from"react/jsx-runtime";import{useState as e}from"react";import{FieldGroup as a}from"../input-group/FieldGroup.js";import{context as o}from"./radioPanelContext.js";const t=({className:t,...i})=>{const[s,l]=e();return r(o.Provider,{value:{checkedValue:s,onValueChange:r=>{l(r)}},children:r(a,{className:t,role:"radiogroup","aria-invalid":!!i.errorLabel,...i})})};export{t as RadioPanelGroup};
2
+ //# sourceMappingURL=RadioPanelGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioPanelGroup.js","sources":["../../../../src/components/input-panel/RadioPanelGroup.tsx"],"sourcesContent":["import React, { FC, useState } from \"react\";\nimport { FieldGroup, FieldGroupProps } from \"../input-group/FieldGroup.js\";\nimport { context } from \"./radioPanelContext.js\";\n\nexport type RadioPanelGroupProps = FieldGroupProps & {};\n\nexport const RadioPanelGroup: FC<RadioPanelGroupProps> = ({\n className,\n ...rest\n}) => {\n const [checkedValue, setCheckedValue] = useState<string>();\n\n const onChange = (value: string) => {\n setCheckedValue(value);\n };\n\n return (\n <context.Provider value={{ checkedValue, onValueChange: onChange }}>\n <FieldGroup\n className={className}\n role=\"radiogroup\"\n aria-invalid={!!rest.errorLabel}\n {...rest}\n />\n </context.Provider>\n );\n};\n"],"names":["RadioPanelGroup","className","rest","checkedValue","setCheckedValue","useState","jsx","context","Provider","value","onValueChange","children","FieldGroup","role","errorLabel"],"mappings":"oLAMO,MAAMA,EAA4C,EACrDC,UAAAA,KACGC,MAEG,MAACC,EAAcC,GAAmBC,IAOpC,OAAAC,EAACC,EAAQC,SAAR,CAAiBC,MAAO,CAAEN,aAAAA,EAAcO,cAL3BD,IACdL,EAAgBK,EAAK,GAKjBE,SAAAL,EAACM,EAAA,CACGX,UAAAA,EACAY,KAAK,aACL,iBAAgBX,EAAKY,cACjBZ,KAEZ"}
@@ -0,0 +1,4 @@
1
+ import { ExampleComponentProps, ExampleKnobsProps } from 'doc-utils/index.js';
2
+ import { FC } from 'react';
3
+ export declare const knobs: ExampleKnobsProps;
4
+ export declare const ControlledExample: FC<ExampleComponentProps>;
@@ -0,0 +1,4 @@
1
+ import { ExampleComponentProps, ExampleKnobsProps } from 'doc-utils/index.js';
2
+ import { FC } from 'react';
3
+ export declare const knobs: ExampleKnobsProps;
4
+ export declare const UncontrolledExample: FC<ExampleComponentProps>;
@@ -0,0 +1,4 @@
1
+ import { ExampleComponentProps, ExampleKnobsProps } from 'doc-utils/index.js';
2
+ import { FC } from 'react';
3
+ export declare const knobs: ExampleKnobsProps;
4
+ export declare const ControlledExample: FC<ExampleComponentProps>;
@@ -0,0 +1,4 @@
1
+ import { ExampleComponentProps, ExampleKnobsProps } from 'doc-utils/index.js';
2
+ import { FC } from 'react';
3
+ export declare const knobs: ExampleKnobsProps;
4
+ export declare const UncontrolledExample: FC<ExampleComponentProps>;
@@ -0,0 +1,3 @@
1
+ export { CheckboxPanel, type CheckboxPanelProps } from './CheckboxPanel.js';
2
+ export { RadioPanel, type RadioPanelProps } from './RadioPanel.js';
3
+ export { RadioPanelGroup, type RadioPanelGroupProps, } from './RadioPanelGroup.js';
@@ -0,0 +1,2 @@
1
+ import{CheckboxPanel as a}from"./CheckboxPanel.js";import{RadioPanel as o}from"./RadioPanel.js";import{RadioPanelGroup as e}from"./RadioPanelGroup.js";export{a as CheckboxPanel,o as RadioPanel,e as RadioPanelGroup};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" resolution-mode="require"/>
2
+ type Context = {
3
+ checkedValue?: string;
4
+ onValueChange?: (value: string) => void;
5
+ };
6
+ export declare const context: import('react').Context<Context>;
7
+ export {};
@@ -0,0 +1,2 @@
1
+ import{createContext as t}from"react";const e=t({});export{e as context};
2
+ //# sourceMappingURL=radioPanelContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radioPanelContext.js","sources":["../../../../src/components/input-panel/radioPanelContext.tsx"],"sourcesContent":["import { createContext } from \"react\";\n\ntype Context = {\n checkedValue?: string;\n onValueChange?: (value: string) => void;\n};\n\nexport const context = createContext<Context>({});\n"],"names":["context","createContext"],"mappings":"sCAOa,MAAAA,EAAUC,EAAuB,CAAE"}
@@ -1,16 +1,7 @@
1
1
  import { default as React } from 'react';
2
- import { PolymorphicPropsWithRef } from '../../utilities/polymorphism/polymorphism.js';
3
- type LinkComponent = <ElementType extends React.ElementType = "a">(props: PolymorphicPropsWithRef<ElementType>) => React.ReactElement | null;
4
- type UnorderedLinkListProps = React.HTMLAttributes<HTMLUListElement> & {
5
- variant: "unordered";
6
- };
7
- type OrderedLinkListProps = React.HTMLAttributes<HTMLOListElement> & {
8
- variant: "ordered";
9
- };
10
- type LinkListProps = UnorderedLinkListProps | OrderedLinkListProps;
2
+ import { ItemProps, LinkComponent, LinkListProps } from './types.js';
11
3
  export declare const LinkList: {
12
4
  ({ variant, className, ...rest }: LinkListProps): React.JSX.Element;
13
5
  Link: LinkComponent;
14
- Item: React.FC<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>>;
6
+ Item: ItemProps;
15
7
  };
16
- export {};
@@ -1 +1 @@
1
- {"version":3,"file":"LinkList.js","sources":["../../../../src/components/link-list/LinkList.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { ComponentProps, FC } from \"react\";\nimport {\n PolymorphicPropsWithRef,\n PolymorphicRef,\n} from \"../../utilities/polymorphism/polymorphism.js\";\nimport { ArrowRightIcon } from \"../icon/icons/ArrowRightIcon.js\";\n\nconst Item: FC<ComponentProps<\"li\">> = ({ className, ...rest }) => {\n return (\n <li className={clsx(\"jkl-link-list-item\", className)} {...rest}></li>\n );\n};\n\ntype LinkComponent = <ElementType extends React.ElementType = \"a\">(\n props: PolymorphicPropsWithRef<ElementType>,\n) => React.ReactElement | null;\n\nconst Link = React.forwardRef(function LinkListLink<\n ElementType extends React.ElementType = \"a\",\n>(\n props: PolymorphicPropsWithRef<ElementType>,\n ref: PolymorphicRef<ElementType>,\n) {\n const { as: Component = \"a\", children, className, ...rest } = props;\n\n return (\n <Component\n className={clsx(\"jkl-link-list-link\", className)}\n ref={ref}\n {...rest}\n >\n {children}\n <ArrowRightIcon className=\"jkl-link-list-link__arrow\" />\n </Component>\n );\n}) as LinkComponent;\n\ntype UnorderedLinkListProps = React.HTMLAttributes<HTMLUListElement> & {\n variant: \"unordered\";\n};\n\ntype OrderedLinkListProps = React.HTMLAttributes<HTMLOListElement> & {\n variant: \"ordered\";\n};\n\ntype LinkListProps = UnorderedLinkListProps | OrderedLinkListProps;\n\nexport const LinkList = ({\n variant,\n className,\n ...rest\n}: LinkListProps): React.JSX.Element => {\n const Component = variant === \"ordered\" ? \"ol\" : \"ul\";\n\n return (\n <Component\n className={clsx(\"jkl-link-list\", className, {\n \"jkl-link-list--ordered\": variant === \"ordered\",\n \"jkl-link-list--unordered\": variant === \"unordered\",\n })}\n {...rest}\n />\n );\n};\n\nLinkList.Link = Link;\nLinkList.Item = Item;\n"],"names":["Link","React","forwardRef","props","ref","as","Component","children","className","rest","jsxs","clsx","jsx","ArrowRightIcon","LinkList","variant","Item"],"mappings":"sLAQA,MAUMA,EAAOC,EAAMC,YAAW,SAG1BC,EACAC,GAEM,MAAEC,GAAIC,EAAY,IAAKC,SAAAA,EAAUC,UAAAA,KAAcC,GAASN,EAG1D,OAAAO,EAACJ,EAAA,CACGE,UAAWG,EAAK,qBAAsBH,GACtCJ,IAAAA,KACIK,EAEHF,SAAA,CAAAA,EACDK,EAACC,EAAe,CAAAL,UAAU,gCAGtC,IAYaM,EAAW,EACpBC,QAAAA,EACAP,UAAAA,KACGC,KAKCG,EAH0B,YAAZG,EAAwB,KAAO,KAG5C,CACGP,UAAWG,EAAK,gBAAiBH,EAAW,CACxC,yBAAsC,YAAZO,EAC1B,2BAAwC,cAAZA,OAE5BN,IAKhBK,EAASd,KAAOA,EAChBc,EAASE,KA3D8B,EAAGR,UAAAA,KAAcC,KAEhDG,EAAC,MAAGJ,UAAWG,EAAK,qBAAsBH,MAAgBC"}
1
+ {"version":3,"file":"LinkList.js","sources":["../../../../src/components/link-list/LinkList.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React from \"react\";\nimport {\n PolymorphicPropsWithRef,\n PolymorphicRef,\n} from \"../../utilities/polymorphism/polymorphism.js\";\nimport { ArrowRightIcon } from \"../icon/icons/ArrowRightIcon.js\";\nimport { ItemProps, LinkComponent, LinkListProps } from \"./types.js\";\n\nconst Item: ItemProps = ({ className, ...rest }) => {\n return (\n <li className={clsx(\"jkl-link-list-item\", className)} {...rest}></li>\n );\n};\n\nconst Link = React.forwardRef(function LinkListLink<\n ElementType extends React.ElementType = \"a\",\n>(\n props: PolymorphicPropsWithRef<ElementType>,\n ref: PolymorphicRef<ElementType>,\n) {\n const { as: Component = \"a\", children, className, ...rest } = props;\n\n return (\n <Component\n className={clsx(\"jkl-link-list-link\", className)}\n ref={ref}\n {...rest}\n >\n {children}\n <ArrowRightIcon className=\"jkl-link-list-link__arrow\" />\n </Component>\n );\n}) as LinkComponent;\n\nexport const LinkList = ({\n variant,\n className,\n ...rest\n}: LinkListProps): React.JSX.Element => {\n const Component = variant === \"ordered\" ? \"ol\" : \"ul\";\n\n return (\n <Component\n className={clsx(\"jkl-link-list\", className, {\n \"jkl-link-list--ordered\": variant === \"ordered\",\n \"jkl-link-list--unordered\": variant === \"unordered\",\n })}\n {...rest}\n />\n );\n};\n\nLinkList.Link = Link;\nLinkList.Item = Item;\n"],"names":["Link","React","forwardRef","props","ref","as","Component","children","className","rest","jsxs","clsx","jsx","ArrowRightIcon","LinkList","variant","Item"],"mappings":"sLASA,MAMMA,EAAOC,EAAMC,YAAW,SAG1BC,EACAC,GAEM,MAAEC,GAAIC,EAAY,IAAKC,SAAAA,EAAUC,UAAAA,KAAcC,GAASN,EAG1D,OAAAO,EAACJ,EAAA,CACGE,UAAWG,EAAK,qBAAsBH,GACtCJ,IAAAA,KACIK,EAEHF,SAAA,CAAAA,EACDK,EAACC,EAAe,CAAAL,UAAU,gCAGtC,IAEaM,EAAW,EACpBC,QAAAA,EACAP,UAAAA,KACGC,KAKCG,EAH0B,YAAZG,EAAwB,KAAO,KAG5C,CACGP,UAAWG,EAAK,gBAAiBH,EAAW,CACxC,yBAAsC,YAAZO,EAC1B,2BAAwC,cAAZA,OAE5BN,IAKhBK,EAASd,KAAOA,EAChBc,EAASE,KA7Ce,EAAGR,UAAAA,KAAcC,KAEjCG,EAAC,MAAGJ,UAAWG,EAAK,qBAAsBH,MAAgBC"}
@@ -1 +1,2 @@
1
1
  export { LinkList } from './LinkList.js';
2
+ export { type LinkListProps, type UnorderedLinkListProps, type OrderedLinkListProps, type LinkComponent, type ItemProps, } from './types.js';
@@ -0,0 +1,11 @@
1
+ import { ComponentProps, FC } from 'react';
2
+ import { PolymorphicPropsWithRef } from '../../utilities/polymorphism/polymorphism.js';
3
+ export type UnorderedLinkListProps = React.HTMLAttributes<HTMLUListElement> & {
4
+ variant: "unordered";
5
+ };
6
+ export type OrderedLinkListProps = React.HTMLAttributes<HTMLOListElement> & {
7
+ variant: "ordered";
8
+ };
9
+ export type LinkListProps = UnorderedLinkListProps | OrderedLinkListProps;
10
+ export type LinkComponent = <ElementType extends React.ElementType = "a">(props: PolymorphicPropsWithRef<ElementType>) => React.ReactElement | null;
11
+ export type ItemProps = FC<ComponentProps<"li">>;
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,3 +1,2 @@
1
- export type { ListProps } from './List.js';
2
- export { UnorderedList, OrderedList, List } from './List.js';
3
- export { ListItem, CheckListItem, CrossListItem } from './ListItem.js';
1
+ export { UnorderedList, OrderedList, List, type ListProps } from './List.js';
2
+ export { ListItem, CheckListItem, CrossListItem, type ListItemProps, } from './ListItem.js';
@@ -1,18 +1,9 @@
1
- export { Loader } from './Loader.js';
2
- export type { LoaderVariant, LoaderProps } from './Loader.js';
3
- export type { SkeletonAnimationProps } from './skeletons/SkeletonAnimation.js';
4
- export { SkeletonAnimation } from './skeletons/SkeletonAnimation.js';
5
- export type { SkeletonButtonProps } from './skeletons/SkeletonButton.js';
6
- export { SkeletonButton } from './skeletons/SkeletonButton.js';
7
- export type { SkeletonCheckboxGroupProps } from './skeletons/SkeletonCheckboxGroup.js';
8
- export { SkeletonCheckboxGroup } from './skeletons/SkeletonCheckboxGroup.js';
9
- export type { SkeletonElementProps } from './skeletons/SkeletonElement.js';
10
- export { SkeletonElement } from './skeletons/SkeletonElement.js';
11
- export type { SkeletonInputProps } from './skeletons/SkeletonInput.js';
12
- export { SkeletonInput } from './skeletons/SkeletonInput.js';
13
- export type { SkeletonRadioButtonGroupProps } from './skeletons/SkeletonRadioButtonGroup.js';
14
- export { SkeletonRadioButtonGroup } from './skeletons/SkeletonRadioButtonGroup.js';
15
- export type { SkeletonTableProps, SkeletonTableHeaderProps, SkeletonTableRowProps, } from './skeletons/SkeletonTable.js';
16
- export { SkeletonTable, SkeletonTableHeader, SkeletonTableRow, } from './skeletons/SkeletonTable.js';
17
- export type { SkeletonTextAreaProps } from './skeletons/SkeletonTextArea.js';
18
- export { SkeletonTextArea } from './skeletons/SkeletonTextArea.js';
1
+ export { Loader, type LoaderVariant, type LoaderProps } from './Loader.js';
2
+ export { SkeletonAnimation, type SkeletonAnimationProps, } from './skeletons/SkeletonAnimation.js';
3
+ export { SkeletonButton, type SkeletonButtonProps, } from './skeletons/SkeletonButton.js';
4
+ export { SkeletonCheckboxGroup, type SkeletonCheckboxGroupProps, } from './skeletons/SkeletonCheckboxGroup.js';
5
+ export { SkeletonElement, type SkeletonElementProps, } from './skeletons/SkeletonElement.js';
6
+ export { SkeletonInput, type SkeletonInputProps, } from './skeletons/SkeletonInput.js';
7
+ export { SkeletonRadioButtonGroup, type SkeletonRadioButtonGroupProps, } from './skeletons/SkeletonRadioButtonGroup.js';
8
+ export { SkeletonTable, SkeletonTableHeader, SkeletonTableRow, type SkeletonTableProps, type SkeletonTableHeaderProps, type SkeletonTableRowProps, } from './skeletons/SkeletonTable.js';
9
+ export { SkeletonTextArea, type SkeletonTextAreaProps, } from './skeletons/SkeletonTextArea.js';
@@ -1,5 +1,3 @@
1
- export type { LogoProps } from './Logo.js';
2
- export { Logo } from './Logo.js';
3
- export type { LogoStampProps } from './LogoStamp.js';
4
- export { LogoStamp } from './LogoStamp.js';
1
+ export { Logo, type LogoProps } from './Logo.js';
2
+ export { LogoStamp, type LogoStampProps } from './LogoStamp.js';
5
3
  export { ForsikringLevertAvFremtind, FraSB1ogDNB, InnovasjonFraFremtind, TeknologiFraFremtind, VartEgetForsikringsselskap, VartForsikringsselskap, } from './text-paths/index.js';
@@ -1,6 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  import { WithOptionalChildren } from '../../core/types.js';
3
3
  import { IconButtonProps } from '../icon-button/IconButton.js';
4
+ import { ModalConfig } from './useModal.js';
4
5
  export interface ModalProps extends WithOptionalChildren {
5
6
  id?: string;
6
7
  className?: string;
@@ -11,7 +12,7 @@ export interface ModalProps extends WithOptionalChildren {
11
12
  */
12
13
  padding?: 16 | 24 | 40;
13
14
  }
14
- type BaseModalProps = Omit<ModalProps, "padding" | "component">;
15
+ export type BaseModalProps = Omit<ModalProps, "padding" | "component">;
15
16
  /**
16
17
  * Ment å brukes med `useModal`.
17
18
  */
@@ -23,6 +24,12 @@ export declare const ModalContainer: React.ForwardRefExoticComponent<Omit<{
23
24
  'aria-hidden': boolean;
24
25
  'aria-labelledby': string;
25
26
  } & BaseModalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
27
+ export type ModalOverlayProps = ModalConfig["overlay"] & BaseModalProps & {
28
+ /**
29
+ * Rendre uten bakgrunnsfarge, men med click target for å lukke modalen ved klikk utenfor.
30
+ */
31
+ transparent?: boolean;
32
+ };
26
33
  /**
27
34
  * Ment å brukes med `useModal`.
28
35
  */
@@ -69,4 +76,3 @@ export declare const ModalBody: React.ForwardRefExoticComponent<BaseModalProps &
69
76
  * Ment å brukes med `useModal`.
70
77
  */
71
78
  export declare const ModalActions: React.ForwardRefExoticComponent<BaseModalProps & React.RefAttributes<HTMLDivElement>>;
72
- export {};