@fremtind/jokul 0.12.1 → 0.14.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 (418) hide show
  1. package/build/ExpandableTableRow-BJSqC_Jo.js +2 -0
  2. package/build/ExpandableTableRow-BJSqC_Jo.js.map +1 -0
  3. package/build/ExpandableTableRow-BQjBxKCX.cjs +2 -0
  4. package/build/ExpandableTableRow-BQjBxKCX.cjs.map +1 -0
  5. package/build/build-stats.html +1 -1
  6. package/build/cjs/components/description-list/DescriptionList.js +2 -0
  7. package/build/cjs/components/description-list/DescriptionList.js.map +1 -0
  8. package/build/cjs/components/description-list/index.js +2 -0
  9. package/build/cjs/components/description-list/index.js.map +1 -0
  10. package/build/cjs/components/expander/ExpandSection.js +2 -0
  11. package/build/cjs/components/expander/ExpandSection.js.map +1 -0
  12. package/build/cjs/components/expander/Expander.js +2 -0
  13. package/build/cjs/components/expander/Expander.js.map +1 -0
  14. package/build/cjs/components/expander/index.js +2 -0
  15. package/build/cjs/components/expander/index.js.map +1 -0
  16. package/build/cjs/components/feedback/Feedback.js +1 -1
  17. package/build/cjs/components/feedback/Feedback.js.map +1 -1
  18. package/build/cjs/components/feedback/feedbackContext.js.map +1 -1
  19. package/build/cjs/components/feedback/followup/Followup.js +1 -1
  20. package/build/cjs/components/feedback/followup/Followup.js.map +1 -1
  21. package/build/cjs/components/feedback/main-question/MainQuestion.js +1 -1
  22. package/build/cjs/components/feedback/main-question/MainQuestion.js.map +1 -1
  23. package/build/cjs/components/feedback/main-question/useMainQuestion.js +1 -1
  24. package/build/cjs/components/feedback/main-question/useMainQuestion.js.map +1 -1
  25. package/build/cjs/components/feedback/questions/ContactQuestion.js +1 -1
  26. package/build/cjs/components/feedback/questions/ContactQuestion.js.map +1 -1
  27. package/build/cjs/components/index.js +1 -1
  28. package/build/cjs/components/logo/Logo.js +2 -0
  29. package/build/cjs/components/logo/Logo.js.map +1 -0
  30. package/build/cjs/components/logo/LogoStamp.js +2 -0
  31. package/build/cjs/components/logo/LogoStamp.js.map +1 -0
  32. package/build/cjs/components/logo/index.js +2 -0
  33. package/build/cjs/components/logo/index.js.map +1 -0
  34. package/build/cjs/components/logo/text-paths/ForsikringLevertAvFremtind.js +2 -0
  35. package/build/cjs/components/logo/text-paths/ForsikringLevertAvFremtind.js.map +1 -0
  36. package/build/cjs/components/logo/text-paths/FraSB1ogDNB.js +2 -0
  37. package/build/cjs/components/logo/text-paths/FraSB1ogDNB.js.map +1 -0
  38. package/build/cjs/components/logo/text-paths/InnovasjonFraFremtind.js +2 -0
  39. package/build/cjs/components/logo/text-paths/InnovasjonFraFremtind.js.map +1 -0
  40. package/build/cjs/components/logo/text-paths/TeknologiFraFremtind.js +2 -0
  41. package/build/cjs/components/logo/text-paths/TeknologiFraFremtind.js.map +1 -0
  42. package/build/cjs/components/logo/text-paths/VartEgetForsikringsselskap.js +2 -0
  43. package/build/cjs/components/logo/text-paths/VartEgetForsikringsselskap.js.map +1 -0
  44. package/build/cjs/components/logo/text-paths/VartForsikringsselskap.js +2 -0
  45. package/build/cjs/components/logo/text-paths/VartForsikringsselskap.js.map +1 -0
  46. package/build/cjs/components/logo/text-paths/index.js +2 -0
  47. package/build/cjs/components/logo/text-paths/index.js.map +1 -0
  48. package/build/cjs/components/logo/useTextSpinner.js +2 -0
  49. package/build/cjs/components/logo/useTextSpinner.js.map +1 -0
  50. package/build/cjs/components/progress-bar/Countdown.js +2 -0
  51. package/build/cjs/components/progress-bar/Countdown.js.map +1 -0
  52. package/build/cjs/components/progress-bar/ProgressBar.js +2 -0
  53. package/build/cjs/components/progress-bar/ProgressBar.js.map +1 -0
  54. package/build/cjs/components/progress-bar/index.js +2 -0
  55. package/build/cjs/components/progress-bar/index.js.map +1 -0
  56. package/build/cjs/components/select/NativeSelect.js +1 -1
  57. package/build/cjs/components/select/Select.js +1 -1
  58. package/build/cjs/components/select/index.js +1 -1
  59. package/build/cjs/components/summary-table/SummaryTable.js +2 -0
  60. package/build/cjs/components/summary-table/SummaryTable.js.map +1 -0
  61. package/build/cjs/components/summary-table/SummaryTableRow.js +2 -0
  62. package/build/cjs/components/summary-table/SummaryTableRow.js.map +1 -0
  63. package/build/cjs/components/summary-table/index.js +2 -0
  64. package/build/cjs/components/summary-table/index.js.map +1 -0
  65. package/build/cjs/components/summary-table/mocks/index.js +2 -0
  66. package/build/cjs/components/summary-table/mocks/index.js.map +1 -0
  67. package/build/cjs/components/system-message/SystemMessage.js +2 -0
  68. package/build/cjs/components/system-message/SystemMessage.js.map +1 -0
  69. package/build/cjs/components/system-message/common/DismissButton.js +2 -0
  70. package/build/cjs/components/system-message/common/DismissButton.js.map +1 -0
  71. package/build/cjs/components/system-message/common/MessageIcon.js +2 -0
  72. package/build/cjs/components/system-message/common/MessageIcon.js.map +1 -0
  73. package/build/cjs/components/system-message/index.js +2 -0
  74. package/build/cjs/components/system-message/index.js.map +1 -0
  75. package/build/cjs/components/table/DataTable.js +2 -0
  76. package/build/cjs/components/table/DataTable.js.map +1 -0
  77. package/build/cjs/components/table/ExpandableTableRow.js +2 -0
  78. package/build/cjs/components/table/ExpandableTableRow.js.map +1 -0
  79. package/build/cjs/components/table/ExpandableTableRowController.js +2 -0
  80. package/build/cjs/components/table/ExpandableTableRowController.js.map +1 -0
  81. package/build/cjs/components/table/Table.js +2 -0
  82. package/build/cjs/components/table/Table.js.map +1 -0
  83. package/build/cjs/components/table/TableBody.js +2 -0
  84. package/build/cjs/components/table/TableBody.js.map +1 -0
  85. package/build/cjs/components/table/TableCaption.js +2 -0
  86. package/build/cjs/components/table/TableCaption.js.map +1 -0
  87. package/build/cjs/components/table/TableCell.js +2 -0
  88. package/build/cjs/components/table/TableCell.js.map +1 -0
  89. package/build/cjs/components/table/TableColumn.js +2 -0
  90. package/build/cjs/components/table/TableColumn.js.map +1 -0
  91. package/build/cjs/components/table/TableColumnGroup.js +2 -0
  92. package/build/cjs/components/table/TableColumnGroup.js.map +1 -0
  93. package/build/cjs/components/table/TableFooter.js +2 -0
  94. package/build/cjs/components/table/TableFooter.js.map +1 -0
  95. package/build/cjs/components/table/TableHead.js +2 -0
  96. package/build/cjs/components/table/TableHead.js.map +1 -0
  97. package/build/cjs/components/table/TableHeader.js +2 -0
  98. package/build/cjs/components/table/TableHeader.js.map +1 -0
  99. package/build/cjs/components/table/TablePagination.js +2 -0
  100. package/build/cjs/components/table/TablePagination.js.map +1 -0
  101. package/build/cjs/components/table/TableRow.js +2 -0
  102. package/build/cjs/components/table/TableRow.js.map +1 -0
  103. package/build/cjs/components/table/index.js +2 -0
  104. package/build/cjs/components/table/index.js.map +1 -0
  105. package/build/cjs/components/table/tableContext.js +2 -0
  106. package/build/cjs/components/table/tableContext.js.map +1 -0
  107. package/build/cjs/components/table/tableSectionContext.js +2 -0
  108. package/build/cjs/components/table/tableSectionContext.js.map +1 -0
  109. package/build/cjs/components/table/utils.js +2 -0
  110. package/build/cjs/components/table/utils.js.map +1 -0
  111. package/build/cjs/components/tabs/NavTab.js +2 -0
  112. package/build/cjs/components/tabs/NavTab.js.map +1 -0
  113. package/build/cjs/components/tabs/NavTabs.js +2 -0
  114. package/build/cjs/components/tabs/NavTabs.js.map +1 -0
  115. package/build/cjs/components/tabs/Tab.js +2 -0
  116. package/build/cjs/components/tabs/Tab.js.map +1 -0
  117. package/build/cjs/components/tabs/TabList.js +2 -0
  118. package/build/cjs/components/tabs/TabList.js.map +1 -0
  119. package/build/cjs/components/tabs/TabPanel.js +2 -0
  120. package/build/cjs/components/tabs/TabPanel.js.map +1 -0
  121. package/build/cjs/components/tabs/Tabs.js +2 -0
  122. package/build/cjs/components/tabs/Tabs.js.map +1 -0
  123. package/build/cjs/components/tabs/index.js +2 -0
  124. package/build/cjs/components/tabs/index.js.map +1 -0
  125. package/build/cjs/components/tabs/tabsContext.js +2 -0
  126. package/build/cjs/components/tabs/tabsContext.js.map +1 -0
  127. package/build/cjs/components/toast/Toast.js +2 -0
  128. package/build/cjs/components/toast/Toast.js.map +1 -0
  129. package/build/cjs/components/toast/ToastRegion.js +2 -0
  130. package/build/cjs/components/toast/ToastRegion.js.map +1 -0
  131. package/build/cjs/components/toast/index.js +2 -0
  132. package/build/cjs/components/toast/index.js.map +1 -0
  133. package/build/cjs/components/toast/toastContext.js +2 -0
  134. package/build/cjs/components/toast/toastContext.js.map +1 -0
  135. package/build/cjs/components/toast/types.js +2 -0
  136. package/build/cjs/components/toast/types.js.map +1 -0
  137. package/build/cjs/components/toggle-switch/ToggleSlider.js +2 -0
  138. package/build/cjs/components/toggle-switch/ToggleSlider.js.map +1 -0
  139. package/build/cjs/components/toggle-switch/ToggleSwitch.js +2 -0
  140. package/build/cjs/components/toggle-switch/ToggleSwitch.js.map +1 -0
  141. package/build/cjs/components/toggle-switch/index.js +2 -0
  142. package/build/cjs/components/toggle-switch/index.js.map +1 -0
  143. package/build/cjs/components/toggle-switch/usePillStyles.js +2 -0
  144. package/build/cjs/components/toggle-switch/usePillStyles.js.map +1 -0
  145. package/build/cjs/index.js +1 -1
  146. package/build/components/description-list/DescriptionList.d.ts +14 -0
  147. package/build/components/description-list/index.d.ts +1 -0
  148. package/build/components/expander/ExpandSection.d.ts +22 -0
  149. package/build/components/expander/Expander.d.ts +28 -0
  150. package/build/components/expander/index.d.ts +4 -0
  151. package/build/components/feedback/Feedback.d.ts +9 -1
  152. package/build/components/feedback/feedbackContext.d.ts +1 -0
  153. package/build/components/feedback/main-question/useMainQuestion.d.ts +2 -2
  154. package/build/components/feedback/types.d.ts +2 -2
  155. package/build/components/index.d.ts +10 -0
  156. package/build/components/logo/Logo.d.ts +15 -0
  157. package/build/components/logo/LogoStamp.d.ts +16 -0
  158. package/build/components/logo/index.d.ts +5 -0
  159. package/build/components/logo/text-paths/ForsikringLevertAvFremtind.d.ts +2 -0
  160. package/build/components/logo/text-paths/FraSB1ogDNB.d.ts +2 -0
  161. package/build/components/logo/text-paths/InnovasjonFraFremtind.d.ts +2 -0
  162. package/build/components/logo/text-paths/TeknologiFraFremtind.d.ts +2 -0
  163. package/build/components/logo/text-paths/VartEgetForsikringsselskap.d.ts +2 -0
  164. package/build/components/logo/text-paths/VartForsikringsselskap.d.ts +2 -0
  165. package/build/components/logo/text-paths/index.d.ts +6 -0
  166. package/build/components/logo/useTextSpinner.d.ts +5 -0
  167. package/build/components/progress-bar/Countdown.d.ts +12 -0
  168. package/build/components/progress-bar/ProgressBar.d.ts +22 -0
  169. package/build/components/progress-bar/index.d.ts +4 -0
  170. package/build/components/summary-table/SummaryTable.d.ts +9 -0
  171. package/build/components/summary-table/SummaryTableRow.d.ts +7 -0
  172. package/build/components/summary-table/index.d.ts +2 -0
  173. package/build/components/summary-table/mocks/index.d.ts +10 -0
  174. package/build/components/system-message/SystemMessage.d.ts +21 -0
  175. package/build/components/system-message/common/DismissButton.d.ts +5 -0
  176. package/build/components/system-message/common/MessageIcon.d.ts +7 -0
  177. package/build/components/system-message/index.d.ts +1 -0
  178. package/build/components/table/DataTable.d.ts +18 -0
  179. package/build/components/table/ExpandableTableRow.d.ts +17 -0
  180. package/build/components/table/ExpandableTableRowController.d.ts +10 -0
  181. package/build/components/table/Table.d.ts +11 -0
  182. package/build/components/table/TableBody.d.ts +5 -0
  183. package/build/components/table/TableCaption.d.ts +7 -0
  184. package/build/components/table/TableCell.d.ts +17 -0
  185. package/build/components/table/TableColumn.d.ts +5 -0
  186. package/build/components/table/TableColumnGroup.d.ts +5 -0
  187. package/build/components/table/TableFooter.d.ts +5 -0
  188. package/build/components/table/TableHead.d.ts +7 -0
  189. package/build/components/table/TableHeader.d.ts +22 -0
  190. package/build/components/table/TablePagination.d.ts +43 -0
  191. package/build/components/table/TableRow.d.ts +15 -0
  192. package/build/components/table/index.d.ts +34 -0
  193. package/build/components/table/tableContext.d.ts +12 -0
  194. package/build/components/table/tableSectionContext.d.ts +13 -0
  195. package/build/components/table/utils.d.ts +10 -0
  196. package/build/components/tabs/NavTab.d.ts +25 -0
  197. package/build/components/tabs/NavTabs.d.ts +9 -0
  198. package/build/components/tabs/Tab.d.ts +11 -0
  199. package/build/components/tabs/TabList.d.ts +18 -0
  200. package/build/components/tabs/TabPanel.d.ts +11 -0
  201. package/build/components/tabs/Tabs.d.ts +15 -0
  202. package/build/components/tabs/index.d.ts +6 -0
  203. package/build/components/tabs/tabsContext.d.ts +11 -0
  204. package/build/components/toast/Toast.d.ts +11 -0
  205. package/build/components/toast/ToastRegion.d.ts +7 -0
  206. package/build/components/toast/index.d.ts +2 -0
  207. package/build/components/toast/toastContext.d.ts +16 -0
  208. package/build/components/toast/types.d.ts +10 -0
  209. package/build/components/toggle-switch/ToggleSlider.d.ts +12 -0
  210. package/build/components/toggle-switch/ToggleSwitch.d.ts +32 -0
  211. package/build/components/toggle-switch/index.d.ts +2 -0
  212. package/build/components/toggle-switch/usePillStyles.d.ts +5 -0
  213. package/build/es/components/description-list/DescriptionList.js +2 -0
  214. package/build/es/components/description-list/DescriptionList.js.map +1 -0
  215. package/build/es/components/description-list/index.js +2 -0
  216. package/build/es/components/description-list/index.js.map +1 -0
  217. package/build/es/components/expander/ExpandSection.js +2 -0
  218. package/build/es/components/expander/ExpandSection.js.map +1 -0
  219. package/build/es/components/expander/Expander.js +2 -0
  220. package/build/es/components/expander/Expander.js.map +1 -0
  221. package/build/es/components/expander/index.js +2 -0
  222. package/build/es/components/expander/index.js.map +1 -0
  223. package/build/es/components/feedback/Feedback.js +1 -1
  224. package/build/es/components/feedback/Feedback.js.map +1 -1
  225. package/build/es/components/feedback/feedbackContext.js.map +1 -1
  226. package/build/es/components/feedback/followup/Followup.js +1 -1
  227. package/build/es/components/feedback/followup/Followup.js.map +1 -1
  228. package/build/es/components/feedback/main-question/MainQuestion.js +1 -1
  229. package/build/es/components/feedback/main-question/MainQuestion.js.map +1 -1
  230. package/build/es/components/feedback/main-question/useMainQuestion.js +1 -1
  231. package/build/es/components/feedback/main-question/useMainQuestion.js.map +1 -1
  232. package/build/es/components/feedback/questions/ContactQuestion.js +1 -1
  233. package/build/es/components/feedback/questions/ContactQuestion.js.map +1 -1
  234. package/build/es/components/index.js +1 -1
  235. package/build/es/components/logo/Logo.js +2 -0
  236. package/build/es/components/logo/Logo.js.map +1 -0
  237. package/build/es/components/logo/LogoStamp.js +2 -0
  238. package/build/es/components/logo/LogoStamp.js.map +1 -0
  239. package/build/es/components/logo/index.js +2 -0
  240. package/build/es/components/logo/index.js.map +1 -0
  241. package/build/es/components/logo/text-paths/ForsikringLevertAvFremtind.js +2 -0
  242. package/build/es/components/logo/text-paths/ForsikringLevertAvFremtind.js.map +1 -0
  243. package/build/es/components/logo/text-paths/FraSB1ogDNB.js +2 -0
  244. package/build/es/components/logo/text-paths/FraSB1ogDNB.js.map +1 -0
  245. package/build/es/components/logo/text-paths/InnovasjonFraFremtind.js +2 -0
  246. package/build/es/components/logo/text-paths/InnovasjonFraFremtind.js.map +1 -0
  247. package/build/es/components/logo/text-paths/TeknologiFraFremtind.js +2 -0
  248. package/build/es/components/logo/text-paths/TeknologiFraFremtind.js.map +1 -0
  249. package/build/es/components/logo/text-paths/VartEgetForsikringsselskap.js +2 -0
  250. package/build/es/components/logo/text-paths/VartEgetForsikringsselskap.js.map +1 -0
  251. package/build/es/components/logo/text-paths/VartForsikringsselskap.js +2 -0
  252. package/build/es/components/logo/text-paths/VartForsikringsselskap.js.map +1 -0
  253. package/build/es/components/logo/text-paths/index.js +2 -0
  254. package/build/es/components/logo/text-paths/index.js.map +1 -0
  255. package/build/es/components/logo/useTextSpinner.js +2 -0
  256. package/build/es/components/logo/useTextSpinner.js.map +1 -0
  257. package/build/es/components/progress-bar/Countdown.js +2 -0
  258. package/build/es/components/progress-bar/Countdown.js.map +1 -0
  259. package/build/es/components/progress-bar/ProgressBar.js +2 -0
  260. package/build/es/components/progress-bar/ProgressBar.js.map +1 -0
  261. package/build/es/components/progress-bar/index.js +2 -0
  262. package/build/es/components/progress-bar/index.js.map +1 -0
  263. package/build/es/components/select/NativeSelect.js +1 -1
  264. package/build/es/components/select/Select.js +1 -1
  265. package/build/es/components/select/index.js +1 -1
  266. package/build/es/components/summary-table/SummaryTable.js +2 -0
  267. package/build/es/components/summary-table/SummaryTable.js.map +1 -0
  268. package/build/es/components/summary-table/SummaryTableRow.js +2 -0
  269. package/build/es/components/summary-table/SummaryTableRow.js.map +1 -0
  270. package/build/es/components/summary-table/index.js +2 -0
  271. package/build/es/components/summary-table/index.js.map +1 -0
  272. package/build/es/components/summary-table/mocks/index.js +2 -0
  273. package/build/es/components/summary-table/mocks/index.js.map +1 -0
  274. package/build/es/components/system-message/SystemMessage.js +2 -0
  275. package/build/es/components/system-message/SystemMessage.js.map +1 -0
  276. package/build/es/components/system-message/common/DismissButton.js +2 -0
  277. package/build/es/components/system-message/common/DismissButton.js.map +1 -0
  278. package/build/es/components/system-message/common/MessageIcon.js +2 -0
  279. package/build/es/components/system-message/common/MessageIcon.js.map +1 -0
  280. package/build/es/components/system-message/index.js +2 -0
  281. package/build/es/components/system-message/index.js.map +1 -0
  282. package/build/es/components/table/DataTable.js +2 -0
  283. package/build/es/components/table/DataTable.js.map +1 -0
  284. package/build/es/components/table/ExpandableTableRow.js +2 -0
  285. package/build/es/components/table/ExpandableTableRow.js.map +1 -0
  286. package/build/es/components/table/ExpandableTableRowController.js +2 -0
  287. package/build/es/components/table/ExpandableTableRowController.js.map +1 -0
  288. package/build/es/components/table/Table.js +2 -0
  289. package/build/es/components/table/Table.js.map +1 -0
  290. package/build/es/components/table/TableBody.js +2 -0
  291. package/build/es/components/table/TableBody.js.map +1 -0
  292. package/build/es/components/table/TableCaption.js +2 -0
  293. package/build/es/components/table/TableCaption.js.map +1 -0
  294. package/build/es/components/table/TableCell.js +2 -0
  295. package/build/es/components/table/TableCell.js.map +1 -0
  296. package/build/es/components/table/TableColumn.js +2 -0
  297. package/build/es/components/table/TableColumn.js.map +1 -0
  298. package/build/es/components/table/TableColumnGroup.js +2 -0
  299. package/build/es/components/table/TableColumnGroup.js.map +1 -0
  300. package/build/es/components/table/TableFooter.js +2 -0
  301. package/build/es/components/table/TableFooter.js.map +1 -0
  302. package/build/es/components/table/TableHead.js +2 -0
  303. package/build/es/components/table/TableHead.js.map +1 -0
  304. package/build/es/components/table/TableHeader.js +2 -0
  305. package/build/es/components/table/TableHeader.js.map +1 -0
  306. package/build/es/components/table/TablePagination.js +2 -0
  307. package/build/es/components/table/TablePagination.js.map +1 -0
  308. package/build/es/components/table/TableRow.js +2 -0
  309. package/build/es/components/table/TableRow.js.map +1 -0
  310. package/build/es/components/table/index.js +2 -0
  311. package/build/es/components/table/index.js.map +1 -0
  312. package/build/es/components/table/tableContext.js +2 -0
  313. package/build/es/components/table/tableContext.js.map +1 -0
  314. package/build/es/components/table/tableSectionContext.js +2 -0
  315. package/build/es/components/table/tableSectionContext.js.map +1 -0
  316. package/build/es/components/table/utils.js +2 -0
  317. package/build/es/components/table/utils.js.map +1 -0
  318. package/build/es/components/tabs/NavTab.js +2 -0
  319. package/build/es/components/tabs/NavTab.js.map +1 -0
  320. package/build/es/components/tabs/NavTabs.js +2 -0
  321. package/build/es/components/tabs/NavTabs.js.map +1 -0
  322. package/build/es/components/tabs/Tab.js +2 -0
  323. package/build/es/components/tabs/Tab.js.map +1 -0
  324. package/build/es/components/tabs/TabList.js +2 -0
  325. package/build/es/components/tabs/TabList.js.map +1 -0
  326. package/build/es/components/tabs/TabPanel.js +2 -0
  327. package/build/es/components/tabs/TabPanel.js.map +1 -0
  328. package/build/es/components/tabs/Tabs.js +2 -0
  329. package/build/es/components/tabs/Tabs.js.map +1 -0
  330. package/build/es/components/tabs/index.js +2 -0
  331. package/build/es/components/tabs/index.js.map +1 -0
  332. package/build/es/components/tabs/tabsContext.js +2 -0
  333. package/build/es/components/tabs/tabsContext.js.map +1 -0
  334. package/build/es/components/toast/Toast.js +2 -0
  335. package/build/es/components/toast/Toast.js.map +1 -0
  336. package/build/es/components/toast/ToastRegion.js +2 -0
  337. package/build/es/components/toast/ToastRegion.js.map +1 -0
  338. package/build/es/components/toast/index.js +2 -0
  339. package/build/es/components/toast/index.js.map +1 -0
  340. package/build/es/components/toast/toastContext.js +2 -0
  341. package/build/es/components/toast/toastContext.js.map +1 -0
  342. package/build/es/components/toast/types.js +2 -0
  343. package/build/es/components/toast/types.js.map +1 -0
  344. package/build/es/components/toggle-switch/ToggleSlider.js +2 -0
  345. package/build/es/components/toggle-switch/ToggleSlider.js.map +1 -0
  346. package/build/es/components/toggle-switch/ToggleSwitch.js +2 -0
  347. package/build/es/components/toggle-switch/ToggleSwitch.js.map +1 -0
  348. package/build/es/components/toggle-switch/index.js +2 -0
  349. package/build/es/components/toggle-switch/index.js.map +1 -0
  350. package/build/es/components/toggle-switch/usePillStyles.js +2 -0
  351. package/build/es/components/toggle-switch/usePillStyles.js.map +1 -0
  352. package/build/es/index.js +1 -1
  353. package/package.json +26 -2
  354. package/src/components/button/styles/button.css +4 -4
  355. package/src/components/button/styles/button.min.css +1 -1
  356. package/src/components/checkbox/styles/checkbox.css +4 -4
  357. package/src/components/checkbox/styles/checkbox.min.css +1 -1
  358. package/src/components/description-list/styles/_index.scss +1 -0
  359. package/src/components/description-list/styles/description-list.css +42 -0
  360. package/src/components/description-list/styles/description-list.min.css +1 -0
  361. package/src/components/description-list/styles/description-list.scss +56 -0
  362. package/src/components/expander/styles/_index.scss +1 -0
  363. package/src/components/expander/styles/expander.css +80 -0
  364. package/src/components/expander/styles/expander.min.css +1 -0
  365. package/src/components/expander/styles/expander.scss +84 -0
  366. package/src/components/feedback/styles/feedback.css +2 -2
  367. package/src/components/feedback/styles/feedback.min.css +1 -1
  368. package/src/components/input-group/styles/_field-group.scss +5 -0
  369. package/src/components/input-group/styles/_index.scss +1 -0
  370. package/src/components/input-group/styles/_labels.scss +142 -0
  371. package/src/components/input-group/styles/input-group.css +189 -0
  372. package/src/components/input-group/styles/input-group.min.css +1 -0
  373. package/src/components/input-group/styles/input-group.scss +9 -0
  374. package/src/components/loader/styles/loader.css +6 -6
  375. package/src/components/loader/styles/loader.min.css +1 -1
  376. package/src/components/loader/styles/skeleton-loader.css +5 -5
  377. package/src/components/loader/styles/skeleton-loader.min.css +1 -1
  378. package/src/components/logo/styles/_index.scss +1 -0
  379. package/src/components/logo/styles/logo.css +92 -0
  380. package/src/components/logo/styles/logo.min.css +1 -0
  381. package/src/components/logo/styles/logo.scss +89 -0
  382. package/src/components/message/styles/message.css +2 -2
  383. package/src/components/message/styles/message.min.css +1 -1
  384. package/src/components/progress-bar/styles/_index.scss +1 -0
  385. package/src/components/progress-bar/styles/progress-bar.css +51 -0
  386. package/src/components/progress-bar/styles/progress-bar.min.css +1 -0
  387. package/src/components/progress-bar/styles/progress-bar.scss +55 -0
  388. package/src/components/radio-button/styles/radio-button.css +2 -2
  389. package/src/components/radio-button/styles/radio-button.min.css +1 -1
  390. package/src/components/summary-table/styles/_index.scss +1 -0
  391. package/src/components/summary-table/styles/summary-table.css +61 -0
  392. package/src/components/summary-table/styles/summary-table.min.css +1 -0
  393. package/src/components/summary-table/styles/summary-table.scss +56 -0
  394. package/src/components/system-message/styles/_index.scss +1 -0
  395. package/src/components/system-message/styles/system-message.css +179 -0
  396. package/src/components/system-message/styles/system-message.min.css +1 -0
  397. package/src/components/system-message/styles/system-message.scss +158 -0
  398. package/src/components/table/styles/_index.scss +1 -0
  399. package/src/components/table/styles/_table-caption.scss +7 -0
  400. package/src/components/table/styles/_table-cell.scss +83 -0
  401. package/src/components/table/styles/_table-head.scss +35 -0
  402. package/src/components/table/styles/_table-header.scss +76 -0
  403. package/src/components/table/styles/_table-pagination.scss +121 -0
  404. package/src/components/table/styles/_table-row.scss +183 -0
  405. package/src/components/tabs/styles/_index.scss +1 -0
  406. package/src/components/tabs/styles/tabs.css +116 -0
  407. package/src/components/tabs/styles/tabs.min.css +1 -0
  408. package/src/components/tabs/styles/tabs.scss +89 -0
  409. package/src/components/toast/styles/_index.scss +1 -0
  410. package/src/components/toast/styles/toast.css +222 -0
  411. package/src/components/toast/styles/toast.min.css +1 -0
  412. package/src/components/toast/styles/toast.scss +214 -0
  413. package/src/components/toggle-switch/styles/_index.scss +1 -0
  414. package/src/components/toggle-switch/styles/_toggle-slider.scss +132 -0
  415. package/build/NativeSelect-CNcZmpDZ.cjs +0 -2
  416. package/build/NativeSelect-CNcZmpDZ.cjs.map +0 -1
  417. package/build/NativeSelect-CfNZEQF0.js +0 -2
  418. package/build/NativeSelect-CfNZEQF0.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("../../../clsx-E3yX_9sL.cjs");exports.DescriptionDetail=({children:i,className:l,...r})=>e.jsx("dd",{...r,className:s.clsx("jkl-description-list__detail",l),children:i}),exports.DescriptionList=({children:i,className:l,...r})=>e.jsx("dl",{...r,className:s.clsx("jkl-description-list",l),children:i}),exports.DescriptionTerm=({children:i,className:l,...r})=>e.jsx("dt",{...r,className:s.clsx("jkl-description-list__term",l),children:i});
