@fremtind/jokul 4.3.0 → 5.0.0-next.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 +1 -1
- 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/checkbox/types.d.cts +1 -1
- package/build/cjs/components/cookie-consent/types.d.cts +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/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 +4 -1
- 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 +9 -2
- package/build/cjs/components/modal/index.d.cts +1 -1
- package/build/cjs/components/modal/types.d.cts +1 -19
- 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/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 +176 -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/checkbox/types.d.ts +1 -1
- package/build/es/components/cookie-consent/types.d.ts +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/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 +4 -1
- 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 +9 -2
- package/build/es/components/modal/Modal.js +1 -1
- package/build/es/components/modal/Modal.js.map +1 -1
- package/build/es/components/modal/index.d.ts +1 -1
- package/build/es/components/modal/types.d.ts +1 -19
- 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/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 +176 -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/package.json +7 -585
- package/styles/base.css +1405 -0
- package/styles/base.min.css +2 -0
- package/styles/components/autosuggest/autosuggest.css +4 -10
- package/styles/components/autosuggest/autosuggest.min.css +1 -1
- package/styles/components/autosuggest/autosuggest.scss +1 -1
- package/styles/{components-beta → components/beta}/description-list/description-list.scss +1 -1
- package/styles/{components-beta → components/beta}/nav-link/navlink.css +9 -12
- package/styles/components/beta/nav-link/navlink.min.css +1 -0
- package/styles/{components-beta → components/beta}/nav-link/navlink.scss +2 -2
- package/styles/components/beta/select/_index.scss +3 -0
- package/styles/{components-beta → components/beta}/select/select.css +5 -8
- package/styles/components/beta/select/select.min.css +1 -0
- package/styles/{components-beta → components/beta}/select/select.scss +2 -3
- package/styles/components/breadcrumb/breadcrumb.scss +1 -1
- package/styles/components/button/button.css +9 -12
- package/styles/components/button/button.min.css +1 -1
- package/styles/components/button/button.scss +2 -2
- package/styles/components/card/card.css +2 -2
- package/styles/components/card/card.min.css +1 -1
- package/styles/components/card/card.scss +1 -1
- package/styles/components/checkbox/checkbox.css +12 -33
- package/styles/components/checkbox/checkbox.min.css +1 -1
- package/styles/components/checkbox/checkbox.scss +5 -15
- package/styles/components/checkbox-panel/checkbox-panel.css +19 -46
- package/styles/components/checkbox-panel/checkbox-panel.min.css +1 -1
- package/styles/components/checkbox-panel/checkbox-panel.scss +1 -1
- package/styles/components/checkbox-panel/development/styles.scss +1 -1
- package/styles/components/chip/chip.css +4 -7
- package/styles/components/chip/chip.min.css +1 -1
- package/styles/components/chip/chip.scss +2 -2
- package/styles/components/combobox/combobox.css +12 -24
- package/styles/components/combobox/combobox.min.css +1 -1
- package/styles/components/combobox/combobox.scss +1 -2
- 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 +2 -2
- package/styles/components/countdown/countdown.min.css +1 -1
- package/styles/components/datepicker/_calendar-date-button.scss +7 -7
- package/styles/components/datepicker/_calendar-navigation-dropdown.scss +2 -2
- 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 -6
- package/styles/components/datepicker/datepicker.css +13 -33
- 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 +1 -1
- package/styles/components/description-list/description-list.min.css +1 -1
- package/styles/components/description-list/description-list.scss +2 -2
- package/styles/components/expander/expandable.css +3 -3
- package/styles/components/expander/expandable.min.css +1 -1
- package/styles/components/expander/expandable.scss +1 -1
- package/styles/components/feedback/feedback.css +10 -14
- package/styles/components/feedback/feedback.min.css +1 -1
- package/styles/components/feedback/feedback.scss +1 -1
- package/styles/components/file/file.css +5 -13
- package/styles/components/file/file.min.css +1 -1
- package/styles/components/file/file.scss +2 -2
- package/styles/components/file-input/file-input.css +35 -57
- package/styles/components/file-input/file-input.min.css +1 -1
- package/styles/components/file-input/file-input.scss +1 -1
- package/styles/components/help/help.scss +1 -1
- package/styles/components/icon/_base-styles.scss +3 -5
- package/styles/components/icon/icon.css +9 -30
- package/styles/components/icon/icon.min.css +1 -1
- package/styles/components/icon/icon.scss +1 -15
- package/styles/components/icon-button/icon-button.css +2 -2
- 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 +7 -13
- package/styles/components/input-panel/input-panel.min.css +1 -1
- package/styles/components/input-panel/input-panel.scss +2 -2
- package/styles/components/link/link.css +6 -7
- 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 +11 -21
- package/styles/components/link-list/link-list.min.css +1 -1
- package/styles/components/link-list/link-list.scss +1 -1
- 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 +3 -3
- package/styles/components/loader/skeleton-loader.min.css +1 -1
- package/styles/components/loader/skeleton-loader.scss +1 -1
- 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 +1 -1
- package/styles/components/menu/_menu-item.scss +1 -1
- package/styles/components/menu/menu.css +6 -21
- package/styles/components/menu/menu.min.css +1 -1
- package/styles/components/menu/menu.scss +7 -11
- package/styles/components/message/message.css +8 -20
- package/styles/components/message/message.min.css +1 -1
- package/styles/components/message/message.scss +1 -1
- package/styles/components/modal/modal.css +35 -125
- package/styles/components/modal/modal.min.css +1 -1
- package/styles/components/modal/modal.scss +95 -6
- package/styles/components/nav-link/nav-link.css +4 -4
- 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 +1 -1
- package/styles/components/pagination/pagination.min.css +1 -1
- package/styles/components/pagination/pagination.scss +1 -1
- package/styles/components/popover/popover.css +5 -17
- package/styles/components/popover/popover.min.css +1 -1
- package/styles/components/popover/popover.scss +6 -10
- package/styles/components/progress-bar/progress-bar.css +3 -3
- package/styles/components/progress-bar/progress-bar.min.css +1 -1
- package/styles/components/progress-bar/progress-bar.scss +1 -1
- package/styles/components/radio-button/radio-button.css +12 -30
- package/styles/components/radio-button/radio-button.min.css +1 -1
- package/styles/components/radio-button/radio-button.scss +5 -15
- package/styles/components/radio-panel/development/styles.scss +1 -1
- package/styles/components/radio-panel/radio-panel.css +7 -13
- package/styles/components/radio-panel/radio-panel.min.css +1 -1
- package/styles/components/radio-panel/radio-panel.scss +1 -1
- package/styles/components/search/search-with-submit-button.css +2 -2
- package/styles/components/search/search-with-submit-button.min.css +1 -1
- package/styles/components/search/search-with-submit-button.scss +1 -1
- package/styles/components/search/search.css +8 -14
- package/styles/components/search/search.min.css +1 -1
- package/styles/components/search/search.scss +1 -1
- package/styles/components/segmented-control/segmented-control.css +39 -97
- package/styles/components/segmented-control/segmented-control.min.css +1 -1
- package/styles/components/segmented-control/segmented-control.scss +1 -1
- package/styles/components/select/select.css +12 -21
- package/styles/components/select/select.min.css +1 -1
- package/styles/components/select/select.scss +1 -2
- package/styles/components/summary-table/development/summary-table-example.scss +1 -1
- package/styles/components/summary-table/summary-table.css +3 -6
- package/styles/components/summary-table/summary-table.min.css +1 -1
- package/styles/components/summary-table/summary-table.scss +3 -3
- package/styles/components/system-message/system-message.css +4 -7
- package/styles/components/system-message/system-message.min.css +1 -1
- package/styles/components/system-message/system-message.scss +1 -2
- 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 +1 -1
- package/styles/components/table/table.css +18 -46
- 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 +3 -7
- package/styles/components/table-of-contents/table-of-contents.min.css +1 -1
- package/styles/components/table-of-contents/table-of-contents.scss +1 -1
- package/styles/components/tabs/tabs.css +6 -9
- package/styles/components/tabs/tabs.min.css +1 -1
- package/styles/components/tabs/tabs.scss +1 -1
- package/styles/components/tag/tag.css +2 -5
- package/styles/components/tag/tag.min.css +1 -1
- package/styles/components/tag/tag.scss +2 -2
- package/styles/components/text-area/text-area.css +9 -18
- 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 +4 -10
- 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 +6 -12
- package/styles/components/toast/toast.min.css +1 -1
- package/styles/components/toast/toast.scss +1 -2
- package/styles/components/toggle-switch/_toggle-slider.scss +1 -1
- package/styles/components/toggle-switch/toggle-switch.css +7 -10
- package/styles/components/toggle-switch/toggle-switch.min.css +2 -2
- package/styles/components/toggle-switch/toggle-switch.scss +1 -1
- package/styles/components/tooltip/tooltip.css +4 -8
- package/styles/components/tooltip/tooltip.min.css +1 -1
- package/styles/components/tooltip/tooltip.scss +1 -1
- package/styles/{styles.css → components.css} +329 -734
- 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 +5 -7
- 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}/_reset.scss +2 -2
- package/styles/{core/jkl → jkl}/_spacing.scss +1 -6
- package/styles/jkl/_tokens.scss +306 -0
- package/styles/{core/jkl → jkl}/_typography.scss +5 -98
- package/styles/shared/input/shared-input-styles.scss +1 -1
- package/styles/shared/track/track.scss +1 -1
- package/styles/tailwind.css +171 -0
- package/styles/theme/_color-scheme.scss +84 -0
- package/styles/{core/theme → theme}/_dynamic-spacing.scss +9 -5
- package/styles/theme/_fonts.scss +147 -0
- package/styles/theme/_index.scss +5 -0
- package/styles/theme/_size.scss +53 -0
- package/styles/theme/_tokens.scss +94 -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/core/tokens.cjs +0 -2
- package/build/cjs/core/tokens.cjs.map +0 -1
- package/build/cjs/core/tokens.d.cts +0 -593
- 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/cjs/tailwind/colors.cjs +0 -2
- package/build/cjs/tailwind/colors.cjs.map +0 -1
- package/build/cjs/tailwind/colors.d.cts +0 -39
- 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/core/tokens.d.ts +0 -593
- package/build/es/core/tokens.js +0 -2
- package/build/es/core/tokens.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/es/tailwind/colors.d.ts +0 -39
- package/build/es/tailwind/colors.js +0 -2
- package/build/es/tailwind/colors.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/modal/_layout.scss +0 -22
- package/styles/components/modal/_modal-base.scss +0 -32
- package/styles/components/modal/_motion.scss +0 -45
- package/styles/components/modal/_overlay.scss +0 -20
- package/styles/components/modal/_parts.scss +0 -33
- package/styles/components/modal/_placement.scss +0 -59
- 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/_tokens.scss +0 -59
- package/styles/core/jkl/legacy/_dynamic-colors.scss +0 -40
- package/styles/core/jkl/legacy/_index.scss +0 -2
- package/styles/core/jkl/legacy/_tokens.scss +0 -742
- package/styles/core/theme/_color-tokens.scss +0 -73
- package/styles/core/theme/_index.scss +0 -10
- package/styles/core/theme/_legacy-color-tokens.scss +0 -81
- package/styles/core/theme/_legacy-tokens.scss +0 -279
- package/styles/core/theme/_old-vars.scss +0 -21
- package/styles/core/theme/_shape.scss +0 -12
- package/styles/core/theme/_spacing-tokens.scss +0 -33
- package/styles/core/theme/_spacing.scss +0 -64
- package/styles/core/theme/_tokens.scss +0 -33
- 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}/description-list/description-list.css +0 -0
- /package/styles/{components-beta → components/beta}/description-list/description-list.min.css +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}/_ornaments.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,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("../../../../clsx-E3yX_9sL.cjs");require("react");const r=require("./DescriptionListItem.cjs"),s=({className:r,alignment:s="horizontal",showSeparators:i=!1,children:a,...c})=>e.jsx("dl",{...c,className:t.clsx("jkl-description-list--beta",r),"data-alignment":s,"data-separators":i,children:a});s.Item=r.DescriptionListItem,exports.DescriptionList=s;
|
|
2
|
+
//# sourceMappingURL=DescriptionList.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DescriptionList.cjs","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":"8NAQaA,EAAkB,EAC3BC,UAAAA,EACAC,UAAAA,EAAY,aACZC,eAAAA,GAAiB,EACjBC,SAAAA,KACGC,KAGCC,EAAAA,IAAC,KAAA,IACOD,EACJJ,UAAWM,EAAAA,KAAK,6BAA8BN,GAC9C,iBAAgBC,EAChB,kBAAiBC,EAEhBC,SAAAA,IAKbJ,EAAgBQ,KAAOC,EAAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("../../../../clsx-E3yX_9sL.cjs");require("react");exports.DescriptionListItem=({title:t,value:r,supportText:i,className:l,...c})=>e.jsxs("div",{...c,className:s.clsx("jkl-description-list-item--beta",l),children:[e.jsx("dt",{className:"title",children:t}),e.jsx("dd",{className:"value",children:r}),i&&e.jsx("dd",{className:"support-text",children:i})]});
|
|
2
|
+
//# sourceMappingURL=DescriptionListItem.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DescriptionListItem.cjs","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":["title","value","supportText","className","rest","jsxs","clsx","children","jsx"],"mappings":"6MAOiE,EAC7DA,MAAAA,EACAC,MAAAA,EACAC,YAAAA,EACAC,UAAAA,KACGC,KAGCC,EAAAA,KAAC,MAAA,IACOD,EACJD,UAAWG,EAAAA,KAAK,kCAAmCH,GAEnDI,SAAA,CAAAC,EAAAA,IAAC,KAAA,CAAGL,UAAU,QAASI,SAAAP,IACvBQ,EAAAA,IAAC,KAAA,CAAGL,UAAU,QAASI,SAAAN,IACtBC,GAAeM,EAAAA,IAAC,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.cjs';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("../../../../clsx-E3yX_9sL.cjs"),r=require("react"),s=r.forwardRef(function(s,t){const{title:a,description:c,className:l,children:n,as:d="a",...o}=s,u=d,p=r.useId();return e.jsxs(u,{...o,ref:t,"aria-labelledby":`${p}-title`,"aria-describedby":`${p}-description`,className:i.clsx("jkl-navlink--beta",l),children:[e.jsx("p",{className:"title",id:`${p}-title`,children:a}),c&&e.jsx("p",{className:"description",id:`${p}-description`,children:c})]})});exports.NavLink=s;
|
|
2
|
+
//# sourceMappingURL=NavLink.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavLink.cjs","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":"mLASaA,EAAUC,EAAMC,WAAW,SAEtCC,EAAkCC,GAChC,MACIC,MAAAA,EACAC,YAAAA,EACAC,UAAAA,EACAC,SAAAA,EACAC,GAAAA,EAAK,OACFC,GACHP,EACEQ,EAAYF,EACZG,EAAKC,EAAAA,QAEX,OACIC,EAAAA,KAACH,EAAA,IACOD,EACJN,IAAAA,EACA,kBAAiB,GAAGQ,UACpB,mBAAkB,GAAGA,gBACrBL,UAAWQ,EAAAA,KAAK,oBAAqBR,GAErCC,SAAA,CAAAQ,EAAAA,IAAC,KAAET,UAAU,QAAQK,GAAI,GAAGA,UACvBJ,SAAAH,IAEJC,SACI,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.cjs';
|
|
3
3
|
export type NavLinkProps<ElementType extends React.ElementType> = PolymorphicPropsWithRef<ElementType, {
|
|
4
4
|
title: string;
|
|
5
5
|
description?: string;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("../../../../clsx-E3yX_9sL.cjs"),o=require("react");require("../../icon/Icon.cjs"),require("../../icon/icons/animated/ArrowVerticalAnimated.cjs"),require("../../icon/icons/animated/ArrowHorizontalAnimated.cjs"),require("../../icon/icons/animated/PlusRemoveAnimated.cjs");const r=require("../../icon/icons/ArrowDownIcon.cjs");require("../../icon/icons/ArrowLeftIcon.cjs"),require("../../icon/icons/ArrowNorthEastIcon.cjs"),require("../../icon/icons/ArrowRightIcon.cjs"),require("../../icon/icons/ArrowUpIcon.cjs"),require("../../icon/icons/CalendarIcon.cjs"),require("../../icon/icons/CheckIcon.cjs"),require("../../icon/icons/ChevronDownIcon.cjs"),require("../../icon/icons/ChevronLeftIcon.cjs"),require("../../icon/icons/ChevronRightIcon.cjs"),require("../../icon/icons/ChevronUpIcon.cjs"),require("../../icon/icons/CloseIcon.cjs"),require("../../icon/icons/CopyIcon.cjs"),require("../../icon/icons/DotsIcon.cjs"),require("../../icon/icons/DragIcon.cjs"),require("../../icon/icons/ErrorIcon.cjs"),require("../../icon/icons/GreenCheckIcon.cjs"),require("../../icon/icons/HamburgerIcon.cjs"),require("../../icon/icons/InfoIcon.cjs"),require("../../icon/icons/LinkIcon.cjs"),require("../../icon/icons/MinusIcon.cjs"),require("../../icon/icons/OpenInNewIcon.cjs"),require("../../icon/icons/PenIcon.cjs"),require("../../icon/icons/PlusIcon.cjs"),require("../../icon/icons/QuestionIcon.cjs"),require("../../icon/icons/RedCrossIcon.cjs"),require("../../icon/icons/SearchIcon.cjs"),require("../../icon/icons/SuccessIcon.cjs"),require("../../icon/icons/ThumbDownIcon.cjs"),require("../../icon/icons/ThumbUpIcon.cjs"),require("../../icon/icons/TrashCanIcon.cjs"),require("../../icon/icons/WarningIcon.cjs");const n=require("../../input-group/InputGroup.cjs"),i=o.forwardRef((o,i)=>{const{label:s,className:u,errorLabel:t,helpLabel:a,labelProps:l,placeholder:j="Velg",supportLabelProps:q,tooltip:I,value:p,description:d,...h}=o,b={label:s,errorLabel:t,helpLabel:a,labelProps:l,supportLabelProps:q,tooltip:I,description:d};return e.jsx(n.InputGroup,{...b,"data-testid":"jkl-select--beta",className:c.clsx("jkl-select--beta",u),render:c=>e.jsxs("div",{className:"jkl-select--beta-wrapper",children:[e.jsxs("select",{ref:i,defaultValue:p?void 0:"",value:p,...c,...h,children:[j&&e.jsx("option",{disabled:!0,selected:!0,value:"",children:j}),o.children]}),e.jsx(r.ArrowDownIcon,{})]})})});exports.Select=i;
|
|
2
|
+
//# sourceMappingURL=Select.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.cjs","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","inputGroupProps","jsx","InputGroup","clsx","render","inputProps","jsxs","children","defaultValue","disabled","selected","ArrowDownIcon"],"mappings":"q1DAMaA,EAASC,EAAAA,WAClB,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,EAEEa,EAAkB,CACpBX,MAAAA,EACAE,WAAAA,EACAC,UAAAA,EACAC,WAAAA,EACAE,kBAAAA,EACAC,QAAAA,EACAE,YAAAA,GAGJ,OACIG,EAAAA,IAACC,EAAAA,WAAA,IACOF,EACJ,cAAY,mBACZV,UAAWa,EAAAA,KAAK,mBAAoBb,GACpCc,OAASC,GACLC,EAAAA,KAAC,MAAA,CAAIhB,UAAU,2BACXiB,SAAA,CAAAD,EAAAA,KAAC,SAAA,CACGlB,IAAAA,EACAoB,aAAcX,OAAQ,EAAY,GAClCA,MAAAA,KACIQ,KACAN,EAEHQ,SAAA,CAAAb,GACGO,EAAAA,IAAC,UAAOQ,UAAQ,EAACC,UAAQ,EAACb,MAAM,GAC3BU,SAAAb,IAGRP,EAAMoB,kBAEVI,EAAAA,cAAA,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode, SelectHTMLAttributes } from 'react';
|
|
2
|
-
import { InputGroupProps } from '../../
|
|
2
|
+
import { InputGroupProps } from '../../input-group/types.cjs';
|
|
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,5 +1,5 @@
|
|
|
1
1
|
import { ChangeEventHandler, FocusEventHandler, InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import { DataTestAutoId } from '../../
|
|
2
|
+
import { DataTestAutoId } from '../../utilities/types.cjs';
|
|
3
3
|
export interface CheckboxProps extends DataTestAutoId, InputHTMLAttributes<HTMLInputElement> {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
name: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WithChildren } from '../../
|
|
1
|
+
import { WithChildren } from '../../utilities/types.cjs';
|
|
2
2
|
export type ConsentState = null | "denied" | "accepted";
|
|
3
3
|
export type ConsentRequirement = Partial<Record<keyof Consent, boolean>>;
|
|
4
4
|
export type Consent = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes, ChangeEvent, ComponentProps, FocusEvent, KeyboardEvent } from 'react';
|
|
2
|
-
import { DataTestAutoId } from '../../
|
|
2
|
+
import { DataTestAutoId } from '../../utilities/types.cjs';
|
|
3
3
|
import { InputGroupProps, LabelProps } from '../input-group/types.cjs';
|
|
4
4
|
export type DateValidationError = "WRONG_FORMAT" | "OUTSIDE_LOWER_BOUND" | "OUTSIDE_UPPER_BOUND";
|
|
5
5
|
export type DatePickerChangeEventHandler = (e: ChangeEvent<HTMLInputElement>, date: Date | null, meta: DatePickerMetadata) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./DescriptionList.cjs"),t=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./DescriptionList.cjs"),t=require("../beta/description-list/DescriptionList.cjs"),e=require("../beta/description-list/DescriptionListItem.cjs");exports.DescriptionDetail=i.DescriptionDetail,exports.DescriptionList=i.DescriptionList,exports.DescriptionTerm=i.DescriptionTerm,exports.BETA_DescriptionList=t.DescriptionList,exports.BETA_DescriptionListItem=e.DescriptionListItem;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { DescriptionList, DescriptionTerm, DescriptionDetail, } from './DescriptionList.cjs';
|
|
2
2
|
export type { DescriptionListProps, DescriptionTermProps, DescriptionDetailProps, } from './types.cjs';
|
|
3
|
-
export { DescriptionList as BETA_DescriptionList } from '
|
|
4
|
-
export { DescriptionListItem as BETA_DescriptionListItem } from '
|
|
5
|
-
export type { DescriptionListProps as BETA_DescriptionListProps } from '
|
|
3
|
+
export { DescriptionList as BETA_DescriptionList } from '../beta/description-list/DescriptionList.jsx';
|
|
4
|
+
export { DescriptionListItem as BETA_DescriptionListItem } from '../beta/description-list/DescriptionListItem.jsx';
|
|
5
|
+
export type { DescriptionListProps as BETA_DescriptionListProps } from '../beta/description-list/types.cjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feedbackContext.cjs","sources":["../../../../src/components/feedback/feedbackContext.tsx"],"sourcesContent":["import React, { createContext, type FC, useContext } from \"react\";\nimport type { WithChildren } from \"../../
|
|
1
|
+
{"version":3,"file":"feedbackContext.cjs","sources":["../../../../src/components/feedback/feedbackContext.tsx"],"sourcesContent":["import React, { createContext, type FC, useContext } from \"react\";\nimport type { WithChildren } from \"../../utilities/types.js\";\nimport type { BaseTextAreaProps } from \"../text-area/types.js\";\n\ntype FeedbackContext = {\n feedbackSubmitted: boolean;\n followupStarted: boolean;\n followupSubmitted: boolean;\n contactSubmitted: boolean;\n landmarkLabel?: string;\n setFeedbackSubmitted: (state: boolean) => void;\n setFollowupStarted: (state: boolean) => void;\n setFollowupSubmitted: (state: boolean) => void;\n setContactSubmitted: (state: boolean) => void;\n} & Pick<BaseTextAreaProps, \"counter\">;\n\nconst initialState: FeedbackContext = {\n feedbackSubmitted: false,\n followupStarted: false,\n followupSubmitted: false,\n contactSubmitted: false,\n setFeedbackSubmitted: () => null,\n setFollowupStarted: () => null,\n setFollowupSubmitted: () => null,\n setContactSubmitted: () => null,\n};\n\nconst feedbackContext = createContext(initialState);\n\nexport const useFeedbackContext = (): FeedbackContext =>\n useContext(feedbackContext);\n\ninterface FeedbackContextProviderProps extends WithChildren {\n value: FeedbackContext;\n}\n\nexport const FeedbackContextProvider: FC<FeedbackContextProviderProps> = ({\n value,\n children,\n}) => (\n <feedbackContext.Provider value={value}>\n {children}\n </feedbackContext.Provider>\n);\n"],"names":["feedbackContext","createContext","feedbackSubmitted","followupStarted","followupSubmitted","contactSubmitted","setFeedbackSubmitted","setFollowupStarted","setFollowupSubmitted","setContactSubmitted","value","children","jsx","Provider","useContext"],"mappings":"wIA2BMA,EAAkBC,EAAAA,cAXc,CAClCC,mBAAmB,EACnBC,iBAAiB,EACjBC,mBAAmB,EACnBC,kBAAkB,EAClBC,qBAAsB,IAAM,KAC5BC,mBAAoB,IAAM,KAC1BC,qBAAsB,IAAM,KAC5BC,oBAAqB,IAAM,uCAY0C,EACrEC,MAAAA,EACAC,SAAAA,KAEAC,EAAAA,IAACZ,EAAgBa,SAAhB,CAAyBH,MAAAA,EACrBC,SAAAA,+BAZyB,IAC9BG,EAAAA,WAAWd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"followupContext.cjs","sources":["../../../../../src/components/feedback/followup/followupContext.tsx"],"sourcesContent":["import React, { createContext, useContext } from \"react\";\nimport type { WithChildren } from \"../../../
|
|
1
|
+
{"version":3,"file":"followupContext.cjs","sources":["../../../../../src/components/feedback/followup/followupContext.tsx"],"sourcesContent":["import React, { createContext, useContext } from \"react\";\nimport type { WithChildren } from \"../../../utilities/types.js\";\nimport type { FollowupState } from \"../types.js\";\n\nconst followUpContext = createContext<FollowupState | undefined>(undefined);\n\nexport const useFollowUpContext = (): FollowupState | undefined =>\n useContext(followUpContext);\n\ninterface FollowupContextProviderProps extends WithChildren {\n state: FollowupState;\n}\n\nexport const FollowUpProvider: React.FC<FollowupContextProviderProps> = ({\n state,\n children,\n}) => (\n <followUpContext.Provider value={state}>\n {children}\n </followUpContext.Provider>\n);\n"],"names":["followUpContext","createContext","state","children","Provider","value","useContext"],"mappings":"wIAIMA,EAAkBC,EAAAA,mBAAyC,4BASO,EACpEC,MAAAA,EACAC,SAAAA,WAECH,EAAgBI,SAAhB,CAAyBC,MAAOH,EAC5BC,SAAAA,+BAZyB,IAC9BG,EAAAA,WAAWN"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { WithChildren } from '../../../
|
|
2
|
+
import { WithChildren } from '../../../utilities/types.cjs';
|
|
3
3
|
import { FollowupState } from '../types.cjs';
|
|
4
4
|
export declare const useFollowUpContext: () => FollowupState | undefined;
|
|
5
5
|
interface FollowupContextProviderProps extends WithChildren {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mainQuestionContext.cjs","sources":["../../../../../src/components/feedback/main-question/mainQuestionContext.tsx"],"sourcesContent":["import React, { createContext, useContext } from \"react\";\nimport type { WithChildren } from \"../../../
|
|
1
|
+
{"version":3,"file":"mainQuestionContext.cjs","sources":["../../../../../src/components/feedback/main-question/mainQuestionContext.tsx"],"sourcesContent":["import React, { createContext, useContext } from \"react\";\nimport type { WithChildren } from \"../../../utilities/types.js\";\nimport type { FeedbackState } from \"../types.js\";\n\nconst mainQuestionContext = createContext<FeedbackState | undefined>(undefined);\n\nexport const useMainQuestionContext = (): FeedbackState | undefined =>\n useContext(mainQuestionContext);\n\ninterface Props extends WithChildren {\n state: FeedbackState;\n}\n\nexport const MainQuestionContextProvider: React.FC<Props> = ({\n state,\n children,\n}) => (\n <mainQuestionContext.Provider value={state}>\n {children}\n </mainQuestionContext.Provider>\n);\n"],"names":["mainQuestionContext","createContext","state","children","Provider","value","useContext"],"mappings":"wIAIMA,EAAsBC,EAAAA,mBAAyC,uCAST,EACxDC,MAAAA,EACAC,SAAAA,WAECH,EAAoBI,SAApB,CAA6BC,MAAOH,EAChCC,SAAAA,mCAZ6B,IAClCG,EAAAA,WAAWN"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { WithChildren } from '../../../
|
|
2
|
+
import { WithChildren } from '../../../utilities/types.cjs';
|
|
3
3
|
import { FeedbackState } from '../types.cjs';
|
|
4
4
|
export declare const useMainQuestionContext: () => FeedbackState | undefined;
|
|
5
5
|
interface Props extends WithChildren {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smileyUtils.cjs","sources":["../../../../../src/components/feedback/questions/smileyUtils.tsx"],"sourcesContent":["import React, { type FC } from \"react\";\nimport type { WithChildren } from \"../../../
|
|
1
|
+
{"version":3,"file":"smileyUtils.cjs","sources":["../../../../../src/components/feedback/questions/smileyUtils.tsx"],"sourcesContent":["import React, { type FC } from \"react\";\nimport type { WithChildren } from \"../../../utilities/types.js\";\nimport type { FeedbackOption } from \"../types.js\";\n\nexport const defaultOptions: FeedbackOption<number>[] = [\n {\n label: \"Veldig misfornøyd\",\n value: 1,\n textAreaLabel:\n \"Det var leit! Fortell oss gjerne hva du savner, så kan vi gjøre sidene våre bedre.\",\n },\n {\n label: \"Litt misfornøyd\",\n value: 2,\n textAreaLabel:\n \"Det var leit! Fortell oss gjerne hva du savner, så kan vi gjøre sidene våre bedre.\",\n },\n {\n label: \"Midt på treet\",\n value: 3,\n textAreaLabel:\n \"Fortell oss gjerne hva du savner, så kan vi gjøre sidene våre bedre.\",\n },\n {\n label: \"Ganske fornøyd\",\n value: 4,\n textAreaLabel:\n \"Så bra! Har du noen tilbakemeldinger kan du skrive dem her.\",\n },\n {\n label: \"Veldig fornøyd\",\n value: 5,\n textAreaLabel:\n \"Så bra! Har du noen tilbakemeldinger kan du skrive dem her.\",\n },\n];\n\nconst Smiley: FC<WithChildren> = ({ children }) => (\n <svg\n className=\"jkl-feedback-smiley-option__icon\"\n aria-hidden\n viewBox=\"0 0 40 40\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle cx=\"20\" cy=\"20\" r=\"19\" stroke=\"currentColor\" strokeWidth=\"2\" />\n {children}\n </svg>\n);\n\nconst VeldigSurSmiley = () => (\n <Smiley>\n <path\n d=\"M10 30C10 24.4772 14.4772 20 20 20C25.5228 20 30 24.4772 30 30\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n />\n <path d=\"M10 13.9865H16.6667\" stroke=\"currentColor\" strokeWidth=\"2\" />\n <path\n d=\"M23.3333 13.9865H29.9999\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n />\n </Smiley>\n);\n\nconst LittSurSmiley = () => (\n <Smiley>\n <path\n d=\"M10 28.75C10 28.75 13.75 23.3334 20 23.3334C26.25 23.3334 30 28.75 30 28.75\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n />\n <circle cx=\"12.5\" cy=\"14.5\" r=\"1.5\" fill=\"currentColor\" />\n <circle cx=\"27.5\" cy=\"14.5\" r=\"1.5\" fill=\"currentColor\" />\n </Smiley>\n);\n\nconst NoytralSmiley = () => (\n <Smiley>\n <path\n d=\"M9.15283 25.6986H30.8477\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n />\n <circle cx=\"12.5\" cy=\"14.5\" r=\"1.5\" fill=\"currentColor\" />\n <circle cx=\"27.5\" cy=\"14.5\" r=\"1.5\" fill=\"currentColor\" />\n </Smiley>\n);\n\nconst LittGladSmiley = () => (\n <Smiley>\n <path\n d=\"M10 23.3334C10 23.3334 12.9167 30 20 30C27.0833 30 30 23.3334 30 23.3334\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n />\n <circle cx=\"12.5\" cy=\"14.5\" r=\"1.5\" fill=\"currentColor\" />\n <circle cx=\"27.5\" cy=\"14.5\" r=\"1.5\" fill=\"currentColor\" />\n </Smiley>\n);\n\nconst VeldigGladSmiley = () => (\n <Smiley>\n <path\n d=\"M30 21C30 26.5228 25.5228 31 20 31C14.4772 31 10 26.5228 10 21\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n />\n <path d=\"M24 14.5H29\" stroke=\"currentColor\" strokeWidth=\"2\" />\n <circle cx=\"12.5\" cy=\"14.5\" r=\"1.5\" fill=\"currentColor\" />\n </Smiley>\n);\n\nexport const getSmiley = (value: number) => {\n switch (value) {\n case 1:\n return <VeldigSurSmiley />;\n case 2:\n return <LittSurSmiley />;\n case 3:\n return <NoytralSmiley />;\n case 4:\n return <LittGladSmiley />;\n case 5:\n return <VeldigGladSmiley />;\n\n default:\n return <NoytralSmiley />;\n }\n};\n"],"names":["Smiley","children","jsxs","className","viewBox","fill","xmlns","jsx","cx","cy","r","stroke","strokeWidth","VeldigSurSmiley","d","LittSurSmiley","NoytralSmiley","LittGladSmiley","VeldigGladSmiley","label","value","textAreaLabel"],"mappings":"sIAIO,MAiCDA,EAA2B,EAAGC,SAAAA,KAChCC,EAAAA,KAAC,MAAA,CACGC,UAAU,mCACV,eAAW,EACXC,QAAQ,YACRC,KAAK,OACLC,MAAM,6BAENL,SAAA,CAAAM,EAAAA,IAAC,SAAA,CAAOC,GAAG,KAAKC,GAAG,KAAKC,EAAE,KAAKC,OAAO,eAAeC,YAAY,MAChEX,KAIHY,EAAkB,IACpBX,EAAAA,KAACF,EAAA,CACGC,SAAA,CAAAM,EAAAA,IAAC,OAAA,CACGO,EAAE,iEACFH,OAAO,eACPC,YAAY,YAEf,OAAA,CAAKE,EAAE,sBAAsBH,OAAO,eAAeC,YAAY,MAChEL,EAAAA,IAAC,OAAA,CACGO,EAAE,2BACFH,OAAO,eACPC,YAAY,SAKlBG,EAAgB,IAClBb,EAAAA,KAACF,EAAA,CACGC,SAAA,CAAAM,EAAAA,IAAC,OAAA,CACGO,EAAE,8EACFH,OAAO,eACPC,YAAY,MAEhBL,EAAAA,IAAC,UAAOC,GAAG,OAAOC,GAAG,OAAOC,EAAE,MAAML,KAAK,iBACzCE,EAAAA,IAAC,UAAOC,GAAG,OAAOC,GAAG,OAAOC,EAAE,MAAML,KAAK,oBAI3CW,EAAgB,IAClBd,EAAAA,KAACF,EAAA,CACGC,SAAA,CAAAM,EAAAA,IAAC,OAAA,CACGO,EAAE,2BACFH,OAAO,eACPC,YAAY,MAEhBL,EAAAA,IAAC,UAAOC,GAAG,OAAOC,GAAG,OAAOC,EAAE,MAAML,KAAK,iBACzCE,EAAAA,IAAC,UAAOC,GAAG,OAAOC,GAAG,OAAOC,EAAE,MAAML,KAAK,oBAI3CY,EAAiB,IACnBf,EAAAA,KAACF,EAAA,CACGC,SAAA,CAAAM,EAAAA,IAAC,OAAA,CACGO,EAAE,2EACFH,OAAO,eACPC,YAAY,MAEhBL,EAAAA,IAAC,UAAOC,GAAG,OAAOC,GAAG,OAAOC,EAAE,MAAML,KAAK,iBACzCE,EAAAA,IAAC,UAAOC,GAAG,OAAOC,GAAG,OAAOC,EAAE,MAAML,KAAK,oBAI3Ca,EAAmB,IACrBhB,EAAAA,KAACF,EAAA,CACGC,SAAA,CAAAM,EAAAA,IAAC,OAAA,CACGO,EAAE,iEACFH,OAAO,eACPC,YAAY,YAEf,OAAA,CAAKE,EAAE,cAAcH,OAAO,eAAeC,YAAY,MACxDL,EAAAA,IAAC,UAAOC,GAAG,OAAOC,GAAG,OAAOC,EAAE,MAAML,KAAK,2CA1GO,CACpD,CACIc,MAAO,oBACPC,MAAO,EACPC,cACI,sFAER,CACIF,MAAO,kBACPC,MAAO,EACPC,cACI,sFAER,CACIF,MAAO,gBACPC,MAAO,EACPC,cACI,wEAER,CACIF,MAAO,iBACPC,MAAO,EACPC,cACI,+DAER,CACIF,MAAO,iBACPC,MAAO,EACPC,cACI,kFAiFcD,IACtB,OAAQA,GACJ,OACI,aAAQP,EAAA,IACZ,KAAK,EACD,aAAQE,EAAA,IACZ,KAAK,EAOL,QACI,aAAQC,EAAA,IANZ,KAAK,EACD,aAAQC,EAAA,IACZ,OACI,aAAQC,EAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dropzone.cjs","sources":["../../../../../src/components/file-input/internal/Dropzone.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { forwardRef, useState } from \"react\";\nimport type { WithChildren } from \"../../../
|
|
1
|
+
{"version":3,"file":"Dropzone.cjs","sources":["../../../../../src/components/file-input/internal/Dropzone.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { forwardRef, useState } from \"react\";\nimport type { WithChildren } from \"../../../utilities/types.js\";\nimport type { UploadedFile } from \"../types.js\";\nimport { useFileInputContext } from \"./fileInputContext.js\";\nimport { validateFileInputFiles } from \"./validateFileInputFiles.js\";\n\ninterface DropzoneProps extends WithChildren {}\n\nexport const Dropzone = forwardRef<HTMLDivElement, DropzoneProps>(\n (props, ref) => {\n const { children, ...rest } = props;\n const [onDragClassName, setOnDragClassName] = useState<string>(\"\");\n\n const context = useFileInputContext();\n if (!context) {\n return (\n <p>\n Dropzone must be placed inside a FileInputContextProvider.\n </p>\n );\n }\n const { maxSizeBytes, accept, onChange } = context;\n\n return (\n <div\n {...rest}\n ref={ref}\n className={clsx(\"jkl-file-input__dropzone\", onDragClassName)}\n onDragEnter={(e) => {\n setOnDragClassName(\"jkl-file-input__dropzone--enter\");\n e.preventDefault();\n }}\n onDragOver={(e) => {\n /* Prevent browser from opening file in a new tab */\n setOnDragClassName(\"jkl-file-input__dropzone--enter\");\n e.preventDefault();\n }}\n onDrop={(e) => {\n e.preventDefault();\n setOnDragClassName(\"\");\n\n if (e.dataTransfer.files) {\n onChange(\n e,\n [...e.dataTransfer.files].map<UploadedFile>(\n (file) => ({\n file,\n state: undefined,\n validation: validateFileInputFiles(\n file,\n accept,\n maxSizeBytes,\n ),\n uploadProgress: 0,\n }),\n ),\n );\n }\n }}\n onDragLeave={(e) => {\n setOnDragClassName(\"\");\n e.preventDefault();\n }}\n >\n {children}\n </div>\n );\n },\n);\n\nDropzone.displayName = \"Dropzone\";\n"],"names":["Dropzone","forwardRef","props","ref","children","rest","onDragClassName","setOnDragClassName","useState","context","useFileInputContext","jsx","maxSizeBytes","accept","onChange","className","clsx","onDragEnter","e","preventDefault","onDragOver","onDrop","dataTransfer","files","map","file","state","validation","validateFileInputFiles","uploadProgress","onDragLeave","displayName"],"mappings":"iQASaA,EAAWC,EAAAA,WACpB,CAACC,EAAOC,KACJ,MAAQC,SAAAA,KAAaC,GAASH,GACvBI,EAAiBC,GAAsBC,EAAAA,SAAiB,IAEzDC,EAAUC,EAAAA,sBAChB,IAAKD,EACD,OACIE,EAAAA,IAAC,KAAEP,SAAA,+DAKX,MAAQQ,aAAAA,EAAcC,OAAAA,EAAQC,SAAAA,GAAaL,EAE3C,OACIE,EAAAA,IAAC,MAAA,IACON,EACJF,IAAAA,EACAY,UAAWC,EAAAA,KAAK,2BAA4BV,GAC5CW,YAAcC,IACVX,EAAmB,mCACnBW,EAAEC,kBAENC,WAAaF,IAETX,EAAmB,mCACnBW,EAAEC,kBAENE,OAASH,IACLA,EAAEC,iBACFZ,EAAmB,IAEfW,EAAEI,aAAaC,OACfT,EACII,EACA,IAAIA,EAAEI,aAAaC,OAAOC,IACrBC,IAAAA,CACGA,KAAAA,EACAC,WAAO,EACPC,WAAYC,EAAAA,uBACRH,EACAZ,EACAD,GAEJiB,eAAgB,OAMpCC,YAAcZ,IACVX,EAAmB,IACnBW,EAAEC,kBAGLf,SAAAA,MAMjBJ,EAAS+B,YAAc"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { WithChildren } from '../../../
|
|
2
|
+
import { WithChildren } from '../../../utilities/types.cjs';
|
|
3
3
|
interface DropzoneProps extends WithChildren {
|
|
4
4
|
}
|
|
5
5
|
export declare const Dropzone: React.ForwardRefExoticComponent<DropzoneProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileInputContext.cjs","sources":["../../../../../src/components/file-input/internal/fileInputContext.tsx"],"sourcesContent":["import React, { createContext, useContext } from \"react\";\nimport type { WithChildren } from \"../../../
|
|
1
|
+
{"version":3,"file":"fileInputContext.cjs","sources":["../../../../../src/components/file-input/internal/fileInputContext.tsx"],"sourcesContent":["import React, { createContext, useContext } from \"react\";\nimport type { WithChildren } from \"../../../utilities/types.js\";\nimport type { UploadedFile } from \"../types.js\";\n\ntype FileInputContext = {\n accept?: \"image/*\" | \".pdf\" | \"image/*,.pdf\" | HTMLInputElement[\"accept\"];\n maxSizeBytes?: number;\n files: UploadedFile[];\n onChange: (\n e:\n | React.ChangeEvent<HTMLInputElement>\n | React.DragEvent<HTMLDivElement>,\n files: UploadedFile[],\n ) => void;\n};\n\nconst fileInputContext = createContext<FileInputContext | null>(null);\n\nexport const useFileInputContext = (): FileInputContext | null =>\n useContext(fileInputContext);\n\nexport interface FileInputContextProviderProps extends WithChildren {\n context: FileInputContext;\n}\n\nexport const FileInputContextProvider: React.FC<\n FileInputContextProviderProps\n> = ({ context, children }) => (\n <fileInputContext.Provider value={context}>\n {children}\n </fileInputContext.Provider>\n);\n"],"names":["fileInputContext","createContext","context","children","jsx","Provider","value","useContext"],"mappings":"wIAgBMA,EAAmBC,EAAAA,cAAuC,uCAW5D,EAAGC,QAAAA,EAASC,SAAAA,KACZC,EAAAA,IAACJ,EAAiBK,SAAjB,CAA0BC,MAAOJ,EAC7BC,SAAAA,gCAX0B,IAC/BI,EAAAA,WAAWP"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { WithChildren } from '../../../
|
|
2
|
+
import { WithChildren } from '../../../utilities/types.cjs';
|
|
3
3
|
import { UploadedFile } from '../types.cjs';
|
|
4
4
|
type FileInputContext = {
|
|
5
5
|
accept?: "image/*" | ".pdf" | "image/*,.pdf" | HTMLInputElement["accept"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React, CSSProperties } from 'react';
|
|
2
|
-
import { WithChildren } from '../../../../
|
|
2
|
+
import { WithChildren } from '../../../../utilities/types.cjs';
|
|
3
3
|
interface IconsExampleGridProps extends WithChildren {
|
|
4
4
|
columns: "two" | "four";
|
|
5
5
|
style?: CSSProperties;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { InputProps } from './types.cjs';
|
|
3
|
-
export declare const InputGroup: React.ForwardRefExoticComponent<import('../../
|
|
3
|
+
export declare const InputGroup: React.ForwardRefExoticComponent<import('../../utilities/types.js').WithOptionalChildren & import('../../utilities/types.js').DataTestAutoId & {
|
|
4
4
|
id?: string;
|
|
5
5
|
className?: string;
|
|
6
6
|
"data-testid"?: string;
|
|
7
|
-
"data-size"?: import('../../
|
|
7
|
+
"data-size"?: import('../../utilities/types.js').Size;
|
|
8
8
|
errorLabel?: React.ReactNode;
|
|
9
9
|
helpLabel?: React.ReactNode;
|
|
10
10
|
inline?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSProperties, FieldsetHTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import { DataTestAutoId, Size, WithChildren, WithOptionalChildren } from '../../
|
|
2
|
+
import { DataTestAutoId, Size, WithChildren, WithOptionalChildren } from '../../utilities/types.cjs';
|
|
3
3
|
export interface FieldGroupProps extends DataTestAutoId, FieldsetHTMLAttributes<HTMLFieldSetElement> {
|
|
4
4
|
legend: string;
|
|
5
5
|
labelProps?: Omit<LabelProps, "children">;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("../../../clsx-E3yX_9sL.cjs"),n=require("react"),s=n.forwardRef(function(s,
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("../../../clsx-E3yX_9sL.cjs"),n=require("react"),s=n.forwardRef(function(s,t){const{external:a=!1,className:i="",children:l,as:c="a",...d}=s,o="string"==typeof c&&"a"!==c?"a":c,k=n.useId();return e.jsxs(o,{ref:t,className:r.clsx("jkl-link",i,{"jkl-link--external":a}),"aria-describedby":a?k:void 0,...d,children:[e.jsx("span",{className:"jkl-link__content",children:l}),(a||"_blank"===d.target)&&e.jsx("span",{hidden:!0,id:k,children:"Ekstern lenke"})]})});exports.Link=s;
|
|
2
2
|
//# sourceMappingURL=Link.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.cjs","sources":["../../../../src/components/link/Link.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport React, { useId } from \"react\";\nimport type { PolymorphicRef } from \"../../utilities/polymorphism/polymorphism.js\";\nimport type { LinkProps } from \"./types.js\";\n\ntype LinkComponent = <ElementType extends
|
|
1
|
+
{"version":3,"file":"Link.cjs","sources":["../../../../src/components/link/Link.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport React, { useId } from \"react\";\nimport type { PolymorphicRef } from \"../../utilities/polymorphism/polymorphism.js\";\nimport type { LinkElementType, LinkProps } from \"./types.js\";\n\ntype LinkComponent = <ElementType extends LinkElementType = \"a\">(\n props: LinkProps<ElementType>,\n) => React.ReactElement | null;\n\nexport const Link = React.forwardRef(function Link<\n ElementType extends LinkElementType = \"a\",\n>(props: LinkProps<ElementType>, ref?: PolymorphicRef<ElementType>) {\n const {\n external = false,\n className = \"\",\n children,\n as = \"a\",\n ...rest\n } = props;\n const Component = typeof as === \"string\" && as !== \"a\" ? \"a\" : as;\n\n const srId = useId();\n\n return (\n <Component\n ref={ref}\n className={clsx(\"jkl-link\", className, {\n \"jkl-link--external\": external,\n })}\n aria-describedby={external ? srId : undefined}\n {...rest}\n >\n <span className=\"jkl-link__content\">{children}</span>\n {(external || rest.target === \"_blank\") && (\n <span hidden={true} id={srId}>\n Ekstern lenke\n </span>\n )}\n </Component>\n );\n}) as LinkComponent;\n"],"names":["Link","React","forwardRef","props","ref","external","className","children","as","rest","Component","srId","useId","jsxs","clsx","jsx","target","hidden","id"],"mappings":"gLASaA,EAAOC,EAAMC,WAAW,SAEnCC,EAA+BC,GAC7B,MACIC,SAAAA,GAAW,EACXC,UAAAA,EAAY,GACZC,SAAAA,EACAC,GAAAA,EAAK,OACFC,GACHN,EACEO,EAA0B,iBAAPF,GAA0B,MAAPA,EAAa,IAAMA,EAEzDG,EAAOC,EAAAA,QAEb,OACIC,EAAAA,KAACH,EAAA,CACGN,IAAAA,EACAE,UAAWQ,EAAAA,KAAK,WAAYR,EAAW,CACnC,qBAAsBD,IAE1B,mBAAkBA,EAAWM,OAAO,KAChCF,EAEJF,SAAA,CAAAQ,EAAAA,IAAC,OAAA,CAAKT,UAAU,oBAAqBC,SAAAA,KACnCF,GAA4B,WAAhBI,EAAKO,SACfD,EAAAA,IAAC,QAAKE,QAAQ,EAAMC,GAAIP,EAAMJ,SAAA,oBAM9C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { LinkProps } from './types.cjs';
|
|
3
|
-
type LinkComponent = <ElementType extends
|
|
2
|
+
import { LinkElementType, LinkProps } from './types.cjs';
|
|
3
|
+
type LinkComponent = <ElementType extends LinkElementType = "a">(props: LinkProps<ElementType>) => React.ReactElement | null;
|
|
4
4
|
export declare const Link: LinkComponent;
|
|
5
5
|
export {};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { PolymorphicPropsWithRef } from '../../utilities/polymorphism/polymorphism.cjs';
|
|
2
|
-
|
|
2
|
+
type LinkComponentElementType = Exclude<React.ElementType, keyof React.JSX.IntrinsicElements>;
|
|
3
|
+
export type LinkElementType = "a" | LinkComponentElementType;
|
|
4
|
+
export type LinkProps<ElementType extends LinkElementType = "a"> = PolymorphicPropsWithRef<ElementType, {
|
|
3
5
|
external?: boolean;
|
|
4
6
|
}>;
|
|
7
|
+
export {};
|
|
@@ -2,5 +2,5 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { LinkListProps } from './types.cjs';
|
|
3
3
|
export declare const LinkList: {
|
|
4
4
|
({ label, hideLabel, className, ...rest }: LinkListProps): React.JSX.Element;
|
|
5
|
-
Link: React.ForwardRefExoticComponent<Omit<import('../../index.js').PolymorphicPropsWithRef<React.ElementType<any, keyof React.JSX.IntrinsicElements>>, "ref"> & React.RefAttributes<unknown>>;
|
|
5
|
+
Link: React.ForwardRefExoticComponent<Omit<import('../../utilities/index.js').PolymorphicPropsWithRef<React.ElementType<any, keyof React.JSX.IntrinsicElements>>, "ref"> & React.RefAttributes<unknown>>;
|
|
6
6
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.cjs","sources":["../../../../src/components/list/ListItem.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { type FC } from \"react\";\nimport type { WithChildren } from \"../../
|
|
1
|
+
{"version":3,"file":"ListItem.cjs","sources":["../../../../src/components/list/ListItem.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { type FC } from \"react\";\nimport type { WithChildren } from \"../../utilities/types.js\";\n\nexport interface ListItemProps extends WithChildren {\n className?: string;\n}\n\ntype ValidListItems = \"normal\" | \"check\" | \"cross\";\n\nfunction makeListItem(listItemType: ValidListItems): FC<ListItemProps> {\n const ListItem: FC<ListItemProps> = ({ className, children, ...rest }) => {\n return (\n <li\n className={clsx(\"jkl-list__item\", className, {\n \"jkl-list__item--iconed\": listItemType !== \"normal\",\n \"jkl-list__item--check\": listItemType === \"check\",\n \"jkl-list__item--cross\": listItemType === \"cross\",\n })}\n data-testid=\"jkl-list-item\"\n {...rest}\n >\n {children}\n </li>\n );\n };\n return ListItem;\n}\n\nexport const ListItem = makeListItem(\"normal\");\nListItem.displayName = \"ListItem\";\nexport const CrossListItem = makeListItem(\"cross\");\nCrossListItem.displayName = \"CrossListItem\";\nexport const CheckListItem = makeListItem(\"check\");\nCheckListItem.displayName = \"CheckListItem\";\n"],"names":["makeListItem","listItemType","className","children","rest","jsx","clsx","ListItem","displayName","CrossListItem","CheckListItem"],"mappings":"6JAUA,SAASA,EAAaC,GAgBlB,MAfoC,EAAGC,UAAAA,EAAWC,SAAAA,KAAaC,KAEvDC,EAAAA,IAAC,KAAA,CACGH,UAAWI,EAAAA,KAAK,iBAAkBJ,EAAW,CACzC,yBAA2C,WAAjBD,EAC1B,wBAA0C,UAAjBA,EACzB,wBAA0C,UAAjBA,IAE7B,cAAY,mBACRG,EAEHD,SAAAA,GAKjB,kBAEO,MAAMI,EAAWP,EAAa,UACrCO,EAASC,YAAc,WAChB,MAAMC,EAAgBT,EAAa,SAC1CS,EAAcD,YAAc,gBACrB,MAAME,EAAgBV,EAAa,SAC1CU,EAAcF,YAAc"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Placement } from '@floating-ui/react';
|
|
2
2
|
import { ButtonHTMLAttributes, HTMLAttributes, ReactNode } from 'react';
|
|
3
|
-
import { DataTestAutoId, WithChildren } from '../../core/types.cjs';
|
|
4
3
|
import { SwipeChangeHandler } from '../../hooks/useSwipeGesture/useSwipeGesture.cjs';
|
|
5
4
|
import { PolymorphicPropsWithRef } from '../../utilities/polymorphism/polymorphism.cjs';
|
|
5
|
+
import { DataTestAutoId, WithChildren } from '../../utilities/types.cjs';
|
|
6
6
|
export interface MenuProps extends DataTestAutoId, WithChildren, Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> {
|
|
7
7
|
className?: string;
|
|
8
8
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),e=require("../../../clsx-E3yX_9sL.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),e=require("../../../clsx-E3yX_9sL.cjs"),s=require("react"),l=require("../icon-button/IconButton.cjs"),o=require("../icon/icons/CloseIcon.cjs"),r=s.forwardRef(({className:s,...l},o)=>a.jsx("div",{className:e.clsx("jkl-modal-container",s),...l,ref:o,"data-portal":!0}));r.displayName="ModalContainer";const d=s.forwardRef(({className:s,transparent:l,...o},r)=>a.jsx("div",{className:e.clsx("jkl-modal-overlay",s,{"jkl-modal-overlay--transparent":l}),...o,ref:r}));d.displayName="ModalOverlay";const t=s.forwardRef(({className:s,component:l,padding:o,style:r,...d},t)=>{const c=l||"div";return a.jsx(c,{className:e.clsx("jkl jkl-modal",s),style:{"--jkl-modal-padding":o?`var(--jkl-spacing-${o})`:void 0,...r},...d,ref:t})});t.displayName="Modal";const c=s.forwardRef(({className:s,...l},o)=>a.jsx("div",{className:e.clsx("jkl-modal-header",s),...l,ref:o}));c.displayName="ModalHeader";const n=s.forwardRef(({className:s,...l},o)=>a.jsx("p",{className:e.clsx("jkl-modal-title",s),...l,ref:o}));n.displayName="ModalTitle";const i=s.forwardRef(({className:s,...r},d)=>a.jsx(l.IconButton,{className:e.clsx("jkl-modal-close",s),"data-testautoid":"jkl-modal-close",...r,ref:d,children:a.jsx(o.CloseIcon,{variant:"medium"})}));i.displayName="ModalCloseButton";const m=s.forwardRef(({className:s,...l},o)=>a.jsx("div",{className:e.clsx("jkl-modal-body",s),...l,ref:o}));m.displayName="ModalBody";const x=s.forwardRef(({className:s,...l},o)=>a.jsx("div",{className:e.clsx("jkl-modal-actions",s),...l,ref:o}));x.displayName="ModalActions",exports.Modal=t,exports.ModalActions=x,exports.ModalBody=m,exports.ModalCloseButton=i,exports.ModalContainer=r,exports.ModalHeader=c,exports.ModalOverlay=d,exports.ModalTitle=n;
|
|
2
2
|
//# sourceMappingURL=Modal.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.cjs","sources":["../../../../src/components/modal/Modal.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { forwardRef } from \"react\";\nimport { IconButton } from \"../icon-button/IconButton.js\";\nimport type { IconButtonProps } from \"../icon-button/types.js\";\nimport { CloseIcon } from \"../icon/icons/CloseIcon.js\";\nimport type {\n BaseModalProps,\n ModalConfig,\n
|
|
1
|
+
{"version":3,"file":"Modal.cjs","sources":["../../../../src/components/modal/Modal.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React, { forwardRef } from \"react\";\nimport { IconButton } from \"../icon-button/IconButton.js\";\nimport type { IconButtonProps } from \"../icon-button/types.js\";\nimport { CloseIcon } from \"../icon/icons/CloseIcon.js\";\nimport type {\n BaseModalProps,\n ModalConfig,\n ModalOverlayProps,\n ModalProps,\n} from \"./types.js\";\n\n/**\n * Ment å brukes med `useModal`.\n */\nexport const ModalContainer = forwardRef<\n HTMLDivElement,\n ModalConfig[\"container\"] & BaseModalProps\n>(({ className, ...rest }, ref) => {\n // TODO: 'data-portal' fjernes når modalen tar i bruk Popover komponenten. Issue: https://github.com/fremtind/jokul/issues/4356\n return (\n <div\n className={clsx(\"jkl-modal-container\", className)}\n {...rest}\n ref={ref}\n data-portal\n />\n );\n});\nModalContainer.displayName = \"ModalContainer\";\n\n/**\n * Ment å brukes med `useModal`.\n */\nexport const ModalOverlay = forwardRef<HTMLDivElement, ModalOverlayProps>(\n ({ className, transparent, ...rest }, ref) => (\n <div\n className={clsx(\"jkl-modal-overlay\", className, {\n \"jkl-modal-overlay--transparent\": transparent,\n })}\n {...rest}\n ref={ref}\n />\n ),\n);\nModalOverlay.displayName = \"ModalOverlay\";\n\n/**\n * Ment å brukes med `useModal`.\n */\nexport const Modal = forwardRef<HTMLElement, ModalConfig[\"modal\"] & ModalProps>(\n ({ className, component, padding, style, ...rest }, ref) => {\n const C = component || \"div\";\n return (\n <C\n className={clsx(\"jkl jkl-modal\", className)}\n style={\n {\n \"--jkl-modal-padding\": padding\n ? `var(--jkl-spacing-${padding})`\n : undefined,\n ...style,\n } as React.CSSProperties\n }\n {...rest}\n ref={ref}\n />\n );\n },\n);\nModal.displayName = \"Modal\";\n\n/**\n * Ment å brukes med `useModal`.\n */\nexport const ModalHeader = forwardRef<HTMLDivElement, BaseModalProps>(\n ({ className, ...rest }, ref) => (\n <div\n className={clsx(\"jkl-modal-header\", className)}\n {...rest}\n ref={ref}\n />\n ),\n);\nModalHeader.displayName = \"ModalHeader\";\n\n/**\n * Ment å brukes med `useModal`.\n */\nexport const ModalTitle = forwardRef<\n HTMLParagraphElement,\n ModalConfig[\"title\"] & BaseModalProps\n>(({ className, ...rest }, ref) => (\n <p className={clsx(\"jkl-modal-title\", className)} {...rest} ref={ref} />\n));\nModalTitle.displayName = \"ModalTitle\";\n\n/**\n * Ment å brukes med `useModal`.\n */\nexport const ModalCloseButton = forwardRef<\n HTMLButtonElement,\n Omit<ModalConfig[\"closeButton\"], \"onClick\"> &\n BaseModalProps &\n IconButtonProps\n>(({ className, ...rest }, ref) => (\n <IconButton\n className={clsx(\"jkl-modal-close\", className)}\n data-testautoid=\"jkl-modal-close\"\n {...rest}\n ref={ref}\n >\n <CloseIcon variant=\"medium\" />\n </IconButton>\n));\nModalCloseButton.displayName = \"ModalCloseButton\";\n\n/**\n * Ment å brukes med `useModal`.\n */\nexport const ModalBody = forwardRef<HTMLDivElement, BaseModalProps>(\n ({ className, ...rest }, ref) => (\n <div\n className={clsx(\"jkl-modal-body\", className)}\n {...rest}\n ref={ref}\n />\n ),\n);\nModalBody.displayName = \"ModalBody\";\n\n/**\n * Ment å brukes med `useModal`.\n */\nexport const ModalActions = forwardRef<HTMLDivElement, BaseModalProps>(\n ({ className, ...rest }, ref) => (\n <div\n className={clsx(\"jkl-modal-actions\", className)}\n {...rest}\n ref={ref}\n />\n ),\n);\nModalActions.displayName = \"ModalActions\";\n"],"names":["ModalContainer","forwardRef","className","rest","ref","jsx","clsx","displayName","ModalOverlay","transparent","Modal","component","padding","style","C","ModalHeader","ModalTitle","ModalCloseButton","IconButton","children","CloseIcon","variant","ModalBody","ModalActions"],"mappings":"oQAeaA,EAAiBC,EAAAA,WAG5B,EAAGC,UAAAA,KAAcC,GAAQC,IAGnBC,EAAAA,IAAC,MAAA,CACGH,UAAWI,EAAAA,KAAK,sBAAuBJ,MACnCC,EACJC,IAAAA,EACA,eAAW,KAIvBJ,EAAeO,YAAc,iBAKtB,MAAMC,EAAeP,EAAAA,WACxB,EAAGC,UAAAA,EAAWO,YAAAA,KAAgBN,GAAQC,IAClCC,EAAAA,IAAC,MAAA,CACGH,UAAWI,EAAAA,KAAK,oBAAqBJ,EAAW,CAC5C,iCAAkCO,OAElCN,EACJC,IAAAA,KAIZI,EAAaD,YAAc,eAKpB,MAAMG,EAAQT,EAAAA,WACjB,EAAGC,UAAAA,EAAWS,UAAAA,EAAWC,QAAAA,EAASC,MAAAA,KAAUV,GAAQC,KAChD,MAAMU,EAAIH,GAAa,MACvB,OACIN,EAAAA,IAACS,EAAA,CACGZ,UAAWI,EAAAA,KAAK,gBAAiBJ,GACjCW,MACI,CACI,sBAAuBD,EACjB,qBAAqBA,UACrB,KACHC,MAGPV,EACJC,IAAAA,MAKhBM,EAAMH,YAAc,QAKb,MAAMQ,EAAcd,EAAAA,WACvB,EAAGC,UAAAA,KAAcC,GAAQC,IACrBC,EAAAA,IAAC,MAAA,CACGH,UAAWI,EAAAA,KAAK,mBAAoBJ,MAChCC,EACJC,IAAAA,KAIZW,EAAYR,YAAc,cAKnB,MAAMS,EAAaf,EAAAA,WAGxB,EAAGC,UAAAA,KAAcC,GAAQC,UACtB,IAAA,CAAEF,UAAWI,EAAAA,KAAK,kBAAmBJ,MAAgBC,EAAMC,IAAAA,KAEhEY,EAAWT,YAAc,aAKlB,MAAMU,EAAmBhB,EAAAA,WAK9B,EAAGC,UAAAA,KAAcC,GAAQC,IACvBC,EAAAA,IAACa,EAAAA,WAAA,CACGhB,UAAWI,EAAAA,KAAK,kBAAmBJ,GACnC,kBAAgB,qBACZC,EACJC,IAAAA,EAEAe,SAAAd,EAAAA,IAACe,EAAAA,UAAA,CAAUC,QAAQ,cAG3BJ,EAAiBV,YAAc,mBAKxB,MAAMe,EAAYrB,EAAAA,WACrB,EAAGC,UAAAA,KAAcC,GAAQC,IACrBC,EAAAA,IAAC,MAAA,CACGH,UAAWI,EAAAA,KAAK,iBAAkBJ,MAC9BC,EACJC,IAAAA,KAIZkB,EAAUf,YAAc,YAKjB,MAAMgB,EAAetB,EAAAA,WACxB,EAAGC,UAAAA,KAAcC,GAAQC,IACrBC,EAAAA,IAAC,MAAA,CACGH,UAAWI,EAAAA,KAAK,oBAAqBJ,MACjCC,EACJC,IAAAA,KAIZmB,EAAahB,YAAc"}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { IconButtonProps } from '../icon-button/types.cjs';
|
|
3
|
-
import { BaseModalProps,
|
|
3
|
+
import { BaseModalProps, ModalProps } from './types.cjs';
|
|
4
4
|
/**
|
|
5
5
|
* Ment å brukes med `useModal`.
|
|
6
6
|
*/
|
|
7
|
-
export declare const ModalContainer: React.ForwardRefExoticComponent<Omit<
|
|
7
|
+
export declare const ModalContainer: React.ForwardRefExoticComponent<Omit<{
|
|
8
|
+
id: string;
|
|
9
|
+
ref: (node: React.ReactNode | HTMLElement) => void;
|
|
10
|
+
role: string;
|
|
11
|
+
'aria-modal': boolean;
|
|
12
|
+
'aria-hidden': boolean;
|
|
13
|
+
'aria-labelledby': string;
|
|
14
|
+
} & BaseModalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
15
|
/**
|
|
9
16
|
* Ment å brukes med `useModal`.
|
|
10
17
|
*/
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { ModalContainer, ModalOverlay, Modal, ModalHeader, ModalTitle, ModalCloseButton, ModalBody, ModalActions, } from './Modal.cjs';
|
|
2
2
|
export { useModal, type ModalInstance } from './useModal.cjs';
|
|
3
|
-
export type { ModalProps, BaseModalProps,
|
|
3
|
+
export type { ModalProps, BaseModalProps, ModalOverlayProps, UseModalOptions, ModalConfig, } from './types.cjs';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { A11yDialogConfig, A11yDialogProps } from 'react-a11y-dialog';
|
|
2
|
-
import { WithOptionalChildren } from '../../
|
|
3
|
-
export type ModalPlacement = "center" | "left" | "bottom" | "right";
|
|
2
|
+
import { WithOptionalChildren } from '../../utilities/types.cjs';
|
|
4
3
|
export interface UseModalOptions extends Omit<A11yDialogProps, "id" | "closeButtonPosition"> {
|
|
5
4
|
id?: string;
|
|
6
5
|
/**
|
|
@@ -35,26 +34,9 @@ export interface ModalProps extends WithOptionalChildren {
|
|
|
35
34
|
padding?: 16 | 24 | 40;
|
|
36
35
|
}
|
|
37
36
|
export type BaseModalProps = Omit<ModalProps, "padding" | "component">;
|
|
38
|
-
export type ModalContainerProps = ModalConfig["container"] & BaseModalProps & {
|
|
39
|
-
/**
|
|
40
|
-
* Plassering og animasjon styres av containeren, siden det er den som
|
|
41
|
-
* håndterer viewport-layout og `aria-hidden`-tilstand.
|
|
42
|
-
*
|
|
43
|
-
* @default "center"
|
|
44
|
-
*/
|
|
45
|
-
placement?: ModalPlacement;
|
|
46
|
-
/**
|
|
47
|
-
* Slå på enkel slide-in-animasjon når modalen vises.
|
|
48
|
-
*
|
|
49
|
-
* @default false
|
|
50
|
-
*/
|
|
51
|
-
slideIn?: boolean;
|
|
52
|
-
};
|
|
53
37
|
export type ModalOverlayProps = ModalConfig["overlay"] & BaseModalProps & {
|
|
54
38
|
/**
|
|
55
39
|
* Rendre uten bakgrunnsfarge, men med click target for å lukke modalen ved klikk utenfor.
|
|
56
|
-
*
|
|
57
|
-
* @default false
|
|
58
40
|
*/
|
|
59
41
|
transparent?: boolean;
|
|
60
42
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./NavLink.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./NavLink.cjs"),i=require("../beta/nav-link/NavLink.cjs");exports.NavLink=e.NavLink,exports.BETA_NavLink=i.NavLink;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { NavLink } from './NavLink.cjs';
|
|
2
2
|
export type { NavLinkProps } from './types.cjs';
|
|
3
|
-
export { NavLink as BETA_NavLink } from '
|
|
4
|
-
export type { NavLinkProps as BETA_NavLinkProps } from '
|
|
3
|
+
export { NavLink as BETA_NavLink } from '../beta/nav-link/NavLink.jsx';
|
|
4
|
+
export type { NavLinkProps as BETA_NavLinkProps } from '../beta/nav-link/types.cjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radioGroupContext.cjs","sources":["../../../../src/components/radio-button/radioGroupContext.tsx"],"sourcesContent":["import React, {\n createContext,\n useContext,\n type ChangeEventHandler,\n} from \"react\";\nimport type { WithChildren } from \"../../
|
|
1
|
+
{"version":3,"file":"radioGroupContext.cjs","sources":["../../../../src/components/radio-button/radioGroupContext.tsx"],"sourcesContent":["import React, {\n createContext,\n useContext,\n type ChangeEventHandler,\n} from \"react\";\nimport type { WithChildren } from \"../../utilities/types.js\";\n\ntype RadioGroupContext = {\n name: string | undefined;\n value: string | undefined;\n inline: boolean;\n invalid: boolean;\n onChange: ChangeEventHandler<HTMLInputElement> | undefined;\n};\n\nconst radioGroupContext = createContext<RadioGroupContext>({\n name: undefined,\n value: undefined,\n onChange: () => {\n return;\n },\n inline: false,\n invalid: false,\n});\n\nexport const useRadioGroupContext = (): RadioGroupContext =>\n useContext(radioGroupContext);\n\ninterface Props extends WithChildren {\n state: RadioGroupContext;\n}\n\nexport const RadioGroupContextProvider: React.FC<Props> = ({\n state,\n children,\n}) => (\n <radioGroupContext.Provider value={state}>\n {children}\n </radioGroupContext.Provider>\n);\n"],"names":["radioGroupContext","createContext","name","value","onChange","inline","invalid","state","children","Provider","useContext"],"mappings":"wIAeMA,EAAoBC,EAAAA,cAAiC,CACvDC,UAAM,EACNC,WAAO,EACPC,SAAU,OAGVC,QAAQ,EACRC,SAAS,sCAU6C,EACtDC,MAAAA,EACAC,SAAAA,WAECR,EAAkBS,SAAlB,CAA2BN,MAAOI,EAC9BC,SAAAA,iCAZ2B,IAChCE,EAAAA,WAAWV"}
|