@fremtind/jokul 5.0.0-next.0 → 5.0.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -7
- package/bin/jokul.mjs +10 -0
- package/bin/run-jokul-cli.mjs +63 -0
- package/build/build-stats.html +1 -1
- package/build/cjs/components/beta/description-list/DescriptionList.cjs +2 -0
- package/build/cjs/components/beta/description-list/DescriptionList.cjs.map +1 -0
- package/build/cjs/components/beta/description-list/DescriptionListItem.cjs +2 -0
- package/build/cjs/components/beta/description-list/DescriptionListItem.cjs.map +1 -0
- package/build/cjs/{components-beta → components/beta}/description-list/index.d.cts +2 -2
- package/build/cjs/components/beta/nav-link/NavLink.cjs +2 -0
- package/build/cjs/components/beta/nav-link/NavLink.cjs.map +1 -0
- package/build/cjs/components/beta/nav-link/index.d.cts +1 -0
- package/build/cjs/{components-beta → components/beta}/nav-link/types.d.cts +1 -1
- package/build/cjs/components/beta/select/Select.cjs +2 -0
- package/build/cjs/components/beta/select/Select.cjs.map +1 -0
- package/build/cjs/components/beta/select/index.d.cts +2 -0
- package/build/cjs/{components-beta → components/beta}/select/types.d.cts +1 -1
- package/build/cjs/components/breadcrumb/types.d.cts +1 -1
- package/build/cjs/components/card/Card.cjs +1 -1
- package/build/cjs/components/card/Card.cjs.map +1 -1
- package/build/cjs/components/card/types.cjs +1 -1
- package/build/cjs/components/card/types.cjs.map +1 -1
- package/build/cjs/components/card/types.d.cts +2 -2
- package/build/cjs/components/checkbox/Checkbox.cjs +1 -1
- package/build/cjs/components/checkbox/Checkbox.cjs.map +1 -1
- package/build/cjs/components/checkbox/types.d.cts +1 -1
- package/build/cjs/components/cookie-consent/CookieConsent.cjs +1 -1
- package/build/cjs/components/cookie-consent/CookieConsent.cjs.map +1 -1
- package/build/cjs/components/cookie-consent/CookieConsent.d.cts +1 -1
- package/build/cjs/components/cookie-consent/types.d.cts +5 -1
- package/build/cjs/components/datepicker/DatePicker.cjs +1 -1
- package/build/cjs/components/datepicker/DatePicker.cjs.map +1 -1
- package/build/cjs/components/datepicker/types.d.cts +1 -1
- package/build/cjs/components/description-list/index.cjs +1 -1
- package/build/cjs/components/description-list/index.d.cts +3 -3
- package/build/cjs/components/description-list/types.d.cts +1 -1
- package/build/cjs/components/expander/ExpandablePanel.cjs +1 -1
- package/build/cjs/components/expander/ExpandablePanel.cjs.map +1 -1
- package/build/cjs/components/feedback/feedbackContext.cjs.map +1 -1
- package/build/cjs/components/feedback/feedbackContext.d.cts +1 -1
- package/build/cjs/components/feedback/followup/followupContext.cjs.map +1 -1
- package/build/cjs/components/feedback/followup/followupContext.d.cts +1 -1
- package/build/cjs/components/feedback/main-question/mainQuestionContext.cjs.map +1 -1
- package/build/cjs/components/feedback/main-question/mainQuestionContext.d.cts +1 -1
- package/build/cjs/components/feedback/questions/smileyUtils.cjs.map +1 -1
- package/build/cjs/components/file-input/internal/Dropzone.cjs.map +1 -1
- package/build/cjs/components/file-input/internal/Dropzone.d.cts +1 -1
- package/build/cjs/components/file-input/internal/fileInputContext.cjs.map +1 -1
- package/build/cjs/components/file-input/internal/fileInputContext.d.cts +1 -1
- package/build/cjs/components/icon/development/internal/IconsExampleGrid.d.cts +1 -1
- package/build/cjs/components/input-group/InputGroup.d.cts +2 -2
- package/build/cjs/components/input-group/types.d.cts +1 -1
- package/build/cjs/components/link/Link.cjs +1 -1
- package/build/cjs/components/link/Link.cjs.map +1 -1
- package/build/cjs/components/link/Link.d.cts +2 -2
- package/build/cjs/components/link/types.d.cts +1 -4
- package/build/cjs/components/link-list/LinkList.d.cts +1 -1
- package/build/cjs/components/list/ListItem.cjs.map +1 -1
- package/build/cjs/components/list/ListItem.d.cts +1 -1
- package/build/cjs/components/logo/types.d.cts +1 -1
- package/build/cjs/components/menu/types.d.cts +1 -1
- package/build/cjs/components/modal/Modal.cjs +1 -1
- package/build/cjs/components/modal/Modal.cjs.map +1 -1
- package/build/cjs/components/modal/Modal.d.cts +2 -9
- package/build/cjs/components/modal/index.d.cts +1 -1
- package/build/cjs/components/modal/types.d.cts +19 -1
- package/build/cjs/components/nav-link/index.cjs +1 -1
- package/build/cjs/components/nav-link/index.d.cts +2 -2
- package/build/cjs/components/popover/Popover.cjs +1 -1
- package/build/cjs/components/popover/Popover.cjs.map +1 -1
- package/build/cjs/components/radio-button/BaseRadioButton.cjs +1 -1
- package/build/cjs/components/radio-button/BaseRadioButton.cjs.map +1 -1
- package/build/cjs/components/radio-button/radioGroupContext.cjs.map +1 -1
- package/build/cjs/components/radio-button/radioGroupContext.d.cts +1 -1
- package/build/cjs/components/screen-reader-only/types.d.cts +1 -1
- package/build/cjs/components/select/index.cjs +1 -1
- package/build/cjs/components/select/index.d.cts +2 -2
- package/build/cjs/components/select/types.d.cts +1 -1
- package/build/cjs/components/system-message/types.d.cts +1 -1
- package/build/cjs/components/table/types.d.cts +1 -1
- package/build/cjs/components/table-of-contents/TableOfContents.d.cts +1 -1
- package/build/cjs/components/tabs/types.d.cts +1 -1
- package/build/cjs/components/toast/types.d.cts +1 -1
- package/build/cjs/components/toggle-switch/types.d.cts +1 -1
- package/build/cjs/components/tooltip/Tooltip.cjs.map +1 -1
- package/build/cjs/components/tooltip/Tooltip.d.cts +1 -1
- package/build/cjs/hooks/useAnimatedHeight/types.d.cts +1 -1
- package/build/cjs/hooks/useAnimatedHeight/useAnimatedHeight.cjs +1 -1
- package/build/cjs/hooks/useAnimatedHeight/useAnimatedHeight.cjs.map +1 -1
- package/build/cjs/hooks/useAnimatedHeight/useAnimatedHeightBetween.cjs +1 -1
- package/build/cjs/hooks/useAnimatedHeight/useAnimatedHeightBetween.cjs.map +1 -1
- package/build/cjs/hooks/useAnimatedHeight/useAutoAnimateHeight.cjs +1 -1
- package/build/cjs/hooks/useAnimatedHeight/useAutoAnimateHeight.cjs.map +1 -1
- package/build/cjs/hooks/useAnimatedHeight/useAutoAnimateHeight.d.cts +1 -1
- package/build/cjs/hooks/useAriaLiveRegion/useAriaLiveRegion.d.cts +1 -1
- package/build/cjs/hooks/useBrowserPreferences/useBrowserPreferences.cjs.map +1 -1
- package/build/cjs/hooks/useBrowserPreferences/useBrowserPreferences.d.cts +1 -1
- package/build/cjs/hooks/useScreen/useScreen.cjs +1 -1
- package/build/cjs/hooks/useScreen/useScreen.cjs.map +1 -1
- package/build/cjs/tailwind/plugins/jokulTypographyPlugin.cjs +1 -1
- package/build/cjs/tailwind/plugins/jokulTypographyPlugin.cjs.map +1 -1
- package/build/cjs/tailwind/tailwindPreset.cjs +1 -1
- package/build/cjs/tailwind/tailwindPreset.cjs.map +1 -1
- package/build/cjs/tokens.cjs +2 -0
- package/build/cjs/tokens.cjs.map +1 -0
- package/build/cjs/tokens.d.cts +235 -0
- package/build/cjs/utilities/getThemeAndSize.cjs +1 -1
- package/build/cjs/utilities/getThemeAndSize.cjs.map +1 -1
- package/build/cjs/utilities/getThemeAndSize.d.cts +1 -1
- package/build/cjs/utilities/index.d.cts +1 -0
- package/build/cjs/{core → utilities}/types.d.cts +1 -1
- package/build/es/components/beta/description-list/DescriptionList.js +2 -0
- package/build/es/components/beta/description-list/DescriptionList.js.map +1 -0
- package/build/es/components/beta/description-list/DescriptionListItem.js +2 -0
- package/build/es/components/beta/description-list/DescriptionListItem.js.map +1 -0
- package/build/es/{components-beta → components/beta}/description-list/index.d.ts +2 -2
- package/build/es/components/beta/nav-link/NavLink.js +2 -0
- package/build/es/components/beta/nav-link/NavLink.js.map +1 -0
- package/build/es/components/beta/nav-link/index.d.ts +1 -0
- package/build/es/{components-beta → components/beta}/nav-link/types.d.ts +1 -1
- package/build/es/components/beta/select/Select.js +2 -0
- package/build/es/components/beta/select/Select.js.map +1 -0
- package/build/es/components/beta/select/index.d.ts +2 -0
- package/build/es/{components-beta → components/beta}/select/types.d.ts +1 -1
- package/build/es/components/breadcrumb/types.d.ts +1 -1
- package/build/es/components/card/Card.js +1 -1
- package/build/es/components/card/Card.js.map +1 -1
- package/build/es/components/card/types.d.ts +2 -2
- package/build/es/components/card/types.js +1 -1
- package/build/es/components/card/types.js.map +1 -1
- package/build/es/components/checkbox/Checkbox.js +1 -1
- package/build/es/components/checkbox/Checkbox.js.map +1 -1
- package/build/es/components/checkbox/types.d.ts +1 -1
- package/build/es/components/cookie-consent/CookieConsent.d.ts +1 -1
- package/build/es/components/cookie-consent/CookieConsent.js +1 -1
- package/build/es/components/cookie-consent/CookieConsent.js.map +1 -1
- package/build/es/components/cookie-consent/types.d.ts +5 -1
- package/build/es/components/datepicker/DatePicker.js +1 -1
- package/build/es/components/datepicker/DatePicker.js.map +1 -1
- package/build/es/components/datepicker/types.d.ts +1 -1
- package/build/es/components/description-list/index.d.ts +3 -3
- package/build/es/components/description-list/index.js +1 -1
- package/build/es/components/description-list/types.d.ts +1 -1
- package/build/es/components/expander/ExpandablePanel.js +1 -1
- package/build/es/components/expander/ExpandablePanel.js.map +1 -1
- package/build/es/components/feedback/feedbackContext.d.ts +1 -1
- package/build/es/components/feedback/feedbackContext.js.map +1 -1
- package/build/es/components/feedback/followup/followupContext.d.ts +1 -1
- package/build/es/components/feedback/followup/followupContext.js.map +1 -1
- package/build/es/components/feedback/main-question/mainQuestionContext.d.ts +1 -1
- package/build/es/components/feedback/main-question/mainQuestionContext.js.map +1 -1
- package/build/es/components/feedback/questions/smileyUtils.js.map +1 -1
- package/build/es/components/file-input/internal/Dropzone.d.ts +1 -1
- package/build/es/components/file-input/internal/Dropzone.js.map +1 -1
- package/build/es/components/file-input/internal/fileInputContext.d.ts +1 -1
- package/build/es/components/file-input/internal/fileInputContext.js.map +1 -1
- package/build/es/components/icon/development/internal/IconsExampleGrid.d.ts +1 -1
- package/build/es/components/input-group/InputGroup.d.ts +2 -2
- package/build/es/components/input-group/types.d.ts +1 -1
- package/build/es/components/link/Link.d.ts +2 -2
- package/build/es/components/link/Link.js +1 -1
- package/build/es/components/link/Link.js.map +1 -1
- package/build/es/components/link/types.d.ts +1 -4
- package/build/es/components/link-list/LinkList.d.ts +1 -1
- package/build/es/components/list/ListItem.d.ts +1 -1
- package/build/es/components/list/ListItem.js.map +1 -1
- package/build/es/components/logo/types.d.ts +1 -1
- package/build/es/components/menu/types.d.ts +1 -1
- package/build/es/components/modal/Modal.d.ts +2 -9
- package/build/es/components/modal/Modal.js +1 -1
- package/build/es/components/modal/Modal.js.map +1 -1
- package/build/es/components/modal/index.d.ts +1 -1
- package/build/es/components/modal/types.d.ts +19 -1
- package/build/es/components/nav-link/index.d.ts +2 -2
- package/build/es/components/nav-link/index.js +1 -1
- package/build/es/components/popover/Popover.js +1 -1
- package/build/es/components/popover/Popover.js.map +1 -1
- package/build/es/components/radio-button/BaseRadioButton.js +1 -1
- package/build/es/components/radio-button/BaseRadioButton.js.map +1 -1
- package/build/es/components/radio-button/radioGroupContext.d.ts +1 -1
- package/build/es/components/radio-button/radioGroupContext.js.map +1 -1
- package/build/es/components/screen-reader-only/types.d.ts +1 -1
- package/build/es/components/select/index.d.ts +2 -2
- package/build/es/components/select/index.js +1 -1
- package/build/es/components/select/types.d.ts +1 -1
- package/build/es/components/system-message/types.d.ts +1 -1
- package/build/es/components/table/types.d.ts +1 -1
- package/build/es/components/table-of-contents/TableOfContents.d.ts +1 -1
- package/build/es/components/tabs/types.d.ts +1 -1
- package/build/es/components/toast/types.d.ts +1 -1
- package/build/es/components/toggle-switch/types.d.ts +1 -1
- package/build/es/components/tooltip/Tooltip.d.ts +1 -1
- package/build/es/components/tooltip/Tooltip.js.map +1 -1
- package/build/es/hooks/useAnimatedHeight/types.d.ts +1 -1
- package/build/es/hooks/useAnimatedHeight/useAnimatedHeight.js +1 -1
- package/build/es/hooks/useAnimatedHeight/useAnimatedHeight.js.map +1 -1
- package/build/es/hooks/useAnimatedHeight/useAnimatedHeightBetween.js +1 -1
- package/build/es/hooks/useAnimatedHeight/useAnimatedHeightBetween.js.map +1 -1
- package/build/es/hooks/useAnimatedHeight/useAutoAnimateHeight.d.ts +1 -1
- package/build/es/hooks/useAnimatedHeight/useAutoAnimateHeight.js +1 -1
- package/build/es/hooks/useAnimatedHeight/useAutoAnimateHeight.js.map +1 -1
- package/build/es/hooks/useAriaLiveRegion/useAriaLiveRegion.d.ts +1 -1
- package/build/es/hooks/useBrowserPreferences/useBrowserPreferences.d.ts +1 -1
- package/build/es/hooks/useBrowserPreferences/useBrowserPreferences.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/tailwind/plugins/jokulTypographyPlugin.js +1 -1
- package/build/es/tailwind/plugins/jokulTypographyPlugin.js.map +1 -1
- package/build/es/tailwind/tailwindPreset.js +1 -1
- package/build/es/tailwind/tailwindPreset.js.map +1 -1
- package/build/es/tokens.d.ts +235 -0
- package/build/es/tokens.js +2 -0
- package/build/es/tokens.js.map +1 -0
- package/build/es/utilities/getThemeAndSize.d.ts +1 -1
- package/build/es/utilities/getThemeAndSize.js +1 -1
- package/build/es/utilities/getThemeAndSize.js.map +1 -1
- package/build/es/utilities/index.d.ts +1 -0
- package/build/es/{core → utilities}/types.d.ts +1 -1
- package/codemods/__tests__/import-paths.test.mjs +84 -0
- package/codemods/import-paths.mjs +393 -0
- package/package.json +12 -585
- package/styles/base.css +1822 -0
- package/styles/base.min.css +2 -0
- package/styles/components/autosuggest/autosuggest.css +6 -12
- package/styles/components/autosuggest/autosuggest.min.css +1 -1
- package/styles/components/autosuggest/autosuggest.scss +3 -3
- package/styles/{components-beta → components/beta}/description-list/description-list.css +1 -1
- package/styles/{components-beta → components/beta}/description-list/description-list.min.css +1 -1
- package/styles/{components-beta → components/beta}/description-list/description-list.scss +2 -2
- package/styles/{components-beta → components/beta}/nav-link/navlink.css +11 -14
- package/styles/components/beta/nav-link/navlink.min.css +1 -0
- package/styles/{components-beta → components/beta}/nav-link/navlink.scss +4 -4
- package/styles/components/beta/select/_index.scss +3 -0
- package/styles/{components-beta → components/beta}/select/select.css +13 -16
- package/styles/components/beta/select/select.min.css +1 -0
- package/styles/{components-beta → components/beta}/select/select.scss +9 -9
- package/styles/components/breadcrumb/breadcrumb.css +1 -1
- package/styles/components/breadcrumb/breadcrumb.min.css +1 -1
- package/styles/components/breadcrumb/breadcrumb.scss +1 -1
- package/styles/components/button/button.css +15 -14
- package/styles/components/button/button.min.css +1 -1
- package/styles/components/button/button.scss +14 -14
- package/styles/components/card/card.css +8 -11
- package/styles/components/card/card.min.css +1 -1
- package/styles/components/card/card.scss +7 -11
- package/styles/components/checkbox/checkbox.css +55 -42
- package/styles/components/checkbox/checkbox.min.css +1 -1
- package/styles/components/checkbox/checkbox.scss +43 -36
- package/styles/components/checkbox-panel/checkbox-panel.css +84 -72
- package/styles/components/checkbox-panel/checkbox-panel.min.css +1 -1
- package/styles/components/checkbox-panel/checkbox-panel.scss +5 -1
- package/styles/components/checkbox-panel/development/styles.scss +1 -1
- package/styles/components/chip/chip.css +6 -9
- package/styles/components/chip/chip.min.css +1 -1
- package/styles/components/chip/chip.scss +3 -3
- package/styles/components/combobox/combobox.css +30 -39
- package/styles/components/combobox/combobox.min.css +1 -1
- package/styles/components/combobox/combobox.scss +10 -8
- package/styles/components/cookie-consent/cookie-consent.css +1 -5
- package/styles/components/cookie-consent/cookie-consent.min.css +1 -1
- package/styles/components/cookie-consent/cookie-consent.scss +1 -1
- package/styles/components/countdown/countdown.css +4 -4
- package/styles/components/countdown/countdown.min.css +1 -1
- package/styles/components/datepicker/_calendar-date-button.scss +9 -9
- package/styles/components/datepicker/_calendar-navigation-dropdown.scss +3 -3
- package/styles/components/datepicker/_calendar-navigation.scss +1 -1
- package/styles/components/datepicker/_calendar-table.scss +1 -1
- package/styles/components/datepicker/_calendar.scss +7 -8
- package/styles/components/datepicker/datepicker.css +27 -31
- package/styles/components/datepicker/datepicker.min.css +1 -1
- package/styles/components/datepicker/datepicker.scss +1 -1
- package/styles/components/description-list/description-list.css +2 -2
- package/styles/components/description-list/description-list.min.css +1 -1
- package/styles/components/description-list/description-list.scss +3 -3
- package/styles/components/expander/expandable.css +20 -20
- package/styles/components/expander/expandable.min.css +1 -1
- package/styles/components/expander/expandable.scss +16 -20
- package/styles/components/feedback/feedback.css +14 -20
- package/styles/components/feedback/feedback.min.css +1 -1
- package/styles/components/feedback/feedback.scss +5 -10
- package/styles/components/file/file.css +10 -18
- package/styles/components/file/file.min.css +1 -1
- package/styles/components/file/file.scss +7 -7
- package/styles/components/file-input/file-input.css +52 -70
- package/styles/components/file-input/file-input.min.css +1 -1
- package/styles/components/file-input/file-input.scss +4 -4
- package/styles/components/help/help.css +2 -2
- package/styles/components/help/help.min.css +1 -1
- package/styles/components/help/help.scss +3 -3
- package/styles/components/icon/_base-styles.scss +3 -5
- package/styles/components/icon/icon.css +13 -34
- package/styles/components/icon/icon.min.css +1 -1
- package/styles/components/icon/icon.scss +5 -19
- package/styles/components/icon-button/icon-button.css +3 -3
- package/styles/components/icon-button/icon-button.min.css +1 -1
- package/styles/components/icon-button/icon-button.scss +1 -1
- package/styles/components/image/image.css +2 -2
- package/styles/components/image/image.min.css +1 -1
- package/styles/components/image/image.scss +1 -1
- package/styles/components/input-group/_field-group.scss +1 -1
- package/styles/components/input-group/_labels.scss +1 -1
- package/styles/components/input-group/input-group.css +12 -27
- package/styles/components/input-group/input-group.min.css +1 -1
- package/styles/components/input-group/input-group.scss +1 -1
- package/styles/components/input-panel/input-panel.css +26 -30
- package/styles/components/input-panel/input-panel.min.css +1 -1
- package/styles/components/input-panel/input-panel.scss +22 -20
- package/styles/components/link/link.css +7 -8
- package/styles/components/link/link.min.css +1 -1
- package/styles/components/link/link.scss +1 -2
- package/styles/components/link-list/link-list.css +17 -23
- package/styles/components/link-list/link-list.min.css +1 -1
- package/styles/components/link-list/link-list.scss +7 -3
- package/styles/components/list/list.css +6 -27
- package/styles/components/list/list.min.css +1 -1
- package/styles/components/list/list.scss +11 -15
- package/styles/components/loader/loader.css +6 -6
- package/styles/components/loader/loader.min.css +1 -1
- package/styles/components/loader/loader.scss +1 -1
- package/styles/components/loader/skeleton-loader.css +4 -4
- package/styles/components/loader/skeleton-loader.min.css +1 -1
- package/styles/components/loader/skeleton-loader.scss +2 -2
- package/styles/components/logo/logo.css +4 -4
- package/styles/components/logo/logo.min.css +1 -1
- package/styles/components/logo/logo.scss +1 -1
- package/styles/components/menu/_menu-divider.scss +2 -2
- package/styles/components/menu/_menu-item.scss +1 -1
- package/styles/components/menu/menu.css +8 -23
- package/styles/components/menu/menu.min.css +1 -1
- package/styles/components/menu/menu.scss +8 -12
- package/styles/components/message/message.css +25 -27
- package/styles/components/message/message.min.css +1 -1
- package/styles/components/message/message.scss +17 -7
- package/styles/components/modal/_layout.scss +22 -0
- package/styles/components/modal/_modal-base.scss +32 -0
- package/styles/components/modal/_motion.scss +45 -0
- package/styles/components/modal/_overlay.scss +20 -0
- package/styles/components/modal/_parts.scss +33 -0
- package/styles/components/modal/_placement.scss +59 -0
- package/styles/components/modal/modal.css +120 -42
- package/styles/components/modal/modal.min.css +1 -1
- package/styles/components/modal/modal.scss +6 -95
- package/styles/components/nav-link/nav-link.css +5 -5
- package/styles/components/nav-link/nav-link.min.css +1 -1
- package/styles/components/nav-link/nav-link.scss +2 -2
- package/styles/components/pagination/development/styles.scss +1 -1
- package/styles/components/pagination/pagination.css +2 -2
- package/styles/components/pagination/pagination.min.css +1 -1
- package/styles/components/pagination/pagination.scss +1 -1
- package/styles/components/popover/popover.css +17 -18
- package/styles/components/popover/popover.min.css +1 -1
- package/styles/components/popover/popover.scss +21 -11
- package/styles/components/progress-bar/progress-bar.css +29 -5
- package/styles/components/progress-bar/progress-bar.min.css +1 -1
- package/styles/components/progress-bar/progress-bar.scss +6 -1
- package/styles/components/radio-button/radio-button.css +53 -36
- package/styles/components/radio-button/radio-button.min.css +1 -1
- package/styles/components/radio-button/radio-button.scss +40 -31
- package/styles/components/radio-panel/development/styles.scss +1 -1
- package/styles/components/radio-panel/radio-panel.css +29 -30
- package/styles/components/radio-panel/radio-panel.min.css +1 -1
- package/styles/components/radio-panel/radio-panel.scss +5 -1
- package/styles/components/search/search-with-submit-button.css +3 -3
- package/styles/components/search/search-with-submit-button.min.css +1 -1
- package/styles/components/search/search-with-submit-button.scss +2 -2
- package/styles/components/search/search.css +10 -16
- package/styles/components/search/search.min.css +1 -1
- package/styles/components/search/search.scss +2 -2
- package/styles/components/segmented-control/segmented-control.css +91 -114
- package/styles/components/segmented-control/segmented-control.min.css +1 -1
- package/styles/components/segmented-control/segmented-control.scss +5 -5
- package/styles/components/select/select.css +27 -36
- package/styles/components/select/select.min.css +1 -1
- package/styles/components/select/select.scss +13 -14
- package/styles/components/summary-table/development/summary-table-example.scss +1 -1
- package/styles/components/summary-table/summary-table.css +5 -8
- package/styles/components/summary-table/summary-table.min.css +1 -1
- package/styles/components/summary-table/summary-table.scss +5 -5
- package/styles/components/system-message/system-message.css +22 -15
- package/styles/components/system-message/system-message.min.css +1 -1
- package/styles/components/system-message/system-message.scss +18 -9
- package/styles/components/table/_table-caption.scss +1 -1
- package/styles/components/table/_table-cell.scss +1 -1
- package/styles/components/table/_table-head.scss +3 -13
- package/styles/components/table/_table-header.scss +4 -4
- package/styles/components/table/_table-pagination.scss +1 -1
- package/styles/components/table/_table-row.scss +3 -3
- package/styles/components/table/table.css +20 -48
- package/styles/components/table/table.min.css +1 -1
- package/styles/components/table/table.scss +1 -1
- package/styles/components/table-of-contents/table-of-contents.css +4 -8
- package/styles/components/table-of-contents/table-of-contents.min.css +1 -1
- package/styles/components/table-of-contents/table-of-contents.scss +2 -2
- package/styles/components/tabs/tabs.css +9 -12
- package/styles/components/tabs/tabs.min.css +1 -1
- package/styles/components/tabs/tabs.scss +3 -3
- package/styles/components/tag/tag.css +18 -11
- package/styles/components/tag/tag.min.css +1 -1
- package/styles/components/tag/tag.scss +18 -8
- package/styles/components/text-area/text-area.css +17 -26
- package/styles/components/text-area/text-area.min.css +1 -1
- package/styles/components/text-area/text-area.scss +1 -1
- package/styles/components/text-input/text-input.css +12 -18
- package/styles/components/text-input/text-input.min.css +1 -1
- package/styles/components/text-input/text-input.scss +2 -3
- package/styles/components/toast/toast.css +21 -20
- package/styles/components/toast/toast.min.css +1 -1
- package/styles/components/toast/toast.scss +16 -14
- package/styles/components/toggle-switch/_toggle-slider.scss +5 -5
- package/styles/components/toggle-switch/toggle-switch.css +21 -29
- package/styles/components/toggle-switch/toggle-switch.min.css +2 -2
- package/styles/components/toggle-switch/toggle-switch.scss +10 -17
- package/styles/components/tooltip/tooltip.css +7 -11
- package/styles/components/tooltip/tooltip.min.css +1 -1
- package/styles/components/tooltip/tooltip.scss +4 -4
- package/styles/{styles.css → components.css} +801 -872
- package/styles/components.min.css +3 -0
- package/styles/{styles.scss → components.scss} +2 -2
- package/styles/{core/global → global}/_base-class.scss +6 -4
- package/styles/{core/global → global}/_top-layer.scss +1 -1
- package/styles/hooks/stories/styles.scss +7 -9
- package/styles/{core/jkl/_theme.scss → jkl/_forced-colors.scss} +0 -49
- package/styles/{core/jkl → jkl}/_index.scss +3 -6
- package/styles/{core/jkl → jkl}/_motion.scss +8 -26
- package/styles/{core/jkl → jkl}/_ornaments.scss +1 -1
- package/styles/{core/jkl → jkl}/_reset.scss +2 -2
- package/styles/{core/jkl → jkl}/_spacing.scss +1 -6
- package/styles/jkl/_tokens.scss +386 -0
- package/styles/{core/jkl → jkl}/_typography.scss +5 -98
- package/styles/shared/input/shared-input-styles.scss +7 -7
- package/styles/shared/track/track.scss +3 -3
- package/styles/tailwind.css +213 -0
- package/styles/theme/_color-scheme.scss +153 -0
- package/styles/{core/theme → theme}/_dynamic-spacing.scss +9 -5
- package/styles/theme/_fonts.scss +147 -0
- package/styles/theme/_index.scss +8 -0
- package/styles/theme/_size.scss +53 -0
- package/styles/theme/_tokens.scss +94 -0
- package/styles/theme/brands/dnb/_color-scheme.scss +119 -0
- package/styles/theme/brands/eika/_color-scheme.scss +119 -0
- package/styles/theme/brands/sparebank1/_color-scheme.scss +119 -0
- package/styles/{core/utility → utility}/_headings.scss +1 -1
- package/styles/utility/_paragraphs.scss +24 -0
- package/styles/{core/utility → utility}/_screen-reader.scss +1 -1
- package/styles/{core/utility → utility}/_spacing.scss +4 -3
- package/build/cjs/components-beta/description-list/DescriptionList.cjs +0 -2
- package/build/cjs/components-beta/description-list/DescriptionList.cjs.map +0 -1
- package/build/cjs/components-beta/description-list/DescriptionListItem.cjs +0 -2
- package/build/cjs/components-beta/description-list/DescriptionListItem.cjs.map +0 -1
- package/build/cjs/components-beta/nav-link/NavLink.cjs +0 -2
- package/build/cjs/components-beta/nav-link/NavLink.cjs.map +0 -1
- package/build/cjs/components-beta/nav-link/index.d.cts +0 -1
- package/build/cjs/components-beta/select/Select.cjs +0 -2
- package/build/cjs/components-beta/select/Select.cjs.map +0 -1
- package/build/cjs/components-beta/select/index.d.cts +0 -2
- package/build/cjs/core/index.cjs +0 -2
- package/build/cjs/core/index.cjs.map +0 -1
- package/build/cjs/core/index.d.cts +0 -2
- package/build/cjs/core/tokens/build-tailwind-4.cjs +0 -2
- package/build/cjs/core/tokens/build-tailwind-4.cjs.map +0 -1
- package/build/cjs/core/tokens/build-tailwind-4.d.cts +0 -1
- package/build/cjs/core/tokens/style-dictionary/build.cjs +0 -2
- package/build/cjs/core/tokens/style-dictionary/build.cjs.map +0 -1
- package/build/cjs/core/tokens/style-dictionary/build.d.cts +0 -0
- package/build/cjs/core/tokens/style-dictionary/config.cjs +0 -2
- package/build/cjs/core/tokens/style-dictionary/config.cjs.map +0 -1
- package/build/cjs/core/tokens/style-dictionary/config.d.cts +0 -4
- package/build/cjs/core/tokens/style-dictionary/filters/index.cjs +0 -2
- package/build/cjs/core/tokens/style-dictionary/filters/index.cjs.map +0 -1
- package/build/cjs/core/tokens/style-dictionary/filters/index.d.cts +0 -3
- package/build/cjs/core/tokens/style-dictionary/formats/css-dynamic-color-variables.cjs +0 -2
- package/build/cjs/core/tokens/style-dictionary/formats/css-dynamic-color-variables.cjs.map +0 -1
- package/build/cjs/core/tokens/style-dictionary/formats/css-dynamic-color-variables.d.cts +0 -3
- package/build/cjs/core/tokens/style-dictionary/formats/css-theme-variables.cjs +0 -2
- package/build/cjs/core/tokens/style-dictionary/formats/css-theme-variables.cjs.map +0 -1
- package/build/cjs/core/tokens/style-dictionary/formats/css-theme-variables.d.cts +0 -3
- package/build/cjs/core/tokens/style-dictionary/formats/index.cjs +0 -2
- package/build/cjs/core/tokens/style-dictionary/formats/index.cjs.map +0 -1
- package/build/cjs/core/tokens/style-dictionary/formats/index.d.cts +0 -6
- package/build/cjs/core/tokens/style-dictionary/formats/javascript-esm.cjs +0 -2
- package/build/cjs/core/tokens/style-dictionary/formats/javascript-esm.cjs.map +0 -1
- package/build/cjs/core/tokens/style-dictionary/formats/javascript-esm.d.cts +0 -3
- package/build/cjs/core/tokens/style-dictionary/formats/scss-theme-variables.cjs +0 -2
- package/build/cjs/core/tokens/style-dictionary/formats/scss-theme-variables.cjs.map +0 -1
- package/build/cjs/core/tokens/style-dictionary/formats/scss-theme-variables.d.cts +0 -3
- package/build/cjs/core/tokens/style-dictionary/formats/tailwindcss-colors.cjs +0 -2
- package/build/cjs/core/tokens/style-dictionary/formats/tailwindcss-colors.cjs.map +0 -1
- package/build/cjs/core/tokens/style-dictionary/formats/tailwindcss-colors.d.cts +0 -3
- package/build/cjs/core/tokens/style-dictionary/register.cjs +0 -2
- package/build/cjs/core/tokens/style-dictionary/register.cjs.map +0 -1
- package/build/cjs/core/tokens/style-dictionary/register.d.cts +0 -1
- package/build/cjs/core/tokens/style-dictionary/transforms/index.cjs +0 -2
- package/build/cjs/core/tokens/style-dictionary/transforms/index.cjs.map +0 -1
- package/build/cjs/core/tokens/style-dictionary/transforms/index.d.cts +0 -2
- package/build/cjs/core/tokens/style-dictionary/transforms/strip-light-dark.cjs +0 -2
- package/build/cjs/core/tokens/style-dictionary/transforms/strip-light-dark.cjs.map +0 -1
- package/build/cjs/core/tokens/style-dictionary/transforms/strip-light-dark.d.cts +0 -3
- package/build/cjs/index.cjs +0 -2
- package/build/cjs/index.cjs.map +0 -1
- package/build/cjs/index.d.cts +0 -3
- package/build/es/components-beta/description-list/DescriptionList.js +0 -2
- package/build/es/components-beta/description-list/DescriptionList.js.map +0 -1
- package/build/es/components-beta/description-list/DescriptionListItem.js +0 -2
- package/build/es/components-beta/description-list/DescriptionListItem.js.map +0 -1
- package/build/es/components-beta/nav-link/NavLink.js +0 -2
- package/build/es/components-beta/nav-link/NavLink.js.map +0 -1
- package/build/es/components-beta/nav-link/index.d.ts +0 -1
- package/build/es/components-beta/select/Select.js +0 -2
- package/build/es/components-beta/select/Select.js.map +0 -1
- package/build/es/components-beta/select/index.d.ts +0 -2
- package/build/es/core/index.d.ts +0 -2
- package/build/es/core/index.js +0 -2
- package/build/es/core/index.js.map +0 -1
- package/build/es/core/tokens/build-tailwind-4.d.ts +0 -1
- package/build/es/core/tokens/build-tailwind-4.js +0 -2
- package/build/es/core/tokens/build-tailwind-4.js.map +0 -1
- package/build/es/core/tokens/style-dictionary/build.d.ts +0 -0
- package/build/es/core/tokens/style-dictionary/build.js +0 -2
- package/build/es/core/tokens/style-dictionary/build.js.map +0 -1
- package/build/es/core/tokens/style-dictionary/config.d.ts +0 -4
- package/build/es/core/tokens/style-dictionary/config.js +0 -2
- package/build/es/core/tokens/style-dictionary/config.js.map +0 -1
- package/build/es/core/tokens/style-dictionary/filters/index.d.ts +0 -3
- package/build/es/core/tokens/style-dictionary/filters/index.js +0 -2
- package/build/es/core/tokens/style-dictionary/filters/index.js.map +0 -1
- package/build/es/core/tokens/style-dictionary/formats/css-dynamic-color-variables.d.ts +0 -3
- package/build/es/core/tokens/style-dictionary/formats/css-dynamic-color-variables.js +0 -2
- package/build/es/core/tokens/style-dictionary/formats/css-dynamic-color-variables.js.map +0 -1
- package/build/es/core/tokens/style-dictionary/formats/css-theme-variables.d.ts +0 -3
- package/build/es/core/tokens/style-dictionary/formats/css-theme-variables.js +0 -2
- package/build/es/core/tokens/style-dictionary/formats/css-theme-variables.js.map +0 -1
- package/build/es/core/tokens/style-dictionary/formats/index.d.ts +0 -6
- package/build/es/core/tokens/style-dictionary/formats/index.js +0 -2
- package/build/es/core/tokens/style-dictionary/formats/index.js.map +0 -1
- package/build/es/core/tokens/style-dictionary/formats/javascript-esm.d.ts +0 -3
- package/build/es/core/tokens/style-dictionary/formats/javascript-esm.js +0 -2
- package/build/es/core/tokens/style-dictionary/formats/javascript-esm.js.map +0 -1
- package/build/es/core/tokens/style-dictionary/formats/scss-theme-variables.d.ts +0 -3
- package/build/es/core/tokens/style-dictionary/formats/scss-theme-variables.js +0 -2
- package/build/es/core/tokens/style-dictionary/formats/scss-theme-variables.js.map +0 -1
- package/build/es/core/tokens/style-dictionary/formats/tailwindcss-colors.d.ts +0 -3
- package/build/es/core/tokens/style-dictionary/formats/tailwindcss-colors.js +0 -2
- package/build/es/core/tokens/style-dictionary/formats/tailwindcss-colors.js.map +0 -1
- package/build/es/core/tokens/style-dictionary/register.d.ts +0 -1
- package/build/es/core/tokens/style-dictionary/register.js +0 -2
- package/build/es/core/tokens/style-dictionary/register.js.map +0 -1
- package/build/es/core/tokens/style-dictionary/transforms/index.d.ts +0 -2
- package/build/es/core/tokens/style-dictionary/transforms/index.js +0 -2
- package/build/es/core/tokens/style-dictionary/transforms/index.js.map +0 -1
- package/build/es/core/tokens/style-dictionary/transforms/strip-light-dark.d.ts +0 -3
- package/build/es/core/tokens/style-dictionary/transforms/strip-light-dark.js +0 -2
- package/build/es/core/tokens/style-dictionary/transforms/strip-light-dark.js.map +0 -1
- package/build/es/index.d.ts +0 -3
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/index-Ck94bTpt.cjs +0 -2
- package/build/index-Ck94bTpt.cjs.map +0 -1
- package/build/index-DOHQmuhD.js +0 -2
- package/build/index-DOHQmuhD.js.map +0 -1
- package/src/fonts/styles/_index.scss +0 -1
- package/src/fonts/styles/webfonts.scss +0 -145
- package/src/tailwind/v4/jokul-tailwind.css +0 -266
- package/styles/components-beta/nav-link/navlink.min.css +0 -1
- package/styles/components-beta/select/_index.scss +0 -3
- package/styles/components-beta/select/select.min.css +0 -1
- package/styles/core/core.css +0 -1731
- package/styles/core/core.min.css +0 -2
- package/styles/core/jkl/_colors.scss +0 -26
- package/styles/core/jkl/_helpers.scss +0 -26
- package/styles/core/jkl/legacy/_index.scss +0 -2
- package/styles/core/theme/_index.scss +0 -10
- package/styles/core/theme/_old-vars.scss +0 -21
- package/styles/core/theme/_shape.scss +0 -12
- package/styles/core/theme/_spacing.scss +0 -64
- package/styles/core/theme/_typography.scss +0 -38
- package/styles/core/utility/_paragraphs.scss +0 -29
- package/styles/fonts/_index.scss +0 -1
- package/styles/fonts/webfonts.css +0 -115
- package/styles/fonts/webfonts.min.css +0 -1
- package/styles/fonts/webfonts.scss +0 -145
- package/styles/styles.min.css +0 -3
- /package/build/cjs/{components-beta → components/beta}/description-list/DescriptionList.d.cts +0 -0
- /package/build/cjs/{components-beta → components/beta}/description-list/DescriptionListItem.d.cts +0 -0
- /package/build/cjs/{components-beta → components/beta}/description-list/index.cjs +0 -0
- /package/build/cjs/{components-beta → components/beta}/description-list/index.cjs.map +0 -0
- /package/build/cjs/{components-beta → components/beta}/description-list/types.cjs +0 -0
- /package/build/cjs/{components-beta → components/beta}/description-list/types.cjs.map +0 -0
- /package/build/cjs/{components-beta → components/beta}/description-list/types.d.cts +0 -0
- /package/build/cjs/{components-beta → components/beta}/nav-link/NavLink.d.cts +0 -0
- /package/build/cjs/{components-beta → components/beta}/nav-link/index.cjs +0 -0
- /package/build/cjs/{components-beta → components/beta}/nav-link/index.cjs.map +0 -0
- /package/build/cjs/{components-beta → components/beta}/nav-link/types.cjs +0 -0
- /package/build/cjs/{components-beta → components/beta}/nav-link/types.cjs.map +0 -0
- /package/build/cjs/{components-beta → components/beta}/select/Select.d.cts +0 -0
- /package/build/cjs/{components-beta → components/beta}/select/index.cjs +0 -0
- /package/build/cjs/{components-beta → components/beta}/select/index.cjs.map +0 -0
- /package/build/cjs/{components-beta → components/beta}/select/types.cjs +0 -0
- /package/build/cjs/{components-beta → components/beta}/select/types.cjs.map +0 -0
- /package/build/cjs/{core → utilities}/types.cjs +0 -0
- /package/build/cjs/{core → utilities}/types.cjs.map +0 -0
- /package/build/es/{components-beta → components/beta}/description-list/DescriptionList.d.ts +0 -0
- /package/build/es/{components-beta → components/beta}/description-list/DescriptionListItem.d.ts +0 -0
- /package/build/es/{components-beta → components/beta}/description-list/index.js +0 -0
- /package/build/es/{components-beta → components/beta}/description-list/index.js.map +0 -0
- /package/build/es/{components-beta → components/beta}/description-list/types.d.ts +0 -0
- /package/build/es/{components-beta → components/beta}/description-list/types.js +0 -0
- /package/build/es/{components-beta → components/beta}/description-list/types.js.map +0 -0
- /package/build/es/{components-beta → components/beta}/nav-link/NavLink.d.ts +0 -0
- /package/build/es/{components-beta → components/beta}/nav-link/index.js +0 -0
- /package/build/es/{components-beta → components/beta}/nav-link/index.js.map +0 -0
- /package/build/es/{components-beta → components/beta}/nav-link/types.js +0 -0
- /package/build/es/{components-beta → components/beta}/nav-link/types.js.map +0 -0
- /package/build/es/{components-beta → components/beta}/select/Select.d.ts +0 -0
- /package/build/es/{components-beta → components/beta}/select/index.js +0 -0
- /package/build/es/{components-beta → components/beta}/select/index.js.map +0 -0
- /package/build/es/{components-beta → components/beta}/select/types.js +0 -0
- /package/build/es/{components-beta → components/beta}/select/types.js.map +0 -0
- /package/build/es/{core → utilities}/types.js +0 -0
- /package/build/es/{core → utilities}/types.js.map +0 -0
- /package/styles/{core/_layers.scss → _layers.scss} +0 -0
- /package/styles/{core/core.scss → base.scss} +0 -0
- /package/styles/{components-beta → components/beta}/description-list/_index.scss +0 -0
- /package/styles/{components-beta → components/beta}/nav-link/_index.scss +0 -0
- /package/styles/{core/global → global}/_index.scss +0 -0
- /package/styles/{core/jkl → jkl}/_convert.scss +0 -0
- /package/styles/{core/jkl → jkl}/_navigation.scss +0 -0
- /package/styles/{core/jkl → jkl}/_responsive-units.scss +0 -0
- /package/styles/{core/jkl → jkl}/_screenreader.scss +0 -0
- /package/styles/{core/jkl → jkl}/_screens.scss +0 -0
- /package/styles/{core/jkl → jkl}/_shadows.scss +0 -0
- /package/styles/{core/jkl → jkl}/_underline.scss +0 -0
- /package/styles/{core/jkl → jkl}/_z-index.scss +0 -0
- /package/styles/{core/resets → resets}/_index.scss +0 -0
- /package/styles/{core/resets → resets}/_normalize.scss +0 -0
- /package/styles/{core/resets → resets}/_reset.scss +0 -0
- /package/styles/{core/utility → utility}/_index.scss +0 -0
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not edit directly, this file was auto-generated.
|
|
3
|
+
*/
|
|
4
|
+
declare const _default: {
|
|
5
|
+
color: {
|
|
6
|
+
neutral: {
|
|
7
|
+
background: {
|
|
8
|
+
page: string;
|
|
9
|
+
container: string;
|
|
10
|
+
action: string;
|
|
11
|
+
};
|
|
12
|
+
text: {
|
|
13
|
+
default: string;
|
|
14
|
+
subdued: string;
|
|
15
|
+
"on-action": string;
|
|
16
|
+
};
|
|
17
|
+
border: {
|
|
18
|
+
strong: string;
|
|
19
|
+
default: string;
|
|
20
|
+
subdued: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
accent: {
|
|
24
|
+
background: {
|
|
25
|
+
page: string;
|
|
26
|
+
container: string;
|
|
27
|
+
action: string;
|
|
28
|
+
};
|
|
29
|
+
text: {
|
|
30
|
+
default: string;
|
|
31
|
+
subdued: string;
|
|
32
|
+
"on-action": string;
|
|
33
|
+
};
|
|
34
|
+
border: {
|
|
35
|
+
strong: string;
|
|
36
|
+
default: string;
|
|
37
|
+
subdued: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
warning: {
|
|
41
|
+
background: {
|
|
42
|
+
page: string;
|
|
43
|
+
container: string;
|
|
44
|
+
action: string;
|
|
45
|
+
};
|
|
46
|
+
text: {
|
|
47
|
+
default: string;
|
|
48
|
+
subdued: string;
|
|
49
|
+
"on-action": string;
|
|
50
|
+
};
|
|
51
|
+
border: {
|
|
52
|
+
strong: string;
|
|
53
|
+
default: string;
|
|
54
|
+
subdued: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
success: {
|
|
58
|
+
background: {
|
|
59
|
+
page: string;
|
|
60
|
+
container: string;
|
|
61
|
+
action: string;
|
|
62
|
+
};
|
|
63
|
+
text: {
|
|
64
|
+
default: string;
|
|
65
|
+
subdued: string;
|
|
66
|
+
"on-action": string;
|
|
67
|
+
};
|
|
68
|
+
border: {
|
|
69
|
+
strong: string;
|
|
70
|
+
default: string;
|
|
71
|
+
subdued: string;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
info: {
|
|
75
|
+
background: {
|
|
76
|
+
page: string;
|
|
77
|
+
container: string;
|
|
78
|
+
action: string;
|
|
79
|
+
};
|
|
80
|
+
text: {
|
|
81
|
+
default: string;
|
|
82
|
+
subdued: string;
|
|
83
|
+
"on-action": string;
|
|
84
|
+
};
|
|
85
|
+
border: {
|
|
86
|
+
strong: string;
|
|
87
|
+
default: string;
|
|
88
|
+
subdued: string;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
error: {
|
|
92
|
+
background: {
|
|
93
|
+
page: string;
|
|
94
|
+
container: string;
|
|
95
|
+
action: string;
|
|
96
|
+
};
|
|
97
|
+
text: {
|
|
98
|
+
default: string;
|
|
99
|
+
subdued: string;
|
|
100
|
+
"on-action": string;
|
|
101
|
+
};
|
|
102
|
+
border: {
|
|
103
|
+
strong: string;
|
|
104
|
+
default: string;
|
|
105
|
+
subdued: string;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
unit: {
|
|
110
|
+
0: string;
|
|
111
|
+
10: string;
|
|
112
|
+
15: string;
|
|
113
|
+
20: string;
|
|
114
|
+
25: string;
|
|
115
|
+
30: string;
|
|
116
|
+
35: string;
|
|
117
|
+
40: string;
|
|
118
|
+
50: string;
|
|
119
|
+
60: string;
|
|
120
|
+
70: string;
|
|
121
|
+
80: string;
|
|
122
|
+
90: string;
|
|
123
|
+
100: string;
|
|
124
|
+
130: string;
|
|
125
|
+
210: string;
|
|
126
|
+
base: string;
|
|
127
|
+
"02": string;
|
|
128
|
+
"05": string;
|
|
129
|
+
};
|
|
130
|
+
spacing: {
|
|
131
|
+
0: string;
|
|
132
|
+
2: string;
|
|
133
|
+
4: string;
|
|
134
|
+
8: string;
|
|
135
|
+
12: string;
|
|
136
|
+
16: string;
|
|
137
|
+
24: string;
|
|
138
|
+
32: string;
|
|
139
|
+
40: string;
|
|
140
|
+
64: string;
|
|
141
|
+
104: string;
|
|
142
|
+
168: string;
|
|
143
|
+
none: string;
|
|
144
|
+
"2xs": string;
|
|
145
|
+
xs: string;
|
|
146
|
+
s: string;
|
|
147
|
+
m: string;
|
|
148
|
+
l: string;
|
|
149
|
+
xl: string;
|
|
150
|
+
"2xl": string;
|
|
151
|
+
};
|
|
152
|
+
border: {
|
|
153
|
+
width: {
|
|
154
|
+
1: string;
|
|
155
|
+
2: string;
|
|
156
|
+
3: string;
|
|
157
|
+
};
|
|
158
|
+
radius: {
|
|
159
|
+
none: string;
|
|
160
|
+
xs: string;
|
|
161
|
+
s: string;
|
|
162
|
+
m: string;
|
|
163
|
+
l: string;
|
|
164
|
+
full: string;
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
breakpoint: {
|
|
168
|
+
small: string;
|
|
169
|
+
medium: string;
|
|
170
|
+
large: string;
|
|
171
|
+
xl: string;
|
|
172
|
+
};
|
|
173
|
+
motion: {
|
|
174
|
+
timing: {
|
|
175
|
+
energetic: string;
|
|
176
|
+
snappy: string;
|
|
177
|
+
productive: string;
|
|
178
|
+
polite: string;
|
|
179
|
+
expressive: string;
|
|
180
|
+
lazy: string;
|
|
181
|
+
};
|
|
182
|
+
easing: {
|
|
183
|
+
standard: string;
|
|
184
|
+
entrance: string;
|
|
185
|
+
exit: string;
|
|
186
|
+
easeInBounceOut: string;
|
|
187
|
+
focus: string;
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
font: {
|
|
191
|
+
size: {
|
|
192
|
+
1: string;
|
|
193
|
+
2: string;
|
|
194
|
+
3: string;
|
|
195
|
+
4: string;
|
|
196
|
+
5: string;
|
|
197
|
+
6: string;
|
|
198
|
+
7: string;
|
|
199
|
+
8: string;
|
|
200
|
+
9: string;
|
|
201
|
+
10: string;
|
|
202
|
+
};
|
|
203
|
+
weight: {
|
|
204
|
+
normal: string;
|
|
205
|
+
bold: string;
|
|
206
|
+
};
|
|
207
|
+
family: {
|
|
208
|
+
regular: string;
|
|
209
|
+
display: string;
|
|
210
|
+
mono: string;
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
lineHeight: {
|
|
214
|
+
flush: string;
|
|
215
|
+
tight: string;
|
|
216
|
+
relaxed: string;
|
|
217
|
+
};
|
|
218
|
+
textStyle: {
|
|
219
|
+
title: string;
|
|
220
|
+
"title-small": string;
|
|
221
|
+
"heading-1": string;
|
|
222
|
+
"heading-2": string;
|
|
223
|
+
"heading-3": string;
|
|
224
|
+
"heading-4": string;
|
|
225
|
+
"heading-5": string;
|
|
226
|
+
"paragraph-large": string;
|
|
227
|
+
"paragraph-medium": string;
|
|
228
|
+
"paragraph-small": string;
|
|
229
|
+
"text-large": string;
|
|
230
|
+
"text-medium": string;
|
|
231
|
+
"text-small": string;
|
|
232
|
+
"text-micro": string;
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.getThemeAndSize=e=>{if(!e)return{};const t=getComputedStyle(e),r=
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.getThemeAndSize=e=>{if(!e)return{};const t=getComputedStyle(e).colorScheme,r=e.closest("[data-size]")?.getAttribute("data-size");return{theme:t,size:r}};
|
|
2
2
|
//# sourceMappingURL=getThemeAndSize.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getThemeAndSize.cjs","sources":["../../../src/utilities/getThemeAndSize.ts"],"sourcesContent":["import type { Size } from \"
|
|
1
|
+
{"version":3,"file":"getThemeAndSize.cjs","sources":["../../../src/utilities/getThemeAndSize.ts"],"sourcesContent":["import type { Size } from \"./types.js\";\n\n/*\n * For komponenter som mountes utenfor roten av applikasjonen vil styring av theme og size\n * via data-attributter satt på rot ikke fungere. Denne util'en kan brukes av slike komponenter\n * for å finne riktige verdier ved å sende inn et element som er mountet innenfor applikasjonen\n */\nexport const getThemeAndSize = (\n element: Element | undefined,\n): { theme?: string; size?: Size } => {\n if (!element) return {};\n\n const computedStyles = getComputedStyle(element);\n\n // Sett theme til dark hvis bakgrunnsfargen er mørkere enn 50% av hvit\n // dette gir oss slingringsmonn i tilfelle verdien av Jøkuls bakgrunnsfarge endres\n const theme = computedStyles.colorScheme;\n\n const size = element.closest(\"[data-size]\")?.getAttribute(\"data-size\") as\n | Size\n | undefined;\n\n return { theme, size };\n};\n"],"names":["element","theme","getComputedStyle","colorScheme","size","closest","getAttribute"],"mappings":"wGAQIA,IAEA,IAAKA,EAAS,MAAO,CAAA,EAMrB,MAAMC,EAJiBC,iBAAiBF,GAIXG,YAEvBC,EAAOJ,EAAQK,QAAQ,gBAAgBC,aAAa,aAI1D,MAAO,CAAEL,MAAAA,EAAOG,KAAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{c as s}from"../../../../clsx-BeLtu-UY.js";import"react";import{DescriptionListItem as a}from"./DescriptionListItem.js";const i=({className:a,alignment:i="horizontal",showSeparators:r=!1,children:e,...o})=>t("dl",{...o,className:s("jkl-description-list--beta",a),"data-alignment":i,"data-separators":r,children:e});i.Item=a;export{i as DescriptionList};
|
|
2
|
+
//# sourceMappingURL=DescriptionList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DescriptionList.js","sources":["../../../../../src/components/beta/description-list/DescriptionList.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React from \"react\";\nimport { DescriptionListItem } from \"./DescriptionListItem.jsx\";\nimport type { DescriptionListProps } from \"./types.js\";\n\n/**\n * @deprecated Bruk heller den stabile komponenten. All funksjonalitet fra Beta-komponenten er tilgjengelige der.\n */\nexport const DescriptionList = ({\n className,\n alignment = \"horizontal\",\n showSeparators = false,\n children,\n ...rest\n}: DescriptionListProps): React.JSX.Element => {\n return (\n <dl\n {...rest}\n className={clsx(\"jkl-description-list--beta\", className)}\n data-alignment={alignment}\n data-separators={showSeparators}\n >\n {children}\n </dl>\n );\n};\n\nDescriptionList.Item = DescriptionListItem;\n"],"names":["DescriptionList","className","alignment","showSeparators","children","rest","jsx","clsx","Item","DescriptionListItem"],"mappings":"sKAQO,MAAMA,EAAkB,EAC3BC,UAAAA,EACAC,UAAAA,EAAY,aACZC,eAAAA,GAAiB,EACjBC,SAAAA,KACGC,KAGCC,EAAC,KAAA,IACOD,EACJJ,UAAWM,EAAK,6BAA8BN,GAC9C,iBAAgBC,EAChB,kBAAiBC,EAEhBC,SAAAA,IAKbJ,EAAgBQ,KAAOC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsxs as s,jsx as t}from"react/jsx-runtime";import{c as e}from"../../../../clsx-BeLtu-UY.js";import"react";const a=({title:a,value:i,supportText:r,className:c,...l})=>s("div",{...l,className:e("jkl-description-list-item--beta",c),children:[t("dt",{className:"title",children:a}),t("dd",{className:"value",children:i}),r&&t("dd",{className:"support-text",children:r})]});export{a as DescriptionListItem};
|
|
2
|
+
//# sourceMappingURL=DescriptionListItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DescriptionListItem.js","sources":["../../../../../src/components/beta/description-list/DescriptionListItem.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport React, { type FC } from \"react\";\nimport type { DescriptionListItemProps } from \"./types.js\";\n\n/**\n * @deprecated Bruk heller den stabile komponenten for DescriptionList sammen med Terms og Details. All funksjonalitet fra Beta-komponenten er tilgjengelige der.\n */\nexport const DescriptionListItem: FC<DescriptionListItemProps> = ({\n title,\n value,\n supportText,\n className,\n ...rest\n}) => {\n return (\n <div\n {...rest}\n className={clsx(\"jkl-description-list-item--beta\", className)}\n >\n <dt className=\"title\">{title}</dt>\n <dd className=\"value\">{value}</dd>\n {supportText && <dd className=\"support-text\">{supportText}</dd>}\n </div>\n );\n};\n"],"names":["DescriptionListItem","title","value","supportText","className","rest","jsxs","clsx","children","jsx"],"mappings":"iHAOO,MAAMA,EAAoD,EAC7DC,MAAAA,EACAC,MAAAA,EACAC,YAAAA,EACAC,UAAAA,KACGC,KAGCC,EAAC,MAAA,IACOD,EACJD,UAAWG,EAAK,kCAAmCH,GAEnDI,SAAA,CAAAC,EAAC,KAAA,CAAGL,UAAU,QAASI,SAAAP,IACvBQ,EAAC,KAAA,CAAGL,UAAU,QAASI,SAAAN,IACtBC,GAAeM,EAAC,KAAA,CAAGL,UAAU,eAAgBI,SAAAL"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { DescriptionList as BETA_DescriptionList } from './DescriptionList.
|
|
2
|
-
export { DescriptionListItem as BETA_DescriptionListItem } from './DescriptionListItem.
|
|
1
|
+
export { DescriptionList as BETA_DescriptionList } from './DescriptionList.jsx';
|
|
2
|
+
export { DescriptionListItem as BETA_DescriptionListItem } from './DescriptionListItem.jsx';
|
|
3
3
|
export type { DescriptionListProps as BETA_DescriptionListProps, DescriptionListItemProps as BETA_DescriptionListItemProps, } from './types.js';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsxs as e,jsx as i}from"react/jsx-runtime";import{c as s}from"../../../../clsx-BeLtu-UY.js";import a,{useId as r}from"react";const t=a.forwardRef(function(a,t){const{title:c,description:l,className:n,children:d,as:o="a",...m}=a,p=o,f=r();return e(p,{...m,ref:t,"aria-labelledby":`${f}-title`,"aria-describedby":`${f}-description`,className:s("jkl-navlink--beta",n),children:[i("p",{className:"title",id:`${f}-title`,children:c}),l&&i("p",{className:"description",id:`${f}-description`,children:l})]})});export{t as NavLink};
|
|
2
|
+
//# sourceMappingURL=NavLink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavLink.js","sources":["../../../../../src/components/beta/nav-link/NavLink.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { useId } from \"react\";\nimport type { PolymorphicRef } from \"../../../utilities/index.js\";\nimport type { NavLinkProps } from \"./types.js\";\n\ntype NavLinkComponent = <ElementType extends React.ElementType = \"a\">(\n props: NavLinkProps<ElementType>,\n) => React.ReactElement | null;\n\nexport const NavLink = React.forwardRef(function NavLink<\n ElementType extends React.ElementType = \"a\",\n>(props: NavLinkProps<ElementType>, ref?: PolymorphicRef<ElementType>) {\n const {\n title,\n description,\n className,\n children,\n as = \"a\",\n ...rest\n } = props;\n const Component = as;\n const id = useId();\n\n return (\n <Component\n {...rest}\n ref={ref}\n aria-labelledby={`${id}-title`}\n aria-describedby={`${id}-description`}\n className={clsx(\"jkl-navlink--beta\", className)}\n >\n <p className=\"title\" id={`${id}-title`}>\n {title}\n </p>\n {description && (\n <p className=\"description\" id={`${id}-description`}>\n {description}\n </p>\n )}\n </Component>\n );\n}) as NavLinkComponent;\n"],"names":["NavLink","React","forwardRef","props","ref","title","description","className","children","as","rest","Component","id","useId","jsxs","clsx","jsx"],"mappings":"oIASO,MAAMA,EAAUC,EAAMC,WAAW,SAEtCC,EAAkCC,GAChC,MACIC,MAAAA,EACAC,YAAAA,EACAC,UAAAA,EACAC,SAAAA,EACAC,GAAAA,EAAK,OACFC,GACHP,EACEQ,EAAYF,EACZG,EAAKC,IAEX,OACIC,EAACH,EAAA,IACOD,EACJN,IAAAA,EACA,kBAAiB,GAAGQ,UACpB,mBAAkB,GAAGA,gBACrBL,UAAWQ,EAAK,oBAAqBR,GAErCC,SAAA,CAAAQ,EAAC,KAAET,UAAU,QAAQK,GAAI,GAAGA,UACvBJ,SAAAH,IAEJC,KACI,IAAA,CAAEC,UAAU,cAAcK,GAAI,GAAGA,gBAC7BJ,SAAAF,MAKrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NavLink as BETA_NavLink } from './NavLink.jsx';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { PolymorphicPropsWithRef } from '
|
|
2
|
+
import { PolymorphicPropsWithRef } from '../../../utilities/index.js';
|
|
3
3
|
export type NavLinkProps<ElementType extends React.ElementType> = PolymorphicPropsWithRef<ElementType, {
|
|
4
4
|
title: string;
|
|
5
5
|
description?: string;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as o,jsxs as n}from"react/jsx-runtime";import{c as i}from"../../../../clsx-BeLtu-UY.js";import{forwardRef as c}from"react";import"../../icon/Icon.js";import"../../icon/icons/animated/ArrowVerticalAnimated.js";import"../../icon/icons/animated/ArrowHorizontalAnimated.js";import"../../icon/icons/animated/PlusRemoveAnimated.js";import{ArrowDownIcon as s}from"../../icon/icons/ArrowDownIcon.js";import"../../icon/icons/ArrowLeftIcon.js";import"../../icon/icons/ArrowNorthEastIcon.js";import"../../icon/icons/ArrowRightIcon.js";import"../../icon/icons/ArrowUpIcon.js";import"../../icon/icons/CalendarIcon.js";import"../../icon/icons/CheckIcon.js";import"../../icon/icons/ChevronDownIcon.js";import"../../icon/icons/ChevronLeftIcon.js";import"../../icon/icons/ChevronRightIcon.js";import"../../icon/icons/ChevronUpIcon.js";import"../../icon/icons/CloseIcon.js";import"../../icon/icons/CopyIcon.js";import"../../icon/icons/DotsIcon.js";import"../../icon/icons/DragIcon.js";import"../../icon/icons/ErrorIcon.js";import"../../icon/icons/GreenCheckIcon.js";import"../../icon/icons/HamburgerIcon.js";import"../../icon/icons/InfoIcon.js";import"../../icon/icons/LinkIcon.js";import"../../icon/icons/MinusIcon.js";import"../../icon/icons/OpenInNewIcon.js";import"../../icon/icons/PenIcon.js";import"../../icon/icons/PlusIcon.js";import"../../icon/icons/QuestionIcon.js";import"../../icon/icons/RedCrossIcon.js";import"../../icon/icons/SearchIcon.js";import"../../icon/icons/SuccessIcon.js";import"../../icon/icons/ThumbDownIcon.js";import"../../icon/icons/ThumbUpIcon.js";import"../../icon/icons/TrashCanIcon.js";import"../../icon/icons/WarningIcon.js";import{InputGroup as r}from"../../input-group/InputGroup.js";const e=c((c,e)=>{const{label:t,className:p,errorLabel:a,helpLabel:m,labelProps:l,placeholder:j="Velg",supportLabelProps:I,tooltip:d,value:u,description:h,...b}=c;return o(r,{label:t,errorLabel:a,helpLabel:m,labelProps:l,supportLabelProps:I,tooltip:d,description:h,"data-testid":"jkl-select--beta",className:i("jkl-select--beta",p),render:i=>n("div",{className:"jkl-select--beta-wrapper",children:[n("select",{ref:e,defaultValue:u?void 0:"",value:u,...i,...b,children:[j&&o("option",{disabled:!0,selected:!0,value:"",children:j}),c.children]}),o(s,{})]})})});export{e as Select};
|
|
2
|
+
//# sourceMappingURL=Select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.js","sources":["../../../../../src/components/beta/select/Select.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { forwardRef } from \"react\";\nimport { ArrowDownIcon } from \"../../icon/index.js\";\nimport { InputGroup } from \"../../input-group/InputGroup.jsx\";\nimport type { SelectProps } from \"./types.js\";\n\nexport const Select = forwardRef<HTMLSelectElement, SelectProps>(\n (props, ref) => {\n const {\n label,\n className,\n errorLabel,\n helpLabel,\n labelProps,\n placeholder = \"Velg\",\n supportLabelProps,\n tooltip,\n value,\n description,\n ...rest\n } = props;\n\n const inputGroupProps = {\n label,\n errorLabel,\n helpLabel,\n labelProps,\n supportLabelProps,\n tooltip,\n description,\n };\n\n return (\n <InputGroup\n {...inputGroupProps}\n data-testid=\"jkl-select--beta\"\n className={clsx(\"jkl-select--beta\", className)}\n render={(inputProps) => (\n <div className=\"jkl-select--beta-wrapper\">\n <select\n ref={ref}\n defaultValue={value ? undefined : \"\"}\n value={value}\n {...inputProps}\n {...rest}\n >\n {placeholder && (\n <option disabled selected value=\"\">\n {placeholder}\n </option>\n )}\n {props.children}\n </select>\n <ArrowDownIcon />\n </div>\n )}\n />\n );\n },\n);\n"],"names":["Select","forwardRef","props","ref","label","className","errorLabel","helpLabel","labelProps","placeholder","supportLabelProps","tooltip","value","description","rest","jsx","InputGroup","clsx","render","inputProps","jsxs","children","defaultValue","disabled","selected","ArrowDownIcon"],"mappings":"irDAMO,MAAMA,EAASC,EAClB,CAACC,EAAOC,KACJ,MACIC,MAAAA,EACAC,UAAAA,EACAC,WAAAA,EACAC,UAAAA,EACAC,WAAAA,EACAC,YAAAA,EAAc,OACdC,kBAAAA,EACAC,QAAAA,EACAC,MAAAA,EACAC,YAAAA,KACGC,GACHZ,EAYJ,OACIa,EAACC,EAAA,CAVDZ,MAAAA,EACAE,WAAAA,EACAC,UAAAA,EACAC,WAAAA,EACAE,kBAAAA,EACAC,QAAAA,EACAE,YAAAA,EAMI,cAAY,mBACZR,UAAWY,EAAK,mBAAoBZ,GACpCa,OAASC,GACLC,EAAC,MAAA,CAAIf,UAAU,2BACXgB,SAAA,CAAAD,EAAC,SAAA,CACGjB,IAAAA,EACAmB,aAAcV,OAAQ,EAAY,GAClCA,MAAAA,KACIO,KACAL,EAEHO,SAAA,CAAAZ,GACGM,EAAC,UAAOQ,UAAQ,EAACC,UAAQ,EAACZ,MAAM,GAC3BS,SAAAZ,IAGRP,EAAMmB,cAEVI,EAAA,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode, SelectHTMLAttributes } from 'react';
|
|
2
|
-
import { InputGroupProps } from '../../
|
|
2
|
+
import { InputGroupProps } from '../../input-group/types.js';
|
|
3
3
|
export interface SelectProps extends Omit<InputGroupProps, "children" | "inline">, SelectHTMLAttributes<HTMLSelectElement> {
|
|
4
4
|
/**
|
|
5
5
|
* Setter inn et placeholderelement som vises når ingenting er valgt i nedtrekkslisten.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as a}from"react/jsx-runtime";import{c as t}from"../../../clsx-BeLtu-UY.js";import r from"react";import{SlotComponent as o}from"../../utilities/polymorphism/SlotComponent.js";const s=r.forwardRef(function(r,s){const{className:i,clickable:
|
|
1
|
+
import{jsx as a}from"react/jsx-runtime";import{c as t}from"../../../clsx-BeLtu-UY.js";import r from"react";import{SlotComponent as o}from"../../utilities/polymorphism/SlotComponent.js";const s=r.forwardRef(function(r,s){const{className:i,clickable:l=!1,padding:c="s",variant:d="filled",asChild:e,as:m="div",...n}=r;return a(e?o:m,{"data-testid":"jkl-card","data-clickable":l,"data-padding":c,className:t("jkl-card",`jkl-card--${d}`,i),...n,ref:s})});export{s as Card};
|
|
2
2
|
//# sourceMappingURL=Card.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.js","sources":["../../../../src/components/card/Card.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React from \"react\";\nimport { SlotComponent } from \"../../utilities/polymorphism/SlotComponent.js\";\nimport type { AsChildProps } from \"../../utilities/polymorphism/as-child.js\";\nimport type { PolymorphicRef } from \"../../utilities/polymorphism/polymorphism.js\";\nimport type { CardProps } from \"./types.js\";\n\ntype CardComponent = <ElementType extends React.ElementType = \"div\">(\n props: CardProps<ElementType> & AsChildProps,\n) => React.ReactElement | null;\n\n/**\n * En allsidig kortkomponent som brukes for å gruppere innhold på en side.\n * Komponenten rendres til vanlig som en `<div>`, men du kan velge å rendre\n * den som andre elementer eller komponenter der du trenger annen semantikk\n * eller funksjonalitet.\n */\nexport const Card = React.forwardRef(function Card<\n ElementType extends React.ElementType = \"div\",\n>(props: CardProps<ElementType>, ref?: PolymorphicRef<ElementType>) {\n const {\n className,\n clickable = false,\n padding = \"s\",\n variant = \"
|
|
1
|
+
{"version":3,"file":"Card.js","sources":["../../../../src/components/card/Card.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React from \"react\";\nimport { SlotComponent } from \"../../utilities/polymorphism/SlotComponent.js\";\nimport type { AsChildProps } from \"../../utilities/polymorphism/as-child.js\";\nimport type { PolymorphicRef } from \"../../utilities/polymorphism/polymorphism.js\";\nimport type { CardProps } from \"./types.js\";\n\ntype CardComponent = <ElementType extends React.ElementType = \"div\">(\n props: CardProps<ElementType> & AsChildProps,\n) => React.ReactElement | null;\n\n/**\n * En allsidig kortkomponent som brukes for å gruppere innhold på en side.\n * Komponenten rendres til vanlig som en `<div>`, men du kan velge å rendre\n * den som andre elementer eller komponenter der du trenger annen semantikk\n * eller funksjonalitet.\n */\nexport const Card = React.forwardRef(function Card<\n ElementType extends React.ElementType = \"div\",\n>(props: CardProps<ElementType>, ref?: PolymorphicRef<ElementType>) {\n const {\n className,\n clickable = false,\n padding = \"s\",\n variant = \"filled\",\n asChild,\n as = \"div\",\n ...componentProps\n } = props;\n\n const Component = asChild ? SlotComponent : as;\n\n return (\n <Component\n data-testid=\"jkl-card\"\n data-clickable={clickable}\n data-padding={padding}\n className={clsx(\"jkl-card\", `jkl-card--${variant}`, className)}\n {...componentProps}\n ref={ref}\n />\n );\n}) as CardComponent;\n"],"names":["Card","React","forwardRef","props","ref","className","clickable","padding","variant","asChild","as","componentProps","jsx","SlotComponent","clsx"],"mappings":"yLAiBO,MAAMA,EAAOC,EAAMC,WAAW,SAEnCC,EAA+BC,GAC7B,MACIC,UAAAA,EACAC,UAAAA,GAAY,EACZC,QAAAA,EAAU,IACVC,QAAAA,EAAU,SACVC,QAAAA,EACAC,GAAAA,EAAK,SACFC,GACHR,EAIJ,OACIS,EAHcH,EAAUI,EAAgBH,EAGvC,CACG,cAAY,WACZ,iBAAgBJ,EAChB,eAAcC,EACdF,UAAWS,EAAK,WAAY,aAAaN,IAAWH,MAChDM,EACJP,IAAAA,GAGZ"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PolymorphicPropsWithRef } from '../../utilities/polymorphism/polymorphism.js';
|
|
2
2
|
export declare const CARD_PADDINGS: readonly ["s", "m", "l", "xl"];
|
|
3
3
|
export type CardPadding = (typeof CARD_PADDINGS)[number];
|
|
4
|
-
export declare const CARD_VARIANTS: readonly ["outlined", "
|
|
4
|
+
export declare const CARD_VARIANTS: readonly ["outlined", "filled"];
|
|
5
5
|
export type CardVariant = (typeof CARD_VARIANTS)[number];
|
|
6
6
|
type Props = {
|
|
7
7
|
className?: string;
|
|
@@ -13,7 +13,7 @@ type Props = {
|
|
|
13
13
|
/**
|
|
14
14
|
* Angir hvilken kortvariant du vil bruke. Velg en variant som gir god kontrast
|
|
15
15
|
* til bakgrunnen på siden, slik at det er enkelt å skille innholdet fra hverandre.
|
|
16
|
-
* @default "
|
|
16
|
+
* @default "filled"
|
|
17
17
|
*/
|
|
18
18
|
variant?: CardVariant;
|
|
19
19
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const
|
|
1
|
+
const l=["s","m","l","xl"],A=["outlined","filled"];export{l as CARD_PADDINGS,A as CARD_VARIANTS};
|
|
2
2
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":["../../../../src/components/card/types.ts"],"sourcesContent":["import type { PolymorphicPropsWithRef } from \"../../utilities/polymorphism/polymorphism.js\";\n\nexport const CARD_PADDINGS = [\"s\", \"m\", \"l\", \"xl\"] as const;\nexport type CardPadding = (typeof CARD_PADDINGS)[number];\nexport const CARD_VARIANTS = [\"outlined\", \"
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../../../../src/components/card/types.ts"],"sourcesContent":["import type { PolymorphicPropsWithRef } from \"../../utilities/polymorphism/polymorphism.js\";\n\nexport const CARD_PADDINGS = [\"s\", \"m\", \"l\", \"xl\"] as const;\nexport type CardPadding = (typeof CARD_PADDINGS)[number];\nexport const CARD_VARIANTS = [\"outlined\", \"filled\"] as const;\nexport type CardVariant = (typeof CARD_VARIANTS)[number];\n\ntype Props = {\n className?: string;\n /**\n * Setter padding på kortet. Tilsvarer samme property i Figma.\n * @default \"s\"\n */\n padding?: CardPadding;\n /**\n * Angir hvilken kortvariant du vil bruke. Velg en variant som gir god kontrast\n * til bakgrunnen på siden, slik at det er enkelt å skille innholdet fra hverandre.\n * @default \"filled\"\n */\n variant?: CardVariant;\n /**\n * Angir om kortet visuelt skal fremstå som klikkbart. Du må selv rendre\n * kortet som et klikkbart element (f.eks. `<a>` eller en `<Link>` fra\n * et ruting-bibliotek) og gi det en `href` eller `onClick`-handler.\n * HUSK: Sett aria-label for at støtteverktøy, som skjermlesere, ikke\n * skal lese alt innholdet i kortet.\n */\n clickable?: boolean;\n};\n\nexport type CardProps<ElementType extends React.ElementType> =\n PolymorphicPropsWithRef<ElementType, Props> & Props;\n"],"names":["CARD_PADDINGS","CARD_VARIANTS"],"mappings":"AAEO,MAAMA,EAAgB,CAAC,IAAK,IAAK,IAAK,MAEhCC,EAAgB,CAAC,WAAY"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as e,jsx as c}from"react/jsx-runtime";import{c as a}from"../../../clsx-BeLtu-UY.js";import{forwardRef as t,useRef as s,useImperativeHandle as r,useEffect as i}from"react";import{useId as n}from"../../hooks/useId/useId.js";const o=t((t,o)=>{const{id:d,children:l,invalid:k,className:h,inline:m=!1,"data-testautoid":u,checked:x,indeterminate:b,...p}=t,f=s(null);r(o,()=>f.current,[]);const j=n(d||"jkl-checkbox",{generateSuffix:!d});return i(()=>{!0===x&&!0===b&&"production"!==process.env.NODE_ENV&&console.warn("A Checkbox can not be both checked and indeterminate, and will be treated as checked"),f.current&&(f.current.indeterminate=!x&&!!b)},[x,b]),e("div",{className:a("jkl-checkbox",h,{"jkl-checkbox--inline":m,"jkl-checkbox--error":k}),children:[c("
|
|
1
|
+
import{jsxs as e,jsx as c}from"react/jsx-runtime";import{c as a}from"../../../clsx-BeLtu-UY.js";import{forwardRef as t,useRef as s,useImperativeHandle as r,useEffect as i}from"react";import{useId as n}from"../../hooks/useId/useId.js";const o=t((t,o)=>{const{id:d,children:l,invalid:k,className:h,inline:m=!1,"data-testautoid":u,checked:x,indeterminate:b,...p}=t,f=s(null);r(o,()=>f.current,[]);const j=n(d||"jkl-checkbox",{generateSuffix:!d});return i(()=>{!0===x&&!0===b&&"production"!==process.env.NODE_ENV&&console.warn("A Checkbox can not be both checked and indeterminate, and will be treated as checked"),f.current&&(f.current.indeterminate=!x&&!!b)},[x,b]),e("div",{className:a("jkl-checkbox",h,{"jkl-checkbox--inline":m,"jkl-checkbox--error":k}),children:[c("input",{id:j,ref:f,className:"jkl-checkbox__input","data-testid":"jkl-checkbox-input","aria-invalid":k,type:"checkbox","data-testautoid":u,checked:x,...p}),c("label",{htmlFor:j,className:"jkl-checkbox__label",children:l})]})});o.displayName="Checkbox";export{o as Checkbox};
|
|
2
2
|
//# sourceMappingURL=Checkbox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sources":["../../../../src/components/checkbox/Checkbox.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef, useEffect, useImperativeHandle, useRef } from \"react\";\nimport { useId } from \"../../hooks/useId/useId.js\";\nimport type { CheckboxProps } from \"./types.js\";\n\nexport const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(\n (props, ref) => {\n const {\n id,\n children,\n invalid,\n className,\n inline = false,\n \"data-testautoid\": testAutoId,\n checked,\n indeterminate,\n ...rest\n } = props;\n\n const inputRef = useRef<HTMLInputElement>(null);\n useImperativeHandle(\n ref,\n () => inputRef.current as HTMLInputElement,\n [],\n );\n\n const inputId = useId(id || \"jkl-checkbox\", { generateSuffix: !id });\n\n useEffect(() => {\n if (\n checked === true &&\n indeterminate === true &&\n process.env.NODE_ENV !== \"production\"\n ) {\n console.warn(\n \"A Checkbox can not be both checked and indeterminate, and will be treated as checked\",\n );\n }\n if (inputRef.current) {\n inputRef.current.indeterminate = !checked && !!indeterminate;\n }\n }, [checked, indeterminate]);\n\n return (\n <div\n className={clsx(\"jkl-checkbox\", className, {\n \"jkl-checkbox--inline\": inline,\n \"jkl-checkbox--error\": invalid,\n })}\n >\n <
|
|
1
|
+
{"version":3,"file":"Checkbox.js","sources":["../../../../src/components/checkbox/Checkbox.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef, useEffect, useImperativeHandle, useRef } from \"react\";\nimport { useId } from \"../../hooks/useId/useId.js\";\nimport type { CheckboxProps } from \"./types.js\";\n\nexport const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(\n (props, ref) => {\n const {\n id,\n children,\n invalid,\n className,\n inline = false,\n \"data-testautoid\": testAutoId,\n checked,\n indeterminate,\n ...rest\n } = props;\n\n const inputRef = useRef<HTMLInputElement>(null);\n useImperativeHandle(\n ref,\n () => inputRef.current as HTMLInputElement,\n [],\n );\n\n const inputId = useId(id || \"jkl-checkbox\", { generateSuffix: !id });\n\n useEffect(() => {\n if (\n checked === true &&\n indeterminate === true &&\n process.env.NODE_ENV !== \"production\"\n ) {\n console.warn(\n \"A Checkbox can not be both checked and indeterminate, and will be treated as checked\",\n );\n }\n if (inputRef.current) {\n inputRef.current.indeterminate = !checked && !!indeterminate;\n }\n }, [checked, indeterminate]);\n\n return (\n <div\n className={clsx(\"jkl-checkbox\", className, {\n \"jkl-checkbox--inline\": inline,\n \"jkl-checkbox--error\": invalid,\n })}\n >\n <input\n id={inputId}\n ref={inputRef}\n className=\"jkl-checkbox__input\"\n data-testid=\"jkl-checkbox-input\"\n aria-invalid={invalid}\n type=\"checkbox\"\n data-testautoid={testAutoId}\n checked={checked}\n {...rest}\n />\n <label htmlFor={inputId} className=\"jkl-checkbox__label\">\n {children}\n </label>\n </div>\n );\n },\n);\n\nCheckbox.displayName = \"Checkbox\";\n"],"names":["Checkbox","forwardRef","props","ref","id","children","invalid","className","inline","testAutoId","checked","indeterminate","rest","inputRef","useRef","useImperativeHandle","current","inputId","useId","generateSuffix","useEffect","process","env","NODE_ENV","console","warn","jsxs","clsx","jsx","type","htmlFor","displayName"],"mappings":"0OAKO,MAAMA,EAAWC,EACpB,CAACC,EAAOC,KACJ,MACIC,GAAAA,EACAC,SAAAA,EACAC,QAAAA,EACAC,UAAAA,EACAC,OAAAA,GAAS,EACT,kBAAmBC,EACnBC,QAAAA,EACAC,cAAAA,KACGC,GACHV,EAEEW,EAAWC,EAAyB,MAC1CC,EACIZ,EACA,IAAMU,EAASG,QACf,IAGJ,MAAMC,EAAUC,EAAMd,GAAM,eAAgB,CAAEe,gBAAiBf,IAE/D,OAAAgB,EAAU,MAEU,IAAZV,IACkB,IAAlBC,GACyB,eAAzBU,QAAQC,IAAIC,UAEZC,QAAQC,KACJ,wFAGJZ,EAASG,UACTH,EAASG,QAAQL,eAAiBD,KAAaC,IAEpD,CAACD,EAASC,IAGTe,EAAC,MAAA,CACGnB,UAAWoB,EAAK,eAAgBpB,EAAW,CACvC,uBAAwBC,EACxB,sBAAuBF,IAG3BD,SAAA,CAAAuB,EAAC,QAAA,CACGxB,GAAIa,EACJd,IAAKU,EACLN,UAAU,sBACV,cAAY,qBACZ,eAAcD,EACduB,KAAK,WACL,kBAAiBpB,EACjBC,QAAAA,KACIE,MAEP,QAAA,CAAMkB,QAASb,EAASV,UAAU,sBAC9BF,SAAAA,SAOrBL,EAAS+B,YAAc"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChangeEventHandler, FocusEventHandler, InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import { DataTestAutoId } from '../../
|
|
2
|
+
import { DataTestAutoId } from '../../utilities/types.js';
|
|
3
3
|
export interface CheckboxProps extends DataTestAutoId, InputHTMLAttributes<HTMLInputElement> {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
name: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CookieConsentProps } from './types.js';
|
|
2
|
-
export declare const CookieConsent: ({ blocking, onAccept, aboutPage, ...rest }: CookieConsentProps) => JSX.Element | null;
|
|
2
|
+
export declare const CookieConsent: ({ blocking, onAccept, aboutPage, aboutPageLinkText, ...rest }: CookieConsentProps) => JSX.Element | null;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as e,jsx as o}from"react/jsx-runtime";import{useId as n,useEffect as t}from"react";import
|
|
1
|
+
import{jsxs as e,jsx as o}from"react/jsx-runtime";import{useId as n,useEffect as t}from"react";import a from"react-dom";import{Button as r}from"../button/Button.js";import{Flex as i}from"../flex/Flex.js";import{Link as s}from"../link/Link.js";import{ModalContainer as d,ModalOverlay as l,Modal as c,ModalHeader as m,ModalTitle as k,ModalBody as u,ModalActions as p}from"../modal/Modal.js";import{useModal as f}from"../modal/useModal.js";import{useInternalState as h}from"./CookieConsentContext.js";import{setConsentCookie as g}from"./cookieConsentUtils.js";const j=({blocking:j,onAccept:C,aboutPage:b="https://www.fremtind.no/informasjonskapsler",aboutPageLinkText:v="Les mer om hvilke informasjonskapsler vi lagrer her",...y})=>{const{currentConsent:M,cookieName:x,cookieDomain:w,cookiePath:F,isOpen:I,setIsOpen:L,updateCurrentConsents:P}=h(),[B,O]=f({id:`jkl-cookie-modal-${n()}`,role:j?"alertdialog":"dialog",title:"Informasjonskapsler"});if(t(()=>{I?B?.show():B?.hide()},[B,I]),t(()=>{const e=()=>L(!1);return B?.on("hide",e),()=>{B?.off("hide",e)}},[B,L]),typeof document>"u")return null;if(typeof navigator<"u"&&!navigator.cookieEnabled)return C?.({functional:"denied",statistics:"denied",marketing:"denied"}),null;const A=e=>{const o={...M,functional:e,statistics:e,marketing:"denied"};g({consent:o,name:x,domain:w,path:F}),C?.(o),P(),B?.hide()};return a.createPortal(e(d,{...O.container,...y,"data-cookie-consent-open":I,children:[o(l,{...O.overlay}),e(c,{...O.modal,children:[o(m,{children:o(k,{...O.title,children:"Får vi bruke valgfrie informasjonskapsler?"})}),o(u,{children:e(i,{direction:"column",gap:"m",children:[o("p",{children:"Fremtind ønsker å samle anonym statistikk for å forstå hvordan nettsidene våre brukes. Det hjelper oss til å gjøre innhold og løsninger bedre og mer brukervennlige."}),e("p",{children:[o(s,{href:b,target:"_blank",children:v}),"."]})]})}),e(p,{children:[o(r,{variant:"secondary","data-testid":"jkl-cookie-consent-godta",type:"button",onClick:()=>A("accepted"),children:"Ja, det er greit"}),o(r,{variant:"secondary","data-testid":"jkl-cookie-consent-nekt",type:"button",onClick:()=>A("denied"),children:"Nei takk"})]})]})]}),document.body)};export{j as CookieConsent};
|
|
2
2
|
//# sourceMappingURL=CookieConsent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CookieConsent.js","sources":["../../../../src/components/cookie-consent/CookieConsent.tsx"],"sourcesContent":["import React, { useEffect, useId } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Button } from \"../button/Button.js\";\nimport { Flex } from \"../flex/index.js\";\nimport { Link } from \"../link/index.js\";\nimport {\n Modal,\n ModalActions,\n ModalBody,\n ModalContainer,\n ModalHeader,\n ModalOverlay,\n ModalTitle,\n} from \"../modal/Modal.js\";\nimport { useModal } from \"../modal/useModal.js\";\nimport { useInternalState } from \"./CookieConsentContext.js\";\nimport { setConsentCookie } from \"./cookieConsentUtils.js\";\nimport type { Consent, ConsentState, CookieConsentProps } from \"./types.js\";\n\nexport const CookieConsent = ({\n blocking,\n onAccept,\n aboutPage = \"https://www.fremtind.no/informasjonskapsler\",\n ...rest\n}: CookieConsentProps): JSX.Element | null => {\n const {\n currentConsent,\n cookieName,\n cookieDomain,\n cookiePath,\n isOpen,\n setIsOpen,\n updateCurrentConsents,\n } = useInternalState();\n\n const [instance, modalConfig] = useModal({\n id: `jkl-cookie-modal-${useId()}`,\n // The optional `role` attribute of the dialog element, either `dialog`\n // (default) or `alertdialog` to make it a modal (preventing closing on\n // click outside of ESC key).\n role: blocking ? \"alertdialog\" : \"dialog\",\n // The required dialog title, mandatory in the document\n // to provide context to assistive technology.\n title: \"Informasjonskapsler\",\n });\n useEffect(() => {\n if (isOpen) {\n instance?.show();\n } else {\n instance?.hide();\n }\n }, [instance, isOpen]);\n\n useEffect(() => {\n const onHide = () => setIsOpen(false);\n instance?.on(\"hide\", onHide);\n return () => {\n instance?.off(\"hide\", onHide);\n };\n }, [instance, setIsOpen]);\n\n if (typeof document === \"undefined\") {\n return null;\n }\n\n // Cookies are disabled in the browser\n if (typeof navigator !== \"undefined\" && !navigator.cookieEnabled) {\n onAccept?.({\n functional: \"denied\",\n statistics: \"denied\",\n marketing: \"denied\",\n });\n\n return null;\n }\n\n const updateCookies = (state: ConsentState) => {\n const updatedConsent: Consent = {\n ...currentConsent,\n functional: state,\n statistics: state,\n marketing: \"denied\",\n };\n\n setConsentCookie({\n consent: updatedConsent,\n name: cookieName,\n domain: cookieDomain,\n path: cookiePath,\n });\n\n onAccept?.(updatedConsent);\n\n updateCurrentConsents();\n\n instance?.hide();\n };\n\n return ReactDOM.createPortal(\n <ModalContainer\n {...modalConfig.container}\n {...rest}\n data-cookie-consent-open={isOpen}\n >\n <ModalOverlay {...modalConfig.overlay} />\n <Modal {...modalConfig.modal}>\n <ModalHeader>\n <ModalTitle {...modalConfig.title}>\n Får vi bruke valgfrie
|
|
1
|
+
{"version":3,"file":"CookieConsent.js","sources":["../../../../src/components/cookie-consent/CookieConsent.tsx"],"sourcesContent":["import React, { useEffect, useId } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Button } from \"../button/Button.js\";\nimport { Flex } from \"../flex/index.js\";\nimport { Link } from \"../link/index.js\";\nimport {\n Modal,\n ModalActions,\n ModalBody,\n ModalContainer,\n ModalHeader,\n ModalOverlay,\n ModalTitle,\n} from \"../modal/Modal.js\";\nimport { useModal } from \"../modal/useModal.js\";\nimport { useInternalState } from \"./CookieConsentContext.js\";\nimport { setConsentCookie } from \"./cookieConsentUtils.js\";\nimport type { Consent, ConsentState, CookieConsentProps } from \"./types.js\";\n\nexport const CookieConsent = ({\n blocking,\n onAccept,\n aboutPage = \"https://www.fremtind.no/informasjonskapsler\",\n aboutPageLinkText = \"Les mer om hvilke informasjonskapsler vi lagrer her\",\n ...rest\n}: CookieConsentProps): JSX.Element | null => {\n const {\n currentConsent,\n cookieName,\n cookieDomain,\n cookiePath,\n isOpen,\n setIsOpen,\n updateCurrentConsents,\n } = useInternalState();\n\n const [instance, modalConfig] = useModal({\n id: `jkl-cookie-modal-${useId()}`,\n // The optional `role` attribute of the dialog element, either `dialog`\n // (default) or `alertdialog` to make it a modal (preventing closing on\n // click outside of ESC key).\n role: blocking ? \"alertdialog\" : \"dialog\",\n // The required dialog title, mandatory in the document\n // to provide context to assistive technology.\n title: \"Informasjonskapsler\",\n });\n useEffect(() => {\n if (isOpen) {\n instance?.show();\n } else {\n instance?.hide();\n }\n }, [instance, isOpen]);\n\n useEffect(() => {\n const onHide = () => setIsOpen(false);\n instance?.on(\"hide\", onHide);\n return () => {\n instance?.off(\"hide\", onHide);\n };\n }, [instance, setIsOpen]);\n\n if (typeof document === \"undefined\") {\n return null;\n }\n\n // Cookies are disabled in the browser\n if (typeof navigator !== \"undefined\" && !navigator.cookieEnabled) {\n onAccept?.({\n functional: \"denied\",\n statistics: \"denied\",\n marketing: \"denied\",\n });\n\n return null;\n }\n\n const updateCookies = (state: ConsentState) => {\n const updatedConsent: Consent = {\n ...currentConsent,\n functional: state,\n statistics: state,\n marketing: \"denied\",\n };\n\n setConsentCookie({\n consent: updatedConsent,\n name: cookieName,\n domain: cookieDomain,\n path: cookiePath,\n });\n\n onAccept?.(updatedConsent);\n\n updateCurrentConsents();\n\n instance?.hide();\n };\n\n return ReactDOM.createPortal(\n <ModalContainer\n {...modalConfig.container}\n {...rest}\n data-cookie-consent-open={isOpen}\n >\n <ModalOverlay {...modalConfig.overlay} />\n <Modal {...modalConfig.modal}>\n <ModalHeader>\n <ModalTitle {...modalConfig.title}>\n Får vi bruke valgfrie informasjons­kapsler?\n </ModalTitle>\n </ModalHeader>\n <ModalBody>\n <Flex direction=\"column\" gap=\"m\">\n <p>\n Fremtind ønsker å samle anonym statistikk for å\n forstå hvordan nettsidene våre brukes. Det hjelper\n oss til å gjøre innhold og løsninger bedre og mer\n brukervennlige.\n </p>\n <p>\n <Link href={aboutPage} target=\"_blank\">\n {aboutPageLinkText}\n </Link>\n .\n </p>\n </Flex>\n </ModalBody>\n <ModalActions>\n <Button\n variant=\"secondary\"\n data-testid=\"jkl-cookie-consent-godta\"\n type=\"button\"\n onClick={() => updateCookies(\"accepted\")}\n >\n Ja, det er greit\n </Button>\n <Button\n variant=\"secondary\"\n data-testid=\"jkl-cookie-consent-nekt\"\n type=\"button\"\n onClick={() => updateCookies(\"denied\")}\n >\n Nei takk\n </Button>\n </ModalActions>\n </Modal>\n </ModalContainer>,\n document.body,\n );\n};\n"],"names":["CookieConsent","blocking","onAccept","aboutPage","aboutPageLinkText","rest","currentConsent","cookieName","cookieDomain","cookiePath","isOpen","setIsOpen","updateCurrentConsents","useInternalState","instance","modalConfig","useModal","id","useId","role","title","useEffect","show","hide","onHide","on","off","document","navigator","cookieEnabled","functional","statistics","marketing","updateCookies","state","updatedConsent","setConsentCookie","consent","name","domain","path","ReactDOM","createPortal","jsxs","ModalContainer","container","children","jsx","ModalOverlay","overlay","Modal","modal","ModalHeader","ModalTitle","ModalBody","Flex","direction","gap","Link","href","target","ModalActions","Button","variant","type","onClick","body"],"mappings":"6iBAmBO,MAAMA,EAAgB,EACzBC,SAAAA,EACAC,SAAAA,EACAC,UAAAA,EAAY,8CACZC,kBAAAA,EAAoB,0DACjBC,MAEH,MACIC,eAAAA,EACAC,WAAAA,EACAC,aAAAA,EACAC,WAAAA,EACAC,OAAAA,EACAC,UAAAA,EACAC,sBAAAA,GACAC,KAEGC,EAAUC,GAAeC,EAAS,CACrCC,GAAI,oBAAoBC,MAIxBC,KAAMlB,EAAW,cAAgB,SAGjCmB,MAAO,wBAkBX,GAhBAC,EAAU,KACFX,EACAI,GAAUQ,OAEVR,GAAUS,QAEf,CAACT,EAAUJ,IAEdW,EAAU,KACN,MAAMG,EAAS,IAAMb,GAAU,GAC/B,OAAAG,GAAUW,GAAG,OAAQD,GACd,KACHV,GAAUY,IAAI,OAAQF,KAE3B,CAACV,EAAUH,WAEHgB,SAAa,IACpB,OAAO,KAIX,UAAWC,UAAc,MAAgBA,UAAUC,cAC/C,OAAA3B,IAAW,CACP4B,WAAY,SACZC,WAAY,SACZC,UAAW,WAGR,KAGX,MAAMC,EAAiBC,IACnB,MAAMC,EAA0B,IACzB7B,EACHwB,WAAYI,EACZH,WAAYG,EACZF,UAAW,UAGfI,EAAiB,CACbC,QAASF,EACTG,KAAM/B,EACNgC,OAAQ/B,EACRgC,KAAM/B,IAGVP,IAAWiC,GAEXvB,IAEAE,GAAUS,QAGd,OAAOkB,EAASC,aACZC,EAACC,EAAA,IACO7B,EAAY8B,aACZxC,EACJ,2BAA0BK,EAE1BoC,SAAA,CAAAC,EAACC,EAAA,IAAiBjC,EAAYkC,UAC9BN,EAACO,EAAA,IAAUnC,EAAYoC,MACnBL,SAAA,CAAAC,EAACK,GACGN,SAAAC,EAACM,EAAA,IAAetC,EAAYK,MAAO0B,6DAItCQ,EAAA,CACGR,SAAAH,EAACY,GAAKC,UAAU,SAASC,IAAI,IACzBX,SAAA,CAAAC,EAAC,KAAED,SAAA,2KAMF,IAAA,CACGA,SAAA,CAAAC,EAACW,EAAA,CAAKC,KAAMxD,EAAWyD,OAAO,SACzBd,SAAA1C,IACE,cAKlByD,EAAA,CACGf,SAAA,CAAAC,EAACe,EAAA,CACGC,QAAQ,YACR,cAAY,2BACZC,KAAK,SACLC,QAAS,IAAMhC,EAAc,YAChCa,SAAA,qBAGDC,EAACe,EAAA,CACGC,QAAQ,YACR,cAAY,0BACZC,KAAK,SACLC,QAAS,IAAMhC,EAAc,UAChCa,SAAA,sBAMbnB,SAASuC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WithChildren } from '../../
|
|
1
|
+
import { WithChildren } from '../../utilities/types.js';
|
|
2
2
|
export type ConsentState = null | "denied" | "accepted";
|
|
3
3
|
export type ConsentRequirement = Partial<Record<keyof Consent, boolean>>;
|
|
4
4
|
export type Consent = {
|
|
@@ -13,6 +13,10 @@ export interface CookieConsentProps {
|
|
|
13
13
|
* Lenke til informasjonssiden til cookiene i løsningen din.
|
|
14
14
|
*/
|
|
15
15
|
aboutPage: string;
|
|
16
|
+
/**
|
|
17
|
+
* Tekst for lenken til informasjonssiden.
|
|
18
|
+
*/
|
|
19
|
+
aboutPageLinkText?: string;
|
|
16
20
|
}
|
|
17
21
|
export type AcceptConsentCallback = (consent: Consent) => void;
|
|
18
22
|
export type ConsentComponentBaseProps = {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{c as
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{c as r}from"../../../clsx-BeLtu-UY.js";import{d as a,g as o}from"../../../utils-CcE6HjQp.js";import{forwardRef as n,useState as l,useRef as s,useCallback as i}from"react";import{flushSync as u}from"react-dom";import{formatDateString as c}from"../../utilities/formatters/date/formatDate.js";import{IconButton as d}from"../icon-button/IconButton.js";import{CalendarIcon as p}from"../icon/icons/CalendarIcon.js";import{InputGroup as m}from"../input-group/InputGroup.js";import{Popover as f}from"../popover/Popover.js";import{BaseTextInput as v}from"../text-input/BaseTextInput.js";import{Calendar as D}from"./internal/Calendar.js";import{parseDateString as h,formatInput as b}from"./utils.js";import{isWithinLowerBound as g,isWithinUpperBound as k}from"./validation.js";const j=n((n,j)=>{const{"data-testautoid":y,id:L,className:w="",label:x="Velg dato",labelProps:C,defaultValue:I,defaultShow:O=!1,value:P,disableBeforeDate:T,disableAfterDate:B,yearsToShow:E,name:_,helpLabel:S,errorLabel:N,invalid:R,days:U,months:V,monthLabel:F,yearLabel:K,placeholder:W="dd.mm.åååå",width:A="11.25rem",onChange:G,onBlur:H,onFocus:M,onKeyDown:q,action:$,showCalendarLabel:z="Åpne kalender",hideCalendarLabel:J="Lukk kalender",supportLabelProps:Q,tooltip:X,textInputProps:Y,description:Z,...ee}=n;"production"!==process.env.NODE_ENV&&P&&I&&console.warn("DatePicker må enten være controlled eller uncontrolled. Hvis du bruker defaultValue og value sammen vil defaultValue bli ignorert.");const te=h(T),re=te?a(te).startOf("day").toDate():void 0,ae=h(B),oe=ae?a(ae).startOf("day").toDate():void 0,[ne,le]=l(o(P,I,re,oe)),[se,ie]=l(null),[ue,ce]=l(O),de=s(null),pe=s(null),me=s(null),fe=s(null),ve=s(!1),De=i(e=>{fe.current=e,j&&("function"==typeof j?j(e):j.current=e)},[j]),he=i(e=>{M&&pe.current&&(pe.current.contains(e.relatedTarget)||M(e,ne,{error:se,value:e.target.value}))},[M,ne,se]),be=i(e=>{H&&H(e,ne,{error:se,value:e.target.value})},[H,ne,se]),ge=i(e=>{"Escape"===e.key&&(ce(!1),e.preventDefault(),e.stopPropagation()),$?.onKeyDown&&$.onKeyDown(e)},[$]),ke=i(e=>{const t=e.currentTarget.value,r=((e,t)=>{const r=e.replace(/\D/g,""),a=c(r,{partial:!0}),o=e.replace(/\D+$/,""),n=8===r.length?c(r):e,l=h(n)?n:null,s=t&&e!==r&&o===a&&void 0===h(e)&&null===l;return l??(s?r:e)})(t,ve.current);r!==t&&((e,t)=>{const r=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value")?.set;r?r.call(e,t):e.value=t})(e.currentTarget,r);const a=t.replace(/\D/g,"");ve.current=t===a&&r===c(a)&&r!==t&&void 0!==h(r);const{date:o,error:n}=(({value:e,minDate:t,maxDate:r})=>{if(!e)return{date:null,error:null};const a=h(e);return a?t&&!g(a,t)?{date:a,error:"OUTSIDE_LOWER_BOUND"}:r&&!k(a,r)?{date:a,error:"OUTSIDE_UPPER_BOUND"}:{date:a,error:null}:{date:null,error:"WRONG_FORMAT"}})({value:r,minDate:re,maxDate:oe});o&&!n&&ce(!1),ie(n),le(o),G&&G(e,o,{error:n,value:r})},[G,re,oe]),je=i(e=>{u(()=>{ce(!ue)});const t=de.current,r=t&&t.querySelector('[aria-pressed="true"]');window.requestAnimationFrame(()=>r?.focus()),$?.onClick&&$.onClick(e)},[ue,$]),ye=i(({date:e})=>{if(ce(!1),le(e),fe.current){const t=fe.current;ve.current=!1,t.value=b(e);const r=document.createEvent("HTMLEvents");r.initEvent("input",!0,!1),t.dispatchEvent(r),t.focus(),G&&G(r,e,{error:null,value:t.value})}},[G]),Le=i(e=>{e.preventDefault(),ce(!1),me.current?.focus()},[]);return e(m,{id:L,className:r("jkl-datepicker",w),...ee,ref:pe,label:x,labelProps:C,helpLabel:S,errorLabel:N,supportLabelProps:Q,tooltip:X,description:Z,render:r=>e(v,{"data-focused":ue?"true":void 0,ref:De,"data-testid":"jkl-datepicker__input","data-testautoid":y,className:"jkl-datepicker__input",name:_,defaultValue:I,value:P,type:"text",placeholder:W,width:A,onFocus:he,onBlur:be,onChange:ke,actionButton:t(f,{positionReference:fe,open:ue,onOpenChange:()=>ce(!ue),offset:8,children:[e(f.Trigger,{...$,"data-testid":"jkl-datepicker__trigger",className:"jkl-text-input-action-button",title:ue?J:z,tabIndex:0,onClick:je,onKeyDown:ge,asChild:!0,children:e(d,{children:e(p,{})})}),e(f.Content,{initialFocus:-1,padding:24,children:e(D,{ref:de,date:ne,minDate:re,maxDate:oe,days:U,months:V,monthLabel:F,yearLabel:K,yearsToShow:E,onDateSelected:ye,onTabOutside:Le})})]}),...Y,...r,"aria-invalid":R||!!N})})});j.displayName="DatePicker";export{j as DatePicker};
|
|
2
2
|
//# sourceMappingURL=DatePicker.js.map
|