@fremtind/jokul 0.13.0 → 0.14.1

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 (410) hide show
  1. package/build/build-stats.html +1 -1
  2. package/build/cjs/components/accordion/documentation/Example.js +2 -0
  3. package/build/cjs/components/accordion/documentation/Example.js.map +1 -0
  4. package/build/cjs/components/accordion/documentation/main.js +2 -0
  5. package/build/cjs/components/accordion/documentation/main.js.map +1 -0
  6. package/build/cjs/components/accordion/documentation/vite.dev.config.js +2 -0
  7. package/build/cjs/components/accordion/documentation/vite.dev.config.js.map +1 -0
  8. package/build/cjs/components/feedback/Feedback.js +1 -1
  9. package/build/cjs/components/feedback/Feedback.js.map +1 -1
  10. package/build/cjs/components/feedback/feedbackContext.js.map +1 -1
  11. package/build/cjs/components/feedback/followup/Followup.js +1 -1
  12. package/build/cjs/components/feedback/followup/Followup.js.map +1 -1
  13. package/build/cjs/components/feedback/main-question/MainQuestion.js +1 -1
  14. package/build/cjs/components/feedback/main-question/MainQuestion.js.map +1 -1
  15. package/build/cjs/components/feedback/main-question/useMainQuestion.js +1 -1
  16. package/build/cjs/components/feedback/main-question/useMainQuestion.js.map +1 -1
  17. package/build/cjs/components/feedback/questions/ContactQuestion.js +1 -1
  18. package/build/cjs/components/feedback/questions/ContactQuestion.js.map +1 -1
  19. package/build/cjs/components/link/documentation/Example.js +2 -0
  20. package/build/cjs/components/link/documentation/Example.js.map +1 -0
  21. package/build/cjs/components/link/documentation/main.js +2 -0
  22. package/build/cjs/components/link/documentation/main.js.map +1 -0
  23. package/build/cjs/components/link/documentation/vite.dev.config.js +2 -0
  24. package/build/cjs/components/link/documentation/vite.dev.config.js.map +1 -0
  25. package/build/cjs/components/loader/documentation/Example.js +2 -0
  26. package/build/cjs/components/loader/documentation/Example.js.map +1 -0
  27. package/build/cjs/components/loader/documentation/main.js +2 -0
  28. package/build/cjs/components/loader/documentation/main.js.map +1 -0
  29. package/build/cjs/components/loader/documentation/vite.dev.config.js +2 -0
  30. package/build/cjs/components/loader/documentation/vite.dev.config.js.map +1 -0
  31. package/build/copy-jkl-fonts-BEH11kbT.cjs +2 -0
  32. package/build/copy-jkl-fonts-BEH11kbT.cjs.map +1 -0
  33. package/build/copy-jkl-fonts-Yd-mZnP9.js +2 -0
  34. package/build/copy-jkl-fonts-Yd-mZnP9.js.map +1 -0
  35. package/build/es/components/accordion/documentation/Example.js +2 -0
  36. package/build/es/components/accordion/documentation/Example.js.map +1 -0
  37. package/build/es/components/accordion/documentation/main.js +2 -0
  38. package/build/es/components/accordion/documentation/main.js.map +1 -0
  39. package/build/es/components/accordion/documentation/vite.dev.config.js +2 -0
  40. package/build/es/components/accordion/documentation/vite.dev.config.js.map +1 -0
  41. package/build/es/components/feedback/Feedback.js +1 -1
  42. package/build/es/components/feedback/Feedback.js.map +1 -1
  43. package/build/es/components/feedback/feedbackContext.js.map +1 -1
  44. package/build/es/components/feedback/followup/Followup.js +1 -1
  45. package/build/es/components/feedback/followup/Followup.js.map +1 -1
  46. package/build/es/components/feedback/main-question/MainQuestion.js +1 -1
  47. package/build/es/components/feedback/main-question/MainQuestion.js.map +1 -1
  48. package/build/es/components/feedback/main-question/useMainQuestion.js +1 -1
  49. package/build/es/components/feedback/main-question/useMainQuestion.js.map +1 -1
  50. package/build/es/components/feedback/questions/ContactQuestion.js +1 -1
  51. package/build/es/components/feedback/questions/ContactQuestion.js.map +1 -1
  52. package/build/es/components/link/documentation/Example.js +2 -0
  53. package/build/es/components/link/documentation/Example.js.map +1 -0
  54. package/build/es/components/link/documentation/main.js +2 -0
  55. package/build/es/components/link/documentation/main.js.map +1 -0
  56. package/build/es/components/link/documentation/vite.dev.config.js +2 -0
  57. package/build/es/components/link/documentation/vite.dev.config.js.map +1 -0
  58. package/build/es/components/loader/documentation/Example.js +2 -0
  59. package/build/es/components/loader/documentation/Example.js.map +1 -0
  60. package/build/es/components/loader/documentation/main.js +2 -0
  61. package/build/es/components/loader/documentation/main.js.map +1 -0
  62. package/build/es/components/loader/documentation/vite.dev.config.js +2 -0
  63. package/build/es/components/loader/documentation/vite.dev.config.js.map +1 -0
  64. package/build/formatCode-BE8lQWf_.js +2 -0
  65. package/build/formatCode-BE8lQWf_.js.map +1 -0
  66. package/build/formatCode-C0vvPbYm.cjs +2 -0
  67. package/build/formatCode-C0vvPbYm.cjs.map +1 -0
  68. package/build/index-BeDzjUCb.cjs +2 -0
  69. package/build/index-BeDzjUCb.cjs.map +1 -0
  70. package/build/index-CWVFjuWM.js +2 -0
  71. package/build/index-CWVFjuWM.js.map +1 -0
  72. package/build/packages/jokul/src/components/accordion/documentation/Example.d.ts +2 -0
  73. package/build/packages/jokul/src/components/accordion/documentation/main.d.ts +1 -0
  74. package/build/packages/jokul/src/components/accordion/documentation/vite.dev.config.d.ts +2 -0
  75. package/build/{components → packages/jokul/src/components}/feedback/Feedback.d.ts +9 -1
  76. package/build/{components → packages/jokul/src/components}/feedback/feedbackContext.d.ts +1 -0
  77. package/build/{components → packages/jokul/src/components}/feedback/main-question/useMainQuestion.d.ts +2 -2
  78. package/build/{components → packages/jokul/src/components}/feedback/types.d.ts +2 -2
  79. package/build/packages/jokul/src/components/link/documentation/Example.d.ts +2 -0
  80. package/build/packages/jokul/src/components/link/documentation/main.d.ts +1 -0
  81. package/build/packages/jokul/src/components/link/documentation/vite.dev.config.d.ts +2 -0
  82. package/build/packages/jokul/src/components/loader/documentation/Example.d.ts +2 -0
  83. package/build/packages/jokul/src/components/loader/documentation/main.d.ts +1 -0
  84. package/build/packages/jokul/src/components/loader/documentation/vite.dev.config.d.ts +2 -0
  85. package/build/style.css +1 -0
  86. package/package.json +12 -2
  87. package/src/components/button/styles/button.css +4 -4
  88. package/src/components/button/styles/button.min.css +1 -1
  89. package/src/components/checkbox/styles/checkbox.css +4 -4
  90. package/src/components/checkbox/styles/checkbox.min.css +1 -1
  91. package/src/components/feedback/styles/feedback.css +2 -2
  92. package/src/components/feedback/styles/feedback.min.css +1 -1
  93. package/src/components/input-group/styles/input-group.css +2 -2
  94. package/src/components/input-group/styles/input-group.min.css +1 -1
  95. package/src/components/loader/styles/loader.css +6 -6
  96. package/src/components/loader/styles/loader.min.css +1 -1
  97. package/src/components/loader/styles/skeleton-loader.css +5 -5
  98. package/src/components/loader/styles/skeleton-loader.min.css +1 -1
  99. package/src/components/message/styles/message.css +2 -2
  100. package/src/components/message/styles/message.min.css +1 -1
  101. package/src/components/progress-bar/styles/progress-bar.css +2 -2
  102. package/src/components/progress-bar/styles/progress-bar.min.css +1 -1
  103. package/src/components/radio-button/styles/radio-button.css +2 -2
  104. package/src/components/radio-button/styles/radio-button.min.css +1 -1
  105. package/src/components/system-message/styles/system-message.css +2 -2
  106. package/src/components/system-message/styles/system-message.min.css +1 -1
  107. package/src/components/toast/styles/toast.css +4 -4
  108. package/src/components/toast/styles/toast.min.css +1 -1
  109. /package/build/{components → packages/jokul/src/components}/ScreenReaderOnly.d.ts +0 -0
  110. /package/build/{components → packages/jokul/src/components}/accordion/Accordion.d.ts +0 -0
  111. /package/build/{components → packages/jokul/src/components}/accordion/AccordionItem.d.ts +0 -0
  112. /package/build/{components → packages/jokul/src/components}/accordion/index.d.ts +0 -0
  113. /package/build/{components → packages/jokul/src/components}/breadcrumb/Breadcrumb.d.ts +0 -0
  114. /package/build/{components → packages/jokul/src/components}/breadcrumb/BreadcrumbItem.d.ts +0 -0
  115. /package/build/{components → packages/jokul/src/components}/breadcrumb/index.d.ts +0 -0
  116. /package/build/{components → packages/jokul/src/components}/button/Button.d.ts +0 -0
  117. /package/build/{components → packages/jokul/src/components}/button/index.d.ts +0 -0
  118. /package/build/{components → packages/jokul/src/components}/button/types.d.ts +0 -0
  119. /package/build/{components → packages/jokul/src/components}/card/Card.d.ts +0 -0
  120. /package/build/{components → packages/jokul/src/components}/card/CardImage.d.ts +0 -0
  121. /package/build/{components → packages/jokul/src/components}/card/InfoCard.d.ts +0 -0
  122. /package/build/{components → packages/jokul/src/components}/card/NavCard.d.ts +0 -0
  123. /package/build/{components → packages/jokul/src/components}/card/TaskCard.d.ts +0 -0
  124. /package/build/{components → packages/jokul/src/components}/card/index.d.ts +0 -0
  125. /package/build/{components → packages/jokul/src/components}/card/types.d.ts +0 -0
  126. /package/build/{components → packages/jokul/src/components}/card/utils.d.ts +0 -0
  127. /package/build/{components → packages/jokul/src/components}/checkbox/Checkbox.d.ts +0 -0
  128. /package/build/{components → packages/jokul/src/components}/checkbox/index.d.ts +0 -0
  129. /package/build/{components → packages/jokul/src/components}/combobox/Combobox.d.ts +0 -0
  130. /package/build/{components → packages/jokul/src/components}/combobox/index.d.ts +0 -0
  131. /package/build/{components → packages/jokul/src/components}/cookie-consent/CookieConsent.d.ts +0 -0
  132. /package/build/{components → packages/jokul/src/components}/cookie-consent/CookieConsentContext.d.ts +0 -0
  133. /package/build/{components → packages/jokul/src/components}/cookie-consent/CookieConsentModal.d.ts +0 -0
  134. /package/build/{components → packages/jokul/src/components}/cookie-consent/consents/CustomConsents.d.ts +0 -0
  135. /package/build/{components → packages/jokul/src/components}/cookie-consent/consents/DefaultConsents.d.ts +0 -0
  136. /package/build/{components → packages/jokul/src/components}/cookie-consent/consents/RequirementCheckbox.d.ts +0 -0
  137. /package/build/{components → packages/jokul/src/components}/cookie-consent/cookieConsentUtils.d.ts +0 -0
  138. /package/build/{components → packages/jokul/src/components}/cookie-consent/index.d.ts +0 -0
  139. /package/build/{components → packages/jokul/src/components}/cookie-consent/types.d.ts +0 -0
  140. /package/build/{components → packages/jokul/src/components}/datepicker/DatePicker.d.ts +0 -0
  141. /package/build/{components → packages/jokul/src/components}/datepicker/index.d.ts +0 -0
  142. /package/build/{components → packages/jokul/src/components}/datepicker/internal/Calendar.d.ts +0 -0
  143. /package/build/{components → packages/jokul/src/components}/datepicker/internal/calendarReducer.d.ts +0 -0
  144. /package/build/{components → packages/jokul/src/components}/datepicker/internal/useCalendar.d.ts +0 -0
  145. /package/build/{components → packages/jokul/src/components}/datepicker/internal/utils.d.ts +0 -0
  146. /package/build/{components → packages/jokul/src/components}/datepicker/types.d.ts +0 -0
  147. /package/build/{components → packages/jokul/src/components}/datepicker/utils.d.ts +0 -0
  148. /package/build/{components → packages/jokul/src/components}/datepicker/validation.d.ts +0 -0
  149. /package/build/{components → packages/jokul/src/components}/description-list/DescriptionList.d.ts +0 -0
  150. /package/build/{components → packages/jokul/src/components}/description-list/index.d.ts +0 -0
  151. /package/build/{components → packages/jokul/src/components}/expander/ExpandSection.d.ts +0 -0
  152. /package/build/{components → packages/jokul/src/components}/expander/Expander.d.ts +0 -0
  153. /package/build/{components → packages/jokul/src/components}/expander/index.d.ts +0 -0
  154. /package/build/{components → packages/jokul/src/components}/feedback/FeedbackSuccess.d.ts +0 -0
  155. /package/build/{components → packages/jokul/src/components}/feedback/FeedbackValues.d.ts +0 -0
  156. /package/build/{components → packages/jokul/src/components}/feedback/followup/Followup.d.ts +0 -0
  157. /package/build/{components → packages/jokul/src/components}/feedback/followup/followupContext.d.ts +0 -0
  158. /package/build/{components → packages/jokul/src/components}/feedback/followup/useFollowup.d.ts +0 -0
  159. /package/build/{components → packages/jokul/src/components}/feedback/index.d.ts +0 -0
  160. /package/build/{components → packages/jokul/src/components}/feedback/main-question/MainQuestion.d.ts +0 -0
  161. /package/build/{components → packages/jokul/src/components}/feedback/main-question/mainQuestionContext.d.ts +0 -0
  162. /package/build/{components → packages/jokul/src/components}/feedback/presets.d.ts +0 -0
  163. /package/build/{components → packages/jokul/src/components}/feedback/questions/AddonQuestion.d.ts +0 -0
  164. /package/build/{components → packages/jokul/src/components}/feedback/questions/CheckboxQuestion.d.ts +0 -0
  165. /package/build/{components → packages/jokul/src/components}/feedback/questions/ContactQuestion.d.ts +0 -0
  166. /package/build/{components → packages/jokul/src/components}/feedback/questions/RadioQuestion.d.ts +0 -0
  167. /package/build/{components → packages/jokul/src/components}/feedback/questions/SmileyQuestion.d.ts +0 -0
  168. /package/build/{components → packages/jokul/src/components}/feedback/questions/TextQuestion.d.ts +0 -0
  169. /package/build/{components → packages/jokul/src/components}/feedback/questions/index.d.ts +0 -0
  170. /package/build/{components → packages/jokul/src/components}/feedback/questions/smileyUtils.d.ts +0 -0
  171. /package/build/{components → packages/jokul/src/components}/feedback/utils.d.ts +0 -0
  172. /package/build/{components → packages/jokul/src/components}/icon/Icon.d.ts +0 -0
  173. /package/build/{components → packages/jokul/src/components}/icon/icons/ArrowDownIcon.d.ts +0 -0
  174. /package/build/{components → packages/jokul/src/components}/icon/icons/ArrowLeftIcon.d.ts +0 -0
  175. /package/build/{components → packages/jokul/src/components}/icon/icons/ArrowNorthEastIcon.d.ts +0 -0
  176. /package/build/{components → packages/jokul/src/components}/icon/icons/ArrowRightIcon.d.ts +0 -0
  177. /package/build/{components → packages/jokul/src/components}/icon/icons/ArrowUpIcon.d.ts +0 -0
  178. /package/build/{components → packages/jokul/src/components}/icon/icons/CalendarIcon.d.ts +0 -0
  179. /package/build/{components → packages/jokul/src/components}/icon/icons/CheckIcon.d.ts +0 -0
  180. /package/build/{components → packages/jokul/src/components}/icon/icons/ChevronDownIcon.d.ts +0 -0
  181. /package/build/{components → packages/jokul/src/components}/icon/icons/ChevronLeftIcon.d.ts +0 -0
  182. /package/build/{components → packages/jokul/src/components}/icon/icons/ChevronRightIcon.d.ts +0 -0
  183. /package/build/{components → packages/jokul/src/components}/icon/icons/ChevronUpIcon.d.ts +0 -0
  184. /package/build/{components → packages/jokul/src/components}/icon/icons/CloseIcon.d.ts +0 -0
  185. /package/build/{components → packages/jokul/src/components}/icon/icons/CopyIcon.d.ts +0 -0
  186. /package/build/{components → packages/jokul/src/components}/icon/icons/DotsIcon.d.ts +0 -0
  187. /package/build/{components → packages/jokul/src/components}/icon/icons/DragIcon.d.ts +0 -0
  188. /package/build/{components → packages/jokul/src/components}/icon/icons/ErrorIcon.d.ts +0 -0
  189. /package/build/{components → packages/jokul/src/components}/icon/icons/GreenCheckIcon.d.ts +0 -0
  190. /package/build/{components → packages/jokul/src/components}/icon/icons/HamburgerIcon.d.ts +0 -0
  191. /package/build/{components → packages/jokul/src/components}/icon/icons/InfoIcon.d.ts +0 -0
  192. /package/build/{components → packages/jokul/src/components}/icon/icons/LinkIcon.d.ts +0 -0
  193. /package/build/{components → packages/jokul/src/components}/icon/icons/MinusIcon.d.ts +0 -0
  194. /package/build/{components → packages/jokul/src/components}/icon/icons/PenIcon.d.ts +0 -0
  195. /package/build/{components → packages/jokul/src/components}/icon/icons/PlusIcon.d.ts +0 -0
  196. /package/build/{components → packages/jokul/src/components}/icon/icons/QuestionIcon.d.ts +0 -0
  197. /package/build/{components → packages/jokul/src/components}/icon/icons/RedCrossIcon.d.ts +0 -0
  198. /package/build/{components → packages/jokul/src/components}/icon/icons/SearchIcon.d.ts +0 -0
  199. /package/build/{components → packages/jokul/src/components}/icon/icons/SuccessIcon.d.ts +0 -0
  200. /package/build/{components → packages/jokul/src/components}/icon/icons/ThumbDownIcon.d.ts +0 -0
  201. /package/build/{components → packages/jokul/src/components}/icon/icons/ThumbUpIcon.d.ts +0 -0
  202. /package/build/{components → packages/jokul/src/components}/icon/icons/TrashCanIcon.d.ts +0 -0
  203. /package/build/{components → packages/jokul/src/components}/icon/icons/WarningIcon.d.ts +0 -0
  204. /package/build/{components → packages/jokul/src/components}/icon/icons/animated/ArrowHorizontalAnimated.d.ts +0 -0
  205. /package/build/{components → packages/jokul/src/components}/icon/icons/animated/ArrowVerticalAnimated.d.ts +0 -0
  206. /package/build/{components → packages/jokul/src/components}/icon/icons/animated/PlusRemoveAnimated.d.ts +0 -0
  207. /package/build/{components → packages/jokul/src/components}/icon/index.d.ts +0 -0
  208. /package/build/{components → packages/jokul/src/components}/icon/types.d.ts +0 -0
  209. /package/build/{components → packages/jokul/src/components}/icon-button/IconButton.d.ts +0 -0
  210. /package/build/{components → packages/jokul/src/components}/icon-button/index.d.ts +0 -0
  211. /package/build/{components → packages/jokul/src/components}/image/Image.d.ts +0 -0
  212. /package/build/{components → packages/jokul/src/components}/image/index.d.ts +0 -0
  213. /package/build/{components → packages/jokul/src/components}/image/useImageLoadingStatus.d.ts +0 -0
  214. /package/build/{components → packages/jokul/src/components}/index.d.ts +0 -0
  215. /package/build/{components → packages/jokul/src/components}/input-group/FieldGroup.d.ts +0 -0
  216. /package/build/{components → packages/jokul/src/components}/input-group/InputGroup.d.ts +0 -0
  217. /package/build/{components → packages/jokul/src/components}/input-group/Label.d.ts +0 -0
  218. /package/build/{components → packages/jokul/src/components}/input-group/SupportLabel.d.ts +0 -0
  219. /package/build/{components → packages/jokul/src/components}/input-group/index.d.ts +0 -0
  220. /package/build/{components → packages/jokul/src/components}/link/Link.d.ts +0 -0
  221. /package/build/{components → packages/jokul/src/components}/link/NavLink.d.ts +0 -0
  222. /package/build/{components → packages/jokul/src/components}/link/index.d.ts +0 -0
  223. /package/build/{components → packages/jokul/src/components}/link-list/LinkList.d.ts +0 -0
  224. /package/build/{components → packages/jokul/src/components}/link-list/index.d.ts +0 -0
  225. /package/build/{components → packages/jokul/src/components}/list/List.d.ts +0 -0
  226. /package/build/{components → packages/jokul/src/components}/list/ListItem.d.ts +0 -0
  227. /package/build/{components → packages/jokul/src/components}/list/index.d.ts +0 -0
  228. /package/build/{components → packages/jokul/src/components}/loader/Loader.d.ts +0 -0
  229. /package/build/{components → packages/jokul/src/components}/loader/index.d.ts +0 -0
  230. /package/build/{components → packages/jokul/src/components}/loader/skeletons/SkeletonAnimation.d.ts +0 -0
  231. /package/build/{components → packages/jokul/src/components}/loader/skeletons/SkeletonButton.d.ts +0 -0
  232. /package/build/{components → packages/jokul/src/components}/loader/skeletons/SkeletonCheckboxGroup.d.ts +0 -0
  233. /package/build/{components → packages/jokul/src/components}/loader/skeletons/SkeletonElement.d.ts +0 -0
  234. /package/build/{components → packages/jokul/src/components}/loader/skeletons/SkeletonInput.d.ts +0 -0
  235. /package/build/{components → packages/jokul/src/components}/loader/skeletons/SkeletonLabel.d.ts +0 -0
  236. /package/build/{components → packages/jokul/src/components}/loader/skeletons/SkeletonRadioButtonGroup.d.ts +0 -0
  237. /package/build/{components → packages/jokul/src/components}/loader/skeletons/SkeletonTable.d.ts +0 -0
  238. /package/build/{components → packages/jokul/src/components}/loader/skeletons/SkeletonTextArea.d.ts +0 -0
  239. /package/build/{components → packages/jokul/src/components}/loader/useDelayedRender.d.ts +0 -0
  240. /package/build/{components → packages/jokul/src/components}/logo/Logo.d.ts +0 -0
  241. /package/build/{components → packages/jokul/src/components}/logo/LogoStamp.d.ts +0 -0
  242. /package/build/{components → packages/jokul/src/components}/logo/index.d.ts +0 -0
  243. /package/build/{components → packages/jokul/src/components}/logo/text-paths/ForsikringLevertAvFremtind.d.ts +0 -0
  244. /package/build/{components → packages/jokul/src/components}/logo/text-paths/FraSB1ogDNB.d.ts +0 -0
  245. /package/build/{components → packages/jokul/src/components}/logo/text-paths/InnovasjonFraFremtind.d.ts +0 -0
  246. /package/build/{components → packages/jokul/src/components}/logo/text-paths/TeknologiFraFremtind.d.ts +0 -0
  247. /package/build/{components → packages/jokul/src/components}/logo/text-paths/VartEgetForsikringsselskap.d.ts +0 -0
  248. /package/build/{components → packages/jokul/src/components}/logo/text-paths/VartForsikringsselskap.d.ts +0 -0
  249. /package/build/{components → packages/jokul/src/components}/logo/text-paths/index.d.ts +0 -0
  250. /package/build/{components → packages/jokul/src/components}/logo/useTextSpinner.d.ts +0 -0
  251. /package/build/{components → packages/jokul/src/components}/message/DismissButton.d.ts +0 -0
  252. /package/build/{components → packages/jokul/src/components}/message/FormErrorMessage.d.ts +0 -0
  253. /package/build/{components → packages/jokul/src/components}/message/Message.d.ts +0 -0
  254. /package/build/{components → packages/jokul/src/components}/message/index.d.ts +0 -0
  255. /package/build/{components → packages/jokul/src/components}/modal/Modal.d.ts +0 -0
  256. /package/build/{components → packages/jokul/src/components}/modal/index.d.ts +0 -0
  257. /package/build/{components → packages/jokul/src/components}/modal/useModal.d.ts +0 -0
  258. /package/build/{components → packages/jokul/src/components}/popover/Popover.d.ts +0 -0
  259. /package/build/{components → packages/jokul/src/components}/popover/index.d.ts +0 -0
  260. /package/build/{components → packages/jokul/src/components}/popover/utils.d.ts +0 -0
  261. /package/build/{components → packages/jokul/src/components}/progress-bar/Countdown.d.ts +0 -0
  262. /package/build/{components → packages/jokul/src/components}/progress-bar/ProgressBar.d.ts +0 -0
  263. /package/build/{components → packages/jokul/src/components}/progress-bar/index.d.ts +0 -0
  264. /package/build/{components → packages/jokul/src/components}/radio-button/BaseRadioButton.d.ts +0 -0
  265. /package/build/{components → packages/jokul/src/components}/radio-button/RadioButton.d.ts +0 -0
  266. /package/build/{components → packages/jokul/src/components}/radio-button/RadioButtonGroup.d.ts +0 -0
  267. /package/build/{components → packages/jokul/src/components}/radio-button/index.d.ts +0 -0
  268. /package/build/{components → packages/jokul/src/components}/radio-button/radioGroupContext.d.ts +0 -0
  269. /package/build/{components → packages/jokul/src/components}/select/NativeSelect.d.ts +0 -0
  270. /package/build/{components → packages/jokul/src/components}/select/Select.d.ts +0 -0
  271. /package/build/{components → packages/jokul/src/components}/select/index.d.ts +0 -0
  272. /package/build/{components → packages/jokul/src/components}/select/select-utils.d.ts +0 -0
  273. /package/build/{components → packages/jokul/src/components}/summary-table/SummaryTable.d.ts +0 -0
  274. /package/build/{components → packages/jokul/src/components}/summary-table/SummaryTableRow.d.ts +0 -0
  275. /package/build/{components → packages/jokul/src/components}/summary-table/index.d.ts +0 -0
  276. /package/build/{components → packages/jokul/src/components}/summary-table/mocks/index.d.ts +0 -0
  277. /package/build/{components → packages/jokul/src/components}/system-message/SystemMessage.d.ts +0 -0
  278. /package/build/{components → packages/jokul/src/components}/system-message/common/DismissButton.d.ts +0 -0
  279. /package/build/{components → packages/jokul/src/components}/system-message/common/MessageIcon.d.ts +0 -0
  280. /package/build/{components → packages/jokul/src/components}/system-message/index.d.ts +0 -0
  281. /package/build/{components → packages/jokul/src/components}/table/DataTable.d.ts +0 -0
  282. /package/build/{components → packages/jokul/src/components}/table/ExpandableTableRow.d.ts +0 -0
  283. /package/build/{components → packages/jokul/src/components}/table/ExpandableTableRowController.d.ts +0 -0
  284. /package/build/{components → packages/jokul/src/components}/table/Table.d.ts +0 -0
  285. /package/build/{components → packages/jokul/src/components}/table/TableBody.d.ts +0 -0
  286. /package/build/{components → packages/jokul/src/components}/table/TableCaption.d.ts +0 -0
  287. /package/build/{components → packages/jokul/src/components}/table/TableCell.d.ts +0 -0
  288. /package/build/{components → packages/jokul/src/components}/table/TableColumn.d.ts +0 -0
  289. /package/build/{components → packages/jokul/src/components}/table/TableColumnGroup.d.ts +0 -0
  290. /package/build/{components → packages/jokul/src/components}/table/TableFooter.d.ts +0 -0
  291. /package/build/{components → packages/jokul/src/components}/table/TableHead.d.ts +0 -0
  292. /package/build/{components → packages/jokul/src/components}/table/TableHeader.d.ts +0 -0
  293. /package/build/{components → packages/jokul/src/components}/table/TablePagination.d.ts +0 -0
  294. /package/build/{components → packages/jokul/src/components}/table/TableRow.d.ts +0 -0
  295. /package/build/{components → packages/jokul/src/components}/table/index.d.ts +0 -0
  296. /package/build/{components → packages/jokul/src/components}/table/tableContext.d.ts +0 -0
  297. /package/build/{components → packages/jokul/src/components}/table/tableSectionContext.d.ts +0 -0
  298. /package/build/{components → packages/jokul/src/components}/table/utils.d.ts +0 -0
  299. /package/build/{components → packages/jokul/src/components}/tabs/NavTab.d.ts +0 -0
  300. /package/build/{components → packages/jokul/src/components}/tabs/NavTabs.d.ts +0 -0
  301. /package/build/{components → packages/jokul/src/components}/tabs/Tab.d.ts +0 -0
  302. /package/build/{components → packages/jokul/src/components}/tabs/TabList.d.ts +0 -0
  303. /package/build/{components → packages/jokul/src/components}/tabs/TabPanel.d.ts +0 -0
  304. /package/build/{components → packages/jokul/src/components}/tabs/Tabs.d.ts +0 -0
  305. /package/build/{components → packages/jokul/src/components}/tabs/index.d.ts +0 -0
  306. /package/build/{components → packages/jokul/src/components}/tabs/tabsContext.d.ts +0 -0
  307. /package/build/{components → packages/jokul/src/components}/tag/Tag.d.ts +0 -0
  308. /package/build/{components → packages/jokul/src/components}/tag/index.d.ts +0 -0
  309. /package/build/{components → packages/jokul/src/components}/text-input/BaseTextArea.d.ts +0 -0
  310. /package/build/{components → packages/jokul/src/components}/text-input/BaseTextInput.d.ts +0 -0
  311. /package/build/{components → packages/jokul/src/components}/text-input/TextArea.d.ts +0 -0
  312. /package/build/{components → packages/jokul/src/components}/text-input/TextInput.d.ts +0 -0
  313. /package/build/{components → packages/jokul/src/components}/text-input/index.d.ts +0 -0
  314. /package/build/{components → packages/jokul/src/components}/toast/Toast.d.ts +0 -0
  315. /package/build/{components → packages/jokul/src/components}/toast/ToastRegion.d.ts +0 -0
  316. /package/build/{components → packages/jokul/src/components}/toast/index.d.ts +0 -0
  317. /package/build/{components → packages/jokul/src/components}/toast/toastContext.d.ts +0 -0
  318. /package/build/{components → packages/jokul/src/components}/toast/types.d.ts +0 -0
  319. /package/build/{components → packages/jokul/src/components}/toggle-switch/ToggleSlider.d.ts +0 -0
  320. /package/build/{components → packages/jokul/src/components}/toggle-switch/ToggleSwitch.d.ts +0 -0
  321. /package/build/{components → packages/jokul/src/components}/toggle-switch/index.d.ts +0 -0
  322. /package/build/{components → packages/jokul/src/components}/toggle-switch/usePillStyles.d.ts +0 -0
  323. /package/build/{components → packages/jokul/src/components}/tooltip/PopupTip.d.ts +0 -0
  324. /package/build/{components → packages/jokul/src/components}/tooltip/TooltipContent.d.ts +0 -0
  325. /package/build/{components → packages/jokul/src/components}/tooltip/TooltipTrigger.d.ts +0 -0
  326. /package/build/{components → packages/jokul/src/components}/tooltip/index.d.ts +0 -0
  327. /package/build/{core → packages/jokul/src/core}/index.d.ts +0 -0
  328. /package/build/{core → packages/jokul/src/core}/tokens.d.ts +0 -0
  329. /package/build/{core → packages/jokul/src/core}/types.d.ts +0 -0
  330. /package/build/{hooks → packages/jokul/src/hooks}/index.d.ts +0 -0
  331. /package/build/{hooks → packages/jokul/src/hooks}/mediaQueryUtils.d.ts +0 -0
  332. /package/build/{hooks → packages/jokul/src/hooks}/useAnimatedDetails/index.d.ts +0 -0
  333. /package/build/{hooks → packages/jokul/src/hooks}/useAnimatedDetails/useAnimatedDetails.d.ts +0 -0
  334. /package/build/{hooks → packages/jokul/src/hooks}/useAnimatedHeight/index.d.ts +0 -0
  335. /package/build/{hooks → packages/jokul/src/hooks}/useAnimatedHeight/types.d.ts +0 -0
  336. /package/build/{hooks → packages/jokul/src/hooks}/useAnimatedHeight/useAnimatedHeight.d.ts +0 -0
  337. /package/build/{hooks → packages/jokul/src/hooks}/useAnimatedHeight/useAnimatedHeightBetween.d.ts +0 -0
  338. /package/build/{hooks → packages/jokul/src/hooks}/useAnimatedHeight/useAutoAnimateHeight.d.ts +0 -0
  339. /package/build/{hooks → packages/jokul/src/hooks}/useAriaLiveRegion/index.d.ts +0 -0
  340. /package/build/{hooks → packages/jokul/src/hooks}/useAriaLiveRegion/useAriaLiveRegion.d.ts +0 -0
  341. /package/build/{hooks → packages/jokul/src/hooks}/useBrowserPreferences/index.d.ts +0 -0
  342. /package/build/{hooks → packages/jokul/src/hooks}/useBrowserPreferences/useBrowserPreferences.d.ts +0 -0
  343. /package/build/{hooks → packages/jokul/src/hooks}/useClickOutside/index.d.ts +0 -0
  344. /package/build/{hooks → packages/jokul/src/hooks}/useClickOutside/useClickOutside.d.ts +0 -0
  345. /package/build/{hooks → packages/jokul/src/hooks}/useElementDimensions/index.d.ts +0 -0
  346. /package/build/{hooks → packages/jokul/src/hooks}/useElementDimensions/useElementDimensions.d.ts +0 -0
  347. /package/build/{hooks → packages/jokul/src/hooks}/useFocusOutside/index.d.ts +0 -0
  348. /package/build/{hooks → packages/jokul/src/hooks}/useFocusOutside/useFocusOutside.d.ts +0 -0
  349. /package/build/{hooks → packages/jokul/src/hooks}/useId/index.d.ts +0 -0
  350. /package/build/{hooks → packages/jokul/src/hooks}/useId/useId.d.ts +0 -0
  351. /package/build/{hooks → packages/jokul/src/hooks}/useIntersectionObserver/index.d.ts +0 -0
  352. /package/build/{hooks → packages/jokul/src/hooks}/useIntersectionObserver/useIntersectionObserver.d.ts +0 -0
  353. /package/build/{hooks → packages/jokul/src/hooks}/useKeyListener/index.d.ts +0 -0
  354. /package/build/{hooks → packages/jokul/src/hooks}/useKeyListener/useKeyListener.d.ts +0 -0
  355. /package/build/{hooks → packages/jokul/src/hooks}/useListNavigation/index.d.ts +0 -0
  356. /package/build/{hooks → packages/jokul/src/hooks}/useListNavigation/useListNavigation.d.ts +0 -0
  357. /package/build/{hooks → packages/jokul/src/hooks}/useLocalStorage/index.d.ts +0 -0
  358. /package/build/{hooks → packages/jokul/src/hooks}/useLocalStorage/useLocalStorage.d.ts +0 -0
  359. /package/build/{hooks → packages/jokul/src/hooks}/useMutationObserver/index.d.ts +0 -0
  360. /package/build/{hooks → packages/jokul/src/hooks}/useMutationObserver/useMutationObserver.d.ts +0 -0
  361. /package/build/{hooks → packages/jokul/src/hooks}/usePreviousValue/index.d.ts +0 -0
  362. /package/build/{hooks → packages/jokul/src/hooks}/usePreviousValue/usePreviousValue.d.ts +0 -0
  363. /package/build/{hooks → packages/jokul/src/hooks}/useProgressiveImg/index.d.ts +0 -0
  364. /package/build/{hooks → packages/jokul/src/hooks}/useProgressiveImg/useProgressiveImg.d.ts +0 -0
  365. /package/build/{hooks → packages/jokul/src/hooks}/useScreen/index.d.ts +0 -0
  366. /package/build/{hooks → packages/jokul/src/hooks}/useScreen/state.d.ts +0 -0
  367. /package/build/{hooks → packages/jokul/src/hooks}/useScreen/useScreen.d.ts +0 -0
  368. /package/build/{hooks → packages/jokul/src/hooks}/useScrollIntoView/index.d.ts +0 -0
  369. /package/build/{hooks → packages/jokul/src/hooks}/useScrollIntoView/useScrollIntoView.d.ts +0 -0
  370. /package/build/{hooks → packages/jokul/src/hooks}/useSwipeGesture/index.d.ts +0 -0
  371. /package/build/{hooks → packages/jokul/src/hooks}/useSwipeGesture/useSwipeGesture.d.ts +0 -0
  372. /package/build/{index.d.ts → packages/jokul/src/index.d.ts} +0 -0
  373. /package/build/{utilities → packages/jokul/src/utilities}/constants/index.d.ts +0 -0
  374. /package/build/{utilities → packages/jokul/src/utilities}/constants/unicode.d.ts +0 -0
  375. /package/build/{utilities → packages/jokul/src/utilities}/formatters/avstand/formatAvstand.d.ts +0 -0
  376. /package/build/{utilities → packages/jokul/src/utilities}/formatters/bytes/formatBytes.d.ts +0 -0
  377. /package/build/{utilities → packages/jokul/src/utilities}/formatters/date/formatDate.d.ts +0 -0
  378. /package/build/{utilities → packages/jokul/src/utilities}/formatters/fodselsnummer/formatFodselsnummer.d.ts +0 -0
  379. /package/build/{utilities → packages/jokul/src/utilities}/formatters/index.d.ts +0 -0
  380. /package/build/{utilities → packages/jokul/src/utilities}/formatters/kontonummer/formatKontonummer.d.ts +0 -0
  381. /package/build/{utilities → packages/jokul/src/utilities}/formatters/kortnummer/formatKortnummer.d.ts +0 -0
  382. /package/build/{utilities → packages/jokul/src/utilities}/formatters/organisasjonsnummer/formatOrganisasjonsnummer.d.ts +0 -0
  383. /package/build/{utilities → packages/jokul/src/utilities}/formatters/telefonnummer/formatTelefonnummer.d.ts +0 -0
  384. /package/build/{utilities → packages/jokul/src/utilities}/formatters/util/formatNumber.d.ts +0 -0
  385. /package/build/{utilities → packages/jokul/src/utilities}/formatters/util/parseNumber.d.ts +0 -0
  386. /package/build/{utilities → packages/jokul/src/utilities}/formatters/util/registerWithMask.d.ts +0 -0
  387. /package/build/{utilities → packages/jokul/src/utilities}/formatters/valuta/formatValuta.d.ts +0 -0
  388. /package/build/{utilities → packages/jokul/src/utilities}/index.d.ts +0 -0
  389. /package/build/{utilities → packages/jokul/src/utilities}/polymorphism/SlotComponent.d.ts +0 -0
  390. /package/build/{utilities → packages/jokul/src/utilities}/polymorphism/as-child.d.ts +0 -0
  391. /package/build/{utilities → packages/jokul/src/utilities}/polymorphism/index.d.ts +0 -0
  392. /package/build/{utilities → packages/jokul/src/utilities}/polymorphism/mergeProps.d.ts +0 -0
  393. /package/build/{utilities → packages/jokul/src/utilities}/polymorphism/mergeRefs.d.ts +0 -0
  394. /package/build/{utilities → packages/jokul/src/utilities}/polymorphism/polymorphism.d.ts +0 -0
  395. /package/build/{utilities → packages/jokul/src/utilities}/tabListener.d.ts +0 -0
  396. /package/build/{utilities → packages/jokul/src/utilities}/validators/hasMinimumWords/hasMinimumWords.d.ts +0 -0
  397. /package/build/{utilities → packages/jokul/src/utilities}/validators/hasNoIllegalCharacters/hasNoIllegalCharacters.d.ts +0 -0
  398. /package/build/{utilities → packages/jokul/src/utilities}/validators/index.d.ts +0 -0
  399. /package/build/{utilities → packages/jokul/src/utilities}/validators/isExactLength/isExactLength.d.ts +0 -0
  400. /package/build/{utilities → packages/jokul/src/utilities}/validators/isInteger/isInteger.d.ts +0 -0
  401. /package/build/{utilities → packages/jokul/src/utilities}/validators/isValidChassisnummer/isValidChassisnummer.d.ts +0 -0
  402. /package/build/{utilities → packages/jokul/src/utilities}/validators/isValidDogId/isValidDogId.d.ts +0 -0
  403. /package/build/{utilities → packages/jokul/src/utilities}/validators/isValidEpost/isValidEpost.d.ts +0 -0
  404. /package/build/{utilities → packages/jokul/src/utilities}/validators/isValidFodselsnummer/isValidFodselsnummer.d.ts +0 -0
  405. /package/build/{utilities → packages/jokul/src/utilities}/validators/isValidKortnummer/isValidKortnummer.d.ts +0 -0
  406. /package/build/{utilities → packages/jokul/src/utilities}/validators/isValidName/isValidName.d.ts +0 -0
  407. /package/build/{utilities → packages/jokul/src/utilities}/validators/isValidOrganisasjonsnummer/isValidOrganisasjonsnummer.d.ts +0 -0
  408. /package/build/{utilities → packages/jokul/src/utilities}/validators/isValidRegistreringsnummer/isValidRegistreringsnummer.d.ts +0 -0
  409. /package/build/{utilities → packages/jokul/src/utilities}/validators/isValidTelefonnummer/isValidTelefonnummer.d.ts +0 -0
  410. /package/build/{utilities → packages/jokul/src/utilities}/valuePair.d.ts +0 -0
