@norges-domstoler/dds-components 13.8.1 → 13.8.3
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/dist/calendar_today-PMIB5OWO.svg +1 -0
- package/dist/index.d.mts +1761 -0
- package/dist/index.d.ts +1761 -50
- package/dist/index.js +10532 -74
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +10891 -0
- package/dist/index.mjs.map +1 -0
- package/dist/jordskifterett_bullet1-JEURT2QQ.svg +3 -0
- package/dist/lagmannsrett_bullet2-UGFNA6RB.svg +3 -0
- package/dist/tingrett_bullet3-KRK5OB4E.svg +3 -0
- package/package.json +23 -22
- package/dist/_virtual/_rollupPluginBabelHelpers.js +0 -392
- package/dist/assets/bundle-24847e44.css +0 -97
- package/dist/cjs/assets/bundle-24847e44.css +0 -97
- package/dist/cjs/components/AppShell/AppShell.d.ts +0 -38
- package/dist/cjs/components/AppShell/AppShell.stories.d.ts +0 -28
- package/dist/cjs/components/AppShell/AppShell.tokens.d.ts +0 -84
- package/dist/cjs/components/AppShell/AppShellContext.d.ts +0 -10
- package/dist/cjs/components/AppShell/Navigation/EmbeteIcon.d.ts +0 -7
- package/dist/cjs/components/AppShell/Navigation/Navigation.d.ts +0 -13
- package/dist/cjs/components/AppShell/Navigation/NavigationItem.d.ts +0 -20
- package/dist/cjs/components/AppShell/Navigation/NavigationLogo.d.ts +0 -3
- package/dist/cjs/components/AppShell/Navigation/TopBar.d.ts +0 -23
- package/dist/cjs/components/AppShell/index.d.ts +0 -7
- package/dist/cjs/components/BackLink/BackLink.d.ts +0 -6
- package/dist/cjs/components/BackLink/BackLink.stories.d.ts +0 -18
- package/dist/cjs/components/BackLink/BackLink.tokens.d.ts +0 -8
- package/dist/cjs/components/BackLink/index.d.ts +0 -1
- package/dist/cjs/components/Breadcrumbs/Breadcrumb.d.ts +0 -3
- package/dist/cjs/components/Breadcrumbs/Breadcrumb.tokens.d.ts +0 -13
- package/dist/cjs/components/Breadcrumbs/Breadcrumbs.d.ts +0 -4
- package/dist/cjs/components/Breadcrumbs/Breadcrumbs.stories.d.ts +0 -8
- package/dist/cjs/components/Breadcrumbs/index.d.ts +0 -2
- package/dist/cjs/components/Button/Button.d.ts +0 -21
- package/dist/cjs/components/Button/Button.stories.d.ts +0 -64
- package/dist/cjs/components/Button/Button.styles.d.ts +0 -25
- package/dist/cjs/components/Button/Button.tokens.d.ts +0 -332
- package/dist/cjs/components/Button/Button.types.d.ts +0 -33
- package/dist/cjs/components/Button/index.d.ts +0 -2
- package/dist/cjs/components/Card/Card.d.ts +0 -26
- package/dist/cjs/components/Card/Card.stories.d.ts +0 -15
- package/dist/cjs/components/Card/Card.tokens.d.ts +0 -27
- package/dist/cjs/components/Card/CardAccordion/CardAccordion.d.ts +0 -18
- package/dist/cjs/components/Card/CardAccordion/CardAccordion.tokens.d.ts +0 -28
- package/dist/cjs/components/Card/CardAccordion/CardAccordionBody.d.ts +0 -27
- package/dist/cjs/components/Card/CardAccordion/CardAccordionHeader.d.ts +0 -36
- package/dist/cjs/components/Card/CardAccordion/useElementHeight.d.ts +0 -1
- package/dist/cjs/components/Card/index.d.ts +0 -4
- package/dist/cjs/components/Chip/Chip.d.ts +0 -16
- package/dist/cjs/components/Chip/Chip.stories.d.ts +0 -20
- package/dist/cjs/components/Chip/Chip.tokens.d.ts +0 -14
- package/dist/cjs/components/Chip/ChipGroup.d.ts +0 -3
- package/dist/cjs/components/Chip/ChipGroup.stories.d.ts +0 -8
- package/dist/cjs/components/Chip/index.d.ts +0 -2
- package/dist/cjs/components/Datepicker/Datepicker.d.ts +0 -12
- package/dist/cjs/components/Datepicker/Datepicker.stories.d.ts +0 -53
- package/dist/cjs/components/Datepicker/Datepicker.tokens.d.ts +0 -27
- package/dist/cjs/components/Datepicker/index.d.ts +0 -1
- package/dist/cjs/components/DescriptionList/DescriptionList.d.ts +0 -23
- package/dist/cjs/components/DescriptionList/DescriptionList.stories.d.ts +0 -19
- package/dist/cjs/components/DescriptionList/DescriptionList.tokens.d.ts +0 -37
- package/dist/cjs/components/DescriptionList/DescriptionListDesc.d.ts +0 -15
- package/dist/cjs/components/DescriptionList/DescriptionListGroup.d.ts +0 -23
- package/dist/cjs/components/DescriptionList/DescriptionListTerm.d.ts +0 -3
- package/dist/cjs/components/DescriptionList/index.d.ts +0 -4
- package/dist/cjs/components/Divider/Divider.d.ts +0 -13
- package/dist/cjs/components/Divider/Divider.stories.d.ts +0 -15
- package/dist/cjs/components/Divider/Divider.tokens.d.ts +0 -13
- package/dist/cjs/components/Divider/index.d.ts +0 -1
- package/dist/cjs/components/Drawer/Drawer.d.ts +0 -50
- package/dist/cjs/components/Drawer/Drawer.stories.d.ts +0 -24
- package/dist/cjs/components/Drawer/Drawer.tokens.d.ts +0 -9
- package/dist/cjs/components/Drawer/DrawerGroup.d.ts +0 -15
- package/dist/cjs/components/Drawer/index.d.ts +0 -2
- package/dist/cjs/components/EmptyContent/EmptyContent.d.ts +0 -9
- package/dist/cjs/components/EmptyContent/EmptyContent.stories.d.ts +0 -16
- package/dist/cjs/components/EmptyContent/index.d.ts +0 -1
- package/dist/cjs/components/Feedback/CommentComponent.d.ts +0 -13
- package/dist/cjs/components/Feedback/Feedback.d.ts +0 -2
- package/dist/cjs/components/Feedback/Feedback.stories.d.ts +0 -66
- package/dist/cjs/components/Feedback/Feedback.types.d.ts +0 -36
- package/dist/cjs/components/Feedback/FlexContainer.d.ts +0 -6
- package/dist/cjs/components/Feedback/RatingComponent.d.ts +0 -11
- package/dist/cjs/components/Feedback/index.d.ts +0 -2
- package/dist/cjs/components/FileUploader/ErrorList.d.ts +0 -9
- package/dist/cjs/components/FileUploader/File.d.ts +0 -10
- package/dist/cjs/components/FileUploader/FileUploader.d.ts +0 -22
- package/dist/cjs/components/FileUploader/FileUploader.stories.d.ts +0 -28
- package/dist/cjs/components/FileUploader/FileUploader.tokens.d.ts +0 -25
- package/dist/cjs/components/FileUploader/fileUploaderReducer.d.ts +0 -33
- package/dist/cjs/components/FileUploader/index.d.ts +0 -1
- package/dist/cjs/components/FileUploader/types.d.ts +0 -10
- package/dist/cjs/components/FileUploader/useFileUploader.d.ts +0 -33
- package/dist/cjs/components/FileUploader/utils.d.ts +0 -7
- package/dist/cjs/components/GlobalMessage/GlobalMessage.d.ts +0 -27
- package/dist/cjs/components/GlobalMessage/GlobalMessage.stories.d.ts +0 -31
- package/dist/cjs/components/GlobalMessage/GlobalMessage.tokens.d.ts +0 -50
- package/dist/cjs/components/GlobalMessage/index.d.ts +0 -1
- package/dist/cjs/components/Grid/Grid.context.d.ts +0 -7
- package/dist/cjs/components/Grid/Grid.d.ts +0 -24
- package/dist/cjs/components/Grid/Grid.stories.d.ts +0 -11
- package/dist/cjs/components/Grid/Grid.tokens.d.ts +0 -82
- package/dist/cjs/components/Grid/GridChild.d.ts +0 -22
- package/dist/cjs/components/Grid/index.d.ts +0 -2
- package/dist/cjs/components/InlineEdit/InlineEdit.d.ts +0 -5
- package/dist/cjs/components/InlineEdit/InlineEdit.stories.d.ts +0 -34
- package/dist/cjs/components/InlineEdit/InlineEdit.styles.d.ts +0 -20
- package/dist/cjs/components/InlineEdit/InlineEdit.tokens.d.ts +0 -27
- package/dist/cjs/components/InlineEdit/InlineEdit.types.d.ts +0 -35
- package/dist/cjs/components/InlineEdit/InlineEdit.utils.d.ts +0 -1
- package/dist/cjs/components/InlineEdit/InlineEditInput.d.ts +0 -2
- package/dist/cjs/components/InlineEdit/InlineEditInput.stories.d.ts +0 -37
- package/dist/cjs/components/InlineEdit/InlineEditTextArea.d.ts +0 -2
- package/dist/cjs/components/InlineEdit/InlineEditTextArea.stories.d.ts +0 -37
- package/dist/cjs/components/InlineEdit/InlineInput.d.ts +0 -4
- package/dist/cjs/components/InlineEdit/InlineTextArea.d.ts +0 -4
- package/dist/cjs/components/InlineEdit/index.d.ts +0 -3
- package/dist/cjs/components/InputMessage/InputMessage.d.ts +0 -17
- package/dist/cjs/components/InputMessage/InputMessage.stories.d.ts +0 -21
- package/dist/cjs/components/InputMessage/InputMessage.tokens.d.ts +0 -16
- package/dist/cjs/components/InputMessage/index.d.ts +0 -1
- package/dist/cjs/components/InternalHeader/InternalHeader.d.ts +0 -5
- package/dist/cjs/components/InternalHeader/InternalHeader.stories.d.ts +0 -47
- package/dist/cjs/components/InternalHeader/InternalHeader.styles.d.ts +0 -31
- package/dist/cjs/components/InternalHeader/InternalHeader.tokens.d.ts +0 -47
- package/dist/cjs/components/InternalHeader/InternalHeader.types.d.ts +0 -36
- package/dist/cjs/components/InternalHeader/InternalHeaderListItem.d.ts +0 -3
- package/dist/cjs/components/InternalHeader/NavigationItem.d.ts +0 -14
- package/dist/cjs/components/InternalHeader/index.d.ts +0 -2
- package/dist/cjs/components/List/List.d.ts +0 -21
- package/dist/cjs/components/List/List.stories.d.ts +0 -18
- package/dist/cjs/components/List/List.tokens.d.ts +0 -24
- package/dist/cjs/components/List/ListItem.d.ts +0 -3
- package/dist/cjs/components/List/index.d.ts +0 -2
- package/dist/cjs/components/LocalMessage/LocalMessage.d.ts +0 -37
- package/dist/cjs/components/LocalMessage/LocalMessage.stories.d.ts +0 -40
- package/dist/cjs/components/LocalMessage/LocalMessage.tokens.d.ts +0 -88
- package/dist/cjs/components/LocalMessage/index.d.ts +0 -1
- package/dist/cjs/components/Modal/Backdrop/Backdrop.d.ts +0 -5
- package/dist/cjs/components/Modal/Backdrop/Backdrop.utils.d.ts +0 -2
- package/dist/cjs/components/Modal/Backdrop/index.d.ts +0 -2
- package/dist/cjs/components/Modal/Modal.d.ts +0 -30
- package/dist/cjs/components/Modal/Modal.stories.d.ts +0 -28
- package/dist/cjs/components/Modal/Modal.tokens.d.ts +0 -12
- package/dist/cjs/components/Modal/ModalActions.d.ts +0 -3
- package/dist/cjs/components/Modal/ModalBody.d.ts +0 -19
- package/dist/cjs/components/Modal/index.d.ts +0 -3
- package/dist/cjs/components/OverflowMenu/OverflowMenu.d.ts +0 -24
- package/dist/cjs/components/OverflowMenu/OverflowMenu.stories.d.ts +0 -27
- package/dist/cjs/components/OverflowMenu/OverflowMenu.tokens.d.ts +0 -34
- package/dist/cjs/components/OverflowMenu/OverflowMenu.types.d.ts +0 -37
- package/dist/cjs/components/OverflowMenu/OverflowMenuGroup.d.ts +0 -17
- package/dist/cjs/components/OverflowMenu/OverflowMenuItem.d.ts +0 -21
- package/dist/cjs/components/OverflowMenu/index.d.ts +0 -3
- package/dist/cjs/components/Pagination/Pagination.d.ts +0 -52
- package/dist/cjs/components/Pagination/Pagination.stories.d.ts +0 -48
- package/dist/cjs/components/Pagination/Pagination.tokens.d.ts +0 -14
- package/dist/cjs/components/Pagination/index.d.ts +0 -1
- package/dist/cjs/components/Pagination/paginationGenerator.d.ts +0 -1
- package/dist/cjs/components/Popover/Popover.d.ts +0 -60
- package/dist/cjs/components/Popover/Popover.stories.d.ts +0 -55
- package/dist/cjs/components/Popover/Popover.tokens.d.ts +0 -17
- package/dist/cjs/components/Popover/PopoverGroup.d.ts +0 -17
- package/dist/cjs/components/Popover/index.d.ts +0 -2
- package/dist/cjs/components/ProgressTracker/ProgressTracker.context.d.ts +0 -8
- package/dist/cjs/components/ProgressTracker/ProgressTracker.d.ts +0 -14
- package/dist/cjs/components/ProgressTracker/ProgressTracker.stories.d.ts +0 -45
- package/dist/cjs/components/ProgressTracker/ProgressTracker.tokens.d.ts +0 -72
- package/dist/cjs/components/ProgressTracker/ProgressTrackerItem.d.ts +0 -27
- package/dist/cjs/components/ProgressTracker/index.d.ts +0 -1
- package/dist/cjs/components/ScrollableContainer/ScrollableContainer.d.ts +0 -10
- package/dist/cjs/components/ScrollableContainer/ScrollableContainer.stories.d.ts +0 -18
- package/dist/cjs/components/ScrollableContainer/ScrollableContainer.tokens.d.ts +0 -25
- package/dist/cjs/components/ScrollableContainer/Scrollbar.d.ts +0 -10
- package/dist/cjs/components/ScrollableContainer/index.d.ts +0 -3
- package/dist/cjs/components/ScrollableContainer/scrollbarStyling.d.ts +0 -26
- package/dist/cjs/components/Search/AutocompleteSearch.context.d.ts +0 -12
- package/dist/cjs/components/Search/Search.d.ts +0 -22
- package/dist/cjs/components/Search/Search.stories.d.ts +0 -52
- package/dist/cjs/components/Search/Search.tokens.d.ts +0 -64
- package/dist/cjs/components/Search/Search.utils.d.ts +0 -9
- package/dist/cjs/components/Search/SearchAutocompleteWrapper.d.ts +0 -34
- package/dist/cjs/components/Search/SearchSuggestions.d.ts +0 -29
- package/dist/cjs/components/Search/index.d.ts +0 -10
- package/dist/cjs/components/Select/CustomSelect.stories.d.ts +0 -66
- package/dist/cjs/components/Select/MultiSelect.stories.d.ts +0 -75
- package/dist/cjs/components/Select/Select.d.ts +0 -37
- package/dist/cjs/components/Select/Select.stories.d.ts +0 -71
- package/dist/cjs/components/Select/Select.styles.d.ts +0 -18
- package/dist/cjs/components/Select/Select.tokens.d.ts +0 -143
- package/dist/cjs/components/Select/index.d.ts +0 -1
- package/dist/cjs/components/SelectionControl/Checkbox/Checkbox.d.ts +0 -10
- package/dist/cjs/components/SelectionControl/Checkbox/Checkbox.stories.d.ts +0 -50
- package/dist/cjs/components/SelectionControl/Checkbox/Checkbox.types.d.ts +0 -15
- package/dist/cjs/components/SelectionControl/Checkbox/CheckboxGroup.d.ts +0 -18
- package/dist/cjs/components/SelectionControl/Checkbox/CheckboxGroup.stories.d.ts +0 -53
- package/dist/cjs/components/SelectionControl/Checkbox/CheckboxGroup.tokens.d.ts +0 -13
- package/dist/cjs/components/SelectionControl/Checkbox/CheckboxGroupContext.d.ts +0 -10
- package/dist/cjs/components/SelectionControl/Checkbox/index.d.ts +0 -3
- package/dist/cjs/components/SelectionControl/RadioButton/RadioButton.d.ts +0 -18
- package/dist/cjs/components/SelectionControl/RadioButton/RadioButton.stories.d.ts +0 -52
- package/dist/cjs/components/SelectionControl/RadioButton/RadioButton.types.d.ts +0 -12
- package/dist/cjs/components/SelectionControl/RadioButton/RadioButtonGroup.d.ts +0 -56
- package/dist/cjs/components/SelectionControl/RadioButton/RadioButtonGroup.stories.d.ts +0 -65
- package/dist/cjs/components/SelectionControl/RadioButton/RadioButtonGroupContext.d.ts +0 -14
- package/dist/cjs/components/SelectionControl/RadioButton/index.d.ts +0 -3
- package/dist/cjs/components/SelectionControl/SelectionControl.styles.d.ts +0 -20
- package/dist/cjs/components/SelectionControl/SelectionControl.tokens.d.ts +0 -94
- package/dist/cjs/components/SelectionControl/SelectionControl.utils.d.ts +0 -2
- package/dist/cjs/components/SkipToContent/SkipToContent.d.ts +0 -21
- package/dist/cjs/components/SkipToContent/SkipToContent.stories.d.ts +0 -33
- package/dist/cjs/components/SkipToContent/SkipToContent.tokens.d.ts +0 -14
- package/dist/cjs/components/SkipToContent/index.d.ts +0 -1
- package/dist/cjs/components/Spinner/Spinner.d.ts +0 -15
- package/dist/cjs/components/Spinner/Spinner.stories.d.ts +0 -26
- package/dist/cjs/components/Spinner/index.d.ts +0 -1
- package/dist/cjs/components/SplitButton/SplitButton.d.ts +0 -16
- package/dist/cjs/components/SplitButton/SplitButton.stories.d.ts +0 -10
- package/dist/cjs/components/SplitButton/SplitButton.tokens.d.ts +0 -7
- package/dist/cjs/components/SplitButton/index.d.ts +0 -1
- package/dist/cjs/components/Stack/Stack.d.ts +0 -39
- package/dist/cjs/components/Stack/Stack.stories.d.ts +0 -13
- package/dist/cjs/components/Stack/Stack.tokens.d.ts +0 -20
- package/dist/cjs/components/Stack/index.d.ts +0 -1
- package/dist/cjs/components/Table/Body.d.ts +0 -3
- package/dist/cjs/components/Table/Cell.d.ts +0 -15
- package/dist/cjs/components/Table/Foot.d.ts +0 -3
- package/dist/cjs/components/Table/Head.d.ts +0 -3
- package/dist/cjs/components/Table/Row.d.ts +0 -7
- package/dist/cjs/components/Table/SortCell.d.ts +0 -19
- package/dist/cjs/components/Table/Table.d.ts +0 -7
- package/dist/cjs/components/Table/Table.stories.d.ts +0 -57
- package/dist/cjs/components/Table/Table.styles.d.ts +0 -10
- package/dist/cjs/components/Table/Table.tokens.d.ts +0 -67
- package/dist/cjs/components/Table/Table.types.d.ts +0 -37
- package/dist/cjs/components/Table/TableWrapper.d.ts +0 -6
- package/dist/cjs/components/Table/collapsible/CollapsibleRow.d.ts +0 -7
- package/dist/cjs/components/Table/collapsible/CollapsibleTable.d.ts +0 -10
- package/dist/cjs/components/Table/collapsible/CollapsibleTable.stories.d.ts +0 -49
- package/dist/cjs/components/Table/collapsible/Table.context.d.ts +0 -10
- package/dist/cjs/components/Table/index.d.ts +0 -28
- package/dist/cjs/components/Table/tableData.d.ts +0 -17
- package/dist/cjs/components/Tabs/Tab.d.ts +0 -31
- package/dist/cjs/components/Tabs/TabList.d.ts +0 -3
- package/dist/cjs/components/Tabs/TabPanel.d.ts +0 -14
- package/dist/cjs/components/Tabs/TabPanels.d.ts +0 -3
- package/dist/cjs/components/Tabs/Tabs.context.d.ts +0 -15
- package/dist/cjs/components/Tabs/Tabs.d.ts +0 -27
- package/dist/cjs/components/Tabs/Tabs.stories.d.ts +0 -53
- package/dist/cjs/components/Tabs/Tabs.tokens.d.ts +0 -32
- package/dist/cjs/components/Tabs/index.d.ts +0 -5
- package/dist/cjs/components/Tag/Tag.d.ts +0 -17
- package/dist/cjs/components/Tag/Tag.stories.d.ts +0 -19
- package/dist/cjs/components/Tag/Tag.tokens.d.ts +0 -31
- package/dist/cjs/components/Tag/index.d.ts +0 -1
- package/dist/cjs/components/TextArea/TextArea.d.ts +0 -15
- package/dist/cjs/components/TextArea/TextArea.stories.d.ts +0 -52
- package/dist/cjs/components/TextArea/TextArea.tokens.d.ts +0 -5
- package/dist/cjs/components/TextArea/index.d.ts +0 -1
- package/dist/cjs/components/TextInput/CharCounter.d.ts +0 -7
- package/dist/cjs/components/TextInput/TextInput.d.ts +0 -10
- package/dist/cjs/components/TextInput/TextInput.stories.d.ts +0 -72
- package/dist/cjs/components/TextInput/TextInput.styles.d.ts +0 -17
- package/dist/cjs/components/TextInput/TextInput.tokens.d.ts +0 -37
- package/dist/cjs/components/TextInput/TextInput.types.d.ts +0 -21
- package/dist/cjs/components/TextInput/index.d.ts +0 -2
- package/dist/cjs/components/ToggleBar/ToggleBar.context.d.ts +0 -10
- package/dist/cjs/components/ToggleBar/ToggleBar.d.ts +0 -5
- package/dist/cjs/components/ToggleBar/ToggleBar.stories.d.ts +0 -23
- package/dist/cjs/components/ToggleBar/ToggleBar.tokens.d.ts +0 -84
- package/dist/cjs/components/ToggleBar/ToggleBar.types.d.ts +0 -19
- package/dist/cjs/components/ToggleBar/ToggleRadio.d.ts +0 -19
- package/dist/cjs/components/ToggleBar/ToggleRadio.styles.d.ts +0 -11
- package/dist/cjs/components/ToggleBar/index.d.ts +0 -3
- package/dist/cjs/components/ToggleButton/ToggleButton.d.ts +0 -7
- package/dist/cjs/components/ToggleButton/ToggleButton.stories.d.ts +0 -19
- package/dist/cjs/components/ToggleButton/ToggleButton.tokens.d.ts +0 -32
- package/dist/cjs/components/ToggleButton/ToggleButton.types.d.ts +0 -10
- package/dist/cjs/components/ToggleButton/ToggleButtonGroup.d.ts +0 -15
- package/dist/cjs/components/ToggleButton/ToggleButtonGroup.stories.d.ts +0 -11
- package/dist/cjs/components/ToggleButton/index.d.ts +0 -3
- package/dist/cjs/components/Tooltip/Tooltip.d.ts +0 -32
- package/dist/cjs/components/Tooltip/Tooltip.stories.d.ts +0 -35
- package/dist/cjs/components/Tooltip/Tooltip.styles.d.ts +0 -11
- package/dist/cjs/components/Tooltip/Tooltip.tokens.d.ts +0 -13
- package/dist/cjs/components/Tooltip/index.d.ts +0 -1
- package/dist/cjs/components/VisuallyHidden/VisuallyHidden.d.ts +0 -14
- package/dist/cjs/components/VisuallyHidden/VisuallyHidden.stories.d.ts +0 -19
- package/dist/cjs/components/VisuallyHidden/index.d.ts +0 -1
- package/dist/cjs/dds-core.d.ts +0 -1
- package/dist/cjs/dds-form.d.ts +0 -2
- package/dist/cjs/dds-icons.d.ts +0 -2
- package/dist/cjs/dds-typography.d.ts +0 -2
- package/dist/cjs/index.d.ts +0 -50
- package/dist/cjs/index.js +0 -9412
- package/dist/cjs/test/mocks/IntersectionObserver.d.ts +0 -1
- package/dist/cjs/test/mocks/ResizeObserver.d.ts +0 -6
- package/dist/cjs/utils/icon.d.ts +0 -3
- package/dist/cjs/utils/renderInputMessage.d.ts +0 -1
- package/dist/components/AppShell/AppShell.d.ts +0 -38
- package/dist/components/AppShell/AppShell.js +0 -56
- package/dist/components/AppShell/AppShell.stories.d.ts +0 -28
- package/dist/components/AppShell/AppShell.tokens.d.ts +0 -84
- package/dist/components/AppShell/AppShell.tokens.js +0 -68
- package/dist/components/AppShell/AppShellContext.d.ts +0 -10
- package/dist/components/AppShell/AppShellContext.js +0 -27
- package/dist/components/AppShell/Navigation/EmbeteIcon.d.ts +0 -7
- package/dist/components/AppShell/Navigation/EmbeteIcon.js +0 -21
- package/dist/components/AppShell/Navigation/Navigation.d.ts +0 -13
- package/dist/components/AppShell/Navigation/Navigation.js +0 -114
- package/dist/components/AppShell/Navigation/NavigationItem.d.ts +0 -20
- package/dist/components/AppShell/Navigation/NavigationItem.js +0 -80
- package/dist/components/AppShell/Navigation/NavigationLogo.d.ts +0 -3
- package/dist/components/AppShell/Navigation/NavigationLogo.js +0 -34
- package/dist/components/AppShell/Navigation/TopBar.d.ts +0 -23
- package/dist/components/AppShell/Navigation/TopBar.js +0 -78
- package/dist/components/AppShell/index.d.ts +0 -7
- package/dist/components/AppShell/index.js +0 -7
- package/dist/components/BackLink/BackLink.d.ts +0 -6
- package/dist/components/BackLink/BackLink.js +0 -31
- package/dist/components/BackLink/BackLink.stories.d.ts +0 -18
- package/dist/components/BackLink/BackLink.tokens.d.ts +0 -8
- package/dist/components/BackLink/BackLink.tokens.js +0 -16
- package/dist/components/BackLink/index.d.ts +0 -1
- package/dist/components/Breadcrumbs/Breadcrumb.d.ts +0 -3
- package/dist/components/Breadcrumbs/Breadcrumb.js +0 -30
- package/dist/components/Breadcrumbs/Breadcrumb.tokens.d.ts +0 -13
- package/dist/components/Breadcrumbs/Breadcrumb.tokens.js +0 -21
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +0 -4
- package/dist/components/Breadcrumbs/Breadcrumbs.js +0 -51
- package/dist/components/Breadcrumbs/Breadcrumbs.stories.d.ts +0 -8
- package/dist/components/Breadcrumbs/index.d.ts +0 -2
- package/dist/components/Button/Button.d.ts +0 -21
- package/dist/components/Button/Button.js +0 -96
- package/dist/components/Button/Button.stories.d.ts +0 -64
- package/dist/components/Button/Button.styles.d.ts +0 -25
- package/dist/components/Button/Button.styles.js +0 -80
- package/dist/components/Button/Button.tokens.d.ts +0 -332
- package/dist/components/Button/Button.tokens.js +0 -351
- package/dist/components/Button/Button.types.d.ts +0 -33
- package/dist/components/Button/index.d.ts +0 -2
- package/dist/components/Card/Card.d.ts +0 -26
- package/dist/components/Card/Card.js +0 -52
- package/dist/components/Card/Card.stories.d.ts +0 -15
- package/dist/components/Card/Card.tokens.d.ts +0 -27
- package/dist/components/Card/Card.tokens.js +0 -36
- package/dist/components/Card/CardAccordion/CardAccordion.d.ts +0 -18
- package/dist/components/Card/CardAccordion/CardAccordion.js +0 -60
- package/dist/components/Card/CardAccordion/CardAccordion.tokens.d.ts +0 -28
- package/dist/components/Card/CardAccordion/CardAccordion.tokens.js +0 -37
- package/dist/components/Card/CardAccordion/CardAccordionBody.d.ts +0 -27
- package/dist/components/Card/CardAccordion/CardAccordionBody.js +0 -90
- package/dist/components/Card/CardAccordion/CardAccordionHeader.d.ts +0 -36
- package/dist/components/Card/CardAccordion/CardAccordionHeader.js +0 -84
- package/dist/components/Card/CardAccordion/useElementHeight.d.ts +0 -1
- package/dist/components/Card/CardAccordion/useElementHeight.js +0 -22
- package/dist/components/Card/index.d.ts +0 -4
- package/dist/components/Chip/Chip.d.ts +0 -16
- package/dist/components/Chip/Chip.js +0 -52
- package/dist/components/Chip/Chip.stories.d.ts +0 -20
- package/dist/components/Chip/Chip.tokens.d.ts +0 -14
- package/dist/components/Chip/Chip.tokens.js +0 -22
- package/dist/components/Chip/ChipGroup.d.ts +0 -3
- package/dist/components/Chip/ChipGroup.js +0 -28
- package/dist/components/Chip/ChipGroup.stories.d.ts +0 -8
- package/dist/components/Chip/index.d.ts +0 -2
- package/dist/components/Datepicker/Datepicker.d.ts +0 -12
- package/dist/components/Datepicker/Datepicker.js +0 -103
- package/dist/components/Datepicker/Datepicker.stories.d.ts +0 -53
- package/dist/components/Datepicker/Datepicker.tokens.d.ts +0 -27
- package/dist/components/Datepicker/Datepicker.tokens.js +0 -35
- package/dist/components/Datepicker/calendar_today.svg.js +0 -4
- package/dist/components/Datepicker/index.d.ts +0 -1
- package/dist/components/DescriptionList/DescriptionList.d.ts +0 -23
- package/dist/components/DescriptionList/DescriptionList.js +0 -43
- package/dist/components/DescriptionList/DescriptionList.stories.d.ts +0 -19
- package/dist/components/DescriptionList/DescriptionList.tokens.d.ts +0 -37
- package/dist/components/DescriptionList/DescriptionList.tokens.js +0 -47
- package/dist/components/DescriptionList/DescriptionListDesc.d.ts +0 -15
- package/dist/components/DescriptionList/DescriptionListDesc.js +0 -32
- package/dist/components/DescriptionList/DescriptionListGroup.d.ts +0 -23
- package/dist/components/DescriptionList/DescriptionListGroup.js +0 -43
- package/dist/components/DescriptionList/DescriptionListTerm.d.ts +0 -3
- package/dist/components/DescriptionList/DescriptionListTerm.js +0 -22
- package/dist/components/DescriptionList/index.d.ts +0 -4
- package/dist/components/Divider/Divider.d.ts +0 -13
- package/dist/components/Divider/Divider.js +0 -31
- package/dist/components/Divider/Divider.stories.d.ts +0 -15
- package/dist/components/Divider/Divider.tokens.d.ts +0 -13
- package/dist/components/Divider/Divider.tokens.js +0 -20
- package/dist/components/Divider/index.d.ts +0 -1
- package/dist/components/Drawer/Drawer.d.ts +0 -50
- package/dist/components/Drawer/Drawer.js +0 -119
- package/dist/components/Drawer/Drawer.stories.d.ts +0 -24
- package/dist/components/Drawer/Drawer.tokens.d.ts +0 -9
- package/dist/components/Drawer/Drawer.tokens.js +0 -18
- package/dist/components/Drawer/DrawerGroup.d.ts +0 -15
- package/dist/components/Drawer/DrawerGroup.js +0 -51
- package/dist/components/Drawer/index.d.ts +0 -2
- package/dist/components/EmptyContent/EmptyContent.d.ts +0 -9
- package/dist/components/EmptyContent/EmptyContent.js +0 -35
- package/dist/components/EmptyContent/EmptyContent.stories.d.ts +0 -16
- package/dist/components/EmptyContent/index.d.ts +0 -1
- package/dist/components/Feedback/CommentComponent.d.ts +0 -13
- package/dist/components/Feedback/CommentComponent.js +0 -49
- package/dist/components/Feedback/Feedback.d.ts +0 -2
- package/dist/components/Feedback/Feedback.js +0 -97
- package/dist/components/Feedback/Feedback.stories.d.ts +0 -66
- package/dist/components/Feedback/Feedback.types.d.ts +0 -36
- package/dist/components/Feedback/FlexContainer.d.ts +0 -6
- package/dist/components/Feedback/FlexContainer.js +0 -12
- package/dist/components/Feedback/RatingComponent.d.ts +0 -11
- package/dist/components/Feedback/RatingComponent.js +0 -70
- package/dist/components/Feedback/index.d.ts +0 -2
- package/dist/components/FileUploader/ErrorList.d.ts +0 -9
- package/dist/components/FileUploader/ErrorList.js +0 -28
- package/dist/components/FileUploader/File.d.ts +0 -10
- package/dist/components/FileUploader/File.js +0 -66
- package/dist/components/FileUploader/FileUploader.d.ts +0 -22
- package/dist/components/FileUploader/FileUploader.js +0 -145
- package/dist/components/FileUploader/FileUploader.stories.d.ts +0 -28
- package/dist/components/FileUploader/FileUploader.tokens.d.ts +0 -25
- package/dist/components/FileUploader/FileUploader.tokens.js +0 -31
- package/dist/components/FileUploader/fileUploaderReducer.d.ts +0 -33
- package/dist/components/FileUploader/fileUploaderReducer.js +0 -37
- package/dist/components/FileUploader/index.d.ts +0 -1
- package/dist/components/FileUploader/types.d.ts +0 -10
- package/dist/components/FileUploader/useFileUploader.d.ts +0 -33
- package/dist/components/FileUploader/useFileUploader.js +0 -230
- package/dist/components/FileUploader/utils.d.ts +0 -7
- package/dist/components/FileUploader/utils.js +0 -32
- package/dist/components/GlobalMessage/GlobalMessage.d.ts +0 -27
- package/dist/components/GlobalMessage/GlobalMessage.js +0 -83
- package/dist/components/GlobalMessage/GlobalMessage.stories.d.ts +0 -31
- package/dist/components/GlobalMessage/GlobalMessage.tokens.d.ts +0 -50
- package/dist/components/GlobalMessage/GlobalMessage.tokens.js +0 -63
- package/dist/components/GlobalMessage/index.d.ts +0 -1
- package/dist/components/Grid/Grid.context.d.ts +0 -7
- package/dist/components/Grid/Grid.context.js +0 -11
- package/dist/components/Grid/Grid.d.ts +0 -24
- package/dist/components/Grid/Grid.js +0 -55
- package/dist/components/Grid/Grid.stories.d.ts +0 -11
- package/dist/components/Grid/Grid.tokens.d.ts +0 -82
- package/dist/components/Grid/Grid.tokens.js +0 -87
- package/dist/components/Grid/GridChild.d.ts +0 -22
- package/dist/components/Grid/GridChild.js +0 -43
- package/dist/components/Grid/index.d.ts +0 -2
- package/dist/components/InlineEdit/InlineEdit.d.ts +0 -5
- package/dist/components/InlineEdit/InlineEdit.js +0 -69
- package/dist/components/InlineEdit/InlineEdit.stories.d.ts +0 -34
- package/dist/components/InlineEdit/InlineEdit.styles.d.ts +0 -20
- package/dist/components/InlineEdit/InlineEdit.styles.js +0 -28
- package/dist/components/InlineEdit/InlineEdit.tokens.d.ts +0 -27
- package/dist/components/InlineEdit/InlineEdit.tokens.js +0 -29
- package/dist/components/InlineEdit/InlineEdit.types.d.ts +0 -35
- package/dist/components/InlineEdit/InlineEdit.utils.d.ts +0 -1
- package/dist/components/InlineEdit/InlineEdit.utils.js +0 -12
- package/dist/components/InlineEdit/InlineEditInput.d.ts +0 -2
- package/dist/components/InlineEdit/InlineEditInput.js +0 -32
- package/dist/components/InlineEdit/InlineEditInput.stories.d.ts +0 -37
- package/dist/components/InlineEdit/InlineEditTextArea.d.ts +0 -2
- package/dist/components/InlineEdit/InlineEditTextArea.js +0 -32
- package/dist/components/InlineEdit/InlineEditTextArea.stories.d.ts +0 -37
- package/dist/components/InlineEdit/InlineInput.d.ts +0 -4
- package/dist/components/InlineEdit/InlineInput.js +0 -57
- package/dist/components/InlineEdit/InlineTextArea.d.ts +0 -4
- package/dist/components/InlineEdit/InlineTextArea.js +0 -55
- package/dist/components/InlineEdit/index.d.ts +0 -3
- package/dist/components/InputMessage/InputMessage.d.ts +0 -17
- package/dist/components/InputMessage/InputMessage.js +0 -44
- package/dist/components/InputMessage/InputMessage.stories.d.ts +0 -21
- package/dist/components/InputMessage/InputMessage.tokens.d.ts +0 -16
- package/dist/components/InputMessage/InputMessage.tokens.js +0 -24
- package/dist/components/InputMessage/index.d.ts +0 -1
- package/dist/components/InternalHeader/InternalHeader.d.ts +0 -5
- package/dist/components/InternalHeader/InternalHeader.js +0 -111
- package/dist/components/InternalHeader/InternalHeader.stories.d.ts +0 -47
- package/dist/components/InternalHeader/InternalHeader.styles.d.ts +0 -31
- package/dist/components/InternalHeader/InternalHeader.styles.js +0 -56
- package/dist/components/InternalHeader/InternalHeader.tokens.d.ts +0 -47
- package/dist/components/InternalHeader/InternalHeader.tokens.js +0 -61
- package/dist/components/InternalHeader/InternalHeader.types.d.ts +0 -36
- package/dist/components/InternalHeader/InternalHeaderListItem.d.ts +0 -3
- package/dist/components/InternalHeader/InternalHeaderListItem.js +0 -21
- package/dist/components/InternalHeader/NavigationItem.d.ts +0 -14
- package/dist/components/InternalHeader/NavigationItem.js +0 -31
- package/dist/components/InternalHeader/index.d.ts +0 -2
- package/dist/components/List/List.d.ts +0 -21
- package/dist/components/List/List.js +0 -48
- package/dist/components/List/List.stories.d.ts +0 -18
- package/dist/components/List/List.tokens.d.ts +0 -24
- package/dist/components/List/List.tokens.js +0 -35
- package/dist/components/List/ListItem.d.ts +0 -3
- package/dist/components/List/ListItem.js +0 -22
- package/dist/components/List/bullets/jordskifterett_bullet1.svg.js +0 -4
- package/dist/components/List/bullets/lagmannsrett_bullet2.svg.js +0 -4
- package/dist/components/List/bullets/tingrett_bullet3.svg.js +0 -4
- package/dist/components/List/index.d.ts +0 -2
- package/dist/components/LocalMessage/LocalMessage.d.ts +0 -37
- package/dist/components/LocalMessage/LocalMessage.js +0 -118
- package/dist/components/LocalMessage/LocalMessage.stories.d.ts +0 -40
- package/dist/components/LocalMessage/LocalMessage.tokens.d.ts +0 -88
- package/dist/components/LocalMessage/LocalMessage.tokens.js +0 -97
- package/dist/components/LocalMessage/index.d.ts +0 -1
- package/dist/components/Modal/Backdrop/Backdrop.d.ts +0 -5
- package/dist/components/Modal/Backdrop/Backdrop.js +0 -13
- package/dist/components/Modal/Backdrop/Backdrop.utils.d.ts +0 -2
- package/dist/components/Modal/Backdrop/Backdrop.utils.js +0 -20
- package/dist/components/Modal/Backdrop/index.d.ts +0 -2
- package/dist/components/Modal/Modal.d.ts +0 -30
- package/dist/components/Modal/Modal.js +0 -113
- package/dist/components/Modal/Modal.stories.d.ts +0 -28
- package/dist/components/Modal/Modal.tokens.d.ts +0 -12
- package/dist/components/Modal/Modal.tokens.js +0 -20
- package/dist/components/Modal/ModalActions.d.ts +0 -3
- package/dist/components/Modal/ModalActions.js +0 -23
- package/dist/components/Modal/ModalBody.d.ts +0 -19
- package/dist/components/Modal/ModalBody.js +0 -36
- package/dist/components/Modal/index.d.ts +0 -3
- package/dist/components/OverflowMenu/OverflowMenu.d.ts +0 -24
- package/dist/components/OverflowMenu/OverflowMenu.js +0 -161
- package/dist/components/OverflowMenu/OverflowMenu.stories.d.ts +0 -27
- package/dist/components/OverflowMenu/OverflowMenu.tokens.d.ts +0 -34
- package/dist/components/OverflowMenu/OverflowMenu.tokens.js +0 -48
- package/dist/components/OverflowMenu/OverflowMenu.types.d.ts +0 -37
- package/dist/components/OverflowMenu/OverflowMenuGroup.d.ts +0 -17
- package/dist/components/OverflowMenu/OverflowMenuGroup.js +0 -55
- package/dist/components/OverflowMenu/OverflowMenuItem.d.ts +0 -21
- package/dist/components/OverflowMenu/OverflowMenuItem.js +0 -109
- package/dist/components/OverflowMenu/index.d.ts +0 -3
- package/dist/components/Pagination/Pagination.d.ts +0 -52
- package/dist/components/Pagination/Pagination.js +0 -233
- package/dist/components/Pagination/Pagination.stories.d.ts +0 -48
- package/dist/components/Pagination/Pagination.tokens.d.ts +0 -14
- package/dist/components/Pagination/Pagination.tokens.js +0 -24
- package/dist/components/Pagination/index.d.ts +0 -1
- package/dist/components/Pagination/paginationGenerator.d.ts +0 -1
- package/dist/components/Pagination/paginationGenerator.js +0 -37
- package/dist/components/Popover/Popover.d.ts +0 -60
- package/dist/components/Popover/Popover.js +0 -118
- package/dist/components/Popover/Popover.stories.d.ts +0 -55
- package/dist/components/Popover/Popover.tokens.d.ts +0 -17
- package/dist/components/Popover/Popover.tokens.js +0 -26
- package/dist/components/Popover/PopoverGroup.d.ts +0 -17
- package/dist/components/Popover/PopoverGroup.js +0 -62
- package/dist/components/Popover/index.d.ts +0 -2
- package/dist/components/ProgressTracker/ProgressTracker.context.d.ts +0 -8
- package/dist/components/ProgressTracker/ProgressTracker.context.js +0 -10
- package/dist/components/ProgressTracker/ProgressTracker.d.ts +0 -14
- package/dist/components/ProgressTracker/ProgressTracker.js +0 -93
- package/dist/components/ProgressTracker/ProgressTracker.stories.d.ts +0 -45
- package/dist/components/ProgressTracker/ProgressTracker.tokens.d.ts +0 -72
- package/dist/components/ProgressTracker/ProgressTracker.tokens.js +0 -81
- package/dist/components/ProgressTracker/ProgressTrackerItem.d.ts +0 -27
- package/dist/components/ProgressTracker/ProgressTrackerItem.js +0 -125
- package/dist/components/ProgressTracker/index.d.ts +0 -1
- package/dist/components/ScrollableContainer/ScrollableContainer.d.ts +0 -10
- package/dist/components/ScrollableContainer/ScrollableContainer.js +0 -46
- package/dist/components/ScrollableContainer/ScrollableContainer.stories.d.ts +0 -18
- package/dist/components/ScrollableContainer/ScrollableContainer.tokens.d.ts +0 -25
- package/dist/components/ScrollableContainer/ScrollableContainer.tokens.js +0 -36
- package/dist/components/ScrollableContainer/Scrollbar.d.ts +0 -10
- package/dist/components/ScrollableContainer/Scrollbar.js +0 -164
- package/dist/components/ScrollableContainer/index.d.ts +0 -3
- package/dist/components/ScrollableContainer/scrollbarStyling.d.ts +0 -26
- package/dist/components/ScrollableContainer/scrollbarStyling.js +0 -37
- package/dist/components/Search/AutocompleteSearch.context.d.ts +0 -12
- package/dist/components/Search/AutocompleteSearch.context.js +0 -8
- package/dist/components/Search/Search.d.ts +0 -22
- package/dist/components/Search/Search.js +0 -172
- package/dist/components/Search/Search.stories.d.ts +0 -52
- package/dist/components/Search/Search.tokens.d.ts +0 -64
- package/dist/components/Search/Search.tokens.js +0 -82
- package/dist/components/Search/Search.utils.d.ts +0 -9
- package/dist/components/Search/Search.utils.js +0 -35
- package/dist/components/Search/SearchAutocompleteWrapper.d.ts +0 -34
- package/dist/components/Search/SearchAutocompleteWrapper.js +0 -111
- package/dist/components/Search/SearchSuggestions.d.ts +0 -29
- package/dist/components/Search/SearchSuggestions.js +0 -91
- package/dist/components/Search/index.d.ts +0 -10
- package/dist/components/Search/index.js +0 -9
- package/dist/components/Select/CustomSelect.stories.d.ts +0 -66
- package/dist/components/Select/MultiSelect.stories.d.ts +0 -75
- package/dist/components/Select/Select.d.ts +0 -37
- package/dist/components/Select/Select.js +0 -204
- package/dist/components/Select/Select.stories.d.ts +0 -71
- package/dist/components/Select/Select.styles.d.ts +0 -18
- package/dist/components/Select/Select.styles.js +0 -230
- package/dist/components/Select/Select.tokens.d.ts +0 -143
- package/dist/components/Select/Select.tokens.js +0 -166
- package/dist/components/Select/index.d.ts +0 -1
- package/dist/components/SelectionControl/Checkbox/Checkbox.d.ts +0 -10
- package/dist/components/SelectionControl/Checkbox/Checkbox.js +0 -67
- package/dist/components/SelectionControl/Checkbox/Checkbox.stories.d.ts +0 -50
- package/dist/components/SelectionControl/Checkbox/Checkbox.types.d.ts +0 -15
- package/dist/components/SelectionControl/Checkbox/CheckboxGroup.d.ts +0 -18
- package/dist/components/SelectionControl/Checkbox/CheckboxGroup.js +0 -59
- package/dist/components/SelectionControl/Checkbox/CheckboxGroup.stories.d.ts +0 -53
- package/dist/components/SelectionControl/Checkbox/CheckboxGroup.tokens.d.ts +0 -13
- package/dist/components/SelectionControl/Checkbox/CheckboxGroupContext.d.ts +0 -10
- package/dist/components/SelectionControl/Checkbox/CheckboxGroupContext.js +0 -8
- package/dist/components/SelectionControl/Checkbox/index.d.ts +0 -3
- package/dist/components/SelectionControl/RadioButton/RadioButton.d.ts +0 -18
- package/dist/components/SelectionControl/RadioButton/RadioButton.js +0 -86
- package/dist/components/SelectionControl/RadioButton/RadioButton.stories.d.ts +0 -52
- package/dist/components/SelectionControl/RadioButton/RadioButton.types.d.ts +0 -12
- package/dist/components/SelectionControl/RadioButton/RadioButtonGroup.d.ts +0 -56
- package/dist/components/SelectionControl/RadioButton/RadioButtonGroup.js +0 -82
- package/dist/components/SelectionControl/RadioButton/RadioButtonGroup.stories.d.ts +0 -65
- package/dist/components/SelectionControl/RadioButton/RadioButtonGroupContext.d.ts +0 -14
- package/dist/components/SelectionControl/RadioButton/RadioButtonGroupContext.js +0 -8
- package/dist/components/SelectionControl/RadioButton/index.d.ts +0 -3
- package/dist/components/SelectionControl/SelectionControl.styles.d.ts +0 -20
- package/dist/components/SelectionControl/SelectionControl.styles.js +0 -45
- package/dist/components/SelectionControl/SelectionControl.tokens.d.ts +0 -94
- package/dist/components/SelectionControl/SelectionControl.tokens.js +0 -108
- package/dist/components/SelectionControl/SelectionControl.utils.d.ts +0 -2
- package/dist/components/SelectionControl/SelectionControl.utils.js +0 -4
- package/dist/components/SkipToContent/SkipToContent.d.ts +0 -21
- package/dist/components/SkipToContent/SkipToContent.js +0 -50
- package/dist/components/SkipToContent/SkipToContent.stories.d.ts +0 -33
- package/dist/components/SkipToContent/SkipToContent.tokens.d.ts +0 -14
- package/dist/components/SkipToContent/SkipToContent.tokens.js +0 -22
- package/dist/components/SkipToContent/index.d.ts +0 -1
- package/dist/components/Spinner/Spinner.d.ts +0 -15
- package/dist/components/Spinner/Spinner.js +0 -74
- package/dist/components/Spinner/Spinner.stories.d.ts +0 -26
- package/dist/components/Spinner/index.d.ts +0 -1
- package/dist/components/SplitButton/SplitButton.d.ts +0 -16
- package/dist/components/SplitButton/SplitButton.js +0 -63
- package/dist/components/SplitButton/SplitButton.stories.d.ts +0 -10
- package/dist/components/SplitButton/SplitButton.tokens.d.ts +0 -7
- package/dist/components/SplitButton/SplitButton.tokens.js +0 -12
- package/dist/components/SplitButton/index.d.ts +0 -1
- package/dist/components/Stack/Stack.d.ts +0 -39
- package/dist/components/Stack/Stack.js +0 -52
- package/dist/components/Stack/Stack.stories.d.ts +0 -13
- package/dist/components/Stack/Stack.tokens.d.ts +0 -20
- package/dist/components/Stack/Stack.tokens.js +0 -26
- package/dist/components/Stack/index.d.ts +0 -1
- package/dist/components/Table/Body.d.ts +0 -3
- package/dist/components/Table/Body.js +0 -22
- package/dist/components/Table/Cell.d.ts +0 -15
- package/dist/components/Table/Cell.js +0 -78
- package/dist/components/Table/Foot.d.ts +0 -3
- package/dist/components/Table/Foot.js +0 -22
- package/dist/components/Table/Head.d.ts +0 -3
- package/dist/components/Table/Head.js +0 -22
- package/dist/components/Table/Row.d.ts +0 -7
- package/dist/components/Table/Row.js +0 -25
- package/dist/components/Table/SortCell.d.ts +0 -19
- package/dist/components/Table/SortCell.js +0 -51
- package/dist/components/Table/Table.d.ts +0 -7
- package/dist/components/Table/Table.js +0 -44
- package/dist/components/Table/Table.stories.d.ts +0 -57
- package/dist/components/Table/Table.styles.d.ts +0 -10
- package/dist/components/Table/Table.styles.js +0 -24
- package/dist/components/Table/Table.tokens.d.ts +0 -67
- package/dist/components/Table/Table.tokens.js +0 -80
- package/dist/components/Table/Table.types.d.ts +0 -37
- package/dist/components/Table/TableWrapper.d.ts +0 -6
- package/dist/components/Table/TableWrapper.js +0 -58
- package/dist/components/Table/collapsible/CollapsibleRow.d.ts +0 -7
- package/dist/components/Table/collapsible/CollapsibleRow.js +0 -138
- package/dist/components/Table/collapsible/CollapsibleTable.d.ts +0 -10
- package/dist/components/Table/collapsible/CollapsibleTable.js +0 -42
- package/dist/components/Table/collapsible/CollapsibleTable.stories.d.ts +0 -49
- package/dist/components/Table/collapsible/Table.context.d.ts +0 -10
- package/dist/components/Table/collapsible/Table.context.js +0 -11
- package/dist/components/Table/index.d.ts +0 -28
- package/dist/components/Table/index.js +0 -23
- package/dist/components/Table/tableData.d.ts +0 -17
- package/dist/components/Tabs/Tab.d.ts +0 -31
- package/dist/components/Tabs/Tab.js +0 -89
- package/dist/components/Tabs/TabList.d.ts +0 -3
- package/dist/components/Tabs/TabList.js +0 -78
- package/dist/components/Tabs/TabPanel.d.ts +0 -14
- package/dist/components/Tabs/TabPanel.js +0 -37
- package/dist/components/Tabs/TabPanels.d.ts +0 -3
- package/dist/components/Tabs/TabPanels.js +0 -32
- package/dist/components/Tabs/Tabs.context.d.ts +0 -15
- package/dist/components/Tabs/Tabs.context.js +0 -21
- package/dist/components/Tabs/Tabs.d.ts +0 -27
- package/dist/components/Tabs/Tabs.js +0 -70
- package/dist/components/Tabs/Tabs.stories.d.ts +0 -53
- package/dist/components/Tabs/Tabs.tokens.d.ts +0 -32
- package/dist/components/Tabs/Tabs.tokens.js +0 -42
- package/dist/components/Tabs/index.d.ts +0 -5
- package/dist/components/Tag/Tag.d.ts +0 -17
- package/dist/components/Tag/Tag.js +0 -35
- package/dist/components/Tag/Tag.stories.d.ts +0 -19
- package/dist/components/Tag/Tag.tokens.d.ts +0 -31
- package/dist/components/Tag/Tag.tokens.js +0 -27
- package/dist/components/Tag/index.d.ts +0 -1
- package/dist/components/TextArea/TextArea.d.ts +0 -15
- package/dist/components/TextArea/TextArea.js +0 -92
- package/dist/components/TextArea/TextArea.stories.d.ts +0 -52
- package/dist/components/TextArea/TextArea.tokens.d.ts +0 -5
- package/dist/components/TextArea/TextArea.tokens.js +0 -11
- package/dist/components/TextArea/index.d.ts +0 -1
- package/dist/components/TextInput/CharCounter.d.ts +0 -7
- package/dist/components/TextInput/CharCounter.js +0 -29
- package/dist/components/TextInput/TextInput.d.ts +0 -10
- package/dist/components/TextInput/TextInput.js +0 -187
- package/dist/components/TextInput/TextInput.stories.d.ts +0 -72
- package/dist/components/TextInput/TextInput.styles.d.ts +0 -17
- package/dist/components/TextInput/TextInput.styles.js +0 -31
- package/dist/components/TextInput/TextInput.tokens.d.ts +0 -37
- package/dist/components/TextInput/TextInput.tokens.js +0 -47
- package/dist/components/TextInput/TextInput.types.d.ts +0 -21
- package/dist/components/TextInput/index.d.ts +0 -2
- package/dist/components/ToggleBar/ToggleBar.context.d.ts +0 -10
- package/dist/components/ToggleBar/ToggleBar.context.js +0 -10
- package/dist/components/ToggleBar/ToggleBar.d.ts +0 -5
- package/dist/components/ToggleBar/ToggleBar.js +0 -70
- package/dist/components/ToggleBar/ToggleBar.stories.d.ts +0 -23
- package/dist/components/ToggleBar/ToggleBar.tokens.d.ts +0 -84
- package/dist/components/ToggleBar/ToggleBar.tokens.js +0 -102
- package/dist/components/ToggleBar/ToggleBar.types.d.ts +0 -19
- package/dist/components/ToggleBar/ToggleRadio.d.ts +0 -19
- package/dist/components/ToggleBar/ToggleRadio.js +0 -71
- package/dist/components/ToggleBar/ToggleRadio.styles.d.ts +0 -11
- package/dist/components/ToggleBar/ToggleRadio.styles.js +0 -21
- package/dist/components/ToggleBar/index.d.ts +0 -3
- package/dist/components/ToggleButton/ToggleButton.d.ts +0 -7
- package/dist/components/ToggleButton/ToggleButton.js +0 -51
- package/dist/components/ToggleButton/ToggleButton.stories.d.ts +0 -19
- package/dist/components/ToggleButton/ToggleButton.tokens.d.ts +0 -32
- package/dist/components/ToggleButton/ToggleButton.tokens.js +0 -35
- package/dist/components/ToggleButton/ToggleButton.types.d.ts +0 -10
- package/dist/components/ToggleButton/ToggleButtonGroup.d.ts +0 -15
- package/dist/components/ToggleButton/ToggleButtonGroup.js +0 -52
- package/dist/components/ToggleButton/ToggleButtonGroup.stories.d.ts +0 -11
- package/dist/components/ToggleButton/index.d.ts +0 -3
- package/dist/components/Tooltip/Tooltip.d.ts +0 -32
- package/dist/components/Tooltip/Tooltip.js +0 -143
- package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -35
- package/dist/components/Tooltip/Tooltip.styles.d.ts +0 -11
- package/dist/components/Tooltip/Tooltip.styles.js +0 -27
- package/dist/components/Tooltip/Tooltip.tokens.d.ts +0 -13
- package/dist/components/Tooltip/Tooltip.tokens.js +0 -21
- package/dist/components/Tooltip/index.d.ts +0 -1
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +0 -14
- package/dist/components/VisuallyHidden/VisuallyHidden.js +0 -29
- package/dist/components/VisuallyHidden/VisuallyHidden.stories.d.ts +0 -19
- package/dist/components/VisuallyHidden/index.d.ts +0 -1
- package/dist/dds-core.d.ts +0 -1
- package/dist/dds-form.d.ts +0 -2
- package/dist/dds-icons.d.ts +0 -2
- package/dist/dds-typography.d.ts +0 -2
- package/dist/test/mocks/IntersectionObserver.d.ts +0 -1
- package/dist/test/mocks/ResizeObserver.d.ts +0 -6
- package/dist/utils/icon.d.ts +0 -3
- package/dist/utils/icon.js +0 -12
- package/dist/utils/renderInputMessage.d.ts +0 -1
- package/dist/utils/renderInputMessage.js +0 -18
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { AnchorHTMLAttributes, RefObject } from 'react';
|
|
2
|
-
import { BaseComponentPropsWithChildren } from '@norges-domstoler/dds-core';
|
|
3
|
-
export type CardColor = 'filledDark' | 'filledLight' | 'strokeDark' | 'strokeLight';
|
|
4
|
-
export type CardType = 'info' | 'navigation' | 'expandable';
|
|
5
|
-
type BaseCardProps<T extends HTMLElement> = BaseComponentPropsWithChildren<T, {
|
|
6
|
-
/** Fargepalett i komponenten. */
|
|
7
|
-
color?: CardColor;
|
|
8
|
-
/** Referanse til komponenten. */
|
|
9
|
-
cardRef?: RefObject<T>;
|
|
10
|
-
}>;
|
|
11
|
-
export type InfoCardProps = BaseCardProps<HTMLDivElement> & {
|
|
12
|
-
/** Spesifiserer funksjonalitet og formål med komponenten. **OBS!** ved `'navigation'` må `href` oppgis. Ved `'expandable'` må alle `<Card />` grupperte sammen ligge egen `<div>` container. */
|
|
13
|
-
cardType: 'info';
|
|
14
|
-
};
|
|
15
|
-
export type NavigationCardProps = BaseCardProps<HTMLAnchorElement> & {
|
|
16
|
-
cardType: 'navigation';
|
|
17
|
-
} & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'target'>;
|
|
18
|
-
export type ExpandableCardProps = BaseCardProps<HTMLDivElement> & {
|
|
19
|
-
cardType: 'expandable';
|
|
20
|
-
};
|
|
21
|
-
export type CardProps = InfoCardProps | NavigationCardProps | ExpandableCardProps;
|
|
22
|
-
export declare const Card: {
|
|
23
|
-
(props: CardProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
displayName: string;
|
|
25
|
-
};
|
|
26
|
-
export {};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { __rest } from 'tslib';
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import styled, { css } from 'styled-components';
|
|
4
|
-
import { cardTokens } from './Card.tokens.js';
|
|
5
|
-
import { selection, getBaseHTMLProps } from '@norges-domstoler/dds-core';
|
|
6
|
-
import { getFontStyling, defaultTypographyType } from '@norges-domstoler/dds-typography';
|
|
7
|
-
import { hoverWithBorder, focusVisibleWithBorder } from '@norges-domstoler/dds-form';
|
|
8
|
-
|
|
9
|
-
var Container = styled.div.withConfig({
|
|
10
|
-
displayName: "Card__Container",
|
|
11
|
-
componentId: "sc-410ao9-0"
|
|
12
|
-
})(["border:", ";", ";&::selection,*::selection{", "}@media (prefers-reduced-motion:no-preference){transition:box-shadow 0.2s,border-color 0.2s;}", " ", ""], cardTokens.base.border, getFontStyling(defaultTypographyType), selection, function (_ref) {
|
|
13
|
-
var color = _ref.color;
|
|
14
|
-
return color && css(["color:", ";background-color:", ";border-color:", ";"], cardTokens.colors[color].color, cardTokens.colors[color].backgroundColor, cardTokens.colors[color].borderColor);
|
|
15
|
-
}, function (_ref2) {
|
|
16
|
-
var cardType = _ref2.cardType;
|
|
17
|
-
return cardType === 'navigation' ? css(["text-decoration:none;&:hover{", "}&:focus{", "}"], hoverWithBorder, focusVisibleWithBorder) : cardType === 'expandable' ? css(["width:100%;box-sizing:border-box;&:not(:first-of-type){border-top:none;}"]) : '';
|
|
18
|
-
});
|
|
19
|
-
var Card = function Card(props) {
|
|
20
|
-
var _props$color = props.color,
|
|
21
|
-
color = _props$color === void 0 ? 'filledLight' : _props$color,
|
|
22
|
-
cardType = props.cardType,
|
|
23
|
-
cardRef = props.cardRef,
|
|
24
|
-
children = props.children,
|
|
25
|
-
id = props.id,
|
|
26
|
-
className = props.className,
|
|
27
|
-
htmlProps = props.htmlProps,
|
|
28
|
-
rest = __rest(props, ["color", "cardType", "cardRef", "children", "id", "className", "htmlProps"]);
|
|
29
|
-
if (cardType === 'navigation') {
|
|
30
|
-
var href = props.href,
|
|
31
|
-
target = props.target;
|
|
32
|
-
return jsx(Container, Object.assign({}, getBaseHTMLProps(id, className, htmlProps, rest), {
|
|
33
|
-
cardType: cardType,
|
|
34
|
-
color: color,
|
|
35
|
-
as: "a",
|
|
36
|
-
ref: cardRef,
|
|
37
|
-
href: href,
|
|
38
|
-
target: target,
|
|
39
|
-
children: children
|
|
40
|
-
}));
|
|
41
|
-
}
|
|
42
|
-
return jsx(Container, Object.assign({}, getBaseHTMLProps(id, className, htmlProps, rest), {
|
|
43
|
-
cardType: cardType,
|
|
44
|
-
color: color,
|
|
45
|
-
as: "div",
|
|
46
|
-
ref: cardRef,
|
|
47
|
-
children: children
|
|
48
|
-
}));
|
|
49
|
-
};
|
|
50
|
-
Card.displayName = 'Card';
|
|
51
|
-
|
|
52
|
-
export { Card };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { CardProps, ExpandableCardProps } from '.';
|
|
2
|
-
declare const _default: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: {
|
|
5
|
-
(props: CardProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
displayName: string;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
export default _default;
|
|
10
|
-
export declare const Overview: () => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export declare const Default: (args: CardProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export declare const Accordion: (args: ExpandableCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export declare const AccordionControlled: (args: ExpandableCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export declare const AccordionCustom: (args: ExpandableCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export declare const Examples: (args: CardProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export declare const cardTokens: {
|
|
2
|
-
base: {
|
|
3
|
-
border: string;
|
|
4
|
-
};
|
|
5
|
-
colors: {
|
|
6
|
-
filledLight: {
|
|
7
|
-
backgroundColor: string;
|
|
8
|
-
borderColor: string;
|
|
9
|
-
color: string;
|
|
10
|
-
};
|
|
11
|
-
filledDark: {
|
|
12
|
-
backgroundColor: string;
|
|
13
|
-
borderColor: string;
|
|
14
|
-
color: string;
|
|
15
|
-
};
|
|
16
|
-
strokeDark: {
|
|
17
|
-
backgroundColor: string;
|
|
18
|
-
borderColor: string;
|
|
19
|
-
color: string;
|
|
20
|
-
};
|
|
21
|
-
strokeLight: {
|
|
22
|
-
backgroundColor: string;
|
|
23
|
-
borderColor: string;
|
|
24
|
-
color: string;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { ddsBaseTokens, ddsReferenceTokens } from '@norges-domstoler/dds-design-tokens';
|
|
2
|
-
|
|
3
|
-
var colors = ddsBaseTokens.colors,
|
|
4
|
-
border = ddsBaseTokens.border;
|
|
5
|
-
var textDefault = ddsReferenceTokens.textDefault;
|
|
6
|
-
var base = {
|
|
7
|
-
border: "".concat(border.BordersDdsBorderStyleLightStrokeWeight, " solid")
|
|
8
|
-
};
|
|
9
|
-
var cardColors = {
|
|
10
|
-
filledLight: {
|
|
11
|
-
backgroundColor: colors.DdsColorPrimaryLightest,
|
|
12
|
-
borderColor: colors.DdsColorPrimaryLightest,
|
|
13
|
-
color: textDefault.textColor
|
|
14
|
-
},
|
|
15
|
-
filledDark: {
|
|
16
|
-
backgroundColor: colors.DdsColorPrimaryBase,
|
|
17
|
-
borderColor: colors.DdsColorPrimaryBase,
|
|
18
|
-
color: colors.DdsColorNeutralsWhite
|
|
19
|
-
},
|
|
20
|
-
strokeDark: {
|
|
21
|
-
backgroundColor: colors.DdsColorNeutralsWhite,
|
|
22
|
-
borderColor: border.BordersDdsBorderStyleLightStroke,
|
|
23
|
-
color: textDefault.textColor
|
|
24
|
-
},
|
|
25
|
-
strokeLight: {
|
|
26
|
-
backgroundColor: colors.DdsColorNeutralsWhite,
|
|
27
|
-
borderColor: border.BordersDdsBorderStyleLightStroke,
|
|
28
|
-
color: textDefault.textColor
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
var cardTokens = {
|
|
32
|
-
base: base,
|
|
33
|
-
colors: cardColors
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export { cardTokens };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { BaseComponentPropsWithChildren } from '@norges-domstoler/dds-core';
|
|
3
|
-
export type CardAccordionProps = BaseComponentPropsWithChildren<HTMLDivElement, {
|
|
4
|
-
/**Spesifiserer om body skal være utvidet ved innlastning. */
|
|
5
|
-
isExpanded?: boolean;
|
|
6
|
-
/**For å lytte til endringer i expanded-state. */
|
|
7
|
-
onChange?: (expanded: boolean) => void;
|
|
8
|
-
}>;
|
|
9
|
-
export declare const CardAccordion: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
|
|
10
|
-
/**Spesifiserer om body skal være utvidet ved innlastning. */
|
|
11
|
-
isExpanded?: boolean | undefined;
|
|
12
|
-
/**For å lytte til endringer i expanded-state. */
|
|
13
|
-
onChange?: ((expanded: boolean) => void) | undefined;
|
|
14
|
-
} & {
|
|
15
|
-
children?: import("react").ReactNode;
|
|
16
|
-
} & {
|
|
17
|
-
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
18
|
-
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { slicedToArray as _slicedToArray } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import { __rest } from 'tslib';
|
|
3
|
-
import { jsx } from 'react/jsx-runtime';
|
|
4
|
-
import { forwardRef, useState, useId, useEffect, useCallback, Children, isValidElement, cloneElement } from 'react';
|
|
5
|
-
import styled from 'styled-components';
|
|
6
|
-
import { getBaseHTMLProps } from '@norges-domstoler/dds-core';
|
|
7
|
-
|
|
8
|
-
var Wrapper = styled.div.withConfig({
|
|
9
|
-
displayName: "CardAccordion__Wrapper",
|
|
10
|
-
componentId: "sc-1ctxrby-0"
|
|
11
|
-
})([""]);
|
|
12
|
-
var CardAccordion = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
13
|
-
var _props$isExpanded = props.isExpanded,
|
|
14
|
-
isExpanded = _props$isExpanded === void 0 ? false : _props$isExpanded,
|
|
15
|
-
onChange = props.onChange,
|
|
16
|
-
id = props.id,
|
|
17
|
-
children = props.children,
|
|
18
|
-
className = props.className,
|
|
19
|
-
htmlProps = props.htmlProps,
|
|
20
|
-
rest = __rest(props, ["isExpanded", "onChange", "id", "children", "className", "htmlProps"]);
|
|
21
|
-
var _useState = useState(isExpanded),
|
|
22
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
23
|
-
expanded = _useState2[0],
|
|
24
|
-
setExpanded = _useState2[1];
|
|
25
|
-
var generatedId = useId();
|
|
26
|
-
var accordionId = id !== null && id !== void 0 ? id : "".concat(generatedId, "-cardAccordion");
|
|
27
|
-
useEffect(function () {
|
|
28
|
-
setExpanded(isExpanded);
|
|
29
|
-
}, [isExpanded]);
|
|
30
|
-
var toggleExpanded = useCallback(function () {
|
|
31
|
-
var newExpanded = !expanded;
|
|
32
|
-
setExpanded(newExpanded);
|
|
33
|
-
if (onChange) {
|
|
34
|
-
onChange(newExpanded);
|
|
35
|
-
}
|
|
36
|
-
}, [expanded, onChange]);
|
|
37
|
-
var Children$1 = Children.map(children, function (child, childIndex) {
|
|
38
|
-
var headerId = "".concat(accordionId, "-header");
|
|
39
|
-
var bodyId = "".concat(accordionId, "-body");
|
|
40
|
-
return /*#__PURE__*/isValidElement(child) && (childIndex === 0 ? /*#__PURE__*/cloneElement(child, {
|
|
41
|
-
isExpanded: expanded,
|
|
42
|
-
toggleExpanded: toggleExpanded,
|
|
43
|
-
id: headerId,
|
|
44
|
-
bodyId: bodyId
|
|
45
|
-
}) : /*#__PURE__*/cloneElement(child, {
|
|
46
|
-
isExpanded: expanded,
|
|
47
|
-
id: bodyId,
|
|
48
|
-
headerId: headerId
|
|
49
|
-
}));
|
|
50
|
-
});
|
|
51
|
-
var wrapperProps = Object.assign(Object.assign({}, getBaseHTMLProps(id, className, htmlProps, rest)), {
|
|
52
|
-
ref: ref
|
|
53
|
-
});
|
|
54
|
-
return jsx(Wrapper, Object.assign({}, wrapperProps, {
|
|
55
|
-
children: Children$1
|
|
56
|
-
}));
|
|
57
|
-
});
|
|
58
|
-
CardAccordion.displayName = 'CardAccordion';
|
|
59
|
-
|
|
60
|
-
export { CardAccordion };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { StaticTypographyType } from '@norges-domstoler/dds-typography';
|
|
2
|
-
export declare const typographyTypes: {
|
|
3
|
-
body: StaticTypographyType;
|
|
4
|
-
header: StaticTypographyType;
|
|
5
|
-
};
|
|
6
|
-
export declare const cardAccordionTokens: {
|
|
7
|
-
header: {
|
|
8
|
-
padding: string;
|
|
9
|
-
hover: {
|
|
10
|
-
boxShadow: string;
|
|
11
|
-
};
|
|
12
|
-
focus: {
|
|
13
|
-
boxShadow: string;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
body: {
|
|
17
|
-
padding: string;
|
|
18
|
-
};
|
|
19
|
-
chevronWrapper: {
|
|
20
|
-
width: string;
|
|
21
|
-
height: string;
|
|
22
|
-
marginLeft: string;
|
|
23
|
-
};
|
|
24
|
-
chevron: {
|
|
25
|
-
width: string;
|
|
26
|
-
height: string;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { ddsBaseTokens } from '@norges-domstoler/dds-design-tokens';
|
|
2
|
-
|
|
3
|
-
var spacing = ddsBaseTokens.spacing,
|
|
4
|
-
border = ddsBaseTokens.border,
|
|
5
|
-
iconSizes = ddsBaseTokens.iconSizes;
|
|
6
|
-
var typographyTypes = {
|
|
7
|
-
body: 'bodySans03',
|
|
8
|
-
header: 'headingSans03'
|
|
9
|
-
};
|
|
10
|
-
var header = {
|
|
11
|
-
padding: "".concat(spacing.SizesDdsSpacingLocalX1, " ").concat(spacing.SizesDdsSpacingLocalX075, " ").concat(spacing.SizesDdsSpacingLocalX1, " ").concat(spacing.SizesDdsSpacingLocalX15),
|
|
12
|
-
hover: {
|
|
13
|
-
boxShadow: "0 0 0 ".concat(border.BordersDdsBorderFocusInputfieldStrokeWeight, " ").concat(border.BordersDdsBorderFocusInputfieldStroke)
|
|
14
|
-
},
|
|
15
|
-
focus: {
|
|
16
|
-
boxShadow: "0 0 0 ".concat(border.BordersDdsBorderFocusCardStrokeWeight, " ").concat(border.BordersDdsBorderFocusCardStroke)
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
var chevronWrapper = {
|
|
20
|
-
width: iconSizes.DdsIconsizeMedium,
|
|
21
|
-
height: iconSizes.DdsIconsizeMedium,
|
|
22
|
-
marginLeft: spacing.SizesDdsSpacingLocalX05
|
|
23
|
-
};
|
|
24
|
-
var body = {
|
|
25
|
-
padding: "".concat(spacing.SizesDdsSpacingLocalX1, " ").concat(spacing.SizesDdsSpacingLocalX2NumberPx + spacing.SizesDdsSpacingLocalX075NumberPx, "px ").concat(spacing.SizesDdsSpacingLocalX2, " ").concat(spacing.SizesDdsSpacingLocalX15)
|
|
26
|
-
};
|
|
27
|
-
var cardAccordionTokens = {
|
|
28
|
-
header: header,
|
|
29
|
-
body: body,
|
|
30
|
-
chevronWrapper: chevronWrapper,
|
|
31
|
-
chevron: {
|
|
32
|
-
width: iconSizes.DdsIconsizeMedium,
|
|
33
|
-
height: spacing.SizesDdsSpacingLocalX05
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export { cardAccordionTokens, typographyTypes };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Property } from 'csstype';
|
|
3
|
-
import { BaseComponentPropsWithChildren } from '@norges-domstoler/dds-core';
|
|
4
|
-
export type CardAccordionBodyProps = BaseComponentPropsWithChildren<HTMLDivElement, {
|
|
5
|
-
/** **OBS!** denne propen blir satt automatisk av forelder. Forteller komponenten om den skal utvides. */
|
|
6
|
-
isExpanded?: boolean;
|
|
7
|
-
/** **OBS!** denne propen blir satt automatisk av forelder. Forteller `id` til `<CardAccordionHeader />`. */
|
|
8
|
-
headerId?: string;
|
|
9
|
-
/**Overskriver default padding på toppen. Brukes når barn har spacing på toppen, f.eks. en overskrift. */
|
|
10
|
-
paddingTop?: Property.PaddingTop<string>;
|
|
11
|
-
/**Overskriver default padding. */
|
|
12
|
-
padding?: Property.Padding<string>;
|
|
13
|
-
}>;
|
|
14
|
-
export declare const CardAccordionBody: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLDivElement>, "className" | "id"> & {
|
|
15
|
-
/** **OBS!** denne propen blir satt automatisk av forelder. Forteller komponenten om den skal utvides. */
|
|
16
|
-
isExpanded?: boolean | undefined;
|
|
17
|
-
/** **OBS!** denne propen blir satt automatisk av forelder. Forteller `id` til `<CardAccordionHeader />`. */
|
|
18
|
-
headerId?: string | undefined;
|
|
19
|
-
/**Overskriver default padding på toppen. Brukes når barn har spacing på toppen, f.eks. en overskrift. */
|
|
20
|
-
paddingTop?: Property.PaddingTop<string> | undefined;
|
|
21
|
-
/**Overskriver default padding. */
|
|
22
|
-
padding?: Property.Padding<string> | undefined;
|
|
23
|
-
} & {
|
|
24
|
-
children?: import("react").ReactNode;
|
|
25
|
-
} & {
|
|
26
|
-
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
27
|
-
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { slicedToArray as _slicedToArray } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import { __rest } from 'tslib';
|
|
3
|
-
import { jsx } from 'react/jsx-runtime';
|
|
4
|
-
import { forwardRef, useRef, useState, useLayoutEffect, useEffect } from 'react';
|
|
5
|
-
import styled, { css } from 'styled-components';
|
|
6
|
-
import { useIsMounted, getBaseHTMLProps } from '@norges-domstoler/dds-core';
|
|
7
|
-
import { getFontStyling } from '@norges-domstoler/dds-typography';
|
|
8
|
-
import { typographyTypes, cardAccordionTokens } from './CardAccordion.tokens.js';
|
|
9
|
-
import { useElementHeight } from './useElementHeight.js';
|
|
10
|
-
|
|
11
|
-
var expandingAnimation = css(["@media (prefers-reduced-motion:no-preference){transition:height 0.2s cubic-bezier(0.4,0,0.2,1);}"]);
|
|
12
|
-
function getPadding(props) {
|
|
13
|
-
var padding = props.padding;
|
|
14
|
-
return padding || cardAccordionTokens.body.padding;
|
|
15
|
-
}
|
|
16
|
-
var Body = styled.div.withConfig({
|
|
17
|
-
displayName: "CardAccordionBody__Body",
|
|
18
|
-
componentId: "sc-igsnpx-0"
|
|
19
|
-
})(["@media (prefers-reduced-motion:no-preference){", "}", " height:", "px;overflow:hidden;"], function (_ref) {
|
|
20
|
-
var animate = _ref.animate;
|
|
21
|
-
return animate && expandingAnimation;
|
|
22
|
-
}, getFontStyling(typographyTypes.body), function (_ref2) {
|
|
23
|
-
var height = _ref2.height,
|
|
24
|
-
isExpanded = _ref2.isExpanded;
|
|
25
|
-
return isExpanded ? height : 0;
|
|
26
|
-
});
|
|
27
|
-
var BodyContainer = styled.div.withConfig({
|
|
28
|
-
displayName: "CardAccordionBody__BodyContainer",
|
|
29
|
-
componentId: "sc-igsnpx-1"
|
|
30
|
-
})(["padding:", ";", ""], getPadding, function (_ref3) {
|
|
31
|
-
var paddingTop = _ref3.paddingTop;
|
|
32
|
-
return paddingTop && css(["padding-top:", ";"], paddingTop);
|
|
33
|
-
});
|
|
34
|
-
var CardAccordionBody = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
35
|
-
var children = props.children,
|
|
36
|
-
isExpanded = props.isExpanded,
|
|
37
|
-
headerId = props.headerId,
|
|
38
|
-
id = props.id,
|
|
39
|
-
className = props.className,
|
|
40
|
-
htmlProps = props.htmlProps,
|
|
41
|
-
padding = props.padding,
|
|
42
|
-
paddingTop = props.paddingTop,
|
|
43
|
-
rest = __rest(props, ["children", "isExpanded", "headerId", "id", "className", "htmlProps", "padding", "paddingTop"]);
|
|
44
|
-
var bodyRef = useRef(null);
|
|
45
|
-
var _useState = useState(false),
|
|
46
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
47
|
-
animate = _useState2[0],
|
|
48
|
-
setAnimate = _useState2[1];
|
|
49
|
-
var isMounted = useIsMounted();
|
|
50
|
-
var height = useElementHeight(bodyRef.current);
|
|
51
|
-
var _useState3 = useState(null),
|
|
52
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
53
|
-
initialExpandedHeight = _useState4[0],
|
|
54
|
-
setIntialExpandedHeight = _useState4[1];
|
|
55
|
-
useLayoutEffect(function () {
|
|
56
|
-
// For å unngå initiell animasjon dersom Accordion er satt til å være åpen som default.
|
|
57
|
-
if (bodyRef.current && isExpanded) {
|
|
58
|
-
setIntialExpandedHeight(bodyRef.current.scrollHeight);
|
|
59
|
-
}
|
|
60
|
-
}, []);
|
|
61
|
-
useEffect(function () {
|
|
62
|
-
if (isMounted()) {
|
|
63
|
-
setAnimate(true);
|
|
64
|
-
}
|
|
65
|
-
}, [isMounted]);
|
|
66
|
-
var bodyProps = Object.assign(Object.assign({}, getBaseHTMLProps(id, className, htmlProps, rest)), {
|
|
67
|
-
ref: ref,
|
|
68
|
-
isExpanded: isExpanded,
|
|
69
|
-
role: 'region',
|
|
70
|
-
height: height || initialExpandedHeight || 0
|
|
71
|
-
});
|
|
72
|
-
var bodyContainerProps = {
|
|
73
|
-
ref: bodyRef,
|
|
74
|
-
isExpanded: isExpanded,
|
|
75
|
-
padding: padding,
|
|
76
|
-
paddingTop: paddingTop
|
|
77
|
-
};
|
|
78
|
-
return jsx(Body, Object.assign({}, bodyProps, {
|
|
79
|
-
animate: animate,
|
|
80
|
-
"aria-labelledby": headerId,
|
|
81
|
-
"aria-hidden": !isExpanded,
|
|
82
|
-
children: jsx(BodyContainer, Object.assign({}, bodyContainerProps, {
|
|
83
|
-
animate: animate,
|
|
84
|
-
children: children
|
|
85
|
-
}))
|
|
86
|
-
}));
|
|
87
|
-
});
|
|
88
|
-
CardAccordionBody.displayName = 'CardAccordionBody';
|
|
89
|
-
|
|
90
|
-
export { CardAccordionBody };
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { ButtonHTMLAttributes } from 'react';
|
|
2
|
-
import { BaseComponentPropsWithChildren } from '@norges-domstoler/dds-core';
|
|
3
|
-
import { StaticTypographyType } from '@norges-domstoler/dds-typography';
|
|
4
|
-
import { Property } from 'csstype';
|
|
5
|
-
export type CardAccordionHeaderProps = BaseComponentPropsWithChildren<HTMLButtonElement, {
|
|
6
|
-
/** **OBS!** denne propen blir satt automatisk av forelder. Forteller body er utvidet. */
|
|
7
|
-
isExpanded?: boolean;
|
|
8
|
-
/** **OBS!** denne propen blir satt automatisk av forelder. Callback for å styre utvidelse og sammentrukking. */
|
|
9
|
-
toggleExpanded?: () => void;
|
|
10
|
-
/** **OBS!** denne propen blir satt automatisk av forelder. Forteller `id` til `<CardAccordionBody />`. */
|
|
11
|
-
bodyId?: string;
|
|
12
|
-
/**Overskriver default padding. */
|
|
13
|
-
padding?: Property.Padding<string>;
|
|
14
|
-
/**Overskriver default teksttype. */
|
|
15
|
-
typographyType?: StaticTypographyType;
|
|
16
|
-
/**Angir om teksten skal være i "bold"-format. */
|
|
17
|
-
bold?: boolean;
|
|
18
|
-
}, ButtonHTMLAttributes<HTMLButtonElement>>;
|
|
19
|
-
export declare const CardAccordionHeader: import("react").ForwardRefExoticComponent<Pick<ButtonHTMLAttributes<HTMLButtonElement>, "className" | "id"> & {
|
|
20
|
-
/** **OBS!** denne propen blir satt automatisk av forelder. Forteller body er utvidet. */
|
|
21
|
-
isExpanded?: boolean | undefined;
|
|
22
|
-
/** **OBS!** denne propen blir satt automatisk av forelder. Callback for å styre utvidelse og sammentrukking. */
|
|
23
|
-
toggleExpanded?: (() => void) | undefined;
|
|
24
|
-
/** **OBS!** denne propen blir satt automatisk av forelder. Forteller `id` til `<CardAccordionBody />`. */
|
|
25
|
-
bodyId?: string | undefined;
|
|
26
|
-
/**Overskriver default padding. */
|
|
27
|
-
padding?: Property.Padding<string> | undefined;
|
|
28
|
-
/**Overskriver default teksttype. */
|
|
29
|
-
typographyType?: StaticTypographyType | undefined;
|
|
30
|
-
/**Angir om teksten skal være i "bold"-format. */
|
|
31
|
-
bold?: boolean | undefined;
|
|
32
|
-
} & {
|
|
33
|
-
children?: import("react").ReactNode;
|
|
34
|
-
} & {
|
|
35
|
-
htmlProps?: ButtonHTMLAttributes<HTMLButtonElement> | undefined;
|
|
36
|
-
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { __rest } from 'tslib';
|
|
2
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
-
import { forwardRef } from 'react';
|
|
4
|
-
import styled, { css } from 'styled-components';
|
|
5
|
-
import { cardAccordionTokens, typographyTypes } from './CardAccordion.tokens.js';
|
|
6
|
-
import { normalizeButton, removeButtonStyling, getBaseHTMLProps, AnimatedChevronUpDown } from '@norges-domstoler/dds-core';
|
|
7
|
-
import { getFontStyling } from '@norges-domstoler/dds-typography';
|
|
8
|
-
|
|
9
|
-
var header = cardAccordionTokens.header,
|
|
10
|
-
chevronWrapper = cardAccordionTokens.chevronWrapper;
|
|
11
|
-
var ContentWrapper = styled.div.withConfig({
|
|
12
|
-
displayName: "CardAccordionHeader__ContentWrapper",
|
|
13
|
-
componentId: "sc-1qs6bkj-0"
|
|
14
|
-
})(["text-align:left;"]);
|
|
15
|
-
function getPadding(props) {
|
|
16
|
-
var padding = props.padding;
|
|
17
|
-
return padding || header.padding;
|
|
18
|
-
}
|
|
19
|
-
function getTypographyType(props) {
|
|
20
|
-
var typographyType = props.typographyType;
|
|
21
|
-
return typographyType || typographyTypes.header;
|
|
22
|
-
}
|
|
23
|
-
var HeaderContainer = styled.div.withConfig({
|
|
24
|
-
displayName: "CardAccordionHeader__HeaderContainer",
|
|
25
|
-
componentId: "sc-1qs6bkj-1"
|
|
26
|
-
})(["display:flex;justify-content:space-between;align-items:center;@media (prefers-reduced-motion:no-preference){transition:box-shadow 0.2s;}padding:", ";", " ", ""], getPadding, function (props) {
|
|
27
|
-
return getFontStyling(getTypographyType(props));
|
|
28
|
-
}, function (props) {
|
|
29
|
-
return props.bold && css(["font-weight:600;"]);
|
|
30
|
-
});
|
|
31
|
-
var HeaderWrapperButton = styled.button.withConfig({
|
|
32
|
-
displayName: "CardAccordionHeader__HeaderWrapperButton",
|
|
33
|
-
componentId: "sc-1qs6bkj-2"
|
|
34
|
-
})(["", " user-select:text;position:relative;cursor:pointer;@media (prefers-reduced-motion:no-preference){transition:box-shadow 0.2s;}", " display:block;width:100%;&:hover{box-shadow:", ";}&:focus-visible,&.focus-visible{outline:none;box-shadow:", ";}"], normalizeButton, removeButtonStyling, header.hover.boxShadow, header.focus.boxShadow);
|
|
35
|
-
var ChevronWrapper = styled.span.withConfig({
|
|
36
|
-
displayName: "CardAccordionHeader__ChevronWrapper",
|
|
37
|
-
componentId: "sc-1qs6bkj-3"
|
|
38
|
-
})(["display:flex;align-items:center;justify-content:center;width:", ";height:", ";margin-left:", ";"], chevronWrapper.width, chevronWrapper.height, chevronWrapper.marginLeft);
|
|
39
|
-
var CardAccordionHeader = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
40
|
-
var children = props.children,
|
|
41
|
-
_props$isExpanded = props.isExpanded,
|
|
42
|
-
isExpanded = _props$isExpanded === void 0 ? false : _props$isExpanded,
|
|
43
|
-
toggleExpanded = props.toggleExpanded,
|
|
44
|
-
bodyId = props.bodyId,
|
|
45
|
-
id = props.id,
|
|
46
|
-
className = props.className,
|
|
47
|
-
htmlProps = props.htmlProps,
|
|
48
|
-
padding = props.padding,
|
|
49
|
-
typographyType = props.typographyType,
|
|
50
|
-
bold = props.bold,
|
|
51
|
-
rest = __rest(props, ["children", "isExpanded", "toggleExpanded", "bodyId", "id", "className", "htmlProps", "padding", "typographyType", "bold"]);
|
|
52
|
-
var handleClick = function handleClick() {
|
|
53
|
-
if (toggleExpanded) {
|
|
54
|
-
toggleExpanded();
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
var headerWrapperProps = Object.assign(Object.assign({}, getBaseHTMLProps(id, className, htmlProps, rest)), {
|
|
58
|
-
'aria-expanded': isExpanded,
|
|
59
|
-
'aria-controls': bodyId,
|
|
60
|
-
ref: ref,
|
|
61
|
-
onClick: handleClick
|
|
62
|
-
});
|
|
63
|
-
var chevronProps = {
|
|
64
|
-
isUp: isExpanded,
|
|
65
|
-
width: cardAccordionTokens.chevron.width,
|
|
66
|
-
height: cardAccordionTokens.chevron.height
|
|
67
|
-
};
|
|
68
|
-
return jsx(HeaderWrapperButton, Object.assign({}, headerWrapperProps, {
|
|
69
|
-
type: "button",
|
|
70
|
-
children: jsxs(HeaderContainer, {
|
|
71
|
-
typographyType: typographyType,
|
|
72
|
-
padding: padding,
|
|
73
|
-
bold: bold,
|
|
74
|
-
children: [jsx(ContentWrapper, {
|
|
75
|
-
children: children
|
|
76
|
-
}), jsx(ChevronWrapper, {
|
|
77
|
-
children: jsx(AnimatedChevronUpDown, Object.assign({}, chevronProps))
|
|
78
|
-
})]
|
|
79
|
-
})
|
|
80
|
-
}));
|
|
81
|
-
});
|
|
82
|
-
CardAccordionHeader.displayName = 'CardAccordionHeader';
|
|
83
|
-
|
|
84
|
-
export { CardAccordionHeader };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function useElementHeight(element: HTMLDivElement | null): number | null;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { slicedToArray as _slicedToArray } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import { useState, useEffect } from 'react';
|
|
3
|
-
|
|
4
|
-
function useElementHeight(element) {
|
|
5
|
-
var _useState = useState(null),
|
|
6
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
7
|
-
height = _useState2[0],
|
|
8
|
-
setHeight = _useState2[1];
|
|
9
|
-
useEffect(function () {
|
|
10
|
-
if (!element) return;
|
|
11
|
-
var resizeObserver = new ResizeObserver(function () {
|
|
12
|
-
setHeight(element.offsetHeight);
|
|
13
|
-
});
|
|
14
|
-
resizeObserver.observe(element);
|
|
15
|
-
return function () {
|
|
16
|
-
return resizeObserver.disconnect();
|
|
17
|
-
};
|
|
18
|
-
}, [element]);
|
|
19
|
-
return height;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export { useElementHeight };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { BaseComponentProps } from '@norges-domstoler/dds-core';
|
|
3
|
-
export type ChipProps = BaseComponentProps<HTMLDivElement, {
|
|
4
|
-
/** Teksten som vises i komponenten. */
|
|
5
|
-
text?: string;
|
|
6
|
-
/** Ekstra logikk når `<Chip />` lukkes. */
|
|
7
|
-
onClose?: () => void;
|
|
8
|
-
}>;
|
|
9
|
-
export declare const Chip: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLDivElement>, "className" | "id"> & {
|
|
10
|
-
/** Teksten som vises i komponenten. */
|
|
11
|
-
text?: string | undefined;
|
|
12
|
-
/** Ekstra logikk når `<Chip />` lukkes. */
|
|
13
|
-
onClose?: (() => void) | undefined;
|
|
14
|
-
} & {
|
|
15
|
-
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
16
|
-
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { slicedToArray as _slicedToArray } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import { __rest } from 'tslib';
|
|
3
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
|
-
import { forwardRef, useState } from 'react';
|
|
5
|
-
import styled from 'styled-components';
|
|
6
|
-
import { getBaseHTMLProps } from '@norges-domstoler/dds-core';
|
|
7
|
-
import { CloseIcon } from '@norges-domstoler/dds-icons';
|
|
8
|
-
import { TextOverflowEllipsisWrapper, getFontStyling, TextOverflowEllipsisInner } from '@norges-domstoler/dds-typography';
|
|
9
|
-
import { Button } from '../Button/Button.js';
|
|
10
|
-
import { typographyType, chipTokens } from './Chip.tokens.js';
|
|
11
|
-
|
|
12
|
-
var container = chipTokens.container;
|
|
13
|
-
var Container = styled(TextOverflowEllipsisWrapper).withConfig({
|
|
14
|
-
displayName: "Chip__Container",
|
|
15
|
-
componentId: "sc-1l242zs-0"
|
|
16
|
-
})(["display:flex;align-items:center;max-width:100%;gap:", ";padding:", ";border:", ";border-radius:", ";background-color:", ";", ";"], container.gap, container.padding, container.border, container.borderRadius, container.backgroundColor, getFontStyling(typographyType, true));
|
|
17
|
-
var Chip = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
18
|
-
var text = props.text,
|
|
19
|
-
onClose = props.onClose,
|
|
20
|
-
id = props.id,
|
|
21
|
-
className = props.className,
|
|
22
|
-
_props$htmlProps = props.htmlProps,
|
|
23
|
-
htmlProps = _props$htmlProps === void 0 ? {} : _props$htmlProps,
|
|
24
|
-
rest = __rest(props, ["text", "onClose", "id", "className", "htmlProps"]);
|
|
25
|
-
var ariaLabel = htmlProps['aria-label'],
|
|
26
|
-
restHTMLprops = __rest(htmlProps, ['aria-label']);
|
|
27
|
-
var _useState = useState(true),
|
|
28
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
29
|
-
isOpen = _useState2[0],
|
|
30
|
-
setIsOpen = _useState2[1];
|
|
31
|
-
var onClick = function onClick() {
|
|
32
|
-
setIsOpen(false);
|
|
33
|
-
onClose && onClose();
|
|
34
|
-
};
|
|
35
|
-
return isOpen ? jsxs(Container, Object.assign({}, getBaseHTMLProps(id, className, restHTMLprops, rest), {
|
|
36
|
-
ref: ref,
|
|
37
|
-
as: "div",
|
|
38
|
-
children: [jsx(TextOverflowEllipsisInner, {
|
|
39
|
-
children: text
|
|
40
|
-
}), jsx(Button, {
|
|
41
|
-
size: "tiny",
|
|
42
|
-
icon: CloseIcon,
|
|
43
|
-
appearance: "borderless",
|
|
44
|
-
purpose: "secondary",
|
|
45
|
-
onClick: onClick,
|
|
46
|
-
"aria-label": ariaLabel || "Fjern ".concat(text ? "chip ".concat(text) : 'chip')
|
|
47
|
-
})]
|
|
48
|
-
})) : null;
|
|
49
|
-
});
|
|
50
|
-
Chip.displayName = 'Chip';
|
|
51
|
-
|
|
52
|
-
export { Chip };
|