@norges-domstoler/dds-components 4.0.2 → 4.2.0
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/dist/_virtual/_rollupPluginBabelHelpers.js +101 -0
- package/dist/assets/svg/bullets/jordskifterett_bullet1.svg.js +4 -0
- package/dist/assets/svg/bullets/lagmannsrett_bullet2.svg.js +4 -0
- package/dist/assets/svg/bullets/tingrett_bullet3.svg.js +4 -0
- package/dist/assets/svg/calendar_today.svg.js +4 -0
- package/dist/{index.css → bundle.css} +0 -0
- package/dist/{index.es.css → cjs/bundle.css} +0 -0
- package/dist/cjs/components/Breadcrumbs/Breadcrumb.d.ts +3 -0
- package/dist/cjs/components/Breadcrumbs/Breadcrumb.tokens.d.ts +10 -0
- package/dist/cjs/components/Breadcrumbs/Breadcrumbs.d.ts +14 -0
- package/dist/cjs/components/Breadcrumbs/Breadcrumbs.stories.d.ts +23 -0
- package/dist/cjs/components/Breadcrumbs/index.d.ts +2 -0
- package/dist/cjs/components/Button/Button.d.ts +20 -0
- package/dist/cjs/components/Button/Button.stories.d.ts +63 -0
- package/dist/cjs/components/Button/Button.styles.d.ts +24 -0
- package/dist/cjs/components/Button/Button.tokens.d.ts +203 -0
- package/dist/cjs/components/Button/Button.types.d.ts +32 -0
- package/dist/cjs/components/Button/index.d.ts +2 -0
- package/dist/cjs/components/Card/Card.d.ts +23 -0
- package/dist/cjs/components/Card/Card.stories.d.ts +11 -0
- package/dist/cjs/components/Card/Card.tokens.d.ts +26 -0
- package/dist/cjs/components/Card/CardAccordion/CardAccordion.d.ts +14 -0
- package/dist/cjs/components/Card/CardAccordion/CardAccordionBody.d.ts +23 -0
- package/dist/cjs/components/Card/CardAccordion/CardAccordionBody.tokens.d.ts +4 -0
- package/dist/cjs/components/Card/CardAccordion/CardAccordionHeader.d.ts +22 -0
- package/dist/cjs/components/Card/CardAccordion/CardAccordionHeader.tokens.d.ts +17 -0
- package/dist/cjs/components/Card/index.d.ts +4 -0
- package/dist/cjs/components/Checkbox/Checkbox.d.ts +19 -0
- package/dist/cjs/components/Checkbox/Checkbox.stories.d.ts +58 -0
- package/dist/cjs/components/Checkbox/Checkbox.styles.d.ts +9 -0
- package/dist/cjs/components/Checkbox/Checkbox.tokens.d.ts +65 -0
- package/dist/cjs/components/Checkbox/Checkbox.types.d.ts +16 -0
- package/dist/cjs/components/Checkbox/CheckboxGroup.d.ts +18 -0
- package/dist/cjs/components/Checkbox/CheckboxGroup.stories.d.ts +46 -0
- package/dist/cjs/components/Checkbox/CheckboxGroup.tokens.d.ts +19 -0
- package/dist/cjs/components/Checkbox/CheckboxGroupContext.d.ts +9 -0
- package/dist/cjs/components/Checkbox/index.d.ts +3 -0
- package/dist/cjs/components/Chip/Chip.d.ts +16 -0
- package/dist/cjs/components/Chip/Chip.stories.d.ts +20 -0
- package/dist/cjs/components/Chip/Chip.tokens.d.ts +12 -0
- package/dist/cjs/components/Chip/ChipGroup.d.ts +3 -0
- package/dist/cjs/components/Chip/ChipGroup.stories.d.ts +8 -0
- package/dist/cjs/components/Chip/index.d.ts +2 -0
- package/dist/cjs/components/Datepicker/Datepicker.d.ts +10 -0
- package/dist/cjs/components/Datepicker/Datepicker.stories.d.ts +55 -0
- package/dist/cjs/components/Datepicker/Datepicker.tokens.d.ts +9 -0
- package/dist/cjs/components/Datepicker/index.d.ts +1 -0
- package/dist/cjs/components/DescriptionList/DescriptionList.d.ts +15 -0
- package/dist/cjs/components/DescriptionList/DescriptionList.stories.d.ts +18 -0
- package/dist/cjs/components/DescriptionList/DescriptionListDesc.d.ts +16 -0
- package/dist/cjs/components/DescriptionList/DescriptionListDesc.tokens.d.ts +7 -0
- package/dist/cjs/components/DescriptionList/DescriptionListGroup.d.ts +15 -0
- package/dist/cjs/components/DescriptionList/DescriptionListGroup.tokens.d.ts +4 -0
- package/dist/cjs/components/DescriptionList/DescriptionListTerm.d.ts +3 -0
- package/dist/cjs/components/DescriptionList/DescriptionListTerm.tokens.d.ts +13 -0
- package/dist/cjs/components/DescriptionList/index.d.ts +4 -0
- package/dist/cjs/components/Divider/Divider.d.ts +13 -0
- package/dist/cjs/components/Divider/Divider.stories.d.ts +15 -0
- package/dist/cjs/components/Divider/Divider.tokens.d.ts +8 -0
- package/dist/cjs/components/Divider/index.d.ts +1 -0
- package/dist/cjs/components/Drawer/Drawer.d.ts +50 -0
- package/dist/cjs/components/Drawer/Drawer.stories.d.ts +24 -0
- package/dist/cjs/components/Drawer/Drawer.tokens.d.ts +17 -0
- package/dist/cjs/components/Drawer/DrawerGroup.d.ts +13 -0
- package/dist/cjs/components/Drawer/index.d.ts +2 -0
- package/dist/cjs/components/GlobalMessage/GlobalMessage.d.ts +27 -0
- package/dist/cjs/components/GlobalMessage/GlobalMessage.stories.d.ts +31 -0
- package/dist/cjs/components/GlobalMessage/GlobalMessage.tokens.d.ts +53 -0
- package/dist/cjs/components/GlobalMessage/index.d.ts +1 -0
- package/dist/cjs/components/IconWrapper/IconWrapper.d.ts +19 -0
- package/dist/cjs/components/IconWrapper/IconWrapper.stories.d.ts +22 -0
- package/dist/cjs/components/IconWrapper/index.d.ts +1 -0
- package/dist/cjs/components/InputMessage/InputMessage.d.ts +17 -0
- package/dist/cjs/components/InputMessage/InputMessage.stories.d.ts +21 -0
- package/dist/cjs/components/InputMessage/InputMessage.tokens.d.ts +14 -0
- package/dist/cjs/components/InputMessage/index.d.ts +1 -0
- package/dist/cjs/components/InternalHeader/InternalHeader.d.ts +3 -0
- package/dist/cjs/components/InternalHeader/InternalHeader.stories.d.ts +40 -0
- package/dist/cjs/components/InternalHeader/InternalHeader.styles.d.ts +30 -0
- package/dist/cjs/components/InternalHeader/InternalHeader.tokens.d.ts +40 -0
- package/dist/cjs/components/InternalHeader/InternalHeader.types.d.ts +35 -0
- package/dist/cjs/components/InternalHeader/InternalHeaderListItem.d.ts +3 -0
- package/dist/cjs/components/InternalHeader/NavigationItem.d.ts +14 -0
- package/dist/cjs/components/InternalHeader/index.d.ts +2 -0
- package/dist/cjs/components/List/List.d.ts +21 -0
- package/dist/cjs/components/List/List.stories.d.ts +18 -0
- package/dist/cjs/components/List/List.tokens.d.ts +16 -0
- package/dist/cjs/components/List/ListItem.d.ts +3 -0
- package/dist/cjs/components/List/ListItem.tokens.d.ts +5 -0
- package/dist/cjs/components/List/index.d.ts +2 -0
- package/dist/cjs/components/LocalMessage/LocalMessage.d.ts +37 -0
- package/dist/cjs/components/LocalMessage/LocalMessage.stories.d.ts +39 -0
- package/dist/cjs/components/LocalMessage/LocalMessage.tokens.d.ts +100 -0
- package/dist/cjs/components/LocalMessage/index.d.ts +1 -0
- package/dist/cjs/components/Modal/Modal.d.ts +30 -0
- package/dist/cjs/components/Modal/Modal.stories.d.ts +28 -0
- package/dist/cjs/components/Modal/Modal.tokens.d.ts +19 -0
- package/dist/cjs/components/Modal/ModalActions.d.ts +3 -0
- package/dist/cjs/components/Modal/ModalBody.d.ts +14 -0
- package/dist/cjs/components/Modal/index.d.ts +3 -0
- package/dist/cjs/components/OverflowMenu/OverflowMenu.d.ts +23 -0
- package/dist/cjs/components/OverflowMenu/OverflowMenu.stories.d.ts +26 -0
- package/dist/cjs/components/OverflowMenu/OverflowMenu.tokens.d.ts +22 -0
- package/dist/cjs/components/OverflowMenu/OverflowMenu.types.d.ts +36 -0
- package/dist/cjs/components/OverflowMenu/OverflowMenuGroup.d.ts +14 -0
- package/dist/cjs/components/OverflowMenu/OverflowMenuItem.d.ts +24 -0
- package/dist/cjs/components/OverflowMenu/index.d.ts +3 -0
- package/dist/cjs/components/Pagination/Pagination.d.ts +52 -0
- package/dist/cjs/components/Pagination/Pagination.stories.d.ts +48 -0
- package/dist/cjs/components/Pagination/Pagination.tokens.d.ts +15 -0
- package/dist/cjs/components/Pagination/index.d.ts +1 -0
- package/dist/cjs/components/Pagination/paginationGenerator.d.ts +1 -0
- package/dist/cjs/components/Popover/Popover.d.ts +56 -0
- package/dist/cjs/components/Popover/Popover.stories.d.ts +54 -0
- package/dist/cjs/components/Popover/Popover.tokens.d.ts +15 -0
- package/dist/cjs/components/Popover/PopoverGroup.d.ts +14 -0
- package/dist/cjs/components/Popover/index.d.ts +2 -0
- package/dist/cjs/components/RadioButton/RadioButton.d.ts +16 -0
- package/dist/cjs/components/RadioButton/RadioButton.stories.d.ts +50 -0
- package/dist/cjs/components/RadioButton/RadioButton.styles.d.ts +9 -0
- package/dist/cjs/components/RadioButton/RadioButton.tokens.d.ts +43 -0
- package/dist/cjs/components/RadioButton/RadioButton.types.d.ts +12 -0
- package/dist/cjs/components/RadioButton/RadioButtonGroup.d.ts +29 -0
- package/dist/cjs/components/RadioButton/RadioButtonGroup.stories.d.ts +47 -0
- package/dist/cjs/components/RadioButton/RadioButtonGroup.tokens.d.ts +19 -0
- package/dist/cjs/components/RadioButton/RadioButtonGroupContext.d.ts +13 -0
- package/dist/cjs/components/RadioButton/index.d.ts +3 -0
- package/dist/cjs/components/Search/Search.d.ts +21 -0
- package/dist/cjs/components/Search/Search.stories.d.ts +29 -0
- package/dist/cjs/components/Search/Search.tokens.d.ts +25 -0
- package/dist/cjs/components/Search/index.d.ts +1 -0
- package/dist/cjs/components/Select/MultiSelect.stories.d.ts +74 -0
- package/dist/cjs/components/Select/Select.d.ts +32 -0
- package/dist/cjs/components/Select/Select.stories.d.ts +69 -0
- package/dist/cjs/components/Select/Select.styles.d.ts +19 -0
- package/dist/cjs/components/Select/Select.tokens.d.ts +144 -0
- package/dist/cjs/components/Select/index.d.ts +1 -0
- package/dist/cjs/components/SkipToContent/SkipToContent.d.ts +21 -0
- package/dist/cjs/components/SkipToContent/SkipToContent.stories.d.ts +33 -0
- package/dist/cjs/components/SkipToContent/SkipToContent.tokens.d.ts +19 -0
- package/dist/cjs/components/SkipToContent/index.d.ts +1 -0
- package/dist/cjs/components/Spinner/Spinner.d.ts +11 -0
- package/dist/cjs/components/Spinner/Spinner.stories.d.ts +21 -0
- package/dist/cjs/components/Spinner/Spinner.tokens.d.ts +6 -0
- package/dist/cjs/components/Spinner/index.d.ts +1 -0
- package/dist/cjs/components/Table/Body.d.ts +3 -0
- package/dist/cjs/components/Table/Cell.d.ts +10 -0
- package/dist/cjs/components/Table/Cell.tokens.d.ts +31 -0
- package/dist/cjs/components/Table/Foot.d.ts +3 -0
- package/dist/cjs/components/Table/Head.d.ts +3 -0
- package/dist/cjs/components/Table/Row.d.ts +23 -0
- package/dist/cjs/components/Table/Row.tokens.d.ts +32 -0
- package/dist/cjs/components/Table/SortCell.d.ts +19 -0
- package/dist/cjs/components/Table/Table.d.ts +14 -0
- package/dist/cjs/components/Table/Table.stories.d.ts +28 -0
- package/dist/cjs/components/Table/TableWrapper.d.ts +3 -0
- package/dist/cjs/components/Table/index.d.ts +8 -0
- package/dist/cjs/components/Table/tableData.d.ts +17 -0
- package/dist/cjs/components/Tabs/Tab.d.ts +37 -0
- package/dist/cjs/components/Tabs/TabList.d.ts +3 -0
- package/dist/cjs/components/Tabs/TabPanel.d.ts +14 -0
- package/dist/cjs/components/Tabs/TabPanels.d.ts +3 -0
- package/dist/cjs/components/Tabs/Tabs.context.d.ts +17 -0
- package/dist/cjs/components/Tabs/Tabs.d.ts +27 -0
- package/dist/cjs/components/Tabs/Tabs.stories.d.ts +10 -0
- package/dist/cjs/components/Tabs/Tabs.tokens.d.ts +38 -0
- package/dist/cjs/components/Tabs/index.d.ts +5 -0
- package/dist/cjs/components/Tag/Tag.d.ts +17 -0
- package/dist/cjs/components/Tag/Tag.stories.d.ts +19 -0
- package/dist/cjs/components/Tag/Tag.tokens.d.ts +26 -0
- package/dist/cjs/components/Tag/index.d.ts +1 -0
- package/dist/cjs/components/TextInput/CharCounter.d.ts +8 -0
- package/dist/cjs/components/TextInput/CharCounter.tokens.d.ts +4 -0
- package/dist/cjs/components/TextInput/TextInput.d.ts +10 -0
- package/dist/cjs/components/TextInput/TextInput.stories.d.ts +69 -0
- package/dist/cjs/components/TextInput/TextInput.styles.d.ts +10 -0
- package/dist/cjs/components/TextInput/TextInput.tokens.d.ts +54 -0
- package/dist/cjs/components/TextInput/TextInput.types.d.ts +8 -0
- package/dist/cjs/components/TextInput/index.d.ts +2 -0
- package/dist/cjs/components/ToggleButton/ToggleButton.d.ts +18 -0
- package/dist/cjs/components/ToggleButton/ToggleButton.stories.d.ts +14 -0
- package/dist/cjs/components/ToggleButton/ToggleButton.tokens.d.ts +22 -0
- package/dist/cjs/components/ToggleButton/ToggleButtonGroup.d.ts +13 -0
- package/dist/cjs/components/ToggleButton/ToggleButtonGroup.stories.d.ts +9 -0
- package/dist/cjs/components/ToggleButton/index.d.ts +2 -0
- package/dist/cjs/components/Tooltip/Tooltip.d.ts +32 -0
- package/dist/cjs/components/Tooltip/Tooltip.stories.d.ts +35 -0
- package/dist/cjs/components/Tooltip/Tooltip.styles.d.ts +8 -0
- package/dist/cjs/components/Tooltip/Tooltip.tokens.d.ts +14 -0
- package/dist/cjs/components/Tooltip/index.d.ts +1 -0
- package/dist/cjs/components/Typography/Body.stories.d.ts +11 -0
- package/dist/cjs/components/Typography/Examples.stories.d.ts +8 -0
- package/dist/cjs/components/Typography/Typography.d.ts +48 -0
- package/dist/cjs/components/Typography/Typography.stories.d.ts +63 -0
- package/dist/cjs/components/Typography/Typography.tokens.d.ts +230 -0
- package/dist/cjs/components/Typography/Typography.types.d.ts +13 -0
- package/dist/cjs/components/Typography/index.d.ts +2 -0
- package/dist/cjs/helpers/Backdrop/Backdrop.d.ts +5 -0
- package/dist/cjs/helpers/Backdrop/Backdrop.utils.d.ts +2 -0
- package/dist/cjs/helpers/Backdrop/index.d.ts +2 -0
- package/dist/cjs/helpers/Chevron/AnimatedChevronUpDown.d.ts +9 -0
- package/dist/cjs/helpers/Chevron/AnimatedChevronUpDown.styles.d.ts +7 -0
- package/dist/cjs/helpers/Chevron/index.d.ts +1 -0
- package/dist/cjs/helpers/Input/Input.styles.d.ts +15 -0
- package/dist/cjs/helpers/Input/Input.tokens.d.ts +78 -0
- package/dist/cjs/helpers/Input/Input.types.d.ts +20 -0
- package/dist/cjs/helpers/Input/index.d.ts +3 -0
- package/dist/cjs/helpers/Paper/Paper.d.ts +1 -0
- package/dist/cjs/helpers/Paper/Paper.tokens.d.ts +4 -0
- package/dist/cjs/helpers/Paper/index.d.ts +1 -0
- package/dist/cjs/helpers/RequiredMarker/RequiredMarker.d.ts +2 -0
- package/dist/cjs/helpers/RequiredMarker/index.d.ts +1 -0
- package/dist/cjs/helpers/index.d.ts +5 -0
- package/dist/cjs/helpers/styling/danger.d.ts +4 -0
- package/dist/cjs/helpers/styling/focus.d.ts +9 -0
- package/dist/cjs/helpers/styling/focusVisible.d.ts +37 -0
- package/dist/cjs/helpers/styling/hideInput.d.ts +7 -0
- package/dist/cjs/helpers/styling/hover.d.ts +14 -0
- package/dist/cjs/helpers/styling/index.d.ts +8 -0
- package/dist/cjs/helpers/styling/removeButtonStyling.d.ts +9 -0
- package/dist/cjs/helpers/styling/removeListStyling.d.ts +5 -0
- package/dist/cjs/helpers/styling/scrollbarStyling.d.ts +3 -0
- package/dist/cjs/helpers/styling/visibilityTransition.d.ts +1 -0
- package/dist/cjs/hooks/index.d.ts +9 -0
- package/dist/cjs/hooks/useCombinedRefs.d.ts +2 -0
- package/dist/cjs/hooks/useFloatPosition.d.ts +25 -0
- package/dist/cjs/hooks/useFocusTrap.d.ts +2 -0
- package/dist/cjs/hooks/useId.d.ts +1 -0
- package/dist/cjs/hooks/useMountTransition.d.ts +1 -0
- package/dist/cjs/hooks/useOnClickOutside.d.ts +1 -0
- package/dist/cjs/hooks/useOnKeyDown.d.ts +1 -0
- package/dist/cjs/hooks/useRoveFocus.d.ts +3 -0
- package/dist/cjs/hooks/useScreenSize.d.ts +8 -0
- package/dist/cjs/index.d.ts +34 -0
- package/dist/cjs/index.js +7987 -0
- package/dist/cjs/types/BaseComponentProps.d.ts +58 -0
- package/dist/cjs/types/Direction.d.ts +1 -0
- package/dist/cjs/types/index.d.ts +2 -0
- package/dist/cjs/types/utils.d.ts +8 -0
- package/dist/cjs/utils/color.d.ts +6 -0
- package/dist/cjs/utils/combineHandlers.d.ts +1 -0
- package/dist/cjs/utils/getScrollbarSize.d.ts +1 -0
- package/dist/cjs/utils/idGenerator.d.ts +3 -0
- package/dist/cjs/utils/index.d.ts +5 -0
- package/dist/cjs/utils/text.d.ts +2 -0
- package/dist/components/Breadcrumbs/Breadcrumb.js +34 -0
- package/dist/components/Breadcrumbs/Breadcrumb.tokens.js +22 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.js +62 -0
- package/dist/components/Button/Button.js +90 -0
- package/dist/components/Button/Button.styles.js +56 -0
- package/dist/components/Button/Button.tokens.js +463 -0
- package/dist/components/Card/Card.js +54 -0
- package/dist/components/Card/Card.tokens.js +60 -0
- package/dist/components/Card/CardAccordion/CardAccordion.js +63 -0
- package/dist/components/Card/CardAccordion/CardAccordionBody.js +73 -0
- package/dist/components/Card/CardAccordion/CardAccordionBody.tokens.js +12 -0
- package/dist/components/Card/CardAccordion/CardAccordionHeader.js +65 -0
- package/dist/components/Card/CardAccordion/CardAccordionHeader.tokens.js +38 -0
- package/dist/components/Checkbox/Checkbox.d.ts +6 -2
- package/dist/components/Checkbox/Checkbox.js +68 -0
- package/dist/components/Checkbox/Checkbox.stories.d.ts +6 -2
- package/dist/components/Checkbox/Checkbox.styles.js +45 -0
- package/dist/components/Checkbox/Checkbox.tokens.js +129 -0
- package/dist/components/Checkbox/Checkbox.types.d.ts +1 -1
- package/dist/components/Checkbox/CheckboxGroup.js +87 -0
- package/dist/components/Checkbox/CheckboxGroup.tokens.js +32 -0
- package/dist/components/Checkbox/CheckboxGroupContext.js +8 -0
- package/dist/components/Chip/Chip.js +57 -0
- package/dist/components/Chip/Chip.tokens.js +39 -0
- package/dist/components/Chip/ChipGroup.js +29 -0
- package/dist/components/Datepicker/Datepicker.js +91 -0
- package/dist/components/Datepicker/Datepicker.tokens.js +25 -0
- package/dist/components/DescriptionList/DescriptionList.js +34 -0
- package/dist/components/DescriptionList/DescriptionListDesc.js +36 -0
- package/dist/components/DescriptionList/DescriptionListDesc.tokens.js +19 -0
- package/dist/components/DescriptionList/DescriptionListGroup.js +33 -0
- package/dist/components/DescriptionList/DescriptionListGroup.tokens.js +11 -0
- package/dist/components/DescriptionList/DescriptionListTerm.js +22 -0
- package/dist/components/DescriptionList/DescriptionListTerm.tokens.js +27 -0
- package/dist/components/Divider/Divider.js +31 -0
- package/dist/components/Divider/Divider.tokens.js +20 -0
- package/dist/components/Drawer/Drawer.js +121 -0
- package/dist/components/Drawer/Drawer.tokens.js +34 -0
- package/dist/components/Drawer/DrawerGroup.js +61 -0
- package/dist/components/GlobalMessage/GlobalMessage.js +85 -0
- package/dist/components/GlobalMessage/GlobalMessage.tokens.js +83 -0
- package/dist/components/IconWrapper/IconWrapper.js +42 -0
- package/dist/components/InputMessage/InputMessage.js +46 -0
- package/dist/components/InputMessage/InputMessage.tokens.js +30 -0
- package/dist/components/InternalHeader/InternalHeader.js +122 -0
- package/dist/components/InternalHeader/InternalHeader.styles.js +49 -0
- package/dist/components/InternalHeader/InternalHeader.tokens.js +93 -0
- package/dist/components/InternalHeader/InternalHeaderListItem.js +22 -0
- package/dist/components/InternalHeader/NavigationItem.js +30 -0
- package/dist/components/List/List.js +48 -0
- package/dist/components/List/List.tokens.js +37 -0
- package/dist/components/List/ListItem.js +22 -0
- package/dist/components/List/ListItem.tokens.js +12 -0
- package/dist/components/LocalMessage/LocalMessage.js +124 -0
- package/dist/components/LocalMessage/LocalMessage.tokens.js +151 -0
- package/dist/components/Modal/Modal.js +122 -0
- package/dist/components/Modal/Modal.tokens.js +45 -0
- package/dist/components/Modal/ModalActions.js +23 -0
- package/dist/components/Modal/ModalBody.js +35 -0
- package/dist/components/OverflowMenu/OverflowMenu.js +164 -0
- package/dist/components/OverflowMenu/OverflowMenu.tokens.js +55 -0
- package/dist/components/OverflowMenu/OverflowMenuGroup.js +64 -0
- package/dist/components/OverflowMenu/OverflowMenuItem.js +116 -0
- package/dist/components/Pagination/Pagination.js +250 -0
- package/dist/components/Pagination/Pagination.tokens.js +23 -0
- package/dist/components/Pagination/paginationGenerator.js +42 -0
- package/dist/components/Popover/Popover.js +104 -0
- package/dist/components/Popover/Popover.tokens.js +38 -0
- package/dist/components/Popover/PopoverGroup.js +85 -0
- package/dist/components/RadioButton/RadioButton.js +90 -0
- package/dist/components/RadioButton/RadioButton.styles.js +34 -0
- package/dist/components/RadioButton/RadioButton.tokens.js +97 -0
- package/dist/components/RadioButton/RadioButtonGroup.js +108 -0
- package/dist/components/RadioButton/RadioButtonGroup.tokens.js +32 -0
- package/dist/components/RadioButton/RadioButtonGroupContext.js +8 -0
- package/dist/components/Search/Search.js +93 -0
- package/dist/components/Search/Search.tokens.js +55 -0
- package/dist/components/Select/Select.js +154 -0
- package/dist/components/Select/Select.styles.js +149 -0
- package/dist/components/Select/Select.tokens.js +311 -0
- package/dist/components/SkipToContent/SkipToContent.js +49 -0
- package/dist/components/SkipToContent/SkipToContent.tokens.js +40 -0
- package/dist/components/Spinner/Spinner.js +80 -0
- package/dist/components/Spinner/Spinner.tokens.js +13 -0
- package/dist/components/Table/Body.js +22 -0
- package/dist/components/Table/Cell.js +75 -0
- package/dist/components/Table/Cell.tokens.js +55 -0
- package/dist/components/Table/Foot.js +22 -0
- package/dist/components/Table/Head.js +22 -0
- package/dist/components/Table/Row.js +43 -0
- package/dist/components/Table/Row.tokens.js +68 -0
- package/dist/components/Table/SortCell.js +60 -0
- package/dist/components/Table/Table.js +34 -0
- package/dist/components/Table/TableWrapper.js +61 -0
- package/dist/components/Tabs/Tab.js +102 -0
- package/dist/components/Tabs/TabList.js +86 -0
- package/dist/components/Tabs/TabPanel.js +36 -0
- package/dist/components/Tabs/TabPanels.js +33 -0
- package/dist/components/Tabs/Tabs.context.js +22 -0
- package/dist/components/Tabs/Tabs.js +77 -0
- package/dist/components/Tabs/Tabs.tokens.js +96 -0
- package/dist/components/Tag/Tag.js +41 -0
- package/dist/components/Tag/Tag.tokens.js +54 -0
- package/dist/components/TextInput/CharCounter.js +37 -0
- package/dist/components/TextInput/CharCounter.tokens.js +11 -0
- package/dist/components/TextInput/TextInput.d.ts +1 -0
- package/dist/components/TextInput/TextInput.js +139 -0
- package/dist/components/TextInput/TextInput.stories.d.ts +1 -0
- package/dist/components/TextInput/TextInput.styles.js +34 -0
- package/dist/components/TextInput/TextInput.tokens.js +50 -0
- package/dist/components/TextInput/TextInput.types.d.ts +2 -0
- package/dist/components/ToggleButton/ToggleButton.js +56 -0
- package/dist/components/ToggleButton/ToggleButton.tokens.js +53 -0
- package/dist/components/ToggleButton/ToggleButtonGroup.js +57 -0
- package/dist/components/Tooltip/Tooltip.js +117 -0
- package/dist/components/Tooltip/Tooltip.styles.js +26 -0
- package/dist/components/Tooltip/Tooltip.tokens.js +31 -0
- package/dist/components/Typography/Typography.d.ts +1 -0
- package/dist/components/Typography/Typography.js +172 -0
- package/dist/components/Typography/Typography.stories.d.ts +5 -0
- package/dist/components/Typography/Typography.tokens.js +495 -0
- package/dist/components/Typography/Typography.types.d.ts +1 -0
- package/dist/helpers/Backdrop/Backdrop.js +13 -0
- package/dist/helpers/Backdrop/Backdrop.utils.js +16 -0
- package/dist/helpers/Chevron/AnimatedChevronUpDown.js +33 -0
- package/dist/helpers/Chevron/AnimatedChevronUpDown.styles.js +29 -0
- package/dist/helpers/Input/Input.styles.js +39 -0
- package/dist/helpers/Input/Input.tokens.js +99 -0
- package/dist/helpers/Paper/Paper.js +10 -0
- package/dist/helpers/Paper/Paper.tokens.js +17 -0
- package/dist/helpers/RequiredMarker/RequiredMarker.js +15 -0
- package/dist/helpers/styling/danger.js +9 -0
- package/dist/helpers/styling/focus.js +15 -0
- package/dist/helpers/styling/focusVisible.js +43 -0
- package/dist/helpers/styling/hideInput.js +9 -0
- package/dist/helpers/styling/hover.js +20 -0
- package/dist/helpers/styling/removeButtonStyling.js +11 -0
- package/dist/helpers/styling/removeListStyling.js +7 -0
- package/dist/helpers/styling/scrollbarStyling.js +8 -0
- package/dist/helpers/styling/visibilityTransition.js +7 -0
- package/dist/hooks/useCombinedRefs.js +16 -0
- package/dist/hooks/useFloatPosition.d.ts +2 -2
- package/dist/hooks/useFloatPosition.js +100 -0
- package/dist/hooks/useFocusTrap.js +37 -0
- package/dist/hooks/useId.js +15 -0
- package/dist/hooks/useMountTransition.js +24 -0
- package/dist/hooks/useOnClickOutside.js +29 -0
- package/dist/hooks/useOnKeyDown.js +20 -0
- package/dist/hooks/useRoveFocus.js +40 -0
- package/dist/index.js +60 -33989
- package/dist/types/BaseComponentProps.js +72 -0
- package/dist/utils/color.js +9 -0
- package/dist/utils/combineHandlers.js +10 -0
- package/dist/utils/idGenerator.d.ts +1 -1
- package/dist/utils/idGenerator.js +19 -0
- package/dist/utils/text.js +5 -0
- package/package.json +18 -12
- package/dist/index.es.js +0 -33899
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
import { ddsBaseTokens, ddsReferenceTokens } from '@norges-domstoler/dds-design-tokens';
|
|
2
|
+
import { calculateHeightWithLineHeight } from '../../utils/text.js';
|
|
3
|
+
import { hoverInputfield, hoverDangerInputfield } from '../../helpers/styling/hover.js';
|
|
4
|
+
import { focusInputfield, focusDangerInputfield } from '../../helpers/styling/focus.js';
|
|
5
|
+
import { dangerInputfield } from '../../helpers/styling/danger.js';
|
|
6
|
+
|
|
7
|
+
var Colors = ddsBaseTokens.colors,
|
|
8
|
+
Spacing = ddsBaseTokens.spacing,
|
|
9
|
+
FontPackages = ddsBaseTokens.fontPackages,
|
|
10
|
+
BorderRadius = ddsBaseTokens.borderRadius,
|
|
11
|
+
Border = ddsBaseTokens.border,
|
|
12
|
+
IconSizes = ddsBaseTokens.iconSizes;
|
|
13
|
+
var textDefault = ddsReferenceTokens.textDefault;
|
|
14
|
+
var multiValueContainerMinHeight = "".concat(Spacing.SizesDdsSpacingLocalX0125NumberPx * 2 + Spacing.SizesDdsSpacingLocalX025NumberPx * 2 + calculateHeightWithLineHeight(FontPackages.supportingStyle_inputtext_01.numbers.lineHeightNumber, FontPackages.supportingStyle_inputtext_01.numbers.fontSizeNumber), "px"); //custom spacing so that multiselect has same height as single value select
|
|
15
|
+
|
|
16
|
+
var valueContainerMarginBottomMultiWithLabel = "".concat(Spacing.SizesDdsSpacingLocalX025NumberPx + Spacing.SizesDdsSpacingLocalX0125NumberPx, "px"); //custom spacing so that multiselect has same height as single value select
|
|
17
|
+
|
|
18
|
+
var inputMultiNoLabelPaddingTop = "".concat(Spacing.SizesDdsSpacingLocalX05NumberPx + Spacing.SizesDdsSpacingLocalX0125NumberPx, "px");
|
|
19
|
+
var labelBase = Object.assign({
|
|
20
|
+
color: Colors.DdsColorNeutralsGray7,
|
|
21
|
+
paddingTop: Spacing.SizesDdsSpacingLocalX075,
|
|
22
|
+
paddingLeft: Spacing.SizesDdsSpacingLocalX1,
|
|
23
|
+
paddingBottom: 0,
|
|
24
|
+
paddingRight: Spacing.SizesDdsSpacingLocalX05
|
|
25
|
+
}, FontPackages.supportingStyle_label_01.base);
|
|
26
|
+
var labelHoverBase = {
|
|
27
|
+
color: Colors.DdsColorInteractiveBase
|
|
28
|
+
};
|
|
29
|
+
var labelFocusBase = {
|
|
30
|
+
color: Colors.DdsColorInteractiveBase
|
|
31
|
+
};
|
|
32
|
+
var valueContainerWithLabelBase = {
|
|
33
|
+
marginBottom: Spacing.SizesDdsSpacingLocalX075
|
|
34
|
+
};
|
|
35
|
+
var valueContainerNoLabelBase = {
|
|
36
|
+
marginBottom: Spacing.SizesDdsSpacingLocalX075
|
|
37
|
+
};
|
|
38
|
+
var valueContainerIsMultiBase = {
|
|
39
|
+
minHeight: multiValueContainerMinHeight
|
|
40
|
+
};
|
|
41
|
+
var valueContainerIsMultiWithLabelBase = {
|
|
42
|
+
marginBottom: valueContainerMarginBottomMultiWithLabel
|
|
43
|
+
};
|
|
44
|
+
var valueContainerIsMultiNoLabelBase = {
|
|
45
|
+
marginBottom: Spacing.SizesDdsSpacingLocalX05
|
|
46
|
+
};
|
|
47
|
+
var containerBase = {
|
|
48
|
+
borderRadius: BorderRadius.RadiiDdsBorderRadius1Radius,
|
|
49
|
+
border: "".concat(Border.BordersDdsBorderStyleLightStrokeWeight, " solid"),
|
|
50
|
+
borderColor: Colors.DdsColorNeutralsGray5,
|
|
51
|
+
backgroundColor: Colors.DdsColorNeutralsWhite
|
|
52
|
+
};
|
|
53
|
+
var containerHoverBase = Object.assign({}, hoverInputfield);
|
|
54
|
+
var containerFocusBase = Object.assign({}, focusInputfield);
|
|
55
|
+
var containerDangerBase = Object.assign({}, dangerInputfield);
|
|
56
|
+
var containerDangerHoverBase = Object.assign({}, hoverDangerInputfield);
|
|
57
|
+
var containerDangerFocusBase = Object.assign({}, focusDangerInputfield);
|
|
58
|
+
var inputBase = Object.assign({
|
|
59
|
+
padding: "0 ".concat(Spacing.SizesDdsSpacingLocalX05, " 0 ").concat(Spacing.SizesDdsSpacingLocalX1)
|
|
60
|
+
}, FontPackages.supportingStyle_inputtext_02.base);
|
|
61
|
+
var inputNoLabelBase = {
|
|
62
|
+
paddingTop: Spacing.SizesDdsSpacingLocalX075
|
|
63
|
+
};
|
|
64
|
+
var inputIsMultiNoLabelBase = {
|
|
65
|
+
paddingTop: inputMultiNoLabelPaddingTop
|
|
66
|
+
};
|
|
67
|
+
var placeholderBase = Object.assign({
|
|
68
|
+
color: Colors.DdsColorNeutralsGray6
|
|
69
|
+
}, FontPackages.supportingStyle_placeholdertext_01.base);
|
|
70
|
+
var indicatorsContainerWithLabelBase = {
|
|
71
|
+
marginBottom: Spacing.SizesDdsSpacingLocalX1
|
|
72
|
+
};
|
|
73
|
+
var indicatorsContainerNoLabelBase = {
|
|
74
|
+
marginBottom: Spacing.SizesDdsSpacingLocalX075
|
|
75
|
+
};
|
|
76
|
+
var indicatorsContainerIsMultiWithLabelBase = {
|
|
77
|
+
marginBottom: valueContainerMarginBottomMultiWithLabel
|
|
78
|
+
};
|
|
79
|
+
var indicatorsContainerIsMultiNoLabelBase = {
|
|
80
|
+
marginBottom: Spacing.SizesDdsSpacingLocalX05
|
|
81
|
+
};
|
|
82
|
+
var dropdownIndicatorBase = {
|
|
83
|
+
color: Colors.DdsColorNeutralsGray6,
|
|
84
|
+
padding: 0
|
|
85
|
+
};
|
|
86
|
+
var dropdownIndicatorHoverBase = {
|
|
87
|
+
color: Colors.DdsColorInteractiveBase
|
|
88
|
+
};
|
|
89
|
+
var drodownIndicatorReadOnlyBase = {
|
|
90
|
+
color: 'transparent'
|
|
91
|
+
};
|
|
92
|
+
var clearIndicatorBase = {
|
|
93
|
+
color: Colors.DdsColorNeutralsGray6,
|
|
94
|
+
padding: " 0 ".concat(Spacing.SizesDdsSpacingLocalX025, " 0 0")
|
|
95
|
+
};
|
|
96
|
+
var loadingIndicatorBase = {
|
|
97
|
+
color: Colors.DdsColorNeutralsGray6,
|
|
98
|
+
padding: 0
|
|
99
|
+
};
|
|
100
|
+
var clearIndicatorHoverBase = {
|
|
101
|
+
color: Colors.DdsColorInteractiveBase
|
|
102
|
+
};
|
|
103
|
+
var menuBase = {
|
|
104
|
+
border: '1px solid',
|
|
105
|
+
borderColor: Colors.DdsColorInteractiveBase,
|
|
106
|
+
backgroundColor: Colors.DdsColorNeutralsWhite,
|
|
107
|
+
borderRadius: BorderRadius.RadiiDdsBorderRadius1Radius,
|
|
108
|
+
marginTop: Spacing.SizesDdsSpacingLocalX025,
|
|
109
|
+
marginBottom: Spacing.SizesDdsSpacingLocalX025
|
|
110
|
+
};
|
|
111
|
+
var optionBase = Object.assign(Object.assign({
|
|
112
|
+
padding: "".concat(Spacing.SizesDdsSpacingLocalX05, " ").concat(Spacing.SizesDdsSpacingLocalX1)
|
|
113
|
+
}, FontPackages.body_sans_02.base), {
|
|
114
|
+
color: textDefault.textColor
|
|
115
|
+
});
|
|
116
|
+
var optionHoverBase = {
|
|
117
|
+
backgroundColor: Colors.DdsColorInteractiveLighter
|
|
118
|
+
};
|
|
119
|
+
var optionSelectedBase = Object.assign(Object.assign({
|
|
120
|
+
backgroundColor: Colors.DdsColorInteractiveLightest
|
|
121
|
+
}, FontPackages.body_sans_02.base), {
|
|
122
|
+
fontWeight: 600
|
|
123
|
+
});
|
|
124
|
+
var noOptionsMessageBase = Object.assign({
|
|
125
|
+
padding: "".concat(Spacing.SizesDdsSpacingLocalX05, " ").concat(Spacing.SizesDdsSpacingLocalX1),
|
|
126
|
+
color: Colors.DdsColorNeutralsGray6
|
|
127
|
+
}, FontPackages.supportingStyle_placeholdertext_01.base);
|
|
128
|
+
var multiValueBase = {
|
|
129
|
+
borderRadius: BorderRadius.RadiiDdsBorderRadius1Radius,
|
|
130
|
+
margin: Spacing.SizesDdsSpacingLocalX0125
|
|
131
|
+
};
|
|
132
|
+
var multiValueEnabledBase = {
|
|
133
|
+
backgroundColor: Colors.DdsColorInteractiveLighter
|
|
134
|
+
};
|
|
135
|
+
var multiValueDisabledBase = {
|
|
136
|
+
backgroundColor: Colors.DdsColorNeutralsGray3
|
|
137
|
+
};
|
|
138
|
+
var multiValueLabelBase = Object.assign(Object.assign({
|
|
139
|
+
paddingTop: "".concat(Spacing.SizesDdsSpacingLocalX025),
|
|
140
|
+
paddingRight: "".concat(Spacing.SizesDdsSpacingLocalX05),
|
|
141
|
+
paddingLeft: "".concat(Spacing.SizesDdsSpacingLocalX05),
|
|
142
|
+
paddingBottom: "".concat(Spacing.SizesDdsSpacingLocalX025),
|
|
143
|
+
color: Colors.DdsColorNeutralsGray9
|
|
144
|
+
}, FontPackages.supportingStyle_inputtext_01.base), {
|
|
145
|
+
fontWeight: 'bold'
|
|
146
|
+
});
|
|
147
|
+
var multiValueRemoveBase = {
|
|
148
|
+
padding: "".concat(Spacing.SizesDdsSpacingLocalX025),
|
|
149
|
+
color: Colors.DdsColorNeutralsGray9
|
|
150
|
+
};
|
|
151
|
+
var multiValueRemoveHoverBase = {
|
|
152
|
+
color: Colors.DdsColorNeutralsWhite,
|
|
153
|
+
backgroundColor: Colors.DdsColorInteractiveBase
|
|
154
|
+
};
|
|
155
|
+
var multiValueRemoveIconBase = {
|
|
156
|
+
height: IconSizes.DdsIconsizeSmall,
|
|
157
|
+
width: IconSizes.DdsIconsizeSmall
|
|
158
|
+
};
|
|
159
|
+
var containerDisabledBase = {
|
|
160
|
+
backgroundColor: Colors.DdsColorNeutralsGray1,
|
|
161
|
+
borderColor: Colors.DdsColorNeutralsGray5
|
|
162
|
+
};
|
|
163
|
+
var containerReadOnlyBase = {
|
|
164
|
+
borderColor: 'transparent',
|
|
165
|
+
backgroundColor: 'transparent'
|
|
166
|
+
};
|
|
167
|
+
var defaultWidth = '320px';
|
|
168
|
+
var selectTokens = {
|
|
169
|
+
container: {
|
|
170
|
+
base: containerBase,
|
|
171
|
+
defaultWidth: defaultWidth,
|
|
172
|
+
hover: {
|
|
173
|
+
base: containerHoverBase
|
|
174
|
+
},
|
|
175
|
+
focus: {
|
|
176
|
+
base: containerFocusBase
|
|
177
|
+
},
|
|
178
|
+
danger: {
|
|
179
|
+
base: containerDangerBase,
|
|
180
|
+
hover: {
|
|
181
|
+
base: containerDangerHoverBase
|
|
182
|
+
},
|
|
183
|
+
focus: {
|
|
184
|
+
base: containerDangerFocusBase
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
disabled: {
|
|
188
|
+
base: containerDisabledBase
|
|
189
|
+
},
|
|
190
|
+
readOnly: {
|
|
191
|
+
base: containerReadOnlyBase
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
label: {
|
|
195
|
+
base: labelBase,
|
|
196
|
+
hover: {
|
|
197
|
+
base: labelHoverBase
|
|
198
|
+
},
|
|
199
|
+
focus: {
|
|
200
|
+
base: labelFocusBase
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
input: {
|
|
204
|
+
base: inputBase,
|
|
205
|
+
noLabel: {
|
|
206
|
+
base: inputNoLabelBase
|
|
207
|
+
},
|
|
208
|
+
isMulti: {
|
|
209
|
+
noLabel: {
|
|
210
|
+
base: inputIsMultiNoLabelBase
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
placeholder: {
|
|
215
|
+
base: placeholderBase
|
|
216
|
+
},
|
|
217
|
+
menu: {
|
|
218
|
+
base: menuBase,
|
|
219
|
+
spaceTop: Spacing.SizesDdsSpacingLocalX1NumberPx + 2 //grunnet shadow-box
|
|
220
|
+
|
|
221
|
+
},
|
|
222
|
+
option: {
|
|
223
|
+
base: optionBase,
|
|
224
|
+
hover: {
|
|
225
|
+
base: optionHoverBase
|
|
226
|
+
},
|
|
227
|
+
selected: {
|
|
228
|
+
base: optionSelectedBase,
|
|
229
|
+
icon: {
|
|
230
|
+
margin: "0 ".concat(Spacing.SizesDdsSpacingLocalX05, " 0 0")
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
valueContainer: {
|
|
235
|
+
withLabel: {
|
|
236
|
+
base: valueContainerWithLabelBase
|
|
237
|
+
},
|
|
238
|
+
noLabel: {
|
|
239
|
+
base: valueContainerNoLabelBase
|
|
240
|
+
},
|
|
241
|
+
isMulti: {
|
|
242
|
+
base: valueContainerIsMultiBase,
|
|
243
|
+
withLabel: {
|
|
244
|
+
base: valueContainerIsMultiWithLabelBase
|
|
245
|
+
},
|
|
246
|
+
noLabel: {
|
|
247
|
+
base: valueContainerIsMultiNoLabelBase
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
multiValue: {
|
|
252
|
+
base: multiValueBase,
|
|
253
|
+
enabled: {
|
|
254
|
+
base: multiValueEnabledBase
|
|
255
|
+
},
|
|
256
|
+
disabled: {
|
|
257
|
+
base: multiValueDisabledBase
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
multiValueLabel: {
|
|
261
|
+
base: multiValueLabelBase
|
|
262
|
+
},
|
|
263
|
+
multiValueRemove: {
|
|
264
|
+
base: multiValueRemoveBase,
|
|
265
|
+
hover: {
|
|
266
|
+
base: multiValueRemoveHoverBase
|
|
267
|
+
},
|
|
268
|
+
icon: {
|
|
269
|
+
base: multiValueRemoveIconBase
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
indicatorsContainer: {
|
|
273
|
+
withLabel: {
|
|
274
|
+
base: indicatorsContainerWithLabelBase
|
|
275
|
+
},
|
|
276
|
+
noLabel: {
|
|
277
|
+
base: indicatorsContainerNoLabelBase
|
|
278
|
+
},
|
|
279
|
+
isMulti: {
|
|
280
|
+
withLabel: {
|
|
281
|
+
base: indicatorsContainerIsMultiWithLabelBase
|
|
282
|
+
},
|
|
283
|
+
noLabel: {
|
|
284
|
+
base: indicatorsContainerIsMultiNoLabelBase
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
dropdownIndicator: {
|
|
289
|
+
base: dropdownIndicatorBase,
|
|
290
|
+
hover: {
|
|
291
|
+
base: dropdownIndicatorHoverBase
|
|
292
|
+
},
|
|
293
|
+
readOnly: {
|
|
294
|
+
base: drodownIndicatorReadOnlyBase
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
noOptionsMessage: {
|
|
298
|
+
base: noOptionsMessageBase
|
|
299
|
+
},
|
|
300
|
+
clearIndicator: {
|
|
301
|
+
base: clearIndicatorBase,
|
|
302
|
+
hover: {
|
|
303
|
+
base: clearIndicatorHoverBase
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
loadingIndicator: {
|
|
307
|
+
base: loadingIndicatorBase
|
|
308
|
+
}
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
export { multiValueContainerMinHeight, selectTokens };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { __rest } from 'tslib';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import styled from 'styled-components';
|
|
5
|
+
import { skipToContentTokens } from './SkipToContent.tokens.js';
|
|
6
|
+
import { focusVisibleTransitionValue } from '../../helpers/styling/focusVisible.js';
|
|
7
|
+
import { joinClassNames, getBaseHTMLProps } from '../../types/BaseComponentProps.js';
|
|
8
|
+
|
|
9
|
+
var Wrapper = styled.div.withConfig({
|
|
10
|
+
displayName: "SkipToContent__Wrapper",
|
|
11
|
+
componentId: "sc-57o1qv-0"
|
|
12
|
+
})(["box-sizing:border-box;position:absolute;top:", ";text-align:center;opacity:0;@media (prefers-reduced-motion:no-preference){transition:opacity 0.2s;}overflow:hidden;clip:rect(1px,1px,1px,1px);height:1px;width:1px;white-space:nowrap;", " &:focus-within{clip:auto;height:auto;overflow:auto;width:100%;z-index:200;opacity:1;}"], function (_ref) {
|
|
13
|
+
var top = _ref.top;
|
|
14
|
+
return top;
|
|
15
|
+
}, skipToContentTokens.wrapper.base);
|
|
16
|
+
var Link = styled.a.withConfig({
|
|
17
|
+
displayName: "SkipToContent__Link",
|
|
18
|
+
componentId: "sc-57o1qv-1"
|
|
19
|
+
})(["", " &:focus{", " @media (prefers-reduced-motion:no-preference){transition:", ";}}&:hover{", "}"], skipToContentTokens.link.base, skipToContentTokens.link.focus.base, focusVisibleTransitionValue, skipToContentTokens.link.hover.base);
|
|
20
|
+
var SkipToContent = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
21
|
+
var _props$text = props.text,
|
|
22
|
+
text = _props$text === void 0 ? 'Til hovedinnhold' : _props$text,
|
|
23
|
+
_props$top = props.top,
|
|
24
|
+
top = _props$top === void 0 ? 0 : _props$top,
|
|
25
|
+
id = props.id,
|
|
26
|
+
className = props.className,
|
|
27
|
+
_props$htmlProps = props.htmlProps,
|
|
28
|
+
htmlProps = _props$htmlProps === void 0 ? {} : _props$htmlProps,
|
|
29
|
+
rest = __rest(props, ["text", "top", "id", "className", "htmlProps"]);
|
|
30
|
+
|
|
31
|
+
var htmlPropsClassName = htmlProps.className,
|
|
32
|
+
style = htmlProps.style,
|
|
33
|
+
restHtmlProps = __rest(htmlProps, ["className", "style"]);
|
|
34
|
+
|
|
35
|
+
var wrapperProps = {
|
|
36
|
+
top: top,
|
|
37
|
+
className: joinClassNames(className, htmlPropsClassName),
|
|
38
|
+
style: style
|
|
39
|
+
};
|
|
40
|
+
return jsx(Wrapper, Object.assign({}, wrapperProps, {
|
|
41
|
+
children: jsx(Link, Object.assign({}, getBaseHTMLProps(id, restHtmlProps, rest), {
|
|
42
|
+
ref: ref
|
|
43
|
+
}, {
|
|
44
|
+
children: text
|
|
45
|
+
}))
|
|
46
|
+
}));
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export { SkipToContent };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ddsBaseTokens } from '@norges-domstoler/dds-design-tokens';
|
|
2
|
+
import { focusVisibleOnDark } from '../../helpers/styling/focusVisible.js';
|
|
3
|
+
|
|
4
|
+
var Colors = ddsBaseTokens.colors,
|
|
5
|
+
Spacing = ddsBaseTokens.spacing,
|
|
6
|
+
FontPackages = ddsBaseTokens.fontPackages,
|
|
7
|
+
Border = ddsBaseTokens.border;
|
|
8
|
+
var linkBase = Object.assign(Object.assign({
|
|
9
|
+
color: Colors.DdsColorNeutralsWhite
|
|
10
|
+
}, FontPackages.body_sans_02.base), {
|
|
11
|
+
textDecoration: 'none'
|
|
12
|
+
});
|
|
13
|
+
var linkHoverBase = {
|
|
14
|
+
color: Colors.DdsColorNeutralsWhite
|
|
15
|
+
};
|
|
16
|
+
var linkFocusBase = Object.assign({}, focusVisibleOnDark);
|
|
17
|
+
var wrapperBase = {
|
|
18
|
+
backgroundColor: Colors.DdsColorPrimaryBase,
|
|
19
|
+
padding: Spacing.SizesDdsSpacingLocalX025
|
|
20
|
+
};
|
|
21
|
+
var skipToContentTokens = {
|
|
22
|
+
link: {
|
|
23
|
+
base: linkBase,
|
|
24
|
+
hover: {
|
|
25
|
+
base: linkHoverBase
|
|
26
|
+
},
|
|
27
|
+
focus: {
|
|
28
|
+
base: linkFocusBase
|
|
29
|
+
},
|
|
30
|
+
focusOutline: {
|
|
31
|
+
color: Colors.DdsColorWarningDark,
|
|
32
|
+
width: Border.BordersDdsBorderFocusBaseStrokeWeight
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
wrapper: {
|
|
36
|
+
base: wrapperBase
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export { skipToContentTokens };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { slicedToArray as _slicedToArray } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import { __rest } from 'tslib';
|
|
3
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
|
+
import React, { useState } from 'react';
|
|
5
|
+
import styled from 'styled-components';
|
|
6
|
+
import { ddsBaseTokens } from '@norges-domstoler/dds-design-tokens';
|
|
7
|
+
import { spinnerTokens } from './Spinner.tokens.js';
|
|
8
|
+
import { getTextColor } from '../Typography/Typography.js';
|
|
9
|
+
import { getBaseHTMLProps } from '../../types/BaseComponentProps.js';
|
|
10
|
+
|
|
11
|
+
var StyledSpinner = styled.svg.withConfig({
|
|
12
|
+
displayName: "Spinner__StyledSpinner",
|
|
13
|
+
componentId: "sc-13hsttm-0"
|
|
14
|
+
})(["display:block;width:", ";height:", ";stroke-dasharray:90,150;animation:rotate 1.5s linear infinite;animation-delay:", "ms;@media (prefers-reduced-motion:no-preference){animation:rotate 2s linear infinite;}@keyframes rotate{100%{transform:rotate(360deg);}}"], function (_ref) {
|
|
15
|
+
var size = _ref.size;
|
|
16
|
+
return size;
|
|
17
|
+
}, function (_ref2) {
|
|
18
|
+
var size = _ref2.size;
|
|
19
|
+
return size;
|
|
20
|
+
}, function (_ref3) {
|
|
21
|
+
var outerAnimationDelay = _ref3.outerAnimationDelay;
|
|
22
|
+
return outerAnimationDelay;
|
|
23
|
+
});
|
|
24
|
+
var Circle = styled.circle.withConfig({
|
|
25
|
+
displayName: "Spinner__Circle",
|
|
26
|
+
componentId: "sc-13hsttm-1"
|
|
27
|
+
})(["", " stroke:", ";stroke-linecap:round;@media (prefers-reduced-motion:no-preference){animation:dash 1.5s ease-in-out infinite;animation-delay:", "ms;@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0;}50%{stroke-dasharray:90,150;stroke-dashoffset:-35;}100%{stroke-dasharray:90,150;stroke-dashoffset:-124;}}}"], spinnerTokens.circle.base, function (_ref4) {
|
|
28
|
+
var color = _ref4.color;
|
|
29
|
+
return color && getTextColor(color);
|
|
30
|
+
}, function (_ref5) {
|
|
31
|
+
var innerAnimationDelay = _ref5.innerAnimationDelay;
|
|
32
|
+
return innerAnimationDelay;
|
|
33
|
+
});
|
|
34
|
+
var nextUniqueId = 0;
|
|
35
|
+
function Spinner(props) {
|
|
36
|
+
var _props$size = props.size,
|
|
37
|
+
size = _props$size === void 0 ? ddsBaseTokens.iconSizes.DdsIconsizeMedium : _props$size,
|
|
38
|
+
_props$color = props.color,
|
|
39
|
+
color = _props$color === void 0 ? 'interactive' : _props$color,
|
|
40
|
+
id = props.id,
|
|
41
|
+
className = props.className,
|
|
42
|
+
htmlProps = props.htmlProps,
|
|
43
|
+
rest = __rest(props, ["size", "color", "id", "className", "htmlProps"]);
|
|
44
|
+
|
|
45
|
+
var mountTime = React.useRef(Date.now());
|
|
46
|
+
var outerAnimationDelay = -(mountTime.current % 2000);
|
|
47
|
+
var innerAnimationDelay = -(mountTime.current % 1500);
|
|
48
|
+
|
|
49
|
+
var _useState = useState("spinnerTitle-".concat(nextUniqueId++)),
|
|
50
|
+
_useState2 = _slicedToArray(_useState, 1),
|
|
51
|
+
uniqueId = _useState2[0];
|
|
52
|
+
|
|
53
|
+
var spinnerProps = Object.assign(Object.assign({}, getBaseHTMLProps(id, className, htmlProps, rest)), {
|
|
54
|
+
outerAnimationDelay: outerAnimationDelay,
|
|
55
|
+
size: size
|
|
56
|
+
});
|
|
57
|
+
var circleProps = {
|
|
58
|
+
innerAnimationDelay: innerAnimationDelay,
|
|
59
|
+
color: color
|
|
60
|
+
};
|
|
61
|
+
return jsxs(StyledSpinner, Object.assign({
|
|
62
|
+
viewBox: "0 0 50 50",
|
|
63
|
+
role: "img",
|
|
64
|
+
"aria-labelledby": uniqueId
|
|
65
|
+
}, spinnerProps, {
|
|
66
|
+
children: [jsx("title", Object.assign({
|
|
67
|
+
id: uniqueId
|
|
68
|
+
}, {
|
|
69
|
+
children: "innlastning p\xE5g\xE5r"
|
|
70
|
+
})), jsx(Circle, Object.assign({}, circleProps, {
|
|
71
|
+
cx: "25",
|
|
72
|
+
cy: "25",
|
|
73
|
+
r: "20",
|
|
74
|
+
fill: "none",
|
|
75
|
+
strokeWidth: "4"
|
|
76
|
+
}))]
|
|
77
|
+
}));
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export { Spinner };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ddsBaseTokens } from '@norges-domstoler/dds-design-tokens';
|
|
2
|
+
|
|
3
|
+
var Colors = ddsBaseTokens.colors;
|
|
4
|
+
var ciclreBase = {
|
|
5
|
+
stroke: Colors.DdsColorInteractiveBase
|
|
6
|
+
};
|
|
7
|
+
var spinnerTokens = {
|
|
8
|
+
circle: {
|
|
9
|
+
base: ciclreBase
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export { spinnerTokens };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { __rest } from 'tslib';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import styled from 'styled-components';
|
|
5
|
+
|
|
6
|
+
var StyledBody = styled.tbody.withConfig({
|
|
7
|
+
displayName: "Body__StyledBody",
|
|
8
|
+
componentId: "sc-67qjfs-0"
|
|
9
|
+
})([""]);
|
|
10
|
+
var Body = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
11
|
+
var children = _a.children,
|
|
12
|
+
rest = __rest(_a, ["children"]);
|
|
13
|
+
|
|
14
|
+
var bodyProps = Object.assign({}, rest);
|
|
15
|
+
return jsx(StyledBody, Object.assign({
|
|
16
|
+
ref: ref
|
|
17
|
+
}, bodyProps, {
|
|
18
|
+
children: children
|
|
19
|
+
}));
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export { Body };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { __rest } from 'tslib';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import styled, { css } from 'styled-components';
|
|
5
|
+
import { cellTokens } from './Cell.tokens.js';
|
|
6
|
+
|
|
7
|
+
var layoutStyle = function layoutStyle(layout) {
|
|
8
|
+
switch (layout) {
|
|
9
|
+
case 'center':
|
|
10
|
+
return css(["justify-content:center;"]);
|
|
11
|
+
|
|
12
|
+
case 'right':
|
|
13
|
+
return css(["justify-content:flex-end;"]);
|
|
14
|
+
|
|
15
|
+
case 'text and icon':
|
|
16
|
+
return css(["& > *:first-of-type{", "}"], cellTokens.data.layout.textAndIcon.base);
|
|
17
|
+
|
|
18
|
+
default:
|
|
19
|
+
case 'left':
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
var StyledCell = styled.td.withConfig({
|
|
25
|
+
displayName: "Cell__StyledCell",
|
|
26
|
+
componentId: "sc-ghfpfs-0"
|
|
27
|
+
})(["", " ", ""], cellTokens.base, function (_ref) {
|
|
28
|
+
var type = _ref.type;
|
|
29
|
+
return type && css(["", ""], cellTokens[type].base);
|
|
30
|
+
});
|
|
31
|
+
var InnerCell = styled.div.withConfig({
|
|
32
|
+
displayName: "Cell__InnerCell",
|
|
33
|
+
componentId: "sc-ghfpfs-1"
|
|
34
|
+
})(["display:flex;align-items:center;", ""], function (_ref2) {
|
|
35
|
+
var layout = _ref2.layout;
|
|
36
|
+
return layoutStyle(layout);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
var getTableCellType = function getTableCellType(type) {
|
|
40
|
+
switch (type) {
|
|
41
|
+
case 'head':
|
|
42
|
+
return 'th';
|
|
43
|
+
|
|
44
|
+
default:
|
|
45
|
+
case 'data':
|
|
46
|
+
return 'td';
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
var Cell = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
51
|
+
var children = _a.children,
|
|
52
|
+
_a$type = _a.type,
|
|
53
|
+
type = _a$type === void 0 ? 'data' : _a$type,
|
|
54
|
+
_a$layout = _a.layout,
|
|
55
|
+
layout = _a$layout === void 0 ? 'left' : _a$layout,
|
|
56
|
+
rest = __rest(_a, ["children", "type", "layout"]);
|
|
57
|
+
|
|
58
|
+
var as = getTableCellType(type);
|
|
59
|
+
var cellProps = Object.assign({
|
|
60
|
+
as: as,
|
|
61
|
+
type: type
|
|
62
|
+
}, rest);
|
|
63
|
+
var innerCellProps = {
|
|
64
|
+
layout: layout
|
|
65
|
+
};
|
|
66
|
+
return jsx(StyledCell, Object.assign({
|
|
67
|
+
ref: ref
|
|
68
|
+
}, cellProps, {
|
|
69
|
+
children: jsx(InnerCell, Object.assign({}, innerCellProps, {
|
|
70
|
+
children: children
|
|
71
|
+
}))
|
|
72
|
+
}));
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
export { Cell };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ddsBaseTokens } from '@norges-domstoler/dds-design-tokens';
|
|
2
|
+
import { focusVisible } from '../../helpers/styling/focusVisible.js';
|
|
3
|
+
|
|
4
|
+
var Colors = ddsBaseTokens.colors,
|
|
5
|
+
Spacing = ddsBaseTokens.spacing;
|
|
6
|
+
var cellBase = {};
|
|
7
|
+
var compactCellBase = {
|
|
8
|
+
padding: "".concat(Spacing.SizesDdsSpacingLocalX075)
|
|
9
|
+
};
|
|
10
|
+
var headBase = {
|
|
11
|
+
backgroundColor: Colors.DdsColorPrimaryLightest
|
|
12
|
+
};
|
|
13
|
+
var dataBase = {};
|
|
14
|
+
var normalCellBase = {
|
|
15
|
+
padding: "".concat(Spacing.SizesDdsSpacingLocalX15, " ").concat(Spacing.SizesDdsSpacingLocalX075)
|
|
16
|
+
};
|
|
17
|
+
var sortCellIconBase = {
|
|
18
|
+
marginInlineStart: Spacing.SizesDdsSpacingLocalX05
|
|
19
|
+
};
|
|
20
|
+
var sortCellFocusBase = Object.assign({}, focusVisible);
|
|
21
|
+
var textAndIconBase = {
|
|
22
|
+
marginRight: Spacing.SizesDdsSpacingLocalX075
|
|
23
|
+
};
|
|
24
|
+
var cellTokens = {
|
|
25
|
+
base: cellBase,
|
|
26
|
+
density: {
|
|
27
|
+
normal: {
|
|
28
|
+
base: normalCellBase
|
|
29
|
+
},
|
|
30
|
+
compact: {
|
|
31
|
+
base: compactCellBase
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
head: {
|
|
35
|
+
base: headBase,
|
|
36
|
+
sortCell: {
|
|
37
|
+
icon: {
|
|
38
|
+
base: sortCellIconBase
|
|
39
|
+
},
|
|
40
|
+
focus: {
|
|
41
|
+
base: sortCellFocusBase
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
data: {
|
|
46
|
+
base: dataBase,
|
|
47
|
+
layout: {
|
|
48
|
+
textAndIcon: {
|
|
49
|
+
base: textAndIconBase
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export { cellTokens };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { __rest } from 'tslib';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import styled from 'styled-components';
|
|
5
|
+
|
|
6
|
+
var StyledFoot = styled.tfoot.withConfig({
|
|
7
|
+
displayName: "Foot__StyledFoot",
|
|
8
|
+
componentId: "sc-tfpehd-0"
|
|
9
|
+
})([""]);
|
|
10
|
+
var Foot = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
11
|
+
var children = _a.children,
|
|
12
|
+
rest = __rest(_a, ["children"]);
|
|
13
|
+
|
|
14
|
+
var footProps = Object.assign({}, rest);
|
|
15
|
+
return jsx(StyledFoot, Object.assign({
|
|
16
|
+
ref: ref
|
|
17
|
+
}, footProps, {
|
|
18
|
+
children: children
|
|
19
|
+
}));
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export { Foot };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { __rest } from 'tslib';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import styled from 'styled-components';
|
|
5
|
+
|
|
6
|
+
var StyledHead = styled.thead.withConfig({
|
|
7
|
+
displayName: "Head__StyledHead",
|
|
8
|
+
componentId: "sc-vzd2kv-0"
|
|
9
|
+
})([""]);
|
|
10
|
+
var Head = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
11
|
+
var children = _a.children,
|
|
12
|
+
rest = __rest(_a, ["children"]);
|
|
13
|
+
|
|
14
|
+
var headProps = Object.assign({}, rest);
|
|
15
|
+
return jsx(StyledHead, Object.assign({
|
|
16
|
+
ref: ref
|
|
17
|
+
}, headProps, {
|
|
18
|
+
children: children
|
|
19
|
+
}));
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export { Head };
|