2
+ //# sourceMappingURL=DescriptionList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DescriptionList.js","sources":["../../../../src/components/description-list/DescriptionList.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { FC } from \"react\";\nimport { WithChildren } from \"../..\";\n\nexport interface DescriptionListProps extends WithChildren {\n className?: string;\n}\n\nexport const DescriptionList: FC<DescriptionListProps> = ({ children, className, ...rest }) => {\n return (\n <dl {...rest} className={clsx(\"jkl-description-list\", className)}>\n {children}\n </dl>\n );\n};\n\nexport interface DescriptionTermProps extends WithChildren {\n className?: string;\n}\n\nexport const DescriptionTerm: FC<DescriptionTermProps> = ({ children, className, ...rest }) => {\n return (\n <dt {...rest} className={clsx(\"jkl-description-list__term\", className)}>\n {children}\n </dt>\n );\n};\n\nexport interface DescriptionDetailProps extends WithChildren {\n className?: string;\n}\n\nexport const DescriptionDetail: FC<DescriptionDetailProps> = ({ children, className, ...rest }) => {\n return (\n <dd {...rest} className={clsx(\"jkl-description-list__detail\", className)}>\n {children}\n </dd>\n );\n};\n"],"names":["children","className","rest","jsx","clsx"],"mappings":"uLAgC6D,EAAGA,SAAAA,EAAUC,UAAAA,KAAcC,KAEhFC,MAAC,SAAOD,EAAMD,UAAWG,EAAKA,KAAA,+BAAgCH,GACzDD,SAAAA,4BA3B4C,EAAGA,SAAAA,EAAUC,UAAAA,KAAcC,KAE5EC,MAAC,SAAOD,EAAMD,UAAWG,EAAKA,KAAA,uBAAwBH,GACjDD,SAAAA,4BAS4C,EAAGA,SAAAA,EAAUC,UAAAA,KAAcC,KAE5EC,MAAC,SAAOD,EAAMD,UAAWG,EAAKA,KAAA,6BAA8BH,GACvDD,SAAAA"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./DescriptionList.js");exports.DescriptionDetail=e.DescriptionDetail,exports.DescriptionList=e.DescriptionList,exports.DescriptionTerm=e.DescriptionTerm;
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("../../../clsx-E3yX_9sL.cjs"),t=require("react"),n=require("../../hooks/useAnimatedDetails/useAnimatedDetails.js");require("../../hooks/useScreen/useScreen.js"),require("../../hooks/useId/useId.js");const a=require("../../../ExpandableTableRow-BQjBxKCX.cjs");exports.ExpandSection=({children:i,className:r,expandButtonProps:d,isExpanded:c=!1,density:o,onClick:l,title:u,useAnimatedHeightOptions:p,...x})=>{const[j,m]=t.useState(c);t.useEffect((()=>{m(c)}),[c]);const{detailsRef:k,summaryRef:h,contentRef:f,onSummaryClick:q}=n.useAnimatedDetails({onOpenChange:(e,s)=>{m(e),l&&l(s,e)},isExpanded:c});return e.jsxs("details",{"data-testid":"jkl-expand-section",className:s.clsx("jkl-expand-section",r),...x,ref:k,children:[e.jsx(a.Expander,{as:"summary",...d,density:o,isExpanded:j,onClick:q,ref:h,children:u}),e.jsx("div",{"data-testid":"jkl-expand-section__content-wrapper",className:"jkl-expand-section__content-wrapper",ref:f,children:e.jsx("div",{className:"jkl-expand-section__content",children:i})})]})};
2
+ //# sourceMappingURL=ExpandSection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpandSection.js","sources":["../../../../src/components/expander/ExpandSection.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { ReactNode, useEffect, useState } from \"react\";\nimport { Density } from \"../..\";\nimport { UseAnimatedHeightOptions, useAnimatedDetails } from \"../../hooks\";\nimport type { ExpanderProps } from \"./Expander\";\nimport { Expander } from \"./Expander\";\n\nexport interface ExpandSectionProps {\n /**\n * Innholdet som skal kunne ekspanderes og skjules.\n * Om du ikke trenger at komponenten tar seg av visning og skjuling av\n * innholdet skal du bruke `ExpandButton` direkte. Det sparer deg for\n * å laste inn unødvendige avhengigheter.\n */\n children: ReactNode;\n title: string;\n className?: string;\n density?: Density;\n onClick?: (e: React.MouseEvent<HTMLElement>, isExpanded: boolean) => void;\n expandButtonProps?: Omit<ExpanderProps, \"id\" | \"isExpanded\" | \"onClick\" | \"hideLabel\">;\n useAnimatedHeightOptions?: UseAnimatedHeightOptions;\n /** Om du ønsker å styre komponenten utenfra */\n isExpanded?: boolean;\n}\n\nexport const ExpandSection = ({\n children,\n className,\n expandButtonProps,\n isExpanded = false,\n density,\n onClick,\n title,\n useAnimatedHeightOptions,\n ...rest\n}: ExpandSectionProps): JSX.Element => {\n const [expanded, setIsExpanded] = useState(isExpanded);\n\n useEffect(() => {\n setIsExpanded(isExpanded);\n }, [isExpanded]);\n\n const { detailsRef, summaryRef, contentRef, onSummaryClick } = useAnimatedDetails({\n onOpenChange: (open, e) => {\n setIsExpanded(open);\n if (onClick) {\n onClick(e, open);\n }\n },\n isExpanded,\n });\n\n return (\n <details\n data-testid={\"jkl-expand-section\"}\n className={clsx(\"jkl-expand-section\", className)}\n {...rest}\n ref={detailsRef}\n >\n <Expander\n as={\"summary\"}\n {...expandButtonProps}\n density={density}\n isExpanded={expanded}\n onClick={onSummaryClick}\n ref={summaryRef}\n >\n {title}\n </Expander>\n <div\n data-testid=\"jkl-expand-section__content-wrapper\"\n className=\"jkl-expand-section__content-wrapper\"\n ref={contentRef}\n >\n <div className=\"jkl-expand-section__content\">{children}</div>\n </div>\n </details>\n );\n};\n"],"names":["children","className","expandButtonProps","isExpanded","density","onClick","title","useAnimatedHeightOptions","rest","expanded","setIsExpanded","useState","useEffect","detailsRef","summaryRef","contentRef","onSummaryClick","useAnimatedDetails","onOpenChange","open","e","jsxs","clsx","ref","jsx","Expander","as"],"mappings":"wZAyB6B,EACzBA,SAAAA,EACAC,UAAAA,EACAC,kBAAAA,EACAC,WAAAA,GAAa,EACbC,QAAAA,EACAC,QAAAA,EACAC,MAAAA,EACAC,yBAAAA,KACGC,MAEH,MAAOC,EAAUC,GAAiBC,WAASR,GAE3CS,EAAAA,WAAU,KACNF,EAAcP,EAAU,GACzB,CAACA,IAEJ,MAAQU,WAAAA,EAAYC,WAAAA,EAAYC,WAAAA,EAAYC,eAAAA,GAAmBC,EAAAA,mBAAmB,CAC9EC,aAAc,CAACC,EAAMC,KACjBV,EAAcS,GACVd,GACAA,EAAQe,EAAGD,EAAI,EAGvBhB,WAAAA,IAIA,OAAAkB,EAAAA,KAAC,UAAA,CACG,cAAa,qBACbpB,UAAWqB,EAAAA,KAAK,qBAAsBrB,MAClCO,EACJe,IAAKV,EAELb,SAAA,CAAAwB,EAAAA,IAACC,EAAAA,SAAA,CACGC,GAAI,aACAxB,EACJE,QAAAA,EACAD,WAAYM,EACZJ,QAASW,EACTO,IAAKT,EAEJd,SAAAM,IAELkB,EAAAA,IAAC,MAAA,CACG,cAAY,sCACZvB,UAAU,sCACVsB,IAAKR,EAELf,SAACwB,EAAAA,IAAA,MAAA,CAAIvB,UAAU,8BAA+BD,SAAAA,QAClD"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("react/jsx-runtime"),require("../../../clsx-E3yX_9sL.cjs"),require("react"),require("../../hooks/useScreen/useScreen.js"),require("../../hooks/useId/useId.js"),require("../icon/Icon.js"),require("../icon/icons/animated/ArrowVerticalAnimated.js"),require("../icon/icons/animated/ArrowHorizontalAnimated.js"),require("../icon/icons/animated/PlusRemoveAnimated.js"),require("../icon/icons/ArrowDownIcon.js"),require("../icon/icons/ArrowLeftIcon.js"),require("../icon/icons/ArrowNorthEastIcon.js"),require("../icon/icons/ArrowRightIcon.js"),require("../icon/icons/ArrowUpIcon.js"),require("../icon/icons/CalendarIcon.js"),require("../icon/icons/CheckIcon.js"),require("../icon/icons/ChevronDownIcon.js"),require("../icon/icons/ChevronLeftIcon.js"),require("../icon/icons/ChevronRightIcon.js"),require("../icon/icons/ChevronUpIcon.js"),require("../icon/icons/CloseIcon.js"),require("../icon/icons/CopyIcon.js"),require("../icon/icons/DotsIcon.js"),require("../icon/icons/DragIcon.js"),require("../icon/icons/ErrorIcon.js"),require("../icon/icons/GreenCheckIcon.js"),require("../icon/icons/HamburgerIcon.js"),require("../icon/icons/InfoIcon.js"),require("../icon/icons/LinkIcon.js"),require("../icon/icons/PlusIcon.js"),require("../icon/icons/QuestionIcon.js"),require("../icon/icons/RedCrossIcon.js"),require("../icon/icons/SearchIcon.js"),require("../icon/icons/SuccessIcon.js"),require("../icon/icons/WarningIcon.js"),require("../icon/icons/MinusIcon.js"),require("../icon/icons/ThumbDownIcon.js"),require("../icon/icons/ThumbUpIcon.js"),require("../icon/icons/TrashCanIcon.js"),require("../icon/icons/PenIcon.js"),require("../button/Button.js"),require("../card/Card.js"),require("../card/CardImage.js"),require("../card/NavCard.js"),require("../checkbox/Checkbox.js"),require("../combobox/Combobox.js"),require("../cookie-consent/CookieConsentContext.js"),require("react-dom"),require("../modal/Modal.js"),require("react-a11y-dialog"),require("../list/List.js"),require("../list/ListItem.js"),require("../datepicker/DatePicker.js"),require("../feedback/feedbackContext.js"),require("../message/Message.js"),require("../message/FormErrorMessage.js"),require("../tooltip/Tooltip.js"),require("../tooltip/TooltipContent.js"),require("../tooltip/TooltipTrigger.js"),require("../input-group/InputGroup.js"),require("../feedback/followup/followupContext.js"),require("../feedback/main-question/mainQuestionContext.js"),require("../radio-button/RadioButton.js"),require("../radio-button/radioGroupContext.js"),require("../radio-button/BaseRadioButton.js"),require("../text-input/BaseTextArea.js"),require("../text-input/BaseTextInput.js"),require("../text-input/TextArea.js"),require("../text-input/TextInput.js"),require("../../utilities/polymorphism/SlotComponent.js");const e=require("../../../ExpandableTableRow-BQjBxKCX.cjs");require("../icon-button/IconButton.js"),require("../link/Link.js"),require("../link/NavLink.js"),require("../link-list/LinkList.js"),require("../logo/text-paths/ForsikringLevertAvFremtind.js"),require("../logo/text-paths/FraSB1ogDNB.js"),require("../logo/text-paths/InnovasjonFraFremtind.js"),require("../logo/text-paths/TeknologiFraFremtind.js"),require("../logo/text-paths/VartEgetForsikringsselskap.js"),require("../logo/text-paths/VartForsikringsselskap.js"),require("../popover/Popover.js"),require("../system-message/SystemMessage.js"),require("../table/DataTable.js"),require("../table/Table.js"),require("../table/TableBody.js"),require("../table/TableCaption.js"),require("../table/TableCell.js"),require("../table/TableColumn.js"),require("../table/TableColumnGroup.js"),require("../table/tableContext.js"),require("../table/tableSectionContext.js"),require("../table/TableFooter.js"),require("../table/TableHead.js"),require("../table/TableHeader.js"),require("../table/TableRow.js"),require("../tabs/NavTab.js"),require("../tabs/tabsContext.js"),require("../tabs/Tab.js"),require("../tag/Tag.js"),require("../toast/toastContext.js"),require("../toggle-switch/ToggleSwitch.js"),require("../ScreenReaderOnly.js"),exports.Expander=e.Expander;
2
+ //# sourceMappingURL=Expander.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Expander.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../ExpandableTableRow-BQjBxKCX.cjs"),r=require("./ExpandSection.js");exports.Expander=e.Expander,exports.ExpandSection=r.ExpandSection;
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("react"),i=require("./feedbackContext.js"),r=require("./followup/Followup.js"),n=require("./main-question/MainQuestion.js");require("../checkbox/Checkbox.js"),require("../../hooks/useScreen/useScreen.js"),require("../../hooks/useId/useId.js"),require("../tooltip/Tooltip.js"),require("../tooltip/TooltipContent.js"),require("../tooltip/TooltipTrigger.js"),require("../icon/Icon.js"),require("../icon/icons/animated/ArrowVerticalAnimated.js"),require("../icon/icons/animated/ArrowHorizontalAnimated.js"),require("../icon/icons/animated/PlusRemoveAnimated.js"),require("../icon/icons/ArrowDownIcon.js"),require("../icon/icons/ArrowLeftIcon.js"),require("../icon/icons/ArrowNorthEastIcon.js"),require("../icon/icons/ArrowRightIcon.js"),require("../icon/icons/ArrowUpIcon.js"),require("../icon/icons/CalendarIcon.js"),require("../icon/icons/CheckIcon.js"),require("../icon/icons/ChevronDownIcon.js"),require("../icon/icons/ChevronLeftIcon.js"),require("../icon/icons/ChevronRightIcon.js"),require("../icon/icons/ChevronUpIcon.js"),require("../icon/icons/CloseIcon.js"),require("../icon/icons/CopyIcon.js"),require("../icon/icons/DotsIcon.js"),require("../icon/icons/DragIcon.js"),require("../icon/icons/ErrorIcon.js"),require("../icon/icons/GreenCheckIcon.js"),require("../icon/icons/HamburgerIcon.js"),require("../icon/icons/InfoIcon.js"),require("../icon/icons/LinkIcon.js"),require("../icon/icons/PlusIcon.js"),require("../icon/icons/QuestionIcon.js"),require("../icon/icons/RedCrossIcon.js"),require("../icon/icons/SearchIcon.js"),require("../icon/icons/SuccessIcon.js"),require("../icon/icons/WarningIcon.js"),require("../icon/icons/MinusIcon.js"),require("../icon/icons/ThumbDownIcon.js"),require("../icon/icons/ThumbUpIcon.js"),require("../icon/icons/TrashCanIcon.js"),require("../icon/icons/PenIcon.js"),require("../input-group/InputGroup.js"),require("./followup/followupContext.js"),require("./main-question/mainQuestionContext.js"),require("../radio-button/RadioButton.js"),require("../radio-button/radioGroupContext.js"),require("../radio-button/BaseRadioButton.js"),require("../text-input/BaseTextArea.js"),require("../text-input/BaseTextInput.js"),require("../text-input/TextArea.js"),require("../text-input/TextInput.js");const s=require("./questions/ContactQuestion.js");exports.Feedback=({className:c,followup:t,contactQuestion:u,counter:a,...j})=>{const[q,l]=o.useState(!1),[d,I]=o.useState(!1),[p,x]=o.useState(!1),[b,m]=o.useState(!1);return e.jsx("div",{className:`jkl-feedback ${c||""}`,"data-testid":"feedback",children:e.jsxs(i.FeedbackContextProvider,{value:{feedbackSubmitted:q,followupStarted:d,followupSubmitted:p,contactSubmitted:b,counter:a,setFeedbackSubmitted:l,setFollowupStarted:I,setFollowupSubmitted:x,setContactSubmitted:m},children:[!d&&e.jsx(n.MainQuestion,{...j}),q&&!b&&t&&e.jsx(r.Followup,{...t}),u&&e.jsx("div",{"aria-live":"polite",children:(!t&&q||p)&&e.jsx(s.ContactQuestion,{...u})})]})})};
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("react"),i=require("./feedbackContext.js"),r=require("./followup/Followup.js"),n=require("./main-question/MainQuestion.js");require("../checkbox/Checkbox.js"),require("../../hooks/useScreen/useScreen.js"),require("../../hooks/useId/useId.js"),require("../tooltip/Tooltip.js"),require("../tooltip/TooltipContent.js"),require("../tooltip/TooltipTrigger.js"),require("../icon/Icon.js"),require("../icon/icons/animated/ArrowVerticalAnimated.js"),require("../icon/icons/animated/ArrowHorizontalAnimated.js"),require("../icon/icons/animated/PlusRemoveAnimated.js"),require("../icon/icons/ArrowDownIcon.js"),require("../icon/icons/ArrowLeftIcon.js"),require("../icon/icons/ArrowNorthEastIcon.js"),require("../icon/icons/ArrowRightIcon.js"),require("../icon/icons/ArrowUpIcon.js"),require("../icon/icons/CalendarIcon.js"),require("../icon/icons/CheckIcon.js"),require("../icon/icons/ChevronDownIcon.js"),require("../icon/icons/ChevronLeftIcon.js"),require("../icon/icons/ChevronRightIcon.js"),require("../icon/icons/ChevronUpIcon.js"),require("../icon/icons/CloseIcon.js"),require("../icon/icons/CopyIcon.js"),require("../icon/icons/DotsIcon.js"),require("../icon/icons/DragIcon.js"),require("../icon/icons/ErrorIcon.js"),require("../icon/icons/GreenCheckIcon.js"),require("../icon/icons/HamburgerIcon.js"),require("../icon/icons/InfoIcon.js"),require("../icon/icons/LinkIcon.js"),require("../icon/icons/PlusIcon.js"),require("../icon/icons/QuestionIcon.js"),require("../icon/icons/RedCrossIcon.js"),require("../icon/icons/SearchIcon.js"),require("../icon/icons/SuccessIcon.js"),require("../icon/icons/WarningIcon.js"),require("../icon/icons/MinusIcon.js"),require("../icon/icons/ThumbDownIcon.js"),require("../icon/icons/ThumbUpIcon.js"),require("../icon/icons/TrashCanIcon.js"),require("../icon/icons/PenIcon.js"),require("../input-group/InputGroup.js"),require("./followup/followupContext.js"),require("./main-question/mainQuestionContext.js"),require("../radio-button/RadioButton.js"),require("../radio-button/radioGroupContext.js"),require("../radio-button/BaseRadioButton.js"),require("../text-input/BaseTextArea.js"),require("../text-input/BaseTextInput.js"),require("../text-input/TextArea.js"),require("../text-input/TextInput.js");const s=require("./questions/ContactQuestion.js");exports.Feedback=({className:c,followup:t,contactQuestion:u,counter:a,landmarkLabel:j,...q})=>{const[l,d]=o.useState(!1),[I,p]=o.useState(!1),[b,m]=o.useState(!1),[x,C]=o.useState(!1);return e.jsx("div",{className:`jkl-feedback ${c||""}`,"data-testid":"feedback",children:e.jsxs(i.FeedbackContextProvider,{value:{feedbackSubmitted:l,followupStarted:I,followupSubmitted:b,contactSubmitted:x,counter:a,landmarkLabel:j,setFeedbackSubmitted:d,setFollowupStarted:p,setFollowupSubmitted:m,setContactSubmitted:C},children:[!I&&e.jsx(n.MainQuestion,{...q}),l&&!x&&t&&e.jsx(r.Followup,{...t}),u&&e.jsx("div",{"aria-live":"polite",children:(!t&&l||b)&&e.jsx(s.ContactQuestion,{...u})})]})})};
2
2
  //# sourceMappingURL=Feedback.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Feedback.js","sources":["../../../../src/components/feedback/Feedback.tsx"],"sourcesContent":["import React, { ReactElement, ReactNode, useState, ComponentProps } from \"react\";\nimport { BaseTextAreaProps } from \"../text-input\";\nimport { FeedbackContextProvider } from \"./feedbackContext\";\nimport { Followup } from \"./followup/Followup\";\nimport { MainQuestion } from \"./main-question/MainQuestion\";\nimport { ContactQuestion } from \"./questions\";\nimport { FeedbackOption, FeedbackType } from \"./types\";\n\ntype FollowupProps = ComponentProps<typeof Followup>;\ntype ContactQuestionProps = ComponentProps<typeof ContactQuestion>;\n\ntype Props = {\n className?: string;\n /** Velg typen alternativer, Smiley eller RadioButtons. */\n type: \"radio\" | \"smiley\";\n /** Spørsmålet som stilles til brukeren */\n label: string;\n /** Hjelpetekst til hovedspørsmålet */\n helpLabel?: string;\n /** Svaralternativer til spørsmålet */\n options: FeedbackOption[];\n /** Dersom du vil stille et åpent spørsmål i tillegg kan du sette denne til en truthy verdi */\n addOnQuestion?:\n | {\n /** Spørsmålet du vil stille */\n label?: string;\n /** Eventuell hjelpetekst. Om du ikke spesifiserer en vil det vises en påminnelse om å ikke skrive inn personling informasjon. */\n helpLabel?: string;\n }\n | boolean;\n /** Lar deg tilpasse meldingen som kommer når brukeren sender inn tilbakemeldingen. */\n successMessage?: {\n title: string;\n children: ReactNode;\n };\n /**\n * Funksjon for å håndtere innsending av tilbakemelding\n * @param value Verdien av tilbakemeldingen. Dette er et objekt med følgende egenskaper:\n * - `feedbackValue`: Selve verdien av tilbakemeldingen (format varierer etter spørsmålstype)\n * - `intentionalSubmit`: Er `true` hvis brukeren aktivt sendte inn skjemaet, `false` hvis skjemaet ble sendt inn automatisk\n * - `message`: Eventuell utfyllende melding fra bruker. Blir kun sendt inn ved aktiv innsending\n */\n onSubmit: (value: FeedbackType) => void;\n\n followup?: FollowupProps;\n contactQuestion?: ContactQuestionProps;\n} & Pick<BaseTextAreaProps, \"counter\">;\n\nexport const Feedback = ({\n className,\n followup,\n contactQuestion,\n counter,\n ...mainQuestionProps\n}: Props): ReactElement => {\n const [feedbackSubmitted, setFeedbackSubmitted] = useState(false);\n const [followupStarted, setFollowupStarted] = useState(false);\n const [followupSubmitted, setFollowupSubmitted] = useState(false);\n const [contactSubmitted, setContactSubmitted] = useState(false);\n\n return (\n <div className={`jkl-feedback ${className || \"\"}`} data-testid=\"feedback\">\n <FeedbackContextProvider\n value={{\n feedbackSubmitted,\n followupStarted,\n followupSubmitted,\n contactSubmitted,\n counter,\n setFeedbackSubmitted,\n setFollowupStarted,\n setFollowupSubmitted,\n setContactSubmitted,\n }}\n >\n {!followupStarted && <MainQuestion {...mainQuestionProps} />}\n {feedbackSubmitted && !contactSubmitted && followup && <Followup {...followup} />}\n {contactQuestion && (\n <div aria-live=\"polite\">\n {/* Show contact question after followup, or after feedback if no followup */}\n {((!followup && feedbackSubmitted) || followupSubmitted) && (\n <ContactQuestion {...contactQuestion} />\n )}\n </div>\n )}\n </FeedbackContextProvider>\n </div>\n );\n};\n"],"names":["className","followup","contactQuestion","counter","mainQuestionProps","feedbackSubmitted","setFeedbackSubmitted","useState","followupStarted","setFollowupStarted","followupSubmitted","setFollowupSubmitted","contactSubmitted","setContactSubmitted","jsx","children","jsxs","FeedbackContextProvider","value","MainQuestion","Followup","ContactQuestion"],"mappings":"23EAgDwB,EACpBA,UAAAA,EACAC,SAAAA,EACAC,gBAAAA,EACAC,QAAAA,KACGC,MAEH,MAAOC,EAAmBC,GAAwBC,YAAS,IACpDC,EAAiBC,GAAsBF,YAAS,IAChDG,EAAmBC,GAAwBJ,YAAS,IACpDK,EAAkBC,GAAuBN,YAAS,GAGrD,OAAAO,MAAC,OAAId,UAAW,gBAAgBA,GAAa,KAAM,cAAY,WAC3De,SAAAC,EAAAA,KAACC,EAAAA,wBAAA,CACGC,MAAO,CACHb,kBAAAA,EACAG,gBAAAA,EACAE,kBAAAA,EACAE,iBAAAA,EACAT,QAAAA,EACAG,qBAAAA,EACAG,mBAAAA,EACAE,qBAAAA,EACAE,oBAAAA,GAGHE,SAAA,EAACP,GAAmBM,EAAAA,IAACK,EAAcA,aAAA,IAAGf,IACtCC,IAAsBO,GAAoBX,GAAaa,EAAAA,IAAAM,WAAA,IAAanB,IACpEC,GACGY,EAAAA,IAAC,MAAI,CAAA,YAAU,SAERC,WAACd,GAAYI,GAAsBK,IAClCI,MAACO,EAAAA,gBAAiB,IAAGnB,UAKzC"}