@@ -0,0 +1,2 @@
1
+ "use strict";const n=require("react/jsx-runtime"),e=require("../../../../formatCode-C0vvPbYm.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("../../list/List.js"),require("../../list/ListItem.js");const o=[],r=e.formatCode('import React, { useId } from "react";\nimport { Accordion, AccordionItem } from "..";\nimport { UnorderedList, ListItem } from "../../list";\n\nexport const knobs = [];\n\nexport const AccordionExample = () => {\n /* -- EXAMPLE CODE START -- */\n const id = useId();\n return (\n <>\n <h2\n className="jkl-portal-heading-medium"\n id={id}\n style={{ textAlign: "center", marginBottom: 24, width: "100%" }}\n >\n Noen spørsmål\n </h2>\n <Accordion aria-labelledby={id}>\n <AccordionItem\n title="Hvem kan kjøpe livsforsikring?"\n onClick={(e, isOpen) => {\n isOpen\n ? console.log("Opening first accordion item")\n : console.log("Closing first accordion item");\n }}\n >\n <UnorderedList>\n <ListItem>Personer med et norsk fødselsnummer.</ListItem>\n <ListItem>\n Personer som har vært bosatt i Norge i minst de fem siste årene før avtalen inngås.\n </ListItem>\n <ListItem>Livsforsikring kan kjøpes på nett av personer mellom 18 og 79 år.</ListItem>\n </UnorderedList>\n Ønsker du en forsikringssum på mer enn 3 millioner trenger vi ekstra økonomiske opplysninger. Da må\n du ta kontakt med banken din.\n </AccordionItem>\n <AccordionItem title="Hvem kan kjøpe kritisk sykdom?">\n Personer med et norsk fødselsnummer. Personer som har vært bosatt i Norge i minst de fem siste årene\n før avtalen inngås. Kritisk sykdom kan kjøpes på nett av personer mellom 18 og 58 år. Ønsker du en\n forsikringssum på mer enn 1,1 millioner trenger vi ekstra økonomiske opplysninger. Da må du ta\n kontakt med banken din.\n </AccordionItem>\n <AccordionItem title="Hvem kan kjøpe uførepensjon?">\n Personer med et norsk fødselsnummer. Personer som har vært bosatt i Norge i minst de fem siste årene\n før avtalen inngås. Uførepensjon kan kjøpes på nett av personer mellom 18 og 60 år. Ønsker du en\n forsikringssum på mer enn 96 000 trenger vi ekstra økonomiske opplysninger. Da må du ta kontakt med\n banken din.\n </AccordionItem>\n </Accordion>\n </>\n );\n /* -- EXAMPLE CODE END -- */\n};\n');module.exports=function(){const i=e.useInteractiveCodeControls(r,o);return n.jsx("div",{className:"jkl",children:n.jsx(e.InteractiveCode,{title:"Accordion",defaultCode:r,defaultShowEditor:!0,noInline:!0,controls:i})})};
2
+ //# sourceMappingURL=Example.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Example.js","sources":["../../../../../src/components/accordion/documentation/AccordionExample.jsx","../../../../../src/components/accordion/documentation/Example.tsx","../../../../../src/components/accordion/documentation/AccordionExample.jsx?raw"],"sourcesContent":["import React, { useId } from \"react\";\nimport { Accordion, AccordionItem } from \"..\";\nimport { UnorderedList, ListItem } from \"../../list\";\n\nexport const knobs = [];\n\nexport const AccordionExample = () => {\n /* -- EXAMPLE CODE START -- */\n const id = useId();\n return (\n <>\n <h2\n className=\"jkl-portal-heading-medium\"\n id={id}\n style={{ textAlign: \"center\", marginBottom: 24, width: \"100%\" }}\n >\n Noen spørsmål\n </h2>\n <Accordion aria-labelledby={id}>\n <AccordionItem\n title=\"Hvem kan kjøpe livsforsikring?\"\n onClick={(e, isOpen) => {\n isOpen\n ? console.log(\"Opening first accordion item\")\n : console.log(\"Closing first accordion item\");\n }}\n >\n <UnorderedList>\n <ListItem>Personer med et norsk fødselsnummer.</ListItem>\n <ListItem>\n Personer som har vært bosatt i Norge i minst de fem siste årene før avtalen inngås.\n </ListItem>\n <ListItem>Livsforsikring kan kjøpes på nett av personer mellom 18 og 79 år.</ListItem>\n </UnorderedList>\n Ønsker du en forsikringssum på mer enn 3 millioner trenger vi ekstra økonomiske opplysninger. Da må\n du ta kontakt med banken din.\n </AccordionItem>\n <AccordionItem title=\"Hvem kan kjøpe kritisk sykdom?\">\n Personer med et norsk fødselsnummer. Personer som har vært bosatt i Norge i minst de fem siste årene\n før avtalen inngås. Kritisk sykdom kan kjøpes på nett av personer mellom 18 og 58 år. Ønsker du en\n forsikringssum på mer enn 1,1 millioner trenger vi ekstra økonomiske opplysninger. Da må du ta\n kontakt med banken din.\n </AccordionItem>\n <AccordionItem title=\"Hvem kan kjøpe uførepensjon?\">\n Personer med et norsk fødselsnummer. Personer som har vært bosatt i Norge i minst de fem siste årene\n før avtalen inngås. Uførepensjon kan kjøpes på nett av personer mellom 18 og 60 år. Ønsker du en\n forsikringssum på mer enn 96 000 trenger vi ekstra økonomiske opplysninger. Da må du ta kontakt med\n banken din.\n </AccordionItem>\n </Accordion>\n </>\n );\n /* -- EXAMPLE CODE END -- */\n};\n","import React from \"react\";\nimport { formatCode, InteractiveCode, useInteractiveCodeControls } from \"../../../../../../utils/interactive-code\";\n// @ts-ignore\nimport { knobs } from \"./AccordionExample\";\n// @ts-ignore\nimport AccordionExample from \"./AccordionExample?raw\";\n\nimport \"../styles/accordion.scss\";\n\nconst code = formatCode(AccordionExample);\n\nexport default function Example() {\n const controls = useInteractiveCodeControls(code, knobs);\n return (\n <div className={\"jkl\"}>\n <InteractiveCode\n title={\"Accordion\"}\n defaultCode={code}\n defaultShowEditor={true}\n noInline={true}\n controls={controls}\n />\n </div>\n );\n}\n","export default \"import React, { useId } from \\\"react\\\";\\nimport { Accordion, AccordionItem } from \\\"..\\\";\\nimport { UnorderedList, ListItem } from \\\"../../list\\\";\\n\\nexport const knobs = [];\\n\\nexport const AccordionExample = () => {\\n /* -- EXAMPLE CODE START -- */\\n const id = useId();\\n return (\\n <>\\n <h2\\n className=\\\"jkl-portal-heading-medium\\\"\\n id={id}\\n style={{ textAlign: \\\"center\\\", marginBottom: 24, width: \\\"100%\\\" }}\\n >\\n Noen spørsmål\\n </h2>\\n <Accordion aria-labelledby={id}>\\n <AccordionItem\\n title=\\\"Hvem kan kjøpe livsforsikring?\\\"\\n onClick={(e, isOpen) => {\\n isOpen\\n ? console.log(\\\"Opening first accordion item\\\")\\n : console.log(\\\"Closing first accordion item\\\");\\n }}\\n >\\n <UnorderedList>\\n <ListItem>Personer med et norsk fødselsnummer.</ListItem>\\n <ListItem>\\n Personer som har vært bosatt i Norge i minst de fem siste årene før avtalen inngås.\\n </ListItem>\\n <ListItem>Livsforsikring kan kjøpes på nett av personer mellom 18 og 79 år.</ListItem>\\n </UnorderedList>\\n Ønsker du en forsikringssum på mer enn 3 millioner trenger vi ekstra økonomiske opplysninger. Da må\\n du ta kontakt med banken din.\\n </AccordionItem>\\n <AccordionItem title=\\\"Hvem kan kjøpe kritisk sykdom?\\\">\\n Personer med et norsk fødselsnummer. Personer som har vært bosatt i Norge i minst de fem siste årene\\n før avtalen inngås. Kritisk sykdom kan kjøpes på nett av personer mellom 18 og 58 år. Ønsker du en\\n forsikringssum på mer enn 1,1 millioner trenger vi ekstra økonomiske opplysninger. Da må du ta\\n kontakt med banken din.\\n </AccordionItem>\\n <AccordionItem title=\\\"Hvem kan kjøpe uførepensjon?\\\">\\n Personer med et norsk fødselsnummer. Personer som har vært bosatt i Norge i minst de fem siste årene\\n før avtalen inngås. Uførepensjon kan kjøpes på nett av personer mellom 18 og 60 år. Ønsker du en\\n forsikringssum på mer enn 96 000 trenger vi ekstra økonomiske opplysninger. Da må du ta kontakt med\\n banken din.\\n </AccordionItem>\\n </Accordion>\\n </>\\n );\\n /* -- EXAMPLE CODE END -- */\\n};\\n\""],"names":["knobs","code","formatCode","controls","useInteractiveCodeControls","jsx","className","children","InteractiveCode","title","defaultCode","defaultShowEditor","noInline"],"mappings":"myDAIO,MAAMA,EAAQ,GCKfC,EAAOC,EAAAA,WCTE,wqFDWf,WACU,MAAAC,EAAWC,EAAAA,2BAA2BH,EAAMD,GAE9C,OAAAK,EAAAA,IAAC,MAAI,CAAAC,UAAW,MACZC,SAAAF,EAAAA,IAACG,EAAAA,gBAAA,CACGC,MAAO,YACPC,YAAaT,EACbU,mBAAmB,EACnBC,UAAU,EACVT,SAAAA,KAIhB"}
@@ -0,0 +1,2 @@
1
+ "use strict";const e=require("react/jsx-runtime"),r=require("react-dom/client");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 i=require("../../../utilities/tabListener.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("../../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 o=require("./Example.js");i.initTabListener(),r.createRoot(document.getElementById("root")).render(e.jsx(o,{}));
2
+ //# sourceMappingURL=main.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.js","sources":["../../../../../src/components/accordion/documentation/main.tsx"],"sourcesContent":["import React from \"react\";\nimport ReactDOM from \"react-dom/client\";\nimport { initTabListener } from \"../../..\";\nimport Example from \"./Example\";\n\ninitTabListener();\n\nReactDOM.createRoot(document.getElementById(\"root\")!).render(<Example />);\n"],"names":["initTabListener","ReactDOM","createRoot","document","getElementById","render","jsx","Example"],"mappings":"izIAKAA,EAAAA,kBAEAC,EAASC,WAAWC,SAASC,eAAe,SAAUC,OAAQC,EAAAA,IAAAC,EAAA,CAAA"}
@@ -0,0 +1,2 @@
1
+ "use strict";const e=require("node:path"),i=require("@vitejs/plugin-react-swc"),r=require("vite"),s=require("../../../../copy-jkl-fonts-BEH11kbT.cjs"),o=r.defineConfig({plugins:[i(),s.copyJklFonts(e.resolve(__dirname,"public","fonts"))]});module.exports=o;
2
+ //# sourceMappingURL=vite.dev.config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vite.dev.config.js","sources":["../../../../../src/components/accordion/documentation/vite.dev.config.ts"],"sourcesContent":["import { resolve } from \"path\";\nimport react from \"@vitejs/plugin-react-swc\";\nimport { defineConfig } from \"vite\";\nimport { copyJklFonts } from \"../../../../../../utils/vite\";\n\nexport default defineConfig({\n plugins: [react(), copyJklFonts(resolve(__dirname, \"public\", \"fonts\"))],\n});\n"],"names":["vite_dev_config","defineConfig","plugins","react","copyJklFonts","resolve","__dirname"],"mappings":"uJAKAA,EAAeC,eAAa,CACxBC,QAAS,CAACC,IAASC,EAAAA,aAAaC,UAAQC,UAAW,SAAU"}
@@ -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 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}=o.useFeedbackContext();r.useEffect((()=>{0!==k.number&&b.current&&b.current.focus()}),[k]),r.useEffect((()=>{C(x)}),[x,C]);const f=n.getQuestionFromType(a[k.number].type),v=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",children:[e.jsxs("p",{className:"jkl-feedback__step-counter",ref:b,children:["Steg ",k.number+1," av ",a.length]}),r.createElement(f,{...a[k.number],autoFocus:!0,key:k.number}),e.jsxs("div",{className:"jkl-spacing-xl--top","aria-live":"off",children:[e.jsx(v,{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})]})})};
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":"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,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"}
@@ -0,0 +1,2 @@
1
+ "use strict";const e=require("react/jsx-runtime"),n=require("../../../../formatCode-C0vvPbYm.cjs");require("react"),require("../Link.js"),require("../NavLink.js");const r=[],t=n.formatCode('import React, { FC } from "react";\nimport { Link } from "..";\n\nexport const knobs = [];\n\nexport const LinkExample = () => {\n /* -- EXAMPLE CODE START -- */\n return (\n <div>\n <Link href="#">Lenke</Link>\n </div>\n );\n /* -- EXAMPLE CODE END -- */\n};\n');module.exports=function(){const o=n.useInteractiveCodeControls(t,r);return e.jsx("div",{className:"jkl",children:e.jsx(n.InteractiveCode,{title:"Link",defaultCode:t,defaultShowEditor:!0,noInline:!0,controls:o})})};
2
+ //# sourceMappingURL=Example.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Example.js","sources":["../../../../../src/components/link/documentation/LinkExample.jsx","../../../../../src/components/link/documentation/Example.tsx","../../../../../src/components/link/documentation/LinkExample.jsx?raw"],"sourcesContent":["import React, { FC } from \"react\";\nimport { Link } from \"..\";\n\nexport const knobs = [];\n\nexport const LinkExample = () => {\n /* -- EXAMPLE CODE START -- */\n return (\n <div>\n <Link href=\"#\">Lenke</Link>\n </div>\n );\n /* -- EXAMPLE CODE END -- */\n};\n","import React from \"react\";\nimport { formatCode, InteractiveCode, useInteractiveCodeControls } from \"../../../../../../utils/interactive-code\";\n// @ts-ignore\nimport { knobs } from \"./LinkExample\";\n// @ts-ignore\nimport LinkExample from \"./LinkExample?raw\";\n\nimport \"../styles/link.scss\";\n\nconst code = formatCode(LinkExample);\n\nexport default function Example() {\n const controls = useInteractiveCodeControls(code, knobs);\n\n return (\n <div className={\"jkl\"}>\n <InteractiveCode\n title={\"Link\"}\n defaultCode={code}\n defaultShowEditor={true}\n noInline={true}\n controls={controls}\n />\n </div>\n );\n}\n","export default \"import React, { FC } from \\\"react\\\";\\nimport { Link } from \\\"..\\\";\\n\\nexport const knobs = [];\\n\\nexport const LinkExample = () => {\\n /* -- EXAMPLE CODE START -- */\\n return (\\n <div>\\n <Link href=\\\"#\\\">Lenke</Link>\\n </div>\\n );\\n /* -- EXAMPLE CODE END -- */\\n};\\n\""],"names":["knobs","code","formatCode","controls","useInteractiveCodeControls","jsx","className","children","InteractiveCode","title","defaultCode","defaultShowEditor","noInline"],"mappings":"mKAGO,MAAMA,EAAQ,GCMfC,EAAOC,EAAAA,WCTE,6TDWf,WACU,MAAAC,EAAWC,EAAAA,2BAA2BH,EAAMD,GAG9C,OAAAK,EAAAA,IAAC,MAAI,CAAAC,UAAW,MACZC,SAAAF,EAAAA,IAACG,EAAAA,gBAAA,CACGC,MAAO,OACPC,YAAaT,EACbU,mBAAmB,EACnBC,UAAU,EACVT,SAAAA,KAIhB"}
@@ -0,0 +1,2 @@
1
+ "use strict";const e=require("react/jsx-runtime"),r=require("react-dom/client");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 i=require("../../../utilities/tabListener.js");require("../../../../ExpandableTableRow-BQjBxKCX.cjs"),require("../../icon-button/IconButton.js"),require("../Link.js"),require("../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");const o=require("./Example.js");i.initTabListener(),r.createRoot(document.getElementById("root")).render(e.jsx(o,{}));
2
+ //# sourceMappingURL=main.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.js","sources":["../../../../../src/components/link/documentation/main.tsx"],"sourcesContent":["import React from \"react\";\nimport ReactDOM from \"react-dom/client\";\nimport { initTabListener } from \"../../..\";\nimport Example from \"./Example\";\n\ninitTabListener();\n\nReactDOM.createRoot(document.getElementById(\"root\")!).render(<Example />);\n"],"names":["initTabListener","ReactDOM","createRoot","document","getElementById","render","jsx","Example"],"mappings":"iyIAKAA,EAAAA,kBAEAC,EAASC,WAAWC,SAASC,eAAe,SAAUC,OAAQC,EAAAA,IAAAC,EAAA,CAAA"}
@@ -0,0 +1,2 @@
1
+ "use strict";const e=require("node:path"),i=require("@vitejs/plugin-react-swc"),r=require("vite"),s=require("../../../../copy-jkl-fonts-BEH11kbT.cjs"),o=r.defineConfig({plugins:[i(),s.copyJklFonts(e.resolve(__dirname,"public","fonts"))]});module.exports=o;
2
+ //# sourceMappingURL=vite.dev.config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vite.dev.config.js","sources":["../../../../../src/components/link/documentation/vite.dev.config.ts"],"sourcesContent":["import { resolve } from \"path\";\nimport react from \"@vitejs/plugin-react-swc\";\nimport { defineConfig } from \"vite\";\nimport { copyJklFonts } from \"../../../../../../utils/vite\";\n\nexport default defineConfig({\n plugins: [react(), copyJklFonts(resolve(__dirname, \"public\", \"fonts\"))],\n});\n"],"names":["vite_dev_config","defineConfig","plugins","react","copyJklFonts","resolve","__dirname"],"mappings":"uJAKAA,EAAeC,eAAa,CACxBC,QAAS,CAACC,IAASC,EAAAA,aAAaC,UAAQC,UAAW,SAAU"}
@@ -0,0 +1,2 @@
1
+ "use strict";const e=require("react/jsx-runtime"),n=require("../../../../formatCode-C0vvPbYm.cjs");require("react");const t=[{type:"choice",label:"Variant",choiceOptions:[{label:"Large",value:"large"},{label:"Medium",value:"medium"},{label:"Small",value:"small"}],defaultValue:0}],o=[],l=n.formatCode('import React, { FC } from "react";\nimport { Loader } from "..";\nimport "./styles.scss";\n\nexport const knobs = [\n {\n type: "choice",\n label: "Variant",\n choiceOptions: [\n { label: "Large", value: "large" },\n { label: "Medium", value: "medium" },\n { label: "Small", value: "small" },\n ],\n defaultValue: 0,\n },\n];\n\nexport const LoaderExample = () => {\n /* -- EXAMPLE CODE START -- */\n return (\n <div className="jkl-loader-example">\n <div>\n <Loader variant={choiceKnob("Variant")} textDescription="Laster innhold" />\n </div>\n </div>\n );\n /* -- EXAMPLE CODE END -- */\n};\n'),a=n.formatCode('import React, { FC } from "react";\nimport {\n SkeletonAnimation,\n SkeletonButton,\n SkeletonCheckboxGroup,\n SkeletonElement,\n SkeletonInput,\n SkeletonRadioButtonGroup,\n SkeletonTable,\n SkeletonTableHeader,\n SkeletonTableRow,\n SkeletonTextArea,\n} from "..";\n\nexport const knobs = [];\n\nexport const SkeletonLoaderExample = () => {\n /* -- EXAMPLE CODE START -- */\n return (\n <SkeletonAnimation role="none presentation">\n <div style={{ display: "flex", flexDirection: "column", gap: 40 }}>\n <SkeletonElement width={350} height={32} />\n <SkeletonInput />\n <SkeletonTextArea />\n <SkeletonCheckboxGroup checkboxes={3} />\n <SkeletonRadioButtonGroup radioButtons={3} />\n <SkeletonButton width={225} />\n <SkeletonTable>\n <SkeletonTableHeader>\n <div style={{ width: 215 }}>\n <SkeletonElement width={115} height={16} />\n </div>\n <div style={{ width: 115 }}>\n <SkeletonElement width={115} height={16} />\n </div>\n </SkeletonTableHeader>\n {Array.from(Array(5)).map((_, index) => (\n <SkeletonTableRow key={index}>\n <div style={{ width: 215 }}>\n <SkeletonElement width={index % 2 ? 115 : 185} height={19} />\n </div>\n <div style={{ width: 115 }}>\n <SkeletonElement width={24} height={24} shape="circle" />\n </div>\n </SkeletonTableRow>\n ))}\n </SkeletonTable>\n </div>\n </SkeletonAnimation>\n );\n /* -- EXAMPLE CODE END -- */\n};\n');module.exports=function(){const i=n.useInteractiveCodeControls(l,t),r=n.useInteractiveCodeControls(a,o);return e.jsxs("div",{className:"jkl",children:[e.jsx(n.InteractiveCode,{title:"Loader",defaultCode:l,defaultShowEditor:!0,noInline:!0,controls:i}),e.jsx(n.InteractiveCode,{title:"SkeletonLoader",defaultCode:a,defaultShowEditor:!0,noInline:!0,controls:r})]})};
2
+ //# sourceMappingURL=Example.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Example.js","sources":["../../../../../src/components/loader/documentation/LoaderExample.jsx","../../../../../src/components/loader/documentation/SkeletonLoaderExample.jsx","../../../../../src/components/loader/documentation/Example.tsx","../../../../../src/components/loader/documentation/LoaderExample.jsx?raw","../../../../../src/components/loader/documentation/SkeletonLoaderExample.jsx?raw"],"sourcesContent":["import React, { FC } from \"react\";\nimport { Loader } from \"..\";\nimport \"./styles.scss\";\n\nexport const knobs = [\n {\n type: \"choice\",\n label: \"Variant\",\n choiceOptions: [\n { label: \"Large\", value: \"large\" },\n { label: \"Medium\", value: \"medium\" },\n { label: \"Small\", value: \"small\" },\n ],\n defaultValue: 0,\n },\n];\n\nexport const LoaderExample = () => {\n /* -- EXAMPLE CODE START -- */\n return (\n <div className=\"jkl-loader-example\">\n <div>\n <Loader variant={choiceKnob(\"Variant\")} textDescription=\"Laster innhold\" />\n </div>\n </div>\n );\n /* -- EXAMPLE CODE END -- */\n};\n","import React, { FC } from \"react\";\nimport {\n SkeletonAnimation,\n SkeletonButton,\n SkeletonCheckboxGroup,\n SkeletonElement,\n SkeletonInput,\n SkeletonRadioButtonGroup,\n SkeletonTable,\n SkeletonTableHeader,\n SkeletonTableRow,\n SkeletonTextArea,\n} from \"..\";\n\nexport const knobs = [];\n\nexport const SkeletonLoaderExample = () => {\n /* -- EXAMPLE CODE START -- */\n return (\n <SkeletonAnimation role=\"none presentation\">\n <div style={{ display: \"flex\", flexDirection: \"column\", gap: 40 }}>\n <SkeletonElement width={350} height={32} />\n <SkeletonInput />\n <SkeletonTextArea />\n <SkeletonCheckboxGroup checkboxes={3} />\n <SkeletonRadioButtonGroup radioButtons={3} />\n <SkeletonButton width={225} />\n <SkeletonTable>\n <SkeletonTableHeader>\n <div style={{ width: 215 }}>\n <SkeletonElement width={115} height={16} />\n </div>\n <div style={{ width: 115 }}>\n <SkeletonElement width={115} height={16} />\n </div>\n </SkeletonTableHeader>\n {Array.from(Array(5)).map((_, index) => (\n <SkeletonTableRow key={index}>\n <div style={{ width: 215 }}>\n <SkeletonElement width={index % 2 ? 115 : 185} height={19} />\n </div>\n <div style={{ width: 115 }}>\n <SkeletonElement width={24} height={24} shape=\"circle\" />\n </div>\n </SkeletonTableRow>\n ))}\n </SkeletonTable>\n </div>\n </SkeletonAnimation>\n );\n /* -- EXAMPLE CODE END -- */\n};\n","import React from \"react\";\nimport { formatCode, InteractiveCode, useInteractiveCodeControls } from \"../../../../../../utils/interactive-code\";\n// @ts-ignore\nimport { knobs as loaderKnobs } from \"./LoaderExample\";\n// @ts-ignore\nimport LoaderExample from \"./LoaderExample?raw\";\n// @ts-ignore\nimport { knobs as skeletonKnobs } from \"./SkeletonLoaderExample\";\n// @ts-ignore\nimport SkeletonLoaderExample from \"./SkeletonLoaderExample?raw\";\n\nimport \"../styles/loader.scss\";\nimport \"../styles/skeleton-loader.scss\";\n\nconst loaderCode = formatCode(LoaderExample);\nconst skeletonLoaderCode = formatCode(SkeletonLoaderExample);\n\nexport default function Example() {\n const loaderControls = useInteractiveCodeControls(loaderCode, loaderKnobs);\n const skeletonControls = useInteractiveCodeControls(skeletonLoaderCode, skeletonKnobs);\n\n return (\n <div className={\"jkl\"}>\n <InteractiveCode\n title={\"Loader\"}\n defaultCode={loaderCode}\n defaultShowEditor={true}\n noInline={true}\n controls={loaderControls}\n />\n <InteractiveCode\n title={\"SkeletonLoader\"}\n defaultCode={skeletonLoaderCode}\n defaultShowEditor={true}\n noInline={true}\n controls={skeletonControls}\n />\n </div>\n );\n}\n","export default \"import React, { FC } from \\\"react\\\";\\nimport { Loader } from \\\"..\\\";\\nimport \\\"./styles.scss\\\";\\n\\nexport const knobs = [\\n {\\n type: \\\"choice\\\",\\n label: \\\"Variant\\\",\\n choiceOptions: [\\n { label: \\\"Large\\\", value: \\\"large\\\" },\\n { label: \\\"Medium\\\", value: \\\"medium\\\" },\\n { label: \\\"Small\\\", value: \\\"small\\\" },\\n ],\\n defaultValue: 0,\\n },\\n];\\n\\nexport const LoaderExample = () => {\\n /* -- EXAMPLE CODE START -- */\\n return (\\n <div className=\\\"jkl-loader-example\\\">\\n <div>\\n <Loader variant={choiceKnob(\\\"Variant\\\")} textDescription=\\\"Laster innhold\\\" />\\n </div>\\n </div>\\n );\\n /* -- EXAMPLE CODE END -- */\\n};\\n\"","export default \"import React, { FC } from \\\"react\\\";\\nimport {\\n SkeletonAnimation,\\n SkeletonButton,\\n SkeletonCheckboxGroup,\\n SkeletonElement,\\n SkeletonInput,\\n SkeletonRadioButtonGroup,\\n SkeletonTable,\\n SkeletonTableHeader,\\n SkeletonTableRow,\\n SkeletonTextArea,\\n} from \\\"..\\\";\\n\\nexport const knobs = [];\\n\\nexport const SkeletonLoaderExample = () => {\\n /* -- EXAMPLE CODE START -- */\\n return (\\n <SkeletonAnimation role=\\\"none presentation\\\">\\n <div style={{ display: \\\"flex\\\", flexDirection: \\\"column\\\", gap: 40 }}>\\n <SkeletonElement width={350} height={32} />\\n <SkeletonInput />\\n <SkeletonTextArea />\\n <SkeletonCheckboxGroup checkboxes={3} />\\n <SkeletonRadioButtonGroup radioButtons={3} />\\n <SkeletonButton width={225} />\\n <SkeletonTable>\\n <SkeletonTableHeader>\\n <div style={{ width: 215 }}>\\n <SkeletonElement width={115} height={16} />\\n </div>\\n <div style={{ width: 115 }}>\\n <SkeletonElement width={115} height={16} />\\n </div>\\n </SkeletonTableHeader>\\n {Array.from(Array(5)).map((_, index) => (\\n <SkeletonTableRow key={index}>\\n <div style={{ width: 215 }}>\\n <SkeletonElement width={index % 2 ? 115 : 185} height={19} />\\n </div>\\n <div style={{ width: 115 }}>\\n <SkeletonElement width={24} height={24} shape=\\\"circle\\\" />\\n </div>\\n </SkeletonTableRow>\\n ))}\\n </SkeletonTable>\\n </div>\\n </SkeletonAnimation>\\n );\\n /* -- EXAMPLE CODE END -- */\\n};\\n\""],"names":["knobs","type","label","choiceOptions","value","defaultValue","loaderCode","formatCode","skeletonLoaderCode","loaderControls","useInteractiveCodeControls","loaderKnobs","skeletonControls","skeletonKnobs","jsxs","className","children","jsx","InteractiveCode","title","defaultCode","defaultShowEditor","noInline","controls"],"mappings":"oHAIO,MAAMA,EAAQ,CACjB,CACIC,KAAM,SACNC,MAAO,UACPC,cAAe,CACX,CAAED,MAAO,QAASE,MAAO,SACzB,CAAEF,MAAO,SAAUE,MAAO,UAC1B,CAAEF,MAAO,QAASE,MAAO,UAE7BC,aAAc,ICCTL,EAAQ,GCAfM,EAAaC,EAAAA,WCdJ,+tBDeTC,EAAqBD,EAAAA,WEfZ,49DFiBf,WACU,MAAAE,EAAiBC,EAAAA,2BAA2BJ,EAAYK,GACxDC,EAAmBF,EAAAA,2BAA2BF,EAAoBK,GAGpE,OAAAC,EAAAA,KAAC,MAAI,CAAAC,UAAW,MACZC,SAAA,CAAAC,EAAAA,IAACC,EAAAA,gBAAA,CACGC,MAAO,SACPC,YAAad,EACbe,mBAAmB,EACnBC,UAAU,EACVC,SAAUd,IAEdQ,EAAAA,IAACC,EAAAA,gBAAA,CACGC,MAAO,iBACPC,YAAaZ,EACba,mBAAmB,EACnBC,UAAU,EACVC,SAAUX,MAI1B"}
@@ -0,0 +1,2 @@
1
+ "use strict";const e=require("react/jsx-runtime"),r=require("react-dom/client");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 i=require("../../../utilities/tabListener.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("../../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 o=require("./Example.js");i.initTabListener(),r.createRoot(document.getElementById("root")).render(e.jsx(o,{}));
2
+ //# sourceMappingURL=main.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.js","sources":["../../../../../src/components/loader/documentation/main.tsx"],"sourcesContent":["import React from \"react\";\nimport ReactDOM from \"react-dom/client\";\nimport { initTabListener } from \"../../..\";\nimport Example from \"./Example\";\n\ninitTabListener();\n\nReactDOM.createRoot(document.getElementById(\"root\")!).render(<Example />);\n"],"names":["initTabListener","ReactDOM","createRoot","document","getElementById","render","jsx","Example"],"mappings":"izIAKAA,EAAAA,kBAEAC,EAASC,WAAWC,SAASC,eAAe,SAAUC,OAAQC,EAAAA,IAAAC,EAAA,CAAA"}
@@ -0,0 +1,2 @@
1
+ "use strict";const e=require("node:path"),i=require("@vitejs/plugin-react-swc"),r=require("vite"),s=require("../../../../copy-jkl-fonts-BEH11kbT.cjs"),o=r.defineConfig({plugins:[i(),s.copyJklFonts(e.resolve(__dirname,"public","fonts"))]});module.exports=o;
2
+ //# sourceMappingURL=vite.dev.config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vite.dev.config.js","sources":["../../../../../src/components/loader/documentation/vite.dev.config.ts"],"sourcesContent":["import { resolve } from \"path\";\nimport react from \"@vitejs/plugin-react-swc\";\nimport { defineConfig } from \"vite\";\nimport { copyJklFonts } from \"../../../../../../utils/vite\";\n\nexport default defineConfig({\n plugins: [react(), copyJklFonts(resolve(__dirname, \"public\", \"fonts\"))],\n});\n"],"names":["vite_dev_config","defineConfig","plugins","react","copyJklFonts","resolve","__dirname"],"mappings":"uJAKAA,EAAeC,eAAa,CACxBC,QAAS,CAACC,IAASC,EAAAA,aAAaC,UAAQC,UAAW,SAAU"}
@@ -0,0 +1,2 @@
1
+ "use strict";const e=require("node:fs"),o=require("node:path");exports.copyJklFonts=function(n){return{name:"copy-jkl-fonts",buildStart(){e.cpSync(o.resolve(__dirname,"..","..","packages","webfonts","fonts"),n,{recursive:!0}),console.log(`Copied font files into "${n}"`)}}};
2
+ //# sourceMappingURL=copy-jkl-fonts-BEH11kbT.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copy-jkl-fonts-BEH11kbT.cjs","sources":["../../../utils/vite/copy-jkl-fonts.ts"],"sourcesContent":["import { cpSync } from \"fs\";\nimport { resolve } from \"path\";\n\nfunction copyJklFonts(destination: string) {\n return {\n name: \"copy-jkl-fonts\",\n buildStart() {\n cpSync(resolve(__dirname, \"..\", \"..\", \"packages\", \"webfonts\", \"fonts\"), destination, {\n recursive: true,\n });\n console.log(`Copied font files into \"${destination}\"`);\n },\n };\n}\n\nexport { copyJklFonts };\n"],"names":["destination","name","buildStart","cpSync","resolve","__dirname","recursive","console","log"],"mappings":"oFAGA,SAAsBA,GACX,MAAA,CACHC,KAAM,iBACNC,aACWC,SAAAC,EAAAA,QAAQC,UAAW,KAAM,KAAM,WAAY,WAAY,SAAUL,EAAa,CACjFM,WAAW,IAEPC,QAAAC,IAAI,2BAA2BR,KAC3C,EAER"}
@@ -0,0 +1,2 @@
1
+ import{cpSync as o}from"node:fs";import{resolve as e}from"node:path";function n(n){return{name:"copy-jkl-fonts",buildStart(){o(e(__dirname,"..","..","packages","webfonts","fonts"),n,{recursive:!0}),console.log(`Copied font files into "${n}"`)}}}export{n as c};
2
+ //# sourceMappingURL=copy-jkl-fonts-Yd-mZnP9.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copy-jkl-fonts-Yd-mZnP9.js","sources":["../../../utils/vite/copy-jkl-fonts.ts"],"sourcesContent":["import { cpSync } from \"fs\";\nimport { resolve } from \"path\";\n\nfunction copyJklFonts(destination: string) {\n return {\n name: \"copy-jkl-fonts\",\n buildStart() {\n cpSync(resolve(__dirname, \"..\", \"..\", \"packages\", \"webfonts\", \"fonts\"), destination, {\n recursive: true,\n });\n console.log(`Copied font files into \"${destination}\"`);\n },\n };\n}\n\nexport { copyJklFonts };\n"],"names":["copyJklFonts","destination","name","buildStart","cpSync","resolve","__dirname","recursive","console","log"],"mappings":"qEAGA,SAASA,EAAaC,GACX,MAAA,CACHC,KAAM,iBACNC,aACWC,EAAAC,EAAQC,UAAW,KAAM,KAAM,WAAY,WAAY,SAAUL,EAAa,CACjFM,WAAW,IAEPC,QAAAC,IAAI,2BAA2BR,KAC3C,EAER"}