@fremtind/jokul 0.43.0 → 0.43.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -16
- package/build/build-stats.html +1 -1
- package/build/cjs/components/accordion/AccordionItem.cjs.map +1 -1
- package/build/cjs/components/autosuggest/Autosuggest.cjs +1 -1
- package/build/cjs/components/autosuggest/Autosuggest.cjs.map +1 -1
- package/build/cjs/components/autosuggest/BaseAutosuggest.cjs +2 -2
- package/build/cjs/components/autosuggest/BaseAutosuggest.cjs.map +1 -1
- package/build/cjs/components/autosuggest/ControllerButton.cjs.map +1 -1
- package/build/cjs/components/autosuggest/utils.cjs.map +1 -1
- package/build/cjs/components/breadcrumb/Breadcrumb.cjs.map +1 -1
- package/build/cjs/components/button/Button.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/NavCard.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/cookie-consent/CookieConsent.cjs.map +1 -1
- package/build/cjs/components/cookie-consent/CookieConsentContext.cjs.map +1 -1
- package/build/cjs/components/cookie-consent/cookieConsentUtils.cjs.map +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/expander/ExpandablePanel.cjs.map +1 -1
- package/build/cjs/components/expander/ExpandablePanelContent.cjs.map +1 -1
- package/build/cjs/components/expander/Expander.cjs.map +1 -1
- package/build/cjs/components/expander/deprecated/ExpandSection.cjs.map +1 -1
- package/build/cjs/components/expander/deprecated/Expander.cjs.map +1 -1
- package/build/cjs/components/feedback/Feedback.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/useFollowup.cjs.map +1 -1
- package/build/cjs/components/feedback/main-question/MainQuestion.cjs.map +1 -1
- package/build/cjs/components/feedback/main-question/useMainQuestion.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/file-input/File.cjs.map +1 -1
- package/build/cjs/components/file-input/FileInput.cjs.map +1 -1
- package/build/cjs/components/file-input/internal/Dropzone.cjs.map +1 -1
- package/build/cjs/components/file-input/internal/Input.cjs.map +1 -1
- package/build/cjs/components/file-input/internal/fileInputContext.cjs.map +1 -1
- package/build/cjs/components/file-input/internal/validateFile.cjs.map +1 -1
- package/build/cjs/components/flex/Flex.cjs.map +1 -1
- package/build/cjs/components/icon/icons/GreenCheckIcon.cjs.map +1 -1
- package/build/cjs/components/icon/icons/RedCrossIcon.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/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-panel/RadioPanel.cjs.map +1 -1
- package/build/cjs/components/input-panel/RadioPanelGroup.cjs.map +1 -1
- package/build/cjs/components/link-list/LinkList.cjs.map +1 -1
- package/build/cjs/components/list/List.cjs.map +1 -1
- package/build/cjs/components/loader/Loader.cjs.map +1 -1
- package/build/cjs/components/loader/skeletons/SkeletonAnimation.cjs.map +1 -1
- package/build/cjs/components/loader/skeletons/SkeletonLabel.cjs.map +1 -1
- package/build/cjs/components/loader/skeletons/SkeletonTextArea.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/useMenuWideEvents.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/modal/Modal.cjs.map +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.map +1 -1
- package/build/cjs/components/progress-bar/Countdown.cjs.map +1 -1
- package/build/cjs/components/progress-bar/ProgressBar.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/select/NativeSelect.cjs.map +1 -1
- package/build/cjs/components/select/Select.cjs.map +1 -1
- package/build/cjs/components/system-message/SystemMessage.cjs.map +1 -1
- package/build/cjs/components/system-message/common/MessageIcon.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/TableCell.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/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/TabPanel.cjs.map +1 -1
- package/build/cjs/components/tabs/Tabs.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/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/core/index.cjs +1 -1
- package/build/cjs/core/tailwind/tailwindPreset.cjs +1 -1
- package/build/cjs/core/tailwind/tailwindPreset.cjs.map +1 -1
- package/build/cjs/hooks/useAnimatedDetails/useAnimatedDetails.cjs.map +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/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/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/useKeyListener/useKeyListener.cjs.map +1 -1
- package/build/cjs/hooks/useListNavigation/useListNavigation.cjs.map +1 -1
- package/build/cjs/hooks/useMutationObserver/useMutationObserver.cjs.map +1 -1
- package/build/cjs/hooks/useProgressiveImg/useProgressiveImg.cjs.map +1 -1
- package/build/cjs/hooks/useScreen/state.cjs.map +1 -1
- package/build/cjs/hooks/useScreen/useScreen.cjs +1 -1
- package/build/cjs/hooks/useScreen/useScreen.cjs.map +1 -1
- package/build/cjs/index.cjs +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/fodselsnummer/formatFodselsnummer.cjs.map +1 -1
- 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/registerWithMask.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/mergeProps.cjs.map +1 -1
- package/build/cjs/utilities/tabListener.cjs.map +1 -1
- package/build/cjs/utilities/validators/isValidKortnummer/isValidKortnummer.cjs.map +1 -1
- package/build/es/components/accordion/AccordionItem.js.map +1 -1
- package/build/es/components/autosuggest/Autosuggest.js +1 -1
- package/build/es/components/autosuggest/Autosuggest.js.map +1 -1
- package/build/es/components/autosuggest/BaseAutosuggest.js +2 -2
- package/build/es/components/autosuggest/BaseAutosuggest.js.map +1 -1
- package/build/es/components/autosuggest/utils.js.map +1 -1
- package/build/es/components/breadcrumb/Breadcrumb.js.map +1 -1
- package/build/es/components/button/Button.js.map +1 -1
- package/build/es/components/card/NavCard.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/cookie-consent/CookieConsent.js.map +1 -1
- package/build/es/components/cookie-consent/CookieConsentContext.js.map +1 -1
- package/build/es/components/cookie-consent/cookieConsentUtils.js.map +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.js.map +1 -1
- package/build/es/components/expander/ExpandablePanelContent.js.map +1 -1
- package/build/es/components/expander/Expander.js.map +1 -1
- package/build/es/components/expander/deprecated/ExpandSection.js.map +1 -1
- package/build/es/components/expander/deprecated/Expander.js.map +1 -1
- package/build/es/components/feedback/Feedback.js.map +1 -1
- package/build/es/components/feedback/followup/useFollowup.js.map +1 -1
- package/build/es/components/feedback/main-question/useMainQuestion.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/file-input/File.js.map +1 -1
- package/build/es/components/file-input/FileInput.js.map +1 -1
- package/build/es/components/file-input/internal/Dropzone.js.map +1 -1
- package/build/es/components/file-input/internal/Input.js.map +1 -1
- package/build/es/components/flex/Flex.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/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-panel/RadioPanel.js.map +1 -1
- package/build/es/components/loader/Loader.js.map +1 -1
- package/build/es/components/loader/skeletons/SkeletonAnimation.js.map +1 -1
- package/build/es/components/loader/skeletons/SkeletonLabel.js.map +1 -1
- package/build/es/components/loader/skeletons/SkeletonTextArea.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/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/useMenuWideEvents.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/pagination/Pagination.js.map +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/progress-bar/ProgressBar.js.map +1 -1
- package/build/es/components/radio-button/BaseRadioButton.js.map +1 -1
- package/build/es/components/radio-button/RadioButtonGroup.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/system-message/SystemMessage.js.map +1 -1
- package/build/es/components/system-message/common/MessageIcon.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/TableCell.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/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/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/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/Tooltip.js.map +1 -1
- package/build/es/components/tooltip/TooltipTrigger.js.map +1 -1
- package/build/es/core/index.js +1 -1
- package/build/es/core/tailwind/tailwindPreset.js +1 -1
- package/build/es/core/tailwind/tailwindPreset.js.map +1 -1
- package/build/es/hooks/useAnimatedDetails/useAnimatedDetails.js.map +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/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/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/useKeyListener/useKeyListener.js.map +1 -1
- package/build/es/hooks/useListNavigation/useListNavigation.js.map +1 -1
- package/build/es/hooks/useMutationObserver/useMutationObserver.js.map +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 +1 -1
- package/build/es/hooks/useScreen/useScreen.js.map +1 -1
- package/build/es/index.js +1 -1
- package/build/es/utilities/formatters/util/registerWithMask.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/mergeProps.js.map +1 -1
- package/build/es/utilities/tabListener.js.map +1 -1
- package/build/es/utilities/validators/isValidKortnummer/isValidKortnummer.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/input-panel/checkbox-panel.css +2 -2
- package/styles/components/input-panel/checkbox-panel.min.css +1 -1
- package/styles/components/input-panel/radio-panel.css +2 -2
- package/styles/components/input-panel/radio-panel.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/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 +37 -37
- package/styles/styles.min.css +1 -1
- package/build/cjs/core/tailwind/plugins/typographyPlugin.cjs +0 -2
- package/build/cjs/core/tailwind/plugins/typographyPlugin.cjs.map +0 -1
- package/build/cjs/core/tailwind/plugins/typographyPlugin.d.cts +0 -2
- package/build/es/core/tailwind/plugins/typographyPlugin.d.ts +0 -2
- package/build/es/core/tailwind/plugins/typographyPlugin.js +0 -2
- package/build/es/core/tailwind/plugins/typographyPlugin.js.map +0 -1
- package/build/tailwindPreset-CSQrgZ57.cjs +0 -2
- package/build/tailwindPreset-CSQrgZ57.cjs.map +0 -1
- package/build/tailwindPreset-D4TYL0kz.js +0 -2
- package/build/tailwindPreset-D4TYL0kz.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GreenCheckIcon.cjs","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","El","jsx","clsx","children","jsxs","xmlns","viewBox","width","height","cx","cy","r","fillRule","d","clipRule","displayName"],"mappings":"gKASaA,EAAgC,EACzCC,GAAAA,EAAK,MACLC,KAAAA,GAAO,EACPC,UAAAA,EACAC,QAAAA,EAAU,UACV,cAAeC,EACfC,MAAAA,KACGC,MAEH,MAAMC,EAAKP,EAGP,OAAAQ,EAAAA,IAACD,EAAA,CACGL,UAAWO,EAAAA,KACPP,EACA,WACA,uBACA,aAAaC,IACb,CACI,iBAAkBF,IAG1B,cAAY,OACZI,MAAAA,EACA,cAAaD,KACTE,EAEJI,SAAAC,EAAAA,KAAC,MAAA,CACGC,MAAM,6BACNC,QAAQ,YACRC,MAAM,OACNC,OAAO,OAEPL,SAAA,CAAAF,MAAC,UAAOQ,GAAG,KAAKC,GAAG,KAAKC,EAAE,OAC1BV,EAAAA,IAAC,OAAA,CACGW,SAAS,UACTC,EAAE,2EACFC,SAAS,
|
|
1
|
+
{"version":3,"file":"GreenCheckIcon.cjs","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","El","jsx","clsx","children","jsxs","xmlns","viewBox","width","height","cx","cy","r","fillRule","d","clipRule","displayName"],"mappings":"gKASaA,EAAgC,EACzCC,GAAAA,EAAK,MACLC,KAAAA,GAAO,EACPC,UAAAA,EACAC,QAAAA,EAAU,UACV,cAAeC,EACfC,MAAAA,KACGC,MAEH,MAAMC,EAAKP,EAGP,OAAAQ,EAAAA,IAACD,EAAA,CACGL,UAAWO,EAAAA,KACPP,EACA,WACA,uBACA,aAAaC,IACb,CACI,iBAAkBF,IAG1B,cAAY,OACZI,MAAAA,EACA,cAAaD,KACTE,EAEJI,SAAAC,EAAAA,KAAC,MAAA,CACGC,MAAM,6BACNC,QAAQ,YACRC,MAAM,OACNC,OAAO,OAEPL,SAAA,CAAAF,MAAC,UAAOQ,GAAG,KAAKC,GAAG,KAAKC,EAAE,OAC1BV,EAAAA,IAAC,OAAA,CACGW,SAAS,UACTC,EAAE,2EACFC,SAAS,gBAEjB,EAIZtB,EAAeuB,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RedCrossIcon.cjs","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","El","jsx","clsx","children","jsxs","xmlns","viewBox","width","height","cx","cy","r","d","displayName"],"mappings":"gKASaA,EAA8B,EACvCC,GAAAA,EAAK,MACLC,KAAAA,GAAO,EACPC,UAAAA,EACAC,QAAAA,EAAU,UACV,cAAeC,EACfC,MAAAA,KACGC,MAEH,MAAMC,EAAKP,EAGP,OAAAQ,EAAAA,IAACD,EAAA,CACGL,UAAWO,EAAAA,KACPP,EACA,WACA,qBACA,aAAaC,IACb,CACI,iBAAkBF,IAG1B,cAAY,OACZI,MAAAA,EACA,cAAaD,KACTE,EAEJI,SAAAC,EAAAA,KAAC,MAAA,CACGC,MAAM,6BACNC,QAAQ,YACRC,MAAM,OACNC,OAAO,OAEPL,SAAA,CAAAF,MAAC,UAAOQ,GAAG,KAAKC,GAAG,KAAKC,EAAE,OAC1BV,EAAAA,IAAC,OAAK,CAAAW,EAAE,yDACRX,EAAAA,IAAC,OAAK,CAAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"RedCrossIcon.cjs","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","El","jsx","clsx","children","jsxs","xmlns","viewBox","width","height","cx","cy","r","d","displayName"],"mappings":"gKASaA,EAA8B,EACvCC,GAAAA,EAAK,MACLC,KAAAA,GAAO,EACPC,UAAAA,EACAC,QAAAA,EAAU,UACV,cAAeC,EACfC,MAAAA,KACGC,MAEH,MAAMC,EAAKP,EAGP,OAAAQ,EAAAA,IAACD,EAAA,CACGL,UAAWO,EAAAA,KACPP,EACA,WACA,qBACA,aAAaC,IACb,CACI,iBAAkBF,IAG1B,cAAY,OACZI,MAAAA,EACA,cAAaD,KACTE,EAEJI,SAAAC,EAAAA,KAAC,MAAA,CACGC,MAAM,6BACNC,QAAQ,YACRC,MAAM,OACNC,OAAO,OAEPL,SAAA,CAAAF,MAAC,UAAOQ,GAAG,KAAKC,GAAG,KAAKC,EAAE,OAC1BV,EAAAA,IAAC,OAAK,CAAAW,EAAE,yDACRX,EAAAA,IAAC,OAAK,CAAAW,EAAE,2DACZ,EAIZpB,EAAaqB,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.cjs","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":"6JASaA,mBAAaC,YACtB,CAACC,EAAOC,KACJ,MAAQC,UAAAA,EAAWC,SAAAA,EAAUC,QAAAA,KAAYC,GAASL,EAE9C,OAAAM,EAAAA,IAAC,SAAA,CACGL,IAAAA,EACAM,KAAK,SACLL,UAAWM,EAAAA,KAAK,kBAAmBN,GACnC,cAAY,kBACZ,eAAcE,KACVC,EAEHF,SAAAA,
|
|
1
|
+
{"version":3,"file":"IconButton.cjs","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":"6JASaA,mBAAaC,YACtB,CAACC,EAAOC,KACJ,MAAQC,UAAAA,EAAWC,SAAAA,EAAUC,QAAAA,KAAYC,GAASL,EAE9C,OAAAM,EAAAA,IAAC,SAAA,CACGL,IAAAA,EACAM,KAAK,SACLL,UAAWM,EAAAA,KAAK,kBAAmBN,GACnC,cAAY,kBACZ,eAAcE,KACVC,EAEHF,SAAAA,GAAA,IAMjBL,EAAWW,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Image.cjs","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":["className","placeholder","alt","imageProperties","imageRef","imageLoaded","useImageLoadingStatus","containerRef","dimensions","useElementDimensions","jsxs","ref","clsx","children","jsx","src","sizes","width","loading","decoding"],"mappings":"2RAiBqC,EACjCA,UAAAA,EACAC,YAAAA,EACAC,IAAAA,KACGC,MAEH,MAAOC,EAAUC,GAAeC,
|
|
1
|
+
{"version":3,"file":"Image.cjs","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":["className","placeholder","alt","imageProperties","imageRef","imageLoaded","useImageLoadingStatus","containerRef","dimensions","useElementDimensions","jsxs","ref","clsx","children","jsx","src","sizes","width","loading","decoding"],"mappings":"2RAiBqC,EACjCA,UAAAA,EACAC,YAAAA,EACAC,IAAAA,KACGC,MAEH,MAAOC,EAAUC,GAAeC,EAAsBA,yBAC/CC,EAAcC,GACjBC,uBAAqC,KAGrC,OAAAC,EAAAA,KAAC,MAAA,CACGC,IAAKJ,EACLP,UAAWY,EAAAA,KAAK,YAAaZ,EAAW,CACpC,sBAAuBK,IAI3BQ,SAAA,CAAAC,EAAAA,IAAC,MAAA,CACGd,UAAU,yBACVE,IAAAA,EACAa,IAAKd,GAAeE,EAAgBY,MAExCD,EAAAA,IAAC,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.cjs","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":["callback","imageRef","useRef","imageLoaded","setImageLoaded","useState","useEffect","current","image","timeout","checkLoaded","complete","clearTimeout","window","setTimeout","doWhenImageLoaded"],"mappings":"uIAkBIA,IAEM,MAAAC,EAAWC,SAAyB,OACnCC,EAAaC,GAAkBC,
|
|
1
|
+
{"version":3,"file":"useImageLoadingStatus.cjs","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":["callback","imageRef","useRef","imageLoaded","setImageLoaded","useState","useEffect","current","image","timeout","checkLoaded","complete","clearTimeout","window","setTimeout","doWhenImageLoaded"],"mappings":"uIAkBIA,IAEM,MAAAC,EAAWC,SAAyB,OACnCC,EAAaC,GAAkBC,YAAS,GAE/CC,OAAAA,EAAAA,WAAU,KACNL,EAASM,SAtBS,EAACC,EAAyBR,KAC5C,IAAAS,GAEJ,SAASC,IACL,GAAIF,EAAMG,SAGN,OAFAC,aAAaH,QACF,MAAAT,GAAAA,KAGLS,EAAAI,OAAOC,WAAWJ,EAAa,GAC7C,CAEYA,IAWJK,CAAkBd,EAASM,SAAS,KAChCH,GAAe,GACJ,MAAAJ,GAAAA,MACd,GACN,CAACA,IAEG,CAACC,EAAUE,EAAW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldGroup.cjs","sources":["../../../../src/components/input-group/FieldGroup.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { FC, FieldsetHTMLAttributes, type ReactNode } from \"react\";\nimport { DataTestAutoId, Density } from \"../../core/types.js\";\nimport { useId } from \"../../hooks/useId/useId.js\";\nimport { Label, LabelProps } from \"./Label.js\";\nimport { SupportLabel, SupportLabelProps } from \"./SupportLabel.js\";\n\nexport interface FieldGroupProps\n extends DataTestAutoId,\n FieldsetHTMLAttributes<HTMLFieldSetElement> {\n legend: string;\n labelProps?: Omit<LabelProps, \"children\" | \"density\">;\n supportLabelProps?: Omit<\n SupportLabelProps,\n \"id\" | \"errorLabel\" | \"helpLabel\" | \"density\"\n >;\n tooltip?: ReactNode;\n className?: string;\n helpLabel?: string;\n errorLabel?: string;\n density?: Density;\n}\n\nexport const FieldGroup: FC<FieldGroupProps> = (props) => {\n const {\n id,\n legend,\n labelProps,\n supportLabelProps,\n tooltip,\n className,\n children,\n helpLabel,\n errorLabel,\n density,\n \"data-testautoid\": testAutoId,\n ...rest\n } = props;\n\n const uid = useId(id || \"jkl-field-group\", { generateSuffix: !id });\n const supportId = `${uid}_support-label`;\n\n const supportText = errorLabel || helpLabel;\n const supportTextType = errorLabel\n ? \"error\"\n : helpLabel\n ? \"help\"\n : undefined;\n\n const describedBy = supportText ? supportId : undefined;\n\n return (\n <fieldset\n id={uid}\n className={clsx(\"jkl-field-group\", className)}\n data-testautoid={testAutoId}\n {...rest}\n aria-describedby={describedBy}\n data-density={density}\n >\n <legend className=\"jkl-field-group__legend\">\n <Label {...labelProps} density={density}>\n {tooltip ? (\n <>\n <span style={{ whiteSpace: \"normal\" }}>\n {legend}\n </span>\n {`\\u00A0`}\n {tooltip}\n </>\n ) : (\n legend\n )}\n </Label>\n </legend>\n {children}\n {(helpLabel || errorLabel) && (\n <SupportLabel\n {...supportLabelProps}\n label={supportText}\n labelType={supportTextType}\n id={supportId}\n density={density}\n />\n )}\n </fieldset>\n );\n};\n"],"names":["props","id","legend","labelProps","supportLabelProps","tooltip","className","children","helpLabel","errorLabel","density","testAutoId","rest","uid","useId","generateSuffix","supportId","supportText","supportTextType","describedBy","jsxs","clsx","jsx","Label","Fragment","style","whiteSpace","SupportLabel","label","labelType"],"mappings":"kRAuBgDA,IACtC,MACFC,GAAAA,EACAC,OAAAA,EACAC,WAAAA,EACAC,kBAAAA,EACAC,QAAAA,EACAC,UAAAA,EACAC,SAAAA,EACAC,UAAAA,EACAC,WAAAA,EACAC,QAAAA,EACA,kBAAmBC,KAChBC,GACHZ,EAEEa,EAAMC,
|
|
1
|
+
{"version":3,"file":"FieldGroup.cjs","sources":["../../../../src/components/input-group/FieldGroup.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { FC, FieldsetHTMLAttributes, type ReactNode } from \"react\";\nimport { DataTestAutoId, Density } from \"../../core/types.js\";\nimport { useId } from \"../../hooks/useId/useId.js\";\nimport { Label, LabelProps } from \"./Label.js\";\nimport { SupportLabel, SupportLabelProps } from \"./SupportLabel.js\";\n\nexport interface FieldGroupProps\n extends DataTestAutoId,\n FieldsetHTMLAttributes<HTMLFieldSetElement> {\n legend: string;\n labelProps?: Omit<LabelProps, \"children\" | \"density\">;\n supportLabelProps?: Omit<\n SupportLabelProps,\n \"id\" | \"errorLabel\" | \"helpLabel\" | \"density\"\n >;\n tooltip?: ReactNode;\n className?: string;\n helpLabel?: string;\n errorLabel?: string;\n density?: Density;\n}\n\nexport const FieldGroup: FC<FieldGroupProps> = (props) => {\n const {\n id,\n legend,\n labelProps,\n supportLabelProps,\n tooltip,\n className,\n children,\n helpLabel,\n errorLabel,\n density,\n \"data-testautoid\": testAutoId,\n ...rest\n } = props;\n\n const uid = useId(id || \"jkl-field-group\", { generateSuffix: !id });\n const supportId = `${uid}_support-label`;\n\n const supportText = errorLabel || helpLabel;\n const supportTextType = errorLabel\n ? \"error\"\n : helpLabel\n ? \"help\"\n : undefined;\n\n const describedBy = supportText ? supportId : undefined;\n\n return (\n <fieldset\n id={uid}\n className={clsx(\"jkl-field-group\", className)}\n data-testautoid={testAutoId}\n {...rest}\n aria-describedby={describedBy}\n data-density={density}\n >\n <legend className=\"jkl-field-group__legend\">\n <Label {...labelProps} density={density}>\n {tooltip ? (\n <>\n <span style={{ whiteSpace: \"normal\" }}>\n {legend}\n </span>\n {`\\u00A0`}\n {tooltip}\n </>\n ) : (\n legend\n )}\n </Label>\n </legend>\n {children}\n {(helpLabel || errorLabel) && (\n <SupportLabel\n {...supportLabelProps}\n label={supportText}\n labelType={supportTextType}\n id={supportId}\n density={density}\n />\n )}\n </fieldset>\n );\n};\n"],"names":["props","id","legend","labelProps","supportLabelProps","tooltip","className","children","helpLabel","errorLabel","density","testAutoId","rest","uid","useId","generateSuffix","supportId","supportText","supportTextType","describedBy","jsxs","clsx","jsx","Label","Fragment","style","whiteSpace","SupportLabel","label","labelType"],"mappings":"kRAuBgDA,IACtC,MACFC,GAAAA,EACAC,OAAAA,EACAC,WAAAA,EACAC,kBAAAA,EACAC,QAAAA,EACAC,UAAAA,EACAC,SAAAA,EACAC,UAAAA,EACAC,WAAAA,EACAC,QAAAA,EACA,kBAAmBC,KAChBC,GACHZ,EAEEa,EAAMC,QAAMb,GAAM,kBAAmB,CAAEc,gBAAiBd,IACxDe,EAAY,GAAGH,kBAEfI,EAAcR,GAAcD,EAC5BU,EAAkBT,EAClB,QACAD,EACA,YACA,EAEAW,EAAcF,EAAcD,OAAY,EAG1C,OAAAI,EAAAA,KAAC,WAAA,CACGnB,GAAIY,EACJP,UAAWe,EAAAA,KAAK,kBAAmBf,GACnC,kBAAiBK,KACbC,EACJ,mBAAkBO,EAClB,eAAcT,EAEdH,SAAA,CAACe,EAAAA,IAAA,SAAA,CAAOhB,UAAU,0BACdC,SAAAe,EAAAA,IAACC,YAAUpB,EAAYO,QAAAA,EAClBH,SAAAF,EAEOe,EAAAA,KAAAI,EAAAA,SAAA,CAAAjB,SAAA,CAAAe,MAAC,QAAKG,MAAO,CAAEC,WAAY,UACtBnB,SACLL,IACC,IACAG,KAGLH,MAIXK,GACCC,GAAaC,IACXa,EAAAA,IAACK,EAAAA,aAAA,IACOvB,EACJwB,MAAOX,EACPY,UAAWX,EACXjB,GAAIe,EACJN,QAAAA,MACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputGroup.cjs","sources":["../../../../src/components/input-group/InputGroup.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { forwardRef, type CSSProperties, type ReactNode } from \"react\";\nimport {\n DataTestAutoId,\n Density,\n WithOptionalChildren,\n} from \"../../core/types.js\";\nimport { useId } from \"../../hooks/useId/useId.js\";\nimport { Label, LabelProps } from \"./Label.js\";\nimport { SupportLabel, SupportLabelProps } from \"./SupportLabel.js\";\n\nexport interface InputProps {\n \"aria-describedby\"?: string;\n \"aria-invalid\"?: boolean;\n id?: string;\n}\n\nexport type InputGroupProps = WithOptionalChildren &\n DataTestAutoId & {\n id?: string;\n className?: string;\n \"data-testid\"?: string;\n density?: Density;\n errorLabel?: ReactNode;\n helpLabel?: ReactNode;\n inline?: boolean;\n label: ReactNode;\n labelProps?: Omit<LabelProps, \"children\" | \"density\">;\n supportLabelProps?: Omit<\n SupportLabelProps,\n \"id\" | \"errorLabel\" | \"helpLabel\" | \"density\"\n >;\n tooltip?: ReactNode;\n style?: CSSProperties;\n render?: (props: InputProps) => JSX.Element;\n };\n\nexport const InputGroup = forwardRef<HTMLDivElement, InputGroupProps>(\n (props, ref) => {\n const {\n className,\n children,\n density,\n errorLabel,\n helpLabel,\n inline,\n label,\n labelProps,\n render,\n supportLabelProps,\n tooltip,\n id,\n ...rest\n } = props;\n\n const uid = useId(id || \"jkl-input\", { generateSuffix: !id });\n const supportId = useId(\"jkl-support-label\");\n\n const hasTooltip = !!tooltip;\n\n const supportText = errorLabel || helpLabel;\n const supportTextType = errorLabel\n ? \"error\"\n : helpLabel\n ? \"help\"\n : undefined;\n\n const describedBy = supportText ? supportId : undefined;\n\n const inputProps: InputProps = {\n \"aria-describedby\": describedBy,\n \"aria-invalid\": Boolean(errorLabel) ? true : undefined,\n id: uid,\n };\n\n const renderInput = render\n ? () => render(inputProps)\n : () => {\n const input = React.Children.toArray(props.children)[0];\n\n if (!React.isValidElement<InputProps>(input)) return;\n\n return React.cloneElement<InputProps>(input, {\n ...inputProps,\n ...input.props,\n });\n };\n\n return (\n <div\n ref={ref}\n className={clsx(className, \"jkl-input-group\", {\n \"jkl-input-group--inline\": inline,\n })}\n data-density={density}\n {...rest}\n >\n <Label\n standAlone\n htmlFor={uid}\n srOnly={inline}\n {...labelProps}\n style={{\n whiteSpace: hasTooltip ? \"nowrap\" : undefined,\n ...labelProps?.style,\n }}\n density={density}\n >\n {hasTooltip ? (\n <>\n <span style={{ whiteSpace: \"normal\" }}>\n {label}\n </span>\n {`\\u00A0`}\n {tooltip}\n </>\n ) : (\n label\n )}\n </Label>\n {renderInput()}\n <SupportLabel\n srOnly={inline}\n {...supportLabelProps}\n label={supportText}\n labelType={supportTextType}\n id={supportId}\n density={density}\n />\n </div>\n );\n },\n);\n\nInputGroup.displayName = \"InputGroup\";\n"],"names":["InputGroup","forwardRef","props","ref","className","children","density","errorLabel","helpLabel","inline","label","labelProps","render","supportLabelProps","tooltip","id","rest","uid","useId","generateSuffix","supportId","hasTooltip","supportText","supportTextType","inputProps","renderInput","input","React","Children","toArray","isValidElement","cloneElement","jsxs","clsx","jsx","Label","standAlone","htmlFor","srOnly","style","whiteSpace","Fragment","SupportLabel","labelType","displayName"],"mappings":"kRAqCaA,EAAaC,EAAAA,YACtB,CAACC,EAAOC,KACE,MACFC,UAAAA,EACAC,SAAAA,EACAC,QAAAA,EACAC,WAAAA,EACAC,UAAAA,EACAC,OAAAA,EACAC,MAAAA,EACAC,WAAAA,EACAC,OAAAA,EACAC,kBAAAA,EACAC,QAAAA,EACAC,GAAAA,KACGC,GACHd,EAEEe,EAAMC,
|
|
1
|
+
{"version":3,"file":"InputGroup.cjs","sources":["../../../../src/components/input-group/InputGroup.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { forwardRef, type CSSProperties, type ReactNode } from \"react\";\nimport {\n DataTestAutoId,\n Density,\n WithOptionalChildren,\n} from \"../../core/types.js\";\nimport { useId } from \"../../hooks/useId/useId.js\";\nimport { Label, LabelProps } from \"./Label.js\";\nimport { SupportLabel, SupportLabelProps } from \"./SupportLabel.js\";\n\nexport interface InputProps {\n \"aria-describedby\"?: string;\n \"aria-invalid\"?: boolean;\n id?: string;\n}\n\nexport type InputGroupProps = WithOptionalChildren &\n DataTestAutoId & {\n id?: string;\n className?: string;\n \"data-testid\"?: string;\n density?: Density;\n errorLabel?: ReactNode;\n helpLabel?: ReactNode;\n inline?: boolean;\n label: ReactNode;\n labelProps?: Omit<LabelProps, \"children\" | \"density\">;\n supportLabelProps?: Omit<\n SupportLabelProps,\n \"id\" | \"errorLabel\" | \"helpLabel\" | \"density\"\n >;\n tooltip?: ReactNode;\n style?: CSSProperties;\n render?: (props: InputProps) => JSX.Element;\n };\n\nexport const InputGroup = forwardRef<HTMLDivElement, InputGroupProps>(\n (props, ref) => {\n const {\n className,\n children,\n density,\n errorLabel,\n helpLabel,\n inline,\n label,\n labelProps,\n render,\n supportLabelProps,\n tooltip,\n id,\n ...rest\n } = props;\n\n const uid = useId(id || \"jkl-input\", { generateSuffix: !id });\n const supportId = useId(\"jkl-support-label\");\n\n const hasTooltip = !!tooltip;\n\n const supportText = errorLabel || helpLabel;\n const supportTextType = errorLabel\n ? \"error\"\n : helpLabel\n ? \"help\"\n : undefined;\n\n const describedBy = supportText ? supportId : undefined;\n\n const inputProps: InputProps = {\n \"aria-describedby\": describedBy,\n \"aria-invalid\": Boolean(errorLabel) ? true : undefined,\n id: uid,\n };\n\n const renderInput = render\n ? () => render(inputProps)\n : () => {\n const input = React.Children.toArray(props.children)[0];\n\n if (!React.isValidElement<InputProps>(input)) return;\n\n return React.cloneElement<InputProps>(input, {\n ...inputProps,\n ...input.props,\n });\n };\n\n return (\n <div\n ref={ref}\n className={clsx(className, \"jkl-input-group\", {\n \"jkl-input-group--inline\": inline,\n })}\n data-density={density}\n {...rest}\n >\n <Label\n standAlone\n htmlFor={uid}\n srOnly={inline}\n {...labelProps}\n style={{\n whiteSpace: hasTooltip ? \"nowrap\" : undefined,\n ...labelProps?.style,\n }}\n density={density}\n >\n {hasTooltip ? (\n <>\n <span style={{ whiteSpace: \"normal\" }}>\n {label}\n </span>\n {`\\u00A0`}\n {tooltip}\n </>\n ) : (\n label\n )}\n </Label>\n {renderInput()}\n <SupportLabel\n srOnly={inline}\n {...supportLabelProps}\n label={supportText}\n labelType={supportTextType}\n id={supportId}\n density={density}\n />\n </div>\n );\n },\n);\n\nInputGroup.displayName = \"InputGroup\";\n"],"names":["InputGroup","forwardRef","props","ref","className","children","density","errorLabel","helpLabel","inline","label","labelProps","render","supportLabelProps","tooltip","id","rest","uid","useId","generateSuffix","supportId","hasTooltip","supportText","supportTextType","inputProps","renderInput","input","React","Children","toArray","isValidElement","cloneElement","jsxs","clsx","jsx","Label","standAlone","htmlFor","srOnly","style","whiteSpace","Fragment","SupportLabel","labelType","displayName"],"mappings":"kRAqCaA,EAAaC,EAAAA,YACtB,CAACC,EAAOC,KACE,MACFC,UAAAA,EACAC,SAAAA,EACAC,QAAAA,EACAC,WAAAA,EACAC,UAAAA,EACAC,OAAAA,EACAC,MAAAA,EACAC,WAAAA,EACAC,OAAAA,EACAC,kBAAAA,EACAC,QAAAA,EACAC,GAAAA,KACGC,GACHd,EAEEe,EAAMC,QAAMH,GAAM,YAAa,CAAEI,gBAAiBJ,IAClDK,EAAYF,QAAM,qBAElBG,IAAeP,EAEfQ,EAAcf,GAAcC,EAC5Be,EAAkBhB,EAClB,QACAC,EACA,YACA,EAIAgB,EAAyB,CAC3B,mBAHgBF,EAAcF,OAAY,EAI1C,iBAAwBb,QAAqB,EAC7CQ,GAAIE,GAGFQ,EAAcb,EACd,IAAMA,EAAOY,GACb,KACI,MAAME,EAAQC,EAAMC,SAASC,QAAQ3B,EAAMG,UAAU,GAErD,GAAKsB,EAAMG,eAA2BJ,GAE/B,OAAAC,EAAMI,aAAyBL,EAAO,IACtCF,KACAE,EAAMxB,OACZ,EAIP,OAAA8B,EAAAA,KAAC,MAAA,CACG7B,IAAAA,EACAC,UAAW6B,EAAAA,KAAK7B,EAAW,kBAAmB,CAC1C,0BAA2BK,IAE/B,eAAcH,KACVU,EAEJX,SAAA,CAAA6B,EAAAA,IAACC,EAAAA,MAAA,CACGC,YAAU,EACVC,QAASpB,EACTqB,OAAQ7B,KACJE,EACJ4B,MAAO,CACHC,WAAYnB,EAAa,cAAW,KACjC,MAAAV,OAAAA,EAAAA,EAAY4B,OAEnBjC,QAAAA,EAECD,WAEO2B,EAAAA,KAAAS,EAAAA,SAAA,CAAApC,SAAA,CAAA6B,MAAC,QAAKK,MAAO,CAAEC,WAAY,UACtBnC,SACLK,IACC,IACAI,KAGLJ,IAGPe,IACDS,EAAAA,IAACQ,EAAAA,aAAA,CACGJ,OAAQ7B,KACJI,EACJH,MAAOY,EACPqB,UAAWpB,EACXR,GAAIK,EACJd,QAAAA,MACJ,IAMhBN,EAAW4C,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.cjs","sources":["../../../../src/components/input-group/Label.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { type CSSProperties, type FC } from \"react\";\nimport { Density, WithChildren } from \"../../core/types.js\";\n\nexport type LabelVariant = \"small\" | \"medium\" | \"large\";\n\nexport interface LabelProps extends WithChildren {\n id?: string;\n variant?: LabelVariant;\n density?: Density;\n srOnly?: boolean;\n standAlone?: boolean;\n htmlFor?: string;\n className?: string;\n style?: CSSProperties;\n}\n\nexport const Label: FC<LabelProps> = ({\n variant = \"small\",\n density,\n srOnly,\n children,\n standAlone,\n htmlFor,\n className = \"\",\n ...rest\n}) => {\n const labelClassNames = clsx(\"jkl-label\", className, {\n [`jkl-label--${variant}`]: variant,\n \"jkl-label--sr-only\": srOnly,\n });\n\n const C = standAlone ? \"label\" : \"span\";\n\n if (!standAlone && htmlFor) {\n htmlFor = undefined;\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(\n \"WARNING: The standard Label component renders as a <span> element, which does not take a htmlFor prop. If you want the Label to belong to a specific input, use the standAlone prop, which renders as a <label> element instead. In most cases the Label component should not be used directly, as it is part of all our input components.\",\n );\n }\n }\n\n return (\n <C\n {...rest}\n className={labelClassNames}\n htmlFor={htmlFor}\n data-density={density}\n >\n {children}\n </C>\n );\n};\n"],"names":["variant","density","srOnly","children","standAlone","htmlFor","className","rest","labelClassNames","clsx","C","process","env","NODE_ENV","console","warn","jsx"],"mappings":"2KAiBqC,EACjCA,QAAAA,EAAU,QACVC,QAAAA,EACAC,OAAAA,EACAC,SAAAA,EACAC,WAAAA,EACAC,QAAAA,EACAC,UAAAA,EAAY,MACTC,MAEG,MAAAC,EAAkBC,EAAAA,KAAK,YAAaH,EAAW,CACjD,CAAC,cAAcN,KAAYA,EAC3B,qBAAsBE,IAGpBQ,EAAIN,EAAa,QAAU,OAE7B,OAACA,GAAcC,IACLA,OAAA,EACmB,eAAzBM,QAAQC,IAAIC,UACJC,QAAAC,KACJ,+UAMRC,EAAAA,IAACN,EAAA,IACOH,EACJD,UAAWE,EACXH,QAAAA,EACA,eAAcJ,EAEbE,SAAAA,
|
|
1
|
+
{"version":3,"file":"Label.cjs","sources":["../../../../src/components/input-group/Label.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { type CSSProperties, type FC } from \"react\";\nimport { Density, WithChildren } from \"../../core/types.js\";\n\nexport type LabelVariant = \"small\" | \"medium\" | \"large\";\n\nexport interface LabelProps extends WithChildren {\n id?: string;\n variant?: LabelVariant;\n density?: Density;\n srOnly?: boolean;\n standAlone?: boolean;\n htmlFor?: string;\n className?: string;\n style?: CSSProperties;\n}\n\nexport const Label: FC<LabelProps> = ({\n variant = \"small\",\n density,\n srOnly,\n children,\n standAlone,\n htmlFor,\n className = \"\",\n ...rest\n}) => {\n const labelClassNames = clsx(\"jkl-label\", className, {\n [`jkl-label--${variant}`]: variant,\n \"jkl-label--sr-only\": srOnly,\n });\n\n const C = standAlone ? \"label\" : \"span\";\n\n if (!standAlone && htmlFor) {\n htmlFor = undefined;\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(\n \"WARNING: The standard Label component renders as a <span> element, which does not take a htmlFor prop. If you want the Label to belong to a specific input, use the standAlone prop, which renders as a <label> element instead. In most cases the Label component should not be used directly, as it is part of all our input components.\",\n );\n }\n }\n\n return (\n <C\n {...rest}\n className={labelClassNames}\n htmlFor={htmlFor}\n data-density={density}\n >\n {children}\n </C>\n );\n};\n"],"names":["variant","density","srOnly","children","standAlone","htmlFor","className","rest","labelClassNames","clsx","C","process","env","NODE_ENV","console","warn","jsx"],"mappings":"2KAiBqC,EACjCA,QAAAA,EAAU,QACVC,QAAAA,EACAC,OAAAA,EACAC,SAAAA,EACAC,WAAAA,EACAC,QAAAA,EACAC,UAAAA,EAAY,MACTC,MAEG,MAAAC,EAAkBC,EAAAA,KAAK,YAAaH,EAAW,CACjD,CAAC,cAAcN,KAAYA,EAC3B,qBAAsBE,IAGpBQ,EAAIN,EAAa,QAAU,OAE7B,OAACA,GAAcC,IACLA,OAAA,EACmB,eAAzBM,QAAQC,IAAIC,UACJC,QAAAC,KACJ,+UAMRC,EAAAA,IAACN,EAAA,IACOH,EACJD,UAAWE,EACXH,QAAAA,EACA,eAAcJ,EAEbE,SAAAA,GAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SupportLabel.cjs","sources":["../../../../src/components/input-group/SupportLabel.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { type FC, type ReactNode } from \"react\";\nimport { Density } from \"../../core/types.js\";\nimport { ErrorIcon } from \"../icon/icons/ErrorIcon.js\";\nimport { SuccessIcon } from \"../icon/icons/SuccessIcon.js\";\nimport { WarningIcon } from \"../icon/icons/WarningIcon.js\";\n\nexport type SupportLabelType = \"help\" | \"error\" | \"warning\" | \"success\";\n\nexport interface SupportLabelProps {\n /**\n * En ID er påkrevd for å kunne referere til SupportLabel med aria-describedby.\n *\n * @example\n * ```tsx\n * const uid = useId();\n * const supportId = useId();\n * const hasSupportText = helpLabel || errorLabel;\n * const describedBy = hasSupportText ? supportId : undefined;\n *\n * return (\n * <div>\n * <Label standAlone htmlFor={uid}>\n * Velg en tekst\n * </Label>\n * <select\n * id={uid}\n * aria-describedby={describedBy}\n * >\n * <option value=\"e\">Example</option>\n * </select>\n * <SupportLabel\n * id={supportId}\n * label={errorLabel}\n * labelType=\"error\"\n * density={density}\n * />\n * </div>\n * );\n * ```\n */\n id: string;\n /**\n * @deprecated Bruk `label` for å få samme resultat.\n */\n helpLabel?: ReactNode;\n /**\n * @deprecated Bruk `label` og `labelType=\"warning\"` for å få samme resultat.\n */\n errorLabel?: ReactNode;\n label?: ReactNode;\n /**\n * Bestemmer hvilket ikon som skal vises:\n *\n * - \"help\" viser ikke noe ikon\n * - \"warning\" viser WarningIcon, det som tidligere ble vist med `errorLabel`\n * - \"error\" viser ErrorIcon\n * - \"success\" viser SuccessIcon\n *\n * @default \"help\"\n */\n labelType?: SupportLabelType;\n density?: Density;\n className?: string;\n srOnly?: boolean;\n}\n\nexport const SupportLabel: FC<SupportLabelProps> = ({\n id,\n helpLabel,\n errorLabel,\n label,\n labelType = \"help\",\n density,\n className,\n srOnly,\n ...rest\n}) => {\n const hasLabel = errorLabel || helpLabel || label;\n\n const isHelp = labelType === \"help\" || (helpLabel && !errorLabel);\n const isWarning = labelType === \"warning\" || errorLabel;\n const isError = labelType === \"error\";\n const isSuccess = labelType === \"success\";\n\n const componentClassName = hasLabel\n ? clsx(\"jkl-form-support-label\", className, {\n \"jkl-form-support-label--sr-only\": srOnly,\n \"jkl-form-support-label--help\": isHelp,\n \"jkl-form-support-label--error\": isError,\n \"jkl-form-support-label--warning\": isWarning,\n \"jkl-form-support-label--success\": isSuccess,\n })\n : \"jkl-dormant-form-support-label\";\n\n const restProps = hasLabel ? rest : {};\n\n const Icon = isError ? ErrorIcon : isSuccess ? SuccessIcon : WarningIcon;\n\n return (\n <span\n id={id}\n className={componentClassName}\n {...restProps}\n data-density={density}\n >\n <Icon variant=\"small\" className=\"jkl-form-support-label__icon\" />\n <span>{errorLabel || helpLabel || label}</span>\n </span>\n );\n};\n"],"names":["id","helpLabel","errorLabel","label","labelType","density","className","srOnly","rest","hasLabel","isHelp","isWarning","isError","isSuccess","componentClassName","clsx","restProps","Icon","ErrorIcon","SuccessIcon","WarningIcon","jsxs","children","jsx","variant"],"mappings":"iTAmEmD,EAC/CA,GAAAA,EACAC,UAAAA,EACAC,WAAAA,EACAC,MAAAA,EACAC,UAAAA,EAAY,OACZC,QAAAA,EACAC,UAAAA,EACAC,OAAAA,KACGC,MAEG,MAAAC,EAAWP,GAAcD,GAAaE,EAEtCO,EAAuB,SAAdN,GAAyBH,IAAcC,EAChDS,EAA0B,YAAdP,GAA2BF,EACvCU,EAAwB,UAAdR,EACVS,EAA0B,YAAdT,EAEZU,EAAqBL,EACrBM,OAAK,yBAA0BT,EAAW,CACtC,kCAAmCC,EACnC,+BAAgCG,EAChC,gCAAiCE,EACjC,kCAAmCD,EACnC,kCAAmCE,IAEvC,iCAEAG,EAAYP,EAAWD,EAAO,
|
|
1
|
+
{"version":3,"file":"SupportLabel.cjs","sources":["../../../../src/components/input-group/SupportLabel.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { type FC, type ReactNode } from \"react\";\nimport { Density } from \"../../core/types.js\";\nimport { ErrorIcon } from \"../icon/icons/ErrorIcon.js\";\nimport { SuccessIcon } from \"../icon/icons/SuccessIcon.js\";\nimport { WarningIcon } from \"../icon/icons/WarningIcon.js\";\n\nexport type SupportLabelType = \"help\" | \"error\" | \"warning\" | \"success\";\n\nexport interface SupportLabelProps {\n /**\n * En ID er påkrevd for å kunne referere til SupportLabel med aria-describedby.\n *\n * @example\n * ```tsx\n * const uid = useId();\n * const supportId = useId();\n * const hasSupportText = helpLabel || errorLabel;\n * const describedBy = hasSupportText ? supportId : undefined;\n *\n * return (\n * <div>\n * <Label standAlone htmlFor={uid}>\n * Velg en tekst\n * </Label>\n * <select\n * id={uid}\n * aria-describedby={describedBy}\n * >\n * <option value=\"e\">Example</option>\n * </select>\n * <SupportLabel\n * id={supportId}\n * label={errorLabel}\n * labelType=\"error\"\n * density={density}\n * />\n * </div>\n * );\n * ```\n */\n id: string;\n /**\n * @deprecated Bruk `label` for å få samme resultat.\n */\n helpLabel?: ReactNode;\n /**\n * @deprecated Bruk `label` og `labelType=\"warning\"` for å få samme resultat.\n */\n errorLabel?: ReactNode;\n label?: ReactNode;\n /**\n * Bestemmer hvilket ikon som skal vises:\n *\n * - \"help\" viser ikke noe ikon\n * - \"warning\" viser WarningIcon, det som tidligere ble vist med `errorLabel`\n * - \"error\" viser ErrorIcon\n * - \"success\" viser SuccessIcon\n *\n * @default \"help\"\n */\n labelType?: SupportLabelType;\n density?: Density;\n className?: string;\n srOnly?: boolean;\n}\n\nexport const SupportLabel: FC<SupportLabelProps> = ({\n id,\n helpLabel,\n errorLabel,\n label,\n labelType = \"help\",\n density,\n className,\n srOnly,\n ...rest\n}) => {\n const hasLabel = errorLabel || helpLabel || label;\n\n const isHelp = labelType === \"help\" || (helpLabel && !errorLabel);\n const isWarning = labelType === \"warning\" || errorLabel;\n const isError = labelType === \"error\";\n const isSuccess = labelType === \"success\";\n\n const componentClassName = hasLabel\n ? clsx(\"jkl-form-support-label\", className, {\n \"jkl-form-support-label--sr-only\": srOnly,\n \"jkl-form-support-label--help\": isHelp,\n \"jkl-form-support-label--error\": isError,\n \"jkl-form-support-label--warning\": isWarning,\n \"jkl-form-support-label--success\": isSuccess,\n })\n : \"jkl-dormant-form-support-label\";\n\n const restProps = hasLabel ? rest : {};\n\n const Icon = isError ? ErrorIcon : isSuccess ? SuccessIcon : WarningIcon;\n\n return (\n <span\n id={id}\n className={componentClassName}\n {...restProps}\n data-density={density}\n >\n <Icon variant=\"small\" className=\"jkl-form-support-label__icon\" />\n <span>{errorLabel || helpLabel || label}</span>\n </span>\n );\n};\n"],"names":["id","helpLabel","errorLabel","label","labelType","density","className","srOnly","rest","hasLabel","isHelp","isWarning","isError","isSuccess","componentClassName","clsx","restProps","Icon","ErrorIcon","SuccessIcon","WarningIcon","jsxs","children","jsx","variant"],"mappings":"iTAmEmD,EAC/CA,GAAAA,EACAC,UAAAA,EACAC,WAAAA,EACAC,MAAAA,EACAC,UAAAA,EAAY,OACZC,QAAAA,EACAC,UAAAA,EACAC,OAAAA,KACGC,MAEG,MAAAC,EAAWP,GAAcD,GAAaE,EAEtCO,EAAuB,SAAdN,GAAyBH,IAAcC,EAChDS,EAA0B,YAAdP,GAA2BF,EACvCU,EAAwB,UAAdR,EACVS,EAA0B,YAAdT,EAEZU,EAAqBL,EACrBM,OAAK,yBAA0BT,EAAW,CACtC,kCAAmCC,EACnC,+BAAgCG,EAChC,gCAAiCE,EACjC,kCAAmCD,EACnC,kCAAmCE,IAEvC,iCAEAG,EAAYP,EAAWD,EAAO,GAE9BS,EAAOL,EAAUM,EAAAA,UAAYL,EAAYM,EAAAA,YAAcC,EAAAA,YAGzD,OAAAC,EAAAA,KAAC,OAAA,CACGrB,GAAAA,EACAM,UAAWQ,KACPE,EACJ,eAAcX,EAEdiB,SAAA,CAAAC,EAAAA,IAACN,EAAK,CAAAO,QAAQ,QAAQlB,UAAU,iCAC/BiB,EAAAA,IAAA,OAAA,CAAMD,SAAcpB,GAAAD,GAAaE,MAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioPanel.cjs","sources":["../../../../src/components/input-panel/RadioPanel.tsx"],"sourcesContent":["import React, {\n ChangeEvent,\n ComponentPropsWithRef,\n ForwardedRef,\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n} from \"react\";\nimport { BasePanel } from \"./BasePanel.js\";\nimport { context } from \"./radioPanelContext.js\";\n\n// aria-invalid has been deprecated for the \"radio\" role, it should go on the\n// parent radiogroup\nexport type RadioPanelProps = Omit<\n ComponentPropsWithRef<\"input\">,\n \"type\" | \"aria-invalid\"\n> & {\n value: string;\n label: string;\n extraLabel?: React.ReactNode;\n alwaysOpen?: boolean;\n};\n\nexport const RadioPanel = forwardRef(function RadioPanel(\n {\n alwaysOpen = false,\n label,\n extraLabel,\n checked,\n onChange,\n value,\n defaultChecked,\n ...rest\n }: RadioPanelProps,\n ref: ForwardedRef<HTMLInputElement>,\n) {\n const { onValueChange, checkedValue } = useContext(context);\n\n const handleChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n onChange?.(e);\n if (!onValueChange) {\n throw new Error(\n \"RadioPanel will not work properly when used outside a RadioPanelGroup\",\n );\n }\n onValueChange(value);\n },\n [onChange, onValueChange, value],\n );\n\n useEffect(() => {\n if (defaultChecked) {\n if (!onValueChange) {\n throw new Error(\n \"RadioPanel will not work properly when used outside a RadioPanelGroup\",\n );\n }\n onValueChange(value);\n }\n // We never want to rerun this effect. Changing the default value after the\n // input control is first mounted should not cause any updates\n /* eslint-disable-next-line react-hooks/exhaustive-deps */\n }, []);\n\n const isControlled = typeof checked !== \"undefined\";\n const isChecked = isControlled ? checked : checkedValue === value;\n\n return (\n <BasePanel\n ref={ref}\n type=\"radio\"\n value={value}\n isChecked={isChecked}\n defaultChecked={defaultChecked}\n checked={isControlled ? checked : undefined}\n onChange={handleChange}\n alwaysOpen={alwaysOpen}\n label={label}\n extraLabel={extraLabel}\n {...rest}\n />\n );\n});\n"],"names":["RadioPanel","forwardRef","alwaysOpen","label","extraLabel","checked","onChange","value","defaultChecked","rest","ref","onValueChange","checkedValue","useContext","context","handleChange","useCallback","e","Error","useEffect","isControlled","isChecked","jsx","BasePanel","type"],"mappings":"0MAwBaA,EAAaC,EAAAA,YAAW,UAE7BC,WAAAA,GAAa,EACbC,MAAAA,EACAC,WAAAA,EACAC,QAAAA,EACAC,SAAAA,EACAC,MAAAA,EACAC,eAAAA,KACGC,GAEPC,GAEA,MAAQC,cAAAA,EAAeC,aAAAA,GAAiBC,
|
|
1
|
+
{"version":3,"file":"RadioPanel.cjs","sources":["../../../../src/components/input-panel/RadioPanel.tsx"],"sourcesContent":["import React, {\n ChangeEvent,\n ComponentPropsWithRef,\n ForwardedRef,\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n} from \"react\";\nimport { BasePanel } from \"./BasePanel.js\";\nimport { context } from \"./radioPanelContext.js\";\n\n// aria-invalid has been deprecated for the \"radio\" role, it should go on the\n// parent radiogroup\nexport type RadioPanelProps = Omit<\n ComponentPropsWithRef<\"input\">,\n \"type\" | \"aria-invalid\"\n> & {\n value: string;\n label: string;\n extraLabel?: React.ReactNode;\n alwaysOpen?: boolean;\n};\n\nexport const RadioPanel = forwardRef(function RadioPanel(\n {\n alwaysOpen = false,\n label,\n extraLabel,\n checked,\n onChange,\n value,\n defaultChecked,\n ...rest\n }: RadioPanelProps,\n ref: ForwardedRef<HTMLInputElement>,\n) {\n const { onValueChange, checkedValue } = useContext(context);\n\n const handleChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n onChange?.(e);\n if (!onValueChange) {\n throw new Error(\n \"RadioPanel will not work properly when used outside a RadioPanelGroup\",\n );\n }\n onValueChange(value);\n },\n [onChange, onValueChange, value],\n );\n\n useEffect(() => {\n if (defaultChecked) {\n if (!onValueChange) {\n throw new Error(\n \"RadioPanel will not work properly when used outside a RadioPanelGroup\",\n );\n }\n onValueChange(value);\n }\n // We never want to rerun this effect. Changing the default value after the\n // input control is first mounted should not cause any updates\n /* eslint-disable-next-line react-hooks/exhaustive-deps */\n }, []);\n\n const isControlled = typeof checked !== \"undefined\";\n const isChecked = isControlled ? checked : checkedValue === value;\n\n return (\n <BasePanel\n ref={ref}\n type=\"radio\"\n value={value}\n isChecked={isChecked}\n defaultChecked={defaultChecked}\n checked={isControlled ? checked : undefined}\n onChange={handleChange}\n alwaysOpen={alwaysOpen}\n label={label}\n extraLabel={extraLabel}\n {...rest}\n />\n );\n});\n"],"names":["RadioPanel","forwardRef","alwaysOpen","label","extraLabel","checked","onChange","value","defaultChecked","rest","ref","onValueChange","checkedValue","useContext","context","handleChange","useCallback","e","Error","useEffect","isControlled","isChecked","jsx","BasePanel","type"],"mappings":"0MAwBaA,EAAaC,EAAAA,YAAW,UAE7BC,WAAAA,GAAa,EACbC,MAAAA,EACAC,WAAAA,EACAC,QAAAA,EACAC,SAAAA,EACAC,MAAAA,EACAC,eAAAA,KACGC,GAEPC,GAEA,MAAQC,cAAAA,EAAeC,aAAAA,GAAiBC,aAAWC,EAAOA,SAEpDC,EAAeC,EAAAA,aAChBC,IAEG,GADA,MAAAX,GAAAA,EAAWW,IACNN,EACD,MAAM,IAAIO,MACN,yEAGRP,EAAcJ,EAAK,GAEvB,CAACD,EAAUK,EAAeJ,IAG9BY,EAAAA,WAAU,KACN,GAAIX,EAAgB,CAChB,IAAKG,EACD,MAAM,IAAIO,MACN,yEAGRP,EAAcJ,EAClB,IAID,IAEG,MAAAa,SAAsBf,EAAY,IAClCgB,EAAYD,EAAef,EAAUO,IAAiBL,EAGxD,OAAAe,EAAAA,IAACC,EAAAA,UAAA,CACGb,IAAAA,EACAc,KAAK,QACLjB,MAAAA,EACAc,UAAAA,EACAb,eAAAA,EACAH,QAASe,EAAef,OAAU,EAClCC,SAAUS,EACVb,WAAAA,EACAC,MAAAA,EACAC,WAAAA,KACIK,GAGhB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioPanelGroup.cjs","sources":["../../../../src/components/input-panel/RadioPanelGroup.tsx"],"sourcesContent":["import React, { FC, useState } from \"react\";\nimport { FieldGroup, FieldGroupProps } from \"../input-group/FieldGroup.js\";\nimport { context } from \"./radioPanelContext.js\";\n\nexport type RadioPanelGroupProps = FieldGroupProps & {};\n\nexport const RadioPanelGroup: FC<RadioPanelGroupProps> = ({\n className,\n ...rest\n}) => {\n const [checkedValue, setCheckedValue] = useState<string>();\n\n const onChange = (value: string) => {\n setCheckedValue(value);\n };\n\n return (\n <context.Provider value={{ checkedValue, onValueChange: onChange }}>\n <FieldGroup\n className={className}\n role=\"radiogroup\"\n aria-invalid={!!rest.errorLabel}\n {...rest}\n />\n </context.Provider>\n );\n};\n"],"names":["className","rest","checkedValue","setCheckedValue","useState","jsx","context","Provider","value","onValueChange","children","FieldGroup","role","errorLabel"],"mappings":"gPAMyD,EACrDA,UAAAA,KACGC,MAEH,MAAOC,EAAcC,GAAmBC,
|
|
1
|
+
{"version":3,"file":"RadioPanelGroup.cjs","sources":["../../../../src/components/input-panel/RadioPanelGroup.tsx"],"sourcesContent":["import React, { FC, useState } from \"react\";\nimport { FieldGroup, FieldGroupProps } from \"../input-group/FieldGroup.js\";\nimport { context } from \"./radioPanelContext.js\";\n\nexport type RadioPanelGroupProps = FieldGroupProps & {};\n\nexport const RadioPanelGroup: FC<RadioPanelGroupProps> = ({\n className,\n ...rest\n}) => {\n const [checkedValue, setCheckedValue] = useState<string>();\n\n const onChange = (value: string) => {\n setCheckedValue(value);\n };\n\n return (\n <context.Provider value={{ checkedValue, onValueChange: onChange }}>\n <FieldGroup\n className={className}\n role=\"radiogroup\"\n aria-invalid={!!rest.errorLabel}\n {...rest}\n />\n </context.Provider>\n );\n};\n"],"names":["className","rest","checkedValue","setCheckedValue","useState","jsx","context","Provider","value","onValueChange","children","FieldGroup","role","errorLabel"],"mappings":"gPAMyD,EACrDA,UAAAA,KACGC,MAEH,MAAOC,EAAcC,GAAmBC,EAAiBA,WAOrD,OAAAC,MAACC,EAAAA,QAAQC,SAAR,CAAiBC,MAAO,CAAEN,aAAAA,EAAcO,cAL3BD,IACdL,EAAgBK,EAAK,GAKjBE,SAAAL,EAAAA,IAACM,EAAAA,WAAA,CACGX,UAAAA,EACAY,KAAK,aACL,iBAAgBX,EAAKY,cACjBZ,KAEZ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkList.cjs","sources":["../../../../src/components/link-list/LinkList.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React from \"react\";\nimport {\n PolymorphicPropsWithRef,\n PolymorphicRef,\n} from \"../../utilities/polymorphism/polymorphism.js\";\nimport { ArrowRightIcon } from \"../icon/icons/ArrowRightIcon.js\";\nimport { ItemProps, LinkComponent, LinkListProps } from \"./types.js\";\n\nconst Item: ItemProps = ({ className, ...rest }) => {\n return (\n <li className={clsx(\"jkl-link-list-item\", className)} {...rest}></li>\n );\n};\n\nconst Link = React.forwardRef(function LinkListLink<\n ElementType extends React.ElementType = \"a\",\n>(\n props: PolymorphicPropsWithRef<ElementType>,\n ref: PolymorphicRef<ElementType>,\n) {\n const { as: Component = \"a\", children, className, ...rest } = props;\n\n return (\n <Component\n className={clsx(\"jkl-link-list-link\", className)}\n ref={ref}\n {...rest}\n >\n {children}\n <ArrowRightIcon className=\"jkl-link-list-link__arrow\" />\n </Component>\n );\n}) as LinkComponent;\n\nexport const LinkList = ({\n variant,\n className,\n ...rest\n}: LinkListProps): React.JSX.Element => {\n const Component = variant === \"ordered\" ? \"ol\" : \"ul\";\n\n return (\n <Component\n className={clsx(\"jkl-link-list\", className, {\n \"jkl-link-list--ordered\": variant === \"ordered\",\n \"jkl-link-list--unordered\": variant === \"unordered\",\n })}\n {...rest}\n />\n );\n};\n\nLinkList.Link = Link;\nLinkList.Item = Item;\n"],"names":["Link","React","forwardRef","props","ref","as","Component","children","className","rest","jsxs","clsx","jsx","ArrowRightIcon","LinkList","variant","Item"],"mappings":"8NAeMA,EAAOC,EAAMC,YAAW,SAG1BC,EACAC,GAEM,MAAEC,GAAIC,EAAY,IAAKC,SAAAA,EAAUC,UAAAA,KAAcC,GAASN,EAG1D,OAAAO,EAAAA,KAACJ,EAAA,CACGE,UAAWG,EAAAA,KAAK,qBAAsBH,GACtCJ,IAAAA,KACIK,EAEHF,SAAA,CAAAA,EACDK,EAAAA,IAACC,EAAeA,eAAA,CAAAL,UAAU,gCAGtC,IAEaM,EAAW,EACpBC,QAAAA,EACAP,UAAAA,KACGC,MAEG,MAAAH,EAAwB,YAAZS,EAAwB,KAAO,KAG7C,OAAAH,EAAAA,IAACN,EAAA,CACGE,UAAWG,EAAAA,KAAK,gBAAiBH,EAAW,CACxC,yBAAsC,YAAZO,EAC1B,2BAAwC,cAAZA,OAE5BN,
|
|
1
|
+
{"version":3,"file":"LinkList.cjs","sources":["../../../../src/components/link-list/LinkList.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React from \"react\";\nimport {\n PolymorphicPropsWithRef,\n PolymorphicRef,\n} from \"../../utilities/polymorphism/polymorphism.js\";\nimport { ArrowRightIcon } from \"../icon/icons/ArrowRightIcon.js\";\nimport { ItemProps, LinkComponent, LinkListProps } from \"./types.js\";\n\nconst Item: ItemProps = ({ className, ...rest }) => {\n return (\n <li className={clsx(\"jkl-link-list-item\", className)} {...rest}></li>\n );\n};\n\nconst Link = React.forwardRef(function LinkListLink<\n ElementType extends React.ElementType = \"a\",\n>(\n props: PolymorphicPropsWithRef<ElementType>,\n ref: PolymorphicRef<ElementType>,\n) {\n const { as: Component = \"a\", children, className, ...rest } = props;\n\n return (\n <Component\n className={clsx(\"jkl-link-list-link\", className)}\n ref={ref}\n {...rest}\n >\n {children}\n <ArrowRightIcon className=\"jkl-link-list-link__arrow\" />\n </Component>\n );\n}) as LinkComponent;\n\nexport const LinkList = ({\n variant,\n className,\n ...rest\n}: LinkListProps): React.JSX.Element => {\n const Component = variant === \"ordered\" ? \"ol\" : \"ul\";\n\n return (\n <Component\n className={clsx(\"jkl-link-list\", className, {\n \"jkl-link-list--ordered\": variant === \"ordered\",\n \"jkl-link-list--unordered\": variant === \"unordered\",\n })}\n {...rest}\n />\n );\n};\n\nLinkList.Link = Link;\nLinkList.Item = Item;\n"],"names":["Link","React","forwardRef","props","ref","as","Component","children","className","rest","jsxs","clsx","jsx","ArrowRightIcon","LinkList","variant","Item"],"mappings":"8NAeMA,EAAOC,EAAMC,YAAW,SAG1BC,EACAC,GAEM,MAAEC,GAAIC,EAAY,IAAKC,SAAAA,EAAUC,UAAAA,KAAcC,GAASN,EAG1D,OAAAO,EAAAA,KAACJ,EAAA,CACGE,UAAWG,EAAAA,KAAK,qBAAsBH,GACtCJ,IAAAA,KACIK,EAEHF,SAAA,CAAAA,EACDK,EAAAA,IAACC,EAAeA,eAAA,CAAAL,UAAU,gCAGtC,IAEaM,EAAW,EACpBC,QAAAA,EACAP,UAAAA,KACGC,MAEG,MAAAH,EAAwB,YAAZS,EAAwB,KAAO,KAG7C,OAAAH,EAAAA,IAACN,EAAA,CACGE,UAAWG,EAAAA,KAAK,gBAAiBH,EAAW,CACxC,yBAAsC,YAAZO,EAC1B,2BAAwC,cAAZA,OAE5BN,GAAA,EAKhBK,EAASd,KAAOA,EAChBc,EAASE,KA7Ce,EAAGR,UAAAA,KAAcC,KAEjCG,EAAAA,IAAC,MAAGJ,UAAWG,EAAAA,KAAK,qBAAsBH,MAAgBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.cjs","sources":["../../../../src/components/list/List.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { FC } from \"react\";\nimport { ListProps } from \"./types.js\";\n\ntype ValidLists = \"unordered\" | \"ordered\";\n\nfunction makeListComponent(listType: ValidLists): FC<ListProps> {\n const BaseList: FC<ListProps> = ({ children, className, ...rest }) => {\n const C = listType === \"ordered\" ? \"ol\" : \"ul\";\n\n return (\n <C\n className={clsx(\"jkl-list\", className, {\n \"jkl-list--ordered\": listType === \"ordered\",\n })}\n data-testid=\"jkl-list\"\n {...rest}\n >\n {children}\n </C>\n );\n };\n return BaseList;\n}\n\nexport const UnorderedList = makeListComponent(\"unordered\");\nUnorderedList.displayName = \"UnorderedList\";\nexport const OrderedList = makeListComponent(\"ordered\");\nOrderedList.displayName = \"OrderedList\";\nexport const List = UnorderedList;\nList.displayName = \"List\";\n"],"names":["makeListComponent","listType","children","className","rest","C","jsx","clsx","UnorderedList","displayName","OrderedList","List"],"mappings":"6JAMA,SAASA,EAAkBC,GAgBhB,MAfyB,EAAGC,SAAAA,EAAUC,UAAAA,KAAcC,MACjD,MAAAC,EAAiB,YAAbJ,EAAyB,KAAO,KAGtC,OAAAK,EAAAA,IAACD,EAAA,CACGF,UAAWI,EAAAA,KAAK,WAAYJ,EAAW,CACnC,oBAAkC,YAAbF,IAEzB,cAAY,cACRG,EAEHF,SAAAA,
|
|
1
|
+
{"version":3,"file":"List.cjs","sources":["../../../../src/components/list/List.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { FC } from \"react\";\nimport { ListProps } from \"./types.js\";\n\ntype ValidLists = \"unordered\" | \"ordered\";\n\nfunction makeListComponent(listType: ValidLists): FC<ListProps> {\n const BaseList: FC<ListProps> = ({ children, className, ...rest }) => {\n const C = listType === \"ordered\" ? \"ol\" : \"ul\";\n\n return (\n <C\n className={clsx(\"jkl-list\", className, {\n \"jkl-list--ordered\": listType === \"ordered\",\n })}\n data-testid=\"jkl-list\"\n {...rest}\n >\n {children}\n </C>\n );\n };\n return BaseList;\n}\n\nexport const UnorderedList = makeListComponent(\"unordered\");\nUnorderedList.displayName = \"UnorderedList\";\nexport const OrderedList = makeListComponent(\"ordered\");\nOrderedList.displayName = \"OrderedList\";\nexport const List = UnorderedList;\nList.displayName = \"List\";\n"],"names":["makeListComponent","listType","children","className","rest","C","jsx","clsx","UnorderedList","displayName","OrderedList","List"],"mappings":"6JAMA,SAASA,EAAkBC,GAgBhB,MAfyB,EAAGC,SAAAA,EAAUC,UAAAA,KAAcC,MACjD,MAAAC,EAAiB,YAAbJ,EAAyB,KAAO,KAGtC,OAAAK,EAAAA,IAACD,EAAA,CACGF,UAAWI,EAAAA,KAAK,WAAYJ,EAAW,CACnC,oBAAkC,YAAbF,IAEzB,cAAY,cACRG,EAEHF,SAAAA,GAAA,CAKjB,CAEa,MAAAM,EAAgBR,EAAkB,aAC/CQ,EAAcC,YAAc,gBACf,MAAAC,EAAcV,EAAkB,WAC7CU,EAAYD,YAAc,cACnB,MAAME,EAAOH,EACpBG,EAAKF,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Loader.cjs","sources":["../../../../src/components/loader/Loader.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { AriaRole } from \"react\";\nimport { useDelayedRender } from \"./useDelayedRender.js\";\n\nexport type LoaderVariant = \"small\" | \"medium\" | \"large\";\n\nexport interface LoaderProps {\n variant?: LoaderVariant;\n textDescription: string;\n className?: string;\n dataTestAutoId?: string;\n role?: AriaRole;\n inline?: boolean;\n /**\n * Antall millisekunder komponenten vil vente før den rendrer\n * @default 0\n */\n delay?: number;\n}\n\nexport const Loader = ({\n delay = 0,\n variant = \"large\",\n textDescription,\n className,\n dataTestAutoId = \"jkl-loader\",\n inline = false,\n ...rest\n}: LoaderProps): JSX.Element | null => {\n const renderComponent = useDelayedRender(delay);\n\n if (delay && !renderComponent) {\n return null;\n }\n\n const componentClassName = clsx(\"jkl-loader\", className, {\n \"jkl-loader--medium\": variant === \"medium\",\n \"jkl-loader--small\": variant === \"small\",\n \"jkl-loader--inline\": inline,\n });\n\n return (\n <span\n aria-busy=\"true\"\n className={componentClassName}\n data-testautoid={dataTestAutoId}\n data-testid=\"jkl-loader\"\n title={textDescription}\n {...rest}\n >\n <span className=\"jkl-loader__dot jkl-loader__dot--left\" />\n <span className=\"jkl-loader__dot jkl-loader__dot--middle\" />\n <span className=\"jkl-loader__dot jkl-loader__dot--right\" />\n <span className=\"jkl-sr-only\">{textDescription}</span>\n </span>\n );\n};\n"],"names":["delay","variant","textDescription","className","dataTestAutoId","inline","rest","renderComponent","useDelayedRender","componentClassName","clsx","jsxs","title","children","jsx"],"mappings":"gNAoBsB,EAClBA,MAAAA,EAAQ,EACRC,QAAAA,EAAU,QACVC,gBAAAA,EACAC,UAAAA,EACAC,eAAAA,EAAiB,aACjBC,OAAAA,GAAS,KACNC,MAEG,MAAAC,EAAkBC,mBAAiBR,GAErC,GAAAA,IAAUO,EACH,OAAA,KAGL,MAAAE,EAAqBC,EAAAA,KAAK,aAAcP,EAAW,CACrD,qBAAkC,WAAZF,EACtB,oBAAiC,UAAZA,EACrB,qBAAsBI,IAItB,OAAAM,EAAAA,KAAC,OAAA,CACG,YAAU,OACVR,UAAWM,EACX,kBAAiBL,EACjB,cAAY,aACZQ,MAAOV,KACHI,EAEJO,SAAA,CAACC,EAAAA,IAAA,OAAA,CAAKX,UAAU,0CAChBW,EAAAA,IAAC,OAAK,CAAAX,UAAU,4CAChBW,EAAAA,IAAC,OAAK,CAAAX,UAAU,2CACfW,EAAAA,IAAA,OAAA,CAAKX,UAAU,cAAeU,SAAgBX,
|
|
1
|
+
{"version":3,"file":"Loader.cjs","sources":["../../../../src/components/loader/Loader.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { AriaRole } from \"react\";\nimport { useDelayedRender } from \"./useDelayedRender.js\";\n\nexport type LoaderVariant = \"small\" | \"medium\" | \"large\";\n\nexport interface LoaderProps {\n variant?: LoaderVariant;\n textDescription: string;\n className?: string;\n dataTestAutoId?: string;\n role?: AriaRole;\n inline?: boolean;\n /**\n * Antall millisekunder komponenten vil vente før den rendrer\n * @default 0\n */\n delay?: number;\n}\n\nexport const Loader = ({\n delay = 0,\n variant = \"large\",\n textDescription,\n className,\n dataTestAutoId = \"jkl-loader\",\n inline = false,\n ...rest\n}: LoaderProps): JSX.Element | null => {\n const renderComponent = useDelayedRender(delay);\n\n if (delay && !renderComponent) {\n return null;\n }\n\n const componentClassName = clsx(\"jkl-loader\", className, {\n \"jkl-loader--medium\": variant === \"medium\",\n \"jkl-loader--small\": variant === \"small\",\n \"jkl-loader--inline\": inline,\n });\n\n return (\n <span\n aria-busy=\"true\"\n className={componentClassName}\n data-testautoid={dataTestAutoId}\n data-testid=\"jkl-loader\"\n title={textDescription}\n {...rest}\n >\n <span className=\"jkl-loader__dot jkl-loader__dot--left\" />\n <span className=\"jkl-loader__dot jkl-loader__dot--middle\" />\n <span className=\"jkl-loader__dot jkl-loader__dot--right\" />\n <span className=\"jkl-sr-only\">{textDescription}</span>\n </span>\n );\n};\n"],"names":["delay","variant","textDescription","className","dataTestAutoId","inline","rest","renderComponent","useDelayedRender","componentClassName","clsx","jsxs","title","children","jsx"],"mappings":"gNAoBsB,EAClBA,MAAAA,EAAQ,EACRC,QAAAA,EAAU,QACVC,gBAAAA,EACAC,UAAAA,EACAC,eAAAA,EAAiB,aACjBC,OAAAA,GAAS,KACNC,MAEG,MAAAC,EAAkBC,mBAAiBR,GAErC,GAAAA,IAAUO,EACH,OAAA,KAGL,MAAAE,EAAqBC,EAAAA,KAAK,aAAcP,EAAW,CACrD,qBAAkC,WAAZF,EACtB,oBAAiC,UAAZA,EACrB,qBAAsBI,IAItB,OAAAM,EAAAA,KAAC,OAAA,CACG,YAAU,OACVR,UAAWM,EACX,kBAAiBL,EACjB,cAAY,aACZQ,MAAOV,KACHI,EAEJO,SAAA,CAACC,EAAAA,IAAA,OAAA,CAAKX,UAAU,0CAChBW,EAAAA,IAAC,OAAK,CAAAX,UAAU,4CAChBW,EAAAA,IAAC,OAAK,CAAAX,UAAU,2CACfW,EAAAA,IAAA,OAAA,CAAKX,UAAU,cAAeU,SAAgBX,MAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkeletonAnimation.cjs","sources":["../../../../../src/components/loader/skeletons/SkeletonAnimation.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { AriaRole, HTMLProps, ReactNode } from \"react\";\nimport { Density } from \"../../../core/types.js\";\nimport { useDelayedRender } from \"../useDelayedRender.js\";\n\nexport interface SkeletonAnimationProps\n extends Pick<HTMLProps<HTMLDivElement>, \"style\"> {\n className?: string;\n children: ReactNode;\n density?: Density;\n /** @default \"Vennligst vent\" */\n textDescription?: string;\n role?: AriaRole;\n /**\n * Antall millisekunder komponenten vil vente før den rendrer\n * @default 0\n */\n delay?: number;\n}\n\nexport const SkeletonAnimation = ({\n className,\n delay = 0,\n density,\n textDescription = \"Vennligst vent\",\n ...rest\n}: SkeletonAnimationProps) => {\n const renderComponent = useDelayedRender(delay);\n\n if (delay && !renderComponent) {\n return null;\n }\n\n return (\n <div\n className={clsx(\"jkl-skeleton-animation\", className)}\n aria-busy=\"true\"\n aria-label={textDescription}\n {...rest}\n data-density={density}\n />\n );\n};\n"],"names":["className","delay","density","textDescription","rest","renderComponent","useDelayedRender","jsx","clsx"],"mappings":"+NAoBiC,EAC7BA,UAAAA,EACAC,MAAAA,EAAQ,EACRC,QAAAA,EACAC,gBAAAA,EAAkB,oBACfC,MAEG,MAAAC,EAAkBC,mBAAiBL,GAErC,OAAAA,IAAUI,EACH,KAIPE,EAAAA,IAAC,MAAA,CACGP,UAAWQ,EAAAA,KAAK,yBAA0BR,GAC1C,YAAU,OACV,aAAYG,KACRC,EACJ,eAAcF,
|
|
1
|
+
{"version":3,"file":"SkeletonAnimation.cjs","sources":["../../../../../src/components/loader/skeletons/SkeletonAnimation.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { AriaRole, HTMLProps, ReactNode } from \"react\";\nimport { Density } from \"../../../core/types.js\";\nimport { useDelayedRender } from \"../useDelayedRender.js\";\n\nexport interface SkeletonAnimationProps\n extends Pick<HTMLProps<HTMLDivElement>, \"style\"> {\n className?: string;\n children: ReactNode;\n density?: Density;\n /** @default \"Vennligst vent\" */\n textDescription?: string;\n role?: AriaRole;\n /**\n * Antall millisekunder komponenten vil vente før den rendrer\n * @default 0\n */\n delay?: number;\n}\n\nexport const SkeletonAnimation = ({\n className,\n delay = 0,\n density,\n textDescription = \"Vennligst vent\",\n ...rest\n}: SkeletonAnimationProps) => {\n const renderComponent = useDelayedRender(delay);\n\n if (delay && !renderComponent) {\n return null;\n }\n\n return (\n <div\n className={clsx(\"jkl-skeleton-animation\", className)}\n aria-busy=\"true\"\n aria-label={textDescription}\n {...rest}\n data-density={density}\n />\n );\n};\n"],"names":["className","delay","density","textDescription","rest","renderComponent","useDelayedRender","jsx","clsx"],"mappings":"+NAoBiC,EAC7BA,UAAAA,EACAC,MAAAA,EAAQ,EACRC,QAAAA,EACAC,gBAAAA,EAAkB,oBACfC,MAEG,MAAAC,EAAkBC,mBAAiBL,GAErC,OAAAA,IAAUI,EACH,KAIPE,EAAAA,IAAC,MAAA,CACGP,UAAWQ,EAAAA,KAAK,yBAA0BR,GAC1C,YAAU,OACV,aAAYG,KACRC,EACJ,eAAcF,GAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkeletonLabel.cjs","sources":["../../../../../src/components/loader/skeletons/SkeletonLabel.tsx"],"sourcesContent":["import React from \"react\";\nimport { Density } from \"../../../core/types.js\";\nimport { SkeletonElement, SkeletonElementProps } from \"./SkeletonElement.js\";\n\nexport interface SkeletonLabelProps\n extends Omit<SkeletonElementProps, \"width\" | \"height\"> {\n className?: string;\n density?: Density;\n}\n\nexport const SkeletonLabel = ({ density, ...rest }: SkeletonLabelProps) => {\n const compact = density === \"compact\";\n return (\n <SkeletonElement\n {...rest}\n width={compact ? 100 : 115}\n height={compact ? 12 : 16}\n />\n );\n};\n"],"names":["density","rest","compact","jsx","SkeletonElement","width","height"],"mappings":"8KAU6B,EAAGA,QAAAA,KAAYC,MACxC,MAAMC,EAAsB,YAAZF,EAEZ,OAAAG,EAAAA,IAACC,EAAAA,gBAAA,IACOH,EACJI,MAAOH,EAAU,IAAM,IACvBI,OAAQJ,EAAU,GAAK,
|
|
1
|
+
{"version":3,"file":"SkeletonLabel.cjs","sources":["../../../../../src/components/loader/skeletons/SkeletonLabel.tsx"],"sourcesContent":["import React from \"react\";\nimport { Density } from \"../../../core/types.js\";\nimport { SkeletonElement, SkeletonElementProps } from \"./SkeletonElement.js\";\n\nexport interface SkeletonLabelProps\n extends Omit<SkeletonElementProps, \"width\" | \"height\"> {\n className?: string;\n density?: Density;\n}\n\nexport const SkeletonLabel = ({ density, ...rest }: SkeletonLabelProps) => {\n const compact = density === \"compact\";\n return (\n <SkeletonElement\n {...rest}\n width={compact ? 100 : 115}\n height={compact ? 12 : 16}\n />\n );\n};\n"],"names":["density","rest","compact","jsx","SkeletonElement","width","height"],"mappings":"8KAU6B,EAAGA,QAAAA,KAAYC,MACxC,MAAMC,EAAsB,YAAZF,EAEZ,OAAAG,EAAAA,IAACC,EAAAA,gBAAA,IACOH,EACJI,MAAOH,EAAU,IAAM,IACvBI,OAAQJ,EAAU,GAAK,IAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkeletonTextArea.cjs","sources":["../../../../../src/components/loader/skeletons/SkeletonTextArea.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React from \"react\";\nimport { Density } from \"../../../core/types.js\";\nimport { SkeletonElement, SkeletonElementProps } from \"./SkeletonElement.js\";\nimport { SkeletonLabel, SkeletonLabelProps } from \"./SkeletonLabel.js\";\n\nexport interface SkeletonTextAreaProps {\n className?: string;\n labelProps?: SkeletonLabelProps;\n inputProps?: SkeletonElementProps;\n density?: Density;\n}\n\nexport const SkeletonTextArea = ({\n className,\n density,\n labelProps,\n inputProps,\n ...rest\n}: SkeletonTextAreaProps) => {\n const compact = density === \"compact\";\n return (\n <div\n className={clsx(\"jkl-skeleton-input\", className)}\n {...rest}\n data-density={density}\n >\n <SkeletonLabel density={density} {...labelProps} />\n <SkeletonElement\n width={compact ? 301 : 316}\n height={compact ? 148 : 168}\n {...inputProps}\n />\n </div>\n );\n};\n"],"names":["className","density","labelProps","inputProps","rest","compact","jsxs","clsx","children","jsx","SkeletonLabel","SkeletonElement","width","height"],"mappings":"6PAagC,EAC5BA,UAAAA,EACAC,QAAAA,EACAC,WAAAA,EACAC,WAAAA,KACGC,MAEH,MAAMC,EAAsB,YAAZJ,EAEZ,OAAAK,EAAAA,KAAC,MAAA,CACGN,UAAWO,EAAAA,KAAK,qBAAsBP,MAClCI,EACJ,eAAcH,EAEdO,SAAA,CAACC,EAAAA,IAAAC,EAAAA,cAAA,CAAcT,QAAAA,KAAsBC,IACrCO,EAAAA,IAACE,EAAAA,gBAAA,CACGC,MAAOP,EAAU,IAAM,IACvBQ,OAAQR,EAAU,IAAM,OACpBF,
|
|
1
|
+
{"version":3,"file":"SkeletonTextArea.cjs","sources":["../../../../../src/components/loader/skeletons/SkeletonTextArea.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React from \"react\";\nimport { Density } from \"../../../core/types.js\";\nimport { SkeletonElement, SkeletonElementProps } from \"./SkeletonElement.js\";\nimport { SkeletonLabel, SkeletonLabelProps } from \"./SkeletonLabel.js\";\n\nexport interface SkeletonTextAreaProps {\n className?: string;\n labelProps?: SkeletonLabelProps;\n inputProps?: SkeletonElementProps;\n density?: Density;\n}\n\nexport const SkeletonTextArea = ({\n className,\n density,\n labelProps,\n inputProps,\n ...rest\n}: SkeletonTextAreaProps) => {\n const compact = density === \"compact\";\n return (\n <div\n className={clsx(\"jkl-skeleton-input\", className)}\n {...rest}\n data-density={density}\n >\n <SkeletonLabel density={density} {...labelProps} />\n <SkeletonElement\n width={compact ? 301 : 316}\n height={compact ? 148 : 168}\n {...inputProps}\n />\n </div>\n );\n};\n"],"names":["className","density","labelProps","inputProps","rest","compact","jsxs","clsx","children","jsx","SkeletonLabel","SkeletonElement","width","height"],"mappings":"6PAagC,EAC5BA,UAAAA,EACAC,QAAAA,EACAC,WAAAA,EACAC,WAAAA,KACGC,MAEH,MAAMC,EAAsB,YAAZJ,EAEZ,OAAAK,EAAAA,KAAC,MAAA,CACGN,UAAWO,EAAAA,KAAK,qBAAsBP,MAClCI,EACJ,eAAcH,EAEdO,SAAA,CAACC,EAAAA,IAAAC,EAAAA,cAAA,CAAcT,QAAAA,KAAsBC,IACrCO,EAAAA,IAACE,EAAAA,gBAAA,CACGC,MAAOP,EAAU,IAAM,IACvBQ,OAAQR,EAAU,IAAM,OACpBF,MACR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Logo.cjs","sources":["../../../../src/components/logo/Logo.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { CSSProperties } from \"react\";\nimport { useId } from \"../../hooks/useId/useId.js\";\n\nexport interface LogoProps {\n className?: string;\n id?: string;\n style?: CSSProperties;\n /** Sentrerer logosymbolet i viewboksen i stedet for den vanlige venstrejusteringen */\n centered?: boolean;\n /** Animerer overgangen mellom logo og logosymbol */\n animated?: boolean;\n /** Vis logosymbol i stedet for logo */\n isSymbol?: boolean;\n /** Beskrivelse av logoen tilgjengelig for skjermlesere */\n title?: string;\n}\n\nexport const Logo = ({\n className,\n id,\n centered = true,\n isSymbol = false,\n animated = false,\n title = \"Fremtind\",\n ...rest\n}: LogoProps): JSX.Element => {\n const uniqueId = useId(id || \"jkl-logo\", { generateSuffix: !id });\n\n return (\n <svg\n {...rest}\n className={clsx(\"jkl-logo\", className, {\n \"jkl-logo--animated\": animated,\n \"jkl-logo--symbol-only\": isSymbol,\n \"jkl-logo--centered\": centered && isSymbol,\n })}\n aria-labelledby={uniqueId}\n role=\"img\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n viewBox={\n !animated && isSymbol && !centered\n ? \"31 60 150 83\"\n : \"32 27 581 120\"\n }\n >\n <title id={uniqueId}>{title}</title>\n <g\n fill=\"none\"\n className=\"jkl-logo__F\"\n strokeWidth=\"8\"\n transform={`${isSymbol ? \"rotate(45) translate(90, -70)\" : \"\"}`}\n >\n <line\n x1=\"34.3\"\n x2=\"104.846844\"\n y1=\"32.563024\"\n y2=\"32.563024\"\n className=\"jkl-logo__F-line\"\n transform={\n isSymbol ? \"scale(1.45, 1) translate(-10, 6)\" : \"\"\n }\n />\n <line\n x1=\"35.12226\"\n x2=\"91.504088\"\n y1=\"80.105318\"\n y2=\"80.105318\"\n />\n <line\n x1=\"-10.820058\"\n x2=\"87.38984\"\n y1=\"84.219561\"\n y2=\"84.219561\"\n transform=\"rotate(90, 38.2849, 84.2196)\"\n />\n </g>\n {!(isSymbol && !animated) && (\n <path\n strokeWidth=\".57975\"\n d=\"M145.752 58.979c-10.21 0-20.201 6.854-23.793 16.133l-.157-15.179-.002-.224h-6.907v73.723h7.782V98.038c0-11.791 2.998-31.572 23.077-31.572 2.89 0 5.153.23 7.12.724l.283.07v-7.806l-.187-.035c-2.363-.44-4.831-.44-7.216-.44M170.88 91.357c.1-15.2 10.325-26.21 24.387-26.21 15.08 0 23.29 13.146 23.658 26.21H170.88zm24.387-33.554c-10.228 0-18.904 4.44-25.092 12.84-4.925 6.7-7.22 15.031-7.22 26.218 0 11.088 3.262 20.766 9.433 27.99 6.099 6.954 13.994 10.481 23.466 10.481 8.097 0 15.596-3.04 21.115-8.559 4.522-4.364 7.305-9.583 8.269-15.515l.044-.262h-8.075l-.038.182c-.77 3.876-2.52 7.146-5.503 10.292-3.968 4.11-9.583 6.375-15.812 6.375-7.332 0-13.239-2.586-17.557-7.684-4.619-5.48-7.37-13.341-7.563-21.602h55.97v-.227c0-.877.038-1.659.074-2.415.037-.758.076-1.543.076-2.426 0-9.44-2.952-18.247-8.313-24.797-5.831-7.126-13.88-10.891-23.274-10.891h0zM324.782 57.803c-10.833 0-19.176 5.465-23.558 15.41-2.377-7.168-8.339-15.41-23.183-15.41-9.606 0-17.811 5.162-22.111 13.86l-.813-11.743-.016-.211h-6.89v73.723h7.78V96.568c0-12.182 2.933-21.098 8.72-26.501 3.425-3.265 7.76-4.92 12.885-4.92 11.845 0 17.362 6.4 17.362 20.142v48.143h7.923V91.736c0-8.853 2.965-16.346 8.573-21.666 3.682-3.36 7.777-4.924 12.89-4.924 11.741 0 17.21 6.4 17.21 20.143v48.143h7.783V84.844c0-17.438-8.721-27.041-24.555-27.041M387.105 37.665l-7.782 1.873v20.17h-14.656v7.195h14.656v45.933c0 14.145 6.615 21.622 19.133 21.622 3.964 0 7.73-.804 11.72-1.657l.668-.142v-6.91l-.267.05c-3.606.666-7.465 1.315-11.54 1.315-8.364 0-11.932-4.357-11.932-14.571v-45.64h43.533v66.529h8.22V59.709h-51.753V37.665M499.748 57.803c-10.364 0-20.339 5.951-24.596 14.576l-.83-12.67h-6.893v73.723h7.781V96.568c0-6.054.932-14.697 5.367-21.487 4.18-6.398 10.483-9.64 18.734-9.64 12.565 0 18.674 6.492 18.674 19.848v48.143h7.781V84.844c0-17.185-9.482-27.041-26.018-27.041M434.672 28.547a5.9 5.9 0 0 0-5.894 5.893 5.9 5.9 0 0 0 5.894 5.895 5.9 5.9 0 0 0 5.895-5.895 5.9 5.9 0 0 0-5.895-5.893M592.914 121.901c-4.007 3.85-8.984 5.801-14.793 5.801-5.777 0-10.472-1.658-14.354-5.068-6.188-5.519-9.597-14.775-9.597-26.066 0-10.31 2.89-19.102 8.139-24.751 4.135-4.291 9.212-6.376 15.52-6.376 6.202 0 11.324 1.9 15.23 5.653 6.251 5.846 9.164 13.941 9.164 25.474 0 10.765-3.132 19.29-9.309 25.333zm9.157-94.721v44.113c-4.264-7.988-14.077-13.49-24.243-13.49-8.072 0-14.828 2.585-20.081 7.682-7.309 6.897-11.5 18.281-11.5 31.234 0 13.6 4.294 24.848 12.091 31.673 5.234 4.605 11.841 6.94 19.64 6.94 10.115 0 20.112-5.893 24.154-14.127l.835 12.227h6.886V27.18h-7.782 0z\"\n className=\"jkl-logo__remtind\"\n />\n )}\n </svg>\n );\n};\n"],"names":["className","id","centered","isSymbol","animated","title","rest","uniqueId","useId","generateSuffix","jsxs","clsx","role","xmlns","fill","stroke","viewBox","children","jsx","strokeWidth","transform","x1","x2","y1","y2","d"],"mappings":"mNAkBoB,EAChBA,UAAAA,EACAC,GAAAA,EACAC,SAAAA,GAAW,EACXC,SAAAA,GAAW,EACXC,SAAAA,GAAW,EACXC,MAAAA,EAAQ,cACLC,MAEG,MAAAC,EAAWC,
|
|
1
|
+
{"version":3,"file":"Logo.cjs","sources":["../../../../src/components/logo/Logo.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { CSSProperties } from \"react\";\nimport { useId } from \"../../hooks/useId/useId.js\";\n\nexport interface LogoProps {\n className?: string;\n id?: string;\n style?: CSSProperties;\n /** Sentrerer logosymbolet i viewboksen i stedet for den vanlige venstrejusteringen */\n centered?: boolean;\n /** Animerer overgangen mellom logo og logosymbol */\n animated?: boolean;\n /** Vis logosymbol i stedet for logo */\n isSymbol?: boolean;\n /** Beskrivelse av logoen tilgjengelig for skjermlesere */\n title?: string;\n}\n\nexport const Logo = ({\n className,\n id,\n centered = true,\n isSymbol = false,\n animated = false,\n title = \"Fremtind\",\n ...rest\n}: LogoProps): JSX.Element => {\n const uniqueId = useId(id || \"jkl-logo\", { generateSuffix: !id });\n\n return (\n <svg\n {...rest}\n className={clsx(\"jkl-logo\", className, {\n \"jkl-logo--animated\": animated,\n \"jkl-logo--symbol-only\": isSymbol,\n \"jkl-logo--centered\": centered && isSymbol,\n })}\n aria-labelledby={uniqueId}\n role=\"img\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n viewBox={\n !animated && isSymbol && !centered\n ? \"31 60 150 83\"\n : \"32 27 581 120\"\n }\n >\n <title id={uniqueId}>{title}</title>\n <g\n fill=\"none\"\n className=\"jkl-logo__F\"\n strokeWidth=\"8\"\n transform={`${isSymbol ? \"rotate(45) translate(90, -70)\" : \"\"}`}\n >\n <line\n x1=\"34.3\"\n x2=\"104.846844\"\n y1=\"32.563024\"\n y2=\"32.563024\"\n className=\"jkl-logo__F-line\"\n transform={\n isSymbol ? \"scale(1.45, 1) translate(-10, 6)\" : \"\"\n }\n />\n <line\n x1=\"35.12226\"\n x2=\"91.504088\"\n y1=\"80.105318\"\n y2=\"80.105318\"\n />\n <line\n x1=\"-10.820058\"\n x2=\"87.38984\"\n y1=\"84.219561\"\n y2=\"84.219561\"\n transform=\"rotate(90, 38.2849, 84.2196)\"\n />\n </g>\n {!(isSymbol && !animated) && (\n <path\n strokeWidth=\".57975\"\n d=\"M145.752 58.979c-10.21 0-20.201 6.854-23.793 16.133l-.157-15.179-.002-.224h-6.907v73.723h7.782V98.038c0-11.791 2.998-31.572 23.077-31.572 2.89 0 5.153.23 7.12.724l.283.07v-7.806l-.187-.035c-2.363-.44-4.831-.44-7.216-.44M170.88 91.357c.1-15.2 10.325-26.21 24.387-26.21 15.08 0 23.29 13.146 23.658 26.21H170.88zm24.387-33.554c-10.228 0-18.904 4.44-25.092 12.84-4.925 6.7-7.22 15.031-7.22 26.218 0 11.088 3.262 20.766 9.433 27.99 6.099 6.954 13.994 10.481 23.466 10.481 8.097 0 15.596-3.04 21.115-8.559 4.522-4.364 7.305-9.583 8.269-15.515l.044-.262h-8.075l-.038.182c-.77 3.876-2.52 7.146-5.503 10.292-3.968 4.11-9.583 6.375-15.812 6.375-7.332 0-13.239-2.586-17.557-7.684-4.619-5.48-7.37-13.341-7.563-21.602h55.97v-.227c0-.877.038-1.659.074-2.415.037-.758.076-1.543.076-2.426 0-9.44-2.952-18.247-8.313-24.797-5.831-7.126-13.88-10.891-23.274-10.891h0zM324.782 57.803c-10.833 0-19.176 5.465-23.558 15.41-2.377-7.168-8.339-15.41-23.183-15.41-9.606 0-17.811 5.162-22.111 13.86l-.813-11.743-.016-.211h-6.89v73.723h7.78V96.568c0-12.182 2.933-21.098 8.72-26.501 3.425-3.265 7.76-4.92 12.885-4.92 11.845 0 17.362 6.4 17.362 20.142v48.143h7.923V91.736c0-8.853 2.965-16.346 8.573-21.666 3.682-3.36 7.777-4.924 12.89-4.924 11.741 0 17.21 6.4 17.21 20.143v48.143h7.783V84.844c0-17.438-8.721-27.041-24.555-27.041M387.105 37.665l-7.782 1.873v20.17h-14.656v7.195h14.656v45.933c0 14.145 6.615 21.622 19.133 21.622 3.964 0 7.73-.804 11.72-1.657l.668-.142v-6.91l-.267.05c-3.606.666-7.465 1.315-11.54 1.315-8.364 0-11.932-4.357-11.932-14.571v-45.64h43.533v66.529h8.22V59.709h-51.753V37.665M499.748 57.803c-10.364 0-20.339 5.951-24.596 14.576l-.83-12.67h-6.893v73.723h7.781V96.568c0-6.054.932-14.697 5.367-21.487 4.18-6.398 10.483-9.64 18.734-9.64 12.565 0 18.674 6.492 18.674 19.848v48.143h7.781V84.844c0-17.185-9.482-27.041-26.018-27.041M434.672 28.547a5.9 5.9 0 0 0-5.894 5.893 5.9 5.9 0 0 0 5.894 5.895 5.9 5.9 0 0 0 5.895-5.895 5.9 5.9 0 0 0-5.895-5.893M592.914 121.901c-4.007 3.85-8.984 5.801-14.793 5.801-5.777 0-10.472-1.658-14.354-5.068-6.188-5.519-9.597-14.775-9.597-26.066 0-10.31 2.89-19.102 8.139-24.751 4.135-4.291 9.212-6.376 15.52-6.376 6.202 0 11.324 1.9 15.23 5.653 6.251 5.846 9.164 13.941 9.164 25.474 0 10.765-3.132 19.29-9.309 25.333zm9.157-94.721v44.113c-4.264-7.988-14.077-13.49-24.243-13.49-8.072 0-14.828 2.585-20.081 7.682-7.309 6.897-11.5 18.281-11.5 31.234 0 13.6 4.294 24.848 12.091 31.673 5.234 4.605 11.841 6.94 19.64 6.94 10.115 0 20.112-5.893 24.154-14.127l.835 12.227h6.886V27.18h-7.782 0z\"\n className=\"jkl-logo__remtind\"\n />\n )}\n </svg>\n );\n};\n"],"names":["className","id","centered","isSymbol","animated","title","rest","uniqueId","useId","generateSuffix","jsxs","clsx","role","xmlns","fill","stroke","viewBox","children","jsx","strokeWidth","transform","x1","x2","y1","y2","d"],"mappings":"mNAkBoB,EAChBA,UAAAA,EACAC,GAAAA,EACAC,SAAAA,GAAW,EACXC,SAAAA,GAAW,EACXC,SAAAA,GAAW,EACXC,MAAAA,EAAQ,cACLC,MAEG,MAAAC,EAAWC,QAAMP,GAAM,WAAY,CAAEQ,gBAAiBR,IAGxD,OAAAS,EAAAA,KAAC,MAAA,IACOJ,EACJN,UAAWW,EAAAA,KAAK,WAAYX,EAAW,CACnC,qBAAsBI,EACtB,wBAAyBD,EACzB,qBAAsBD,GAAYC,IAEtC,kBAAiBI,EACjBK,KAAK,MACLC,MAAM,6BACNC,KAAK,eACLC,OAAO,eACPC,QACKZ,IAAYD,GAAaD,EAEpB,gBADA,eAIVe,SAAA,CAACC,EAAAA,IAAA,QAAA,CAAMjB,GAAIM,EAAWU,SAAMZ,IAC5BK,EAAAA,KAAC,IAAA,CACGI,KAAK,OACLd,UAAU,cACVmB,YAAY,IACZC,UAAW,IAAGjB,EAAW,gCAAkC,IAE3Dc,SAAA,CAAAC,EAAAA,IAAC,OAAA,CACGG,GAAG,OACHC,GAAG,aACHC,GAAG,YACHC,GAAG,YACHxB,UAAU,mBACVoB,UACIjB,EAAW,mCAAqC,KAGxDe,EAAAA,IAAC,OAAA,CACGG,GAAG,WACHC,GAAG,YACHC,GAAG,YACHC,GAAG,cAEPN,EAAAA,IAAC,OAAA,CACGG,GAAG,aACHC,GAAG,WACHC,GAAG,YACHC,GAAG,YACHJ,UAAU,sCAGfjB,IAAaC,IACZc,EAAAA,IAAC,OAAA,CACGC,YAAY,SACZM,EAAE,w8EACFzB,UAAU,wBACd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogoStamp.cjs","sources":["../../../../src/components/logo/LogoStamp.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { CSSProperties, useRef } from \"react\";\nimport { WithChildren } from \"../../core/types.js\";\nimport { useId } from \"../../hooks/useId/useId.js\";\nimport { useTextSpinner } from \"./useTextSpinner.js\";\n\nexport interface LogoStampProps extends WithChildren {\n className?: string;\n id?: string;\n style?: CSSProperties;\n /**\n * Beskrivelse av logostempelet tilgjengelig for skjermlesere.\n * Teksten i logostempelet er en path, og ikke tilgjengelig for skjermlesere.\n * @default \"Forsikring levert av Fremtind\"\n */\n title?: string;\n /** Roterer teksten rundt logostempelet første gangen stempelet kommer til syne */\n animated?: boolean;\n}\n\nexport const LogoStamp = ({\n children,\n className,\n id,\n animated = false,\n title,\n ...rest\n}: LogoStampProps): JSX.Element => {\n const uniqueId = useId(id || \"jkl-logo-stamp\", { generateSuffix: !id });\n const stampRef = useRef<SVGSVGElement>(null);\n const { hasAnimated, visible } = useTextSpinner(stampRef);\n\n return (\n <svg\n {...rest}\n ref={stampRef}\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 512 512\"\n aria-labelledby={uniqueId}\n className={clsx(\"jkl-logo-stamp\", className, {\n \"jkl-logo-stamp--animated\": animated,\n })}\n data-rotate={animated && (visible || hasAnimated)}\n role=\"img\"\n >\n <title id={uniqueId}>\n {title || \"Forsikring levert av Fremtind\"}\n </title>\n <g className=\"jkl-logo-stamp__logo\">\n <path\n fill=\"currentColor\"\n d=\"M256 177.2L146.4 286.8l8.5 8.4 51.4-51.4 51.4 51.4 8.2-8.1-51.5-51.5 41.9-41.8L357.5 295l8.1-8.2z\"\n />\n </g>\n <g className=\"jkl-logo-stamp__text\">{children}</g>\n </svg>\n );\n};\n"],"names":["children","className","id","animated","title","rest","uniqueId","useId","generateSuffix","stampRef","useRef","hasAnimated","visible","useTextSpinner","jsxs","ref","xmlns","viewBox","clsx","role","jsx","fill","d"],"mappings":"6QAoByB,EACrBA,SAAAA,EACAC,UAAAA,EACAC,GAAAA,EACAC,SAAAA,GAAW,EACXC,MAAAA,KACGC,MAEG,MAAAC,EAAWC,
|
|
1
|
+
{"version":3,"file":"LogoStamp.cjs","sources":["../../../../src/components/logo/LogoStamp.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { CSSProperties, useRef } from \"react\";\nimport { WithChildren } from \"../../core/types.js\";\nimport { useId } from \"../../hooks/useId/useId.js\";\nimport { useTextSpinner } from \"./useTextSpinner.js\";\n\nexport interface LogoStampProps extends WithChildren {\n className?: string;\n id?: string;\n style?: CSSProperties;\n /**\n * Beskrivelse av logostempelet tilgjengelig for skjermlesere.\n * Teksten i logostempelet er en path, og ikke tilgjengelig for skjermlesere.\n * @default \"Forsikring levert av Fremtind\"\n */\n title?: string;\n /** Roterer teksten rundt logostempelet første gangen stempelet kommer til syne */\n animated?: boolean;\n}\n\nexport const LogoStamp = ({\n children,\n className,\n id,\n animated = false,\n title,\n ...rest\n}: LogoStampProps): JSX.Element => {\n const uniqueId = useId(id || \"jkl-logo-stamp\", { generateSuffix: !id });\n const stampRef = useRef<SVGSVGElement>(null);\n const { hasAnimated, visible } = useTextSpinner(stampRef);\n\n return (\n <svg\n {...rest}\n ref={stampRef}\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 512 512\"\n aria-labelledby={uniqueId}\n className={clsx(\"jkl-logo-stamp\", className, {\n \"jkl-logo-stamp--animated\": animated,\n })}\n data-rotate={animated && (visible || hasAnimated)}\n role=\"img\"\n >\n <title id={uniqueId}>\n {title || \"Forsikring levert av Fremtind\"}\n </title>\n <g className=\"jkl-logo-stamp__logo\">\n <path\n fill=\"currentColor\"\n d=\"M256 177.2L146.4 286.8l8.5 8.4 51.4-51.4 51.4 51.4 8.2-8.1-51.5-51.5 41.9-41.8L357.5 295l8.1-8.2z\"\n />\n </g>\n <g className=\"jkl-logo-stamp__text\">{children}</g>\n </svg>\n );\n};\n"],"names":["children","className","id","animated","title","rest","uniqueId","useId","generateSuffix","stampRef","useRef","hasAnimated","visible","useTextSpinner","jsxs","ref","xmlns","viewBox","clsx","role","jsx","fill","d"],"mappings":"6QAoByB,EACrBA,SAAAA,EACAC,UAAAA,EACAC,GAAAA,EACAC,SAAAA,GAAW,EACXC,MAAAA,KACGC,MAEG,MAAAC,EAAWC,QAAML,GAAM,iBAAkB,CAAEM,gBAAiBN,IAC5DO,EAAWC,SAAsB,OAC/BC,YAAAA,EAAaC,QAAAA,GAAYC,iBAAeJ,GAG5C,OAAAK,EAAAA,KAAC,MAAA,IACOT,EACJU,IAAKN,EACLO,MAAM,6BACNC,QAAQ,cACR,kBAAiBX,EACjBL,UAAWiB,EAAAA,KAAK,iBAAkBjB,EAAW,CACzC,2BAA4BE,IAEhC,cAAaA,IAAaS,GAAWD,GACrCQ,KAAK,MAELnB,SAAA,CAAAoB,EAAAA,IAAC,QAAM,CAAAlB,GAAII,EACNN,SAAAI,GAAS,kCAEdgB,EAAAA,IAAC,IAAE,CAAAnB,UAAU,uBACTD,SAAAoB,EAAAA,IAAC,OAAA,CACGC,KAAK,eACLC,EAAE,wGAGTF,EAAAA,IAAA,IAAA,CAAEnB,UAAU,uBAAwBD,SAAAA,MAAS"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTextSpinner.cjs","sources":["../../../../src/components/logo/useTextSpinner.ts"],"sourcesContent":["import React, { useState } from \"react\";\nimport { useIntersectionObserver } from \"../../hooks/useIntersectionObserver/useIntersectionObserver.js\";\nexport function useTextSpinner<T extends HTMLElement | SVGElement>(\n ref: React.RefObject<T>,\n) {\n const [hasAnimated, setHasAnimated] = useState(false);\n const [visible, setVisible] = useState(false);\n\n const onIntersect = (entries: IntersectionObserverEntry[]) => {\n const intersecting = entries.some((entry) => entry.isIntersecting);\n setVisible(intersecting);\n if (intersecting) {\n setHasAnimated(true);\n }\n };\n useIntersectionObserver(ref, onIntersect, () => setVisible(true), {\n rootMargin: \"50% 0% 0% 0%\",\n threshold: 0.5,\n });\n\n return { hasAnimated, visible };\n}\n"],"names":["ref","hasAnimated","setHasAnimated","useState","visible","setVisible","useIntersectionObserver","entries","intersecting","some","entry","isIntersecting","rootMargin","threshold"],"mappings":"6MAEO,SACHA,GAEA,MAAOC,EAAaC,GAAkBC,
|
|
1
|
+
{"version":3,"file":"useTextSpinner.cjs","sources":["../../../../src/components/logo/useTextSpinner.ts"],"sourcesContent":["import React, { useState } from \"react\";\nimport { useIntersectionObserver } from \"../../hooks/useIntersectionObserver/useIntersectionObserver.js\";\nexport function useTextSpinner<T extends HTMLElement | SVGElement>(\n ref: React.RefObject<T>,\n) {\n const [hasAnimated, setHasAnimated] = useState(false);\n const [visible, setVisible] = useState(false);\n\n const onIntersect = (entries: IntersectionObserverEntry[]) => {\n const intersecting = entries.some((entry) => entry.isIntersecting);\n setVisible(intersecting);\n if (intersecting) {\n setHasAnimated(true);\n }\n };\n useIntersectionObserver(ref, onIntersect, () => setVisible(true), {\n rootMargin: \"50% 0% 0% 0%\",\n threshold: 0.5,\n });\n\n return { hasAnimated, visible };\n}\n"],"names":["ref","hasAnimated","setHasAnimated","useState","visible","setVisible","useIntersectionObserver","entries","intersecting","some","entry","isIntersecting","rootMargin","threshold"],"mappings":"6MAEO,SACHA,GAEA,MAAOC,EAAaC,GAAkBC,YAAS,IACxCC,EAASC,GAAcF,YAAS,GASvCG,OAAAA,EAAAA,wBAAwBN,GAPHO,IACjB,MAAMC,EAAeD,EAAQE,MAAMC,GAAUA,EAAMC,iBACnDN,EAAWG,GACPA,GACAN,GAAe,EAAI,IAGe,IAAMG,GAAW,IAAO,CAC9DO,WAAY,eACZC,UAAW,KAGR,CAAEZ,YAAAA,EAAaG,QAAAA,EAC1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.cjs","sources":["../../../../../../node_modules/.pnpm/react-is@18.3.1/node_modules/react-is/index.js","../../../../../../node_modules/.pnpm/react-is@18.3.1/node_modules/react-is/cjs/react-is.production.min.js","../../../../../../node_modules/.pnpm/react-is@18.3.1/node_modules/react-is/cjs/react-is.development.js","../../../../src/components/menu/Menu.tsx"],"sourcesContent":["'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/**\n * @license React\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var b=Symbol.for(\"react.element\"),c=Symbol.for(\"react.portal\"),d=Symbol.for(\"react.fragment\"),e=Symbol.for(\"react.strict_mode\"),f=Symbol.for(\"react.profiler\"),g=Symbol.for(\"react.provider\"),h=Symbol.for(\"react.context\"),k=Symbol.for(\"react.server_context\"),l=Symbol.for(\"react.forward_ref\"),m=Symbol.for(\"react.suspense\"),n=Symbol.for(\"react.suspense_list\"),p=Symbol.for(\"react.memo\"),q=Symbol.for(\"react.lazy\"),t=Symbol.for(\"react.offscreen\"),u;u=Symbol.for(\"react.module.reference\");\nfunction v(a){if(\"object\"===typeof a&&null!==a){var r=a.$$typeof;switch(r){case b:switch(a=a.type,a){case d:case f:case e:case m:case n:return a;default:switch(a=a&&a.$$typeof,a){case k:case h:case l:case q:case p:case g:return a;default:return r}}case c:return r}}}exports.ContextConsumer=h;exports.ContextProvider=g;exports.Element=b;exports.ForwardRef=l;exports.Fragment=d;exports.Lazy=q;exports.Memo=p;exports.Portal=c;exports.Profiler=f;exports.StrictMode=e;exports.Suspense=m;\nexports.SuspenseList=n;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return v(a)===h};exports.isContextProvider=function(a){return v(a)===g};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return v(a)===l};exports.isFragment=function(a){return v(a)===d};exports.isLazy=function(a){return v(a)===q};exports.isMemo=function(a){return v(a)===p};\nexports.isPortal=function(a){return v(a)===c};exports.isProfiler=function(a){return v(a)===f};exports.isStrictMode=function(a){return v(a)===e};exports.isSuspense=function(a){return v(a)===m};exports.isSuspenseList=function(a){return v(a)===n};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===d||a===f||a===e||a===m||a===n||a===t||\"object\"===typeof a&&null!==a&&(a.$$typeof===q||a.$$typeof===p||a.$$typeof===g||a.$$typeof===h||a.$$typeof===l||a.$$typeof===u||void 0!==a.getModuleId)?!0:!1};exports.typeOf=v;\n","/**\n * @license React\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_SERVER_CONTEXT_TYPE = Symbol.for('react.server_context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n case REACT_SUSPENSE_LIST_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_SERVER_CONTEXT_TYPE:\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n}\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar SuspenseList = REACT_SUSPENSE_LIST_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false;\nvar hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');\n }\n }\n\n return false;\n}\nfunction isConcurrentMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsConcurrentMode) {\n hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');\n }\n }\n\n return false;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\nfunction isSuspenseList(object) {\n return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;\n}\n\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.SuspenseList = SuspenseList;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isSuspenseList = isSuspenseList;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\n","import {\n autoUpdate,\n flip,\n FloatingFocusManager,\n FloatingNode,\n FloatingPortal,\n FloatingTree,\n offset,\n type Placement,\n safePolygon,\n shift,\n Side,\n useClick,\n useDismiss,\n useFloating,\n useFloatingNodeId,\n useFloatingParentNodeId,\n useFloatingTree,\n useHover,\n useInteractions,\n useListNavigation,\n useMergeRefs,\n useRole,\n useTransitionStyles,\n} from \"@floating-ui/react\";\nimport clsx from \"clsx\";\nimport React, {\n type ButtonHTMLAttributes,\n forwardRef,\n type ReactNode,\n useEffect,\n useRef,\n useState,\n} from \"react\";\nimport { isForwardRef } from \"react-is\";\nimport { DataTestAutoId, WithChildren } from \"../../core/types.js\";\nimport { useBrowserPreferences } from \"../../hooks/index.js\";\nimport { useId } from \"../../hooks/useId/useId.js\";\nimport { getThemeAndDensity } from \"../../utilities/getThemeAndDensity.js\";\nimport { useMenuWideEvents } from \"./useMenuWideEvents.js\";\n\nexport interface MenuProps\n extends DataTestAutoId,\n WithChildren,\n Omit<ButtonHTMLAttributes<HTMLButtonElement>, \"children\"> {\n className?: string;\n /**\n * Initiell plassering av menyen. Dersom det ikke er plass på skjermen der du\n * angir at den skal åpnes vil den slyttes automatisk.\n * @default \"bottom-start\" på toppnivå, \"right-start\" for undermenyer\n * */\n initialPlacement?: Placement;\n /**\n * Angir om menyen skal åpnes ved hover (uten å måtte klikke)\n * @default false\n */\n openOnHover?: boolean;\n /**\n * Angir om menyen skal holdes åpen når man klikker utenfor menyen\n * @default false\n */\n keepOpenOnClickOutside?: boolean;\n /**\n * Elementet som fungerer som trigger for menyen. Dersom elementet ikke er en `<button>`\n * eller en `forwardRef<HTMLButtonElement>` vil det bli lagt inne i en knapp\n * med forhåndsdefinert stil. For å komme raskt i gang kan du bruke komponenten\n * `MenuTriggerButton` fra denne pakken.\n */\n triggerElement: ReactNode;\n /**\n * Kan brukes til å styre utenfra om menyen skal være åpen eller ikke.\n * @default false\n */\n isOpen?: boolean;\n /**\n * Callback som kalles når menyen åpnes eller lukkes.\n */\n onToggle?: (isOpen: boolean) => void;\n}\n\nfunction getTranslation(side: Side, value: number = 0) {\n switch (side) {\n case \"top\":\n return `0 ${value}px`;\n case \"left\":\n return `${value}px 0`;\n case \"bottom\":\n return `0 ${-value}px`;\n case \"right\":\n return `${-value}px 0`;\n\n default:\n return `0 ${value}px`;\n }\n}\n\nconst MenuComponent = forwardRef<HTMLButtonElement, MenuProps>(\n (props, forwardedRef) => {\n const {\n children,\n className,\n initialPlacement,\n openOnHover = false,\n keepOpenOnClickOutside = false,\n triggerElement,\n isOpen: isOpenOverride,\n onToggle,\n ...triggerProps\n } = props;\n\n const MenuId = useId(\"jkl-menu\");\n\n const { prefersReducedMotion } = useBrowserPreferences();\n\n const tree = useFloatingTree();\n const nodeId = useFloatingNodeId();\n const parentId = useFloatingParentNodeId();\n const isNested = parentId != null;\n\n const listItemsRef = useRef<Array<HTMLButtonElement | null>>([]);\n const [activeIndex, setActiveIndex] = useState<number | null>(null);\n const {\n allowHover,\n isOpen: isOpenDefault,\n setIsOpen,\n } = useMenuWideEvents(tree, nodeId, parentId);\n\n const isOpen =\n isOpenOverride !== undefined ? isOpenOverride : isOpenDefault;\n\n useEffect(() => onToggle?.(isOpen), [isOpen, onToggle]);\n\n const { refs, placement, context, floatingStyles } = useFloating({\n nodeId,\n open: isOpen,\n onOpenChange: setIsOpen,\n placement:\n initialPlacement || (isNested ? \"right-start\" : \"bottom-start\"),\n middleware: [\n offset(2),\n flip({\n fallbackAxisSideDirection: \"end\", // Allow bottom placement in narrow viewports (https://floating-ui.com/docs/flip#fallbackaxissidedirection)\n crossAxis: false, // See https://floating-ui.com/docs/flip#combining-with-shift\n }),\n shift({ padding: 8 }),\n ],\n whileElementsMounted: autoUpdate,\n });\n\n const { getReferenceProps, getFloatingProps, getItemProps } =\n useInteractions([\n useHover(context, {\n enabled: openOnHover && allowHover,\n delay: { open: 75 },\n handleClose: safePolygon({\n requireIntent: true,\n blockPointerEvents: true,\n }),\n }),\n useClick(context, {\n event: \"mousedown\",\n }),\n useDismiss(context, { outsidePress: !keepOpenOnClickOutside }),\n useRole(context, { role: \"menu\" }),\n useListNavigation(context, {\n listRef: listItemsRef,\n activeIndex,\n nested: isNested,\n onNavigate: setActiveIndex,\n }),\n ]);\n\n const referenceRef = useMergeRefs([refs.setReference, forwardedRef]);\n\n // Siden menyen rendres på rot må vi hente lokal dark/light-verdi fra triggeren\n // Vi må gjøre dette for å ta hensyn til at tema kan styres lokalt for deler av UIet\n const { theme, density } = getThemeAndDensity(\n refs.reference.current as HTMLElement,\n );\n\n const { isMounted, styles: animationStyles } = useTransitionStyles(\n context,\n {\n duration: {\n open: prefersReducedMotion ? 0 : 250,\n close: prefersReducedMotion ? 0 : 150,\n },\n initial: ({ side }) => ({\n opacity: 0,\n translate: getTranslation(side, 5),\n }),\n open: ({ side }) => ({\n opacity: 1,\n translate: getTranslation(side, 0),\n }),\n close: ({ side }) => ({\n opacity: 0,\n translate: getTranslation(side, 5),\n }),\n },\n );\n\n return (\n <FloatingNode id={nodeId}>\n {React.isValidElement(triggerElement) &&\n (triggerElement.type === \"button\" ||\n isForwardRef(triggerElement))\n ? // Dersom trigger-elementet er en knapp, sett riktige egenskaper på det\n React.cloneElement(triggerElement, {\n ...getReferenceProps({\n ...triggerProps,\n ref: referenceRef,\n role: isNested ? \"menuitem\" : undefined,\n \"aria-controls\": MenuId,\n onClick(event) {\n event.stopPropagation();\n },\n }),\n })\n : // Ellers, rendre elementet as-is, uten interaktivitet. Krev en ferdig brukbar button for å åpne menyen.\n triggerElement}\n {isMounted && (\n <FloatingPortal>\n <FloatingFocusManager\n context={context}\n // Prevent outside content interference.\n modal={false}\n // Only initially focus the root floating menu.\n initialFocus={isNested ? -1 : 0}\n // Only return focus to the root menu's reference when menus close.\n returnFocus={!isNested}\n >\n <div\n className={clsx(\"jkl jkl-menu\", className)}\n data-theme={theme}\n data-layout-density={density}\n role=\"menu\"\n data-placement={placement}\n aria-live=\"assertive\"\n aria-hidden={!isOpen}\n ref={refs.setFloating}\n {...getFloatingProps({\n id: MenuId,\n style: {\n ...floatingStyles,\n ...animationStyles,\n },\n })}\n >\n {React.Children.map(\n children,\n (child, index) => {\n if (\n React.isValidElement(child) &&\n isForwardRef(child)\n ) {\n return React.cloneElement(\n child,\n getItemProps({\n ...child.props,\n tabIndex:\n activeIndex === index\n ? 0\n : -1,\n role: \"menuitem\",\n ref(\n node: HTMLButtonElement,\n ) {\n listItemsRef.current[\n index\n ] = node;\n },\n onClick(event) {\n child.props.onClick?.(\n event as React.MouseEvent<HTMLButtonElement>,\n );\n if (\n event.defaultPrevented\n ) {\n return;\n }\n tree?.events.emit(\n \"click\",\n );\n },\n onKeyDown(event) {\n child.props.onKeyDown?.(\n event,\n );\n if (\n event.defaultPrevented\n ) {\n return;\n }\n tree?.events.emit(\n \"keydown\",\n );\n if (\n event.currentTarget\n .role ===\n \"menuitemcheckbox\" &&\n event.key ===\n \"Enter\"\n ) {\n // https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/menuitemcheckbox_role#keyboard_interactions\n setIsOpen(false);\n }\n },\n onMouseEnter() {\n if (\n allowHover &&\n isOpen\n ) {\n setActiveIndex(\n index,\n );\n }\n },\n }),\n );\n }\n\n return child;\n },\n )}\n </div>\n </FloatingFocusManager>\n </FloatingPortal>\n )}\n </FloatingNode>\n );\n },\n);\nMenuComponent.displayName = \"MenuComponent\";\n\nexport const Menu = forwardRef<HTMLButtonElement, MenuProps>((props, ref) => {\n const parentId = useFloatingParentNodeId();\n\n if (parentId === null) {\n return (\n <FloatingTree>\n <MenuComponent ref={ref} {...props} />\n </FloatingTree>\n );\n }\n\n return <MenuComponent ref={ref} {...props} />;\n});\nMenu.displayName = \"Menu\";\n"],"names":["process","env","NODE_ENV","reactIsModule","exports","u","b","Symbol","for","c","d","e","f","g","h","k","l","m","n","p","q","t","v","a","r","$$typeof","type","reactIs_production_min","ContextConsumer","Element","ForwardRef","Fragment","Lazy","Memo","Portal","StrictMode","Suspense","SuspenseList","isAsyncMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isStrictMode","isSuspense","isSuspenseList","isValidElementType","getModuleId","typeOf","require$$0","REACT_MODULE_REFERENCE","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_SERVER_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_OFFSCREEN_TYPE","object","$$typeofType","ContextProvider","Profiler","hasWarnedAboutDeprecatedIsAsyncMode","hasWarnedAboutDeprecatedIsConcurrentMode","reactIs_development","console","warn","isConcurrentMode","isProfiler","getTranslation","side","value","MenuComponent","forwardRef","props","forwardedRef","children","className","initialPlacement","openOnHover","keepOpenOnClickOutside","triggerElement","isOpen","isOpenOverride","onToggle","triggerProps","MenuId","useId","prefersReducedMotion","useBrowserPreferences","tree","useFloatingTree","nodeId","useFloatingNodeId","parentId","useFloatingParentNodeId","isNested","listItemsRef","useRef","activeIndex","setActiveIndex","useState","allowHover","isOpenDefault","setIsOpen","useMenuWideEvents","useEffect","refs","placement","context","floatingStyles","useFloating","open","onOpenChange","middleware","offset","flip","fallbackAxisSideDirection","crossAxis","shift","padding","whileElementsMounted","autoUpdate","getReferenceProps","getFloatingProps","getItemProps","useInteractions","useHover","enabled","delay","handleClose","safePolygon","requireIntent","blockPointerEvents","useClick","event","useDismiss","outsidePress","useRole","role","useListNavigation","listRef","nested","onNavigate","referenceRef","useMergeRefs","setReference","theme","density","getThemeAndDensity","reference","current","isMounted","styles","animationStyles","useTransitionStyles","duration","close","initial","opacity","translate","jsxs","FloatingNode","id","React","isValidElement","cloneElement","ref","onClick","stopPropagation","FloatingPortal","jsx","FloatingFocusManager","modal","initialFocus","returnFocus","clsx","setFloating","style","Children","map","child","index","tabIndex","node","_b","_a","call","defaultPrevented","events","emit","onKeyDown","currentTarget","key","onMouseEnter","displayName","Menu","FloatingTree"],"mappings":";;;;;;;;;;;;;;;;;;GAE6B,eAAzBA,QAAQC,IAAIC,SACdC,EAAAC,qCCMW,IAA4bC,EAAxbC,EAAEC,OAAOC,IAAI,iBAAiBC,EAAEF,OAAOC,IAAI,gBAAgBE,EAAEH,OAAOC,IAAI,kBAAkBG,EAAEJ,OAAOC,IAAI,qBAAqBI,EAAEL,OAAOC,IAAI,kBAAkBK,EAAEN,OAAOC,IAAI,kBAAkBM,EAAEP,OAAOC,IAAI,iBAAiBO,EAAER,OAAOC,IAAI,wBAAwBQ,EAAET,OAAOC,IAAI,qBAAqBS,EAAEV,OAAOC,IAAI,kBAAkBU,EAAEX,OAAOC,IAAI,uBAAuBW,EAAEZ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AAK,eAAgBnG,GAChC,aAAYsE,EACZ,sBAAqBC,EACrBT,KAAK,OACL,iBAAgB/B,EAChB,YAAU,YACV,eAAc1B,EACdqF,IAAK5D,EAAKsE,eACNrD,EAAiB,CACjBuC,GAAI7E,EACJ4F,MAAO,IACApE,KACA4C,KAIV9E,WAAMuG,SAASC,IACZxG,GACA,CAACyG,EAAOC,IAEAlB,EAAMC,eAAegB,IACrBtJ,EAAAA,aAAasJ,GAENjB,EAAME,aACTe,EACAxD,EAAa,IACNwD,EAAM3G,MACT6G,SACIpF,IAAgBmF,EACV,GAEV,EAAA3C,KAAM,WACN,GAAA4B,CACIiB,GAEavF,EAAAsD,QACT+B,GACAE,CACR,EACA,OAAAhB,CAAQjC,WACJ,OAAAkD,GAAAC,EAAAL,EAAM3G,OAAM8F,UAAZiB,EAAAE,KAAAD,EACInD,IAGAA,EAAMqD,mBAIV,MAAAlG,GAAAA,EAAMmG,OAAOC,KACT,SAER,EACA,SAAAC,CAAUxD,WACN,OAAAkD,GAAAC,EAAAL,EAAM3G,OAAMqH,YAAZN,EAAAE,KAAAD,EACInD,IAGAA,EAAMqD,mBAIV,MAAAlG,GAAAA,EAAMmG,OAAOC,KACT,WAKI,qBAFJvD,EAAMyD,cACDrD,MAGD,UADJJ,EAAM0D,KAINzF,GAAU,GAElB,EACA,YAAA0F,GAEQ5F,GACApB,GAEAkB,EACIkF,EAER,KAMTD,YAOnC,IAIZ7G,EAAc2H,YAAc,gBAErB,MAAMC,EAAO3H,EAAAA,YAAyC,CAACC,EAAO6F,IAGhD,OAFAxE,EAAAA,gCAIRsG,EAAAA,aACG,CAAAzH,SAAA+F,EAAAA,IAACnG,GAAc+F,IAAAA,KAAc7F,MAKjCiG,EAAAA,IAAAnG,EAAA,CAAc+F,IAAAA,KAAc7F,MAExC0H,EAAKD,YAAc","x_google_ignoreList":[0,1,2]}
|
|
1
|
+
{"version":3,"file":"Menu.cjs","sources":["../../../../../../node_modules/.pnpm/react-is@18.3.1/node_modules/react-is/index.js","../../../../../../node_modules/.pnpm/react-is@18.3.1/node_modules/react-is/cjs/react-is.production.min.js","../../../../../../node_modules/.pnpm/react-is@18.3.1/node_modules/react-is/cjs/react-is.development.js","../../../../src/components/menu/Menu.tsx"],"sourcesContent":["'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/**\n * @license React\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var b=Symbol.for(\"react.element\"),c=Symbol.for(\"react.portal\"),d=Symbol.for(\"react.fragment\"),e=Symbol.for(\"react.strict_mode\"),f=Symbol.for(\"react.profiler\"),g=Symbol.for(\"react.provider\"),h=Symbol.for(\"react.context\"),k=Symbol.for(\"react.server_context\"),l=Symbol.for(\"react.forward_ref\"),m=Symbol.for(\"react.suspense\"),n=Symbol.for(\"react.suspense_list\"),p=Symbol.for(\"react.memo\"),q=Symbol.for(\"react.lazy\"),t=Symbol.for(\"react.offscreen\"),u;u=Symbol.for(\"react.module.reference\");\nfunction v(a){if(\"object\"===typeof a&&null!==a){var r=a.$$typeof;switch(r){case b:switch(a=a.type,a){case d:case f:case e:case m:case n:return a;default:switch(a=a&&a.$$typeof,a){case k:case h:case l:case q:case p:case g:return a;default:return r}}case c:return r}}}exports.ContextConsumer=h;exports.ContextProvider=g;exports.Element=b;exports.ForwardRef=l;exports.Fragment=d;exports.Lazy=q;exports.Memo=p;exports.Portal=c;exports.Profiler=f;exports.StrictMode=e;exports.Suspense=m;\nexports.SuspenseList=n;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return v(a)===h};exports.isContextProvider=function(a){return v(a)===g};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return v(a)===l};exports.isFragment=function(a){return v(a)===d};exports.isLazy=function(a){return v(a)===q};exports.isMemo=function(a){return v(a)===p};\nexports.isPortal=function(a){return v(a)===c};exports.isProfiler=function(a){return v(a)===f};exports.isStrictMode=function(a){return v(a)===e};exports.isSuspense=function(a){return v(a)===m};exports.isSuspenseList=function(a){return v(a)===n};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===d||a===f||a===e||a===m||a===n||a===t||\"object\"===typeof a&&null!==a&&(a.$$typeof===q||a.$$typeof===p||a.$$typeof===g||a.$$typeof===h||a.$$typeof===l||a.$$typeof===u||void 0!==a.getModuleId)?!0:!1};exports.typeOf=v;\n","/**\n * @license React\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_SERVER_CONTEXT_TYPE = Symbol.for('react.server_context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n case REACT_SUSPENSE_LIST_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_SERVER_CONTEXT_TYPE:\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n}\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar SuspenseList = REACT_SUSPENSE_LIST_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false;\nvar hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');\n }\n }\n\n return false;\n}\nfunction isConcurrentMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsConcurrentMode) {\n hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');\n }\n }\n\n return false;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\nfunction isSuspenseList(object) {\n return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;\n}\n\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.SuspenseList = SuspenseList;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isSuspenseList = isSuspenseList;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\n","import {\n autoUpdate,\n flip,\n FloatingFocusManager,\n FloatingNode,\n FloatingPortal,\n FloatingTree,\n offset,\n type Placement,\n safePolygon,\n shift,\n Side,\n useClick,\n useDismiss,\n useFloating,\n useFloatingNodeId,\n useFloatingParentNodeId,\n useFloatingTree,\n useHover,\n useInteractions,\n useListNavigation,\n useMergeRefs,\n useRole,\n useTransitionStyles,\n} from \"@floating-ui/react\";\nimport clsx from \"clsx\";\nimport React, {\n type ButtonHTMLAttributes,\n forwardRef,\n type ReactNode,\n useEffect,\n useRef,\n useState,\n} from \"react\";\nimport { isForwardRef } from \"react-is\";\nimport { DataTestAutoId, WithChildren } from \"../../core/types.js\";\nimport { useBrowserPreferences } from \"../../hooks/index.js\";\nimport { useId } from \"../../hooks/useId/useId.js\";\nimport { getThemeAndDensity } from \"../../utilities/getThemeAndDensity.js\";\nimport { useMenuWideEvents } from \"./useMenuWideEvents.js\";\n\nexport interface MenuProps\n extends DataTestAutoId,\n WithChildren,\n Omit<ButtonHTMLAttributes<HTMLButtonElement>, \"children\"> {\n className?: string;\n /**\n * Initiell plassering av menyen. Dersom det ikke er plass på skjermen der du\n * angir at den skal åpnes vil den slyttes automatisk.\n * @default \"bottom-start\" på toppnivå, \"right-start\" for undermenyer\n * */\n initialPlacement?: Placement;\n /**\n * Angir om menyen skal åpnes ved hover (uten å måtte klikke)\n * @default false\n */\n openOnHover?: boolean;\n /**\n * Angir om menyen skal holdes åpen når man klikker utenfor menyen\n * @default false\n */\n keepOpenOnClickOutside?: boolean;\n /**\n * Elementet som fungerer som trigger for menyen. Dersom elementet ikke er en `<button>`\n * eller en `forwardRef<HTMLButtonElement>` vil det bli lagt inne i en knapp\n * med forhåndsdefinert stil. For å komme raskt i gang kan du bruke komponenten\n * `MenuTriggerButton` fra denne pakken.\n */\n triggerElement: ReactNode;\n /**\n * Kan brukes til å styre utenfra om menyen skal være åpen eller ikke.\n * @default false\n */\n isOpen?: boolean;\n /**\n * Callback som kalles når menyen åpnes eller lukkes.\n */\n onToggle?: (isOpen: boolean) => void;\n}\n\nfunction getTranslation(side: Side, value: number = 0) {\n switch (side) {\n case \"top\":\n return `0 ${value}px`;\n case \"left\":\n return `${value}px 0`;\n case \"bottom\":\n return `0 ${-value}px`;\n case \"right\":\n return `${-value}px 0`;\n\n default:\n return `0 ${value}px`;\n }\n}\n\nconst MenuComponent = forwardRef<HTMLButtonElement, MenuProps>(\n (props, forwardedRef) => {\n const {\n children,\n className,\n initialPlacement,\n openOnHover = false,\n keepOpenOnClickOutside = false,\n triggerElement,\n isOpen: isOpenOverride,\n onToggle,\n ...triggerProps\n } = props;\n\n const MenuId = useId(\"jkl-menu\");\n\n const { prefersReducedMotion } = useBrowserPreferences();\n\n const tree = useFloatingTree();\n const nodeId = useFloatingNodeId();\n const parentId = useFloatingParentNodeId();\n const isNested = parentId != null;\n\n const listItemsRef = useRef<Array<HTMLButtonElement | null>>([]);\n const [activeIndex, setActiveIndex] = useState<number | null>(null);\n const {\n allowHover,\n isOpen: isOpenDefault,\n setIsOpen,\n } = useMenuWideEvents(tree, nodeId, parentId);\n\n const isOpen =\n isOpenOverride !== undefined ? isOpenOverride : isOpenDefault;\n\n useEffect(() => onToggle?.(isOpen), [isOpen, onToggle]);\n\n const { refs, placement, context, floatingStyles } = useFloating({\n nodeId,\n open: isOpen,\n onOpenChange: setIsOpen,\n placement:\n initialPlacement || (isNested ? \"right-start\" : \"bottom-start\"),\n middleware: [\n offset(2),\n flip({\n fallbackAxisSideDirection: \"end\", // Allow bottom placement in narrow viewports (https://floating-ui.com/docs/flip#fallbackaxissidedirection)\n crossAxis: false, // See https://floating-ui.com/docs/flip#combining-with-shift\n }),\n shift({ padding: 8 }),\n ],\n whileElementsMounted: autoUpdate,\n });\n\n const { getReferenceProps, getFloatingProps, getItemProps } =\n useInteractions([\n useHover(context, {\n enabled: openOnHover && allowHover,\n delay: { open: 75 },\n handleClose: safePolygon({\n requireIntent: true,\n blockPointerEvents: true,\n }),\n }),\n useClick(context, {\n event: \"mousedown\",\n }),\n useDismiss(context, { outsidePress: !keepOpenOnClickOutside }),\n useRole(context, { role: \"menu\" }),\n useListNavigation(context, {\n listRef: listItemsRef,\n activeIndex,\n nested: isNested,\n onNavigate: setActiveIndex,\n }),\n ]);\n\n const referenceRef = useMergeRefs([refs.setReference, forwardedRef]);\n\n // Siden menyen rendres på rot må vi hente lokal dark/light-verdi fra triggeren\n // Vi må gjøre dette for å ta hensyn til at tema kan styres lokalt for deler av UIet\n const { theme, density } = getThemeAndDensity(\n refs.reference.current as HTMLElement,\n );\n\n const { isMounted, styles: animationStyles } = useTransitionStyles(\n context,\n {\n duration: {\n open: prefersReducedMotion ? 0 : 250,\n close: prefersReducedMotion ? 0 : 150,\n },\n initial: ({ side }) => ({\n opacity: 0,\n translate: getTranslation(side, 5),\n }),\n open: ({ side }) => ({\n opacity: 1,\n translate: getTranslation(side, 0),\n }),\n close: ({ side }) => ({\n opacity: 0,\n translate: getTranslation(side, 5),\n }),\n },\n );\n\n return (\n <FloatingNode id={nodeId}>\n {React.isValidElement(triggerElement) &&\n (triggerElement.type === \"button\" ||\n isForwardRef(triggerElement))\n ? // Dersom trigger-elementet er en knapp, sett riktige egenskaper på det\n React.cloneElement(triggerElement, {\n ...getReferenceProps({\n ...triggerProps,\n ref: referenceRef,\n role: isNested ? \"menuitem\" : undefined,\n \"aria-controls\": MenuId,\n onClick(event) {\n event.stopPropagation();\n },\n }),\n })\n : // Ellers, rendre elementet as-is, uten interaktivitet. Krev en ferdig brukbar button for å åpne menyen.\n triggerElement}\n {isMounted && (\n <FloatingPortal>\n <FloatingFocusManager\n context={context}\n // Prevent outside content interference.\n modal={false}\n // Only initially focus the root floating menu.\n initialFocus={isNested ? -1 : 0}\n // Only return focus to the root menu's reference when menus close.\n returnFocus={!isNested}\n >\n <div\n className={clsx(\"jkl jkl-menu\", className)}\n data-theme={theme}\n data-layout-density={density}\n role=\"menu\"\n data-placement={placement}\n aria-live=\"assertive\"\n aria-hidden={!isOpen}\n ref={refs.setFloating}\n {...getFloatingProps({\n id: MenuId,\n style: {\n ...floatingStyles,\n ...animationStyles,\n },\n })}\n >\n {React.Children.map(\n children,\n (child, index) => {\n if (\n React.isValidElement(child) &&\n isForwardRef(child)\n ) {\n return React.cloneElement(\n child,\n getItemProps({\n ...child.props,\n tabIndex:\n activeIndex === index\n ? 0\n : -1,\n role: \"menuitem\",\n ref(\n node: HTMLButtonElement,\n ) {\n listItemsRef.current[\n index\n ] = node;\n },\n onClick(event) {\n child.props.onClick?.(\n event as React.MouseEvent<HTMLButtonElement>,\n );\n if (\n event.defaultPrevented\n ) {\n return;\n }\n tree?.events.emit(\n \"click\",\n );\n },\n onKeyDown(event) {\n child.props.onKeyDown?.(\n event,\n );\n if (\n event.defaultPrevented\n ) {\n return;\n }\n tree?.events.emit(\n \"keydown\",\n );\n if (\n event.currentTarget\n .role ===\n \"menuitemcheckbox\" &&\n event.key ===\n \"Enter\"\n ) {\n // https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/menuitemcheckbox_role#keyboard_interactions\n setIsOpen(false);\n }\n },\n onMouseEnter() {\n if (\n allowHover &&\n isOpen\n ) {\n setActiveIndex(\n index,\n );\n }\n },\n }),\n );\n }\n\n return child;\n },\n )}\n </div>\n </FloatingFocusManager>\n </FloatingPortal>\n )}\n </FloatingNode>\n );\n },\n);\nMenuComponent.displayName = \"MenuComponent\";\n\nexport const Menu = forwardRef<HTMLButtonElement, MenuProps>((props, ref) => {\n const parentId = useFloatingParentNodeId();\n\n if (parentId === null) {\n return (\n <FloatingTree>\n <MenuComponent ref={ref} {...props} />\n </FloatingTree>\n );\n }\n\n return <MenuComponent ref={ref} {...props} />;\n});\nMenu.displayName = \"Menu\";\n"],"names":["process","env","NODE_ENV","reactIsModule","exports","u","b","Symbol","for","c","d","e","f","g","h","k","l","m","n","p","q","t","v","a","r","$$typeof","type","reactIs_production_min","ContextConsumer","Element","ForwardRef","Fragment","Lazy","Memo","Portal","StrictMode","Suspense","SuspenseList","isAsyncMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isStrictMode","isSuspense","isSuspenseList","isValidElementType","getModuleId","typeOf","require$$0","REACT_MODULE_REFERENCE","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_SERVER_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_OFFSCREEN_TYPE","object","$$typeofType","ContextProvider","Profiler","hasWarnedAboutDeprecatedIsAsyncMode","hasWarnedAboutDeprecatedIsConcurrentMode","reactIs_development","console","warn","isConcurrentMode","isProfiler","getTranslation","side","value","MenuComponent","forwardRef","props","forwardedRef","children","className","initialPlacement","openOnHover","keepOpenOnClickOutside","triggerElement","isOpen","isOpenOverride","onToggle","triggerProps","MenuId","useId","prefersReducedMotion","useBrowserPreferences","tree","useFloatingTree","nodeId","useFloatingNodeId","parentId","useFloatingParentNodeId","isNested","listItemsRef","useRef","activeIndex","setActiveIndex","useState","allowHover","isOpenDefault","setIsOpen","useMenuWideEvents","useEffect","refs","placement","context","floatingStyles","useFloating","open","onOpenChange","middleware","offset","flip","fallbackAxisSideDirection","crossAxis","shift","padding","whileElementsMounted","autoUpdate","getReferenceProps","getFloatingProps","getItemProps","useInteractions","useHover","enabled","delay","handleClose","safePolygon","requireIntent","blockPointerEvents","useClick","event","useDismiss","outsidePress","useRole","role","useListNavigation","listRef","nested","onNavigate","referenceRef","useMergeRefs","setReference","theme","density","getThemeAndDensity","reference","current","isMounted","styles","animationStyles","useTransitionStyles","duration","close","initial","opacity","translate","jsxs","FloatingNode","id","React","isValidElement","cloneElement","ref","onClick","stopPropagation","FloatingPortal","jsx","FloatingFocusManager","modal","initialFocus","returnFocus","clsx","setFloating","style","Children","map","child","index","tabIndex","node","_b","_a","call","defaultPrevented","events","emit","onKeyDown","currentTarget","key","onMouseEnter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