1
+ {"version":3,"file":"Feedback.js","sources":["../../../../src/components/feedback/Feedback.tsx"],"sourcesContent":["import React, { ReactElement, ReactNode, useState, ComponentProps } from \"react\";\nimport { BaseTextAreaProps } from \"../text-input\";\nimport { FeedbackContextProvider } from \"./feedbackContext\";\nimport { Followup } from \"./followup/Followup\";\nimport { MainQuestion } from \"./main-question/MainQuestion\";\nimport { ContactQuestion } from \"./questions\";\nimport { FeedbackOption, FeedbackType } from \"./types\";\n\ntype FollowupProps = ComponentProps<typeof Followup>;\ntype ContactQuestionProps = ComponentProps<typeof ContactQuestion>;\n\ntype Props = {\n className?: string;\n /** Velg typen alternativer, Smiley eller RadioButtons. */\n type: \"radio\" | \"smiley\";\n /** Spørsmålet som stilles til brukeren */\n label: string;\n /** Hjelpetekst til hovedspørsmålet */\n helpLabel?: string;\n /** Svaralternativer til spørsmålet */\n options: FeedbackOption[];\n /** Dersom du vil stille et åpent spørsmål i tillegg kan du sette denne til en truthy verdi */\n addOnQuestion?:\n | {\n /** Spørsmålet du vil stille */\n label?: string;\n /** Eventuell hjelpetekst. Om du ikke spesifiserer en vil det vises en påminnelse om å ikke skrive inn personling informasjon. */\n helpLabel?: string;\n }\n | boolean;\n /** Lar deg tilpasse meldingen som kommer når brukeren sender inn tilbakemeldingen. */\n successMessage?: {\n title: string;\n children: ReactNode;\n };\n /**\n * Funksjon for å håndtere innsending av tilbakemelding\n * @param value Verdien av tilbakemeldingen. Dette er et objekt med følgende egenskaper:\n * - `feedbackValue`: Selve verdien av tilbakemeldingen (format varierer etter spørsmålstype)\n * - `intentionalSubmit`: Er `true` hvis brukeren aktivt sendte inn skjemaet, `false` hvis skjemaet ble sendt inn automatisk\n * - `message`: Eventuell utfyllende melding fra bruker. Blir kun sendt inn ved aktiv innsending\n */\n onSubmit: (value: FeedbackType) => void;\n followup?: FollowupProps;\n contactQuestion?: ContactQuestionProps;\n /**\n * Hvis du ønsker at Feedback formen skal eksponeres som et landmark kan du sende inn\n * hva du ønsker at en skjermleser skal kalle den her. Bare eksponer Feedback som et\n * landmark på sider der den er en viktig del av innholdet, feks en kvitteringsside\n * eller et annet sted det å kunne gi tilbakemelding vil føles naturlig eller forventet\n * for brukeren.\n */\n landmarkLabel?: string;\n} & Pick<BaseTextAreaProps, \"counter\">;\n\nexport const Feedback = ({\n className,\n followup,\n contactQuestion,\n counter,\n landmarkLabel,\n ...mainQuestionProps\n}: Props): ReactElement => {\n const [feedbackSubmitted, setFeedbackSubmitted] = useState(false);\n const [followupStarted, setFollowupStarted] = useState(false);\n const [followupSubmitted, setFollowupSubmitted] = useState(false);\n const [contactSubmitted, setContactSubmitted] = useState(false);\n\n return (\n <div className={`jkl-feedback ${className || \"\"}`} data-testid=\"feedback\">\n <FeedbackContextProvider\n value={{\n feedbackSubmitted,\n followupStarted,\n followupSubmitted,\n contactSubmitted,\n counter,\n landmarkLabel,\n setFeedbackSubmitted,\n setFollowupStarted,\n setFollowupSubmitted,\n setContactSubmitted,\n }}\n >\n {!followupStarted && <MainQuestion {...mainQuestionProps} />}\n {feedbackSubmitted && !contactSubmitted && followup && <Followup {...followup} />}\n {contactQuestion && (\n <div aria-live=\"polite\">\n {/* Show contact question after followup, or after feedback if no followup */}\n {((!followup && feedbackSubmitted) || followupSubmitted) && (\n <ContactQuestion {...contactQuestion} />\n )}\n </div>\n )}\n </FeedbackContextProvider>\n </div>\n );\n};\n"],"names":["className","followup","contactQuestion","counter","landmarkLabel","mainQuestionProps","feedbackSubmitted","setFeedbackSubmitted","useState","followupStarted","setFollowupStarted","followupSubmitted","setFollowupSubmitted","contactSubmitted","setContactSubmitted","jsx","children","jsxs","FeedbackContextProvider","value","MainQuestion","Followup","ContactQuestion"],"mappings":"23EAuDwB,EACpBA,UAAAA,EACAC,SAAAA,EACAC,gBAAAA,EACAC,QAAAA,EACAC,cAAAA,KACGC,MAEH,MAAOC,EAAmBC,GAAwBC,YAAS,IACpDC,EAAiBC,GAAsBF,YAAS,IAChDG,EAAmBC,GAAwBJ,YAAS,IACpDK,EAAkBC,GAAuBN,YAAS,GAGrD,OAAAO,MAAC,OAAIf,UAAW,gBAAgBA,GAAa,KAAM,cAAY,WAC3DgB,SAAAC,EAAAA,KAACC,EAAAA,wBAAA,CACGC,MAAO,CACHb,kBAAAA,EACAG,gBAAAA,EACAE,kBAAAA,EACAE,iBAAAA,EACAV,QAAAA,EACAC,cAAAA,EACAG,qBAAAA,EACAG,mBAAAA,EACAE,qBAAAA,EACAE,oBAAAA,GAGHE,SAAA,EAACP,GAAmBM,EAAAA,IAACK,EAAcA,aAAA,IAAGf,IACtCC,IAAsBO,GAAoBZ,GAAac,EAAAA,IAAAM,WAAA,IAAapB,IACpEC,GACGa,EAAAA,IAAC,MAAI,CAAA,YAAU,SAERC,WAACf,GAAYK,GAAsBK,IAClCI,MAACO,EAAAA,gBAAiB,IAAGpB,UAKzC"}
@@ -1 +1 @@
1
- {"version":3,"file":"feedbackContext.js","sources":["../../../../src/components/feedback/feedbackContext.tsx"],"sourcesContent":["import React, { createContext, FC, useContext } from \"react\";\nimport { WithChildren } from \"../..\";\nimport { BaseTextAreaProps } from \"../text-input\";\n\ntype FeedbackContext = {\n feedbackSubmitted: boolean;\n followupStarted: boolean;\n followupSubmitted: boolean;\n contactSubmitted: boolean;\n setFeedbackSubmitted: (state: boolean) => void;\n setFollowupStarted: (state: boolean) => void;\n setFollowupSubmitted: (state: boolean) => void;\n setContactSubmitted: (state: boolean) => void;\n} & Pick<BaseTextAreaProps, \"counter\">;\n\nconst initialState: FeedbackContext = {\n feedbackSubmitted: false,\n followupStarted: false,\n followupSubmitted: false,\n contactSubmitted: false,\n setFeedbackSubmitted: () => null,\n setFollowupStarted: () => null,\n setFollowupSubmitted: () => null,\n setContactSubmitted: () => null,\n};\n\nconst feedbackContext = createContext(initialState);\n\nexport const useFeedbackContext = (): FeedbackContext => useContext(feedbackContext);\n\ninterface FeedbackContextProviderProps extends WithChildren {\n value: FeedbackContext;\n}\n\nexport const FeedbackContextProvider: FC<FeedbackContextProviderProps> = ({ value, children }) => (\n <feedbackContext.Provider value={value}>{children}</feedbackContext.Provider>\n);\n"],"names":["feedbackContext","createContext","feedbackSubmitted","followupStarted","followupSubmitted","contactSubmitted","setFeedbackSubmitted","setFollowupStarted","setFollowupSubmitted","setContactSubmitted","value","children","jsx","Provider","useContext"],"mappings":"wIA0BMA,EAAkBC,EAAAA,cAXc,CAClCC,mBAAmB,EACnBC,iBAAiB,EACjBC,mBAAmB,EACnBC,kBAAkB,EAClBC,qBAAsB,IAAM,KAC5BC,mBAAoB,IAAM,KAC1BC,qBAAsB,IAAM,KAC5BC,oBAAqB,IAAM,uCAW0C,EAAGC,MAAAA,EAAOC,SAAAA,KAC/EC,MAACZ,EAAgBa,SAAhB,CAAyBH,MAAAA,EAAeC,SAAAA,+BAPX,IAAuBG,EAAAA,WAAWd"}
1
+ {"version":3,"file":"feedbackContext.js","sources":["../../../../src/components/feedback/feedbackContext.tsx"],"sourcesContent":["import React, { createContext, FC, useContext } from \"react\";\nimport { WithChildren } from \"../..\";\nimport { BaseTextAreaProps } from \"../text-input\";\n\ntype FeedbackContext = {\n feedbackSubmitted: boolean;\n followupStarted: boolean;\n followupSubmitted: boolean;\n contactSubmitted: boolean;\n landmarkLabel?: string;\n setFeedbackSubmitted: (state: boolean) => void;\n setFollowupStarted: (state: boolean) => void;\n setFollowupSubmitted: (state: boolean) => void;\n setContactSubmitted: (state: boolean) => void;\n} & Pick<BaseTextAreaProps, \"counter\">;\n\nconst initialState: FeedbackContext = {\n feedbackSubmitted: false,\n followupStarted: false,\n followupSubmitted: false,\n contactSubmitted: false,\n setFeedbackSubmitted: () => null,\n setFollowupStarted: () => null,\n setFollowupSubmitted: () => null,\n setContactSubmitted: () => null,\n};\n\nconst feedbackContext = createContext(initialState);\n\nexport const useFeedbackContext = (): FeedbackContext => useContext(feedbackContext);\n\ninterface FeedbackContextProviderProps extends WithChildren {\n value: FeedbackContext;\n}\n\nexport const FeedbackContextProvider: FC<FeedbackContextProviderProps> = ({ value, children }) => (\n <feedbackContext.Provider value={value}>{children}</feedbackContext.Provider>\n);\n"],"names":["feedbackContext","createContext","feedbackSubmitted","followupStarted","followupSubmitted","contactSubmitted","setFeedbackSubmitted","setFollowupStarted","setFollowupSubmitted","setContactSubmitted","value","children","jsx","Provider","useContext"],"mappings":"wIA2BMA,EAAkBC,EAAAA,cAXc,CAClCC,mBAAmB,EACnBC,iBAAiB,EACjBC,mBAAmB,EACnBC,kBAAkB,EAClBC,qBAAsB,IAAM,KAC5BC,mBAAoB,IAAM,KAC1BC,qBAAsB,IAAM,KAC5BC,oBAAqB,IAAM,uCAW0C,EAAGC,MAAAA,EAAOC,SAAAA,KAC/EC,MAACZ,EAAgBa,SAAhB,CAAyBH,MAAAA,EAAeC,SAAAA,+BAPX,IAAuBG,EAAAA,WAAWd"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react");require("../../../hooks/useScreen/useScreen.js"),require("../../../hooks/useId/useId.js"),require("../../icon/Icon.js"),require("../../icon/icons/animated/ArrowVerticalAnimated.js"),require("../../icon/icons/animated/ArrowHorizontalAnimated.js"),require("../../icon/icons/animated/PlusRemoveAnimated.js"),require("../../icon/icons/ArrowDownIcon.js"),require("../../icon/icons/ArrowLeftIcon.js"),require("../../icon/icons/ArrowNorthEastIcon.js"),require("../../icon/icons/ArrowRightIcon.js"),require("../../icon/icons/ArrowUpIcon.js"),require("../../icon/icons/CalendarIcon.js"),require("../../icon/icons/CheckIcon.js"),require("../../icon/icons/ChevronDownIcon.js"),require("../../icon/icons/ChevronLeftIcon.js"),require("../../icon/icons/ChevronRightIcon.js"),require("../../icon/icons/ChevronUpIcon.js"),require("../../icon/icons/CloseIcon.js"),require("../../icon/icons/CopyIcon.js"),require("../../icon/icons/DotsIcon.js"),require("../../icon/icons/DragIcon.js"),require("../../icon/icons/ErrorIcon.js"),require("../../icon/icons/GreenCheckIcon.js"),require("../../icon/icons/HamburgerIcon.js"),require("../../icon/icons/InfoIcon.js"),require("../../icon/icons/LinkIcon.js"),require("../../icon/icons/PlusIcon.js"),require("../../icon/icons/QuestionIcon.js"),require("../../icon/icons/RedCrossIcon.js"),require("../../icon/icons/SearchIcon.js"),require("../../icon/icons/SuccessIcon.js"),require("../../icon/icons/WarningIcon.js"),require("../../icon/icons/MinusIcon.js"),require("../../icon/icons/ThumbDownIcon.js"),require("../../icon/icons/ThumbUpIcon.js"),require("../../icon/icons/TrashCanIcon.js"),require("../../icon/icons/PenIcon.js");const i=require("../../button/Button.js");require("../../card/Card.js"),require("../../card/CardImage.js"),require("../../card/NavCard.js"),require("../../checkbox/Checkbox.js"),require("../../combobox/Combobox.js"),require("../../cookie-consent/CookieConsentContext.js"),require("react-dom"),require("../../modal/Modal.js"),require("react-a11y-dialog"),require("../../list/List.js"),require("../../list/ListItem.js"),require("../../datepicker/DatePicker.js");const o=require("../feedbackContext.js"),s=require("../FeedbackSuccess.js");require("../../tooltip/Tooltip.js"),require("../../tooltip/TooltipContent.js"),require("../../tooltip/TooltipTrigger.js"),require("../../input-group/InputGroup.js");const n=require("./followupContext.js");require("../main-question/mainQuestionContext.js"),require("../../radio-button/RadioButton.js"),require("../../radio-button/radioGroupContext.js"),require("../../radio-button/BaseRadioButton.js"),require("../../text-input/BaseTextArea.js"),require("../../text-input/BaseTextInput.js"),require("../../text-input/TextArea.js"),require("../../text-input/TextInput.js"),require("../../../utilities/polymorphism/SlotComponent.js");const t=require("../utils.js");require("../../icon-button/IconButton.js"),require("../../link/Link.js"),require("../../link/NavLink.js"),require("../../link-list/LinkList.js"),require("../../message/Message.js"),require("../../message/FormErrorMessage.js"),require("../../popover/Popover.js"),require("../../../../NativeSelect-CNcZmpDZ.cjs"),require("../../tag/Tag.js");const c=require("./useFollowup.js"),u={title:"Takk, igjen!",children:"Vi setter pris på at du tok deg tid til å svare på flere spørsmål. Det hjelper oss med å gjøre nettsidene bedre for deg og alle andre som bruker dem."};exports.Followup=({questions:a,successMessage:l=u,onSubmit:j})=>{const[q,d]=r.useState(!1),p=r.useRef(null),m=c.useFollowup(a,j),{handleAbort:k,handleNext:b,step:x,submitted:I}=m,{followupStarted:g,setFollowupStarted:h,setFollowupSubmitted:C,contactSubmitted:f}=o.useFeedbackContext();r.useEffect((()=>{0!==x.number&&p.current&&p.current.focus()}),[x]),r.useEffect((()=>{C(I)}),[I,C]);const v=t.getQuestionFromType(a[x.number].type),S=x.isLast?i.PrimaryButton:i.SecondaryButton;return q?null:e.jsx("div",{"aria-live":"polite",children:e.jsxs(n.FollowUpProvider,{state:m,children:[!g&&e.jsxs("div",{className:"jkl-feedback__fade-in",children:[e.jsx("p",{className:"jkl-heading-4 jkl-spacing-xl--top jkl-spacing-xs--bottom",children:"Har du tid til å svare på noen flere spørsmål?"}),e.jsx("p",{className:"jkl-body jkl-spacing-xl--bottom",children:"Det tar kun et minutt, og hjelper oss å lage bedre løsninger for deg."}),e.jsx(i.PrimaryButton,{onClick:()=>h(!0),className:"jkl-spacing-xl--right",children:"Jeg har tid!"}),e.jsx(i.TertiaryButton,{onClick:()=>d(!0),children:"Nei takk"})]}),!I&&g&&e.jsxs("form",{onSubmit:b,className:"jkl-feedback__fade-in",children:[e.jsxs("p",{className:"jkl-feedback__step-counter",ref:p,children:["Steg ",x.number+1," av ",a.length]}),r.createElement(v,{...a[x.number],autoFocus:!0,key:x.number}),e.jsxs("div",{className:"jkl-spacing-xl--top","aria-live":"off",children:[e.jsx(S,{type:"submit",children:x.isLast?"Send inn":"Neste"}),e.jsx(i.TertiaryButton,{onClick:k,className:"jkl-spacing-xl--left",children:"Avbryt"})]})]}),I&&!f&&e.jsx(s.FeedbackSuccess,{...l})]})})};
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react");require("../../../hooks/useScreen/useScreen.js"),require("../../../hooks/useId/useId.js"),require("../../icon/Icon.js"),require("../../icon/icons/animated/ArrowVerticalAnimated.js"),require("../../icon/icons/animated/ArrowHorizontalAnimated.js"),require("../../icon/icons/animated/PlusRemoveAnimated.js"),require("../../icon/icons/ArrowDownIcon.js"),require("../../icon/icons/ArrowLeftIcon.js"),require("../../icon/icons/ArrowNorthEastIcon.js"),require("../../icon/icons/ArrowRightIcon.js"),require("../../icon/icons/ArrowUpIcon.js"),require("../../icon/icons/CalendarIcon.js"),require("../../icon/icons/CheckIcon.js"),require("../../icon/icons/ChevronDownIcon.js"),require("../../icon/icons/ChevronLeftIcon.js"),require("../../icon/icons/ChevronRightIcon.js"),require("../../icon/icons/ChevronUpIcon.js"),require("../../icon/icons/CloseIcon.js"),require("../../icon/icons/CopyIcon.js"),require("../../icon/icons/DotsIcon.js"),require("../../icon/icons/DragIcon.js"),require("../../icon/icons/ErrorIcon.js"),require("../../icon/icons/GreenCheckIcon.js"),require("../../icon/icons/HamburgerIcon.js"),require("../../icon/icons/InfoIcon.js"),require("../../icon/icons/LinkIcon.js"),require("../../icon/icons/PlusIcon.js"),require("../../icon/icons/QuestionIcon.js"),require("../../icon/icons/RedCrossIcon.js"),require("../../icon/icons/SearchIcon.js"),require("../../icon/icons/SuccessIcon.js"),require("../../icon/icons/WarningIcon.js"),require("../../icon/icons/MinusIcon.js"),require("../../icon/icons/ThumbDownIcon.js"),require("../../icon/icons/ThumbUpIcon.js"),require("../../icon/icons/TrashCanIcon.js"),require("../../icon/icons/PenIcon.js");const i=require("../../button/Button.js");require("../../card/Card.js"),require("../../card/CardImage.js"),require("../../card/NavCard.js"),require("../../checkbox/Checkbox.js"),require("../../combobox/Combobox.js"),require("../../cookie-consent/CookieConsentContext.js"),require("react-dom"),require("../../modal/Modal.js"),require("react-a11y-dialog"),require("../../list/List.js"),require("../../list/ListItem.js"),require("../../datepicker/DatePicker.js");const o=require("../feedbackContext.js"),s=require("../FeedbackSuccess.js");require("../../tooltip/Tooltip.js"),require("../../tooltip/TooltipContent.js"),require("../../tooltip/TooltipTrigger.js"),require("../../input-group/InputGroup.js");const t=require("./followupContext.js");require("../main-question/mainQuestionContext.js"),require("../../radio-button/RadioButton.js"),require("../../radio-button/radioGroupContext.js"),require("../../radio-button/BaseRadioButton.js"),require("../../text-input/BaseTextArea.js"),require("../../text-input/BaseTextInput.js"),require("../../text-input/TextArea.js"),require("../../text-input/TextInput.js"),require("../../../utilities/polymorphism/SlotComponent.js");const n=require("../utils.js");require("../../../../ExpandableTableRow-BQjBxKCX.cjs"),require("../../icon-button/IconButton.js"),require("../../link/Link.js"),require("../../link/NavLink.js"),require("../../link-list/LinkList.js"),require("../../logo/text-paths/ForsikringLevertAvFremtind.js"),require("../../logo/text-paths/FraSB1ogDNB.js"),require("../../logo/text-paths/InnovasjonFraFremtind.js"),require("../../logo/text-paths/TeknologiFraFremtind.js"),require("../../logo/text-paths/VartEgetForsikringsselskap.js"),require("../../logo/text-paths/VartForsikringsselskap.js"),require("../../message/Message.js"),require("../../message/FormErrorMessage.js"),require("../../popover/Popover.js"),require("../../system-message/SystemMessage.js"),require("../../table/DataTable.js"),require("../../table/Table.js"),require("../../table/TableBody.js"),require("../../table/TableCaption.js"),require("../../table/TableCell.js"),require("../../table/TableColumn.js"),require("../../table/TableColumnGroup.js"),require("../../table/tableContext.js"),require("../../table/tableSectionContext.js"),require("../../table/TableFooter.js"),require("../../table/TableHead.js"),require("../../table/TableHeader.js"),require("../../table/TableRow.js"),require("../../tabs/NavTab.js"),require("../../tabs/tabsContext.js"),require("../../tabs/Tab.js"),require("../../tag/Tag.js"),require("../../toast/toastContext.js"),require("../../toggle-switch/ToggleSwitch.js");const u=require("./useFollowup.js"),c={title:"Takk, igjen!",children:"Vi setter pris på at du tok deg tid til å svare på flere spørsmål. Det hjelper oss med å gjøre nettsidene bedre for deg og alle andre som bruker dem."};exports.Followup=({questions:a,successMessage:l=c,onSubmit:j})=>{const[q,d]=r.useState(!1),b=r.useRef(null),p=u.useFollowup(a,j),{handleAbort:m,handleNext:g,step:k,submitted:x}=p,{followupStarted:h,setFollowupStarted:I,setFollowupSubmitted:C,contactSubmitted:T,landmarkLabel:f}=o.useFeedbackContext();r.useEffect((()=>{0!==k.number&&b.current&&b.current.focus()}),[k]),r.useEffect((()=>{C(x)}),[x,C]);const v=n.getQuestionFromType(a[k.number].type),S=k.isLast?i.PrimaryButton:i.SecondaryButton;return q?null:e.jsx("div",{"aria-live":"polite",children:e.jsxs(t.FollowUpProvider,{state:p,children:[!h&&e.jsxs("div",{className:"jkl-feedback__fade-in",children:[e.jsx("p",{className:"jkl-heading-4 jkl-spacing-xl--top jkl-spacing-xs--bottom",children:"Har du tid til å svare på noen flere spørsmål?"}),e.jsx("p",{className:"jkl-body jkl-spacing-xl--bottom",children:"Det tar kun et minutt, og hjelper oss å lage bedre løsninger for deg."}),e.jsx(i.PrimaryButton,{onClick:()=>I(!0),className:"jkl-spacing-xl--right",children:"Jeg har tid!"}),e.jsx(i.TertiaryButton,{onClick:()=>d(!0),children:"Nei takk"})]}),!x&&h&&e.jsxs("form",{onSubmit:g,className:"jkl-feedback__fade-in","aria-label":f,children:[e.jsxs("p",{className:"jkl-feedback__step-counter",ref:b,children:["Steg ",k.number+1," av ",a.length]}),r.createElement(v,{...a[k.number],autoFocus:!0,key:k.number}),e.jsxs("div",{className:"jkl-spacing-xl--top","aria-live":"off",children:[e.jsx(S,{type:"submit",children:k.isLast?"Send inn":"Neste"}),e.jsx(i.TertiaryButton,{onClick:m,className:"jkl-spacing-xl--left",children:"Avbryt"})]})]}),x&&!T&&e.jsx(s.FeedbackSuccess,{...l})]})})};
2
2
  //# sourceMappingURL=Followup.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Followup.js","sources":["../../../../../src/components/feedback/followup/Followup.tsx"],"sourcesContent":["import React, { ReactNode, useEffect, useRef, useState, FC } from \"react\";\nimport { PrimaryButton, SecondaryButton, TertiaryButton } from \"../..\";\nimport { useFeedbackContext } from \"../feedbackContext\";\nimport { FeedbackSuccess } from \"../FeedbackSuccess\";\nimport { FeedbackAnswer, FollowupQuestion } from \"../types\";\nimport { getQuestionFromType } from \"../utils\";\nimport { FollowUpProvider } from \"./followupContext\";\nimport { useFollowup } from \"./useFollowup\";\n\nconst defaultSuccessMessage = {\n title: \"Takk, igjen!\",\n children:\n \"Vi setter pris på at du tok deg tid til å svare på flere spørsmål. Det hjelper oss med å gjøre nettsidene bedre for deg og alle andre som bruker dem.\",\n};\n\ninterface Props {\n /** Spørsmålet/ene som skal stilles. Kan være av typen radio, checkbox eller text */\n questions: FollowupQuestion[];\n /** Lar deg tilpasse meldingen som kommer når brukeren har svart på spørsmålene. */\n successMessage?: {\n title: string;\n children: ReactNode;\n };\n onSubmit: (values: FeedbackAnswer[]) => void;\n}\n\nexport const Followup: FC<Props> = ({ questions, successMessage = defaultSuccessMessage, onSubmit }) => {\n const [noThanks, setNoThanks] = useState(false);\n const focusRef = useRef<HTMLParagraphElement>(null);\n const followupState = useFollowup(questions, onSubmit);\n const { handleAbort, handleNext, step, submitted } = followupState;\n const { followupStarted, setFollowupStarted, setFollowupSubmitted, contactSubmitted } = useFeedbackContext();\n\n useEffect(() => {\n if (step.number === 0) {\n return;\n }\n focusRef.current && focusRef.current.focus();\n }, [step]);\n\n useEffect(() => {\n setFollowupSubmitted(submitted);\n }, [submitted, setFollowupSubmitted]);\n\n const QuestionComponent = getQuestionFromType(questions[step.number].type);\n const Button = step.isLast ? PrimaryButton : SecondaryButton;\n\n if (noThanks) {\n return null;\n }\n\n return (\n <div aria-live=\"polite\">\n <FollowUpProvider state={followupState}>\n {!followupStarted && (\n <div className=\"jkl-feedback__fade-in\">\n <p className=\"jkl-heading-4 jkl-spacing-xl--top jkl-spacing-xs--bottom\">\n Har du tid til å svare på noen flere spørsmål?\n </p>\n <p className=\"jkl-body jkl-spacing-xl--bottom\">\n Det tar kun et minutt, og hjelper oss å lage bedre løsninger for deg.\n </p>\n <PrimaryButton onClick={() => setFollowupStarted(true)} className=\"jkl-spacing-xl--right\">\n Jeg har tid!\n </PrimaryButton>\n <TertiaryButton onClick={() => setNoThanks(true)}>Nei takk</TertiaryButton>\n </div>\n )}\n {!submitted && followupStarted && (\n <form onSubmit={handleNext} className=\"jkl-feedback__fade-in\">\n <p className=\"jkl-feedback__step-counter\" ref={focusRef}>\n Steg {step.number + 1} av {questions.length}\n </p>\n {/* eslint-disable-next-line jsx-a11y/no-autofocus */}\n <QuestionComponent {...questions[step.number]} autoFocus key={step.number} />\n <div className=\"jkl-spacing-xl--top\" aria-live=\"off\">\n <Button type=\"submit\">{step.isLast ? \"Send inn\" : \"Neste\"}</Button>\n <TertiaryButton onClick={handleAbort} className=\"jkl-spacing-xl--left\">\n Avbryt\n </TertiaryButton>\n </div>\n </form>\n )}\n {submitted && !contactSubmitted && <FeedbackSuccess {...successMessage} />}\n </FollowUpProvider>\n </div>\n );\n};\n"],"names":["defaultSuccessMessage","title","children","questions","successMessage","onSubmit","noThanks","setNoThanks","useState","focusRef","useRef","followupState","useFollowup","handleAbort","handleNext","step","submitted","followupStarted","setFollowupStarted","setFollowupSubmitted","contactSubmitted","useFeedbackContext","useEffect","number","current","focus","QuestionComponent","getQuestionFromType","type","Button","isLast","PrimaryButton","SecondaryButton","jsxs","FollowUpProvider","state","className","jsx","onClick","TertiaryButton","ref","length","createElement","autoFocus","key","FeedbackSuccess"],"mappings":"4xGASMA,EAAwB,CAC1BC,MAAO,eACPC,SACI,0KAc2B,EAAGC,UAAAA,EAAWC,eAAAA,EAAiBJ,EAAuBK,SAAAA,MACrF,MAAOC,EAAUC,GAAeC,YAAS,GACnCC,EAAWC,SAA6B,MACxCC,EAAgBC,EAAAA,YAAYT,EAAWE,IACrCQ,YAAAA,EAAaC,WAAAA,EAAYC,KAAAA,EAAMC,UAAAA,GAAcL,GAC7CM,gBAAAA,EAAiBC,mBAAAA,EAAoBC,qBAAAA,EAAsBC,iBAAAA,GAAqBC,EAAAA,qBAExFC,EAAAA,WAAU,KACc,IAAhBP,EAAKQ,QAGAd,EAAAe,SAAWf,EAASe,QAAQC,OAAM,GAC5C,CAACV,IAEJO,EAAAA,WAAU,KACNH,EAAqBH,EAAS,GAC/B,CAACA,EAAWG,IAEf,MAAMO,EAAoBC,EAAAA,oBAAoBxB,EAAUY,EAAKQ,QAAQK,MAC/DC,EAASd,EAAKe,OAASC,EAAAA,cAAgBC,EAAAA,gBAE7C,OAAI1B,EACO,WAIN,MAAI,CAAA,YAAU,SACXJ,SAAC+B,EAAAA,KAAAC,mBAAA,CAAiBC,MAAOxB,EACpBT,SAAA,EAACe,GACEgB,EAAAA,KAAC,MAAI,CAAAG,UAAU,wBACXlC,SAAA,CAACmC,EAAAA,IAAA,IAAA,CAAED,UAAU,2DAA2DlC,SAExE,mDACCmC,EAAAA,IAAA,IAAA,CAAED,UAAU,kCAAkClC,SAE/C,0EACAmC,EAAAA,IAACN,iBAAcO,QAAS,IAAMpB,GAAmB,GAAOkB,UAAU,wBAAwBlC,SAE1F,uBACCqC,EAAAA,eAAe,CAAAD,QAAS,IAAM/B,GAAY,GAAOL,SAAQ,iBAGhEc,GAAaC,GACXgB,EAAAA,KAAC,QAAK5B,SAAUS,EAAYsB,UAAU,wBAClClC,SAAA,CAAA+B,EAAAA,KAAC,IAAE,CAAAG,UAAU,6BAA6BI,IAAK/B,EAAUP,SAAA,CAAA,QAC/Ca,EAAKQ,OAAS,EAAE,OAAKpB,EAAUsC,UAGzCC,EAAAA,cAAChB,EAAmB,IAAGvB,EAAUY,EAAKQ,QAASoB,WAAS,EAACC,IAAK7B,EAAKQ,SAClEU,EAAAA,KAAA,MAAA,CAAIG,UAAU,sBAAsB,YAAU,MAC3ClC,SAAA,CAAAmC,MAACR,GAAOD,KAAK,SAAU1B,SAAKa,EAAAe,OAAS,WAAa,gBACjDS,EAAAA,eAAe,CAAAD,QAASzB,EAAauB,UAAU,uBAAuBlC,SAEvE,iBAIXc,IAAcI,GAAqBiB,EAAAA,IAAAQ,EAAAA,gBAAA,IAAoBzC,QAEhE"}
1
+ {"version":3,"file":"Followup.js","sources":["../../../../../src/components/feedback/followup/Followup.tsx"],"sourcesContent":["import React, { ReactNode, useEffect, useRef, useState, FC } from \"react\";\nimport { PrimaryButton, SecondaryButton, TertiaryButton } from \"../..\";\nimport { useFeedbackContext } from \"../feedbackContext\";\nimport { FeedbackSuccess } from \"../FeedbackSuccess\";\nimport { FeedbackAnswer, FollowupQuestion } from \"../types\";\nimport { getQuestionFromType } from \"../utils\";\nimport { FollowUpProvider } from \"./followupContext\";\nimport { useFollowup } from \"./useFollowup\";\n\nconst defaultSuccessMessage = {\n title: \"Takk, igjen!\",\n children:\n \"Vi setter pris på at du tok deg tid til å svare på flere spørsmål. Det hjelper oss med å gjøre nettsidene bedre for deg og alle andre som bruker dem.\",\n};\n\ninterface Props {\n /** Spørsmålet/ene som skal stilles. Kan være av typen radio, checkbox eller text */\n questions: FollowupQuestion[];\n /** Lar deg tilpasse meldingen som kommer når brukeren har svart på spørsmålene. */\n successMessage?: {\n title: string;\n children: ReactNode;\n };\n onSubmit: (values: FeedbackAnswer[]) => void;\n}\n\nexport const Followup: FC<Props> = ({ questions, successMessage = defaultSuccessMessage, onSubmit }) => {\n const [noThanks, setNoThanks] = useState(false);\n const focusRef = useRef<HTMLParagraphElement>(null);\n const followupState = useFollowup(questions, onSubmit);\n const { handleAbort, handleNext, step, submitted } = followupState;\n const { followupStarted, setFollowupStarted, setFollowupSubmitted, contactSubmitted, landmarkLabel } =\n useFeedbackContext();\n\n useEffect(() => {\n if (step.number === 0) {\n return;\n }\n focusRef.current && focusRef.current.focus();\n }, [step]);\n\n useEffect(() => {\n setFollowupSubmitted(submitted);\n }, [submitted, setFollowupSubmitted]);\n\n const QuestionComponent = getQuestionFromType(questions[step.number].type);\n const Button = step.isLast ? PrimaryButton : SecondaryButton;\n\n if (noThanks) {\n return null;\n }\n\n return (\n <div aria-live=\"polite\">\n <FollowUpProvider state={followupState}>\n {!followupStarted && (\n <div className=\"jkl-feedback__fade-in\">\n <p className=\"jkl-heading-4 jkl-spacing-xl--top jkl-spacing-xs--bottom\">\n Har du tid til å svare på noen flere spørsmål?\n </p>\n <p className=\"jkl-body jkl-spacing-xl--bottom\">\n Det tar kun et minutt, og hjelper oss å lage bedre løsninger for deg.\n </p>\n <PrimaryButton onClick={() => setFollowupStarted(true)} className=\"jkl-spacing-xl--right\">\n Jeg har tid!\n </PrimaryButton>\n <TertiaryButton onClick={() => setNoThanks(true)}>Nei takk</TertiaryButton>\n </div>\n )}\n {!submitted && followupStarted && (\n <form onSubmit={handleNext} className=\"jkl-feedback__fade-in\" aria-label={landmarkLabel}>\n <p className=\"jkl-feedback__step-counter\" ref={focusRef}>\n Steg {step.number + 1} av {questions.length}\n </p>\n {/* eslint-disable-next-line jsx-a11y/no-autofocus */}\n <QuestionComponent {...questions[step.number]} autoFocus key={step.number} />\n <div className=\"jkl-spacing-xl--top\" aria-live=\"off\">\n <Button type=\"submit\">{step.isLast ? \"Send inn\" : \"Neste\"}</Button>\n <TertiaryButton onClick={handleAbort} className=\"jkl-spacing-xl--left\">\n Avbryt\n </TertiaryButton>\n </div>\n </form>\n )}\n {submitted && !contactSubmitted && <FeedbackSuccess {...successMessage} />}\n </FollowUpProvider>\n </div>\n );\n};\n"],"names":["defaultSuccessMessage","title","children","questions","successMessage","onSubmit","noThanks","setNoThanks","useState","focusRef","useRef","followupState","useFollowup","handleAbort","handleNext","step","submitted","followupStarted","setFollowupStarted","setFollowupSubmitted","contactSubmitted","landmarkLabel","useFeedbackContext","useEffect","number","current","focus","QuestionComponent","getQuestionFromType","type","Button","isLast","PrimaryButton","SecondaryButton","jsxs","FollowUpProvider","state","className","jsx","onClick","TertiaryButton","ref","length","createElement","autoFocus","key","FeedbackSuccess"],"mappings":"m1IASMA,EAAwB,CAC1BC,MAAO,eACPC,SACI,0KAc2B,EAAGC,UAAAA,EAAWC,eAAAA,EAAiBJ,EAAuBK,SAAAA,MACrF,MAAOC,EAAUC,GAAeC,YAAS,GACnCC,EAAWC,SAA6B,MACxCC,EAAgBC,EAAAA,YAAYT,EAAWE,IACrCQ,YAAAA,EAAaC,WAAAA,EAAYC,KAAAA,EAAMC,UAAAA,GAAcL,GAC7CM,gBAAAA,EAAiBC,mBAAAA,EAAoBC,qBAAAA,EAAsBC,iBAAAA,EAAkBC,cAAAA,GACjFC,EAAAA,qBAEJC,EAAAA,WAAU,KACc,IAAhBR,EAAKS,QAGAf,EAAAgB,SAAWhB,EAASgB,QAAQC,OAAM,GAC5C,CAACX,IAEJQ,EAAAA,WAAU,KACNJ,EAAqBH,EAAS,GAC/B,CAACA,EAAWG,IAEf,MAAMQ,EAAoBC,EAAAA,oBAAoBzB,EAAUY,EAAKS,QAAQK,MAC/DC,EAASf,EAAKgB,OAASC,EAAAA,cAAgBC,EAAAA,gBAE7C,OAAI3B,EACO,WAIN,MAAI,CAAA,YAAU,SACXJ,SAACgC,EAAAA,KAAAC,mBAAA,CAAiBC,MAAOzB,EACpBT,SAAA,EAACe,GACEiB,EAAAA,KAAC,MAAI,CAAAG,UAAU,wBACXnC,SAAA,CAACoC,EAAAA,IAAA,IAAA,CAAED,UAAU,2DAA2DnC,SAExE,mDACCoC,EAAAA,IAAA,IAAA,CAAED,UAAU,kCAAkCnC,SAE/C,0EACAoC,EAAAA,IAACN,iBAAcO,QAAS,IAAMrB,GAAmB,GAAOmB,UAAU,wBAAwBnC,SAE1F,uBACCsC,EAAAA,eAAe,CAAAD,QAAS,IAAMhC,GAAY,GAAOL,SAAQ,iBAGhEc,GAAaC,GACViB,EAAAA,KAAA,OAAA,CAAK7B,SAAUS,EAAYuB,UAAU,wBAAwB,aAAYhB,EACtEnB,SAAA,CAAAgC,EAAAA,KAAC,IAAE,CAAAG,UAAU,6BAA6BI,IAAKhC,EAAUP,SAAA,CAAA,QAC/Ca,EAAKS,OAAS,EAAE,OAAKrB,EAAUuC,UAGzCC,EAAAA,cAAChB,EAAmB,IAAGxB,EAAUY,EAAKS,QAASoB,WAAS,EAACC,IAAK9B,EAAKS,SAClEU,EAAAA,KAAA,MAAA,CAAIG,UAAU,sBAAsB,YAAU,MAC3CnC,SAAA,CAAAoC,MAACR,GAAOD,KAAK,SAAU3B,SAAKa,EAAAgB,OAAS,WAAa,gBACjDS,EAAAA,eAAe,CAAAD,QAAS1B,EAAawB,UAAU,uBAAuBnC,SAEvE,iBAIXc,IAAcI,GAAqBkB,EAAAA,IAAAQ,EAAAA,gBAAA,IAAoB1C,QAEhE"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("../../../../clsx-E3yX_9sL.cjs"),o=require("react"),r=require("../../../hooks/useAnimatedHeight/useAnimatedHeight.js");require("../../../hooks/useScreen/useScreen.js"),require("../../../hooks/useId/useId.js");const n=require("../../button/Button.js"),s=require("../feedbackContext.js"),c=require("../FeedbackSuccess.js");require("../../checkbox/Checkbox.js"),require("../../tooltip/Tooltip.js"),require("../../tooltip/TooltipContent.js"),require("../../tooltip/TooltipTrigger.js"),require("../../icon/Icon.js"),require("../../icon/icons/animated/ArrowVerticalAnimated.js"),require("../../icon/icons/animated/ArrowHorizontalAnimated.js"),require("../../icon/icons/animated/PlusRemoveAnimated.js"),require("../../icon/icons/ArrowDownIcon.js"),require("../../icon/icons/ArrowLeftIcon.js"),require("../../icon/icons/ArrowNorthEastIcon.js"),require("../../icon/icons/ArrowRightIcon.js"),require("../../icon/icons/ArrowUpIcon.js"),require("../../icon/icons/CalendarIcon.js"),require("../../icon/icons/CheckIcon.js"),require("../../icon/icons/ChevronDownIcon.js"),require("../../icon/icons/ChevronLeftIcon.js"),require("../../icon/icons/ChevronRightIcon.js"),require("../../icon/icons/ChevronUpIcon.js"),require("../../icon/icons/CloseIcon.js"),require("../../icon/icons/CopyIcon.js"),require("../../icon/icons/DotsIcon.js"),require("../../icon/icons/DragIcon.js"),require("../../icon/icons/ErrorIcon.js"),require("../../icon/icons/GreenCheckIcon.js"),require("../../icon/icons/HamburgerIcon.js"),require("../../icon/icons/InfoIcon.js"),require("../../icon/icons/LinkIcon.js"),require("../../icon/icons/PlusIcon.js"),require("../../icon/icons/QuestionIcon.js"),require("../../icon/icons/RedCrossIcon.js"),require("../../icon/icons/SearchIcon.js"),require("../../icon/icons/SuccessIcon.js"),require("../../icon/icons/WarningIcon.js"),require("../../icon/icons/MinusIcon.js"),require("../../icon/icons/ThumbDownIcon.js"),require("../../icon/icons/ThumbUpIcon.js"),require("../../icon/icons/TrashCanIcon.js"),require("../../icon/icons/PenIcon.js"),require("../../input-group/InputGroup.js"),require("../followup/followupContext.js");const t=require("./mainQuestionContext.js");require("../../radio-button/RadioButton.js"),require("../../radio-button/radioGroupContext.js"),require("../../radio-button/BaseRadioButton.js"),require("../../text-input/BaseTextArea.js"),require("../../text-input/BaseTextInput.js"),require("../../text-input/TextArea.js"),require("../../text-input/TextInput.js");const u=require("../questions/AddonQuestion.js");require("../../../utilities/polymorphism/SlotComponent.js");const a=require("../utils.js"),j=require("./useMainQuestion.js"),l={title:"Takk for tilbakemeldingen!",children:"Husk at vi ikke kan besvare meldinger fra dette skjemaet. Kontakt gjerne din forsikringsrådgiver om du har flere spørsmål."};exports.MainQuestion=({label:q,options:d,type:p,addOnQuestion:b,successMessage:I=l,helpLabel:h,onSubmit:m})=>{const x=j.useMainQuestion(m),{setFeedbackSubmitted:k,contactSubmitted:g}=s.useFeedbackContext(),{handleSubmit:C,currentValue:f,setCurrentValue:v,submitted:A}=x,[T]=r.useAnimatedHeight(void 0!==f);o.useEffect((()=>{k(A)}),[A,k]);const w=a.getQuestionFromType(p);return e.jsxs(e.Fragment,{children:[!A&&e.jsxs(t.MainQuestionContextProvider,{state:x,children:[e.jsx(w,{label:q,options:d,helpLabel:h}),e.jsxs("div",{ref:T,className:i.clsx({"jkl-feedback__submit-wrapper":!0,"jkl-feedback__submit-wrapper--hidden":void 0===f}),children:[b&&e.jsx(u.AddonQuestion,{helpLabel:"object"==typeof b?b.helpLabel:void 0,label:"object"==typeof b?b.label:void 0}),e.jsxs("div",{className:"jkl-spacing-xl--top",children:[e.jsx(n.PrimaryButton,{onClick:C,className:"jkl-spacing-xl--right",children:"Send"}),e.jsx(n.TertiaryButton,{onClick:()=>v(void 0),children:"Avbryt"})]})]})]}),A&&!g&&e.jsx(c.FeedbackSuccess,{...I})]})};
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("../../../../clsx-E3yX_9sL.cjs"),o=require("react"),r=require("../../../hooks/useAnimatedHeight/useAnimatedHeight.js");require("../../../hooks/useScreen/useScreen.js"),require("../../../hooks/useId/useId.js");const n=require("../../button/Button.js"),s=require("../feedbackContext.js"),t=require("../FeedbackSuccess.js");require("../../checkbox/Checkbox.js"),require("../../tooltip/Tooltip.js"),require("../../tooltip/TooltipContent.js"),require("../../tooltip/TooltipTrigger.js"),require("../../icon/Icon.js"),require("../../icon/icons/animated/ArrowVerticalAnimated.js"),require("../../icon/icons/animated/ArrowHorizontalAnimated.js"),require("../../icon/icons/animated/PlusRemoveAnimated.js"),require("../../icon/icons/ArrowDownIcon.js"),require("../../icon/icons/ArrowLeftIcon.js"),require("../../icon/icons/ArrowNorthEastIcon.js"),require("../../icon/icons/ArrowRightIcon.js"),require("../../icon/icons/ArrowUpIcon.js"),require("../../icon/icons/CalendarIcon.js"),require("../../icon/icons/CheckIcon.js"),require("../../icon/icons/ChevronDownIcon.js"),require("../../icon/icons/ChevronLeftIcon.js"),require("../../icon/icons/ChevronRightIcon.js"),require("../../icon/icons/ChevronUpIcon.js"),require("../../icon/icons/CloseIcon.js"),require("../../icon/icons/CopyIcon.js"),require("../../icon/icons/DotsIcon.js"),require("../../icon/icons/DragIcon.js"),require("../../icon/icons/ErrorIcon.js"),require("../../icon/icons/GreenCheckIcon.js"),require("../../icon/icons/HamburgerIcon.js"),require("../../icon/icons/InfoIcon.js"),require("../../icon/icons/LinkIcon.js"),require("../../icon/icons/PlusIcon.js"),require("../../icon/icons/QuestionIcon.js"),require("../../icon/icons/RedCrossIcon.js"),require("../../icon/icons/SearchIcon.js"),require("../../icon/icons/SuccessIcon.js"),require("../../icon/icons/WarningIcon.js"),require("../../icon/icons/MinusIcon.js"),require("../../icon/icons/ThumbDownIcon.js"),require("../../icon/icons/ThumbUpIcon.js"),require("../../icon/icons/TrashCanIcon.js"),require("../../icon/icons/PenIcon.js"),require("../../input-group/InputGroup.js"),require("../followup/followupContext.js");const c=require("./mainQuestionContext.js");require("../../radio-button/RadioButton.js"),require("../../radio-button/radioGroupContext.js"),require("../../radio-button/BaseRadioButton.js"),require("../../text-input/BaseTextArea.js"),require("../../text-input/BaseTextInput.js"),require("../../text-input/TextArea.js"),require("../../text-input/TextInput.js");const u=require("../questions/AddonQuestion.js");require("../../../utilities/polymorphism/SlotComponent.js");const a=require("../utils.js"),j=require("./useMainQuestion.js"),l={title:"Takk for tilbakemeldingen!",children:"Husk at vi ikke kan besvare meldinger fra dette skjemaet. Kontakt gjerne din forsikringsrådgiver om du har flere spørsmål."};exports.MainQuestion=({label:d,options:q,type:p,addOnQuestion:b,successMessage:m=l,helpLabel:h,onSubmit:I})=>{const x=j.useMainQuestion(I),{setFeedbackSubmitted:k,contactSubmitted:g,landmarkLabel:C}=s.useFeedbackContext(),{handleSubmit:f,currentValue:v,setCurrentValue:A,submitted:S}=x,[T]=r.useAnimatedHeight(void 0!==v);o.useEffect((()=>{k(S)}),[S,k]);const w=a.getQuestionFromType(p);return e.jsxs(e.Fragment,{children:[!S&&e.jsx(c.MainQuestionContextProvider,{state:x,children:e.jsxs("form",{onSubmit:f,"aria-label":C,children:[e.jsx(w,{label:d,options:q,helpLabel:h}),e.jsxs("div",{ref:T,className:i.clsx({"jkl-feedback__submit-wrapper":!0,"jkl-feedback__submit-wrapper--hidden":void 0===v}),children:[b&&e.jsx(u.AddonQuestion,{helpLabel:"object"==typeof b?b.helpLabel:void 0,label:"object"==typeof b?b.label:void 0}),e.jsxs("div",{className:"jkl-spacing-xl--top",children:[e.jsx(n.PrimaryButton,{className:"jkl-spacing-xl--right",children:"Send"}),e.jsx(n.TertiaryButton,{type:"button",onClick:()=>A(void 0),children:"Avbryt"})]})]})]})}),S&&!g&&e.jsx(t.FeedbackSuccess,{...m})]})};
2
2
  //# sourceMappingURL=MainQuestion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MainQuestion.js","sources":["../../../../../src/components/feedback/main-question/MainQuestion.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { ReactNode, useEffect, FC, ComponentProps } from \"react\";\nimport { useAnimatedHeight } from \"../../../hooks\";\nimport { PrimaryButton, TertiaryButton } from \"../../button\";\nimport { Feedback } from \"../Feedback\";\nimport { useFeedbackContext } from \"../feedbackContext\";\nimport { FeedbackSuccess } from \"../FeedbackSuccess\";\nimport { AddonQuestion } from \"../questions\";\nimport { FeedbackOption, FeedbackType } from \"../types\";\nimport { getQuestionFromType } from \"../utils\";\nimport { MainQuestionContextProvider } from \"./mainQuestionContext\";\nimport { useMainQuestion } from \"./useMainQuestion\";\n\nconst defaultSuccessMessage = {\n title: \"Takk for tilbakemeldingen!\",\n children:\n \"Husk at vi ikke kan besvare meldinger fra dette skjemaet. Kontakt gjerne din forsikringsrådgiver om du har flere spørsmål.\",\n};\n\ntype Props = Pick<ComponentProps<typeof Feedback>, \"addOnQuestion\"> & {\n type: \"radio\" | \"smiley\";\n label: string;\n helpLabel?: string;\n options: FeedbackOption[];\n successMessage?: {\n title: string;\n children: ReactNode;\n };\n onSubmit: (value: FeedbackType) => void;\n};\n\nexport const MainQuestion: FC<Props> = ({\n label,\n options,\n type,\n addOnQuestion,\n successMessage = defaultSuccessMessage,\n helpLabel,\n onSubmit,\n}) => {\n const mainQuestionState = useMainQuestion(onSubmit);\n\n const { setFeedbackSubmitted, contactSubmitted } = useFeedbackContext();\n const { handleSubmit, currentValue, setCurrentValue, submitted } = mainQuestionState;\n const [submitWrapperRef] = useAnimatedHeight<HTMLDivElement>(currentValue !== undefined);\n\n useEffect(() => {\n setFeedbackSubmitted(submitted);\n }, [submitted, setFeedbackSubmitted]);\n\n const MainQuestionComp = getQuestionFromType(type);\n\n return (\n <>\n {!submitted && (\n <MainQuestionContextProvider state={mainQuestionState}>\n <MainQuestionComp label={label} options={options} helpLabel={helpLabel} />\n <div\n ref={submitWrapperRef}\n className={clsx({\n \"jkl-feedback__submit-wrapper\": true,\n \"jkl-feedback__submit-wrapper--hidden\": currentValue === undefined,\n })}\n >\n {addOnQuestion && (\n <AddonQuestion\n helpLabel={typeof addOnQuestion === \"object\" ? addOnQuestion.helpLabel : undefined}\n label={typeof addOnQuestion === \"object\" ? addOnQuestion.label : undefined}\n />\n )}\n <div className=\"jkl-spacing-xl--top\">\n <PrimaryButton onClick={handleSubmit} className=\"jkl-spacing-xl--right\">\n Send\n </PrimaryButton>\n <TertiaryButton onClick={() => setCurrentValue(undefined)}>Avbryt</TertiaryButton>\n </div>\n </div>\n </MainQuestionContextProvider>\n )}\n {submitted && !contactSubmitted && <FeedbackSuccess {...successMessage} />}\n </>\n );\n};\n"],"names":["defaultSuccessMessage","title","children","label","options","type","addOnQuestion","successMessage","helpLabel","onSubmit","mainQuestionState","useMainQuestion","setFeedbackSubmitted","contactSubmitted","useFeedbackContext","handleSubmit","currentValue","setCurrentValue","submitted","submitWrapperRef","useAnimatedHeight","useEffect","MainQuestionComp","getQuestionFromType","jsxs","Fragment","MainQuestionContextProvider","state","jsx","ref","className","clsx","AddonQuestion","PrimaryButton","onClick","TertiaryButton","FeedbackSuccess"],"mappings":"+tFAaMA,EAAwB,CAC1BC,MAAO,6BACPC,SACI,mJAe+B,EACnCC,MAAAA,EACAC,QAAAA,EACAC,KAAAA,EACAC,cAAAA,EACAC,eAAAA,EAAiBP,EACjBQ,UAAAA,EACAC,SAAAA,MAEM,MAAAC,EAAoBC,kBAAgBF,IAElCG,qBAAAA,EAAsBC,iBAAAA,GAAqBC,EAAmBA,sBAC9DC,aAAAA,EAAcC,aAAAA,EAAcC,gBAAAA,EAAiBC,UAAAA,GAAcR,GAC5DS,GAAoBC,EAAAA,uBAAmD,IAAjBJ,GAE7DK,EAAAA,WAAU,KACNT,EAAqBM,EAAS,GAC/B,CAACA,EAAWN,IAET,MAAAU,EAAmBC,sBAAoBlB,GAE7C,OAESmB,EAAAA,KAAAC,WAAA,CAAAvB,SAAA,EAACgB,GACEM,EAAAA,KAACE,EAAAA,4BAA4B,CAAAC,MAAOjB,EAChCR,SAAA,CAAC0B,EAAAA,IAAAN,EAAA,CAAiBnB,MAAAA,EAAcC,QAAAA,EAAkBI,UAAAA,IAClDgB,EAAAA,KAAC,MAAA,CACGK,IAAKV,EACLW,UAAWC,EAAAA,KAAK,CACZ,gCAAgC,EAChC,4CAAyD,IAAjBf,IAG3Cd,SAAA,CACGI,GAAAsB,EAAAA,IAACI,EAAAA,cAAA,CACGxB,UAAoC,iBAAlBF,EAA6BA,EAAcE,eAAY,EACzEL,MAAgC,iBAAlBG,EAA6BA,EAAcH,WAAQ,IAGzEqB,EAAAA,KAAC,MAAI,CAAAM,UAAU,sBACX5B,SAAA,CAAA0B,MAACK,EAAAA,cAAc,CAAAC,QAASnB,EAAce,UAAU,wBAAwB5B,SAExE,eACCiC,EAAAA,eAAe,CAAAD,QAAS,IAAMjB,OAAgB,GAAYf,SAAM,oBAKhFgB,IAAcL,GAAqBe,EAAAA,IAAAQ,EAAAA,gBAAA,IAAoB7B,MAC5D"}
1
+ {"version":3,"file":"MainQuestion.js","sources":["../../../../../src/components/feedback/main-question/MainQuestion.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { ReactNode, useEffect, FC, ComponentProps } from \"react\";\nimport { useAnimatedHeight } from \"../../../hooks\";\nimport { PrimaryButton, TertiaryButton } from \"../../button\";\nimport { Feedback } from \"../Feedback\";\nimport { useFeedbackContext } from \"../feedbackContext\";\nimport { FeedbackSuccess } from \"../FeedbackSuccess\";\nimport { AddonQuestion } from \"../questions\";\nimport { FeedbackOption, FeedbackType } from \"../types\";\nimport { getQuestionFromType } from \"../utils\";\nimport { MainQuestionContextProvider } from \"./mainQuestionContext\";\nimport { useMainQuestion } from \"./useMainQuestion\";\n\nconst defaultSuccessMessage = {\n title: \"Takk for tilbakemeldingen!\",\n children:\n \"Husk at vi ikke kan besvare meldinger fra dette skjemaet. Kontakt gjerne din forsikringsrådgiver om du har flere spørsmål.\",\n};\n\ntype Props = Pick<ComponentProps<typeof Feedback>, \"addOnQuestion\"> & {\n type: \"radio\" | \"smiley\";\n label: string;\n helpLabel?: string;\n options: FeedbackOption[];\n successMessage?: {\n title: string;\n children: ReactNode;\n };\n onSubmit: (value: FeedbackType) => void;\n};\n\nexport const MainQuestion: FC<Props> = ({\n label,\n options,\n type,\n addOnQuestion,\n successMessage = defaultSuccessMessage,\n helpLabel,\n onSubmit,\n}) => {\n const mainQuestionState = useMainQuestion(onSubmit);\n\n const { setFeedbackSubmitted, contactSubmitted, landmarkLabel } = useFeedbackContext();\n const { handleSubmit, currentValue, setCurrentValue, submitted } = mainQuestionState;\n const [submitWrapperRef] = useAnimatedHeight<HTMLDivElement>(currentValue !== undefined);\n\n useEffect(() => {\n setFeedbackSubmitted(submitted);\n }, [submitted, setFeedbackSubmitted]);\n\n const MainQuestionComp = getQuestionFromType(type);\n\n return (\n <>\n {!submitted && (\n <MainQuestionContextProvider state={mainQuestionState}>\n <form onSubmit={handleSubmit} aria-label={landmarkLabel}>\n <MainQuestionComp label={label} options={options} helpLabel={helpLabel} />\n <div\n ref={submitWrapperRef}\n className={clsx({\n \"jkl-feedback__submit-wrapper\": true,\n \"jkl-feedback__submit-wrapper--hidden\": currentValue === undefined,\n })}\n >\n {addOnQuestion && (\n <AddonQuestion\n helpLabel={typeof addOnQuestion === \"object\" ? addOnQuestion.helpLabel : undefined}\n label={typeof addOnQuestion === \"object\" ? addOnQuestion.label : undefined}\n />\n )}\n <div className=\"jkl-spacing-xl--top\">\n <PrimaryButton className=\"jkl-spacing-xl--right\">Send</PrimaryButton>\n <TertiaryButton type=\"button\" onClick={() => setCurrentValue(undefined)}>\n Avbryt\n </TertiaryButton>\n </div>\n </div>\n </form>\n </MainQuestionContextProvider>\n )}\n {submitted && !contactSubmitted && <FeedbackSuccess {...successMessage} />}\n </>\n );\n};\n"],"names":["defaultSuccessMessage","title","children","label","options","type","addOnQuestion","successMessage","helpLabel","onSubmit","mainQuestionState","useMainQuestion","setFeedbackSubmitted","contactSubmitted","landmarkLabel","useFeedbackContext","handleSubmit","currentValue","setCurrentValue","submitted","submitWrapperRef","useAnimatedHeight","useEffect","MainQuestionComp","getQuestionFromType","jsxs","Fragment","jsx","MainQuestionContextProvider","state","ref","className","clsx","AddonQuestion","PrimaryButton","TertiaryButton","onClick","FeedbackSuccess"],"mappings":"+tFAaMA,EAAwB,CAC1BC,MAAO,6BACPC,SACI,mJAe+B,EACnCC,MAAAA,EACAC,QAAAA,EACAC,KAAAA,EACAC,cAAAA,EACAC,eAAAA,EAAiBP,EACjBQ,UAAAA,EACAC,SAAAA,MAEM,MAAAC,EAAoBC,kBAAgBF,IAElCG,qBAAAA,EAAsBC,iBAAAA,EAAkBC,cAAAA,GAAkBC,EAAmBA,sBAC7EC,aAAAA,EAAcC,aAAAA,EAAcC,gBAAAA,EAAiBC,UAAAA,GAAcT,GAC5DU,GAAoBC,EAAAA,uBAAmD,IAAjBJ,GAE7DK,EAAAA,WAAU,KACNV,EAAqBO,EAAS,GAC/B,CAACA,EAAWP,IAET,MAAAW,EAAmBC,sBAAoBnB,GAE7C,OAESoB,EAAAA,KAAAC,WAAA,CAAAxB,SAAA,EAACiB,GACGQ,EAAAA,IAAAC,EAAAA,4BAAA,CAA4BC,MAAOnB,EAChCR,gBAAC,OAAK,CAAAO,SAAUO,EAAc,aAAYF,EACtCZ,SAAA,CAACyB,EAAAA,IAAAJ,EAAA,CAAiBpB,MAAAA,EAAcC,QAAAA,EAAkBI,UAAAA,IAClDiB,EAAAA,KAAC,MAAA,CACGK,IAAKV,EACLW,UAAWC,EAAAA,KAAK,CACZ,gCAAgC,EAChC,4CAAyD,IAAjBf,IAG3Cf,SAAA,CACGI,GAAAqB,EAAAA,IAACM,EAAAA,cAAA,CACGzB,UAAoC,iBAAlBF,EAA6BA,EAAcE,eAAY,EACzEL,MAAgC,iBAAlBG,EAA6BA,EAAcH,WAAQ,IAGzEsB,EAAAA,KAAC,MAAI,CAAAM,UAAU,sBACX7B,SAAA,CAACyB,EAAAA,IAAAO,EAAAA,cAAA,CAAcH,UAAU,wBAAwB7B,SAAI,SACrDyB,EAAAA,IAACQ,kBAAe9B,KAAK,SAAS+B,QAAS,IAAMlB,OAAgB,GAAYhB,SAEzE,sBAMnBiB,IAAcN,GAAqBc,EAAAA,IAAAU,EAAAA,gBAAA,IAAoB9B,MAC5D"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react");exports.useMainQuestion=t=>{const[u,s]=e.useState(),[r,a]=e.useState(),[n,i]=e.useState(!1),o=e.useRef({onSubmit:t,currentValue:u,message:r,submitted:n});e.useEffect((()=>{o.current={...o.current,onSubmit:t,currentValue:u,message:r,submitted:n}}),[t,u,r,n]);const l=e.useCallback(((e=!0)=>{const{message:t,currentValue:u,submitted:s,onSubmit:r}=o.current;if(!s&&void 0!==u){r({feedbackValue:Array.isArray(u)?u.map((e=>e.value)):null==u?void 0:u.value,intentionalSubmit:e,...e&&t?{message:t}:{}})}}),[]),c=e.useCallback((()=>l(!1)),[l]);return e.useEffect((()=>(typeof window<"u"&&window.addEventListener("beforeunload",c),()=>{c(),window.removeEventListener("beforeunload",c)})),[c]),{currentValue:u,setCurrentValue:s,message:r,setMessage:a,submitted:n,handleSubmit:()=>{l(),i(!0)}}};
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react");exports.useMainQuestion=t=>{const[u,s]=e.useState(),[r,a]=e.useState(),[n,i]=e.useState(!1),o=e.useRef({onSubmit:t,currentValue:u,message:r,submitted:n});e.useEffect((()=>{o.current={...o.current,onSubmit:t,currentValue:u,message:r,submitted:n}}),[t,u,r,n]);const l=e.useCallback(((e=!0)=>{const{message:t,currentValue:u,submitted:s,onSubmit:r}=o.current;if(!s&&void 0!==u){r({feedbackValue:Array.isArray(u)?u.map((e=>e.value)):null==u?void 0:u.value,intentionalSubmit:e,...e&&t?{message:t}:{}})}}),[]),c=e.useCallback((()=>l(!1)),[l]);return e.useEffect((()=>(typeof window<"u"&&window.addEventListener("beforeunload",c),()=>{c(),window.removeEventListener("beforeunload",c)})),[c]),{currentValue:u,setCurrentValue:s,message:r,setMessage:a,submitted:n,handleSubmit:e=>{e.preventDefault(),l(),i(!0)}}};
2
2
  //# sourceMappingURL=useMainQuestion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useMainQuestion.js","sources":["../../../../../src/components/feedback/main-question/useMainQuestion.ts"],"sourcesContent":["import { useState, useRef, useCallback, useEffect, SetStateAction, Dispatch } from \"react\";\nimport { FeedbackType, FeedbackOption } from \"../types\";\n\ntype Value = FeedbackOption<string | number> | FeedbackOption<string | number>[] | undefined;\n\ntype MainQuestion = {\n currentValue: Value;\n setCurrentValue: Dispatch<SetStateAction<Value>>;\n message: string | undefined;\n setMessage: Dispatch<SetStateAction<string | undefined>>;\n submitted: boolean;\n handleSubmit: () => void;\n};\n\nexport const useMainQuestion = (onSubmit: (f: FeedbackType) => void): MainQuestion => {\n const [currentValue, setCurrentValue] = useState<FeedbackOption | FeedbackOption[]>();\n const [message, setMessage] = useState<string>();\n const [submitted, setSubmitted] = useState(false);\n\n const feedbackRef = useRef({\n onSubmit,\n currentValue,\n message,\n submitted,\n });\n\n useEffect(() => {\n feedbackRef.current = {\n ...feedbackRef.current,\n onSubmit,\n currentValue,\n message,\n submitted,\n };\n }, [onSubmit, currentValue, message, submitted]);\n\n const submitHandler = useCallback((intentionalSubmit = true) => {\n const { message, currentValue, submitted, onSubmit } = feedbackRef.current;\n\n if (!submitted && currentValue !== undefined) {\n const feedbackValue = Array.isArray(currentValue)\n ? currentValue.map((option) => option.value)\n : currentValue?.value;\n onSubmit({\n feedbackValue,\n intentionalSubmit,\n ...(intentionalSubmit && message ? { message } : {}),\n });\n }\n }, []);\n\n const autoSubmit = useCallback(() => submitHandler(false), [submitHandler]);\n\n useEffect(() => {\n if (typeof window !== \"undefined\") {\n window.addEventListener(\"beforeunload\", autoSubmit);\n }\n return () => {\n autoSubmit();\n window.removeEventListener(\"beforeunload\", autoSubmit);\n };\n }, [autoSubmit]);\n\n const handleSubmit = () => {\n submitHandler();\n setSubmitted(true);\n };\n\n return {\n currentValue,\n setCurrentValue,\n message,\n setMessage,\n submitted,\n handleSubmit,\n };\n};\n"],"names":["onSubmit","currentValue","setCurrentValue","useState","message","setMessage","submitted","setSubmitted","feedbackRef","useRef","useEffect","current","submitHandler","useCallback","intentionalSubmit","feedbackValue","Array","isArray","map","option","value","autoSubmit","window","addEventListener","removeEventListener","handleSubmit"],"mappings":"iIAcgCA,IAC5B,MAAOC,EAAcC,GAAmBC,EAA4CA,YAC7EC,EAASC,GAAcF,EAAiBA,YACxCG,EAAWC,GAAgBJ,YAAS,GAErCK,EAAcC,EAAAA,OAAO,CACvBT,SAAAA,EACAC,aAAAA,EACAG,QAAAA,EACAE,UAAAA,IAGJI,EAAAA,WAAU,KACNF,EAAYG,QAAU,IACfH,EAAYG,QACfX,SAAAA,EACAC,aAAAA,EACAG,QAAAA,EACAE,UAAAA,EAAA,GAEL,CAACN,EAAUC,EAAcG,EAASE,IAErC,MAAMM,EAAgBC,EAAAA,aAAY,CAACC,GAAoB,KAC7C,MAAEV,QAAAA,EAASH,aAAAA,EAAcK,UAAAA,EAAWN,SAAAA,GAAaQ,EAAYG,QAE/D,IAACL,QAA8B,IAAjBL,EAA4B,CAI1CD,EAAS,CACLe,cAJkBC,MAAMC,QAAQhB,GAC9BA,EAAaiB,KAAKC,GAAWA,EAAOC,QACpCnB,MAAAA,OAAAA,EAAAA,EAAcmB,MAGhBN,kBAAAA,KACIA,GAAqBV,EAAU,CAAEA,QAAAA,GAAY,CAAC,GAE1D,IACD,IAEGiB,EAAaR,EAAAA,aAAY,IAAMD,GAAc,IAAQ,CAACA,IAE5DF,OAAAA,EAAAA,WAAU,YACKY,OAAW,KACXA,OAAAC,iBAAiB,eAAgBF,GAErC,KACQA,IACJC,OAAAE,oBAAoB,eAAgBH,EAAU,IAE1D,CAACA,IAOG,CACHpB,aAAAA,EACAC,gBAAAA,EACAE,QAAAA,EACAC,WAAAA,EACAC,UAAAA,EACAmB,aAXiB,KACHb,IACdL,GAAa,EAAI,EASjB"}
1
+ {"version":3,"file":"useMainQuestion.js","sources":["../../../../../src/components/feedback/main-question/useMainQuestion.ts"],"sourcesContent":["import { useState, useRef, useCallback, useEffect, SetStateAction, Dispatch, FormEventHandler } from \"react\";\nimport { FeedbackType, FeedbackOption } from \"../types\";\n\ntype Value = FeedbackOption<string | number> | FeedbackOption<string | number>[] | undefined;\n\ntype MainQuestion = {\n currentValue: Value;\n setCurrentValue: Dispatch<SetStateAction<Value>>;\n message: string | undefined;\n setMessage: Dispatch<SetStateAction<string | undefined>>;\n submitted: boolean;\n handleSubmit: FormEventHandler<HTMLFormElement>;\n};\n\nexport const useMainQuestion = (onSubmit: (f: FeedbackType) => void): MainQuestion => {\n const [currentValue, setCurrentValue] = useState<FeedbackOption | FeedbackOption[]>();\n const [message, setMessage] = useState<string>();\n const [submitted, setSubmitted] = useState(false);\n\n const feedbackRef = useRef({\n onSubmit,\n currentValue,\n message,\n submitted,\n });\n\n useEffect(() => {\n feedbackRef.current = {\n ...feedbackRef.current,\n onSubmit,\n currentValue,\n message,\n submitted,\n };\n }, [onSubmit, currentValue, message, submitted]);\n\n const submitHandler = useCallback((intentionalSubmit = true) => {\n const { message, currentValue, submitted, onSubmit } = feedbackRef.current;\n\n if (!submitted && currentValue !== undefined) {\n const feedbackValue = Array.isArray(currentValue)\n ? currentValue.map((option) => option.value)\n : currentValue?.value;\n onSubmit({\n feedbackValue,\n intentionalSubmit,\n ...(intentionalSubmit && message ? { message } : {}),\n });\n }\n }, []);\n\n const autoSubmit = useCallback(() => submitHandler(false), [submitHandler]);\n\n useEffect(() => {\n if (typeof window !== \"undefined\") {\n window.addEventListener(\"beforeunload\", autoSubmit);\n }\n return () => {\n autoSubmit();\n window.removeEventListener(\"beforeunload\", autoSubmit);\n };\n }, [autoSubmit]);\n\n const handleSubmit: FormEventHandler<HTMLFormElement> = (e) => {\n e.preventDefault();\n submitHandler();\n setSubmitted(true);\n };\n\n return {\n currentValue,\n setCurrentValue,\n message,\n setMessage,\n submitted,\n handleSubmit,\n };\n};\n"],"names":["onSubmit","currentValue","setCurrentValue","useState","message","setMessage","submitted","setSubmitted","feedbackRef","useRef","useEffect","current","submitHandler","useCallback","intentionalSubmit","feedbackValue","Array","isArray","map","option","value","autoSubmit","window","addEventListener","removeEventListener","handleSubmit","e","preventDefault"],"mappings":"iIAcgCA,IAC5B,MAAOC,EAAcC,GAAmBC,EAA4CA,YAC7EC,EAASC,GAAcF,EAAiBA,YACxCG,EAAWC,GAAgBJ,YAAS,GAErCK,EAAcC,EAAAA,OAAO,CACvBT,SAAAA,EACAC,aAAAA,EACAG,QAAAA,EACAE,UAAAA,IAGJI,EAAAA,WAAU,KACNF,EAAYG,QAAU,IACfH,EAAYG,QACfX,SAAAA,EACAC,aAAAA,EACAG,QAAAA,EACAE,UAAAA,EAAA,GAEL,CAACN,EAAUC,EAAcG,EAASE,IAErC,MAAMM,EAAgBC,EAAAA,aAAY,CAACC,GAAoB,KAC7C,MAAEV,QAAAA,EAASH,aAAAA,EAAcK,UAAAA,EAAWN,SAAAA,GAAaQ,EAAYG,QAE/D,IAACL,QAA8B,IAAjBL,EAA4B,CAI1CD,EAAS,CACLe,cAJkBC,MAAMC,QAAQhB,GAC9BA,EAAaiB,KAAKC,GAAWA,EAAOC,QACpCnB,MAAAA,OAAAA,EAAAA,EAAcmB,MAGhBN,kBAAAA,KACIA,GAAqBV,EAAU,CAAEA,QAAAA,GAAY,CAAC,GAE1D,IACD,IAEGiB,EAAaR,EAAAA,aAAY,IAAMD,GAAc,IAAQ,CAACA,IAE5DF,OAAAA,EAAAA,WAAU,YACKY,OAAW,KACXA,OAAAC,iBAAiB,eAAgBF,GAErC,KACQA,IACJC,OAAAE,oBAAoB,eAAgBH,EAAU,IAE1D,CAACA,IAQG,CACHpB,aAAAA,EACAC,gBAAAA,EACAE,QAAAA,EACAC,WAAAA,EACAC,UAAAA,EACAmB,aAZqDC,IACrDA,EAAEC,iBACYf,IACdL,GAAa,EAAI,EASjB"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react");require("../../../utilities/polymorphism/SlotComponent.js");const r=require("../../../utilities/validators/isValidEpost/isValidEpost.js"),n=require("../../../utilities/validators/isValidTelefonnummer/isValidTelefonnummer.js"),s=require("../../button/Button.js");require("../../text-input/BaseTextArea.js"),require("../../text-input/BaseTextInput.js"),require("../../text-input/TextArea.js");const i=require("../../text-input/TextInput.js"),a=require("../feedbackContext.js"),l=require("../FeedbackSuccess.js"),o={title:"Takk for tiden din!",children:"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."};exports.ContactQuestion=({label:u="Kan vi kontakte deg for flere innspill?",sendButtonLabel:d="Sett meg på lista!",withPhone:m=!1,onSubmit:p,successMessage:c=o,children:g})=>{const[j,k]=t.useState(""),[x,f]=t.useState(""),[v,b]=t.useState({}),h=t.useRef(null),S=t.useRef(null),[T,q]=t.useState(!1),[E,y]=t.useState(!1),{contactSubmitted:C,setContactSubmitted:N}=a.useFeedbackContext(),B="string"==typeof g?"p":"div",V=(e,t)=>{const s=(e=>e&&""!==e?r.isValidEpost(e)?void 0:"Skriv inn en gyldig e-postadresse":"Du må oppgi e-postadresse for at vi kan kontakte deg")(e),i=(e=>e&&""!==e?n.isValidTelefonnummer(e)?void 0:"Skriv inn et gyldig telefonnummer":"Du må oppgi telefonnummer for at vi kan kontakte deg")(t);return b({email:s,phone:i}),{emailError:s,phoneError:i}};t.useEffect((()=>{if(T){const{emailError:e,phoneError:t}=V(j,x);!e&&(!m||!t)&&q(!1)}}),[j,x,T,m]);const P=e=>t=>e(t.target.value);return E?null:C?e.jsx(l.FeedbackSuccess,{...c}):e.jsxs("form",{className:"jkl-spacing-xl--top",onSubmit:e=>{var t,r;e.preventDefault();const{emailError:n,phoneError:s}=V(j,x);return n?(q(!0),void(null==(t=h.current)||t.focus())):m&&s?(q(!0),void(null==(r=S.current)||r.focus())):(p({email:j,phone:m?x:void 0}),void N(!0))},children:[e.jsx("p",{className:"jkl-heading-4 jkl-spacing-xs--bottom",children:u}),g&&e.jsx(B,{className:"jkl-body",children:g}),e.jsx(i.TextInput,{ref:h,className:"jkl-spacing-l--top",label:"E-post",labelProps:{variant:"small"},autoComplete:"email",name:"email",value:j,onChange:P(k),errorLabel:v.email}),m&&e.jsx(i.TextInput,{ref:S,className:"jkl-spacing-l--top",label:"Telefonnummer",labelProps:{variant:"small"},autoComplete:"tel",name:"phone",value:x,onChange:P(f),errorLabel:v.phone}),e.jsxs("div",{className:"jkl-spacing-xl--top",children:[e.jsx(s.PrimaryButton,{type:"submit",className:"jkl-spacing-xl--right",children:d}),e.jsx(s.TertiaryButton,{onClick:()=>y(!0),children:"Nei takk"})]})]})};
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react");require("../../../utilities/polymorphism/SlotComponent.js");const r=require("../../../utilities/validators/isValidEpost/isValidEpost.js"),n=require("../../../utilities/validators/isValidTelefonnummer/isValidTelefonnummer.js"),s=require("../../button/Button.js");require("../../text-input/BaseTextArea.js"),require("../../text-input/BaseTextInput.js"),require("../../text-input/TextArea.js");const i=require("../../text-input/TextInput.js"),a=require("../feedbackContext.js"),l=require("../FeedbackSuccess.js"),o={title:"Takk for tiden din!",children:"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."};exports.ContactQuestion=({label:u="Kan vi kontakte deg for flere innspill?",sendButtonLabel:d="Sett meg på lista!",withPhone:m=!1,onSubmit:p,successMessage:c=o,children:g})=>{const[j,k]=t.useState(""),[x,f]=t.useState(""),[b,v]=t.useState({}),h=t.useRef(null),S=t.useRef(null),[T,q]=t.useState(!1),[E,y]=t.useState(!1),{contactSubmitted:C,setContactSubmitted:N,landmarkLabel:B}=a.useFeedbackContext(),V="string"==typeof g?"p":"div",P=(e,t)=>{const s=(e=>e&&""!==e?r.isValidEpost(e)?void 0:"Skriv inn en gyldig e-postadresse":"Du må oppgi e-postadresse for at vi kan kontakte deg")(e),i=(e=>e&&""!==e?n.isValidTelefonnummer(e)?void 0:"Skriv inn et gyldig telefonnummer":"Du må oppgi telefonnummer for at vi kan kontakte deg")(t);return v({email:s,phone:i}),{emailError:s,phoneError:i}};t.useEffect((()=>{if(T){const{emailError:e,phoneError:t}=P(j,x);!e&&(!m||!t)&&q(!1)}}),[j,x,T,m]);const D=e=>t=>e(t.target.value);return E?null:C?e.jsx(l.FeedbackSuccess,{...c}):e.jsxs("form",{className:"jkl-spacing-xl--top",onSubmit:e=>{var t,r;e.preventDefault();const{emailError:n,phoneError:s}=P(j,x);return n?(q(!0),void(null==(t=h.current)||t.focus())):m&&s?(q(!0),void(null==(r=S.current)||r.focus())):(p({email:j,phone:m?x:void 0}),void N(!0))},"aria-label":B,children:[e.jsx("p",{className:"jkl-heading-4 jkl-spacing-xs--bottom",children:u}),g&&e.jsx(V,{className:"jkl-body",children:g}),e.jsx(i.TextInput,{ref:h,className:"jkl-spacing-l--top",label:"E-post",labelProps:{variant:"small"},autoComplete:"email",name:"email",value:j,onChange:D(k),errorLabel:b.email}),m&&e.jsx(i.TextInput,{ref:S,className:"jkl-spacing-l--top",label:"Telefonnummer",labelProps:{variant:"small"},autoComplete:"tel",name:"phone",value:x,onChange:D(f),errorLabel:b.phone}),e.jsxs("div",{className:"jkl-spacing-xl--top",children:[e.jsx(s.PrimaryButton,{type:"submit",className:"jkl-spacing-xl--right",children:d}),e.jsx(s.TertiaryButton,{onClick:()=>y(!0),children:"Nei takk"})]})]})};
2
2
  //# sourceMappingURL=ContactQuestion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContactQuestion.js","sources":["../../../../../src/components/feedback/questions/ContactQuestion.tsx"],"sourcesContent":["import React, { ChangeEvent, FC, ReactNode, useEffect, useRef, useState } from \"react\";\nimport { isValidEpost, isValidTelefonnummer } from \"../../../utilities\";\nimport { PrimaryButton, TertiaryButton } from \"../../button\";\nimport { TextInput } from \"../../text-input\";\nimport { useFeedbackContext } from \"../feedbackContext\";\nimport { FeedbackSuccess } from \"../FeedbackSuccess\";\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 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 } = 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 = (consumer: (value: string) => void) => (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 className=\"jkl-spacing-xl--top\" onSubmit={handleSubmit}>\n <p className=\"jkl-heading-4 jkl-spacing-xs--bottom\">{label}</p>\n {children && <ChildrenWrapper className=\"jkl-body\">{children}</ChildrenWrapper>}\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)}>Nei takk</TertiaryButton>\n </div>\n </form>\n );\n};\n"],"names":["defaultSuccessMessage","title","children","label","sendButtonLabel","withPhone","onSubmit","successMessage","email","setEmail","useState","phone","setPhone","errors","setErrors","emailRef","useRef","phoneRef","shouldValidate","setShouldValidate","noThanks","setNoThanks","contactSubmitted","setContactSubmitted","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":"soBA2BMA,EAAwB,CAC1BC,MAAO,sBACPC,SACI,8MA0BkC,EACtCC,MAAAA,EAAQ,0CACRC,gBAAAA,EAAkB,qBAClBC,UAAAA,GAAY,EACZC,SAAAA,EACAC,eAAAA,EAAiBP,EACjBE,SAAAA,MAEA,MAAOM,EAAOC,GAAYC,WAAS,KAC5BC,EAAOC,GAAYF,WAAS,KAC5BG,EAAQC,GAAaJ,EAAAA,SAA6C,CAAE,GACrEK,EAAWC,SAAyB,MACpCC,EAAWD,SAAyB,OACnCE,EAAgBC,GAAqBT,YAAS,IAE9CU,EAAUC,GAAeX,YAAS,IACjCY,iBAAAA,EAAkBC,oBAAAA,GAAwBC,EAAmBA,qBAE/DC,EAAsC,iBAAbvB,EAAwB,IAAM,MAEvDwB,EAAW,CAAClB,EAAeG,KACvB,MAAAgB,EAtESnB,IACdA,GAAmB,KAAVA,EAGToB,EAAAA,aAAapB,QAAd,EACO,oCAHA,uDAoEYqB,CAAcrB,GAC3BsB,EA7DSnB,IACdA,GAAmB,KAAVA,EAGToB,EAAAA,qBAAqBpB,QAAtB,EACO,oCAHA,uDA2DYqB,CAAcrB,GACjC,OAAAG,EAAU,CAAEN,MAAOmB,EAAYhB,MAAOmB,IAC/B,CAAEH,WAAAA,EAAYG,WAAAA,IAGzBG,EAAAA,WAAU,KACN,GAAIf,EAAgB,CAChB,MAAQS,WAAAA,EAAYG,WAAAA,GAAeJ,EAASlB,EAAOG,IAE9CgB,KAAgBtB,IAAcyB,IAC/BX,GAAkB,EAE1B,IACD,CAACX,EAAOG,EAAOO,EAAgBb,IAE5B,MAAA6B,EAAgBC,GAAuCC,GACzDD,EAASC,EAAEC,OAAOC,OAqBtB,OAAIlB,EACO,KAGPE,EACOiB,EAAAA,IAACC,EAAiBA,gBAAA,IAAGjC,IAI3BkC,EAAAA,KAAA,OAAA,CAAKC,UAAU,sBAAsBpC,SA5BI8B,YAC1CA,EAAEO,iBAEF,MAAQhB,WAAAA,EAAYG,WAAAA,GAAeJ,EAASlB,EAAOG,GACnD,OAAIgB,GACAR,GAAkB,QAClB,OAAAyB,EAAA7B,EAAS8B,UAATD,EAAkBE,UAGlBzC,GAAayB,GACbX,GAAkB,QAClB,OAAA4B,EAAA9B,EAAS4B,UAATE,EAAkBD,WAItBxC,EAAS,CAAEE,MAAAA,EAAOG,MAAON,EAAYM,OAAQ,SAC7CY,GAAoB,GAAI,EAapBrB,SAAA,CAACqC,EAAAA,IAAA,IAAA,CAAEG,UAAU,uCAAwCxC,SAAMC,IAC1DD,GAAYqC,EAAAA,IAACd,EAAgB,CAAAiB,UAAU,WAAYxC,SAAAA,IAEpDqC,EAAAA,IAACS,EAAAA,UAAA,CACGC,IAAKlC,EACL2B,UAAU,qBACVvC,MAAM,SACN+C,WAAY,CAAEC,QAAS,SACvBC,aAAa,QACbC,KAAK,QACLf,MAAO9B,EACP8C,SAAUpB,EAAazB,GACvB8C,WAAY1C,EAAOL,QAEtBH,GACGkC,EAAAA,IAACS,EAAAA,UAAA,CACGC,IAAKhC,EACLyB,UAAU,qBACVvC,MAAM,gBACN+C,WAAY,CAAEC,QAAS,SACvBC,aAAa,MACbC,KAAK,QACLf,MAAO3B,EACP2C,SAAUpB,EAAatB,GACvB2C,WAAY1C,EAAOF,QAI3B8B,EAAAA,KAAC,MAAI,CAAAC,UAAU,sBACXxC,SAAA,CAAAqC,MAACiB,EAAAA,cAAc,CAAAC,KAAK,SAASf,UAAU,wBAClCxC,SACLE,UACCsD,EAAAA,eAAe,CAAAC,QAAS,IAAMtC,GAAY,GAAOnB,SAAQ,kBAElE"}
1
+ {"version":3,"file":"ContactQuestion.js","sources":["../../../../../src/components/feedback/questions/ContactQuestion.tsx"],"sourcesContent":["import React, { ChangeEvent, FC, ReactNode, useEffect, useRef, useState } from \"react\";\nimport { isValidEpost, isValidTelefonnummer } from \"../../../utilities\";\nimport { PrimaryButton, TertiaryButton } from \"../../button\";\nimport { TextInput } from \"../../text-input\";\nimport { useFeedbackContext } from \"../feedbackContext\";\nimport { FeedbackSuccess } from \"../FeedbackSuccess\";\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 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 } = 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 = (consumer: (value: string) => void) => (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 className=\"jkl-spacing-xl--top\" onSubmit={handleSubmit} aria-label={landmarkLabel}>\n <p className=\"jkl-heading-4 jkl-spacing-xs--bottom\">{label}</p>\n {children && <ChildrenWrapper className=\"jkl-body\">{children}</ChildrenWrapper>}\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)}>Nei takk</TertiaryButton>\n </div>\n </form>\n );\n};\n"],"names":["defaultSuccessMessage","title","children","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","className","preventDefault","_a","current","focus","_b","TextInput","ref","labelProps","variant","autoComplete","name","onChange","errorLabel","jsxs","PrimaryButton","type","TertiaryButton","onClick"],"mappings":"soBA2BMA,EAAwB,CAC1BC,MAAO,sBACPC,SACI,8MA0BkC,EACtCC,MAAAA,EAAQ,0CACRC,gBAAAA,EAAkB,qBAClBC,UAAAA,GAAY,EACZC,SAAAA,EACAC,eAAAA,EAAiBP,EACjBE,SAAAA,MAEA,MAAOM,EAAOC,GAAYC,WAAS,KAC5BC,EAAOC,GAAYF,WAAS,KAC5BG,EAAQC,GAAaJ,EAAAA,SAA6C,CAAE,GACrEK,EAAWC,SAAyB,MACpCC,EAAWD,SAAyB,OACnCE,EAAgBC,GAAqBT,YAAS,IAE9CU,EAAUC,GAAeX,YAAS,IACjCY,iBAAAA,EAAkBC,oBAAAA,EAAqBC,cAAAA,GAAkBC,EAAmBA,qBAE9EC,EAAsC,iBAAbxB,EAAwB,IAAM,MAEvDyB,EAAW,CAACnB,EAAeG,KACvB,MAAAiB,EAtESpB,IACdA,GAAmB,KAAVA,EAGTqB,EAAAA,aAAarB,QAAd,EACO,oCAHA,uDAoEYsB,CAActB,GAC3BuB,EA7DSpB,IACdA,GAAmB,KAAVA,EAGTqB,EAAAA,qBAAqBrB,QAAtB,EACO,oCAHA,uDA2DYsB,CAActB,GACjC,OAAAG,EAAU,CAAEN,MAAOoB,EAAYjB,MAAOoB,IAC/B,CAAEH,WAAAA,EAAYG,WAAAA,IAGzBG,EAAAA,WAAU,KACN,GAAIhB,EAAgB,CAChB,MAAQU,WAAAA,EAAYG,WAAAA,GAAeJ,EAASnB,EAAOG,IAE9CiB,KAAgBvB,IAAc0B,IAC/BZ,GAAkB,EAE1B,IACD,CAACX,EAAOG,EAAOO,EAAgBb,IAE5B,MAAA8B,EAAgBC,GAAuCC,GACzDD,EAASC,EAAEC,OAAOC,OAqBtB,OAAInB,EACO,KAGPE,EACOkB,EAAAA,IAACC,EAAiBA,gBAAA,IAAGlC,WAI3B,OAAK,CAAAmC,UAAU,sBAAsBpC,SA5BI+B,YAC1CA,EAAEM,iBAEF,MAAQf,WAAAA,EAAYG,WAAAA,GAAeJ,EAASnB,EAAOG,GACnD,OAAIiB,GACAT,GAAkB,QAClB,OAAAyB,EAAA7B,EAAS8B,UAATD,EAAkBE,UAGlBzC,GAAa0B,GACbZ,GAAkB,QAClB,OAAA4B,EAAA9B,EAAS4B,UAATE,EAAkBD,WAItBxC,EAAS,CAAEE,MAAAA,EAAOG,MAAON,EAAYM,OAAQ,SAC7CY,GAAoB,GAAI,EAYsC,aAAYC,EACtEtB,SAAA,CAACsC,EAAAA,IAAA,IAAA,CAAEE,UAAU,uCAAwCxC,SAAMC,IAC1DD,GAAYsC,EAAAA,IAACd,EAAgB,CAAAgB,UAAU,WAAYxC,SAAAA,IAEpDsC,EAAAA,IAACQ,EAAAA,UAAA,CACGC,IAAKlC,EACL2B,UAAU,qBACVvC,MAAM,SACN+C,WAAY,CAAEC,QAAS,SACvBC,aAAa,QACbC,KAAK,QACLd,MAAO/B,EACP8C,SAAUnB,EAAa1B,GACvB8C,WAAY1C,EAAOL,QAEtBH,GACGmC,EAAAA,IAACQ,EAAAA,UAAA,CACGC,IAAKhC,EACLyB,UAAU,qBACVvC,MAAM,gBACN+C,WAAY,CAAEC,QAAS,SACvBC,aAAa,MACbC,KAAK,QACLd,MAAO5B,EACP2C,SAAUnB,EAAavB,GACvB2C,WAAY1C,EAAOF,QAI3B6C,EAAAA,KAAC,MAAI,CAAAd,UAAU,sBACXxC,SAAA,CAAAsC,MAACiB,EAAAA,cAAc,CAAAC,KAAK,SAAShB,UAAU,wBAClCxC,SACLE,UACCuD,EAAAA,eAAe,CAAAC,QAAS,IAAMvC,GAAY,GAAOnB,SAAQ,kBAElE"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./accordion/AccordionItem.js"),o=require("./accordion/Accordion.js"),r=require("./breadcrumb/Breadcrumb.js"),t=require("./breadcrumb/BreadcrumbItem.js"),n=require("./button/Button.js"),s=require("./card/Card.js"),i=require("./card/CardImage.js"),c=require("./card/NavCard.js"),a=require("./card/TaskCard.js"),u=require("./card/InfoCard.js"),p=require("./checkbox/Checkbox.js"),x=require("./combobox/Combobox.js"),l=require("./cookie-consent/CookieConsent.js"),d=require("./cookie-consent/CookieConsentContext.js"),I=require("./datepicker/validation.js"),j=require("./datepicker/utils.js"),q=require("./datepicker/DatePicker.js"),k=require("./feedback/Feedback.js"),C=require("./feedback/presets.js"),m=require("./icon/Icon.js"),g=require("./icon/icons/animated/ArrowVerticalAnimated.js"),T=require("./icon/icons/animated/ArrowHorizontalAnimated.js"),b=require("./icon/icons/animated/PlusRemoveAnimated.js"),S=require("./icon/icons/ArrowDownIcon.js"),h=require("./icon/icons/ArrowLeftIcon.js"),B=require("./icon/icons/ArrowNorthEastIcon.js"),A=require("./icon/icons/ArrowRightIcon.js"),L=require("./icon/icons/ArrowUpIcon.js"),M=require("./icon/icons/CalendarIcon.js"),w=require("./icon/icons/CheckIcon.js"),v=require("./icon/icons/ChevronDownIcon.js"),R=require("./icon/icons/ChevronLeftIcon.js"),P=require("./icon/icons/ChevronRightIcon.js"),f=require("./icon/icons/ChevronUpIcon.js"),y=require("./icon/icons/CloseIcon.js"),D=require("./icon/icons/CopyIcon.js"),E=require("./icon/icons/DotsIcon.js"),G=require("./icon/icons/DragIcon.js"),U=require("./icon/icons/ErrorIcon.js"),N=require("./icon/icons/GreenCheckIcon.js"),F=require("./icon/icons/HamburgerIcon.js"),W=require("./icon/icons/InfoIcon.js"),H=require("./icon/icons/LinkIcon.js"),O=require("./icon/icons/PlusIcon.js"),V=require("./icon/icons/QuestionIcon.js"),z=require("./icon/icons/RedCrossIcon.js"),Q=require("./icon/icons/SearchIcon.js"),Y=require("./icon/icons/SuccessIcon.js"),J=require("./icon/icons/WarningIcon.js"),K=require("./icon/icons/MinusIcon.js"),X=require("./icon/icons/ThumbDownIcon.js"),Z=require("./icon/icons/ThumbUpIcon.js"),$=require("./icon/icons/TrashCanIcon.js"),_=require("./icon/icons/PenIcon.js"),ee=require("./icon-button/IconButton.js"),oe=require("./image/Image.js"),re=require("./input-group/FieldGroup.js"),te=require("./input-group/InputGroup.js"),ne=require("./input-group/Label.js"),se=require("./input-group/SupportLabel.js"),ie=require("./link/Link.js"),ce=require("./link/NavLink.js"),ae=require("./link-list/LinkList.js"),ue=require("./list/List.js"),pe=require("./list/ListItem.js"),xe=require("./loader/Loader.js"),le=require("./loader/skeletons/SkeletonAnimation.js"),de=require("./loader/skeletons/SkeletonButton.js"),Ie=require("./loader/skeletons/SkeletonCheckboxGroup.js"),je=require("./loader/skeletons/SkeletonElement.js"),qe=require("./loader/skeletons/SkeletonInput.js"),ke=require("./loader/skeletons/SkeletonRadioButtonGroup.js"),Ce=require("./loader/skeletons/SkeletonTable.js"),me=require("./loader/skeletons/SkeletonTextArea.js"),ge=require("./message/Message.js"),Te=require("./message/FormErrorMessage.js"),be=require("./modal/Modal.js"),Se=require("./modal/useModal.js"),he=require("./popover/Popover.js"),Be=require("./radio-button/RadioButton.js"),Ae=require("./radio-button/RadioButtonGroup.js"),Le=require("./radio-button/BaseRadioButton.js"),Me=require("../../NativeSelect-CNcZmpDZ.cjs"),we=require("./tag/Tag.js"),ve=require("./text-input/BaseTextArea.js"),Re=require("./text-input/BaseTextInput.js"),Pe=require("./text-input/TextArea.js"),fe=require("./text-input/TextInput.js"),ye=require("./tooltip/Tooltip.js"),De=require("./tooltip/TooltipContent.js"),Ee=require("./tooltip/TooltipTrigger.js"),Ge=require("./tooltip/PopupTip.js"),Ue=require("./ScreenReaderOnly.js");exports.AccordionItem=e.AccordionItem,exports.Accordion=o.Accordion,exports.Breadcrumb=r.Breadcrumb,exports.BreadcrumbItem=t.BreadcrumbItem,exports.Button=n.Button,exports.PrimaryButton=n.PrimaryButton,exports.SecondaryButton=n.SecondaryButton,exports.TertiaryButton=n.TertiaryButton,exports.Card=s.Card,exports.CardImage=i.CardImage,exports.InfoBlock=c.InfoBlock,exports.NavCard=c.NavCard,exports.TaskCard=a.TaskCard,exports.InfoCard=u.InfoCard,exports.Checkbox=p.Checkbox,exports.Combobox=x.Combobox,exports.getComboboxValuePair=x.getComboboxValuePair,exports.CookieConsent=l.CookieConsent,exports.CookieConsentProvider=d.CookieConsentProvider,exports.useCookieConsent=d.useCookieConsent,exports.isCorrectFormat=I.isCorrectFormat,exports.isWithinLowerBound=I.isWithinLowerBound,exports.isWithinUpperBound=I.isWithinUpperBound,exports.dayMonthYearRegex=j.dayMonthYearRegex,exports.formatInput=j.formatInput,exports.isBlurTargetOutside=j.isBlurTargetOutside,exports.parseDateString=j.parseDateString,exports.DatePicker=q.DatePicker,exports.Feedback=k.Feedback,exports.PRESETS=C.PRESETS,exports.Icon=m.Icon,exports.ArrowVerticalAnimated=g.ArrowVerticalAnimated,exports.ArrowHorizontalAnimated=T.ArrowHorizontalAnimated,exports.PlusRemoveAnimated=b.PlusRemoveAnimated,exports.ArrowDownIcon=S.ArrowDownIcon,exports.ArrowLeftIcon=h.ArrowLeftIcon,exports.ArrowNorthEastIcon=B.ArrowNorthEastIcon,exports.ArrowRightIcon=A.ArrowRightIcon,exports.ArrowUpIcon=L.ArrowUpIcon,exports.CalendarIcon=M.CalendarIcon,exports.CheckIcon=w.CheckIcon,exports.ChevronDownIcon=v.ChevronDownIcon,exports.ChevronLeftIcon=R.ChevronLeftIcon,exports.ChevronRightIcon=P.ChevronRightIcon,exports.ChevronUpIcon=f.ChevronUpIcon,exports.CloseIcon=y.CloseIcon,exports.CopyIcon=D.CopyIcon,exports.DotsIcon=E.DotsIcon,exports.DragIcon=G.DragIcon,exports.ErrorIcon=U.ErrorIcon,exports.GreenCheckIcon=N.GreenCheckIcon,exports.HamburgerIcon=F.HamburgerIcon,exports.InfoIcon=W.InfoIcon,exports.LinkIcon=H.LinkIcon,exports.PlusIcon=O.PlusIcon,exports.QuestionIcon=V.QuestionIcon,exports.RedCrossIcon=z.RedCrossIcon,exports.SearchIcon=Q.SearchIcon,exports.SuccessIcon=Y.SuccessIcon,exports.WarningIcon=J.WarningIcon,exports.MinusIcon=K.MinusIcon,exports.ThumbDownIcon=X.ThumbDownIcon,exports.ThumbUpIcon=Z.ThumbUpIcon,exports.TrashCanIcon=$.TrashCanIcon,exports.PenIcon=_.PenIcon,exports.IconButton=ee.IconButton,exports.Image=oe.Image,exports.FieldGroup=re.FieldGroup,exports.InputGroup=te.InputGroup,exports.Label=ne.Label,exports.SupportLabel=se.SupportLabel,exports.Link=ie.Link,exports.NavLink=ce.NavLink,exports.LinkList=ae.LinkList,exports.List=ue.List,exports.OrderedList=ue.OrderedList,exports.UnorderedList=ue.UnorderedList,exports.CheckListItem=pe.CheckListItem,exports.CrossListItem=pe.CrossListItem,exports.ListItem=pe.ListItem,exports.Loader=xe.Loader,exports.SkeletonAnimation=le.SkeletonAnimation,exports.SkeletonButton=de.SkeletonButton,exports.SkeletonCheckboxGroup=Ie.SkeletonCheckboxGroup,exports.SkeletonElement=je.SkeletonElement,exports.SkeletonInput=qe.SkeletonInput,exports.SkeletonRadioButtonGroup=ke.SkeletonRadioButtonGroup,exports.SkeletonTable=Ce.SkeletonTable,exports.SkeletonTableHeader=Ce.SkeletonTableHeader,exports.SkeletonTableRow=Ce.SkeletonTableRow,exports.SkeletonTextArea=me.SkeletonTextArea,exports.ErrorMessage=ge.ErrorMessage,exports.InfoMessage=ge.InfoMessage,exports.SuccessMessage=ge.SuccessMessage,exports.WarningMessage=ge.WarningMessage,exports.FormErrorMessage=Te.FormErrorMessage,exports.Modal=be.Modal,exports.ModalActions=be.ModalActions,exports.ModalBody=be.ModalBody,exports.ModalCloseButton=be.ModalCloseButton,exports.ModalContainer=be.ModalContainer,exports.ModalHeader=be.ModalHeader,exports.ModalOverlay=be.ModalOverlay,exports.ModalTitle=be.ModalTitle,exports.useModal=Se.useModal,exports.Popover=he,exports.RadioButton=Be.RadioButton,exports.RadioButtonGroup=Ae.RadioButtonGroup,exports.BaseRadioButton=Le.BaseRadioButton,exports.NativeSelect=Me.NativeSelect,exports.Select=Me.Select,exports.ErrorTag=we.ErrorTag,exports.InfoTag=we.InfoTag,exports.SuccessTag=we.SuccessTag,exports.Tag=we.Tag,exports.WarningTag=we.WarningTag,exports.BaseTextArea=ve.BaseTextArea,exports.BaseTextInput=Re.BaseTextInput,exports.TextArea=Pe.TextArea,exports.TextInput=fe.TextInput,exports.Tooltip=ye.Tooltip,exports.TooltipContent=De.TooltipContent,exports.TooltipTrigger=Ee.TooltipTrigger,exports.PopupTip=Ge.PopupTip,exports.ScreenReaderOnly=Ue.ScreenReaderOnly;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./accordion/AccordionItem.js"),o=require("./accordion/Accordion.js"),r=require("./breadcrumb/Breadcrumb.js"),t=require("./breadcrumb/BreadcrumbItem.js"),s=require("./button/Button.js"),n=require("./card/Card.js"),i=require("./card/CardImage.js"),a=require("./card/NavCard.js"),p=require("./card/TaskCard.js"),u=require("./card/InfoCard.js"),c=require("./checkbox/Checkbox.js"),l=require("./combobox/Combobox.js"),x=require("./cookie-consent/CookieConsent.js"),d=require("./cookie-consent/CookieConsentContext.js"),b=require("./datepicker/validation.js"),T=require("./datepicker/utils.js"),I=require("./datepicker/DatePicker.js"),g=require("./feedback/Feedback.js"),j=require("./feedback/presets.js"),q=require("./description-list/DescriptionList.js"),m=require("../../ExpandableTableRow-BQjBxKCX.cjs"),C=require("./expander/ExpandSection.js"),k=require("./icon/Icon.js"),S=require("./icon/icons/animated/ArrowVerticalAnimated.js"),B=require("./icon/icons/animated/ArrowHorizontalAnimated.js"),h=require("./icon/icons/animated/PlusRemoveAnimated.js"),L=require("./icon/icons/ArrowDownIcon.js"),v=require("./icon/icons/ArrowLeftIcon.js"),w=require("./icon/icons/ArrowNorthEastIcon.js"),A=require("./icon/icons/ArrowRightIcon.js"),M=require("./icon/icons/ArrowUpIcon.js"),R=require("./icon/icons/CalendarIcon.js"),y=require("./icon/icons/CheckIcon.js"),F=require("./icon/icons/ChevronDownIcon.js"),P=require("./icon/icons/ChevronLeftIcon.js"),D=require("./icon/icons/ChevronRightIcon.js"),E=require("./icon/icons/ChevronUpIcon.js"),f=require("./icon/icons/CloseIcon.js"),G=require("./icon/icons/CopyIcon.js"),N=require("./icon/icons/DotsIcon.js"),H=require("./icon/icons/DragIcon.js"),U=require("./icon/icons/ErrorIcon.js"),W=require("./icon/icons/GreenCheckIcon.js"),V=require("./icon/icons/HamburgerIcon.js"),O=require("./icon/icons/InfoIcon.js"),z=require("./icon/icons/LinkIcon.js"),Q=require("./icon/icons/PlusIcon.js"),Y=require("./icon/icons/QuestionIcon.js"),J=require("./icon/icons/RedCrossIcon.js"),K=require("./icon/icons/SearchIcon.js"),X=require("./icon/icons/SuccessIcon.js"),Z=require("./icon/icons/WarningIcon.js"),$=require("./icon/icons/MinusIcon.js"),_=require("./icon/icons/ThumbDownIcon.js"),ee=require("./icon/icons/ThumbUpIcon.js"),oe=require("./icon/icons/TrashCanIcon.js"),re=require("./icon/icons/PenIcon.js"),te=require("./icon-button/IconButton.js"),se=require("./image/Image.js"),ne=require("./input-group/FieldGroup.js"),ie=require("./input-group/InputGroup.js"),ae=require("./input-group/Label.js"),pe=require("./input-group/SupportLabel.js"),ue=require("./link/Link.js"),ce=require("./link/NavLink.js"),le=require("./link-list/LinkList.js"),xe=require("./list/List.js"),de=require("./list/ListItem.js"),be=require("./loader/Loader.js"),Te=require("./loader/skeletons/SkeletonAnimation.js"),Ie=require("./loader/skeletons/SkeletonButton.js"),ge=require("./loader/skeletons/SkeletonCheckboxGroup.js"),je=require("./loader/skeletons/SkeletonElement.js"),qe=require("./loader/skeletons/SkeletonInput.js"),me=require("./loader/skeletons/SkeletonRadioButtonGroup.js"),Ce=require("./loader/skeletons/SkeletonTable.js"),ke=require("./loader/skeletons/SkeletonTextArea.js"),Se=require("./logo/Logo.js"),Be=require("./logo/LogoStamp.js"),he=require("./logo/text-paths/ForsikringLevertAvFremtind.js"),Le=require("./logo/text-paths/FraSB1ogDNB.js"),ve=require("./logo/text-paths/InnovasjonFraFremtind.js"),we=require("./logo/text-paths/TeknologiFraFremtind.js"),Ae=require("./logo/text-paths/VartEgetForsikringsselskap.js"),Me=require("./logo/text-paths/VartForsikringsselskap.js"),Re=require("./message/Message.js"),ye=require("./message/FormErrorMessage.js"),Fe=require("./modal/Modal.js"),Pe=require("./modal/useModal.js"),De=require("./popover/Popover.js"),Ee=require("./progress-bar/Countdown.js"),fe=require("./progress-bar/ProgressBar.js"),Ge=require("./radio-button/RadioButton.js"),Ne=require("./radio-button/RadioButtonGroup.js"),He=require("./radio-button/BaseRadioButton.js"),Ue=require("./summary-table/SummaryTable.js"),We=require("./summary-table/SummaryTableRow.js"),Ve=require("./system-message/SystemMessage.js"),Oe=require("./table/DataTable.js"),ze=require("./table/Table.js"),Qe=require("./table/TableBody.js"),Ye=require("./table/TableCaption.js"),Je=require("./table/TableCell.js"),Ke=require("./table/TableColumn.js"),Xe=require("./table/TableColumnGroup.js"),Ze=require("./table/tableContext.js"),$e=require("./table/tableSectionContext.js"),_e=require("./table/TableFooter.js"),eo=require("./table/TableHead.js"),oo=require("./table/TableHeader.js"),ro=require("./table/TableRow.js"),to=require("./table/utils.js"),so=require("./tabs/NavTab.js"),no=require("./tabs/NavTabs.js"),io=require("./tabs/Tabs.js"),ao=require("./tabs/TabList.js"),po=require("./tabs/Tab.js"),uo=require("./tabs/TabPanel.js"),co=require("./tag/Tag.js"),lo=require("./text-input/BaseTextArea.js"),xo=require("./text-input/BaseTextInput.js"),bo=require("./text-input/TextArea.js"),To=require("./text-input/TextInput.js"),Io=require("./toast/toastContext.js"),go=require("./toggle-switch/ToggleSwitch.js"),jo=require("./toggle-switch/ToggleSlider.js"),qo=require("./tooltip/Tooltip.js"),mo=require("./tooltip/TooltipContent.js"),Co=require("./tooltip/TooltipTrigger.js"),ko=require("./tooltip/PopupTip.js"),So=require("./ScreenReaderOnly.js");exports.AccordionItem=e.AccordionItem,exports.Accordion=o.Accordion,exports.Breadcrumb=r.Breadcrumb,exports.BreadcrumbItem=t.BreadcrumbItem,exports.Button=s.Button,exports.PrimaryButton=s.PrimaryButton,exports.SecondaryButton=s.SecondaryButton,exports.TertiaryButton=s.TertiaryButton,exports.Card=n.Card,exports.CardImage=i.CardImage,exports.InfoBlock=a.InfoBlock,exports.NavCard=a.NavCard,exports.TaskCard=p.TaskCard,exports.InfoCard=u.InfoCard,exports.Checkbox=c.Checkbox,exports.Combobox=l.Combobox,exports.getComboboxValuePair=l.getComboboxValuePair,exports.CookieConsent=x.CookieConsent,exports.CookieConsentProvider=d.CookieConsentProvider,exports.useCookieConsent=d.useCookieConsent,exports.isCorrectFormat=b.isCorrectFormat,exports.isWithinLowerBound=b.isWithinLowerBound,exports.isWithinUpperBound=b.isWithinUpperBound,exports.dayMonthYearRegex=T.dayMonthYearRegex,exports.formatInput=T.formatInput,exports.isBlurTargetOutside=T.isBlurTargetOutside,exports.parseDateString=T.parseDateString,exports.DatePicker=I.DatePicker,exports.Feedback=g.Feedback,exports.PRESETS=j.PRESETS,exports.DescriptionDetail=q.DescriptionDetail,exports.DescriptionList=q.DescriptionList,exports.DescriptionTerm=q.DescriptionTerm,exports.ExpandableTableRow=m.ExpandableTableRow,exports.ExpandableTableRowController=m.ExpandableTableRowController,exports.Expander=m.Expander,exports.NativeSelect=m.NativeSelect,exports.Select=m.Select,exports.TablePagination=m.TablePagination,exports.ExpandSection=C.ExpandSection,exports.Icon=k.Icon,exports.ArrowVerticalAnimated=S.ArrowVerticalAnimated,exports.ArrowHorizontalAnimated=B.ArrowHorizontalAnimated,exports.PlusRemoveAnimated=h.PlusRemoveAnimated,exports.ArrowDownIcon=L.ArrowDownIcon,exports.ArrowLeftIcon=v.ArrowLeftIcon,exports.ArrowNorthEastIcon=w.ArrowNorthEastIcon,exports.ArrowRightIcon=A.ArrowRightIcon,exports.ArrowUpIcon=M.ArrowUpIcon,exports.CalendarIcon=R.CalendarIcon,exports.CheckIcon=y.CheckIcon,exports.ChevronDownIcon=F.ChevronDownIcon,exports.ChevronLeftIcon=P.ChevronLeftIcon,exports.ChevronRightIcon=D.ChevronRightIcon,exports.ChevronUpIcon=E.ChevronUpIcon,exports.CloseIcon=f.CloseIcon,exports.CopyIcon=G.CopyIcon,exports.DotsIcon=N.DotsIcon,exports.DragIcon=H.DragIcon,exports.ErrorIcon=U.ErrorIcon,exports.GreenCheckIcon=W.GreenCheckIcon,exports.HamburgerIcon=V.HamburgerIcon,exports.InfoIcon=O.InfoIcon,exports.LinkIcon=z.LinkIcon,exports.PlusIcon=Q.PlusIcon,exports.QuestionIcon=Y.QuestionIcon,exports.RedCrossIcon=J.RedCrossIcon,exports.SearchIcon=K.SearchIcon,exports.SuccessIcon=X.SuccessIcon,exports.WarningIcon=Z.WarningIcon,exports.MinusIcon=$.MinusIcon,exports.ThumbDownIcon=_.ThumbDownIcon,exports.ThumbUpIcon=ee.ThumbUpIcon,exports.TrashCanIcon=oe.TrashCanIcon,exports.PenIcon=re.PenIcon,exports.IconButton=te.IconButton,exports.Image=se.Image,exports.FieldGroup=ne.FieldGroup,exports.InputGroup=ie.InputGroup,exports.Label=ae.Label,exports.SupportLabel=pe.SupportLabel,exports.Link=ue.Link,exports.NavLink=ce.NavLink,exports.LinkList=le.LinkList,exports.List=xe.List,exports.OrderedList=xe.OrderedList,exports.UnorderedList=xe.UnorderedList,exports.CheckListItem=de.CheckListItem,exports.CrossListItem=de.CrossListItem,exports.ListItem=de.ListItem,exports.Loader=be.Loader,exports.SkeletonAnimation=Te.SkeletonAnimation,exports.SkeletonButton=Ie.SkeletonButton,exports.SkeletonCheckboxGroup=ge.SkeletonCheckboxGroup,exports.SkeletonElement=je.SkeletonElement,exports.SkeletonInput=qe.SkeletonInput,exports.SkeletonRadioButtonGroup=me.SkeletonRadioButtonGroup,exports.SkeletonTable=Ce.SkeletonTable,exports.SkeletonTableHeader=Ce.SkeletonTableHeader,exports.SkeletonTableRow=Ce.SkeletonTableRow,exports.SkeletonTextArea=ke.SkeletonTextArea,exports.Logo=Se.Logo,exports.LogoStamp=Be.LogoStamp,exports.ForsikringLevertAvFremtind=he.ForsikringLevertAvFremtind,exports.FraSB1ogDNB=Le.FraSB1ogDNB,exports.InnovasjonFraFremtind=ve.InnovasjonFraFremtind,exports.TeknologiFraFremtind=we.TeknologiFraFremtind,exports.VartEgetForsikringsselskap=Ae.VartEgetForsikringsselskap,exports.VartForsikringsselskap=Me.VartForsikringsselskap,exports.ErrorMessage=Re.ErrorMessage,exports.InfoMessage=Re.InfoMessage,exports.SuccessMessage=Re.SuccessMessage,exports.WarningMessage=Re.WarningMessage,exports.FormErrorMessage=ye.FormErrorMessage,exports.Modal=Fe.Modal,exports.ModalActions=Fe.ModalActions,exports.ModalBody=Fe.ModalBody,exports.ModalCloseButton=Fe.ModalCloseButton,exports.ModalContainer=Fe.ModalContainer,exports.ModalHeader=Fe.ModalHeader,exports.ModalOverlay=Fe.ModalOverlay,exports.ModalTitle=Fe.ModalTitle,exports.useModal=Pe.useModal,exports.Popover=De,exports.Countdown=Ee.Countdown,exports.ProgressBar=fe.ProgressBar,exports.RadioButton=Ge.RadioButton,exports.RadioButtonGroup=Ne.RadioButtonGroup,exports.BaseRadioButton=He.BaseRadioButton,exports.SummaryTable=Ue.SummaryTable,exports.SummaryTableRow=We.SummaryTableRow,exports.ErrorSystemMessage=Ve.ErrorSystemMessage,exports.InfoSystemMessage=Ve.InfoSystemMessage,exports.SuccessSystemMessage=Ve.SuccessSystemMessage,exports.WarningSystemMessage=Ve.WarningSystemMessage,exports.DataTable=Oe.DataTable,exports.Table=ze.Table,exports.TableBody=Qe.TableBody,exports.TableCaption=Ye.TableCaption,exports.TableCell=Je.TableCell,exports.TableColumn=Ke.TableColumn,exports.TableColumnGroup=Xe.TableColumnGroup,exports.TableContextProvider=Ze.TableContextProvider,exports.useTableContext=Ze.useTableContext,exports.TableSectionContextProvider=$e.TableSectionContextProvider,exports.useTableSectionContext=$e.useTableSectionContext,exports.TableFooter=_e.TableFooter,exports.TableHead=eo.TableHead,exports.TableHeader=oo.TableHeader,exports.TableRow=ro.TableRow,exports.useSortableTableHeader=to.useSortableTableHeader,exports.NavTab=so.NavTab,exports.NavTabs=no.NavTabs,exports.Tabs=io.Tabs,exports.TabList=ao.TabList,exports.Tab=po.Tab,exports.TabPanel=uo.TabPanel,exports.ErrorTag=co.ErrorTag,exports.InfoTag=co.InfoTag,exports.SuccessTag=co.SuccessTag,exports.Tag=co.Tag,exports.WarningTag=co.WarningTag,exports.BaseTextArea=lo.BaseTextArea,exports.BaseTextInput=xo.BaseTextInput,exports.TextArea=bo.TextArea,exports.TextInput=To.TextInput,exports.ToastProvider=Io.ToastProvider,exports.useToast=Io.useToast,exports.ToggleSwitch=go.ToggleSwitch,exports.ToggleSlider=jo.ToggleSlider,exports.Tooltip=qo.Tooltip,exports.TooltipContent=mo.TooltipContent,exports.TooltipTrigger=Co.TooltipTrigger,exports.PopupTip=ko.PopupTip,exports.ScreenReaderOnly=So.ScreenReaderOnly;
2
2
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("../../../clsx-E3yX_9sL.cjs");require("react"),require("../../hooks/useScreen/useScreen.js");const r=require("../../hooks/useId/useId.js");exports.Logo=({className:s,id:o,centered:t=!0,isSymbol:c=!1,animated:a=!1,title:n="Fremtind",...i})=>{const h=r.useId(o||"jkl-logo",{generateSuffix:!o});return e.jsxs("svg",{...i,className:l.clsx("jkl-logo",s,{"jkl-logo--animated":a,"jkl-logo--symbol-only":c,"jkl-logo--centered":t&&c}),"aria-labelledby":h,role:"img",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",stroke:"currentColor",viewBox:a||!c||t?"32 27 581 120":"31 60 150 83",children:[e.jsx("title",{id:h,children:n}),e.jsxs("g",{fill:"none",className:"jkl-logo__F",strokeWidth:"8",transform:""+(c?"rotate(45) translate(90, -70)":""),children:[e.jsx("line",{x1:"34.3",x2:"104.846844",y1:"32.563024",y2:"32.563024",className:"jkl-logo__F-line",transform:c?"scale(1.45, 1) translate(-10, 6)":""}),e.jsx("line",{x1:"35.12226",x2:"91.504088",y1:"80.105318",y2:"80.105318"}),e.jsx("line",{x1:"-10.820058",x2:"87.38984",y1:"84.219561",y2:"84.219561",transform:"rotate(90, 38.2849, 84.2196)"})]}),!(c&&!a)&&e.jsx("path",{strokeWidth:".57975",d:"M145.752 58.979c-10.21 0-20.201 6.854-23.793 16.133l-.157-15.179-.002-.224h-6.907v73.723h7.782V98.038c0-11.791 2.998-31.572 23.077-31.572 2.89 0 5.153.23 7.12.724l.283.07v-7.806l-.187-.035c-2.363-.44-4.831-.44-7.216-.44M170.88 91.357c.1-15.2 10.325-26.21 24.387-26.21 15.08 0 23.29 13.146 23.658 26.21H170.88zm24.387-33.554c-10.228 0-18.904 4.44-25.092 12.84-4.925 6.7-7.22 15.031-7.22 26.218 0 11.088 3.262 20.766 9.433 27.99 6.099 6.954 13.994 10.481 23.466 10.481 8.097 0 15.596-3.04 21.115-8.559 4.522-4.364 7.305-9.583 8.269-15.515l.044-.262h-8.075l-.038.182c-.77 3.876-2.52 7.146-5.503 10.292-3.968 4.11-9.583 6.375-15.812 6.375-7.332 0-13.239-2.586-17.557-7.684-4.619-5.48-7.37-13.341-7.563-21.602h55.97v-.227c0-.877.038-1.659.074-2.415.037-.758.076-1.543.076-2.426 0-9.44-2.952-18.247-8.313-24.797-5.831-7.126-13.88-10.891-23.274-10.891h0zM324.782 57.803c-10.833 0-19.176 5.465-23.558 15.41-2.377-7.168-8.339-15.41-23.183-15.41-9.606 0-17.811 5.162-22.111 13.86l-.813-11.743-.016-.211h-6.89v73.723h7.78V96.568c0-12.182 2.933-21.098 8.72-26.501 3.425-3.265 7.76-4.92 12.885-4.92 11.845 0 17.362 6.4 17.362 20.142v48.143h7.923V91.736c0-8.853 2.965-16.346 8.573-21.666 3.682-3.36 7.777-4.924 12.89-4.924 11.741 0 17.21 6.4 17.21 20.143v48.143h7.783V84.844c0-17.438-8.721-27.041-24.555-27.041M387.105 37.665l-7.782 1.873v20.17h-14.656v7.195h14.656v45.933c0 14.145 6.615 21.622 19.133 21.622 3.964 0 7.73-.804 11.72-1.657l.668-.142v-6.91l-.267.05c-3.606.666-7.465 1.315-11.54 1.315-8.364 0-11.932-4.357-11.932-14.571v-45.64h43.533v66.529h8.22V59.709h-51.753V37.665M499.748 57.803c-10.364 0-20.339 5.951-24.596 14.576l-.83-12.67h-6.893v73.723h7.781V96.568c0-6.054.932-14.697 5.367-21.487 4.18-6.398 10.483-9.64 18.734-9.64 12.565 0 18.674 6.492 18.674 19.848v48.143h7.781V84.844c0-17.185-9.482-27.041-26.018-27.041M434.672 28.547a5.9 5.9 0 0 0-5.894 5.893 5.9 5.9 0 0 0 5.894 5.895 5.9 5.9 0 0 0 5.895-5.895 5.9 5.9 0 0 0-5.895-5.893M592.914 121.901c-4.007 3.85-8.984 5.801-14.793 5.801-5.777 0-10.472-1.658-14.354-5.068-6.188-5.519-9.597-14.775-9.597-26.066 0-10.31 2.89-19.102 8.139-24.751 4.135-4.291 9.212-6.376 15.52-6.376 6.202 0 11.324 1.9 15.23 5.653 6.251 5.846 9.164 13.941 9.164 25.474 0 10.765-3.132 19.29-9.309 25.333zm9.157-94.721v44.113c-4.264-7.988-14.077-13.49-24.243-13.49-8.072 0-14.828 2.585-20.081 7.682-7.309 6.897-11.5 18.281-11.5 31.234 0 13.6 4.294 24.848 12.091 31.673 5.234 4.605 11.841 6.94 19.64 6.94 10.115 0 20.112-5.893 24.154-14.127l.835 12.227h6.886V27.18h-7.782 0z",className:"jkl-logo__remtind"})]})};
2
+ //# sourceMappingURL=Logo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Logo.js","sources":["../../../../src/components/logo/Logo.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { CSSProperties } from \"react\";\nimport { useId } from \"../../hooks\";\n\nexport interface LogoProps {\n className?: string;\n id?: string;\n style?: CSSProperties;\n /** Sentrerer logosymbolet i viewboksen i stedet for den vanlige venstrejusteringen */\n centered?: boolean;\n /** Animerer overgangen mellom logo og logosymbol */\n animated?: boolean;\n /** Vis logosymbol i stedet for logo */\n isSymbol?: boolean;\n /** Beskrivelse av logoen tilgjengelig for skjermlesere */\n title?: string;\n}\n\nexport const Logo = ({\n className,\n id,\n centered = true,\n isSymbol = false,\n animated = false,\n title = \"Fremtind\",\n ...rest\n}: LogoProps): JSX.Element => {\n const uniqueId = useId(id || \"jkl-logo\", { generateSuffix: !id });\n\n return (\n <svg\n {...rest}\n className={clsx(\"jkl-logo\", className, {\n \"jkl-logo--animated\": animated,\n \"jkl-logo--symbol-only\": isSymbol,\n \"jkl-logo--centered\": centered && isSymbol,\n })}\n aria-labelledby={uniqueId}\n role=\"img\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n viewBox={!animated && isSymbol && !centered ? \"31 60 150 83\" : \"32 27 581 120\"}\n >\n <title id={uniqueId}>{title}</title>\n <g\n fill=\"none\"\n className=\"jkl-logo__F\"\n strokeWidth=\"8\"\n transform={`${isSymbol ? \"rotate(45) translate(90, -70)\" : \"\"}`}\n >\n <line\n x1=\"34.3\"\n x2=\"104.846844\"\n y1=\"32.563024\"\n y2=\"32.563024\"\n className=\"jkl-logo__F-line\"\n transform={isSymbol ? \"scale(1.45, 1) translate(-10, 6)\" : \"\"}\n />\n <line x1=\"35.12226\" x2=\"91.504088\" y1=\"80.105318\" y2=\"80.105318\" />\n <line\n x1=\"-10.820058\"\n x2=\"87.38984\"\n y1=\"84.219561\"\n y2=\"84.219561\"\n transform=\"rotate(90, 38.2849, 84.2196)\"\n />\n </g>\n {!(isSymbol && !animated) && (\n <path\n strokeWidth=\".57975\"\n d=\"M145.752 58.979c-10.21 0-20.201 6.854-23.793 16.133l-.157-15.179-.002-.224h-6.907v73.723h7.782V98.038c0-11.791 2.998-31.572 23.077-31.572 2.89 0 5.153.23 7.12.724l.283.07v-7.806l-.187-.035c-2.363-.44-4.831-.44-7.216-.44M170.88 91.357c.1-15.2 10.325-26.21 24.387-26.21 15.08 0 23.29 13.146 23.658 26.21H170.88zm24.387-33.554c-10.228 0-18.904 4.44-25.092 12.84-4.925 6.7-7.22 15.031-7.22 26.218 0 11.088 3.262 20.766 9.433 27.99 6.099 6.954 13.994 10.481 23.466 10.481 8.097 0 15.596-3.04 21.115-8.559 4.522-4.364 7.305-9.583 8.269-15.515l.044-.262h-8.075l-.038.182c-.77 3.876-2.52 7.146-5.503 10.292-3.968 4.11-9.583 6.375-15.812 6.375-7.332 0-13.239-2.586-17.557-7.684-4.619-5.48-7.37-13.341-7.563-21.602h55.97v-.227c0-.877.038-1.659.074-2.415.037-.758.076-1.543.076-2.426 0-9.44-2.952-18.247-8.313-24.797-5.831-7.126-13.88-10.891-23.274-10.891h0zM324.782 57.803c-10.833 0-19.176 5.465-23.558 15.41-2.377-7.168-8.339-15.41-23.183-15.41-9.606 0-17.811 5.162-22.111 13.86l-.813-11.743-.016-.211h-6.89v73.723h7.78V96.568c0-12.182 2.933-21.098 8.72-26.501 3.425-3.265 7.76-4.92 12.885-4.92 11.845 0 17.362 6.4 17.362 20.142v48.143h7.923V91.736c0-8.853 2.965-16.346 8.573-21.666 3.682-3.36 7.777-4.924 12.89-4.924 11.741 0 17.21 6.4 17.21 20.143v48.143h7.783V84.844c0-17.438-8.721-27.041-24.555-27.041M387.105 37.665l-7.782 1.873v20.17h-14.656v7.195h14.656v45.933c0 14.145 6.615 21.622 19.133 21.622 3.964 0 7.73-.804 11.72-1.657l.668-.142v-6.91l-.267.05c-3.606.666-7.465 1.315-11.54 1.315-8.364 0-11.932-4.357-11.932-14.571v-45.64h43.533v66.529h8.22V59.709h-51.753V37.665M499.748 57.803c-10.364 0-20.339 5.951-24.596 14.576l-.83-12.67h-6.893v73.723h7.781V96.568c0-6.054.932-14.697 5.367-21.487 4.18-6.398 10.483-9.64 18.734-9.64 12.565 0 18.674 6.492 18.674 19.848v48.143h7.781V84.844c0-17.185-9.482-27.041-26.018-27.041M434.672 28.547a5.9 5.9 0 0 0-5.894 5.893 5.9 5.9 0 0 0 5.894 5.895 5.9 5.9 0 0 0 5.895-5.895 5.9 5.9 0 0 0-5.895-5.893M592.914 121.901c-4.007 3.85-8.984 5.801-14.793 5.801-5.777 0-10.472-1.658-14.354-5.068-6.188-5.519-9.597-14.775-9.597-26.066 0-10.31 2.89-19.102 8.139-24.751 4.135-4.291 9.212-6.376 15.52-6.376 6.202 0 11.324 1.9 15.23 5.653 6.251 5.846 9.164 13.941 9.164 25.474 0 10.765-3.132 19.29-9.309 25.333zm9.157-94.721v44.113c-4.264-7.988-14.077-13.49-24.243-13.49-8.072 0-14.828 2.585-20.081 7.682-7.309 6.897-11.5 18.281-11.5 31.234 0 13.6 4.294 24.848 12.091 31.673 5.234 4.605 11.841 6.94 19.64 6.94 10.115 0 20.112-5.893 24.154-14.127l.835 12.227h6.886V27.18h-7.782 0z\"\n className=\"jkl-logo__remtind\"\n />\n )}\n </svg>\n );\n};\n"],"names":["className","id","centered","isSymbol","animated","title","rest","uniqueId","useId","generateSuffix","jsxs","clsx","role","xmlns","fill","stroke","viewBox","children","jsx","strokeWidth","transform","x1","x2","y1","y2","d"],"mappings":"uRAkBoB,EAChBA,UAAAA,EACAC,GAAAA,EACAC,SAAAA,GAAW,EACXC,SAAAA,GAAW,EACXC,SAAAA,GAAW,EACXC,MAAAA,EAAQ,cACLC,MAEG,MAAAC,EAAWC,QAAMP,GAAM,WAAY,CAAEQ,gBAAiBR,IAGxD,OAAAS,EAAAA,KAAC,MAAA,IACOJ,EACJN,UAAWW,EAAAA,KAAK,WAAYX,EAAW,CACnC,qBAAsBI,EACtB,wBAAyBD,EACzB,qBAAsBD,GAAYC,IAEtC,kBAAiBI,EACjBK,KAAK,MACLC,MAAM,6BACNC,KAAK,eACLC,OAAO,eACPC,QAAUZ,IAAYD,GAAaD,EAA4B,gBAAjB,eAE9Ce,SAAA,CAACC,EAAAA,IAAA,QAAA,CAAMjB,GAAIM,EAAWU,SAAMZ,IAC5BK,EAAAA,KAAC,IAAA,CACGI,KAAK,OACLd,UAAU,cACVmB,YAAY,IACZC,UAAW,IAAGjB,EAAW,gCAAkC,IAE3Dc,SAAA,CAAAC,EAAAA,IAAC,OAAA,CACGG,GAAG,OACHC,GAAG,aACHC,GAAG,YACHC,GAAG,YACHxB,UAAU,mBACVoB,UAAWjB,EAAW,mCAAqC,KAE/De,EAAAA,IAAC,QAAKG,GAAG,WAAWC,GAAG,YAAYC,GAAG,YAAYC,GAAG,cACrDN,EAAAA,IAAC,OAAA,CACGG,GAAG,aACHC,GAAG,WACHC,GAAG,YACHC,GAAG,YACHJ,UAAU,sCAGfjB,IAAaC,IACZc,EAAAA,IAAC,OAAA,CACGC,YAAY,SACZM,EAAE,w8EACFzB,UAAU,wBACd"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("../../../clsx-E3yX_9sL.cjs"),r=require("react");require("../../hooks/useScreen/useScreen.js");const t=require("../../hooks/useId/useId.js"),l=require("./useTextSpinner.js");exports.LogoStamp=({children:i,className:o,id:a,animated:n=!1,title:c,...u})=>{const d=t.useId(a||"jkl-logo-stamp",{generateSuffix:!a}),m=r.useRef(null),{hasAnimated:g,visible:j}=l.useTextSpinner(m);return e.jsxs("svg",{...u,ref:m,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512","aria-labelledby":d,className:s.clsx("jkl-logo-stamp",o,{"jkl-logo-stamp--animated":n}),"data-rotate":n&&(j||g),role:"img",children:[e.jsx("title",{id:d,children:c||"Forsikring levert av Fremtind"}),e.jsx("g",{className:"jkl-logo-stamp__logo",children:e.jsx("path",{fill:"currentColor",d:"M256 177.2L146.4 286.8l8.5 8.4 51.4-51.4 51.4 51.4 8.2-8.1-51.5-51.5 41.9-41.8L357.5 295l8.1-8.2z"})}),e.jsx("g",{className:"jkl-logo-stamp__text",children:i})]})};
2
+ //# sourceMappingURL=LogoStamp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LogoStamp.js","sources":["../../../../src/components/logo/LogoStamp.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { CSSProperties, useRef } from \"react\";\nimport { WithChildren } from \"../..\";\nimport { useId } from \"../../hooks\";\nimport { useTextSpinner } from \"./useTextSpinner\";\n\nexport interface LogoStampProps extends WithChildren {\n className?: string;\n id?: string;\n style?: CSSProperties;\n /**\n * Beskrivelse av logostempelet tilgjengelig for skjermlesere.\n * Teksten i logostempelet er en path, og ikke tilgjengelig for skjermlesere.\n * @default \"Forsikring levert av Fremtind\"\n */\n title?: string;\n /** Roterer teksten rundt logostempelet første gangen stempelet kommer til syne */\n animated?: boolean;\n}\n\nexport const LogoStamp = ({\n children,\n className,\n id,\n animated = false,\n title,\n ...rest\n}: LogoStampProps): JSX.Element => {\n const uniqueId = useId(id || \"jkl-logo-stamp\", { generateSuffix: !id });\n const stampRef = useRef<SVGSVGElement>(null);\n const { hasAnimated, visible } = useTextSpinner(stampRef);\n\n return (\n <svg\n {...rest}\n ref={stampRef}\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 512 512\"\n aria-labelledby={uniqueId}\n className={clsx(\"jkl-logo-stamp\", className, {\n \"jkl-logo-stamp--animated\": animated,\n })}\n data-rotate={animated && (visible || hasAnimated)}\n role=\"img\"\n >\n <title id={uniqueId}>{title || \"Forsikring levert av Fremtind\"}</title>\n <g className=\"jkl-logo-stamp__logo\">\n <path\n fill=\"currentColor\"\n d=\"M256 177.2L146.4 286.8l8.5 8.4 51.4-51.4 51.4 51.4 8.2-8.1-51.5-51.5 41.9-41.8L357.5 295l8.1-8.2z\"\n />\n </g>\n <g className=\"jkl-logo-stamp__text\">{children}</g>\n </svg>\n );\n};\n"],"names":["children","className","id","animated","title","rest","uniqueId","useId","generateSuffix","stampRef","useRef","hasAnimated","visible","useTextSpinner","jsxs","ref","xmlns","viewBox","clsx","role","jsx","fill","d"],"mappings":"+TAoByB,EACrBA,SAAAA,EACAC,UAAAA,EACAC,GAAAA,EACAC,SAAAA,GAAW,EACXC,MAAAA,KACGC,MAEG,MAAAC,EAAWC,QAAML,GAAM,iBAAkB,CAAEM,gBAAiBN,IAC5DO,EAAWC,SAAsB,OAC/BC,YAAAA,EAAaC,QAAAA,GAAYC,iBAAeJ,GAG5C,OAAAK,EAAAA,KAAC,MAAA,IACOT,EACJU,IAAKN,EACLO,MAAM,6BACNC,QAAQ,cACR,kBAAiBX,EACjBL,UAAWiB,EAAAA,KAAK,iBAAkBjB,EAAW,CACzC,2BAA4BE,IAEhC,cAAaA,IAAaS,GAAWD,GACrCQ,KAAK,MAELnB,SAAA,CAAAoB,EAAAA,IAAC,QAAM,CAAAlB,GAAII,EAAWN,SAAAI,GAAS,kCAC/BgB,EAAAA,IAAC,IAAE,CAAAnB,UAAU,uBACTD,SAAAoB,EAAAA,IAAC,OAAA,CACGC,KAAK,eACLC,EAAE,wGAGTF,EAAAA,IAAA,IAAA,CAAEnB,UAAU,uBAAwBD,SAAAA,MAAS"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./Logo.js"),e=require("./LogoStamp.js"),t=require("./text-paths/ForsikringLevertAvFremtind.js"),s=require("./text-paths/FraSB1ogDNB.js"),o=require("./text-paths/InnovasjonFraFremtind.js"),i=require("./text-paths/TeknologiFraFremtind.js"),a=require("./text-paths/VartEgetForsikringsselskap.js"),n=require("./text-paths/VartForsikringsselskap.js");exports.Logo=r.Logo,exports.LogoStamp=e.LogoStamp,exports.ForsikringLevertAvFremtind=t.ForsikringLevertAvFremtind,exports.FraSB1ogDNB=s.FraSB1ogDNB,exports.InnovasjonFraFremtind=o.InnovasjonFraFremtind,exports.TeknologiFraFremtind=i.TeknologiFraFremtind,exports.VartEgetForsikringsselskap=a.VartEgetForsikringsselskap,exports.VartForsikringsselskap=n.VartForsikringsselskap;
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),m=()=>l.jsx("path",{fill:"currentColor",d:"m511.1 239.2-34 1.2.2 3 15.4-.6.5 13.9h2.6l-.5-14 13.3-.5.5 15.6 2.6-.1-.6-18.5ZM494.3 277c-10.2-1.6-18.6 4.2-20 13.7-1.5 9.5 4.6 17.6 14.8 19.2 10 1.6 18.1-4.3 19.6-13.8a16.4 16.4 0 0 0-14.4-19.1Zm11.7 18.7c-1.2 7.6-7.4 12.7-16.4 11.3-9.2-1.4-13.8-8.3-12.7-15.9 1.2-7.6 7.6-12.7 17-11.2 9 1.4 13.3 8 12 15.8h.1ZM466.2 327l14.4 5.5-3.2 8.5-16.9 1.3-1 3 17.5-1.6a8.9 8.9 0 0 0 5.9 9.1c5.7 2.2 10.1-.6 11.8-5.1l4.3-11.4-31.8-12-1 2.8Zm29.3 11-3.1 8.5c-1.3 3.3-4 5.3-8.5 3.6-4.2-1.6-5.3-4.9-4-8.4l3.1-8.3 12.5 4.6Zm-22 35c-3.5-2-7.7-1.7-11.5 2l-3.7 3.6c-3 2.9-5.3 3.8-8.6 1.8-3.5-2-3.6-6.1-1.3-10.2 2.3-3.9 5.4-5.8 10.6-4.3l1.4-2.4c-6.3-2.3-11.2.1-14.2 5.3-3.4 5.6-2.7 11.4 2.4 14.4 4.4 2.6 8.5.7 11.2-2l4.2-4.1c2.8-2.8 5.4-3.1 8.1-1.6 3.5 2.1 4 5.9 1.7 9.6-2 3.3-5.3 5-9.8 3.3l-1.4 2.3a10.2 10.2 0 0 0 13.6-4.2c2.7-4.6 2.4-10.5-2.7-13.5Zm-43.6 20.7-1.8 2.3 26.5 21.2 1.8-2.3-26.5-21.2ZM412 414l10.4 11.2-6.7 6.2L400 425l-2.3 2.2 16.4 6.4a8.9 8.9 0 0 0 1.2 10.9c4.2 4.5 9.3 4 12.8.7l9-8.3-23-24.9-2.2 2Zm21.2 22.9-6.6 6.1c-2.6 2.4-6 2.9-9.2-.6-3-3.3-2.5-6.7.3-9.3l6.5-6 9 9.8Zm-52.8 3 5.8 9.2-1.5 9-21-7.7-3 1.8 23.6 8.4-3.2 19 3-1.9 4.1-25.4 10.3 16.3 2.4-1.5-18-28.7-2.5 1.5Zm-33.2 19.7-2.6 1.1L358 492l2.7-1.1-13.6-31.3Zm-26.9 9.2 7.2 28.6-27.5-23.6-2.8.8 8.2 32.9 2.8-.7L301 478l27.3 23.6 3-.7-8.3-33-2.7.8Zm-56.6 8.4a11.6 11.6 0 0 0-10.8 8l-1-7-2.2.1.7 17.7 13.4-.5V493l-10.6.4V492c-.3-7.8 4.9-12 10.4-12.1 7.8-.3 13.4 5 13.7 14.2.4 9.6-5.7 15-12.7 15.2-5 .1-8.7-1.9-10.4-6h-2.7c1.6 6 7.3 8.9 13.2 8.7 9.4-.4 16-7.6 15.6-18-.4-10.5-7.6-17.2-16.6-16.8Zm-77.5-7.2 17 4.5-8.1 30.2 2.8.7 8.8-32.7-19.8-5.3-.7 2.5Zm-31-13 14.5 6.5-5.5 12.2-12.5-5.6-1 2.4 12.5 5.6-5.2 11.6-14.2-6.3-1 2.4 16.8 7.5 13.8-31-17.1-7.6-1 2.4Zm-52 4.8 2.5 1.7 26.9-19.8-7.6 32.5 2.6 1.7 7.9-35.4-2.9-1.9-29.4 21.2Zm-7.7-52-1.8 1.9 11.5 10.9-9.2 9.6-10-9.4-1.7 2 9.9 9.4-8.8 9.2-11.2-10.8-1.8 2 13.3 12.7 23.4-24.6-13.6-13Zm-14.1-16.4-12.3 9-5.5-7.2 8.2-15-2-2.5-8.2 15.6a8.9 8.9 0 0 0-10.8 0c-5 3.6-5 8.8-2.2 12.6l7.2 9.9 27.4-20.2-1.8-2.2Zm-25.2 18.5-5.3-7.2c-2-2.9-2.2-6.3 1.6-9 3.6-2.8 7-1.8 9.2 1.2L67 404l-10.8 8Zm1.1-56.9-1.3-2.6-28.1 13.8-5-10.2-2.3 1.2L31.8 380l2.3-1.2-5-10.1L57.4 355Zm-18.4-51.4-9.7-1.9-2.5-15.8 8.5-5-.5-3-31.4 18.5.5 2.7 35.6 7.4-.5-3Zm-32.2-6.3 17.5-10 2.3 13.8-19.8-3.8Zm27.5-46L.5 238v3l31 12.1L.1 264l-.1 3 34.1-12.3v-3.5Zm75.5-161.8-9.3-11 10.1-8.6-3-3.6L97.3 75l-6.5-7.7 11.3-9.6-3-3.6L84 66.8l22 25.9 3.7-3.2Zm32-23.5-7-12.5 6.5-3.7 13 9.1 4.6-2.5-14.2-9.7c2.4-3 3.2-7 1.1-10.7-3.2-5.6-8.8-6.2-13.4-3.6L120.8 39l16.6 29.6 4.3-2.5Zm-14.4-25.4 7-4c2.5-1.3 5-1.3 7 2 1.8 3.2.5 5.5-2.2 7l-6.8 3.8-5-8.8Zm69 1.7-1.5-4.4-14.4 4.7-3.2-9.5 12.4-4.1-1.5-4.5-12.3 4-3.1-9.1 14.1-4.7-1.5-4.5-18.8 6.2 10.7 32.2 19-6.3Zm24.3-5.4L218 11.8l14.2 24 3.6-.4 9.3-27 2.5 25.8 4.9-.4L249.3 0l-6.3.6-9.5 28.3L218 3l-5.7.6 3.3 33.7 4.9-.4Zm61.2-.9 4.9.6 3.7-29L301 9l.6-4.7L275.5 1l-.6 4.7L285.5 7l-3.7 29Zm44.1-25.7-9.6 32.5 4.7 1.4 9.6-32.5-4.7-1.4ZM358.6 30l4.8 32 4.6 2.4L383.2 34l-4.4-2.2-11.9 23.6-4.7-32-4.7-2.3-15.2 30.4 4.4 2.2L358.6 30Zm59.9 50.9c6.5-8 5.8-17.2-1.5-23.2l-9.4-7.6-21.5 26.2 9.2 7.5c7.6 6.3 16.5 5.3 23.2-3Zm-10-24 4.8 3.9c5.4 4.5 6.8 10 1.2 16.8-5.4 6.5-11 6.8-16.6 2.3l-5-4 15.6-19Z"});m.displayName="Forsikring levert av Fremtind",exports.ForsikringLevertAvFremtind=m;
2
+ //# sourceMappingURL=ForsikringLevertAvFremtind.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ForsikringLevertAvFremtind.js","sources":["../../../../../src/components/logo/text-paths/ForsikringLevertAvFremtind.tsx"],"sourcesContent":["import React, { FC } from \"react\";\n\nexport const ForsikringLevertAvFremtind: FC = () => (\n <path\n fill=\"currentColor\"\n d=\"m511.1 239.2-34 1.2.2 3 15.4-.6.5 13.9h2.6l-.5-14 13.3-.5.5 15.6 2.6-.1-.6-18.5ZM494.3 277c-10.2-1.6-18.6 4.2-20 13.7-1.5 9.5 4.6 17.6 14.8 19.2 10 1.6 18.1-4.3 19.6-13.8a16.4 16.4 0 0 0-14.4-19.1Zm11.7 18.7c-1.2 7.6-7.4 12.7-16.4 11.3-9.2-1.4-13.8-8.3-12.7-15.9 1.2-7.6 7.6-12.7 17-11.2 9 1.4 13.3 8 12 15.8h.1ZM466.2 327l14.4 5.5-3.2 8.5-16.9 1.3-1 3 17.5-1.6a8.9 8.9 0 0 0 5.9 9.1c5.7 2.2 10.1-.6 11.8-5.1l4.3-11.4-31.8-12-1 2.8Zm29.3 11-3.1 8.5c-1.3 3.3-4 5.3-8.5 3.6-4.2-1.6-5.3-4.9-4-8.4l3.1-8.3 12.5 4.6Zm-22 35c-3.5-2-7.7-1.7-11.5 2l-3.7 3.6c-3 2.9-5.3 3.8-8.6 1.8-3.5-2-3.6-6.1-1.3-10.2 2.3-3.9 5.4-5.8 10.6-4.3l1.4-2.4c-6.3-2.3-11.2.1-14.2 5.3-3.4 5.6-2.7 11.4 2.4 14.4 4.4 2.6 8.5.7 11.2-2l4.2-4.1c2.8-2.8 5.4-3.1 8.1-1.6 3.5 2.1 4 5.9 1.7 9.6-2 3.3-5.3 5-9.8 3.3l-1.4 2.3a10.2 10.2 0 0 0 13.6-4.2c2.7-4.6 2.4-10.5-2.7-13.5Zm-43.6 20.7-1.8 2.3 26.5 21.2 1.8-2.3-26.5-21.2ZM412 414l10.4 11.2-6.7 6.2L400 425l-2.3 2.2 16.4 6.4a8.9 8.9 0 0 0 1.2 10.9c4.2 4.5 9.3 4 12.8.7l9-8.3-23-24.9-2.2 2Zm21.2 22.9-6.6 6.1c-2.6 2.4-6 2.9-9.2-.6-3-3.3-2.5-6.7.3-9.3l6.5-6 9 9.8Zm-52.8 3 5.8 9.2-1.5 9-21-7.7-3 1.8 23.6 8.4-3.2 19 3-1.9 4.1-25.4 10.3 16.3 2.4-1.5-18-28.7-2.5 1.5Zm-33.2 19.7-2.6 1.1L358 492l2.7-1.1-13.6-31.3Zm-26.9 9.2 7.2 28.6-27.5-23.6-2.8.8 8.2 32.9 2.8-.7L301 478l27.3 23.6 3-.7-8.3-33-2.7.8Zm-56.6 8.4a11.6 11.6 0 0 0-10.8 8l-1-7-2.2.1.7 17.7 13.4-.5V493l-10.6.4V492c-.3-7.8 4.9-12 10.4-12.1 7.8-.3 13.4 5 13.7 14.2.4 9.6-5.7 15-12.7 15.2-5 .1-8.7-1.9-10.4-6h-2.7c1.6 6 7.3 8.9 13.2 8.7 9.4-.4 16-7.6 15.6-18-.4-10.5-7.6-17.2-16.6-16.8Zm-77.5-7.2 17 4.5-8.1 30.2 2.8.7 8.8-32.7-19.8-5.3-.7 2.5Zm-31-13 14.5 6.5-5.5 12.2-12.5-5.6-1 2.4 12.5 5.6-5.2 11.6-14.2-6.3-1 2.4 16.8 7.5 13.8-31-17.1-7.6-1 2.4Zm-52 4.8 2.5 1.7 26.9-19.8-7.6 32.5 2.6 1.7 7.9-35.4-2.9-1.9-29.4 21.2Zm-7.7-52-1.8 1.9 11.5 10.9-9.2 9.6-10-9.4-1.7 2 9.9 9.4-8.8 9.2-11.2-10.8-1.8 2 13.3 12.7 23.4-24.6-13.6-13Zm-14.1-16.4-12.3 9-5.5-7.2 8.2-15-2-2.5-8.2 15.6a8.9 8.9 0 0 0-10.8 0c-5 3.6-5 8.8-2.2 12.6l7.2 9.9 27.4-20.2-1.8-2.2Zm-25.2 18.5-5.3-7.2c-2-2.9-2.2-6.3 1.6-9 3.6-2.8 7-1.8 9.2 1.2L67 404l-10.8 8Zm1.1-56.9-1.3-2.6-28.1 13.8-5-10.2-2.3 1.2L31.8 380l2.3-1.2-5-10.1L57.4 355Zm-18.4-51.4-9.7-1.9-2.5-15.8 8.5-5-.5-3-31.4 18.5.5 2.7 35.6 7.4-.5-3Zm-32.2-6.3 17.5-10 2.3 13.8-19.8-3.8Zm27.5-46L.5 238v3l31 12.1L.1 264l-.1 3 34.1-12.3v-3.5Zm75.5-161.8-9.3-11 10.1-8.6-3-3.6L97.3 75l-6.5-7.7 11.3-9.6-3-3.6L84 66.8l22 25.9 3.7-3.2Zm32-23.5-7-12.5 6.5-3.7 13 9.1 4.6-2.5-14.2-9.7c2.4-3 3.2-7 1.1-10.7-3.2-5.6-8.8-6.2-13.4-3.6L120.8 39l16.6 29.6 4.3-2.5Zm-14.4-25.4 7-4c2.5-1.3 5-1.3 7 2 1.8 3.2.5 5.5-2.2 7l-6.8 3.8-5-8.8Zm69 1.7-1.5-4.4-14.4 4.7-3.2-9.5 12.4-4.1-1.5-4.5-12.3 4-3.1-9.1 14.1-4.7-1.5-4.5-18.8 6.2 10.7 32.2 19-6.3Zm24.3-5.4L218 11.8l14.2 24 3.6-.4 9.3-27 2.5 25.8 4.9-.4L249.3 0l-6.3.6-9.5 28.3L218 3l-5.7.6 3.3 33.7 4.9-.4Zm61.2-.9 4.9.6 3.7-29L301 9l.6-4.7L275.5 1l-.6 4.7L285.5 7l-3.7 29Zm44.1-25.7-9.6 32.5 4.7 1.4 9.6-32.5-4.7-1.4ZM358.6 30l4.8 32 4.6 2.4L383.2 34l-4.4-2.2-11.9 23.6-4.7-32-4.7-2.3-15.2 30.4 4.4 2.2L358.6 30Zm59.9 50.9c6.5-8 5.8-17.2-1.5-23.2l-9.4-7.6-21.5 26.2 9.2 7.5c7.6 6.3 16.5 5.3 23.2-3Zm-10-24 4.8 3.9c5.4 4.5 6.8 10 1.2 16.8-5.4 6.5-11 6.8-16.6 2.3l-5-4 15.6-19Z\"\n />\n);\nForsikringLevertAvFremtind.displayName = \"Forsikring levert av Fremtind\";\n"],"names":["ForsikringLevertAvFremtind","jsx","fill","d","displayName"],"mappings":"qHAEaA,EAAiC,IAC1CC,EAAAA,IAAC,OAAA,CACGC,KAAK,eACLC,EAAE,koGAGVH,EAA2BI,YAAc"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),m=()=>l.jsx("path",{fill:"currentColor",d:"m481.6 180.6 4.1 13.3 2.5-.8-4-13.3 12.6-4 4.6 15 2.5-.8-5.5-17.7-32.4 10 .9 2.8 14.7-4.5Zm-5.6 42.7 15.3-1.8 1 9-14.5 9 .4 3 15-9.3a8.9 8.9 0 0 0 9.4 5.5c6-.7 8.7-5.2 8.2-10l-1.4-12.1-33.7 3.8.3 2.9Zm31.1-3.6 1 9c.4 3.5-1.2 6.5-5.9 7-4.5.5-6.9-2-7.3-5.7l-1-8.8 13.2-1.5ZM478.7 260l-.3 2.9 9 4.2-1.4 16-9.5 2.7-.3 3 35-10.3.2-2.8-32.7-15.8Zm10 22.3 1.2-14 18.2 8.5-19.4 5.5Zm-.7 59.1c-3.7-1.5-7.7-.6-11 3.6l-3.2 4.1c-2.5 3.2-4.7 4.5-8.2 3-3.8-1.6-4.4-5.6-2.7-10 1.7-4.1 4.5-6.4 10-5.7l1-2.5c-6.6-1.5-11.1 1.6-13.4 7.1-2.5 6-1 11.7 4.4 14 4.7 2 8.5-.4 10.8-3.5l3.5-4.7c2.4-3 5-3.8 7.9-2.6 3.8 1.6 4.7 5.2 3 9.2-1.5 3.5-4.6 5.7-9.3 4.6l-1 2.5a10.2 10.2 0 0 0 12.8-6c2-5 1-10.8-4.5-13Zm-42.7 30.7 11 7.3-4.3 6.5c-3.5 5.3-3 11.1 2.7 14.8 5.6 3.7 11.3 1.5 14.7-3.6l5.8-8.8-28.3-18.6-1.6 2.4Zm26.1 17.2-4 6c-2.8 4.4-6.7 5.9-11.1 3-4.4-3-4.8-6.8-2.1-10.9l4.3-6.6 13 8.5Zm-47.4 12 4.3 8.9-11.2 11.5-9-3.9-2.2 2.2 33.5 14.1 2-2-15.4-33-2 2.2Zm14.2 29.6-18.5-8 9.8-10.1 8.7 18Zm-50 3.1 8.8 12.8-7.5 5.1-14.7-8.6-2.6 1.9 15.4 8.7a8.9 8.9 0 0 0-.4 10.9c3.5 5 8.6 5.3 12.7 2.5l10-7-19.3-27.8-2.4 1.6Zm17.8 25.8-7.4 5.1c-3 2-6.3 2-9-1.8-2.6-3.8-1.5-7 1.6-9.2l7.2-5 7.6 11Zm-69.6 2.9 1 2.4 14.5-6.4 5.4 12.2-12.5 5.6 1 2.4 12.6-5.5 5.1 11.6-14.2 6.3 1 2.4 17-7.5-13.8-31-17.1 7.5Zm-31.5 9.3c-5.9 1.4-9 6-7.7 11.5.9 4 4.3 6.2 8.2 6.3a8.3 8.3 0 0 0-3.3 8.6c1.3 5.4 5.6 7.8 11.1 6.5l10.4-2.4-7.7-33-11 2.5Zm15.2 28.6-7.2 1.7c-4.3 1-7-1-7.9-4.5-1-4.4 1.1-7 5-7.9l7.2-1.7 3 12.4Zm-11.4-13c-4.1 1-7.7-.8-8.7-4.9-.9-3.7 1-7 5.5-8.1l8.2-2 3 13.1-8 1.9Zm-36.2-1.5-16 .6-3.9-9.1h-3l14.3 33.5h2.8l11.8-34.5-3 .1-3 9.4Zm-7.3 21.7-7.7-18.6 14-.4-6.3 19Zm-43.2-3L206.9 472l-3-.6-6 33.4 2.9.5 5.2-29 15 32.7 3 .5 6-33.3-2.8-.6-5.2 29.2Zm-47-31.1-8 4-6-21.6-3.2-1.3 6.8 24-17.3 8.3 3.2 1.4 23.2-11.4-7.4 17.9 2.7 1 13-31.3-2.7-1-4.2 10Zm-40.7-33.1-18.4 28.8 2 1.3c3-4 4.2-4.2 9.5-.7l1.2-1.8-6-3.8 14.2-22.1-2.5-1.7Zm-72.1-45.5c-7.8 6.5-8.8 16.5-2.6 23.9 6.2 7.4 16.1 8.3 23.9 1.8 7.9-6.6 9-16.7 2.9-24-6.2-7.5-16.3-8.3-24.2-1.7Zm19.4 23.5c-7 5.9-15 4.7-19.9-1.4-5-6-4.7-14 2.3-19.8 7.2-6 15.3-4.9 20.2 1 5 6 4.6 14.1-2.6 20.2ZM59 355a11.6 11.6 0 0 0-11.8-6.5l6-3.7-1-2-15.9 8 6.1 12 2.3-1.1-4.7-9.5 1.1-.6c7-3.5 13-.4 15.4 4.5 3.5 7 1.1 14.2-7.1 18.4-8.6 4.4-16 1-19.2-5.2-2.2-4.4-2-8.7 1.1-12l-1.2-2.4c-4.7 4-5 10.4-2.3 15.6 4.3 8.4 13.6 11.4 23 6.6 9.3-4.7 12.3-14 8.2-22.1Zm-22.2-69.2c-1.2-9.5-8.4-14.5-18.8-13.1-10.1 1.3-16 8.2-14.8 17.5l1.4 10.9 33.6-4.4-1.4-11Zm-30 12-1-7.3c-1-8 3-13.6 12.6-14.9 9.2-1.2 14.8 2.9 15.8 10.9l1 7.6L6.9 298ZM34.7 247l-29.5-2.4 31.2-18.3.3-3-33.8-2.8-.3 2.8 29.5 2.5L.9 244l-.3 3 33.8 3 .3-3Zm10-57.4c1.7-5.7-.6-10.7-6.1-12.3-4-1.2-7.5.6-9.6 4a8.2 8.2 0 0 0-6-7.3c-5.2-1.6-9.4 1-11 6.4l-3 10.3 32.5 9.8 3.2-10.9Zm-20.3 2.8-12.1-3.7 2.1-7c1.3-4.4 4.4-5.8 7.9-4.7 4.2 1.3 5.4 4.4 4.3 8.2l-2.2 7.2Zm2.6.7 2.3-7.8c1.2-4 4.5-6.4 8.5-5.2 3.7 1.2 5.7 4.4 4.4 8.8l-2.4 8-12.8-3.8Zm81-127.4-10 8.5-6.6-7.7 11.4-9.6-3-3.6L84.5 66l22 25.9 3.7-3.2-9.3-11 10.1-8.6-3-3.5Zm34.3-.3-7-12.6 6.5-3.7 13 9.2 4.6-2.6-14.1-9.7c2.3-3 3.2-7 1-10.7-3.1-5.6-8.7-6.2-13.4-3.6l-11.5 6.5 16.7 29.6 4.2-2.4ZM128 39.9l7-4c2.4-1.3 5-1.3 6.9 2 1.8 3.3.5 5.5-2.1 7l-6.8 3.8-5-8.8Zm69 1.7-1.6-4.4-14.4 4.7-3.1-9.5 12.3-4.1-1.4-4.5-12.4 4.1-3-9.2 14-4.7-1.4-4.5-18.8 6.3L177.9 48l19-6.4Zm24.2-5.4-2.4-25.1 14.1 24 3.6-.4 9.3-27 2.5 25.9 4.9-.5-3.3-33.8-6.2.6-9.6 28.3-15.4-25.8-5.7.5 3.3 33.8 4.9-.5Zm61.3-.9 4.8.6L291 7l10.6 1.4.6-4.7L276.1.3l-.6 4.7 10.7 1.3-3.7 29Zm44-25.7L317 42.1l4.8 1.4 9.6-32.5-4.8-1.4Zm32.7 19.7 4.8 32 4.6 2.4 15.2-30.4-4.4-2.2-11.8 23.6-4.8-31.9-4.7-2.3L343 50.8l4.4 2.2 12-23.7Zm59.9 50.9c6.5-8 5.9-17.2-1.5-23.1l-9.3-7.7-21.5 26.2 9.1 7.5c7.7 6.3 16.5 5.3 23.2-3Zm-10-24 4.8 3.9c5.5 4.5 6.8 10 1.2 16.8-5.3 6.6-11 6.8-16.5 2.3l-5-4 15.5-19Z"});m.displayName="Fremtind, fra SpareBank 1 og DNB",exports.FraSB1ogDNB=m;
2
+ //# sourceMappingURL=FraSB1ogDNB.js.map