@fremtind/jokul 0.27.0 → 0.27.2
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.
- package/build/build-stats.html +1 -1
- package/build/cjs/components/ScreenReaderOnly.cjs.map +1 -1
- package/build/cjs/components/accordion/Accordion.cjs.map +1 -1
- package/build/cjs/components/accordion/AccordionItem.cjs.map +1 -1
- package/build/cjs/components/breadcrumb/Breadcrumb.cjs.map +1 -1
- package/build/cjs/components/breadcrumb/BreadcrumbItem.cjs.map +1 -1
- package/build/cjs/components/button/Button.cjs.map +1 -1
- package/build/cjs/components/button/index.d.cts +1 -1
- package/build/cjs/components/button/types.cjs.map +1 -1
- package/build/cjs/components/card/Card.cjs.map +1 -1
- package/build/cjs/components/card/CardImage.cjs.map +1 -1
- package/build/cjs/components/card/InfoCard.cjs.map +1 -1
- package/build/cjs/components/card/NavCard.cjs.map +1 -1
- package/build/cjs/components/card/TaskCard.cjs.map +1 -1
- package/build/cjs/components/card/documentation/examples/FakturainfoExample.d.cts +1 -1
- package/build/cjs/components/card/documentation/examples/StatuskortExample.d.cts +1 -1
- package/build/cjs/components/card/types.cjs.map +1 -1
- package/build/cjs/components/card/utils.cjs.map +1 -1
- package/build/cjs/components/checkbox/Checkbox.cjs.map +1 -1
- package/build/cjs/components/combobox/Combobox.cjs.map +1 -1
- package/build/cjs/components/combobox/index.d.cts +1 -1
- package/build/cjs/components/cookie-consent/CookieConsent.cjs.map +1 -1
- package/build/cjs/components/cookie-consent/CookieConsentContext.cjs.map +1 -1
- package/build/cjs/components/cookie-consent/CookieConsentModal.cjs.map +1 -1
- package/build/cjs/components/cookie-consent/consents/CustomConsents.cjs.map +1 -1
- package/build/cjs/components/cookie-consent/consents/DefaultConsents.cjs.map +1 -1
- package/build/cjs/components/cookie-consent/consents/RequirementCheckbox.cjs.map +1 -1
- package/build/cjs/components/cookie-consent/consents/RequirementCheckbox.d.cts +1 -1
- package/build/cjs/components/cookie-consent/cookieConsentUtils.cjs.map +1 -1
- package/build/cjs/components/cookie-consent/cookieConsentUtils.d.cts +1 -1
- package/build/cjs/components/cookie-consent/index.d.cts +1 -1
- package/build/cjs/components/datepicker/DatePicker.cjs.map +1 -1
- package/build/cjs/components/datepicker/internal/Calendar.cjs.map +1 -1
- package/build/cjs/components/datepicker/internal/calendarReducer.cjs.map +1 -1
- package/build/cjs/components/datepicker/internal/useCalendar.cjs.map +1 -1
- package/build/cjs/components/datepicker/internal/utils.cjs.map +1 -1
- package/build/cjs/components/datepicker/internal/utils.d.cts +2 -2
- package/build/cjs/components/datepicker/utils.cjs.map +1 -1
- package/build/cjs/components/description-list/DescriptionList.cjs.map +1 -1
- package/build/cjs/components/expander/ExpandSection.cjs.map +1 -1
- package/build/cjs/components/expander/Expander.cjs.map +1 -1
- package/build/cjs/components/feedback/Feedback.cjs.map +1 -1
- package/build/cjs/components/feedback/FeedbackSuccess.cjs.map +1 -1
- package/build/cjs/components/feedback/FeedbackValues.cjs.map +1 -1
- package/build/cjs/components/feedback/feedbackContext.cjs.map +1 -1
- package/build/cjs/components/feedback/followup/Followup.cjs.map +1 -1
- package/build/cjs/components/feedback/followup/followupContext.cjs.map +1 -1
- package/build/cjs/components/feedback/followup/useFollowup.cjs.map +1 -1
- package/build/cjs/components/feedback/main-question/MainQuestion.cjs.map +1 -1
- package/build/cjs/components/feedback/main-question/mainQuestionContext.cjs.map +1 -1
- package/build/cjs/components/feedback/main-question/useMainQuestion.cjs.map +1 -1
- package/build/cjs/components/feedback/presets.cjs.map +1 -1
- package/build/cjs/components/feedback/questions/AddonQuestion.cjs.map +1 -1
- package/build/cjs/components/feedback/questions/CheckboxQuestion.cjs.map +1 -1
- package/build/cjs/components/feedback/questions/ContactQuestion.cjs.map +1 -1
- package/build/cjs/components/feedback/questions/RadioQuestion.cjs.map +1 -1
- package/build/cjs/components/feedback/questions/SmileyQuestion.cjs.map +1 -1
- package/build/cjs/components/feedback/questions/TextQuestion.cjs.map +1 -1
- package/build/cjs/components/feedback/questions/smileyUtils.cjs.map +1 -1
- package/build/cjs/components/feedback/utils.cjs.map +1 -1
- package/build/cjs/components/flex/Flex.cjs.map +1 -1
- package/build/cjs/components/icon/Icon.cjs.map +1 -1
- package/build/cjs/components/icon/icons/ArrowDownIcon.cjs.map +1 -1
- package/build/cjs/components/icon/icons/ArrowLeftIcon.cjs.map +1 -1
- package/build/cjs/components/icon/icons/ArrowNorthEastIcon.cjs.map +1 -1
- package/build/cjs/components/icon/icons/ArrowRightIcon.cjs.map +1 -1
- package/build/cjs/components/icon/icons/ArrowUpIcon.cjs.map +1 -1
- package/build/cjs/components/icon/icons/CalendarIcon.cjs.map +1 -1
- package/build/cjs/components/icon/icons/CheckIcon.cjs.map +1 -1
- package/build/cjs/components/icon/icons/ChevronDownIcon.cjs.map +1 -1
- package/build/cjs/components/icon/icons/ChevronLeftIcon.cjs.map +1 -1
- package/build/cjs/components/icon/icons/ChevronRightIcon.cjs.map +1 -1
- package/build/cjs/components/icon/icons/ChevronUpIcon.cjs.map +1 -1
- package/build/cjs/components/icon/icons/CloseIcon.cjs.map +1 -1
- package/build/cjs/components/icon/icons/CopyIcon.cjs.map +1 -1
- package/build/cjs/components/icon/icons/DotsIcon.cjs.map +1 -1
- package/build/cjs/components/icon/icons/DragIcon.cjs.map +1 -1
- package/build/cjs/components/icon/icons/GreenCheckIcon.cjs.map +1 -1
- package/build/cjs/components/icon/icons/HamburgerIcon.cjs.map +1 -1
- package/build/cjs/components/icon/icons/LinkIcon.cjs.map +1 -1
- package/build/cjs/components/icon/icons/MinusIcon.cjs.map +1 -1
- package/build/cjs/components/icon/icons/PenIcon.cjs.map +1 -1
- package/build/cjs/components/icon/icons/PlusIcon.cjs.map +1 -1
- package/build/cjs/components/icon/icons/QuestionIcon.cjs.map +1 -1
- package/build/cjs/components/icon/icons/RedCrossIcon.cjs.map +1 -1
- package/build/cjs/components/icon/icons/SearchIcon.cjs.map +1 -1
- package/build/cjs/components/icon/icons/ThumbDownIcon.cjs.map +1 -1
- package/build/cjs/components/icon/icons/ThumbUpIcon.cjs.map +1 -1
- package/build/cjs/components/icon/icons/TrashCanIcon.cjs.map +1 -1
- package/build/cjs/components/icon/icons/animated/ArrowHorizontalAnimated.cjs.map +1 -1
- package/build/cjs/components/icon/icons/animated/ArrowVerticalAnimated.cjs.map +1 -1
- package/build/cjs/components/icon/icons/animated/PlusRemoveAnimated.cjs.map +1 -1
- package/build/cjs/components/icon-button/IconButton.cjs.map +1 -1
- package/build/cjs/components/image/Image.cjs.map +1 -1
- package/build/cjs/components/image/useImageLoadingStatus.cjs.map +1 -1
- package/build/cjs/components/index.d.cts +1 -1
- package/build/cjs/components/input-group/FieldGroup.cjs.map +1 -1
- package/build/cjs/components/input-group/InputGroup.cjs.map +1 -1
- package/build/cjs/components/input-group/Label.cjs.map +1 -1
- package/build/cjs/components/input-group/SupportLabel.cjs.map +1 -1
- package/build/cjs/components/input-group/index.d.cts +2 -2
- package/build/cjs/components/link/Link.cjs.map +1 -1
- package/build/cjs/components/link/NavLink.cjs.map +1 -1
- package/build/cjs/components/link-list/LinkList.cjs.map +1 -1
- package/build/cjs/components/loader/index.d.cts +2 -2
- package/build/cjs/components/loader/skeletons/SkeletonAnimation.cjs.map +1 -1
- package/build/cjs/components/loader/skeletons/SkeletonButton.cjs.map +1 -1
- package/build/cjs/components/loader/skeletons/SkeletonCheckboxGroup.cjs.map +1 -1
- package/build/cjs/components/loader/skeletons/SkeletonElement.cjs.map +1 -1
- package/build/cjs/components/loader/skeletons/SkeletonInput.cjs.map +1 -1
- package/build/cjs/components/loader/skeletons/SkeletonLabel.cjs.map +1 -1
- package/build/cjs/components/loader/skeletons/SkeletonRadioButtonGroup.cjs.map +1 -1
- package/build/cjs/components/loader/skeletons/SkeletonTable.cjs.map +1 -1
- package/build/cjs/components/loader/skeletons/SkeletonTextArea.cjs.map +1 -1
- package/build/cjs/components/loader/useDelayedRender.cjs.map +1 -1
- package/build/cjs/components/logo/Logo.cjs.map +1 -1
- package/build/cjs/components/logo/LogoStamp.cjs.map +1 -1
- package/build/cjs/components/logo/useTextSpinner.cjs.map +1 -1
- package/build/cjs/components/menu/Menu.cjs.map +1 -1
- package/build/cjs/components/menu/MenuItem.cjs.map +1 -1
- package/build/cjs/components/menu/MenuItemCheckbox.cjs.map +1 -1
- package/build/cjs/components/menu/index.d.cts +1 -1
- package/build/cjs/components/message/DismissButton.cjs.map +1 -1
- package/build/cjs/components/message/FormErrorMessage.cjs.map +1 -1
- package/build/cjs/components/message/Message.cjs.map +1 -1
- package/build/cjs/components/message/index.d.cts +2 -2
- package/build/cjs/components/modal/Modal.cjs +1 -1
- package/build/cjs/components/modal/Modal.cjs.map +1 -1
- package/build/cjs/components/modal/index.d.cts +1 -1
- package/build/cjs/components/modal/useModal.cjs.map +1 -1
- package/build/cjs/components/pagination/Pagination.cjs.map +1 -1
- package/build/cjs/components/popover/Popover.cjs +1 -1
- package/build/cjs/components/popover/Popover.cjs.map +1 -1
- package/build/cjs/components/progress-bar/Countdown.cjs.map +1 -1
- package/build/cjs/components/radio-button/BaseRadioButton.cjs.map +1 -1
- package/build/cjs/components/radio-button/RadioButton.cjs.map +1 -1
- package/build/cjs/components/radio-button/RadioButtonGroup.cjs.map +1 -1
- package/build/cjs/components/radio-button/radioGroupContext.cjs.map +1 -1
- package/build/cjs/components/radio-panel/RadioPanel.cjs.map +1 -1
- package/build/cjs/components/select/NativeSelect.cjs.map +1 -1
- package/build/cjs/components/select/Select.cjs.map +1 -1
- package/build/cjs/components/select/select-utils.cjs.map +1 -1
- package/build/cjs/components/summary-table/SummaryTable.cjs.map +1 -1
- package/build/cjs/components/summary-table/SummaryTableRow.cjs.map +1 -1
- package/build/cjs/components/summary-table/mocks.cjs.map +1 -1
- package/build/cjs/components/system-message/SystemMessage.cjs.map +1 -1
- package/build/cjs/components/system-message/common/DismissButton.cjs.map +1 -1
- package/build/cjs/components/system-message/common/MessageIcon.cjs.map +1 -1
- package/build/cjs/components/system-message/index.d.cts +1 -1
- package/build/cjs/components/table/DataTable.cjs.map +1 -1
- package/build/cjs/components/table/ExpandableTableRow.cjs.map +1 -1
- package/build/cjs/components/table/ExpandableTableRowController.cjs.map +1 -1
- package/build/cjs/components/table/Table.cjs.map +1 -1
- package/build/cjs/components/table/TableBody.cjs.map +1 -1
- package/build/cjs/components/table/TableCaption.cjs.map +1 -1
- package/build/cjs/components/table/TableCell.cjs.map +1 -1
- package/build/cjs/components/table/TableColumn.cjs.map +1 -1
- package/build/cjs/components/table/TableColumnGroup.cjs.map +1 -1
- package/build/cjs/components/table/TableFooter.cjs.map +1 -1
- package/build/cjs/components/table/TableHead.cjs.map +1 -1
- package/build/cjs/components/table/TableHeader.cjs.map +1 -1
- package/build/cjs/components/table/TablePagination.cjs.map +1 -1
- package/build/cjs/components/table/TableRow.cjs.map +1 -1
- package/build/cjs/components/table/index.d.cts +1 -1
- package/build/cjs/components/table/tableContext.cjs.map +1 -1
- package/build/cjs/components/table/tableSectionContext.cjs.map +1 -1
- package/build/cjs/components/table/utils.cjs.map +1 -1
- package/build/cjs/components/tabs/NavTab.cjs.map +1 -1
- package/build/cjs/components/tabs/NavTabs.cjs.map +1 -1
- package/build/cjs/components/tabs/Tab.cjs.map +1 -1
- package/build/cjs/components/tabs/TabList.cjs.map +1 -1
- package/build/cjs/components/tabs/Tabs.cjs.map +1 -1
- package/build/cjs/components/tag/Tag.cjs.map +1 -1
- package/build/cjs/components/text-input/BaseTextArea.cjs.map +1 -1
- package/build/cjs/components/text-input/BaseTextInput.cjs.map +1 -1
- package/build/cjs/components/text-input/TextArea.cjs.map +1 -1
- package/build/cjs/components/text-input/TextInput.cjs.map +1 -1
- package/build/cjs/components/toast/Toast.cjs.map +1 -1
- package/build/cjs/components/toast/ToastRegion.cjs.map +1 -1
- package/build/cjs/components/toast/ToastRegion.d.cts +1 -1
- package/build/cjs/components/toast/toastContext.cjs.map +1 -1
- package/build/cjs/components/toggle-switch/ToggleSlider.cjs.map +1 -1
- package/build/cjs/components/toggle-switch/ToggleSwitch.cjs.map +1 -1
- package/build/cjs/components/toggle-switch/usePillStyles.cjs.map +1 -1
- package/build/cjs/components/tooltip/PopupTip.cjs.map +1 -1
- package/build/cjs/components/tooltip/Tooltip.cjs.map +1 -1
- package/build/cjs/components/tooltip/TooltipContent.cjs.map +1 -1
- package/build/cjs/components/tooltip/TooltipTrigger.cjs.map +1 -1
- package/build/cjs/components/tooltip/index.d.cts +1 -1
- package/build/cjs/hooks/index.d.cts +5 -5
- package/build/cjs/hooks/mediaQueryUtils.cjs.map +1 -1
- package/build/cjs/hooks/useAnimatedDetails/useAnimatedDetails.cjs.map +1 -1
- package/build/cjs/hooks/useAnimatedHeight/index.d.cts +1 -1
- package/build/cjs/hooks/useAnimatedHeight/useAnimatedHeight.cjs.map +1 -1
- package/build/cjs/hooks/useAnimatedHeight/useAnimatedHeightBetween.cjs.map +1 -1
- package/build/cjs/hooks/useAnimatedHeight/useAutoAnimateHeight.cjs.map +1 -1
- package/build/cjs/hooks/useAriaLiveRegion/index.d.cts +1 -1
- package/build/cjs/hooks/useAriaLiveRegion/useAriaLiveRegion.cjs.map +1 -1
- package/build/cjs/hooks/useBrowserPreferences/useBrowserPreferences.cjs.map +1 -1
- package/build/cjs/hooks/useClickOutside/useClickOutside.cjs.map +1 -1
- package/build/cjs/hooks/useElementDimensions/index.d.cts +1 -1
- package/build/cjs/hooks/useElementDimensions/useElementDimensions.cjs.map +1 -1
- package/build/cjs/hooks/useFocusOutside/useFocusOutside.cjs.map +1 -1
- package/build/cjs/hooks/useIntersectionObserver/useIntersectionObserver.cjs.map +1 -1
- package/build/cjs/hooks/useListNavigation/useListNavigation.cjs.map +1 -1
- package/build/cjs/hooks/useListNavigation/useListNavigation.d.cts +1 -1
- package/build/cjs/hooks/useLocalStorage/useLocalStorage.cjs.map +1 -1
- package/build/cjs/hooks/useMutationObserver/useMutationObserver.cjs.map +1 -1
- package/build/cjs/hooks/useProgressiveImg/index.d.cts +1 -1
- package/build/cjs/hooks/useProgressiveImg/useProgressiveImg.cjs.map +1 -1
- package/build/cjs/hooks/useProgressiveImg/useProgressiveImg.d.cts +1 -1
- package/build/cjs/hooks/useScreen/state.cjs.map +1 -1
- package/build/cjs/hooks/useScreen/useScreen.cjs.map +1 -1
- package/build/cjs/hooks/useScrollIntoView/index.d.cts +1 -1
- package/build/cjs/hooks/useSwipeGesture/useSwipeGesture.cjs.map +1 -1
- package/build/cjs/utilities/formatters/avstand/formatAvstand.cjs.map +1 -1
- package/build/cjs/utilities/formatters/bytes/formatBytes.cjs.map +1 -1
- package/build/cjs/utilities/formatters/date/formatDate.cjs.map +1 -1
- package/build/cjs/utilities/formatters/fodselsnummer/formatFodselsnummer.cjs.map +1 -1
- package/build/cjs/utilities/formatters/index.d.cts +5 -5
- package/build/cjs/utilities/formatters/kontonummer/formatKontonummer.cjs.map +1 -1
- package/build/cjs/utilities/formatters/kortnummer/formatKortnummer.cjs.map +1 -1
- package/build/cjs/utilities/formatters/organisasjonsnummer/formatOrganisasjonsnummer.cjs.map +1 -1
- package/build/cjs/utilities/formatters/telefonnummer/formatTelefonnummer.cjs.map +1 -1
- package/build/cjs/utilities/formatters/util/formatNumber.cjs.map +1 -1
- package/build/cjs/utilities/formatters/util/parseNumber.cjs.map +1 -1
- package/build/cjs/utilities/formatters/util/registerWithMask.cjs.map +1 -1
- package/build/cjs/utilities/formatters/valuta/formatValuta.cjs.map +1 -1
- package/build/cjs/utilities/getThemeAndDensity.cjs.map +1 -1
- package/build/cjs/utilities/polymorphism/SlotComponent.cjs.map +1 -1
- package/build/cjs/utilities/polymorphism/index.d.cts +1 -1
- package/build/cjs/utilities/polymorphism/mergeProps.cjs.map +1 -1
- package/build/cjs/utilities/polymorphism/mergeRefs.cjs.map +1 -1
- package/build/cjs/utilities/tabListener.cjs.map +1 -1
- package/build/cjs/utilities/validators/hasMinimumWords/hasMinimumWords.cjs.map +1 -1
- package/build/cjs/utilities/validators/hasNoIllegalCharacters/hasNoIllegalCharacters.cjs.map +1 -1
- package/build/cjs/utilities/validators/isValidChassisnummer/isValidChassisnummer.cjs.map +1 -1
- package/build/cjs/utilities/validators/isValidEpost/isValidEpost.cjs.map +1 -1
- package/build/cjs/utilities/validators/isValidFodselsnummer/isValidFodselsnummer.cjs.map +1 -1
- package/build/cjs/utilities/validators/isValidKortnummer/isValidKortnummer.cjs.map +1 -1
- package/build/cjs/utilities/validators/isValidName/isValidName.cjs.map +1 -1
- package/build/cjs/utilities/validators/isValidOrganisasjonsnummer/isValidOrganisasjonsnummer.cjs.map +1 -1
- package/build/cjs/utilities/validators/isValidTelefonnummer/isValidTelefonnummer.cjs.map +1 -1
- package/build/es/components/ScreenReaderOnly.js.map +1 -1
- package/build/es/components/accordion/Accordion.js.map +1 -1
- package/build/es/components/accordion/AccordionItem.js.map +1 -1
- package/build/es/components/breadcrumb/Breadcrumb.js.map +1 -1
- package/build/es/components/breadcrumb/BreadcrumbItem.js.map +1 -1
- package/build/es/components/button/Button.js.map +1 -1
- package/build/es/components/button/index.d.ts +1 -1
- package/build/es/components/button/types.js.map +1 -1
- package/build/es/components/card/Card.js.map +1 -1
- package/build/es/components/card/CardImage.js.map +1 -1
- package/build/es/components/card/InfoCard.js.map +1 -1
- package/build/es/components/card/NavCard.js.map +1 -1
- package/build/es/components/card/TaskCard.js.map +1 -1
- package/build/es/components/card/documentation/examples/FakturainfoExample.d.ts +1 -1
- package/build/es/components/card/documentation/examples/StatuskortExample.d.ts +1 -1
- package/build/es/components/card/types.js.map +1 -1
- package/build/es/components/card/utils.js.map +1 -1
- package/build/es/components/checkbox/Checkbox.js.map +1 -1
- package/build/es/components/combobox/Combobox.js.map +1 -1
- package/build/es/components/combobox/index.d.ts +1 -1
- package/build/es/components/cookie-consent/CookieConsent.js.map +1 -1
- package/build/es/components/cookie-consent/CookieConsentContext.js.map +1 -1
- package/build/es/components/cookie-consent/CookieConsentModal.js.map +1 -1
- package/build/es/components/cookie-consent/consents/CustomConsents.js.map +1 -1
- package/build/es/components/cookie-consent/consents/DefaultConsents.js.map +1 -1
- package/build/es/components/cookie-consent/consents/RequirementCheckbox.d.ts +1 -1
- package/build/es/components/cookie-consent/consents/RequirementCheckbox.js.map +1 -1
- package/build/es/components/cookie-consent/cookieConsentUtils.d.ts +1 -1
- package/build/es/components/cookie-consent/cookieConsentUtils.js.map +1 -1
- package/build/es/components/cookie-consent/index.d.ts +1 -1
- package/build/es/components/datepicker/DatePicker.js.map +1 -1
- package/build/es/components/datepicker/internal/Calendar.js.map +1 -1
- package/build/es/components/datepicker/internal/calendarReducer.js.map +1 -1
- package/build/es/components/datepicker/internal/useCalendar.js.map +1 -1
- package/build/es/components/datepicker/internal/utils.d.ts +2 -2
- package/build/es/components/datepicker/internal/utils.js.map +1 -1
- package/build/es/components/datepicker/utils.js.map +1 -1
- package/build/es/components/description-list/DescriptionList.js.map +1 -1
- package/build/es/components/expander/ExpandSection.js.map +1 -1
- package/build/es/components/expander/Expander.js.map +1 -1
- package/build/es/components/feedback/Feedback.js.map +1 -1
- package/build/es/components/feedback/FeedbackSuccess.js.map +1 -1
- package/build/es/components/feedback/FeedbackValues.js.map +1 -1
- package/build/es/components/feedback/feedbackContext.js.map +1 -1
- package/build/es/components/feedback/followup/Followup.js.map +1 -1
- package/build/es/components/feedback/followup/followupContext.js.map +1 -1
- package/build/es/components/feedback/followup/useFollowup.js.map +1 -1
- package/build/es/components/feedback/main-question/MainQuestion.js.map +1 -1
- package/build/es/components/feedback/main-question/mainQuestionContext.js.map +1 -1
- package/build/es/components/feedback/main-question/useMainQuestion.js.map +1 -1
- package/build/es/components/feedback/presets.js.map +1 -1
- package/build/es/components/feedback/questions/AddonQuestion.js.map +1 -1
- package/build/es/components/feedback/questions/CheckboxQuestion.js.map +1 -1
- package/build/es/components/feedback/questions/ContactQuestion.js.map +1 -1
- package/build/es/components/feedback/questions/RadioQuestion.js.map +1 -1
- package/build/es/components/feedback/questions/SmileyQuestion.js.map +1 -1
- package/build/es/components/feedback/questions/TextQuestion.js.map +1 -1
- package/build/es/components/feedback/questions/smileyUtils.js.map +1 -1
- package/build/es/components/feedback/utils.js.map +1 -1
- package/build/es/components/flex/Flex.js.map +1 -1
- package/build/es/components/icon/Icon.js.map +1 -1
- package/build/es/components/icon/icons/ArrowDownIcon.js.map +1 -1
- package/build/es/components/icon/icons/ArrowLeftIcon.js.map +1 -1
- package/build/es/components/icon/icons/ArrowNorthEastIcon.js.map +1 -1
- package/build/es/components/icon/icons/ArrowRightIcon.js.map +1 -1
- package/build/es/components/icon/icons/ArrowUpIcon.js.map +1 -1
- package/build/es/components/icon/icons/CalendarIcon.js.map +1 -1
- package/build/es/components/icon/icons/CheckIcon.js.map +1 -1
- package/build/es/components/icon/icons/ChevronDownIcon.js.map +1 -1
- package/build/es/components/icon/icons/ChevronLeftIcon.js.map +1 -1
- package/build/es/components/icon/icons/ChevronRightIcon.js.map +1 -1
- package/build/es/components/icon/icons/ChevronUpIcon.js.map +1 -1
- package/build/es/components/icon/icons/CloseIcon.js.map +1 -1
- package/build/es/components/icon/icons/CopyIcon.js.map +1 -1
- package/build/es/components/icon/icons/DotsIcon.js.map +1 -1
- package/build/es/components/icon/icons/DragIcon.js.map +1 -1
- package/build/es/components/icon/icons/GreenCheckIcon.js.map +1 -1
- package/build/es/components/icon/icons/HamburgerIcon.js.map +1 -1
- package/build/es/components/icon/icons/LinkIcon.js.map +1 -1
- package/build/es/components/icon/icons/MinusIcon.js.map +1 -1
- package/build/es/components/icon/icons/PenIcon.js.map +1 -1
- package/build/es/components/icon/icons/PlusIcon.js.map +1 -1
- package/build/es/components/icon/icons/QuestionIcon.js.map +1 -1
- package/build/es/components/icon/icons/RedCrossIcon.js.map +1 -1
- package/build/es/components/icon/icons/SearchIcon.js.map +1 -1
- package/build/es/components/icon/icons/ThumbDownIcon.js.map +1 -1
- package/build/es/components/icon/icons/ThumbUpIcon.js.map +1 -1
- package/build/es/components/icon/icons/TrashCanIcon.js.map +1 -1
- package/build/es/components/icon/icons/animated/ArrowHorizontalAnimated.js.map +1 -1
- package/build/es/components/icon/icons/animated/ArrowVerticalAnimated.js.map +1 -1
- package/build/es/components/icon/icons/animated/PlusRemoveAnimated.js.map +1 -1
- package/build/es/components/icon-button/IconButton.js.map +1 -1
- package/build/es/components/image/Image.js.map +1 -1
- package/build/es/components/image/useImageLoadingStatus.js.map +1 -1
- package/build/es/components/index.d.ts +1 -1
- package/build/es/components/input-group/FieldGroup.js.map +1 -1
- package/build/es/components/input-group/InputGroup.js.map +1 -1
- package/build/es/components/input-group/Label.js.map +1 -1
- package/build/es/components/input-group/SupportLabel.js.map +1 -1
- package/build/es/components/input-group/index.d.ts +2 -2
- package/build/es/components/link/Link.js.map +1 -1
- package/build/es/components/link/NavLink.js.map +1 -1
- package/build/es/components/link-list/LinkList.js.map +1 -1
- package/build/es/components/loader/index.d.ts +2 -2
- package/build/es/components/loader/skeletons/SkeletonAnimation.js.map +1 -1
- package/build/es/components/loader/skeletons/SkeletonButton.js.map +1 -1
- package/build/es/components/loader/skeletons/SkeletonCheckboxGroup.js.map +1 -1
- package/build/es/components/loader/skeletons/SkeletonElement.js.map +1 -1
- package/build/es/components/loader/skeletons/SkeletonInput.js.map +1 -1
- package/build/es/components/loader/skeletons/SkeletonLabel.js.map +1 -1
- package/build/es/components/loader/skeletons/SkeletonRadioButtonGroup.js.map +1 -1
- package/build/es/components/loader/skeletons/SkeletonTable.js.map +1 -1
- package/build/es/components/loader/skeletons/SkeletonTextArea.js.map +1 -1
- package/build/es/components/loader/useDelayedRender.js.map +1 -1
- package/build/es/components/logo/Logo.js.map +1 -1
- package/build/es/components/logo/LogoStamp.js.map +1 -1
- package/build/es/components/logo/useTextSpinner.js.map +1 -1
- package/build/es/components/menu/Menu.js.map +1 -1
- package/build/es/components/menu/MenuItem.js.map +1 -1
- package/build/es/components/menu/MenuItemCheckbox.js.map +1 -1
- package/build/es/components/menu/index.d.ts +1 -1
- package/build/es/components/message/DismissButton.js.map +1 -1
- package/build/es/components/message/FormErrorMessage.js.map +1 -1
- package/build/es/components/message/Message.js.map +1 -1
- package/build/es/components/message/index.d.ts +2 -2
- package/build/es/components/modal/Modal.js +1 -1
- package/build/es/components/modal/Modal.js.map +1 -1
- package/build/es/components/modal/index.d.ts +1 -1
- package/build/es/components/modal/useModal.js.map +1 -1
- package/build/es/components/pagination/Pagination.js.map +1 -1
- package/build/es/components/popover/Popover.js +1 -1
- package/build/es/components/popover/Popover.js.map +1 -1
- package/build/es/components/progress-bar/Countdown.js.map +1 -1
- package/build/es/components/radio-button/BaseRadioButton.js.map +1 -1
- package/build/es/components/radio-button/RadioButton.js.map +1 -1
- package/build/es/components/radio-button/RadioButtonGroup.js.map +1 -1
- package/build/es/components/radio-button/radioGroupContext.js.map +1 -1
- package/build/es/components/radio-panel/RadioPanel.js.map +1 -1
- package/build/es/components/select/NativeSelect.js.map +1 -1
- package/build/es/components/select/Select.js.map +1 -1
- package/build/es/components/select/select-utils.js.map +1 -1
- package/build/es/components/summary-table/SummaryTable.js.map +1 -1
- package/build/es/components/summary-table/SummaryTableRow.js.map +1 -1
- package/build/es/components/summary-table/mocks.js.map +1 -1
- package/build/es/components/system-message/SystemMessage.js.map +1 -1
- package/build/es/components/system-message/common/DismissButton.js.map +1 -1
- package/build/es/components/system-message/common/MessageIcon.js.map +1 -1
- package/build/es/components/system-message/index.d.ts +1 -1
- package/build/es/components/table/DataTable.js.map +1 -1
- package/build/es/components/table/ExpandableTableRow.js.map +1 -1
- package/build/es/components/table/ExpandableTableRowController.js.map +1 -1
- package/build/es/components/table/Table.js.map +1 -1
- package/build/es/components/table/TableBody.js.map +1 -1
- package/build/es/components/table/TableCaption.js.map +1 -1
- package/build/es/components/table/TableCell.js.map +1 -1
- package/build/es/components/table/TableColumn.js.map +1 -1
- package/build/es/components/table/TableColumnGroup.js.map +1 -1
- package/build/es/components/table/TableFooter.js.map +1 -1
- package/build/es/components/table/TableHead.js.map +1 -1
- package/build/es/components/table/TableHeader.js.map +1 -1
- package/build/es/components/table/TablePagination.js.map +1 -1
- package/build/es/components/table/TableRow.js.map +1 -1
- package/build/es/components/table/index.d.ts +1 -1
- package/build/es/components/table/tableContext.js.map +1 -1
- package/build/es/components/table/tableSectionContext.js.map +1 -1
- package/build/es/components/table/utils.js.map +1 -1
- package/build/es/components/tabs/NavTab.js.map +1 -1
- package/build/es/components/tabs/NavTabs.js.map +1 -1
- package/build/es/components/tabs/Tab.js.map +1 -1
- package/build/es/components/tabs/TabList.js.map +1 -1
- package/build/es/components/tabs/Tabs.js.map +1 -1
- package/build/es/components/tag/Tag.js.map +1 -1
- package/build/es/components/text-input/BaseTextArea.js.map +1 -1
- package/build/es/components/text-input/BaseTextInput.js.map +1 -1
- package/build/es/components/text-input/TextArea.js.map +1 -1
- package/build/es/components/text-input/TextInput.js.map +1 -1
- package/build/es/components/toast/Toast.js.map +1 -1
- package/build/es/components/toast/ToastRegion.d.ts +1 -1
- package/build/es/components/toast/ToastRegion.js.map +1 -1
- package/build/es/components/toast/toastContext.js.map +1 -1
- package/build/es/components/toggle-switch/ToggleSlider.js.map +1 -1
- package/build/es/components/toggle-switch/ToggleSwitch.js.map +1 -1
- package/build/es/components/toggle-switch/usePillStyles.js.map +1 -1
- package/build/es/components/tooltip/PopupTip.js.map +1 -1
- package/build/es/components/tooltip/Tooltip.js.map +1 -1
- package/build/es/components/tooltip/TooltipContent.js.map +1 -1
- package/build/es/components/tooltip/TooltipTrigger.js.map +1 -1
- package/build/es/components/tooltip/index.d.ts +1 -1
- package/build/es/hooks/index.d.ts +5 -5
- package/build/es/hooks/mediaQueryUtils.js.map +1 -1
- package/build/es/hooks/useAnimatedDetails/useAnimatedDetails.js.map +1 -1
- package/build/es/hooks/useAnimatedHeight/index.d.ts +1 -1
- package/build/es/hooks/useAnimatedHeight/useAnimatedHeight.js.map +1 -1
- package/build/es/hooks/useAnimatedHeight/useAnimatedHeightBetween.js.map +1 -1
- package/build/es/hooks/useAnimatedHeight/useAutoAnimateHeight.js.map +1 -1
- package/build/es/hooks/useAriaLiveRegion/index.d.ts +1 -1
- package/build/es/hooks/useAriaLiveRegion/useAriaLiveRegion.js.map +1 -1
- package/build/es/hooks/useBrowserPreferences/useBrowserPreferences.js.map +1 -1
- package/build/es/hooks/useClickOutside/useClickOutside.js.map +1 -1
- package/build/es/hooks/useElementDimensions/index.d.ts +1 -1
- package/build/es/hooks/useElementDimensions/useElementDimensions.js.map +1 -1
- package/build/es/hooks/useFocusOutside/useFocusOutside.js.map +1 -1
- package/build/es/hooks/useIntersectionObserver/useIntersectionObserver.js.map +1 -1
- package/build/es/hooks/useListNavigation/useListNavigation.d.ts +1 -1
- package/build/es/hooks/useListNavigation/useListNavigation.js.map +1 -1
- package/build/es/hooks/useLocalStorage/useLocalStorage.js.map +1 -1
- package/build/es/hooks/useMutationObserver/useMutationObserver.js.map +1 -1
- package/build/es/hooks/useProgressiveImg/index.d.ts +1 -1
- package/build/es/hooks/useProgressiveImg/useProgressiveImg.d.ts +1 -1
- package/build/es/hooks/useProgressiveImg/useProgressiveImg.js.map +1 -1
- package/build/es/hooks/useScreen/state.js.map +1 -1
- package/build/es/hooks/useScreen/useScreen.js.map +1 -1
- package/build/es/hooks/useScrollIntoView/index.d.ts +1 -1
- package/build/es/hooks/useSwipeGesture/useSwipeGesture.js.map +1 -1
- package/build/es/utilities/formatters/avstand/formatAvstand.js.map +1 -1
- package/build/es/utilities/formatters/bytes/formatBytes.js.map +1 -1
- package/build/es/utilities/formatters/date/formatDate.js.map +1 -1
- package/build/es/utilities/formatters/fodselsnummer/formatFodselsnummer.js.map +1 -1
- package/build/es/utilities/formatters/index.d.ts +5 -5
- package/build/es/utilities/formatters/kontonummer/formatKontonummer.js.map +1 -1
- package/build/es/utilities/formatters/kortnummer/formatKortnummer.js.map +1 -1
- package/build/es/utilities/formatters/organisasjonsnummer/formatOrganisasjonsnummer.js.map +1 -1
- package/build/es/utilities/formatters/telefonnummer/formatTelefonnummer.js.map +1 -1
- package/build/es/utilities/formatters/util/formatNumber.js.map +1 -1
- package/build/es/utilities/formatters/util/parseNumber.js.map +1 -1
- package/build/es/utilities/formatters/util/registerWithMask.js.map +1 -1
- package/build/es/utilities/formatters/valuta/formatValuta.js.map +1 -1
- package/build/es/utilities/getThemeAndDensity.js.map +1 -1
- package/build/es/utilities/polymorphism/SlotComponent.js.map +1 -1
- package/build/es/utilities/polymorphism/index.d.ts +1 -1
- package/build/es/utilities/polymorphism/mergeProps.js.map +1 -1
- package/build/es/utilities/polymorphism/mergeRefs.js.map +1 -1
- package/build/es/utilities/tabListener.js.map +1 -1
- package/build/es/utilities/validators/hasMinimumWords/hasMinimumWords.js.map +1 -1
- package/build/es/utilities/validators/hasNoIllegalCharacters/hasNoIllegalCharacters.js.map +1 -1
- package/build/es/utilities/validators/isValidChassisnummer/isValidChassisnummer.js.map +1 -1
- package/build/es/utilities/validators/isValidEpost/isValidEpost.js.map +1 -1
- package/build/es/utilities/validators/isValidFodselsnummer/isValidFodselsnummer.js.map +1 -1
- package/build/es/utilities/validators/isValidKortnummer/isValidKortnummer.js.map +1 -1
- package/build/es/utilities/validators/isValidName/isValidName.js.map +1 -1
- package/build/es/utilities/validators/isValidOrganisasjonsnummer/isValidOrganisasjonsnummer.js.map +1 -1
- package/build/es/utilities/validators/isValidTelefonnummer/isValidTelefonnummer.js.map +1 -1
- package/package.json +2 -2
- package/styles/components/button/button.css +2 -2
- package/styles/components/button/button.min.css +1 -1
- package/styles/components/checkbox/checkbox.css +4 -4
- package/styles/components/checkbox/checkbox.min.css +1 -1
- package/styles/components/feedback/feedback.css +2 -2
- package/styles/components/feedback/feedback.min.css +1 -1
- package/styles/components/input-group/input-group.css +2 -2
- package/styles/components/input-group/input-group.min.css +1 -1
- package/styles/components/loader/loader.css +6 -6
- package/styles/components/loader/loader.min.css +1 -1
- package/styles/components/loader/skeleton-loader.css +5 -5
- package/styles/components/loader/skeleton-loader.min.css +1 -1
- package/styles/components/message/message.css +2 -2
- package/styles/components/message/message.min.css +1 -1
- package/styles/components/progress-bar/progress-bar.css +2 -2
- package/styles/components/progress-bar/progress-bar.min.css +1 -1
- package/styles/components/radio-button/radio-button.css +2 -2
- package/styles/components/radio-button/radio-button.min.css +1 -1
- package/styles/components/radio-panel/radio-panel.css +6 -6
- package/styles/components/radio-panel/radio-panel.min.css +1 -1
- package/styles/components/system-message/system-message.css +2 -2
- package/styles/components/system-message/system-message.min.css +1 -1
- package/styles/components/toast/toast.css +4 -4
- package/styles/components/toast/toast.min.css +1 -1
- package/styles/styles.css +35 -35
- package/styles/styles.min.css +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContactQuestion.js","sources":["../../../../../src/components/feedback/questions/ContactQuestion.tsx"],"sourcesContent":["import React, {
|
|
1
|
+
{"version":3,"file":"ContactQuestion.js","sources":["../../../../../src/components/feedback/questions/ContactQuestion.tsx"],"sourcesContent":["import React, {\n ChangeEvent,\n FC,\n ReactNode,\n useEffect,\n useRef,\n useState,\n} from \"react\";\nimport {\n isValidEpost,\n isValidTelefonnummer,\n} from \"../../../utilities/validators/index.js\";\nimport { PrimaryButton, TertiaryButton } from \"../../button/Button.js\";\nimport { TextInput } from \"../../text-input/TextInput.js\";\nimport { useFeedbackContext } from \"../feedbackContext.js\";\nimport { FeedbackSuccess } from \"../FeedbackSuccess.js\";\n\nconst validateEmail = (email?: string) => {\n if (!email || email === \"\") {\n return \"Du må oppgi e-postadresse for at vi kan kontakte deg\";\n }\n if (!isValidEpost(email)) {\n return \"Skriv inn en gyldig e-postadresse\";\n }\n return;\n};\n\nconst validatePhone = (phone?: string) => {\n if (!phone || phone === \"\") {\n return \"Du må oppgi telefonnummer for at vi kan kontakte deg\";\n }\n if (!isValidTelefonnummer(phone)) {\n return \"Skriv inn et gyldig telefonnummer\";\n }\n return;\n};\n\nconst defaultSuccessMessage = {\n title: \"Takk for tiden din!\",\n children:\n \"Neste gang vi gjennomfører intervjuer og tester kan det hende vi tar kontakt med deg. Dine innspill hjelper oss med å gjøre nettsidene bedre for deg og alle andre som bruker dem.\",\n};\n\ninterface Props {\n /**\n * Lar deg tilpasse spørsmålsteksten.\n * @default \"Kan vi kontakte deg for flere innspill?\"\n * */\n label?: string;\n /**\n * Lar deg tilpasse teksten på knappen for innsending.\n * @default \"Sett meg på lista!\"\n * */\n sendButtonLabel?: string;\n /** Sett til true om du også vil spørre om brukjerens telefonnummer i tillegg til epost */\n withPhone?: boolean;\n /** Her kan du legge inn eventuelt annet innhold du vil ha med. Kommer mellom overskriften og feltene for utfylling */\n children?: ReactNode;\n onSubmit: (values: { email: string; phone?: string }) => void;\n /** Lar deg tilpasse meldingen som kommer når brukeren sender inn skjemaet. */\n successMessage?: {\n title: string;\n children: ReactNode;\n };\n}\n\nexport const ContactQuestion: FC<Props> = ({\n label = \"Kan vi kontakte deg for flere innspill?\",\n sendButtonLabel = \"Sett meg på lista!\",\n withPhone = false,\n onSubmit,\n successMessage = defaultSuccessMessage,\n children,\n}) => {\n const [email, setEmail] = useState(\"\");\n const [phone, setPhone] = useState(\"\");\n const [errors, setErrors] = useState<{ email?: string; phone?: string }>(\n {},\n );\n const emailRef = useRef<HTMLInputElement>(null);\n const phoneRef = useRef<HTMLInputElement>(null);\n const [shouldValidate, setShouldValidate] = useState(false);\n\n const [noThanks, setNoThanks] = useState(false);\n const { contactSubmitted, setContactSubmitted, landmarkLabel } =\n useFeedbackContext();\n\n const ChildrenWrapper = typeof children === \"string\" ? \"p\" : \"div\";\n\n const validate = (email: string, phone: string) => {\n const emailError = validateEmail(email);\n const phoneError = validatePhone(phone);\n setErrors({ email: emailError, phone: phoneError });\n return { emailError, phoneError };\n };\n\n useEffect(() => {\n if (shouldValidate) {\n const { emailError, phoneError } = validate(email, phone);\n\n if (!emailError && (!withPhone || !phoneError)) {\n setShouldValidate(false);\n }\n }\n }, [email, phone, shouldValidate, withPhone]);\n\n const handleChange =\n (consumer: (value: string) => void) =>\n (e: ChangeEvent<HTMLInputElement>) =>\n consumer(e.target.value);\n\n const handleSubmit: React.FormEventHandler = (e) => {\n e.preventDefault();\n\n const { emailError, phoneError } = validate(email, phone);\n if (emailError) {\n setShouldValidate(true);\n emailRef.current?.focus();\n return;\n }\n if (withPhone && phoneError) {\n setShouldValidate(true);\n phoneRef.current?.focus();\n return;\n }\n\n onSubmit({ email, phone: withPhone ? phone : undefined });\n setContactSubmitted(true);\n };\n\n if (noThanks) {\n return null;\n }\n\n if (contactSubmitted) {\n return <FeedbackSuccess {...successMessage} />;\n }\n\n return (\n <form\n className=\"jkl-spacing-xl--top\"\n onSubmit={handleSubmit}\n aria-label={landmarkLabel}\n >\n <p className=\"jkl-heading-4 jkl-spacing-xs--bottom\">{label}</p>\n {children && (\n <ChildrenWrapper className=\"jkl-body\">\n {children}\n </ChildrenWrapper>\n )}\n\n <TextInput\n ref={emailRef}\n className=\"jkl-spacing-l--top\"\n label=\"E-post\"\n labelProps={{ variant: \"small\" }}\n autoComplete=\"email\"\n name=\"email\"\n value={email}\n onChange={handleChange(setEmail)}\n errorLabel={errors.email}\n />\n {withPhone && (\n <TextInput\n ref={phoneRef}\n className=\"jkl-spacing-l--top\"\n label=\"Telefonnummer\"\n labelProps={{ variant: \"small\" }}\n autoComplete=\"tel\"\n name=\"phone\"\n value={phone}\n onChange={handleChange(setPhone)}\n errorLabel={errors.phone}\n />\n )}\n\n <div className=\"jkl-spacing-xl--top\">\n <PrimaryButton type=\"submit\" className=\"jkl-spacing-xl--right\">\n {sendButtonLabel}\n </PrimaryButton>\n <TertiaryButton onClick={() => setNoThanks(true)}>\n Nei takk\n </TertiaryButton>\n </div>\n </form>\n );\n};\n"],"names":["defaultSuccessMessage","title","children","ContactQuestion","label","sendButtonLabel","withPhone","onSubmit","successMessage","email","setEmail","useState","phone","setPhone","errors","setErrors","emailRef","useRef","phoneRef","shouldValidate","setShouldValidate","noThanks","setNoThanks","contactSubmitted","setContactSubmitted","landmarkLabel","useFeedbackContext","ChildrenWrapper","validate","emailError","isValidEpost","validateEmail","phoneError","isValidTelefonnummer","validatePhone","useEffect","handleChange","consumer","e","target","value","jsx","FeedbackSuccess","jsxs","className","preventDefault","_a","current","focus","_b","TextInput","ref","labelProps","variant","autoComplete","name","onChange","errorLabel","PrimaryButton","type","TertiaryButton","onClick"],"mappings":"kjBAiBA,MAoBMA,EAAwB,CAC1BC,MAAO,sBACPC,SACI,sLA0BKC,EAA6B,EACtCC,MAAAA,EAAQ,0CACRC,gBAAAA,EAAkB,qBAClBC,UAAAA,GAAY,EACZC,SAAAA,EACAC,eAAAA,EAAiBR,EACjBE,SAAAA,MAEA,MAAOO,EAAOC,GAAYC,EAAS,KAC5BC,EAAOC,GAAYF,EAAS,KAC5BG,EAAQC,GAAaJ,EACxB,CAAC,GAECK,EAAWC,EAAyB,MACpCC,EAAWD,EAAyB,OACnCE,EAAgBC,GAAqBT,GAAS,IAE9CU,EAAUC,GAAeX,GAAS,IACjCY,iBAAAA,EAAkBC,oBAAAA,EAAqBC,cAAAA,GAC3CC,IAEEC,EAAsC,iBAAbzB,EAAwB,IAAM,MAEvD0B,EAAW,CAACnB,EAAeG,KACvB,MAAAiB,EAzEQ,CAACpB,GACdA,GAAmB,KAAVA,EAGTqB,EAAarB,QAAd,EACO,oCAHA,uDAuEYsB,CAActB,GAC3BuB,EAhEQ,CAACpB,GACdA,GAAmB,KAAVA,EAGTqB,EAAqBrB,QAAtB,EACO,oCAHA,uDA8DYsB,CAActB,GACjC,OAAAG,EAAU,CAAEN,MAAOoB,EAAYjB,MAAOoB,IAC/B,CAAEH,WAAAA,EAAYG,WAAAA,IAGzBG,GAAU,KACN,GAAIhB,EAAgB,CACV,MAAEU,WAAAA,EAAYG,WAAAA,GAAeJ,EAASnB,EAAOG,IAE9CiB,KAAgBvB,IAAc0B,IAC/BZ,GAAkB,EAE1B,IACD,CAACX,EAAOG,EAAOO,EAAgBb,IAE5B,MAAA8B,EACDC,GACAC,GACGD,EAASC,EAAEC,OAAOC,OAqBtBnB,OAAAA,EACO,KAGPE,EACOkB,EAACC,EAAiB,IAAGlC,IAI5BmC,EAAC,OAAA,CACGC,UAAU,sBACVrC,SA9BsC+B,YAC1CA,EAAEO,iBAEI,MAAEhB,WAAAA,EAAYG,WAAAA,GAAeJ,EAASnB,EAAOG,GACnD,OAAIiB,GACAT,GAAkB,QAClB,OAAA0B,EAAA9B,EAAS+B,UAATD,EAAkBE,UAGlB1C,GAAa0B,GACbZ,GAAkB,QAClB,OAAA6B,EAAA/B,EAAS6B,UAATE,EAAkBD,WAItBzC,EAAS,CAAEE,MAAAA,EAAOG,MAAON,EAAYM,OAAQ,SAC7CY,GAAoB,GAAI,EAepB,aAAYC,EAEZvB,SAAA,CAACuC,EAAA,IAAA,CAAEG,UAAU,uCAAwC1C,SAAME,IAC1DF,GACGuC,EAACd,EAAgB,CAAAiB,UAAU,WACtB1C,SAAAA,IAITuC,EAACS,EAAA,CACGC,IAAKnC,EACL4B,UAAU,qBACVxC,MAAM,SACNgD,WAAY,CAAEC,QAAS,SACvBC,aAAa,QACbC,KAAK,QACLf,MAAO/B,EACP+C,SAAUpB,EAAa1B,GACvB+C,WAAY3C,EAAOL,QAEtBH,GACGmC,EAACS,EAAA,CACGC,IAAKjC,EACL0B,UAAU,qBACVxC,MAAM,gBACNgD,WAAY,CAAEC,QAAS,SACvBC,aAAa,MACbC,KAAK,QACLf,MAAO5B,EACP4C,SAAUpB,EAAavB,GACvB4C,WAAY3C,EAAOF,QAI3B+B,EAAC,MAAI,CAAAC,UAAU,sBACX1C,SAAA,CAAAuC,EAACiB,EAAc,CAAAC,KAAK,SAASf,UAAU,wBAClC1C,SACLG,MACCuD,EAAe,CAAAC,QAAS,IAAMvC,GAAY,GAAOpB,SAElD,kBACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioQuestion.js","sources":["../../../../../src/components/feedback/questions/RadioQuestion.tsx"],"sourcesContent":["import React, {
|
|
1
|
+
{"version":3,"file":"RadioQuestion.js","sources":["../../../../../src/components/feedback/questions/RadioQuestion.tsx"],"sourcesContent":["import React, {\n ChangeEventHandler,\n useEffect,\n useId,\n useMemo,\n useRef,\n} from \"react\";\nimport { RadioButton } from \"../../radio-button/RadioButton.js\";\nimport { RadioButtonGroup } from \"../../radio-button/RadioButtonGroup.js\";\nimport { useFollowUpContext } from \"../followup/followupContext.js\";\nimport { useMainQuestionContext } from \"../main-question/mainQuestionContext.js\";\nimport { QuestionProps } from \"../types.js\";\n\nexport const RadioQuestion: React.FC<QuestionProps> = ({\n label,\n name,\n options,\n helpLabel,\n autoFocus = false,\n}) => {\n const followupContext = useFollowUpContext();\n const feedbackContext = useMainQuestionContext();\n const context = followupContext || feedbackContext;\n const id = useId();\n\n const numOptions = options?.length || 0;\n\n const ref = useRef<HTMLInputElement>(null);\n useEffect(() => {\n if (autoFocus && ref.current) {\n ref.current.focus();\n }\n }, [autoFocus, ref]);\n\n const handleChange: ChangeEventHandler<HTMLInputElement> = (e) => {\n const option = options?.find(\n (option) => option.value.toString() === e.target.value,\n );\n context?.setCurrentValue(option);\n };\n\n const selectedValue = useMemo(\n () =>\n Array.isArray(context?.currentValue)\n ? context?.currentValue[0].value.toString()\n : context?.currentValue?.value.toString(),\n [context?.currentValue],\n );\n\n if (!context) {\n console.error(\n \"Questions must be used inside a Followup or Feedback context provider\",\n );\n return null;\n }\n\n return (\n <RadioButtonGroup\n legend={label}\n labelProps={{ variant: \"large\" }}\n name={`${id}-${name || label}`}\n inline={numOptions < 3}\n value={selectedValue || \"\"}\n onChange={handleChange}\n helpLabel={helpLabel}\n >\n {options?.map((option, i) => (\n <RadioButton\n ref={i === 0 ? ref : undefined}\n key={`${id}-${name || label}-${option.value}`}\n label={option.label}\n value={String(option.value)}\n />\n ))}\n </RadioButtonGroup>\n );\n};\n"],"names":["RadioQuestion","label","name","options","helpLabel","autoFocus","followupContext","useFollowUpContext","feedbackContext","useMainQuestionContext","context","id","useId","numOptions","length","ref","useRef","useEffect","current","focus","handleChange","selectedValue","useMemo","Array","isArray","currentValue","value","toString","_a","jsx","RadioButtonGroup","legend","labelProps","variant","inline","onChange","e","option","find","target","setCurrentValue","children","map","i","RadioButton","String","console","error"],"mappings":"6YAaO,MAAMA,EAAyC,EAClDC,MAAAA,EACAC,KAAAA,EACAC,QAAAA,EACAC,UAAAA,EACAC,UAAAA,GAAY,MAENC,MAAAA,EAAkBC,IAClBC,EAAkBC,IAClBC,EAAUJ,GAAmBE,EAC7BG,EAAKC,IAELC,GAAa,MAAAV,OAAAA,EAAAA,EAASW,SAAU,EAEhCC,EAAMC,EAAyB,MACrCC,GAAU,KACFZ,GAAaU,EAAIG,SACjBH,EAAIG,QAAQC,UAEjB,CAACd,EAAWU,IAETK,MAOAC,EAAgBC,GAClB,WACU,OAAAC,MAAAC,QAAQ,MAAAd,OAAAA,EAAAA,EAASe,cACjB,MAAAf,SAAAA,EAASe,aAAa,GAAGC,MAAMC,WAC/B,OAAAC,EAAA,MAAAlB,OAAA,EAAAA,EAASe,mBAAT,EAAAG,EAAuBF,MAAMC,UAAA,GACvC,CAAC,MAAAjB,OAAAA,EAAAA,EAASe,eAGd,OAAKf,EAQDmB,EAACC,EAAA,CACGC,OAAQ9B,EACR+B,WAAY,CAAEC,QAAS,SACvB/B,KAAM,GAAGS,KAAMT,GAAQD,IACvBiC,OAAQrB,EAAa,EACrBa,MAAOL,GAAiB,GACxBc,SA7BoDC,IAClDC,MAAAA,EAAS,MAAAlC,OAAA,EAAAA,EAASmC,MACnBD,GAAWA,EAAOX,MAAMC,aAAeS,EAAEG,OAAOb,QAErD,MAAAhB,GAAAA,EAAS8B,gBAAgBH,EAAAA,EA0BrBjC,UAAAA,EAECqC,SAAS,MAAAtC,OAAAA,EAAAA,EAAAuC,KAAI,CAACL,EAAQM,IACnBd,EAACe,EAAA,CACG7B,IAAW,IAAN4B,EAAU5B,OAAM,EAErBd,MAAOoC,EAAOpC,MACdyB,MAAOmB,OAAOR,EAAOX,QAFhB,GAAGf,KAAMT,GAAQD,KAASoC,EAAOX,cAnB1CoB,QAAAC,MACJ,yEAEG,KAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SmileyQuestion.js","sources":["../../../../../src/components/feedback/questions/SmileyQuestion.tsx"],"sourcesContent":["import React, { ChangeEventHandler, Fragment, useId, useMemo } from \"react\";\nimport { FieldGroup } from \"../../input-group/FieldGroup.js\";\nimport { useFollowUpContext } from \"../followup/followupContext.js\";\nimport { useMainQuestionContext } from \"../main-question/mainQuestionContext.js\";\nimport { FeedbackOption, QuestionProps } from \"../types.js\";\nimport { defaultOptions, getSmiley } from \"./smileyUtils.js\";\n\nconst isNotInScale = (option: FeedbackOption) =>\n typeof option.value !== \"number\" || ![1, 2, 3, 4, 5].includes(option.value);\n\nexport const SmileyQuestion: React.FC<QuestionProps> = ({\n label,\n name = \"smiley\",\n helpLabel,\n options = defaultOptions,\n}) => {\n const followupContext = useFollowUpContext();\n const feedbackContext = useMainQuestionContext();\n const context = followupContext || feedbackContext;\n const id = useId();\n\n const handleChange: ChangeEventHandler<HTMLInputElement> = (e) => {\n console.log(e.target.value);\n const option = options?.find((option) => option.value.toString() === e.target.value);\n context?.setCurrentValue(option);\n };\n\n const selectedValue = useMemo(\n ()
|
|
1
|
+
{"version":3,"file":"SmileyQuestion.js","sources":["../../../../../src/components/feedback/questions/SmileyQuestion.tsx"],"sourcesContent":["import React, { ChangeEventHandler, Fragment, useId, useMemo } from \"react\";\nimport { FieldGroup } from \"../../input-group/FieldGroup.js\";\nimport { useFollowUpContext } from \"../followup/followupContext.js\";\nimport { useMainQuestionContext } from \"../main-question/mainQuestionContext.js\";\nimport { FeedbackOption, QuestionProps } from \"../types.js\";\nimport { defaultOptions, getSmiley } from \"./smileyUtils.js\";\n\nconst isNotInScale = (option: FeedbackOption) =>\n typeof option.value !== \"number\" || ![1, 2, 3, 4, 5].includes(option.value);\n\nexport const SmileyQuestion: React.FC<QuestionProps> = ({\n label,\n name = \"smiley\",\n helpLabel,\n options = defaultOptions,\n}) => {\n const followupContext = useFollowUpContext();\n const feedbackContext = useMainQuestionContext();\n const context = followupContext || feedbackContext;\n const id = useId();\n\n const handleChange: ChangeEventHandler<HTMLInputElement> = (e) => {\n console.log(e.target.value);\n const option = options?.find(\n (option) => option.value.toString() === e.target.value,\n );\n context?.setCurrentValue(option);\n };\n\n const selectedValue = useMemo(\n () =>\n Array.isArray(context?.currentValue)\n ? context?.currentValue[0].value\n : context?.currentValue?.value,\n [context?.currentValue],\n );\n\n if (options.some(isNotInScale)) {\n console.error(\n \"SmileyQuestion må ha tallene 1 til 5 som verdier for alternativene sine\",\n );\n return null;\n }\n\n if (!context || !options) {\n console.error(\n \"Questions must be used inside a Followup or Feedback context provider\",\n );\n return null;\n }\n\n return (\n <FieldGroup\n labelProps={{ variant: \"large\" }}\n legend={label}\n helpLabel={helpLabel}\n >\n <div className=\"jkl-feedback-smileys\">\n {options.map((option) => (\n <Fragment key={option.value}>\n <input\n className=\"jkl-sr-only\"\n id={`${id}-${name}-${option.value}`}\n name={`${id}-${name}`}\n type=\"radio\"\n value={option.value}\n onChange={handleChange}\n checked={selectedValue === option.value}\n />\n <label\n className=\"jkl-feedback-smiley-option\"\n htmlFor={`${id}-${name}-${option.value}`}\n >\n <span className=\"jkl-sr-only\">{option.label}</span>\n {getSmiley(Number(option.value))}\n </label>\n </Fragment>\n ))}\n </div>\n </FieldGroup>\n );\n};\n"],"names":["isNotInScale","option","value","includes","SmileyQuestion","label","name","helpLabel","options","defaultOptions","followupContext","useFollowUpContext","feedbackContext","useMainQuestionContext","context","id","useId","handleChange","e","console","log","target","find","toString","setCurrentValue","selectedValue","useMemo","Array","isArray","currentValue","_a","some","error","jsx","FieldGroup","labelProps","variant","legend","children","className","map","jsxs","Fragment","type","onChange","checked","htmlFor","getSmiley","Number"],"mappings":"8XAOA,MAAMA,EAAgBC,GACM,iBAAjBA,EAAOC,QAAuB,CAAC,EAAG,EAAG,EAAG,EAAG,GAAGC,SAASF,EAAOC,OAE5DE,EAA0C,EACnDC,MAAAA,EACAC,KAAAA,EAAO,SACPC,UAAAA,EACAC,QAAAA,EAAUC,MAEV,MAAMC,EAAkBC,IAClBC,EAAkBC,IAClBC,EAAUJ,GAAmBE,EAC7BG,EAAKC,IAELC,EAAsDC,IAChDC,QAAAC,IAAIF,EAAEG,OAAOnB,OACfD,MAAAA,EAAS,MAAAO,OAAA,EAAAA,EAASc,MACnBrB,GAAWA,EAAOC,MAAMqB,aAAeL,EAAEG,OAAOnB,QAErD,MAAAY,GAAAA,EAASU,gBAAgBvB,EAAAA,EAGvBwB,EAAgBC,GAClB,WACI,OAAAC,MAAMC,QAAQ,MAAAd,OAAA,EAAAA,EAASe,cACjB,MAAAf,OAAAA,EAAAA,EAASe,aAAa,GAAG3B,MACzB,OAAA4B,EAAA,MAAAhB,SAAAA,EAASe,qBAATC,EAAuB5B,KAAA,GACjC,CAAC,MAAAY,OAAAA,EAAAA,EAASe,eAGV,OAAArB,EAAQuB,KAAK/B,IACLmB,QAAAa,MACJ,2EAEG,MAGNlB,GAAYN,EAQbyB,EAACC,EAAA,CACGC,WAAY,CAAEC,QAAS,SACvBC,OAAQhC,EACRE,UAAAA,EAEA+B,SAAAL,EAAC,OAAIM,UAAU,uBACVD,WAAQE,KAAKvC,GACVwC,EAACC,EACG,CAAAJ,SAAA,CAAAL,EAAC,QAAA,CACGM,UAAU,cACVxB,GAAI,GAAGA,KAAMT,KAAQL,EAAOC,QAC5BI,KAAM,GAAGS,KAAMT,IACfqC,KAAK,QACLzC,MAAOD,EAAOC,MACd0C,SAAU3B,EACV4B,QAASpB,IAAkBxB,EAAOC,QAEtCuC,EAAC,QAAA,CACGF,UAAU,6BACVO,QAAS,GAAG/B,KAAMT,KAAQL,EAAOC,QAEjCoC,SAAA,CAAAL,EAAC,OAAK,CAAAM,UAAU,cAAeD,SAAArC,EAAOI,QACrC0C,EAAUC,OAAO/C,EAAOC,aAflBD,EAAOC,cAd1BiB,QAAAa,MACJ,yEAEG,KA8BH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextQuestion.js","sources":["../../../../../src/components/feedback/questions/TextQuestion.tsx"],"sourcesContent":["import React, { ChangeEventHandler, useEffect, useMemo, useRef } from \"react\";\nimport { TextArea } from \"../../text-input/TextArea.js\";\nimport { useFeedbackContext } from \"../feedbackContext.js\";\nimport { useFollowUpContext } from \"../followup/followupContext.js\";\nimport { useMainQuestionContext } from \"../main-question/mainQuestionContext.js\";\nimport { FeedbackAnswer, QuestionProps } from \"../types.js\";\n\nexport const TextQuestion: React.FC<QuestionProps> = ({\n label,\n name,\n helpLabel = \"Ikke skriv personlige opplysninger. Tilbakemeldinger som kommer inn her blir ikke besvart, men brukt i videre arbeid med å forbedre tjenestene våre.\",\n autoFocus = false,\n}) => {\n const { counter } = useFeedbackContext();\n const followupContext = useFollowUpContext();\n const feedbackContext = useMainQuestionContext();\n const context = followupContext || feedbackContext;\n const ref = useRef<HTMLTextAreaElement>(null);\n\n useEffect(() => {\n if (autoFocus && ref.current) {\n ref.current.focus();\n }\n }, [autoFocus, ref]);\n\n const handleChange: ChangeEventHandler<HTMLTextAreaElement> = (e) => {\n const value: FeedbackAnswer = {\n label,\n name: name || label,\n type: \"text\",\n value: e.target.value,\n };\n context?.setCurrentValue(value);\n };\n\n const currentValue = useMemo(\n () =>\n Array.isArray(context?.currentValue)\n ? context?.currentValue[0].value.toString()\n : context?.currentValue?.value.toString(),\n [context?.currentValue],\n );\n\n if (!context) {\n console.error(\"Questions must be used inside a Followup or Feedback context provider\");\n return null;\n }\n\n return (\n <TextArea\n ref={ref}\n label={label}\n labelProps={{ variant: \"large\" }}\n name={name || label}\n startOpen\n rows={5}\n value={currentValue}\n onChange={handleChange}\n helpLabel={helpLabel}\n counter={counter}\n />\n );\n};\n"],"names":["TextQuestion","label","name","helpLabel","autoFocus","counter","useFeedbackContext","followupContext","useFollowUpContext","feedbackContext","useMainQuestionContext","context","ref","useRef","useEffect","current","focus","handleChange","currentValue","useMemo","Array","isArray","value","toString","_a","jsx","TextArea","labelProps","variant","startOpen","rows","onChange","e","type","target","setCurrentValue","console","error"],"mappings":"2WAOO,MAAMA,EAAwC,EACjDC,MAAAA,EACAC,KAAAA,EACAC,UAAAA,EAAY,uJACZC,UAAAA,GAAY,MAEN,MAAEC,QAAAA,GAAYC,IACdC,EAAkBC,IAClBC,EAAkBC,IAClBC,EAAUJ,GAAmBE,EAC7BG,EAAMC,EAA4B,MAExCC,GAAU,KACFV,GAAaQ,EAAIG,SACjBH,EAAIG,QAAQC,UAEjB,CAACZ,EAAWQ,IAETK,MAUAC,EAAeC,GACjB,WACU,OAAAC,MAAAC,QAAQ,MAAAV,OAAAA,EAAAA,EAASO,cACjB,MAAAP,SAAAA,EAASO,aAAa,GAAGI,MAAMC,WAC/B,OAAAC,EAAA,MAAAb,OAAA,EAAAA,EAASO,mBAAT,EAAAM,EAAuBF,MAAMC,UAAA,GACvC,CAAC,MAAAZ,OAAAA,EAAAA,EAASO,eAGd,OAAKP,
|
|
1
|
+
{"version":3,"file":"TextQuestion.js","sources":["../../../../../src/components/feedback/questions/TextQuestion.tsx"],"sourcesContent":["import React, { ChangeEventHandler, useEffect, useMemo, useRef } from \"react\";\nimport { TextArea } from \"../../text-input/TextArea.js\";\nimport { useFeedbackContext } from \"../feedbackContext.js\";\nimport { useFollowUpContext } from \"../followup/followupContext.js\";\nimport { useMainQuestionContext } from \"../main-question/mainQuestionContext.js\";\nimport { FeedbackAnswer, QuestionProps } from \"../types.js\";\n\nexport const TextQuestion: React.FC<QuestionProps> = ({\n label,\n name,\n helpLabel = \"Ikke skriv personlige opplysninger. Tilbakemeldinger som kommer inn her blir ikke besvart, men brukt i videre arbeid med å forbedre tjenestene våre.\",\n autoFocus = false,\n}) => {\n const { counter } = useFeedbackContext();\n const followupContext = useFollowUpContext();\n const feedbackContext = useMainQuestionContext();\n const context = followupContext || feedbackContext;\n const ref = useRef<HTMLTextAreaElement>(null);\n\n useEffect(() => {\n if (autoFocus && ref.current) {\n ref.current.focus();\n }\n }, [autoFocus, ref]);\n\n const handleChange: ChangeEventHandler<HTMLTextAreaElement> = (e) => {\n const value: FeedbackAnswer = {\n label,\n name: name || label,\n type: \"text\",\n value: e.target.value,\n };\n context?.setCurrentValue(value);\n };\n\n const currentValue = useMemo(\n () =>\n Array.isArray(context?.currentValue)\n ? context?.currentValue[0].value.toString()\n : context?.currentValue?.value.toString(),\n [context?.currentValue],\n );\n\n if (!context) {\n console.error(\n \"Questions must be used inside a Followup or Feedback context provider\",\n );\n return null;\n }\n\n return (\n <TextArea\n ref={ref}\n label={label}\n labelProps={{ variant: \"large\" }}\n name={name || label}\n startOpen\n rows={5}\n value={currentValue}\n onChange={handleChange}\n helpLabel={helpLabel}\n counter={counter}\n />\n );\n};\n"],"names":["TextQuestion","label","name","helpLabel","autoFocus","counter","useFeedbackContext","followupContext","useFollowUpContext","feedbackContext","useMainQuestionContext","context","ref","useRef","useEffect","current","focus","handleChange","currentValue","useMemo","Array","isArray","value","toString","_a","jsx","TextArea","labelProps","variant","startOpen","rows","onChange","e","type","target","setCurrentValue","console","error"],"mappings":"2WAOO,MAAMA,EAAwC,EACjDC,MAAAA,EACAC,KAAAA,EACAC,UAAAA,EAAY,uJACZC,UAAAA,GAAY,MAEN,MAAEC,QAAAA,GAAYC,IACdC,EAAkBC,IAClBC,EAAkBC,IAClBC,EAAUJ,GAAmBE,EAC7BG,EAAMC,EAA4B,MAExCC,GAAU,KACFV,GAAaQ,EAAIG,SACjBH,EAAIG,QAAQC,UAEjB,CAACZ,EAAWQ,IAETK,MAUAC,EAAeC,GACjB,WACU,OAAAC,MAAAC,QAAQ,MAAAV,OAAAA,EAAAA,EAASO,cACjB,MAAAP,SAAAA,EAASO,aAAa,GAAGI,MAAMC,WAC/B,OAAAC,EAAA,MAAAb,OAAA,EAAAA,EAASO,mBAAT,EAAAM,EAAuBF,MAAMC,UAAA,GACvC,CAAC,MAAAZ,OAAAA,EAAAA,EAASO,eAGd,OAAKP,EAQDc,EAACC,EAAA,CACGd,IAAAA,EACAX,MAAAA,EACA0B,WAAY,CAAEC,QAAS,SACvB1B,KAAMA,GAAQD,EACd4B,WAAS,EACTC,KAAM,EACNR,MAAOJ,EACPa,SAlCuDC,IAC3D,MAAMV,EAAwB,CAC1BrB,MAAAA,EACAC,KAAMA,GAAQD,EACdgC,KAAM,OACNX,MAAOU,EAAEE,OAAOZ,OAEpB,MAAAX,GAAAA,EAASwB,gBAAgBb,EAAAA,EA4BrBnB,UAAAA,EACAE,QAAAA,KAjBI+B,QAAAC,MACJ,yEAEG,KAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smileyUtils.js","sources":["../../../../../src/components/feedback/questions/smileyUtils.tsx"],"sourcesContent":["import React, { FC } from \"react\";\nimport { WithChildren } from \"../../../core/types.js\";\nimport { FeedbackOption } from \"../types.js\";\n\nexport const defaultOptions: FeedbackOption<number>[] = [\n {\n label: \"Veldig misfornøyd\",\n value: 1,\n textAreaLabel
|
|
1
|
+
{"version":3,"file":"smileyUtils.js","sources":["../../../../../src/components/feedback/questions/smileyUtils.tsx"],"sourcesContent":["import React, { FC } from \"react\";\nimport { WithChildren } from \"../../../core/types.js\";\nimport { FeedbackOption } from \"../types.js\";\n\nexport const defaultOptions: FeedbackOption<number>[] = [\n {\n label: \"Veldig misfornøyd\",\n value: 1,\n textAreaLabel:\n \"Det var leit! Fortell oss gjerne hva du savner, så kan vi gjøre sidene våre bedre.\",\n },\n {\n label: \"Litt misfornøyd\",\n value: 2,\n textAreaLabel:\n \"Det var leit! Fortell oss gjerne hva du savner, så kan vi gjøre sidene våre bedre.\",\n },\n {\n label: \"Midt på treet\",\n value: 3,\n textAreaLabel:\n \"Fortell oss gjerne hva du savner, så kan vi gjøre sidene våre bedre.\",\n },\n {\n label: \"Ganske fornøyd\",\n value: 4,\n textAreaLabel:\n \"Så bra! Har du noen tilbakemeldinger kan du skrive dem her.\",\n },\n {\n label: \"Veldig fornøyd\",\n value: 5,\n textAreaLabel:\n \"Så bra! Har du noen tilbakemeldinger kan du skrive dem her.\",\n },\n];\n\nconst Smiley: FC<WithChildren> = ({ children }) => (\n <svg\n className=\"jkl-feedback-smiley-option__icon\"\n aria-hidden\n viewBox=\"0 0 40 40\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle cx=\"20\" cy=\"20\" r=\"19\" stroke=\"currentColor\" strokeWidth=\"2\" />\n {children}\n </svg>\n);\n\nconst VeldigSurSmiley = () => (\n <Smiley>\n <path\n d=\"M10 30C10 24.4772 14.4772 20 20 20C25.5228 20 30 24.4772 30 30\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n />\n <path d=\"M10 13.9865H16.6667\" stroke=\"currentColor\" strokeWidth=\"2\" />\n <path\n d=\"M23.3333 13.9865H29.9999\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n />\n </Smiley>\n);\n\nconst LittSurSmiley = () => (\n <Smiley>\n <path\n d=\"M10 28.75C10 28.75 13.75 23.3334 20 23.3334C26.25 23.3334 30 28.75 30 28.75\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n />\n <circle cx=\"12.5\" cy=\"14.5\" r=\"1.5\" fill=\"currentColor\" />\n <circle cx=\"27.5\" cy=\"14.5\" r=\"1.5\" fill=\"currentColor\" />\n </Smiley>\n);\n\nconst NoytralSmiley = () => (\n <Smiley>\n <path\n d=\"M9.15283 25.6986H30.8477\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n />\n <circle cx=\"12.5\" cy=\"14.5\" r=\"1.5\" fill=\"currentColor\" />\n <circle cx=\"27.5\" cy=\"14.5\" r=\"1.5\" fill=\"currentColor\" />\n </Smiley>\n);\n\nconst LittGladSmiley = () => (\n <Smiley>\n <path\n d=\"M10 23.3334C10 23.3334 12.9167 30 20 30C27.0833 30 30 23.3334 30 23.3334\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n />\n <circle cx=\"12.5\" cy=\"14.5\" r=\"1.5\" fill=\"currentColor\" />\n <circle cx=\"27.5\" cy=\"14.5\" r=\"1.5\" fill=\"currentColor\" />\n </Smiley>\n);\n\nconst VeldigGladSmiley = () => (\n <Smiley>\n <path\n d=\"M30 21C30 26.5228 25.5228 31 20 31C14.4772 31 10 26.5228 10 21\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n />\n <path d=\"M24 14.5H29\" stroke=\"currentColor\" strokeWidth=\"2\" />\n <circle cx=\"12.5\" cy=\"14.5\" r=\"1.5\" fill=\"currentColor\" />\n </Smiley>\n);\n\nexport const getSmiley = (value: number) => {\n switch (value) {\n case 1:\n return <VeldigSurSmiley />;\n case 2:\n return <LittSurSmiley />;\n case 3:\n return <NoytralSmiley />;\n case 4:\n return <LittGladSmiley />;\n case 5:\n return <VeldigGladSmiley />;\n\n default:\n return <NoytralSmiley />;\n }\n};\n"],"names":["defaultOptions","label","value","textAreaLabel","Smiley","children","jsxs","className","viewBox","fill","xmlns","jsx","cx","cy","r","stroke","strokeWidth","VeldigSurSmiley","d","LittSurSmiley","NoytralSmiley","LittGladSmiley","VeldigGladSmiley","getSmiley"],"mappings":"kDAIO,MAAMA,EAA2C,CACpD,CACIC,MAAO,oBACPC,MAAO,EACPC,cACI,sFAER,CACIF,MAAO,kBACPC,MAAO,EACPC,cACI,sFAER,CACIF,MAAO,gBACPC,MAAO,EACPC,cACI,wEAER,CACIF,MAAO,iBACPC,MAAO,EACPC,cACI,+DAER,CACIF,MAAO,iBACPC,MAAO,EACPC,cACI,gEAINC,EAA2B,EAAGC,SAAAA,KAChCC,EAAC,MAAA,CACGC,UAAU,mCACV,eAAW,EACXC,QAAQ,YACRC,KAAK,OACLC,MAAM,6BAENL,SAAA,CAACM,EAAA,SAAA,CAAOC,GAAG,KAAKC,GAAG,KAAKC,EAAE,KAAKC,OAAO,eAAeC,YAAY,MAChEX,KAIHY,EAAkB,IACpBX,EAACF,EACG,CAAAC,SAAA,CAAAM,EAAC,OAAA,CACGO,EAAE,iEACFH,OAAO,eACPC,YAAY,QAEf,OAAK,CAAAE,EAAE,sBAAsBH,OAAO,eAAeC,YAAY,MAChEL,EAAC,OAAA,CACGO,EAAE,2BACFH,OAAO,eACPC,YAAY,SAKlBG,EAAgB,IAClBb,EAACF,EACG,CAAAC,SAAA,CAAAM,EAAC,OAAA,CACGO,EAAE,8EACFH,OAAO,eACPC,YAAY,MAEhBL,EAAC,UAAOC,GAAG,OAAOC,GAAG,OAAOC,EAAE,MAAML,KAAK,iBACzCE,EAAC,UAAOC,GAAG,OAAOC,GAAG,OAAOC,EAAE,MAAML,KAAK,oBAI3CW,EAAgB,IAClBd,EAACF,EACG,CAAAC,SAAA,CAAAM,EAAC,OAAA,CACGO,EAAE,2BACFH,OAAO,eACPC,YAAY,MAEhBL,EAAC,UAAOC,GAAG,OAAOC,GAAG,OAAOC,EAAE,MAAML,KAAK,iBACzCE,EAAC,UAAOC,GAAG,OAAOC,GAAG,OAAOC,EAAE,MAAML,KAAK,oBAI3CY,EAAiB,IACnBf,EAACF,EACG,CAAAC,SAAA,CAAAM,EAAC,OAAA,CACGO,EAAE,2EACFH,OAAO,eACPC,YAAY,MAEhBL,EAAC,UAAOC,GAAG,OAAOC,GAAG,OAAOC,EAAE,MAAML,KAAK,iBACzCE,EAAC,UAAOC,GAAG,OAAOC,GAAG,OAAOC,EAAE,MAAML,KAAK,oBAI3Ca,EAAmB,IACrBhB,EAACF,EACG,CAAAC,SAAA,CAAAM,EAAC,OAAA,CACGO,EAAE,iEACFH,OAAO,eACPC,YAAY,QAEf,OAAK,CAAAE,EAAE,cAAcH,OAAO,eAAeC,YAAY,MACxDL,EAAC,UAAOC,GAAG,OAAOC,GAAG,OAAOC,EAAE,MAAML,KAAK,oBAIpCc,EAAarB,IACtB,OAAQA,GACJ,KAAK,EACD,SAAQe,EAAgB,CAAA,GAC5B,KAAK,EACD,SAAQE,EAAc,CAAA,GAC1B,KAAK,EAOL,QACI,SAAQC,EAAc,CAAA,GAN1B,KAAK,EACD,SAAQC,EAAe,CAAA,GAC3B,KAAK,EACD,SAAQC,EAAiB,CAAA,GAIjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../../../src/components/feedback/utils.ts"],"sourcesContent":["import React, { JSXElementConstructor, FC } from \"react\";\nimport {
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../src/components/feedback/utils.ts"],"sourcesContent":["import React, { JSXElementConstructor, FC } from \"react\";\nimport {\n CheckboxQuestion,\n RadioQuestion,\n TextQuestion,\n SmileyQuestion,\n} from \"./questions/index.js\";\nimport { QuestionProps, QuestionType } from \"./types.js\";\n\nexport function getChildrenOfType<P>(\n ...allowedTypes: Array<string | JSXElementConstructor<P>>\n) {\n return (\n children: React.ReactNode,\n ):\n | React.ReactElement<P, string | React.JSXElementConstructor<unknown>>[]\n | null\n | undefined =>\n React.Children.map(children, (child) => {\n if (\n React.isValidElement<P>(child) &&\n allowedTypes.includes(child.type)\n ) {\n return child;\n }\n return undefined;\n });\n}\n\nexport const getQuestionFromType = (type: QuestionType): FC<QuestionProps> => {\n switch (type) {\n case \"radio\":\n return RadioQuestion;\n case \"checkbox\":\n return CheckboxQuestion;\n case \"text\":\n return TextQuestion;\n case \"smiley\":\n return SmileyQuestion;\n\n default:\n return RadioQuestion;\n }\n};\n"],"names":["getChildrenOfType","allowedTypes","children","React","Children","map","child","isValidElement","includes","type","getQuestionFromType","RadioQuestion","CheckboxQuestion","TextQuestion","SmileyQuestion"],"mappings":"ofASO,SAASA,KACTC,GAEH,OACIC,GAKAC,EAAMC,SAASC,IAAIH,GAAWI,IAEtB,GAAAH,EAAMI,eAAkBD,IACxBL,EAAaO,SAASF,EAAMG,MAErBH,OAAAA,CAAAA,GAIvB,CAEa,MAAAI,EAAuBD,IAChC,OAAQA,GACJ,IAAK,QASL,QACWE,OAAAA,EARX,IAAK,WACMC,OAAAA,EACX,IAAK,OACMC,OAAAA,EACX,IAAK,SACMC,OAAAA,EAIf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Flex.js","sources":["../../../../src/components/flex/Flex.tsx"],"sourcesContent":["import React, { type CSSProperties } from \"react\";\nimport tokens from \"../../core/tokens.js\";\nimport { AsChildProps } from \"../../utilities/polymorphism/as-child.js\";\nimport { SlotComponent } from \"../../utilities/polymorphism/index.js\";\nimport {
|
|
1
|
+
{"version":3,"file":"Flex.js","sources":["../../../../src/components/flex/Flex.tsx"],"sourcesContent":["import React, { type CSSProperties } from \"react\";\nimport tokens from \"../../core/tokens.js\";\nimport { AsChildProps } from \"../../utilities/polymorphism/as-child.js\";\nimport { SlotComponent } from \"../../utilities/polymorphism/index.js\";\nimport {\n PolymorphicPropsWithRef,\n PolymorphicRef,\n} from \"../../utilities/polymorphism/polymorphism.js\";\n\nexport type FlexDirection = \"row\" | \"row-reverse\" | \"column\" | \"column-reverse\";\nexport type GapValue = Exclude<keyof (typeof tokens)[\"spacing\"], 0>;\n\nexport type FlexProps<ElementType extends React.ElementType> =\n PolymorphicPropsWithRef<\n ElementType,\n {\n direction?: FlexDirection;\n wrap?: boolean;\n gap?: GapValue;\n colGap?: GapValue;\n rowGap?: GapValue;\n } & Pick<\n CSSProperties,\n \"alignContent\" | \"alignItems\" | \"justifyContent\" | \"justifyItems\"\n >\n >;\n\nexport type FlexComponent = <ElementType extends React.ElementType = \"div\">(\n props: FlexProps<ElementType> & AsChildProps,\n) => React.ReactElement | null;\n\nexport const Flex = React.forwardRef(function Flex<\n ElementType extends React.ElementType = \"div\",\n>(props: FlexProps<ElementType>, ref?: PolymorphicRef<ElementType>) {\n const {\n asChild,\n as = \"div\",\n alignContent,\n alignItems,\n children,\n colGap,\n direction,\n gap,\n justifyContent,\n justifyItems,\n rowGap,\n wrap = false,\n ...rest\n } = props;\n const Component = asChild ? SlotComponent : as;\n\n const flexStyle: CSSProperties = {\n display: \"flex\",\n flexDirection: direction,\n alignContent,\n alignItems,\n justifyContent,\n justifyItems,\n ...(wrap ? { flexWrap: \"wrap\" } : {}),\n ...(gap ? { gap: tokens.spacing[gap] } : {}),\n ...(colGap ? { columnGap: tokens.spacing[colGap] } : {}),\n ...(rowGap ? { rowGap: tokens.spacing[rowGap] } : {}),\n };\n\n return (\n <Component ref={ref} {...rest} style={{ ...flexStyle, ...rest.style }}>\n {children}\n </Component>\n );\n}) as FlexComponent;\n"],"names":["Flex","React","forwardRef","props","ref","asChild","as","alignContent","alignItems","children","colGap","direction","gap","justifyContent","justifyItems","rowGap","wrap","rest","Component","SlotComponent","flexStyle","display","flexDirection","flexWrap","tokens","spacing","columnGap","jsx","style"],"mappings":"+KA+BO,MAAMA,EAAOC,EAAMC,YAAW,SAEnCC,EAA+BC,GACvB,MACFC,QAAAA,EACAC,GAAAA,EAAK,MACLC,aAAAA,EACAC,WAAAA,EACAC,SAAAA,EACAC,OAAAA,EACAC,UAAAA,EACAC,IAAAA,EACAC,eAAAA,EACAC,aAAAA,EACAC,OAAAA,EACAC,KAAAA,GAAO,KACJC,GACHd,EACEe,EAAYb,EAAUc,EAAgBb,EAEtCc,EAA2B,CAC7BC,QAAS,OACTC,cAAeX,EACfJ,aAAAA,EACAC,WAAAA,EACAK,eAAAA,EACAC,aAAAA,KACIE,EAAO,CAAEO,SAAU,QAAW,CAAC,KAC/BX,EAAM,CAAEA,IAAKY,EAAOC,QAAQb,IAAS,CAAC,KACtCF,EAAS,CAAEgB,UAAWF,EAAOC,QAAQf,IAAY,CAAC,KAClDK,EAAS,CAAEA,OAAQS,EAAOC,QAAQV,IAAY,CAAC,GAGvD,OACKY,EAAAT,EAAA,CAAUd,IAAAA,KAAca,EAAMW,MAAO,IAAKR,KAAcH,EAAKW,OACzDnB,SAAAA,GAGb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.js","sources":["../../../../src/components/icon/Icon.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React from \"react\";\nimport {
|
|
1
|
+
{"version":3,"file":"Icon.js","sources":["../../../../src/components/icon/Icon.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React from \"react\";\nimport {\n PolymorphicPropsWithRef,\n PolymorphicRef,\n} from \"../../utilities/polymorphism/polymorphism.js\";\nimport { IconVariant } from \"./types.js\";\n\ntype IconComponentProps<\n ElementType extends Extract<React.ElementType, \"span\" | \"div\">,\n> = PolymorphicPropsWithRef<\n ElementType,\n {\n \"data-testid\"?: string;\n /**\n * Størrelsesvarianten til ikonet. `\"small\"` er 16px med 20px bounding box, og `\"medium\"` er 20px med 24px bounding box.\n * `\"inherit\"` setter størrelsen til ikonet (ikke bounding box) lik skriftstørrelsen (1em).\n */\n variant?: IconVariant;\n /**\n * Angir om ikonet skal vises i fet versjon\n * @default false\n */\n bold?: boolean;\n filled?: boolean;\n className?: string;\n style?: React.CSSProperties;\n }\n>;\n\nexport type IconComponent = (<\n ElementType extends Extract<React.ElementType, \"span\" | \"div\"> = \"span\",\n>(\n props: IconComponentProps<ElementType>,\n) => React.ReactElement | null) & { displayName?: string };\n\nexport const Icon: IconComponent = React.forwardRef(function Icon<\n ElementType extends Extract<React.ElementType, \"span\" | \"div\"> = \"span\",\n>(props: IconComponentProps<ElementType>, ref?: PolymorphicRef<ElementType>) {\n const { bold, children, className, filled, variant, ...iconProps } = props;\n\n return (\n <span\n aria-hidden\n ref={ref}\n className={clsx(\"jkl-icon\", className, {\n \"jkl-icon--filled\": filled,\n \"jkl-icon--bold\": bold,\n [`jkl-icon--${variant}`]: !!variant,\n })}\n {...iconProps}\n >\n {children}\n </span>\n );\n}) as IconComponent;\n"],"names":["Icon","React","forwardRef","props","ref","bold","children","className","filled","variant","iconProps","jsx","clsx"],"mappings":"2GAoCO,MAAMA,EAAsBC,EAAMC,YAAW,SAElDC,EAAwCC,GAChC,MAAEC,KAAAA,EAAMC,SAAAA,EAAUC,UAAAA,EAAWC,OAAAA,EAAQC,QAAAA,KAAYC,GAAcP,EAGjE,OAAAQ,EAAC,OAAA,CACG,eAAW,EACXP,IAAAA,EACAG,UAAWK,EAAK,WAAYL,EAAW,CACnC,mBAAoBC,EACpB,iBAAkBH,EAClB,CAAC,aAAaI,OAAcA,OAE5BC,EAEHJ,SAAAA,GAGb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrowDownIcon.js","sources":["../../../../../src/components/icon/icons/ArrowDownIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const ArrowDownIcon: IconComponent = (props: IconProps) => <Icon {...props}>{\"\\ue5db\"}</Icon
|
|
1
|
+
{"version":3,"file":"ArrowDownIcon.js","sources":["../../../../../src/components/icon/icons/ArrowDownIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const ArrowDownIcon: IconComponent = (props: IconProps) => (\n <Icon {...props}>{\"\\ue5db\"}</Icon>\n);\nArrowDownIcon.displayName = \"ArrowDownIcon\";\n"],"names":["ArrowDownIcon","props","Icon","children","displayName"],"mappings":"0EAIO,MAAMA,EAAgCC,KACxCC,EAAM,IAAGD,EAAQE,SAAS,MAE/BH,EAAcI,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrowLeftIcon.js","sources":["../../../../../src/components/icon/icons/ArrowLeftIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const ArrowLeftIcon: IconComponent = (props: IconProps) => <Icon {...props}>{\"\\ue5c4\"}</Icon
|
|
1
|
+
{"version":3,"file":"ArrowLeftIcon.js","sources":["../../../../../src/components/icon/icons/ArrowLeftIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const ArrowLeftIcon: IconComponent = (props: IconProps) => (\n <Icon {...props}>{\"\\ue5c4\"}</Icon>\n);\nArrowLeftIcon.displayName = \"ArrowLeftIcon\";\n"],"names":["ArrowLeftIcon","props","Icon","children","displayName"],"mappings":"0EAIO,MAAMA,EAAgCC,KACxCC,EAAM,IAAGD,EAAQE,SAAS,MAE/BH,EAAcI,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrowNorthEastIcon.js","sources":["../../../../../src/components/icon/icons/ArrowNorthEastIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const ArrowNorthEastIcon: IconComponent = (props: IconProps) => <Icon {...props}>{\"\\uf1e1\"}</Icon
|
|
1
|
+
{"version":3,"file":"ArrowNorthEastIcon.js","sources":["../../../../../src/components/icon/icons/ArrowNorthEastIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const ArrowNorthEastIcon: IconComponent = (props: IconProps) => (\n <Icon {...props}>{\"\\uf1e1\"}</Icon>\n);\nArrowNorthEastIcon.displayName = \"ArrowNorthEastIcon\";\n"],"names":["ArrowNorthEastIcon","props","Icon","children","displayName"],"mappings":"0EAIO,MAAMA,EAAqCC,KAC7CC,EAAM,IAAGD,EAAQE,SAAS,MAE/BH,EAAmBI,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrowRightIcon.js","sources":["../../../../../src/components/icon/icons/ArrowRightIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const ArrowRightIcon: IconComponent = (props: IconProps) => <Icon {...props}>{\"\\ue5c8\"}</Icon
|
|
1
|
+
{"version":3,"file":"ArrowRightIcon.js","sources":["../../../../../src/components/icon/icons/ArrowRightIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const ArrowRightIcon: IconComponent = (props: IconProps) => (\n <Icon {...props}>{\"\\ue5c8\"}</Icon>\n);\nArrowRightIcon.displayName = \"ArrowRightIcon\";\n"],"names":["ArrowRightIcon","props","Icon","children","displayName"],"mappings":"0EAIO,MAAMA,EAAiCC,KACzCC,EAAM,IAAGD,EAAQE,SAAS,MAE/BH,EAAeI,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrowUpIcon.js","sources":["../../../../../src/components/icon/icons/ArrowUpIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const ArrowUpIcon: IconComponent = (props: IconProps) => <Icon {...props}>{\"\\ue5d8\"}</Icon
|
|
1
|
+
{"version":3,"file":"ArrowUpIcon.js","sources":["../../../../../src/components/icon/icons/ArrowUpIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const ArrowUpIcon: IconComponent = (props: IconProps) => (\n <Icon {...props}>{\"\\ue5d8\"}</Icon>\n);\nArrowUpIcon.displayName = \"ArrowUpIcon\";\n"],"names":["ArrowUpIcon","props","Icon","children","displayName"],"mappings":"0EAIO,MAAMA,EAA8BC,KACtCC,EAAM,IAAGD,EAAQE,SAAS,MAE/BH,EAAYI,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarIcon.js","sources":["../../../../../src/components/icon/icons/CalendarIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const CalendarIcon: IconComponent = (props: IconProps) => <Icon {...props}>{\"\\uebcc\"}</Icon
|
|
1
|
+
{"version":3,"file":"CalendarIcon.js","sources":["../../../../../src/components/icon/icons/CalendarIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const CalendarIcon: IconComponent = (props: IconProps) => (\n <Icon {...props}>{\"\\uebcc\"}</Icon>\n);\nCalendarIcon.displayName = \"CalendarIcon\";\n"],"names":["CalendarIcon","props","Icon","children","displayName"],"mappings":"0EAIO,MAAMA,EAA+BC,KACvCC,EAAM,IAAGD,EAAQE,SAAS,MAE/BH,EAAaI,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckIcon.js","sources":["../../../../../src/components/icon/icons/CheckIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const CheckIcon: IconComponent = (props: IconProps) => <Icon {...props}>{\"\\ue5ca\"}</Icon
|
|
1
|
+
{"version":3,"file":"CheckIcon.js","sources":["../../../../../src/components/icon/icons/CheckIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const CheckIcon: IconComponent = (props: IconProps) => (\n <Icon {...props}>{\"\\ue5ca\"}</Icon>\n);\nCheckIcon.displayName = \"CheckIcon\";\n"],"names":["CheckIcon","props","Icon","children","displayName"],"mappings":"0EAIO,MAAMA,EAA4BC,KACpCC,EAAM,IAAGD,EAAQE,SAAS,MAE/BH,EAAUI,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChevronDownIcon.js","sources":["../../../../../src/components/icon/icons/ChevronDownIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const ChevronDownIcon: IconComponent = (props: IconProps) => <Icon {...props}>{\"\\ue313\"}</Icon
|
|
1
|
+
{"version":3,"file":"ChevronDownIcon.js","sources":["../../../../../src/components/icon/icons/ChevronDownIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const ChevronDownIcon: IconComponent = (props: IconProps) => (\n <Icon {...props}>{\"\\ue313\"}</Icon>\n);\nChevronDownIcon.displayName = \"ChevronDownIcon\";\n"],"names":["ChevronDownIcon","props","Icon","children","displayName"],"mappings":"0EAIO,MAAMA,EAAkCC,KAC1CC,EAAM,IAAGD,EAAQE,SAAS,MAE/BH,EAAgBI,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChevronLeftIcon.js","sources":["../../../../../src/components/icon/icons/ChevronLeftIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const ChevronLeftIcon: IconComponent = (props: IconProps) => <Icon {...props}>{\"\\ue314\"}</Icon
|
|
1
|
+
{"version":3,"file":"ChevronLeftIcon.js","sources":["../../../../../src/components/icon/icons/ChevronLeftIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const ChevronLeftIcon: IconComponent = (props: IconProps) => (\n <Icon {...props}>{\"\\ue314\"}</Icon>\n);\nChevronLeftIcon.displayName = \"ChevronLeftIcon\";\n"],"names":["ChevronLeftIcon","props","Icon","children","displayName"],"mappings":"0EAIO,MAAMA,EAAkCC,KAC1CC,EAAM,IAAGD,EAAQE,SAAS,MAE/BH,EAAgBI,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChevronRightIcon.js","sources":["../../../../../src/components/icon/icons/ChevronRightIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const ChevronRightIcon: IconComponent = (props: IconProps) => <Icon {...props}>{\"\\ue315\"}</Icon
|
|
1
|
+
{"version":3,"file":"ChevronRightIcon.js","sources":["../../../../../src/components/icon/icons/ChevronRightIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const ChevronRightIcon: IconComponent = (props: IconProps) => (\n <Icon {...props}>{\"\\ue315\"}</Icon>\n);\nChevronRightIcon.displayName = \"ChevronRightIcon\";\n"],"names":["ChevronRightIcon","props","Icon","children","displayName"],"mappings":"0EAIO,MAAMA,EAAmCC,KAC3CC,EAAM,IAAGD,EAAQE,SAAS,MAE/BH,EAAiBI,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChevronUpIcon.js","sources":["../../../../../src/components/icon/icons/ChevronUpIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const ChevronUpIcon: IconComponent = (props: IconProps) => <Icon {...props}>{\"\\ue316\"}</Icon
|
|
1
|
+
{"version":3,"file":"ChevronUpIcon.js","sources":["../../../../../src/components/icon/icons/ChevronUpIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const ChevronUpIcon: IconComponent = (props: IconProps) => (\n <Icon {...props}>{\"\\ue316\"}</Icon>\n);\nChevronUpIcon.displayName = \"ChevronUpIcon\";\n"],"names":["ChevronUpIcon","props","Icon","children","displayName"],"mappings":"0EAIO,MAAMA,EAAgCC,KACxCC,EAAM,IAAGD,EAAQE,SAAS,MAE/BH,EAAcI,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CloseIcon.js","sources":["../../../../../src/components/icon/icons/CloseIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const CloseIcon: IconComponent = (props: IconProps) => <Icon {...props}>{\"\\ue5cd\"}</Icon
|
|
1
|
+
{"version":3,"file":"CloseIcon.js","sources":["../../../../../src/components/icon/icons/CloseIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const CloseIcon: IconComponent = (props: IconProps) => (\n <Icon {...props}>{\"\\ue5cd\"}</Icon>\n);\nCloseIcon.displayName = \"CloseIcon\";\n"],"names":["CloseIcon","props","Icon","children","displayName"],"mappings":"0EAIO,MAAMA,EAA4BC,KACpCC,EAAM,IAAGD,EAAQE,SAAS,MAE/BH,EAAUI,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopyIcon.js","sources":["../../../../../src/components/icon/icons/CopyIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const CopyIcon: IconComponent = (props: IconProps) => <Icon {...props}>{\"\\ue14d\"}</Icon
|
|
1
|
+
{"version":3,"file":"CopyIcon.js","sources":["../../../../../src/components/icon/icons/CopyIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const CopyIcon: IconComponent = (props: IconProps) => (\n <Icon {...props}>{\"\\ue14d\"}</Icon>\n);\nCopyIcon.displayName = \"CopyIcon\";\n"],"names":["CopyIcon","props","Icon","children","displayName"],"mappings":"0EAIO,MAAMA,EAA2BC,KACnCC,EAAM,IAAGD,EAAQE,SAAS,MAE/BH,EAASI,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DotsIcon.js","sources":["../../../../../src/components/icon/icons/DotsIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const DotsIcon: IconComponent = (props: IconProps) => <Icon {...props}>{\"\\ue5d3\"}</Icon
|
|
1
|
+
{"version":3,"file":"DotsIcon.js","sources":["../../../../../src/components/icon/icons/DotsIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const DotsIcon: IconComponent = (props: IconProps) => (\n <Icon {...props}>{\"\\ue5d3\"}</Icon>\n);\nDotsIcon.displayName = \"DotsIcon\";\n"],"names":["DotsIcon","props","Icon","children","displayName"],"mappings":"0EAIO,MAAMA,EAA2BC,KACnCC,EAAM,IAAGD,EAAQE,SAAS,MAE/BH,EAASI,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DragIcon.js","sources":["../../../../../src/components/icon/icons/DragIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const DragIcon: IconComponent = (props: IconProps) => <Icon {...props}>{\"\\ue945\"}</Icon
|
|
1
|
+
{"version":3,"file":"DragIcon.js","sources":["../../../../../src/components/icon/icons/DragIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const DragIcon: IconComponent = (props: IconProps) => (\n <Icon {...props}>{\"\\ue945\"}</Icon>\n);\nDragIcon.displayName = \"DragIcon\";\n"],"names":["DragIcon","props","Icon","children","displayName"],"mappings":"0EAIO,MAAMA,EAA2BC,KACnCC,EAAM,IAAGD,EAAQE,SAAS,MAE/BH,EAASI,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GreenCheckIcon.js","sources":["../../../../../src/components/icon/icons/GreenCheckIcon.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { FC } from \"react\";\nimport { IconProps } from \"../types.js\";\n\n/*\n * NOTE: The green-check and red-cross icons also exists as a copy in the jkl-list package.\n * If you're here to change them, consider changing them there as well, or\n * finding a technical solution to sharing the SVG markup\n */\nexport const GreenCheckIcon: FC<IconProps> = ({\n as = \"div\",\n bold = false,\n className,\n variant = \"inherit\",\n \"data-testid\": testId,\n style,\n ...rest\n}) => {\n const El = as;\n\n return (\n <El\n className={clsx(className
|
|
1
|
+
{"version":3,"file":"GreenCheckIcon.js","sources":["../../../../../src/components/icon/icons/GreenCheckIcon.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { FC } from \"react\";\nimport { IconProps } from \"../types.js\";\n\n/*\n * NOTE: The green-check and red-cross icons also exists as a copy in the jkl-list package.\n * If you're here to change them, consider changing them there as well, or\n * finding a technical solution to sharing the SVG markup\n */\nexport const GreenCheckIcon: FC<IconProps> = ({\n as = \"div\",\n bold = false,\n className,\n variant = \"inherit\",\n \"data-testid\": testId,\n style,\n ...rest\n}) => {\n const El = as;\n\n return (\n <El\n className={clsx(\n className,\n \"jkl-icon\",\n \"jkl-icon-green-check\",\n `jkl-icon--${variant}`,\n {\n \"jkl-icon--bold\": bold,\n },\n )}\n aria-hidden=\"true\"\n style={style}\n data-testid={testId}\n {...rest}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n width=\"24px\"\n height=\"24px\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path\n fillRule=\"evenodd\"\n d=\"M17.52 9.54 10.7 16.2l-4.21-4.1 1.04-1.08 3.17 3.09 5.79-5.65 1.04 1.08Z\"\n clipRule=\"evenodd\"\n />\n </svg>\n </El>\n );\n};\nGreenCheckIcon.displayName = \"GreenCheckIcon\";\n"],"names":["GreenCheckIcon","as","bold","className","variant","testId","style","rest","jsx","clsx","children","jsxs","xmlns","viewBox","width","height","cx","cy","r","fillRule","d","clipRule","displayName"],"mappings":"mGASO,MAAMA,EAAgC,EACzCC,GAAAA,EAAK,MACLC,KAAAA,GAAO,EACPC,UAAAA,EACAC,QAAAA,EAAU,UACV,cAAeC,EACfC,MAAAA,KACGC,KAKCC,EAHOP,EAGN,CACGE,UAAWM,EACPN,EACA,WACA,uBACA,aAAaC,IACb,CACI,iBAAkBF,IAG1B,cAAY,OACZI,MAAAA,EACA,cAAaD,KACTE,EAEJG,SAAAC,EAAC,MAAA,CACGC,MAAM,6BACNC,QAAQ,YACRC,MAAM,OACNC,OAAO,OAEPL,SAAA,CAAAF,EAAC,UAAOQ,GAAG,KAAKC,GAAG,KAAKC,EAAE,OAC1BV,EAAC,OAAA,CACGW,SAAS,UACTC,EAAE,2EACFC,SAAS,iBAM7BrB,EAAesB,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HamburgerIcon.js","sources":["../../../../../src/components/icon/icons/HamburgerIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const HamburgerIcon: IconComponent = (props: IconProps) => <Icon {...props}>{\"\\ue5d2\"}</Icon
|
|
1
|
+
{"version":3,"file":"HamburgerIcon.js","sources":["../../../../../src/components/icon/icons/HamburgerIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const HamburgerIcon: IconComponent = (props: IconProps) => (\n <Icon {...props}>{\"\\ue5d2\"}</Icon>\n);\nHamburgerIcon.displayName = \"HamburgerIcon\";\n"],"names":["HamburgerIcon","props","Icon","children","displayName"],"mappings":"0EAIO,MAAMA,EAAgCC,KACxCC,EAAM,IAAGD,EAAQE,SAAS,MAE/BH,EAAcI,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkIcon.js","sources":["../../../../../src/components/icon/icons/LinkIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const LinkIcon: IconComponent = (props: IconProps) => <Icon {...props}>{\"\\ue250\"}</Icon
|
|
1
|
+
{"version":3,"file":"LinkIcon.js","sources":["../../../../../src/components/icon/icons/LinkIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const LinkIcon: IconComponent = (props: IconProps) => (\n <Icon {...props}>{\"\\ue250\"}</Icon>\n);\nLinkIcon.displayName = \"LinkIcon\";\n"],"names":["LinkIcon","props","Icon","children","displayName"],"mappings":"0EAIO,MAAMA,EAA2BC,KACnCC,EAAM,IAAGD,EAAQE,SAAS,MAE/BH,EAASI,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MinusIcon.js","sources":["../../../../../src/components/icon/icons/MinusIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const MinusIcon: IconComponent = (props: IconProps) => <Icon {...props}>{\"\\ue15b\"}</Icon
|
|
1
|
+
{"version":3,"file":"MinusIcon.js","sources":["../../../../../src/components/icon/icons/MinusIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const MinusIcon: IconComponent = (props: IconProps) => (\n <Icon {...props}>{\"\\ue15b\"}</Icon>\n);\nMinusIcon.displayName = \"MinusIcon\";\n"],"names":["MinusIcon","props","Icon","children","displayName"],"mappings":"0EAIO,MAAMA,EAA4BC,KACpCC,EAAM,IAAGD,EAAQE,SAAS,MAE/BH,EAAUI,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PenIcon.js","sources":["../../../../../src/components/icon/icons/PenIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const PenIcon: IconComponent = (props: IconProps) => <Icon {...props}>{\"\\uf097\"}</Icon
|
|
1
|
+
{"version":3,"file":"PenIcon.js","sources":["../../../../../src/components/icon/icons/PenIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const PenIcon: IconComponent = (props: IconProps) => (\n <Icon {...props}>{\"\\uf097\"}</Icon>\n);\nPenIcon.displayName = \"PenIcon\";\n"],"names":["PenIcon","props","Icon","children","displayName"],"mappings":"0EAIO,MAAMA,EAA0BC,KAClCC,EAAM,IAAGD,EAAQE,SAAS,MAE/BH,EAAQI,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlusIcon.js","sources":["../../../../../src/components/icon/icons/PlusIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const PlusIcon: IconComponent = (props: IconProps) => <Icon {...props}>{\"\\ue145\"}</Icon
|
|
1
|
+
{"version":3,"file":"PlusIcon.js","sources":["../../../../../src/components/icon/icons/PlusIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const PlusIcon: IconComponent = (props: IconProps) => (\n <Icon {...props}>{\"\\ue145\"}</Icon>\n);\nPlusIcon.displayName = \"PlusIcon\";\n"],"names":["PlusIcon","props","Icon","children","displayName"],"mappings":"0EAIO,MAAMA,EAA2BC,KACnCC,EAAM,IAAGD,EAAQE,SAAS,MAE/BH,EAASI,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuestionIcon.js","sources":["../../../../../src/components/icon/icons/QuestionIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const QuestionIcon: IconComponent = (props: IconProps) => <Icon {...props}>{\"\\ue8fd\"}</Icon
|
|
1
|
+
{"version":3,"file":"QuestionIcon.js","sources":["../../../../../src/components/icon/icons/QuestionIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const QuestionIcon: IconComponent = (props: IconProps) => (\n <Icon {...props}>{\"\\ue8fd\"}</Icon>\n);\nQuestionIcon.displayName = \"QuestionIcon\";\n"],"names":["QuestionIcon","props","Icon","children","displayName"],"mappings":"0EAIO,MAAMA,EAA+BC,KACvCC,EAAM,IAAGD,EAAQE,SAAS,MAE/BH,EAAaI,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RedCrossIcon.js","sources":["../../../../../src/components/icon/icons/RedCrossIcon.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { FC } from \"react\";\nimport { IconProps } from \"../types.js\";\n\n/*\n * NOTE: The green-check and red-cross icons also exists as a copy in the jkl-list package.\n * If you're here to change them, consider changing them there as well, or\n * finding a technical solution to sharing the SVG markup\n */\nexport const RedCrossIcon: FC<IconProps> = ({\n as = \"div\",\n bold = false,\n className,\n variant = \"inherit\",\n \"data-testid\": testId,\n style,\n ...rest\n}) => {\n const El = as;\n\n return (\n <El\n className={clsx(className
|
|
1
|
+
{"version":3,"file":"RedCrossIcon.js","sources":["../../../../../src/components/icon/icons/RedCrossIcon.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { FC } from \"react\";\nimport { IconProps } from \"../types.js\";\n\n/*\n * NOTE: The green-check and red-cross icons also exists as a copy in the jkl-list package.\n * If you're here to change them, consider changing them there as well, or\n * finding a technical solution to sharing the SVG markup\n */\nexport const RedCrossIcon: FC<IconProps> = ({\n as = \"div\",\n bold = false,\n className,\n variant = \"inherit\",\n \"data-testid\": testId,\n style,\n ...rest\n}) => {\n const El = as;\n\n return (\n <El\n className={clsx(\n className,\n \"jkl-icon\",\n \"jkl-icon-red-cross\",\n `jkl-icon--${variant}`,\n {\n \"jkl-icon--bold\": bold,\n },\n )}\n aria-hidden=\"true\"\n style={style}\n data-testid={testId}\n {...rest}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n width=\"24px\"\n height=\"24px\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"m15.71 7.23 1.06 1.06-8.48 8.48-1.06-1.06 8.48-8.48Z\" />\n <path d=\"m8.29 7.23 8.48 8.48-1.06 1.06L7.23 8.3l1.06-1.06Z\" />\n </svg>\n </El>\n );\n};\nRedCrossIcon.displayName = \"RedCrossIcon\";\n"],"names":["RedCrossIcon","as","bold","className","variant","testId","style","rest","jsx","clsx","children","jsxs","xmlns","viewBox","width","height","cx","cy","r","d","displayName"],"mappings":"mGASO,MAAMA,EAA8B,EACvCC,GAAAA,EAAK,MACLC,KAAAA,GAAO,EACPC,UAAAA,EACAC,QAAAA,EAAU,UACV,cAAeC,EACfC,MAAAA,KACGC,KAKCC,EAHOP,EAGN,CACGE,UAAWM,EACPN,EACA,WACA,qBACA,aAAaC,IACb,CACI,iBAAkBF,IAG1B,cAAY,OACZI,MAAAA,EACA,cAAaD,KACTE,EAEJG,SAAAC,EAAC,MAAA,CACGC,MAAM,6BACNC,QAAQ,YACRC,MAAM,OACNC,OAAO,OAEPL,SAAA,CAAAF,EAAC,UAAOQ,GAAG,KAAKC,GAAG,KAAKC,EAAE,OAC1BV,EAAC,OAAK,CAAAW,EAAE,yDACRX,EAAC,OAAK,CAAAW,EAAE,4DAKxBnB,EAAaoB,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchIcon.js","sources":["../../../../../src/components/icon/icons/SearchIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const SearchIcon: IconComponent = (props: IconProps) => <Icon {...props}>{\"\\ue8b6\"}</Icon
|
|
1
|
+
{"version":3,"file":"SearchIcon.js","sources":["../../../../../src/components/icon/icons/SearchIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const SearchIcon: IconComponent = (props: IconProps) => (\n <Icon {...props}>{\"\\ue8b6\"}</Icon>\n);\nSearchIcon.displayName = \"SearchIcon\";\n"],"names":["SearchIcon","props","Icon","children","displayName"],"mappings":"0EAIO,MAAMA,EAA6BC,KACrCC,EAAM,IAAGD,EAAQE,SAAS,MAE/BH,EAAWI,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThumbDownIcon.js","sources":["../../../../../src/components/icon/icons/ThumbDownIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const ThumbDownIcon: IconComponent = (props: IconProps) => <Icon {...props}>{\"\\ue8db\"}</Icon
|
|
1
|
+
{"version":3,"file":"ThumbDownIcon.js","sources":["../../../../../src/components/icon/icons/ThumbDownIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const ThumbDownIcon: IconComponent = (props: IconProps) => (\n <Icon {...props}>{\"\\ue8db\"}</Icon>\n);\nThumbDownIcon.displayName = \"ThumbDownIcon\";\n"],"names":["ThumbDownIcon","props","Icon","children","displayName"],"mappings":"0EAIO,MAAMA,EAAgCC,KACxCC,EAAM,IAAGD,EAAQE,SAAS,MAE/BH,EAAcI,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThumbUpIcon.js","sources":["../../../../../src/components/icon/icons/ThumbUpIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const ThumbUpIcon: IconComponent = (props: IconProps) => <Icon {...props}>{\"\\ue8dc\"}</Icon
|
|
1
|
+
{"version":3,"file":"ThumbUpIcon.js","sources":["../../../../../src/components/icon/icons/ThumbUpIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const ThumbUpIcon: IconComponent = (props: IconProps) => (\n <Icon {...props}>{\"\\ue8dc\"}</Icon>\n);\nThumbUpIcon.displayName = \"ThumbUpIcon\";\n"],"names":["ThumbUpIcon","props","Icon","children","displayName"],"mappings":"0EAIO,MAAMA,EAA8BC,KACtCC,EAAM,IAAGD,EAAQE,SAAS,MAE/BH,EAAYI,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TrashCanIcon.js","sources":["../../../../../src/components/icon/icons/TrashCanIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const TrashCanIcon: IconComponent = (props: IconProps) => <Icon {...props}>{\"\\ue92e\"}</Icon
|
|
1
|
+
{"version":3,"file":"TrashCanIcon.js","sources":["../../../../../src/components/icon/icons/TrashCanIcon.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon, type IconComponent } from \"../Icon.js\";\nimport { type IconProps } from \"../types.js\";\n\nexport const TrashCanIcon: IconComponent = (props: IconProps) => (\n <Icon {...props}>{\"\\ue92e\"}</Icon>\n);\nTrashCanIcon.displayName = \"TrashCanIcon\";\n"],"names":["TrashCanIcon","props","Icon","children","displayName"],"mappings":"0EAIO,MAAMA,EAA+BC,KACvCC,EAAM,IAAGD,EAAQE,SAAS,MAE/BH,EAAaI,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrowHorizontalAnimated.js","sources":["../../../../../../src/components/icon/icons/animated/ArrowHorizontalAnimated.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { type FC } from \"react\";\nimport { IconVariant } from \"../../types.js\";\nimport { ArrowLeftIcon } from \"../ArrowLeftIcon.js\";\nimport { ArrowRightIcon } from \"../ArrowRightIcon.js\";\n\nexport interface ArrowHorizontalAnimatedProps {\n className?: string;\n pointingRight: boolean;\n variant?: IconVariant;\n bold?: boolean;\n}\n\nexport const ArrowHorizontalAnimated: FC<ArrowHorizontalAnimatedProps> = ({\n className,\n pointingRight,\n variant,\n bold = false,\n ...rest\n}) => (\n <div\n {...rest}\n className={clsx(\n \"jkl-icon\",\n \"jkl-icon--animated\",\n { \"jkl-icon--bold\": bold, [`jkl-icon--${variant}`]: !!variant },\n \"jkl-animated-horizontal-arrows\",\n className,\n )}\n >\n <div
|
|
1
|
+
{"version":3,"file":"ArrowHorizontalAnimated.js","sources":["../../../../../../src/components/icon/icons/animated/ArrowHorizontalAnimated.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { type FC } from \"react\";\nimport { IconVariant } from \"../../types.js\";\nimport { ArrowLeftIcon } from \"../ArrowLeftIcon.js\";\nimport { ArrowRightIcon } from \"../ArrowRightIcon.js\";\n\nexport interface ArrowHorizontalAnimatedProps {\n className?: string;\n pointingRight: boolean;\n variant?: IconVariant;\n bold?: boolean;\n}\n\nexport const ArrowHorizontalAnimated: FC<ArrowHorizontalAnimatedProps> = ({\n className,\n pointingRight,\n variant,\n bold = false,\n ...rest\n}) => (\n <div\n {...rest}\n className={clsx(\n \"jkl-icon\",\n \"jkl-icon--animated\",\n { \"jkl-icon--bold\": bold, [`jkl-icon--${variant}`]: !!variant },\n \"jkl-animated-horizontal-arrows\",\n className,\n )}\n >\n <div\n className=\"jkl-animated-horizontal-arrows__slider\"\n data-show={pointingRight ? \"right\" : \"left\"}\n >\n <ArrowLeftIcon\n className=\"jkl-animated-horizontal-arrows__arrow\"\n variant={variant}\n bold={bold}\n />\n <ArrowRightIcon\n className=\"jkl-animated-horizontal-arrows__arrow\"\n variant={variant}\n bold={bold}\n />\n </div>\n </div>\n);\n\nArrowHorizontalAnimated.displayName = \"ArrowHorizontalAnimated\";\n"],"names":["ArrowHorizontalAnimated","className","pointingRight","variant","bold","rest","jsx","clsx","children","jsxs","ArrowLeftIcon","ArrowRightIcon","displayName"],"mappings":"gNAaO,MAAMA,EAA4D,EACrEC,UAAAA,EACAC,cAAAA,EACAC,QAAAA,EACAC,KAAAA,GAAO,KACJC,KAEHC,EAAC,MAAA,IACOD,EACJJ,UAAWM,EACP,WACA,qBACA,CAAE,iBAAkBH,EAAM,CAAC,aAAaD,OAAcA,GACtD,iCACAF,GAGJO,SAAAC,EAAC,MAAA,CACGR,UAAU,yCACV,YAAWC,EAAgB,QAAU,OAErCM,SAAA,CAAAF,EAACI,EAAA,CACGT,UAAU,wCACVE,QAAAA,EACAC,KAAAA,IAEJE,EAACK,EAAA,CACGV,UAAU,wCACVE,QAAAA,EACAC,KAAAA,SAMhBJ,EAAwBY,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrowVerticalAnimated.js","sources":["../../../../../../src/components/icon/icons/animated/ArrowVerticalAnimated.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { type FC } from \"react\";\nimport { IconVariant } from \"../../types.js\";\nimport { ArrowDownIcon } from \"../ArrowDownIcon.js\";\nimport { ArrowUpIcon } from \"../ArrowUpIcon.js\";\n\nexport interface ArrowVerticalAnimatedProps {\n className?: string;\n pointingDown: boolean;\n variant?: IconVariant;\n bold?: boolean;\n}\n\nexport const ArrowVerticalAnimated: FC<ArrowVerticalAnimatedProps> = ({\n className,\n pointingDown,\n variant,\n bold = false,\n ...rest\n}) => (\n <div\n {...rest}\n className={clsx(\n \"jkl-icon\",\n \"jkl-icon--animated\",\n {\n \"jkl-icon--bold\": bold,\n [`jkl-icon--${variant}`]: !!variant,\n },\n \"jkl-animated-vertical-arrows\",\n className,\n )}\n >\n <div
|
|
1
|
+
{"version":3,"file":"ArrowVerticalAnimated.js","sources":["../../../../../../src/components/icon/icons/animated/ArrowVerticalAnimated.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { type FC } from \"react\";\nimport { IconVariant } from \"../../types.js\";\nimport { ArrowDownIcon } from \"../ArrowDownIcon.js\";\nimport { ArrowUpIcon } from \"../ArrowUpIcon.js\";\n\nexport interface ArrowVerticalAnimatedProps {\n className?: string;\n pointingDown: boolean;\n variant?: IconVariant;\n bold?: boolean;\n}\n\nexport const ArrowVerticalAnimated: FC<ArrowVerticalAnimatedProps> = ({\n className,\n pointingDown,\n variant,\n bold = false,\n ...rest\n}) => (\n <div\n {...rest}\n className={clsx(\n \"jkl-icon\",\n \"jkl-icon--animated\",\n {\n \"jkl-icon--bold\": bold,\n [`jkl-icon--${variant}`]: !!variant,\n },\n \"jkl-animated-vertical-arrows\",\n className,\n )}\n >\n <div\n className=\"jkl-animated-vertical-arrows__slider\"\n data-show={pointingDown ? \"down\" : \"up\"}\n >\n <ArrowUpIcon\n className=\"jkl-animated-vertical-arrows__arrow\"\n variant={variant}\n bold={bold}\n />\n <ArrowDownIcon\n className=\"jkl-animated-vertical-arrows__arrow\"\n variant={variant}\n bold={bold}\n />\n </div>\n </div>\n);\n\nArrowVerticalAnimated.displayName = \"ArrowVerticalAnimated\";\n"],"names":["ArrowVerticalAnimated","className","pointingDown","variant","bold","rest","jsx","clsx","children","jsxs","ArrowUpIcon","ArrowDownIcon","displayName"],"mappings":"0MAaO,MAAMA,EAAwD,EACjEC,UAAAA,EACAC,aAAAA,EACAC,QAAAA,EACAC,KAAAA,GAAO,KACJC,KAEHC,EAAC,MAAA,IACOD,EACJJ,UAAWM,EACP,WACA,qBACA,CACI,iBAAkBH,EAClB,CAAC,aAAaD,OAAcA,GAEhC,+BACAF,GAGJO,SAAAC,EAAC,MAAA,CACGR,UAAU,uCACV,YAAWC,EAAe,OAAS,KAEnCM,SAAA,CAAAF,EAACI,EAAA,CACGT,UAAU,sCACVE,QAAAA,EACAC,KAAAA,IAEJE,EAACK,EAAA,CACGV,UAAU,sCACVE,QAAAA,EACAC,KAAAA,SAMhBJ,EAAsBY,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlusRemoveAnimated.js","sources":["../../../../../../src/components/icon/icons/animated/PlusRemoveAnimated.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { type FC } from \"react\";\nimport { IconVariant } from \"../../types.js\";\nimport { PlusIcon } from \"../PlusIcon.js\";\n\nexport interface PlusRemoveAnimatedProps {\n className?: string;\n isPlus: boolean;\n variant?: IconVariant;\n bold?: boolean;\n}\n\nexport const PlusRemoveAnimated: FC<PlusRemoveAnimatedProps> = ({\n className,\n isPlus,\n variant,\n bold = false,\n ...rest\n}) => (\n <div\n {...rest}\n className={clsx(\n \"jkl-icon\",\n \"jkl-icon--animated\",\n {\n \"jkl-icon--bold\": bold,\n [`jkl-icon--${variant}`]: !!variant,\n },\n className,\n )}\n >\n <PlusIcon\n variant={variant}\n bold={bold}\n className={clsx(\"jkl-icons-animated__plus\"
|
|
1
|
+
{"version":3,"file":"PlusRemoveAnimated.js","sources":["../../../../../../src/components/icon/icons/animated/PlusRemoveAnimated.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { type FC } from \"react\";\nimport { IconVariant } from \"../../types.js\";\nimport { PlusIcon } from \"../PlusIcon.js\";\n\nexport interface PlusRemoveAnimatedProps {\n className?: string;\n isPlus: boolean;\n variant?: IconVariant;\n bold?: boolean;\n}\n\nexport const PlusRemoveAnimated: FC<PlusRemoveAnimatedProps> = ({\n className,\n isPlus,\n variant,\n bold = false,\n ...rest\n}) => (\n <div\n {...rest}\n className={clsx(\n \"jkl-icon\",\n \"jkl-icon--animated\",\n {\n \"jkl-icon--bold\": bold,\n [`jkl-icon--${variant}`]: !!variant,\n },\n className,\n )}\n >\n <PlusIcon\n variant={variant}\n bold={bold}\n className={clsx(\n \"jkl-icons-animated__plus\",\n `jkl-icons-animated__plus--${isPlus ? \"plus\" : \"close\"}`,\n )}\n />\n </div>\n);\n\nPlusRemoveAnimated.displayName = \"PlusRemoveAnimated\";\n"],"names":["PlusRemoveAnimated","className","isPlus","variant","bold","rest","jsx","clsx","children","PlusIcon","displayName"],"mappings":"sIAYO,MAAMA,EAAkD,EAC3DC,UAAAA,EACAC,OAAAA,EACAC,QAAAA,EACAC,KAAAA,GAAO,KACJC,KAEHC,EAAC,MAAA,IACOD,EACJJ,UAAWM,EACP,WACA,qBACA,CACI,iBAAkBH,EAClB,CAAC,aAAaD,OAAcA,GAEhCF,GAGJO,SAAAF,EAACG,EAAA,CACGN,QAAAA,EACAC,KAAAA,EACAH,UAAWM,EACP,2BACA,8BAA6BL,EAAS,OAAS,cAM/DF,EAAmBU,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.js","sources":["../../../../src/components/icon-button/IconButton.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { ButtonHTMLAttributes, forwardRef } from \"react\";\nimport { Density } from \"../../core/types.js\";\n\nexport interface IconButtonProps
|
|
1
|
+
{"version":3,"file":"IconButton.js","sources":["../../../../src/components/icon-button/IconButton.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { ButtonHTMLAttributes, forwardRef } from \"react\";\nimport { Density } from \"../../core/types.js\";\n\nexport interface IconButtonProps\n extends Exclude<ButtonHTMLAttributes<HTMLButtonElement>, \"disabled\"> {\n density?: Density;\n}\n\nexport const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(\n (props, ref) => {\n const { className, children, density, ...rest } = props;\n return (\n <button\n ref={ref}\n type=\"button\"\n className={clsx(\"jkl-icon-button\", className)}\n data-testid=\"jkl-icon-button\"\n data-density={density}\n {...rest}\n >\n {children}\n </button>\n );\n },\n);\n\nIconButton.displayName = \"IconButton\";\n"],"names":["IconButton","forwardRef","props","ref","className","children","density","rest","jsx","type","clsx","displayName"],"mappings":"yHASO,MAAMA,EAAaC,GACtB,CAACC,EAAOC,KACE,MAAEC,UAAAA,EAAWC,SAAAA,EAAUC,QAAAA,KAAYC,GAASL,EAE9C,OAAAM,EAAC,SAAA,CACGL,IAAAA,EACAM,KAAK,SACLL,UAAWM,EAAK,kBAAmBN,GACnC,cAAY,kBACZ,eAAcE,KACVC,EAEHF,SAAAA,GAAA,IAMjBL,EAAWW,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Image.js","sources":["../../../../src/components/image/Image.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { FC } from \"react\";\nimport { useElementDimensions } from \"../../hooks/useElementDimensions/useElementDimensions.js\";\nimport { useImageLoadingStatus } from \"./useImageLoadingStatus.js\";\n\nexport interface ImageProps {\n src: string;\n srcSet?: string;\n placeholder?: string;\n /**\n * Send inn en tom streng hvis bildet kun er dekorativt. Sannsynligvis bør du beskrive innholdet i bildet så en person med nedsatt syn får en fullgod opplevelse av siden.\n * Les mer på https://jokul.fremtind.no/universell-utforming/guide#uu/dekorativt-innhold\n */\n alt: string;\n className?: string;\n}\n\nexport const Image: FC<ImageProps> = ({
|
|
1
|
+
{"version":3,"file":"Image.js","sources":["../../../../src/components/image/Image.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { FC } from \"react\";\nimport { useElementDimensions } from \"../../hooks/useElementDimensions/useElementDimensions.js\";\nimport { useImageLoadingStatus } from \"./useImageLoadingStatus.js\";\n\nexport interface ImageProps {\n src: string;\n srcSet?: string;\n placeholder?: string;\n /**\n * Send inn en tom streng hvis bildet kun er dekorativt. Sannsynligvis bør du beskrive innholdet i bildet så en person med nedsatt syn får en fullgod opplevelse av siden.\n * Les mer på https://jokul.fremtind.no/universell-utforming/guide#uu/dekorativt-innhold\n */\n alt: string;\n className?: string;\n}\n\nexport const Image: FC<ImageProps> = ({\n className,\n placeholder,\n alt,\n ...imageProperties\n}) => {\n const [imageRef, imageLoaded] = useImageLoadingStatus();\n const [containerRef, dimensions] =\n useElementDimensions<HTMLDivElement>(400);\n\n return (\n <div\n ref={containerRef}\n className={clsx(\"jkl-image\", className, {\n \"jkl-image--loading\": !imageLoaded,\n })}\n >\n {/* Placeholder er bevisst uten loading og decoding for å vises umiddelbart */}\n <img\n className=\"jkl-image__placeholder\"\n alt={alt}\n src={placeholder || imageProperties.src}\n />\n <img\n alt={alt}\n className=\"jkl-image__image\"\n data-testid=\"jkl-image__image\"\n ref={imageRef}\n sizes={`${dimensions.width}px`}\n loading=\"lazy\"\n decoding=\"async\"\n {...imageProperties}\n />\n </div>\n );\n};\n"],"names":["Image","className","placeholder","alt","imageProperties","imageRef","imageLoaded","useImageLoadingStatus","containerRef","dimensions","useElementDimensions","jsxs","ref","clsx","children","jsx","src","sizes","width","loading","decoding"],"mappings":"mQAiBO,MAAMA,EAAwB,EACjCC,UAAAA,EACAC,YAAAA,EACAC,IAAAA,KACGC,MAEG,MAACC,EAAUC,GAAeC,KACzBC,EAAcC,GACjBC,EAAqC,KAGrC,OAAAC,EAAC,MAAA,CACGC,IAAKJ,EACLP,UAAWY,EAAK,YAAaZ,EAAW,CACpC,sBAAuBK,IAI3BQ,SAAA,CAAAC,EAAC,MAAA,CACGd,UAAU,yBACVE,IAAAA,EACAa,IAAKd,GAAeE,EAAgBY,MAExCD,EAAC,MAAA,CACGZ,IAAAA,EACAF,UAAU,mBACV,cAAY,mBACZW,IAAKP,EACLY,MAAO,GAAGR,EAAWS,UACrBC,QAAQ,OACRC,SAAS,WACLhB,MACR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useImageLoadingStatus.js","sources":["../../../../src/components/image/useImageLoadingStatus.ts"],"sourcesContent":["import { RefObject, useEffect, useRef, useState } from \"react\";\n\nconst doWhenImageLoaded = (image: HTMLImageElement, callback?: () => void) => {\n let timeout: number | undefined;\n\n function checkLoaded() {\n if (image.complete) {\n clearTimeout(timeout);\n callback?.();\n return;\n }\n timeout = window.setTimeout(checkLoaded, 50);\n }\n\n checkLoaded();\n};\n\nexport const useImageLoadingStatus = (callback?: () => void): [RefObject<HTMLImageElement>, boolean] => {\n const imageRef = useRef<HTMLImageElement>(null);\n const [imageLoaded, setImageLoaded] = useState(false);\n\n useEffect(() => {\n imageRef.current &&\n doWhenImageLoaded(imageRef.current, () => {\n setImageLoaded(true);\n callback?.();\n });\n }, [callback]);\n\n return [imageRef, imageLoaded];\n};\n"],"names":["useImageLoadingStatus","callback","imageRef","useRef","imageLoaded","setImageLoaded","useState","useEffect","current","image","timeout","checkLoaded","complete","window","setTimeout","doWhenImageLoaded"],"mappings":"4DAEA,MAeaA,
|
|
1
|
+
{"version":3,"file":"useImageLoadingStatus.js","sources":["../../../../src/components/image/useImageLoadingStatus.ts"],"sourcesContent":["import { RefObject, useEffect, useRef, useState } from \"react\";\n\nconst doWhenImageLoaded = (image: HTMLImageElement, callback?: () => void) => {\n let timeout: number | undefined;\n\n function checkLoaded() {\n if (image.complete) {\n clearTimeout(timeout);\n callback?.();\n return;\n }\n timeout = window.setTimeout(checkLoaded, 50);\n }\n\n checkLoaded();\n};\n\nexport const useImageLoadingStatus = (\n callback?: () => void,\n): [RefObject<HTMLImageElement>, boolean] => {\n const imageRef = useRef<HTMLImageElement>(null);\n const [imageLoaded, setImageLoaded] = useState(false);\n\n useEffect(() => {\n imageRef.current &&\n doWhenImageLoaded(imageRef.current, () => {\n setImageLoaded(true);\n callback?.();\n });\n }, [callback]);\n\n return [imageRef, imageLoaded];\n};\n"],"names":["useImageLoadingStatus","callback","imageRef","useRef","imageLoaded","setImageLoaded","useState","useEffect","current","image","timeout","checkLoaded","complete","window","setTimeout","doWhenImageLoaded"],"mappings":"4DAEA,MAeaA,EACTC,IAEMC,MAAAA,EAAWC,EAAyB,OACnCC,EAAaC,GAAkBC,GAAS,GAE/C,OAAAC,GAAU,KACNL,EAASM,SAtBS,EAACC,EAAyBR,KAC5CS,IAAAA,GAEJ,SAASC,IACL,GAAIF,EAAMG,SAGN,OAFaF,aAAAA,QACF,MAAAT,GAAAA,KAGLS,EAAAG,OAAOC,WAAWH,EAAa,GAC7C,CAEYA,IAWJI,CAAkBb,EAASM,SAAS,KAChCH,GAAe,GACJ,MAAAJ,GAAAA,GAAAA,GACd,GACN,CAACA,IAEG,CAACC,EAAUE,EAAW"}
|
|
@@ -37,4 +37,4 @@ export * from './text-input/index.js';
|
|
|
37
37
|
export * from './toast/index.js';
|
|
38
38
|
export * from './toggle-switch/index.js';
|
|
39
39
|
export * from './tooltip/index.js';
|
|
40
|
-
export { ScreenReaderOnly, type ScreenReaderOnlyProps } from './ScreenReaderOnly.js';
|
|
40
|
+
export { ScreenReaderOnly, type ScreenReaderOnlyProps, } from './ScreenReaderOnly.js';
|