@norges-domstoler/dds-components 13.6.0 → 13.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_rollupPluginBabelHelpers.js +1 -61
- package/dist/cjs/components/Breadcrumbs/Breadcrumb.tokens.d.ts +1 -1
- package/dist/cjs/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/cjs/components/Button/Button.d.ts +1 -1
- package/dist/cjs/components/Button/Button.stories.d.ts +1 -1
- package/dist/cjs/components/Button/Button.tokens.d.ts +1 -1
- package/dist/cjs/components/Button/Button.types.d.ts +2 -2
- package/dist/cjs/components/Card/Card.d.ts +1 -1
- package/dist/cjs/components/Card/CardAccordion/CardAccordion.d.ts +1 -1
- package/dist/cjs/components/Card/CardAccordion/CardAccordion.tokens.d.ts +1 -1
- package/dist/cjs/components/Card/CardAccordion/CardAccordionBody.d.ts +1 -1
- package/dist/cjs/components/Card/CardAccordion/CardAccordionHeader.d.ts +2 -2
- package/dist/cjs/components/Chip/Chip.d.ts +1 -1
- package/dist/cjs/components/Chip/Chip.tokens.d.ts +1 -1
- package/dist/cjs/components/Datepicker/Datepicker.d.ts +1 -1
- package/dist/cjs/components/Datepicker/Datepicker.stories.d.ts +1 -1
- package/dist/cjs/components/DescriptionList/DescriptionList.d.ts +1 -1
- package/dist/cjs/components/DescriptionList/DescriptionListDesc.d.ts +2 -2
- package/dist/cjs/components/DescriptionList/DescriptionListGroup.d.ts +1 -1
- package/dist/cjs/components/Divider/Divider.d.ts +1 -1
- package/dist/cjs/components/Drawer/Drawer.d.ts +1 -1
- package/dist/cjs/components/GlobalMessage/GlobalMessage.d.ts +1 -1
- package/dist/cjs/components/GlobalMessage/GlobalMessage.tokens.d.ts +2 -2
- package/dist/cjs/components/Grid/Grid.context.d.ts +1 -1
- package/dist/cjs/components/Grid/Grid.d.ts +2 -2
- package/dist/cjs/components/Grid/GridChild.d.ts +2 -2
- package/dist/cjs/components/InlineEdit/InlineEdit.styles.d.ts +4 -4
- package/dist/cjs/components/InputMessage/InputMessage.d.ts +1 -1
- package/dist/cjs/components/InternalHeader/InternalHeader.styles.d.ts +1 -1
- package/dist/cjs/components/InternalHeader/InternalHeader.tokens.d.ts +1 -1
- package/dist/cjs/components/InternalHeader/InternalHeader.types.d.ts +2 -2
- package/dist/cjs/components/List/List.d.ts +2 -2
- package/dist/cjs/components/LocalMessage/LocalMessage.d.ts +1 -1
- package/dist/cjs/components/LocalMessage/LocalMessage.tokens.d.ts +2 -2
- package/dist/cjs/components/Modal/Modal.d.ts +1 -1
- package/dist/cjs/components/Modal/ModalBody.d.ts +1 -1
- package/dist/cjs/components/OverflowMenu/OverflowMenu.d.ts +1 -1
- package/dist/cjs/components/OverflowMenu/OverflowMenu.stories.d.ts +1 -1
- package/dist/cjs/components/OverflowMenu/OverflowMenu.tokens.d.ts +1 -1
- package/dist/cjs/components/OverflowMenu/OverflowMenu.types.d.ts +3 -3
- package/dist/cjs/components/OverflowMenu/OverflowMenuItem.d.ts +2 -2
- package/dist/cjs/components/Pagination/Pagination.d.ts +1 -1
- package/dist/cjs/components/Popover/Popover.d.ts +2 -2
- package/dist/cjs/components/Popover/Popover.stories.d.ts +1 -1
- package/dist/cjs/components/ProgressTracker/ProgressTracker.d.ts +1 -1
- package/dist/cjs/components/ProgressTracker/ProgressTracker.stories.d.ts +2 -2
- package/dist/cjs/components/ProgressTracker/ProgressTracker.tokens.d.ts +2 -2
- package/dist/cjs/components/ProgressTracker/ProgressTrackerItem.d.ts +2 -2
- package/dist/cjs/components/ScrollableContainer/ScrollableContainer.d.ts +1 -1
- package/dist/cjs/components/ScrollableContainer/Scrollbar.d.ts +1 -1
- package/dist/cjs/components/Search/Search.d.ts +1 -1
- package/dist/cjs/components/Search/Search.stories.d.ts +1 -1
- package/dist/cjs/components/Search/Search.tokens.d.ts +1 -1
- package/dist/cjs/components/Search/SearchSuggestions.d.ts +1 -1
- package/dist/cjs/components/Select/Select.d.ts +3 -3
- package/dist/cjs/components/Select/Select.styles.d.ts +2 -2
- package/dist/cjs/components/Select/Select.tokens.d.ts +2 -2
- package/dist/cjs/components/{Checkbox → SelectionControl/Checkbox}/Checkbox.d.ts +1 -1
- package/dist/cjs/components/{Checkbox → SelectionControl/Checkbox}/Checkbox.stories.d.ts +1 -1
- package/dist/cjs/components/{Checkbox → SelectionControl/Checkbox}/Checkbox.types.d.ts +2 -2
- package/dist/cjs/components/{Checkbox → SelectionControl/Checkbox}/CheckboxGroup.d.ts +1 -1
- package/dist/cjs/components/{Checkbox → SelectionControl/Checkbox}/CheckboxGroupContext.d.ts +1 -0
- package/dist/{components → cjs/components/SelectionControl}/RadioButton/RadioButton.types.d.ts +1 -1
- package/dist/cjs/components/{RadioButton → SelectionControl/RadioButton}/RadioButtonGroup.d.ts +1 -1
- package/dist/{components → cjs/components/SelectionControl}/RadioButton/RadioButtonGroup.stories.d.ts +1 -1
- package/dist/cjs/components/{RadioButton → SelectionControl/RadioButton}/RadioButtonGroupContext.d.ts +1 -0
- package/dist/{helpers → cjs/components}/SelectionControl/SelectionControl.styles.d.ts +1 -1
- package/dist/cjs/components/SkipToContent/SkipToContent.d.ts +1 -1
- package/dist/cjs/components/Spinner/Spinner.d.ts +2 -2
- package/dist/cjs/components/SplitButton/SplitButton.d.ts +1 -1
- package/dist/cjs/components/Stack/Stack.d.ts +1 -1
- package/dist/cjs/components/Tabs/Tab.d.ts +2 -2
- package/dist/cjs/components/Tabs/TabPanel.d.ts +1 -1
- package/dist/cjs/components/Tabs/Tabs.context.d.ts +1 -1
- package/dist/cjs/components/Tabs/Tabs.d.ts +1 -1
- package/dist/cjs/components/Tabs/Tabs.stories.d.ts +2 -2
- package/dist/cjs/components/Tag/Tag.d.ts +1 -1
- package/dist/cjs/components/Tag/Tag.tokens.d.ts +1 -1
- package/dist/cjs/components/TextArea/TextArea.d.ts +8 -3
- package/dist/cjs/components/TextArea/TextArea.stories.d.ts +1 -1
- package/dist/cjs/components/TextInput/CharCounter.d.ts +1 -1
- package/dist/cjs/components/TextInput/TextInput.d.ts +3 -3
- package/dist/cjs/components/TextInput/TextInput.stories.d.ts +3 -3
- package/dist/cjs/components/TextInput/TextInput.styles.d.ts +4 -4
- package/dist/cjs/components/TextInput/TextInput.types.d.ts +2 -2
- package/dist/cjs/components/ToggleBar/ToggleBar.tokens.d.ts +1 -1
- package/dist/cjs/components/ToggleBar/ToggleBar.types.d.ts +1 -1
- package/dist/cjs/components/ToggleBar/ToggleRadio.d.ts +2 -2
- package/dist/cjs/components/ToggleButton/ToggleButton.d.ts +2 -2
- package/dist/cjs/components/ToggleButton/ToggleButton.stories.d.ts +2 -2
- package/dist/cjs/components/ToggleButton/ToggleButton.tokens.d.ts +1 -1
- package/dist/cjs/components/ToggleButton/ToggleButton.types.d.ts +3 -3
- package/dist/cjs/components/ToggleButton/ToggleButtonGroup.d.ts +1 -1
- package/dist/cjs/components/Tooltip/Tooltip.d.ts +2 -2
- package/dist/cjs/components/Tooltip/Tooltip.stories.d.ts +1 -1
- package/dist/cjs/components/VisuallyHidden/VisuallyHidden.d.ts +1 -1
- package/dist/cjs/dds-core.d.ts +1 -0
- package/dist/cjs/dds-form.d.ts +2 -0
- package/dist/cjs/dds-icons.d.ts +2 -0
- package/dist/cjs/dds-typography.d.ts +2 -0
- package/dist/cjs/index.d.ts +6 -8
- package/dist/cjs/index.js +764 -3719
- package/dist/cjs/utils/icon.d.ts +3 -0
- package/dist/cjs/utils/renderInputMessage.d.ts +1 -0
- package/dist/components/BackLink/BackLink.js +3 -12
- package/dist/components/Breadcrumbs/Breadcrumb.js +1 -7
- package/dist/components/Breadcrumbs/Breadcrumb.tokens.d.ts +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.js +5 -8
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.js +2 -2
- package/dist/components/Button/Button.stories.d.ts +1 -1
- package/dist/components/Button/Button.styles.js +3 -7
- package/dist/components/Button/Button.tokens.d.ts +1 -1
- package/dist/components/Button/Button.tokens.js +1 -2
- package/dist/components/Button/Button.types.d.ts +2 -2
- package/dist/components/Card/Card.d.ts +1 -1
- package/dist/components/Card/Card.js +3 -7
- package/dist/components/Card/CardAccordion/CardAccordion.d.ts +1 -1
- package/dist/components/Card/CardAccordion/CardAccordion.js +1 -1
- package/dist/components/Card/CardAccordion/CardAccordion.tokens.d.ts +1 -1
- package/dist/components/Card/CardAccordion/CardAccordionBody.d.ts +1 -1
- package/dist/components/Card/CardAccordion/CardAccordionBody.js +3 -4
- package/dist/components/Card/CardAccordion/CardAccordionHeader.d.ts +2 -2
- package/dist/components/Card/CardAccordion/CardAccordionHeader.js +2 -20
- package/dist/components/Chip/Chip.d.ts +1 -1
- package/dist/components/Chip/Chip.js +4 -6
- package/dist/components/Chip/Chip.tokens.d.ts +1 -1
- package/dist/components/Chip/ChipGroup.js +1 -1
- package/dist/components/Datepicker/Datepicker.d.ts +1 -1
- package/dist/components/Datepicker/Datepicker.js +5 -25
- package/dist/components/Datepicker/Datepicker.stories.d.ts +1 -1
- package/dist/components/DescriptionList/DescriptionList.d.ts +1 -1
- package/dist/components/DescriptionList/DescriptionList.js +1 -6
- package/dist/components/DescriptionList/DescriptionListDesc.d.ts +2 -2
- package/dist/components/DescriptionList/DescriptionListDesc.js +2 -2
- package/dist/components/DescriptionList/DescriptionListGroup.d.ts +1 -1
- package/dist/components/DescriptionList/DescriptionListGroup.js +1 -1
- package/dist/components/Divider/Divider.d.ts +1 -1
- package/dist/components/Divider/Divider.js +1 -1
- package/dist/components/Drawer/Drawer.d.ts +1 -1
- package/dist/components/Drawer/Drawer.js +4 -31
- package/dist/components/EmptyContent/EmptyContent.js +1 -7
- package/dist/components/Feedback/CommentComponent.js +3 -13
- package/dist/components/Feedback/Feedback.js +1 -7
- package/dist/components/Feedback/RatingComponent.js +2 -11
- package/dist/components/FileUploader/File.js +2 -5
- package/dist/components/FileUploader/FileUploader.js +3 -12
- package/dist/components/GlobalMessage/GlobalMessage.d.ts +1 -1
- package/dist/components/GlobalMessage/GlobalMessage.js +4 -13
- package/dist/components/GlobalMessage/GlobalMessage.tokens.d.ts +2 -2
- package/dist/components/GlobalMessage/GlobalMessage.tokens.js +1 -6
- package/dist/components/Grid/Grid.context.d.ts +1 -1
- package/dist/components/Grid/Grid.context.js +1 -3
- package/dist/components/Grid/Grid.d.ts +2 -2
- package/dist/components/Grid/Grid.js +1 -14
- package/dist/components/Grid/Grid.tokens.js +1 -4
- package/dist/components/Grid/GridChild.d.ts +2 -2
- package/dist/components/Grid/GridChild.js +1 -10
- package/dist/components/InlineEdit/InlineEdit.js +1 -5
- package/dist/components/InlineEdit/InlineEdit.styles.d.ts +4 -4
- package/dist/components/InlineEdit/InlineEdit.styles.js +1 -13
- package/dist/components/InlineEdit/InlineEditInput.js +1 -4
- package/dist/components/InlineEdit/InlineEditTextArea.js +1 -4
- package/dist/components/InlineEdit/InlineInput.js +4 -16
- package/dist/components/InlineEdit/InlineTextArea.js +4 -16
- package/dist/components/InputMessage/InputMessage.d.ts +1 -1
- package/dist/components/InputMessage/InputMessage.js +3 -11
- package/dist/components/InternalHeader/InternalHeader.js +3 -11
- package/dist/components/InternalHeader/InternalHeader.styles.d.ts +1 -1
- package/dist/components/InternalHeader/InternalHeader.styles.js +1 -5
- package/dist/components/InternalHeader/InternalHeader.tokens.d.ts +1 -1
- package/dist/components/InternalHeader/InternalHeader.types.d.ts +2 -2
- package/dist/components/InternalHeader/NavigationItem.js +3 -7
- package/dist/components/List/List.d.ts +2 -2
- package/dist/components/List/List.js +5 -10
- package/dist/components/LocalMessage/LocalMessage.d.ts +1 -1
- package/dist/components/LocalMessage/LocalMessage.js +3 -17
- package/dist/components/LocalMessage/LocalMessage.tokens.d.ts +2 -2
- package/dist/components/LocalMessage/LocalMessage.tokens.js +1 -8
- package/dist/{helpers → components/Modal}/Backdrop/Backdrop.js +2 -2
- package/dist/components/Modal/Modal.d.ts +1 -1
- package/dist/components/Modal/Modal.js +6 -32
- package/dist/components/Modal/ModalBody.d.ts +1 -1
- package/dist/components/Modal/ModalBody.js +1 -1
- package/dist/components/OverflowMenu/OverflowMenu.d.ts +1 -1
- package/dist/components/OverflowMenu/OverflowMenu.js +2 -16
- package/dist/components/OverflowMenu/OverflowMenu.stories.d.ts +1 -1
- package/dist/components/OverflowMenu/OverflowMenu.tokens.d.ts +1 -1
- package/dist/components/OverflowMenu/OverflowMenu.tokens.js +1 -2
- package/dist/components/OverflowMenu/OverflowMenu.types.d.ts +3 -3
- package/dist/components/OverflowMenu/OverflowMenuItem.d.ts +2 -2
- package/dist/components/OverflowMenu/OverflowMenuItem.js +4 -14
- package/dist/components/Pagination/Pagination.d.ts +1 -1
- package/dist/components/Pagination/Pagination.js +3 -15
- package/dist/components/Popover/Popover.d.ts +2 -2
- package/dist/components/Popover/Popover.js +4 -31
- package/dist/components/Popover/Popover.stories.d.ts +1 -1
- package/dist/components/Popover/PopoverGroup.js +1 -4
- package/dist/components/ProgressTracker/ProgressTracker.d.ts +1 -1
- package/dist/components/ProgressTracker/ProgressTracker.js +1 -1
- package/dist/components/ProgressTracker/ProgressTracker.stories.d.ts +2 -2
- package/dist/components/ProgressTracker/ProgressTracker.tokens.d.ts +2 -2
- package/dist/components/ProgressTracker/ProgressTrackerItem.d.ts +2 -2
- package/dist/components/ProgressTracker/ProgressTrackerItem.js +4 -11
- package/dist/components/ScrollableContainer/ScrollableContainer.d.ts +1 -1
- package/dist/components/ScrollableContainer/ScrollableContainer.js +2 -6
- package/dist/components/ScrollableContainer/Scrollbar.d.ts +1 -1
- package/dist/components/ScrollableContainer/Scrollbar.js +1 -1
- package/dist/components/Search/Search.d.ts +1 -1
- package/dist/components/Search/Search.js +6 -26
- package/dist/components/Search/Search.stories.d.ts +1 -1
- package/dist/components/Search/Search.tokens.d.ts +1 -1
- package/dist/components/Search/SearchAutocompleteWrapper.js +1 -6
- package/dist/components/Search/SearchSuggestions.d.ts +1 -1
- package/dist/components/Search/SearchSuggestions.js +3 -30
- package/dist/components/Select/Select.d.ts +3 -3
- package/dist/components/Select/Select.js +5 -16
- package/dist/components/Select/Select.styles.d.ts +2 -2
- package/dist/components/Select/Select.styles.js +5 -8
- package/dist/components/Select/Select.tokens.d.ts +2 -2
- package/dist/components/Select/Select.tokens.js +1 -13
- package/dist/components/{Checkbox → SelectionControl/Checkbox}/Checkbox.d.ts +1 -1
- package/dist/components/{Checkbox → SelectionControl/Checkbox}/Checkbox.js +4 -22
- package/dist/components/{Checkbox → SelectionControl/Checkbox}/Checkbox.stories.d.ts +1 -1
- package/dist/components/{Checkbox → SelectionControl/Checkbox}/Checkbox.types.d.ts +2 -2
- package/dist/components/{Checkbox → SelectionControl/Checkbox}/CheckboxGroup.d.ts +1 -1
- package/dist/components/{Checkbox → SelectionControl/Checkbox}/CheckboxGroup.js +4 -22
- package/dist/components/{Checkbox → SelectionControl/Checkbox}/CheckboxGroupContext.d.ts +1 -0
- package/dist/components/{RadioButton → SelectionControl/RadioButton}/RadioButton.js +4 -21
- package/dist/{cjs/components → components/SelectionControl}/RadioButton/RadioButton.types.d.ts +1 -1
- package/dist/components/{RadioButton → SelectionControl/RadioButton}/RadioButtonGroup.d.ts +1 -1
- package/dist/components/{RadioButton → SelectionControl/RadioButton}/RadioButtonGroup.js +5 -23
- package/dist/{cjs/components → components/SelectionControl}/RadioButton/RadioButtonGroup.stories.d.ts +1 -1
- package/dist/components/{RadioButton → SelectionControl/RadioButton}/RadioButtonGroupContext.d.ts +1 -0
- package/dist/{cjs/helpers → components}/SelectionControl/SelectionControl.styles.d.ts +1 -1
- package/dist/{helpers → components}/SelectionControl/SelectionControl.styles.js +5 -9
- package/dist/{helpers → components}/SelectionControl/SelectionControl.tokens.js +1 -6
- package/dist/components/SkipToContent/SkipToContent.d.ts +1 -1
- package/dist/components/SkipToContent/SkipToContent.js +3 -7
- package/dist/components/Spinner/Spinner.d.ts +2 -2
- package/dist/components/Spinner/Spinner.js +1 -2
- package/dist/components/SplitButton/SplitButton.d.ts +1 -1
- package/dist/components/SplitButton/SplitButton.js +1 -4
- package/dist/components/Stack/Stack.d.ts +1 -1
- package/dist/components/Stack/Stack.js +1 -1
- package/dist/components/Table/SortCell.js +4 -13
- package/dist/components/Table/Table.js +1 -5
- package/dist/components/Table/Table.styles.js +2 -6
- package/dist/components/Table/collapsible/CollapsibleRow.js +2 -18
- package/dist/components/Tabs/Tab.d.ts +2 -2
- package/dist/components/Tabs/Tab.js +4 -15
- package/dist/components/Tabs/TabList.js +2 -12
- package/dist/components/Tabs/TabPanel.d.ts +1 -1
- package/dist/components/Tabs/TabPanel.js +2 -6
- package/dist/components/Tabs/TabPanels.js +1 -4
- package/dist/components/Tabs/Tabs.context.d.ts +1 -1
- package/dist/components/Tabs/Tabs.d.ts +1 -1
- package/dist/components/Tabs/Tabs.js +1 -1
- package/dist/components/Tabs/Tabs.stories.d.ts +2 -2
- package/dist/components/Tag/Tag.d.ts +1 -1
- package/dist/components/Tag/Tag.js +3 -4
- package/dist/components/Tag/Tag.tokens.d.ts +1 -1
- package/dist/components/TextArea/TextArea.d.ts +8 -3
- package/dist/components/TextArea/TextArea.js +4 -16
- package/dist/components/TextArea/TextArea.stories.d.ts +1 -1
- package/dist/components/TextInput/CharCounter.d.ts +1 -1
- package/dist/components/TextInput/CharCounter.js +2 -8
- package/dist/components/TextInput/TextInput.d.ts +3 -3
- package/dist/components/TextInput/TextInput.js +7 -21
- package/dist/components/TextInput/TextInput.stories.d.ts +3 -3
- package/dist/components/TextInput/TextInput.styles.d.ts +4 -4
- package/dist/components/TextInput/TextInput.styles.js +3 -15
- package/dist/components/TextInput/TextInput.types.d.ts +2 -2
- package/dist/components/ToggleBar/ToggleBar.js +2 -15
- package/dist/components/ToggleBar/ToggleBar.tokens.d.ts +1 -1
- package/dist/components/ToggleBar/ToggleBar.tokens.js +1 -2
- package/dist/components/ToggleBar/ToggleBar.types.d.ts +1 -1
- package/dist/components/ToggleBar/ToggleRadio.d.ts +2 -2
- package/dist/components/ToggleBar/ToggleRadio.js +3 -13
- package/dist/components/ToggleBar/ToggleRadio.styles.js +3 -20
- package/dist/components/ToggleButton/ToggleButton.d.ts +2 -2
- package/dist/components/ToggleButton/ToggleButton.js +5 -20
- package/dist/components/ToggleButton/ToggleButton.stories.d.ts +2 -2
- package/dist/components/ToggleButton/ToggleButton.tokens.d.ts +1 -1
- package/dist/components/ToggleButton/ToggleButton.tokens.js +1 -2
- package/dist/components/ToggleButton/ToggleButton.types.d.ts +3 -3
- package/dist/components/ToggleButton/ToggleButtonGroup.d.ts +1 -1
- package/dist/components/ToggleButton/ToggleButtonGroup.js +2 -8
- package/dist/components/Tooltip/Tooltip.d.ts +2 -2
- package/dist/components/Tooltip/Tooltip.js +1 -7
- package/dist/components/Tooltip/Tooltip.stories.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.styles.js +2 -20
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +1 -1
- package/dist/components/VisuallyHidden/VisuallyHidden.js +1 -1
- package/dist/dds-core.d.ts +1 -0
- package/dist/dds-form.d.ts +2 -0
- package/dist/dds-icons.d.ts +2 -0
- package/dist/dds-typography.d.ts +2 -0
- package/dist/index.d.ts +6 -8
- package/dist/index.js +8 -172
- package/dist/utils/icon.d.ts +3 -0
- package/dist/utils/icon.js +12 -0
- package/dist/utils/renderInputMessage.d.ts +1 -0
- package/dist/utils/renderInputMessage.js +18 -0
- package/package.json +5 -1
- package/dist/assets/svg/openExternal.svg.js +0 -4
- package/dist/cjs/components/Icon/Icon.d.ts +0 -17
- package/dist/cjs/components/Icon/Icon.stories.d.ts +0 -21
- package/dist/cjs/components/Icon/index.d.ts +0 -1
- package/dist/cjs/components/Typography/Caption/Caption.d.ts +0 -11
- package/dist/cjs/components/Typography/Caption/Caption.stories.d.ts +0 -29
- package/dist/cjs/components/Typography/Caption/index.d.ts +0 -1
- package/dist/cjs/components/Typography/Heading/Heading.d.ts +0 -22
- package/dist/cjs/components/Typography/Heading/Heading.stories.d.ts +0 -38
- package/dist/cjs/components/Typography/Heading/index.d.ts +0 -1
- package/dist/cjs/components/Typography/Label/Label.d.ts +0 -17
- package/dist/cjs/components/Typography/Label/Label.stories.d.ts +0 -33
- package/dist/cjs/components/Typography/Label/index.d.ts +0 -1
- package/dist/cjs/components/Typography/Legend/Legend.d.ts +0 -11
- package/dist/cjs/components/Typography/Legend/Legend.stories.d.ts +0 -29
- package/dist/cjs/components/Typography/Legend/index.d.ts +0 -1
- package/dist/cjs/components/Typography/Link/Link.d.ts +0 -23
- package/dist/cjs/components/Typography/Link/Link.stories.d.ts +0 -48
- package/dist/cjs/components/Typography/Link/index.d.ts +0 -1
- package/dist/cjs/components/Typography/Paragraph/Paragraph.d.ts +0 -17
- package/dist/cjs/components/Typography/Paragraph/Paragraph.stories.d.ts +0 -37
- package/dist/cjs/components/Typography/Paragraph/index.d.ts +0 -1
- package/dist/cjs/components/Typography/Typography/Typography.d.ts +0 -25
- package/dist/cjs/components/Typography/Typography/Typography.stories.d.ts +0 -64
- package/dist/cjs/components/Typography/Typography/Typography.types.d.ts +0 -36
- package/dist/cjs/components/Typography/Typography/index.d.ts +0 -2
- package/dist/cjs/components/Typography/Typography.tokens.d.ts +0 -448
- package/dist/cjs/components/Typography/Typography.utils.d.ts +0 -203
- package/dist/cjs/components/Typography/index.d.ts +0 -7
- package/dist/cjs/components/Typography/stories/Examples.stories.d.ts +0 -5
- package/dist/cjs/components/Typography/stories/TypographyComponents.stories.d.ts +0 -42
- package/dist/cjs/components/Typography/stories/TypographyTypes.stories.d.ts +0 -11
- package/dist/cjs/helpers/Chevron/AnimatedChevronUpDown.d.ts +0 -8
- package/dist/cjs/helpers/Chevron/AnimatedChevronUpDown.styles.d.ts +0 -7
- package/dist/cjs/helpers/Chevron/index.d.ts +0 -1
- package/dist/cjs/helpers/HiddenInput/HiddenInput.d.ts +0 -1
- package/dist/cjs/helpers/HiddenInput/index.d.ts +0 -1
- package/dist/cjs/helpers/Input/Input.styles.d.ts +0 -16
- package/dist/cjs/helpers/Input/Input.tokens.d.ts +0 -38
- package/dist/cjs/helpers/Input/Input.types.d.ts +0 -28
- package/dist/cjs/helpers/Input/Input.utils.d.ts +0 -5
- package/dist/cjs/helpers/Input/index.d.ts +0 -4
- package/dist/cjs/helpers/Paper/Paper.d.ts +0 -8
- package/dist/cjs/helpers/Paper/Paper.tokens.d.ts +0 -7
- package/dist/cjs/helpers/Paper/index.d.ts +0 -1
- package/dist/cjs/helpers/RequiredMarker/RequiredMarker.d.ts +0 -1
- package/dist/cjs/helpers/RequiredMarker/index.d.ts +0 -1
- package/dist/cjs/helpers/ScreenSize/ScreenSize.utils.d.ts +0 -7
- package/dist/cjs/helpers/ScreenSize/index.d.ts +0 -1
- package/dist/cjs/helpers/SelectionControl/index.d.ts +0 -3
- package/dist/cjs/helpers/TextOverflowEllipsis/TextOverflowEllipsis.d.ts +0 -2
- package/dist/cjs/helpers/TextOverflowEllipsis/index.d.ts +0 -1
- package/dist/cjs/helpers/index.d.ts +0 -7
- package/dist/cjs/helpers/styling/danger.d.ts +0 -4
- package/dist/cjs/helpers/styling/focus.d.ts +0 -9
- package/dist/cjs/helpers/styling/focusVisible.d.ts +0 -37
- package/dist/cjs/helpers/styling/hideInput.d.ts +0 -7
- package/dist/cjs/helpers/styling/hover.d.ts +0 -12
- package/dist/cjs/helpers/styling/index.d.ts +0 -9
- package/dist/cjs/helpers/styling/normalize.d.ts +0 -5
- package/dist/cjs/helpers/styling/removeButtonStyling.d.ts +0 -9
- package/dist/cjs/helpers/styling/removeListStyling.d.ts +0 -5
- package/dist/cjs/helpers/styling/selection.d.ts +0 -4
- package/dist/cjs/helpers/styling/visibilityTransition.d.ts +0 -1
- package/dist/cjs/hooks/index.d.ts +0 -9
- package/dist/cjs/hooks/useCombinedRefs.d.ts +0 -20
- package/dist/cjs/hooks/useFloatPosition.d.ts +0 -48
- package/dist/cjs/hooks/useFocusTrap.d.ts +0 -16
- package/dist/cjs/hooks/useIsMounted.d.ts +0 -2
- package/dist/cjs/hooks/useMountTransition.d.ts +0 -33
- package/dist/cjs/hooks/useOnClickOutside.d.ts +0 -14
- package/dist/cjs/hooks/useOnKeyDown.d.ts +0 -14
- package/dist/cjs/hooks/useReturnFocusOnBlur.d.ts +0 -31
- package/dist/cjs/hooks/useRoveFocus.d.ts +0 -28
- package/dist/cjs/hooks/useScreenSize.d.ts +0 -20
- package/dist/cjs/icons/icons.stories.d.ts +0 -5
- package/dist/cjs/icons/tsx/agreement.d.ts +0 -2
- package/dist/cjs/icons/tsx/apps.d.ts +0 -2
- package/dist/cjs/icons/tsx/archive.d.ts +0 -2
- package/dist/cjs/icons/tsx/arrowDown.d.ts +0 -2
- package/dist/cjs/icons/tsx/arrowLeft.d.ts +0 -2
- package/dist/cjs/icons/tsx/arrowRight.d.ts +0 -2
- package/dist/cjs/icons/tsx/arrowUp.d.ts +0 -2
- package/dist/cjs/icons/tsx/attachment.d.ts +0 -2
- package/dist/cjs/icons/tsx/barChart.d.ts +0 -2
- package/dist/cjs/icons/tsx/barChartBoxed.d.ts +0 -2
- package/dist/cjs/icons/tsx/block.d.ts +0 -2
- package/dist/cjs/icons/tsx/book.d.ts +0 -2
- package/dist/cjs/icons/tsx/build.d.ts +0 -2
- package/dist/cjs/icons/tsx/buildCircled.d.ts +0 -2
- package/dist/cjs/icons/tsx/calendar.d.ts +0 -2
- package/dist/cjs/icons/tsx/calendarMonth.d.ts +0 -2
- package/dist/cjs/icons/tsx/calendarViewDay.d.ts +0 -2
- package/dist/cjs/icons/tsx/calendarViewMonth.d.ts +0 -2
- package/dist/cjs/icons/tsx/calendarViewWeek.d.ts +0 -2
- package/dist/cjs/icons/tsx/call.d.ts +0 -2
- package/dist/cjs/icons/tsx/caring.d.ts +0 -2
- package/dist/cjs/icons/tsx/chat.d.ts +0 -2
- package/dist/cjs/icons/tsx/check.d.ts +0 -2
- package/dist/cjs/icons/tsx/checkCircled.d.ts +0 -2
- package/dist/cjs/icons/tsx/checklist.d.ts +0 -2
- package/dist/cjs/icons/tsx/chevronDown.d.ts +0 -2
- package/dist/cjs/icons/tsx/chevronFirst.d.ts +0 -2
- package/dist/cjs/icons/tsx/chevronLargeLeft.d.ts +0 -2
- package/dist/cjs/icons/tsx/chevronLargeRight.d.ts +0 -2
- package/dist/cjs/icons/tsx/chevronLast.d.ts +0 -2
- package/dist/cjs/icons/tsx/chevronLeft.d.ts +0 -2
- package/dist/cjs/icons/tsx/chevronRight.d.ts +0 -2
- package/dist/cjs/icons/tsx/chevronUp.d.ts +0 -2
- package/dist/cjs/icons/tsx/close.d.ts +0 -2
- package/dist/cjs/icons/tsx/closeCircled.d.ts +0 -2
- package/dist/cjs/icons/tsx/closeSmall.d.ts +0 -2
- package/dist/cjs/icons/tsx/cloud.d.ts +0 -2
- package/dist/cjs/icons/tsx/collapse.d.ts +0 -2
- package/dist/cjs/icons/tsx/comment.d.ts +0 -2
- package/dist/cjs/icons/tsx/copy.d.ts +0 -2
- package/dist/cjs/icons/tsx/court.d.ts +0 -2
- package/dist/cjs/icons/tsx/dateRange.d.ts +0 -2
- package/dist/cjs/icons/tsx/deaths.d.ts +0 -2
- package/dist/cjs/icons/tsx/doubleChevronLeft.d.ts +0 -2
- package/dist/cjs/icons/tsx/doubleChevronRight.d.ts +0 -2
- package/dist/cjs/icons/tsx/download.d.ts +0 -2
- package/dist/cjs/icons/tsx/downloadDone.d.ts +0 -2
- package/dist/cjs/icons/tsx/dragHandle.d.ts +0 -2
- package/dist/cjs/icons/tsx/edit.d.ts +0 -2
- package/dist/cjs/icons/tsx/error.d.ts +0 -2
- package/dist/cjs/icons/tsx/exclaim.d.ts +0 -2
- package/dist/cjs/icons/tsx/expand.d.ts +0 -2
- package/dist/cjs/icons/tsx/facebook.d.ts +0 -2
- package/dist/cjs/icons/tsx/family.d.ts +0 -2
- package/dist/cjs/icons/tsx/feedback.d.ts +0 -2
- package/dist/cjs/icons/tsx/file.d.ts +0 -2
- package/dist/cjs/icons/tsx/fileAdd.d.ts +0 -2
- package/dist/cjs/icons/tsx/fileText.d.ts +0 -2
- package/dist/cjs/icons/tsx/filter.d.ts +0 -2
- package/dist/cjs/icons/tsx/filterList.d.ts +0 -2
- package/dist/cjs/icons/tsx/filterListOff.d.ts +0 -2
- package/dist/cjs/icons/tsx/filterOff.d.ts +0 -2
- package/dist/cjs/icons/tsx/findInPage.d.ts +0 -2
- package/dist/cjs/icons/tsx/folder.d.ts +0 -2
- package/dist/cjs/icons/tsx/folderAdd.d.ts +0 -2
- package/dist/cjs/icons/tsx/fullsceenExit.d.ts +0 -2
- package/dist/cjs/icons/tsx/fullscreen.d.ts +0 -2
- package/dist/cjs/icons/tsx/gavel.d.ts +0 -2
- package/dist/cjs/icons/tsx/help.d.ts +0 -2
- package/dist/cjs/icons/tsx/helpFilled.d.ts +0 -2
- package/dist/cjs/icons/tsx/home.d.ts +0 -2
- package/dist/cjs/icons/tsx/hourglassBottom.d.ts +0 -2
- package/dist/cjs/icons/tsx/hourglassDisabled.d.ts +0 -2
- package/dist/cjs/icons/tsx/hourglassEmpty.d.ts +0 -2
- package/dist/cjs/icons/tsx/hourglassFull.d.ts +0 -2
- package/dist/cjs/icons/tsx/hourglassTop.d.ts +0 -2
- package/dist/cjs/icons/tsx/image.d.ts +0 -2
- package/dist/cjs/icons/tsx/index.d.ts +0 -149
- package/dist/cjs/icons/tsx/info.d.ts +0 -2
- package/dist/cjs/icons/tsx/instagram.d.ts +0 -2
- package/dist/cjs/icons/tsx/jordskifterett.d.ts +0 -2
- package/dist/cjs/icons/tsx/key.d.ts +0 -2
- package/dist/cjs/icons/tsx/lagmannsrett.d.ts +0 -2
- package/dist/cjs/icons/tsx/language.d.ts +0 -2
- package/dist/cjs/icons/tsx/libraryAdd.d.ts +0 -2
- package/dist/cjs/icons/tsx/lineChart.d.ts +0 -2
- package/dist/cjs/icons/tsx/link.d.ts +0 -2
- package/dist/cjs/icons/tsx/linkOff.d.ts +0 -2
- package/dist/cjs/icons/tsx/linkedIn.d.ts +0 -2
- package/dist/cjs/icons/tsx/list.d.ts +0 -2
- package/dist/cjs/icons/tsx/listAlt.d.ts +0 -2
- package/dist/cjs/icons/tsx/location.d.ts +0 -2
- package/dist/cjs/icons/tsx/lock.d.ts +0 -2
- package/dist/cjs/icons/tsx/lockOpen.d.ts +0 -2
- package/dist/cjs/icons/tsx/login.d.ts +0 -2
- package/dist/cjs/icons/tsx/logout.d.ts +0 -2
- package/dist/cjs/icons/tsx/mail.d.ts +0 -2
- package/dist/cjs/icons/tsx/mailOpen.d.ts +0 -2
- package/dist/cjs/icons/tsx/menu.d.ts +0 -2
- package/dist/cjs/icons/tsx/minus.d.ts +0 -2
- package/dist/cjs/icons/tsx/minusCircled.d.ts +0 -2
- package/dist/cjs/icons/tsx/moreHorizontal.d.ts +0 -2
- package/dist/cjs/icons/tsx/moreVertical.d.ts +0 -2
- package/dist/cjs/icons/tsx/notarial.d.ts +0 -2
- package/dist/cjs/icons/tsx/notifications.d.ts +0 -2
- package/dist/cjs/icons/tsx/notificationsOff.d.ts +0 -2
- package/dist/cjs/icons/tsx/onlineMeeting.d.ts +0 -2
- package/dist/cjs/icons/tsx/openExternal.d.ts +0 -2
- package/dist/cjs/icons/tsx/payout.d.ts +0 -2
- package/dist/cjs/icons/tsx/pdf.d.ts +0 -2
- package/dist/cjs/icons/tsx/person.d.ts +0 -2
- package/dist/cjs/icons/tsx/personAdd.d.ts +0 -2
- package/dist/cjs/icons/tsx/pin.d.ts +0 -2
- package/dist/cjs/icons/tsx/plus.d.ts +0 -2
- package/dist/cjs/icons/tsx/plusCircled.d.ts +0 -2
- package/dist/cjs/icons/tsx/print.d.ts +0 -2
- package/dist/cjs/icons/tsx/property.d.ts +0 -2
- package/dist/cjs/icons/tsx/publish.d.ts +0 -2
- package/dist/cjs/icons/tsx/questionAnswer.d.ts +0 -2
- package/dist/cjs/icons/tsx/receipt.d.ts +0 -2
- package/dist/cjs/icons/tsx/redo.d.ts +0 -2
- package/dist/cjs/icons/tsx/refresh.d.ts +0 -2
- package/dist/cjs/icons/tsx/replay.d.ts +0 -2
- package/dist/cjs/icons/tsx/search.d.ts +0 -2
- package/dist/cjs/icons/tsx/settings.d.ts +0 -2
- package/dist/cjs/icons/tsx/sms.d.ts +0 -2
- package/dist/cjs/icons/tsx/star.d.ts +0 -2
- package/dist/cjs/icons/tsx/starFilled.d.ts +0 -2
- package/dist/cjs/icons/tsx/starHalfFilled.d.ts +0 -2
- package/dist/cjs/icons/tsx/sync.d.ts +0 -2
- package/dist/cjs/icons/tsx/thumbdown.d.ts +0 -2
- package/dist/cjs/icons/tsx/thumbdownFilled.d.ts +0 -2
- package/dist/cjs/icons/tsx/thumbup.d.ts +0 -2
- package/dist/cjs/icons/tsx/thumbupFilled.d.ts +0 -2
- package/dist/cjs/icons/tsx/time.d.ts +0 -2
- package/dist/cjs/icons/tsx/tingrett.d.ts +0 -2
- package/dist/cjs/icons/tsx/tip.d.ts +0 -2
- package/dist/cjs/icons/tsx/trash.d.ts +0 -2
- package/dist/cjs/icons/tsx/trendingDown.d.ts +0 -2
- package/dist/cjs/icons/tsx/trendingUp.d.ts +0 -2
- package/dist/cjs/icons/tsx/twitter.d.ts +0 -2
- package/dist/cjs/icons/tsx/undo.d.ts +0 -2
- package/dist/cjs/icons/tsx/unfoldLess.d.ts +0 -2
- package/dist/cjs/icons/tsx/unfoldMore.d.ts +0 -2
- package/dist/cjs/icons/tsx/upload.d.ts +0 -2
- package/dist/cjs/icons/tsx/visibilityOff.d.ts +0 -2
- package/dist/cjs/icons/tsx/visibilityOn.d.ts +0 -2
- package/dist/cjs/icons/tsx/warning.d.ts +0 -2
- package/dist/cjs/icons/tsx/zoomIn.d.ts +0 -2
- package/dist/cjs/icons/tsx/zoomOut.d.ts +0 -2
- package/dist/cjs/icons/utils/StyledSvg.d.ts +0 -4
- package/dist/cjs/icons/utils/SvgWrapper.d.ts +0 -2
- package/dist/cjs/icons/utils/index.d.ts +0 -2
- package/dist/cjs/icons/utils/propTypes.d.ts +0 -5
- package/dist/cjs/types/BaseComponentProps.d.ts +0 -58
- package/dist/cjs/types/CheckboxPickedHTMLAttributes.d.ts +0 -2
- package/dist/cjs/types/Direction.d.ts +0 -1
- package/dist/cjs/types/index.d.ts +0 -4
- package/dist/cjs/types/utils.d.ts +0 -15
- package/dist/cjs/utils/color.d.ts +0 -30
- package/dist/cjs/utils/combineHandlers.d.ts +0 -1
- package/dist/cjs/utils/getFocusableElements.d.ts +0 -2
- package/dist/cjs/utils/getScrollbarSize.d.ts +0 -1
- package/dist/cjs/utils/idGenerator.d.ts +0 -2
- package/dist/cjs/utils/index.d.ts +0 -7
- package/dist/cjs/utils/searchFilter.d.ts +0 -2
- package/dist/cjs/utils/text.d.ts +0 -2
- package/dist/components/Icon/Icon.d.ts +0 -17
- package/dist/components/Icon/Icon.js +0 -44
- package/dist/components/Icon/Icon.stories.d.ts +0 -21
- package/dist/components/Icon/index.d.ts +0 -1
- package/dist/components/Typography/Caption/Caption.d.ts +0 -11
- package/dist/components/Typography/Caption/Caption.js +0 -22
- package/dist/components/Typography/Caption/Caption.stories.d.ts +0 -29
- package/dist/components/Typography/Caption/index.d.ts +0 -1
- package/dist/components/Typography/Heading/Heading.d.ts +0 -22
- package/dist/components/Typography/Heading/Heading.js +0 -48
- package/dist/components/Typography/Heading/Heading.stories.d.ts +0 -38
- package/dist/components/Typography/Heading/index.d.ts +0 -1
- package/dist/components/Typography/Label/Label.d.ts +0 -17
- package/dist/components/Typography/Label/Label.js +0 -33
- package/dist/components/Typography/Label/Label.stories.d.ts +0 -33
- package/dist/components/Typography/Label/index.d.ts +0 -1
- package/dist/components/Typography/Legend/Legend.d.ts +0 -11
- package/dist/components/Typography/Legend/Legend.js +0 -22
- package/dist/components/Typography/Legend/Legend.stories.d.ts +0 -29
- package/dist/components/Typography/Legend/index.d.ts +0 -1
- package/dist/components/Typography/Link/Link.d.ts +0 -23
- package/dist/components/Typography/Link/Link.js +0 -39
- package/dist/components/Typography/Link/Link.stories.d.ts +0 -48
- package/dist/components/Typography/Link/index.d.ts +0 -1
- package/dist/components/Typography/Paragraph/Paragraph.d.ts +0 -17
- package/dist/components/Typography/Paragraph/Paragraph.js +0 -25
- package/dist/components/Typography/Paragraph/Paragraph.stories.d.ts +0 -37
- package/dist/components/Typography/Paragraph/index.d.ts +0 -1
- package/dist/components/Typography/Typography/Typography.d.ts +0 -25
- package/dist/components/Typography/Typography/Typography.js +0 -86
- package/dist/components/Typography/Typography/Typography.stories.d.ts +0 -64
- package/dist/components/Typography/Typography/Typography.types.d.ts +0 -36
- package/dist/components/Typography/Typography/index.d.ts +0 -2
- package/dist/components/Typography/Typography.tokens.d.ts +0 -448
- package/dist/components/Typography/Typography.tokens.js +0 -314
- package/dist/components/Typography/Typography.utils.d.ts +0 -203
- package/dist/components/Typography/Typography.utils.js +0 -69
- package/dist/components/Typography/index.d.ts +0 -7
- package/dist/components/Typography/stories/Examples.stories.d.ts +0 -5
- package/dist/components/Typography/stories/TypographyComponents.stories.d.ts +0 -42
- package/dist/components/Typography/stories/TypographyTypes.stories.d.ts +0 -11
- package/dist/helpers/Chevron/AnimatedChevronUpDown.d.ts +0 -8
- package/dist/helpers/Chevron/AnimatedChevronUpDown.js +0 -31
- package/dist/helpers/Chevron/AnimatedChevronUpDown.styles.d.ts +0 -7
- package/dist/helpers/Chevron/AnimatedChevronUpDown.styles.js +0 -29
- package/dist/helpers/Chevron/index.d.ts +0 -1
- package/dist/helpers/HiddenInput/HiddenInput.d.ts +0 -1
- package/dist/helpers/HiddenInput/HiddenInput.js +0 -8
- package/dist/helpers/HiddenInput/index.d.ts +0 -1
- package/dist/helpers/Input/Input.styles.d.ts +0 -16
- package/dist/helpers/Input/Input.styles.js +0 -51
- package/dist/helpers/Input/Input.tokens.d.ts +0 -38
- package/dist/helpers/Input/Input.tokens.js +0 -51
- package/dist/helpers/Input/Input.types.d.ts +0 -28
- package/dist/helpers/Input/Input.utils.d.ts +0 -5
- package/dist/helpers/Input/Input.utils.js +0 -37
- package/dist/helpers/Input/index.d.ts +0 -4
- package/dist/helpers/Paper/Paper.d.ts +0 -8
- package/dist/helpers/Paper/Paper.js +0 -43
- package/dist/helpers/Paper/Paper.tokens.d.ts +0 -7
- package/dist/helpers/Paper/Paper.tokens.js +0 -15
- package/dist/helpers/Paper/index.d.ts +0 -1
- package/dist/helpers/RequiredMarker/RequiredMarker.d.ts +0 -1
- package/dist/helpers/RequiredMarker/RequiredMarker.js +0 -15
- package/dist/helpers/RequiredMarker/index.d.ts +0 -1
- package/dist/helpers/ScreenSize/ScreenSize.utils.d.ts +0 -7
- package/dist/helpers/ScreenSize/ScreenSize.utils.js +0 -21
- package/dist/helpers/ScreenSize/index.d.ts +0 -1
- package/dist/helpers/SelectionControl/index.d.ts +0 -3
- package/dist/helpers/TextOverflowEllipsis/TextOverflowEllipsis.d.ts +0 -2
- package/dist/helpers/TextOverflowEllipsis/TextOverflowEllipsis.js +0 -12
- package/dist/helpers/TextOverflowEllipsis/index.d.ts +0 -1
- package/dist/helpers/index.d.ts +0 -7
- package/dist/helpers/styling/danger.d.ts +0 -4
- package/dist/helpers/styling/danger.js +0 -9
- package/dist/helpers/styling/focus.d.ts +0 -9
- package/dist/helpers/styling/focus.js +0 -14
- package/dist/helpers/styling/focusVisible.d.ts +0 -37
- package/dist/helpers/styling/focusVisible.js +0 -44
- package/dist/helpers/styling/hideInput.d.ts +0 -7
- package/dist/helpers/styling/hover.d.ts +0 -12
- package/dist/helpers/styling/hover.js +0 -18
- package/dist/helpers/styling/index.d.ts +0 -9
- package/dist/helpers/styling/normalize.d.ts +0 -5
- package/dist/helpers/styling/normalize.js +0 -6
- package/dist/helpers/styling/removeButtonStyling.d.ts +0 -9
- package/dist/helpers/styling/removeButtonStyling.js +0 -11
- package/dist/helpers/styling/removeListStyling.d.ts +0 -5
- package/dist/helpers/styling/removeListStyling.js +0 -7
- package/dist/helpers/styling/selection.d.ts +0 -4
- package/dist/helpers/styling/selection.js +0 -9
- package/dist/helpers/styling/visibilityTransition.d.ts +0 -1
- package/dist/helpers/styling/visibilityTransition.js +0 -7
- package/dist/hooks/index.d.ts +0 -9
- package/dist/hooks/useCombinedRefs.d.ts +0 -20
- package/dist/hooks/useCombinedRefs.js +0 -33
- package/dist/hooks/useFloatPosition.d.ts +0 -48
- package/dist/hooks/useFloatPosition.js +0 -91
- package/dist/hooks/useFocusTrap.d.ts +0 -16
- package/dist/hooks/useFocusTrap.js +0 -48
- package/dist/hooks/useIsMounted.d.ts +0 -2
- package/dist/hooks/useIsMounted.js +0 -16
- package/dist/hooks/useMountTransition.d.ts +0 -33
- package/dist/hooks/useMountTransition.js +0 -55
- package/dist/hooks/useOnClickOutside.d.ts +0 -14
- package/dist/hooks/useOnClickOutside.js +0 -38
- package/dist/hooks/useOnKeyDown.d.ts +0 -14
- package/dist/hooks/useOnKeyDown.js +0 -31
- package/dist/hooks/useReturnFocusOnBlur.d.ts +0 -31
- package/dist/hooks/useReturnFocusOnBlur.js +0 -60
- package/dist/hooks/useRoveFocus.d.ts +0 -28
- package/dist/hooks/useRoveFocus.js +0 -63
- package/dist/hooks/useScreenSize.d.ts +0 -20
- package/dist/hooks/useScreenSize.js +0 -61
- package/dist/icons/icons.stories.d.ts +0 -5
- package/dist/icons/tsx/agreement.d.ts +0 -2
- package/dist/icons/tsx/agreement.js +0 -12
- package/dist/icons/tsx/apps.d.ts +0 -2
- package/dist/icons/tsx/apps.js +0 -12
- package/dist/icons/tsx/archive.d.ts +0 -2
- package/dist/icons/tsx/archive.js +0 -14
- package/dist/icons/tsx/arrowDown.d.ts +0 -2
- package/dist/icons/tsx/arrowDown.js +0 -12
- package/dist/icons/tsx/arrowLeft.d.ts +0 -2
- package/dist/icons/tsx/arrowLeft.js +0 -12
- package/dist/icons/tsx/arrowRight.d.ts +0 -2
- package/dist/icons/tsx/arrowRight.js +0 -12
- package/dist/icons/tsx/arrowUp.d.ts +0 -2
- package/dist/icons/tsx/arrowUp.js +0 -12
- package/dist/icons/tsx/attachment.d.ts +0 -2
- package/dist/icons/tsx/attachment.js +0 -12
- package/dist/icons/tsx/barChart.d.ts +0 -2
- package/dist/icons/tsx/barChart.js +0 -12
- package/dist/icons/tsx/barChartBoxed.d.ts +0 -2
- package/dist/icons/tsx/barChartBoxed.js +0 -12
- package/dist/icons/tsx/block.d.ts +0 -2
- package/dist/icons/tsx/block.js +0 -12
- package/dist/icons/tsx/book.d.ts +0 -2
- package/dist/icons/tsx/book.js +0 -14
- package/dist/icons/tsx/build.d.ts +0 -2
- package/dist/icons/tsx/build.js +0 -12
- package/dist/icons/tsx/buildCircled.d.ts +0 -2
- package/dist/icons/tsx/buildCircled.js +0 -18
- package/dist/icons/tsx/calendar.d.ts +0 -2
- package/dist/icons/tsx/calendar.js +0 -12
- package/dist/icons/tsx/calendarMonth.d.ts +0 -2
- package/dist/icons/tsx/calendarMonth.js +0 -12
- package/dist/icons/tsx/calendarViewDay.d.ts +0 -2
- package/dist/icons/tsx/calendarViewDay.js +0 -12
- package/dist/icons/tsx/calendarViewMonth.d.ts +0 -2
- package/dist/icons/tsx/calendarViewMonth.js +0 -12
- package/dist/icons/tsx/calendarViewWeek.d.ts +0 -2
- package/dist/icons/tsx/calendarViewWeek.js +0 -12
- package/dist/icons/tsx/call.d.ts +0 -2
- package/dist/icons/tsx/call.js +0 -12
- package/dist/icons/tsx/caring.d.ts +0 -2
- package/dist/icons/tsx/caring.js +0 -12
- package/dist/icons/tsx/chat.d.ts +0 -2
- package/dist/icons/tsx/chat.js +0 -12
- package/dist/icons/tsx/check.d.ts +0 -2
- package/dist/icons/tsx/check.js +0 -12
- package/dist/icons/tsx/checkCircled.d.ts +0 -2
- package/dist/icons/tsx/checkCircled.js +0 -12
- package/dist/icons/tsx/checklist.d.ts +0 -2
- package/dist/icons/tsx/checklist.js +0 -12
- package/dist/icons/tsx/chevronDown.d.ts +0 -2
- package/dist/icons/tsx/chevronDown.js +0 -12
- package/dist/icons/tsx/chevronFirst.d.ts +0 -2
- package/dist/icons/tsx/chevronFirst.js +0 -12
- package/dist/icons/tsx/chevronLargeLeft.d.ts +0 -2
- package/dist/icons/tsx/chevronLargeLeft.js +0 -12
- package/dist/icons/tsx/chevronLargeRight.d.ts +0 -2
- package/dist/icons/tsx/chevronLargeRight.js +0 -12
- package/dist/icons/tsx/chevronLast.d.ts +0 -2
- package/dist/icons/tsx/chevronLast.js +0 -12
- package/dist/icons/tsx/chevronLeft.d.ts +0 -2
- package/dist/icons/tsx/chevronLeft.js +0 -12
- package/dist/icons/tsx/chevronRight.d.ts +0 -2
- package/dist/icons/tsx/chevronRight.js +0 -12
- package/dist/icons/tsx/chevronUp.d.ts +0 -2
- package/dist/icons/tsx/chevronUp.js +0 -12
- package/dist/icons/tsx/close.d.ts +0 -2
- package/dist/icons/tsx/close.js +0 -12
- package/dist/icons/tsx/closeCircled.d.ts +0 -2
- package/dist/icons/tsx/closeCircled.js +0 -12
- package/dist/icons/tsx/closeSmall.d.ts +0 -2
- package/dist/icons/tsx/closeSmall.js +0 -12
- package/dist/icons/tsx/cloud.d.ts +0 -2
- package/dist/icons/tsx/cloud.js +0 -12
- package/dist/icons/tsx/collapse.d.ts +0 -2
- package/dist/icons/tsx/collapse.js +0 -12
- package/dist/icons/tsx/comment.d.ts +0 -2
- package/dist/icons/tsx/comment.js +0 -12
- package/dist/icons/tsx/copy.d.ts +0 -2
- package/dist/icons/tsx/copy.js +0 -12
- package/dist/icons/tsx/court.d.ts +0 -2
- package/dist/icons/tsx/court.js +0 -12
- package/dist/icons/tsx/dateRange.d.ts +0 -2
- package/dist/icons/tsx/dateRange.js +0 -12
- package/dist/icons/tsx/deaths.d.ts +0 -2
- package/dist/icons/tsx/deaths.js +0 -12
- package/dist/icons/tsx/doubleChevronLeft.d.ts +0 -2
- package/dist/icons/tsx/doubleChevronLeft.js +0 -12
- package/dist/icons/tsx/doubleChevronRight.d.ts +0 -2
- package/dist/icons/tsx/doubleChevronRight.js +0 -12
- package/dist/icons/tsx/download.d.ts +0 -2
- package/dist/icons/tsx/download.js +0 -12
- package/dist/icons/tsx/downloadDone.d.ts +0 -2
- package/dist/icons/tsx/downloadDone.js +0 -12
- package/dist/icons/tsx/dragHandle.d.ts +0 -2
- package/dist/icons/tsx/dragHandle.js +0 -12
- package/dist/icons/tsx/edit.d.ts +0 -2
- package/dist/icons/tsx/edit.js +0 -12
- package/dist/icons/tsx/error.d.ts +0 -2
- package/dist/icons/tsx/error.js +0 -12
- package/dist/icons/tsx/exclaim.d.ts +0 -2
- package/dist/icons/tsx/exclaim.js +0 -12
- package/dist/icons/tsx/expand.d.ts +0 -2
- package/dist/icons/tsx/expand.js +0 -12
- package/dist/icons/tsx/facebook.d.ts +0 -2
- package/dist/icons/tsx/facebook.js +0 -12
- package/dist/icons/tsx/family.d.ts +0 -2
- package/dist/icons/tsx/family.js +0 -12
- package/dist/icons/tsx/feedback.d.ts +0 -2
- package/dist/icons/tsx/feedback.js +0 -12
- package/dist/icons/tsx/file.d.ts +0 -2
- package/dist/icons/tsx/file.js +0 -12
- package/dist/icons/tsx/fileAdd.d.ts +0 -2
- package/dist/icons/tsx/fileAdd.js +0 -12
- package/dist/icons/tsx/fileText.d.ts +0 -2
- package/dist/icons/tsx/fileText.js +0 -12
- package/dist/icons/tsx/filter.d.ts +0 -2
- package/dist/icons/tsx/filter.js +0 -12
- package/dist/icons/tsx/filterList.d.ts +0 -2
- package/dist/icons/tsx/filterList.js +0 -12
- package/dist/icons/tsx/filterListOff.d.ts +0 -2
- package/dist/icons/tsx/filterListOff.js +0 -12
- package/dist/icons/tsx/filterOff.d.ts +0 -2
- package/dist/icons/tsx/filterOff.js +0 -12
- package/dist/icons/tsx/findInPage.d.ts +0 -2
- package/dist/icons/tsx/findInPage.js +0 -12
- package/dist/icons/tsx/folder.d.ts +0 -2
- package/dist/icons/tsx/folder.js +0 -12
- package/dist/icons/tsx/folderAdd.d.ts +0 -2
- package/dist/icons/tsx/folderAdd.js +0 -12
- package/dist/icons/tsx/fullsceenExit.d.ts +0 -2
- package/dist/icons/tsx/fullsceenExit.js +0 -12
- package/dist/icons/tsx/fullscreen.d.ts +0 -2
- package/dist/icons/tsx/fullscreen.js +0 -12
- package/dist/icons/tsx/gavel.d.ts +0 -2
- package/dist/icons/tsx/gavel.js +0 -18
- package/dist/icons/tsx/help.d.ts +0 -2
- package/dist/icons/tsx/help.js +0 -12
- package/dist/icons/tsx/helpFilled.d.ts +0 -2
- package/dist/icons/tsx/helpFilled.js +0 -12
- package/dist/icons/tsx/home.d.ts +0 -2
- package/dist/icons/tsx/home.js +0 -12
- package/dist/icons/tsx/hourglassBottom.d.ts +0 -2
- package/dist/icons/tsx/hourglassBottom.js +0 -12
- package/dist/icons/tsx/hourglassDisabled.d.ts +0 -2
- package/dist/icons/tsx/hourglassDisabled.js +0 -12
- package/dist/icons/tsx/hourglassEmpty.d.ts +0 -2
- package/dist/icons/tsx/hourglassEmpty.js +0 -12
- package/dist/icons/tsx/hourglassFull.d.ts +0 -2
- package/dist/icons/tsx/hourglassFull.js +0 -12
- package/dist/icons/tsx/hourglassTop.d.ts +0 -2
- package/dist/icons/tsx/hourglassTop.js +0 -12
- package/dist/icons/tsx/image.d.ts +0 -2
- package/dist/icons/tsx/image.js +0 -12
- package/dist/icons/tsx/index.d.ts +0 -149
- package/dist/icons/tsx/info.d.ts +0 -2
- package/dist/icons/tsx/info.js +0 -12
- package/dist/icons/tsx/instagram.d.ts +0 -2
- package/dist/icons/tsx/instagram.js +0 -12
- package/dist/icons/tsx/jordskifterett.d.ts +0 -2
- package/dist/icons/tsx/jordskifterett.js +0 -24
- package/dist/icons/tsx/key.d.ts +0 -2
- package/dist/icons/tsx/key.js +0 -12
- package/dist/icons/tsx/lagmannsrett.d.ts +0 -2
- package/dist/icons/tsx/lagmannsrett.js +0 -12
- package/dist/icons/tsx/language.d.ts +0 -2
- package/dist/icons/tsx/language.js +0 -12
- package/dist/icons/tsx/libraryAdd.d.ts +0 -2
- package/dist/icons/tsx/libraryAdd.js +0 -12
- package/dist/icons/tsx/lineChart.d.ts +0 -2
- package/dist/icons/tsx/lineChart.js +0 -12
- package/dist/icons/tsx/link.d.ts +0 -2
- package/dist/icons/tsx/link.js +0 -12
- package/dist/icons/tsx/linkOff.d.ts +0 -2
- package/dist/icons/tsx/linkOff.js +0 -12
- package/dist/icons/tsx/linkedIn.d.ts +0 -2
- package/dist/icons/tsx/linkedIn.js +0 -14
- package/dist/icons/tsx/list.d.ts +0 -2
- package/dist/icons/tsx/list.js +0 -12
- package/dist/icons/tsx/listAlt.d.ts +0 -2
- package/dist/icons/tsx/listAlt.js +0 -12
- package/dist/icons/tsx/location.d.ts +0 -2
- package/dist/icons/tsx/location.js +0 -12
- package/dist/icons/tsx/lock.d.ts +0 -2
- package/dist/icons/tsx/lock.js +0 -12
- package/dist/icons/tsx/lockOpen.d.ts +0 -2
- package/dist/icons/tsx/lockOpen.js +0 -12
- package/dist/icons/tsx/login.d.ts +0 -2
- package/dist/icons/tsx/login.js +0 -12
- package/dist/icons/tsx/logout.d.ts +0 -2
- package/dist/icons/tsx/logout.js +0 -12
- package/dist/icons/tsx/mail.d.ts +0 -2
- package/dist/icons/tsx/mail.js +0 -12
- package/dist/icons/tsx/mailOpen.d.ts +0 -2
- package/dist/icons/tsx/mailOpen.js +0 -12
- package/dist/icons/tsx/menu.d.ts +0 -2
- package/dist/icons/tsx/menu.js +0 -12
- package/dist/icons/tsx/minus.d.ts +0 -2
- package/dist/icons/tsx/minus.js +0 -12
- package/dist/icons/tsx/minusCircled.d.ts +0 -2
- package/dist/icons/tsx/minusCircled.js +0 -12
- package/dist/icons/tsx/moreHorizontal.d.ts +0 -2
- package/dist/icons/tsx/moreHorizontal.js +0 -12
- package/dist/icons/tsx/moreVertical.d.ts +0 -2
- package/dist/icons/tsx/moreVertical.js +0 -12
- package/dist/icons/tsx/notarial.d.ts +0 -2
- package/dist/icons/tsx/notarial.js +0 -12
- package/dist/icons/tsx/notifications.d.ts +0 -2
- package/dist/icons/tsx/notifications.js +0 -12
- package/dist/icons/tsx/notificationsOff.d.ts +0 -2
- package/dist/icons/tsx/notificationsOff.js +0 -12
- package/dist/icons/tsx/onlineMeeting.d.ts +0 -2
- package/dist/icons/tsx/onlineMeeting.js +0 -12
- package/dist/icons/tsx/openExternal.d.ts +0 -2
- package/dist/icons/tsx/openExternal.js +0 -12
- package/dist/icons/tsx/payout.d.ts +0 -2
- package/dist/icons/tsx/payout.js +0 -12
- package/dist/icons/tsx/pdf.d.ts +0 -2
- package/dist/icons/tsx/pdf.js +0 -12
- package/dist/icons/tsx/person.d.ts +0 -2
- package/dist/icons/tsx/person.js +0 -12
- package/dist/icons/tsx/personAdd.d.ts +0 -2
- package/dist/icons/tsx/personAdd.js +0 -12
- package/dist/icons/tsx/pin.d.ts +0 -2
- package/dist/icons/tsx/pin.js +0 -12
- package/dist/icons/tsx/plus.d.ts +0 -2
- package/dist/icons/tsx/plus.js +0 -12
- package/dist/icons/tsx/plusCircled.d.ts +0 -2
- package/dist/icons/tsx/plusCircled.js +0 -12
- package/dist/icons/tsx/print.d.ts +0 -2
- package/dist/icons/tsx/print.js +0 -14
- package/dist/icons/tsx/property.d.ts +0 -2
- package/dist/icons/tsx/property.js +0 -14
- package/dist/icons/tsx/publish.d.ts +0 -2
- package/dist/icons/tsx/publish.js +0 -12
- package/dist/icons/tsx/questionAnswer.d.ts +0 -2
- package/dist/icons/tsx/questionAnswer.js +0 -12
- package/dist/icons/tsx/receipt.d.ts +0 -2
- package/dist/icons/tsx/receipt.js +0 -12
- package/dist/icons/tsx/redo.d.ts +0 -2
- package/dist/icons/tsx/redo.js +0 -12
- package/dist/icons/tsx/refresh.d.ts +0 -2
- package/dist/icons/tsx/refresh.js +0 -12
- package/dist/icons/tsx/replay.d.ts +0 -2
- package/dist/icons/tsx/replay.js +0 -12
- package/dist/icons/tsx/search.d.ts +0 -2
- package/dist/icons/tsx/search.js +0 -12
- package/dist/icons/tsx/settings.d.ts +0 -2
- package/dist/icons/tsx/settings.js +0 -12
- package/dist/icons/tsx/sms.d.ts +0 -2
- package/dist/icons/tsx/sms.js +0 -12
- package/dist/icons/tsx/star.d.ts +0 -2
- package/dist/icons/tsx/star.js +0 -12
- package/dist/icons/tsx/starFilled.d.ts +0 -2
- package/dist/icons/tsx/starFilled.js +0 -12
- package/dist/icons/tsx/starHalfFilled.d.ts +0 -2
- package/dist/icons/tsx/starHalfFilled.js +0 -12
- package/dist/icons/tsx/sync.d.ts +0 -2
- package/dist/icons/tsx/sync.js +0 -12
- package/dist/icons/tsx/thumbdown.d.ts +0 -2
- package/dist/icons/tsx/thumbdown.js +0 -12
- package/dist/icons/tsx/thumbdownFilled.d.ts +0 -2
- package/dist/icons/tsx/thumbdownFilled.js +0 -12
- package/dist/icons/tsx/thumbup.d.ts +0 -2
- package/dist/icons/tsx/thumbup.js +0 -12
- package/dist/icons/tsx/thumbupFilled.d.ts +0 -2
- package/dist/icons/tsx/thumbupFilled.js +0 -12
- package/dist/icons/tsx/time.d.ts +0 -2
- package/dist/icons/tsx/time.js +0 -12
- package/dist/icons/tsx/tingrett.d.ts +0 -2
- package/dist/icons/tsx/tingrett.js +0 -12
- package/dist/icons/tsx/tip.d.ts +0 -2
- package/dist/icons/tsx/tip.js +0 -12
- package/dist/icons/tsx/trash.d.ts +0 -2
- package/dist/icons/tsx/trash.js +0 -12
- package/dist/icons/tsx/trendingDown.d.ts +0 -2
- package/dist/icons/tsx/trendingDown.js +0 -12
- package/dist/icons/tsx/trendingUp.d.ts +0 -2
- package/dist/icons/tsx/trendingUp.js +0 -12
- package/dist/icons/tsx/twitter.d.ts +0 -2
- package/dist/icons/tsx/twitter.js +0 -12
- package/dist/icons/tsx/undo.d.ts +0 -2
- package/dist/icons/tsx/undo.js +0 -12
- package/dist/icons/tsx/unfoldLess.d.ts +0 -2
- package/dist/icons/tsx/unfoldLess.js +0 -12
- package/dist/icons/tsx/unfoldMore.d.ts +0 -2
- package/dist/icons/tsx/unfoldMore.js +0 -12
- package/dist/icons/tsx/upload.d.ts +0 -2
- package/dist/icons/tsx/upload.js +0 -12
- package/dist/icons/tsx/visibilityOff.d.ts +0 -2
- package/dist/icons/tsx/visibilityOff.js +0 -12
- package/dist/icons/tsx/visibilityOn.d.ts +0 -2
- package/dist/icons/tsx/visibilityOn.js +0 -12
- package/dist/icons/tsx/warning.d.ts +0 -2
- package/dist/icons/tsx/warning.js +0 -14
- package/dist/icons/tsx/zoomIn.d.ts +0 -2
- package/dist/icons/tsx/zoomIn.js +0 -12
- package/dist/icons/tsx/zoomOut.d.ts +0 -2
- package/dist/icons/tsx/zoomOut.js +0 -12
- package/dist/icons/utils/StyledSvg.d.ts +0 -4
- package/dist/icons/utils/StyledSvg.js +0 -21
- package/dist/icons/utils/SvgWrapper.d.ts +0 -2
- package/dist/icons/utils/SvgWrapper.js +0 -16
- package/dist/icons/utils/index.d.ts +0 -2
- package/dist/icons/utils/propTypes.d.ts +0 -5
- package/dist/types/BaseComponentProps.d.ts +0 -58
- package/dist/types/BaseComponentProps.js +0 -66
- package/dist/types/CheckboxPickedHTMLAttributes.d.ts +0 -2
- package/dist/types/Direction.d.ts +0 -1
- package/dist/types/index.d.ts +0 -4
- package/dist/types/utils.d.ts +0 -15
- package/dist/utils/color.d.ts +0 -30
- package/dist/utils/color.js +0 -38
- package/dist/utils/combineHandlers.d.ts +0 -1
- package/dist/utils/combineHandlers.js +0 -9
- package/dist/utils/getFocusableElements.d.ts +0 -2
- package/dist/utils/getFocusableElements.js +0 -5
- package/dist/utils/getScrollbarSize.d.ts +0 -1
- package/dist/utils/idGenerator.d.ts +0 -2
- package/dist/utils/idGenerator.js +0 -9
- package/dist/utils/index.d.ts +0 -7
- package/dist/utils/searchFilter.d.ts +0 -2
- package/dist/utils/searchFilter.js +0 -10
- package/dist/utils/text.d.ts +0 -2
- package/dist/utils/text.js +0 -5
- /package/dist/cjs/{helpers → components/Modal}/Backdrop/Backdrop.d.ts +0 -0
- /package/dist/cjs/{helpers → components/Modal}/Backdrop/Backdrop.utils.d.ts +0 -0
- /package/dist/cjs/{helpers → components/Modal}/Backdrop/index.d.ts +0 -0
- /package/dist/cjs/components/{Checkbox → SelectionControl/Checkbox}/CheckboxGroup.stories.d.ts +0 -0
- /package/dist/cjs/components/{Checkbox → SelectionControl/Checkbox}/CheckboxGroup.tokens.d.ts +0 -0
- /package/dist/cjs/components/{Checkbox → SelectionControl/Checkbox}/index.d.ts +0 -0
- /package/dist/cjs/components/{RadioButton → SelectionControl/RadioButton}/RadioButton.d.ts +0 -0
- /package/dist/cjs/components/{RadioButton → SelectionControl/RadioButton}/RadioButton.stories.d.ts +0 -0
- /package/dist/cjs/components/{RadioButton → SelectionControl/RadioButton}/index.d.ts +0 -0
- /package/dist/cjs/{helpers → components}/SelectionControl/SelectionControl.tokens.d.ts +0 -0
- /package/dist/cjs/{helpers → components}/SelectionControl/SelectionControl.utils.d.ts +0 -0
- /package/dist/{assets/svg → components/Datepicker}/calendar_today.svg.js +0 -0
- /package/dist/{assets/svg → components/List}/bullets/jordskifterett_bullet1.svg.js +0 -0
- /package/dist/{assets/svg → components/List}/bullets/lagmannsrett_bullet2.svg.js +0 -0
- /package/dist/{assets/svg → components/List}/bullets/tingrett_bullet3.svg.js +0 -0
- /package/dist/{helpers → components/Modal}/Backdrop/Backdrop.d.ts +0 -0
- /package/dist/{helpers → components/Modal}/Backdrop/Backdrop.utils.d.ts +0 -0
- /package/dist/{helpers → components/Modal}/Backdrop/Backdrop.utils.js +0 -0
- /package/dist/{helpers → components/Modal}/Backdrop/index.d.ts +0 -0
- /package/dist/components/{Checkbox → SelectionControl/Checkbox}/CheckboxGroup.stories.d.ts +0 -0
- /package/dist/components/{Checkbox → SelectionControl/Checkbox}/CheckboxGroup.tokens.d.ts +0 -0
- /package/dist/components/{Checkbox → SelectionControl/Checkbox}/CheckboxGroupContext.js +0 -0
- /package/dist/components/{Checkbox → SelectionControl/Checkbox}/index.d.ts +0 -0
- /package/dist/components/{RadioButton → SelectionControl/RadioButton}/RadioButton.d.ts +0 -0
- /package/dist/components/{RadioButton → SelectionControl/RadioButton}/RadioButton.stories.d.ts +0 -0
- /package/dist/components/{RadioButton → SelectionControl/RadioButton}/RadioButtonGroupContext.js +0 -0
- /package/dist/components/{RadioButton → SelectionControl/RadioButton}/index.d.ts +0 -0
- /package/dist/{helpers → components}/SelectionControl/SelectionControl.tokens.d.ts +0 -0
- /package/dist/{helpers → components}/SelectionControl/SelectionControl.utils.d.ts +0 -0
- /package/dist/{helpers → components}/SelectionControl/SelectionControl.utils.js +0 -0
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from './removeButtonStyling';
|
|
2
|
-
export * from './visibilityTransition';
|
|
3
|
-
export * from './focusVisible';
|
|
4
|
-
export * from './hover';
|
|
5
|
-
export * from './focus';
|
|
6
|
-
export * from './danger';
|
|
7
|
-
export * from './hideInput';
|
|
8
|
-
export * from './selection';
|
|
9
|
-
export * from './normalize';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const visibilityTransition: (open: boolean) => import("styled-components").FlattenSimpleInterpolation;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { css } from 'styled-components';
|
|
2
|
-
|
|
3
|
-
var visibilityTransition = function visibilityTransition(open) {
|
|
4
|
-
return css(["@media (prefers-reduced-motion:no-preference){transition:visibility 0.4s,opacity 0.2s;}visibility:", ";opacity:", ";"], open ? 'visible' : 'hidden', open ? 1 : 0);
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
export { visibilityTransition };
|
package/dist/hooks/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from './useCombinedRefs';
|
|
2
|
-
export * from './useOnClickOutside';
|
|
3
|
-
export * from './useOnKeyDown';
|
|
4
|
-
export * from './useFloatPosition';
|
|
5
|
-
export * from './useRoveFocus';
|
|
6
|
-
export * from './useFocusTrap';
|
|
7
|
-
export * from './useMountTransition';
|
|
8
|
-
export * from './useScreenSize';
|
|
9
|
-
export * from './useReturnFocusOnBlur';
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { RefCallback } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Kombinerer refs for et element.
|
|
4
|
-
* Eksempel på bruk:
|
|
5
|
-
* ```
|
|
6
|
-
* const MyComponent = forwardRef<HTMLDivElement, Props>((props, ref) => {
|
|
7
|
-
*
|
|
8
|
-
* const itemRef = useRef<HTMLDivElement>(null);
|
|
9
|
-
* const combinedRef = useCombinedRef(ref, itemRef);
|
|
10
|
-
*
|
|
11
|
-
* return <div ref={combinedRef}>innhold</div>
|
|
12
|
-
* });
|
|
13
|
-
* ```
|
|
14
|
-
* @param refs array med refs.
|
|
15
|
-
* @template T elementet som refereres til.
|
|
16
|
-
* @returns callback med kombinerte refs.
|
|
17
|
-
*
|
|
18
|
-
* {@link useCombinedRef}
|
|
19
|
-
*/
|
|
20
|
-
export declare function useCombinedRef<T>(...refs: React.Ref<T>[]): RefCallback<T>;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { typeof as _typeof } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import { useCallback } from 'react';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Kombinerer refs for et element.
|
|
6
|
-
* Eksempel på bruk:
|
|
7
|
-
* ```
|
|
8
|
-
* const MyComponent = forwardRef<HTMLDivElement, Props>((props, ref) => {
|
|
9
|
-
*
|
|
10
|
-
* const itemRef = useRef<HTMLDivElement>(null);
|
|
11
|
-
* const combinedRef = useCombinedRef(ref, itemRef);
|
|
12
|
-
*
|
|
13
|
-
* return <div ref={combinedRef}>innhold</div>
|
|
14
|
-
* });
|
|
15
|
-
* ```
|
|
16
|
-
* @param refs array med refs.
|
|
17
|
-
* @template T elementet som refereres til.
|
|
18
|
-
* @returns callback med kombinerte refs.
|
|
19
|
-
*
|
|
20
|
-
* {@link useCombinedRef}
|
|
21
|
-
*/
|
|
22
|
-
function useCombinedRef() {
|
|
23
|
-
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
24
|
-
refs[_key] = arguments[_key];
|
|
25
|
-
}
|
|
26
|
-
return useCallback(function (element) {
|
|
27
|
-
refs.forEach(function (ref) {
|
|
28
|
-
if (typeof ref === 'function') ref(element);else if (ref && _typeof(ref) === 'object') ref.current = element;
|
|
29
|
-
});
|
|
30
|
-
}, refs);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export { useCombinedRef };
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Strategy } from '@floating-ui/react-dom';
|
|
3
|
-
export type Placement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'right' | 'right-start' | 'right-end' | 'left' | 'left-start' | 'left-end';
|
|
4
|
-
interface UseFloatPositionOptions {
|
|
5
|
-
/**
|
|
6
|
-
* Whether to update the position of the floating element on every animation frame if required.
|
|
7
|
-
* This is optimized for performance but can still be costly.
|
|
8
|
-
* @default true
|
|
9
|
-
*/
|
|
10
|
-
animationFrame?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* `offset` is used to displace the floating element from its core placement.
|
|
13
|
-
* The value passed is logical, meaning its effect on the
|
|
14
|
-
* physical result is dependent on the writing direction (e.g. RTL).
|
|
15
|
-
* @default 8
|
|
16
|
-
*/
|
|
17
|
-
offset?: number;
|
|
18
|
-
/**
|
|
19
|
-
* Where to place the floating element relative to its reference element.
|
|
20
|
-
* @default 'bottom'
|
|
21
|
-
*/
|
|
22
|
-
placement?: Placement;
|
|
23
|
-
}
|
|
24
|
-
export declare const useFloatPosition: (arrowRef: HTMLElement | null, options?: UseFloatPositionOptions) => {
|
|
25
|
-
reference: (node: import("@floating-ui/react-dom").ReferenceType | null) => void;
|
|
26
|
-
floating: (node: HTMLElement | null) => void;
|
|
27
|
-
refs: {
|
|
28
|
-
reference: import("react").MutableRefObject<import("@floating-ui/react-dom").ReferenceType | null>;
|
|
29
|
-
floating: import("react").MutableRefObject<HTMLElement | null>;
|
|
30
|
-
setReference: (node: import("@floating-ui/react-dom").ReferenceType | null) => void;
|
|
31
|
-
setFloating: (node: HTMLElement | null) => void;
|
|
32
|
-
};
|
|
33
|
-
styles: {
|
|
34
|
-
floating: {
|
|
35
|
-
position: Strategy;
|
|
36
|
-
top: string | number;
|
|
37
|
-
left: string | number;
|
|
38
|
-
};
|
|
39
|
-
arrow: {
|
|
40
|
-
[x: string]: string | number;
|
|
41
|
-
position: Strategy;
|
|
42
|
-
top: string | number;
|
|
43
|
-
left: string | number;
|
|
44
|
-
transform: string;
|
|
45
|
-
} | undefined;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
export {};
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { toConsumableArray as _toConsumableArray, defineProperty as _defineProperty } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import { offset, flip, shift, arrow, useFloating, autoUpdate } from '@floating-ui/react-dom';
|
|
3
|
-
import { ddsBaseTokens } from '@norges-domstoler/dds-design-tokens';
|
|
4
|
-
|
|
5
|
-
var defaultOffset = ddsBaseTokens.spacing.SizesDdsSpacingLocalX05NumberPx;
|
|
6
|
-
var useFloatPosition = function useFloatPosition(arrowRef) {
|
|
7
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
8
|
-
var _options$animationFra = options.animationFrame,
|
|
9
|
-
animationFrame = _options$animationFra === void 0 ? true : _options$animationFra,
|
|
10
|
-
_options$offset = options.offset,
|
|
11
|
-
offset$1 = _options$offset === void 0 ? defaultOffset : _options$offset,
|
|
12
|
-
_options$placement = options.placement,
|
|
13
|
-
placement = _options$placement === void 0 ? 'bottom' : _options$placement;
|
|
14
|
-
var middleware = [offset(offset$1), flip(), shift()].concat(_toConsumableArray(arrowRef ? [arrow({
|
|
15
|
-
element: arrowRef
|
|
16
|
-
})] : []));
|
|
17
|
-
var _useFloating = useFloating({
|
|
18
|
-
placement: placement,
|
|
19
|
-
middleware: middleware,
|
|
20
|
-
whileElementsMounted: function whileElementsMounted(reference, floating, update) {
|
|
21
|
-
return autoUpdate(reference, floating, update, {
|
|
22
|
-
animationFrame: animationFrame
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
}),
|
|
26
|
-
x = _useFloating.x,
|
|
27
|
-
y = _useFloating.y,
|
|
28
|
-
reference = _useFloating.reference,
|
|
29
|
-
floating = _useFloating.floating,
|
|
30
|
-
strategy = _useFloating.strategy,
|
|
31
|
-
middlewareData = _useFloating.middlewareData,
|
|
32
|
-
actualPlacement = _useFloating.placement,
|
|
33
|
-
refs = _useFloating.refs;
|
|
34
|
-
return {
|
|
35
|
-
reference: reference,
|
|
36
|
-
floating: floating,
|
|
37
|
-
refs: refs,
|
|
38
|
-
styles: {
|
|
39
|
-
floating: {
|
|
40
|
-
position: strategy,
|
|
41
|
-
top: y !== null && y !== void 0 ? y : '',
|
|
42
|
-
left: x !== null && x !== void 0 ? x : ''
|
|
43
|
-
},
|
|
44
|
-
arrow: middlewareData.arrow ? getArrowStyling(strategy, actualPlacement, middlewareData.arrow) : undefined
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
function getArrowStyling(strategy, placement, arrow) {
|
|
49
|
-
var _ref;
|
|
50
|
-
var _a, _b;
|
|
51
|
-
var arrowPlacement = placementToArrowPlacement(placement);
|
|
52
|
-
var arrowPlacementOffset = {
|
|
53
|
-
top: '-15px',
|
|
54
|
-
bottom: '-15px',
|
|
55
|
-
right: '-21px',
|
|
56
|
-
left: '-21px'
|
|
57
|
-
}[arrowPlacement];
|
|
58
|
-
var rotateArrow = {
|
|
59
|
-
top: 'rotate(180deg)',
|
|
60
|
-
right: 'rotate(-90deg)',
|
|
61
|
-
bottom: '',
|
|
62
|
-
left: 'rotate(90deg)'
|
|
63
|
-
}[arrowPlacement];
|
|
64
|
-
return _ref = {
|
|
65
|
-
position: strategy,
|
|
66
|
-
top: (_a = arrow === null || arrow === void 0 ? void 0 : arrow.y) !== null && _a !== void 0 ? _a : '',
|
|
67
|
-
left: (_b = arrow === null || arrow === void 0 ? void 0 : arrow.x) !== null && _b !== void 0 ? _b : ''
|
|
68
|
-
}, _defineProperty(_ref, arrowPlacement, arrowPlacementOffset), _defineProperty(_ref, "transform", rotateArrow), _ref;
|
|
69
|
-
}
|
|
70
|
-
function placementToArrowPlacement(placement) {
|
|
71
|
-
switch (placement) {
|
|
72
|
-
case 'top':
|
|
73
|
-
case 'top-start':
|
|
74
|
-
case 'top-end':
|
|
75
|
-
return 'bottom';
|
|
76
|
-
case 'bottom':
|
|
77
|
-
case 'bottom-start':
|
|
78
|
-
case 'bottom-end':
|
|
79
|
-
return 'top';
|
|
80
|
-
case 'left':
|
|
81
|
-
case 'left-start':
|
|
82
|
-
case 'left-end':
|
|
83
|
-
return 'right';
|
|
84
|
-
case 'right':
|
|
85
|
-
case 'right-start':
|
|
86
|
-
case 'right-end':
|
|
87
|
-
return 'left';
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export { useFloatPosition };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Fanger fokus i en loop inni et element. Typisk bruk:
|
|
4
|
-
* ```
|
|
5
|
-
* const MyComponent = (props) => {
|
|
6
|
-
*
|
|
7
|
-
* const componentRef = useFocusTrap<HTMLDivElement>(props.isOpen);
|
|
8
|
-
*
|
|
9
|
-
* return props.isOpen ? <div ref={componentRef}><button>click</button></div> : null;
|
|
10
|
-
*
|
|
11
|
-
* }
|
|
12
|
-
* ```
|
|
13
|
-
* @param active om focus skal fanges, f.eks. når en modal åpnes.
|
|
14
|
-
* @returns ref til elementet som fanger fokus.
|
|
15
|
-
*/
|
|
16
|
-
export declare function useFocusTrap<T extends HTMLElement>(active: boolean): RefObject<T>;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { useRef, useEffect } from 'react';
|
|
2
|
-
import '../utils/color.js';
|
|
3
|
-
import { getFocusableElements } from '../utils/getFocusableElements.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Fanger fokus i en loop inni et element. Typisk bruk:
|
|
7
|
-
* ```
|
|
8
|
-
* const MyComponent = (props) => {
|
|
9
|
-
*
|
|
10
|
-
* const componentRef = useFocusTrap<HTMLDivElement>(props.isOpen);
|
|
11
|
-
*
|
|
12
|
-
* return props.isOpen ? <div ref={componentRef}><button>click</button></div> : null;
|
|
13
|
-
*
|
|
14
|
-
* }
|
|
15
|
-
* ```
|
|
16
|
-
* @param active om focus skal fanges, f.eks. når en modal åpnes.
|
|
17
|
-
* @returns ref til elementet som fanger fokus.
|
|
18
|
-
*/
|
|
19
|
-
function useFocusTrap(active) {
|
|
20
|
-
var elementRef = useRef(null);
|
|
21
|
-
useEffect(function () {
|
|
22
|
-
function handleFocus(e) {
|
|
23
|
-
if (e.key !== 'Tab' || !active || !elementRef.current) return;
|
|
24
|
-
var focusableElements = getFocusableElements(elementRef);
|
|
25
|
-
var firstElement = focusableElements[0];
|
|
26
|
-
var lastElement = focusableElements[focusableElements.length - 1];
|
|
27
|
-
if (!e.shiftKey && document.activeElement === lastElement) {
|
|
28
|
-
firstElement.focus();
|
|
29
|
-
e.preventDefault();
|
|
30
|
-
}
|
|
31
|
-
if (e.shiftKey && document.activeElement === firstElement) {
|
|
32
|
-
lastElement.focus();
|
|
33
|
-
e.preventDefault();
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
var element = elementRef.current;
|
|
37
|
-
if (element && active) {
|
|
38
|
-
element.focus();
|
|
39
|
-
element.addEventListener('keydown', handleFocus);
|
|
40
|
-
}
|
|
41
|
-
return function () {
|
|
42
|
-
element === null || element === void 0 ? void 0 : element.removeEventListener('keydown', handleFocus);
|
|
43
|
-
};
|
|
44
|
-
}, [active]);
|
|
45
|
-
return elementRef;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export { useFocusTrap };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { useRef, useEffect, useCallback } from 'react';
|
|
2
|
-
|
|
3
|
-
var useIsMounted = function useIsMounted() {
|
|
4
|
-
var isMounted = useRef(false);
|
|
5
|
-
useEffect(function () {
|
|
6
|
-
isMounted.current = true;
|
|
7
|
-
return function () {
|
|
8
|
-
isMounted.current = false;
|
|
9
|
-
};
|
|
10
|
-
}, []);
|
|
11
|
-
return useCallback(function () {
|
|
12
|
-
return isMounted.current;
|
|
13
|
-
}, []);
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export { useIsMounted as default };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tillater effekter og animasjoner å bli gjennomført like etter et element blir lagt til eller like før det blir fjernet fra DOM.
|
|
3
|
-
* Typisk bruk:
|
|
4
|
-
* ```
|
|
5
|
-
* // CSS
|
|
6
|
-
* .component {
|
|
7
|
-
* transition: opacity 0.2s;
|
|
8
|
-
* opacity: 0;
|
|
9
|
-
* }
|
|
10
|
-
*
|
|
11
|
-
* .transitionedIn.mounted {
|
|
12
|
-
* opacity: 1;
|
|
13
|
-
* }
|
|
14
|
-
*
|
|
15
|
-
* const MyComponent = (props) => {
|
|
16
|
-
*
|
|
17
|
-
* const hasTransitionedIn = useMountTransition(props.isMounted, 500);
|
|
18
|
-
*
|
|
19
|
-
* return props.isMounted || hasTransitionedIn ? (
|
|
20
|
-
* <div
|
|
21
|
-
* className={`component ${hasTransitionedIn && 'transitionedIn'} ${props.isMounted && 'mounted'}`}
|
|
22
|
-
* >
|
|
23
|
-
* innhold
|
|
24
|
-
* </div>)
|
|
25
|
-
* : null;
|
|
26
|
-
*
|
|
27
|
-
* }
|
|
28
|
-
* ```
|
|
29
|
-
* @param isMounted om elementet er mounted.
|
|
30
|
-
* @param unmountDelay hvor lenge transition skal vare før unmount.
|
|
31
|
-
* @returns om transition er ferdig.
|
|
32
|
-
*/
|
|
33
|
-
export declare const useMountTransition: (isMounted: boolean, unmountDelay: number) => boolean;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { slicedToArray as _slicedToArray } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import { useState, useEffect } from 'react';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Tillater effekter og animasjoner å bli gjennomført like etter et element blir lagt til eller like før det blir fjernet fra DOM.
|
|
6
|
-
* Typisk bruk:
|
|
7
|
-
* ```
|
|
8
|
-
* // CSS
|
|
9
|
-
* .component {
|
|
10
|
-
* transition: opacity 0.2s;
|
|
11
|
-
* opacity: 0;
|
|
12
|
-
* }
|
|
13
|
-
*
|
|
14
|
-
* .transitionedIn.mounted {
|
|
15
|
-
* opacity: 1;
|
|
16
|
-
* }
|
|
17
|
-
*
|
|
18
|
-
* const MyComponent = (props) => {
|
|
19
|
-
*
|
|
20
|
-
* const hasTransitionedIn = useMountTransition(props.isMounted, 500);
|
|
21
|
-
*
|
|
22
|
-
* return props.isMounted || hasTransitionedIn ? (
|
|
23
|
-
* <div
|
|
24
|
-
* className={`component ${hasTransitionedIn && 'transitionedIn'} ${props.isMounted && 'mounted'}`}
|
|
25
|
-
* >
|
|
26
|
-
* innhold
|
|
27
|
-
* </div>)
|
|
28
|
-
* : null;
|
|
29
|
-
*
|
|
30
|
-
* }
|
|
31
|
-
* ```
|
|
32
|
-
* @param isMounted om elementet er mounted.
|
|
33
|
-
* @param unmountDelay hvor lenge transition skal vare før unmount.
|
|
34
|
-
* @returns om transition er ferdig.
|
|
35
|
-
*/
|
|
36
|
-
var useMountTransition = function useMountTransition(isMounted, unmountDelay) {
|
|
37
|
-
var _useState = useState(false),
|
|
38
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
39
|
-
hasTransitionedIn = _useState2[0],
|
|
40
|
-
setHasTransitionedIn = _useState2[1];
|
|
41
|
-
useEffect(function () {
|
|
42
|
-
var timeoutId;
|
|
43
|
-
if (isMounted && !hasTransitionedIn) setHasTransitionedIn(true);else if (!isMounted && hasTransitionedIn) {
|
|
44
|
-
timeoutId = setTimeout(function () {
|
|
45
|
-
return setHasTransitionedIn(false);
|
|
46
|
-
}, unmountDelay);
|
|
47
|
-
}
|
|
48
|
-
return function () {
|
|
49
|
-
clearTimeout(timeoutId);
|
|
50
|
-
};
|
|
51
|
-
}, [unmountDelay, isMounted, hasTransitionedIn]);
|
|
52
|
-
return hasTransitionedIn;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export { useMountTransition };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Kjører logikk når brukeren klikker utenfor et element, f.eks at elementet fjernes fra DOM.
|
|
3
|
-
* Typisk bruk:
|
|
4
|
-
* ```
|
|
5
|
-
* const [isOpen, setOpen] = useState(true);
|
|
6
|
-
* const ref = useRef<HTMLElement>(null);
|
|
7
|
-
* useOnClickOutside(ref, () => setOpen(false));
|
|
8
|
-
*
|
|
9
|
-
* return <div ref={ref}>innhold</div>
|
|
10
|
-
* ```
|
|
11
|
-
* @param element HTML elementet man klikker utenfor.
|
|
12
|
-
* @param handler funksjonen som kjøres ved klikk utenfor.
|
|
13
|
-
*/
|
|
14
|
-
export declare function useOnClickOutside(element: HTMLElement | null | (HTMLElement | null)[], handler: (event: MouseEvent | TouchEvent) => void): void;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { useEffect } from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Kjører logikk når brukeren klikker utenfor et element, f.eks at elementet fjernes fra DOM.
|
|
5
|
-
* Typisk bruk:
|
|
6
|
-
* ```
|
|
7
|
-
* const [isOpen, setOpen] = useState(true);
|
|
8
|
-
* const ref = useRef<HTMLElement>(null);
|
|
9
|
-
* useOnClickOutside(ref, () => setOpen(false));
|
|
10
|
-
*
|
|
11
|
-
* return <div ref={ref}>innhold</div>
|
|
12
|
-
* ```
|
|
13
|
-
* @param element HTML elementet man klikker utenfor.
|
|
14
|
-
* @param handler funksjonen som kjøres ved klikk utenfor.
|
|
15
|
-
*/
|
|
16
|
-
function useOnClickOutside(element, handler) {
|
|
17
|
-
useEffect(function () {
|
|
18
|
-
var listener = function listener(event) {
|
|
19
|
-
var elements = Array.isArray(element) ? element : [element];
|
|
20
|
-
var targetElement = event.target;
|
|
21
|
-
while (targetElement) {
|
|
22
|
-
if (elements.indexOf(targetElement) != -1) {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
targetElement = targetElement.parentNode;
|
|
26
|
-
}
|
|
27
|
-
handler(event);
|
|
28
|
-
};
|
|
29
|
-
document.addEventListener('mousedown', listener);
|
|
30
|
-
document.addEventListener('touchstart', listener);
|
|
31
|
-
return function () {
|
|
32
|
-
document.removeEventListener('mousedown', listener);
|
|
33
|
-
document.removeEventListener('touchstart', listener);
|
|
34
|
-
};
|
|
35
|
-
}, [element, handler]);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export { useOnClickOutside };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Kjører logikk når en spesifisert tast blir trykt ned.
|
|
3
|
-
* Typisk bruk:
|
|
4
|
-
* ```
|
|
5
|
-
* const [isOpen, setOpen] = useState(true);
|
|
6
|
-
* const ref = useRef<HTMLElement>(null);
|
|
7
|
-
* useOnKeyDown(['Escape', 'Esc'], () => setOpen(false));
|
|
8
|
-
*
|
|
9
|
-
* return isOpen ? <div>innhold</div> : null;
|
|
10
|
-
* ```
|
|
11
|
-
* @param key tasten som trykkes.
|
|
12
|
-
* @param handler funksjonen som skal kjøres.
|
|
13
|
-
*/
|
|
14
|
-
export declare const useOnKeyDown: (key: string | string[], handler: (event: KeyboardEvent) => void) => void;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { useEffect } from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Kjører logikk når en spesifisert tast blir trykt ned.
|
|
5
|
-
* Typisk bruk:
|
|
6
|
-
* ```
|
|
7
|
-
* const [isOpen, setOpen] = useState(true);
|
|
8
|
-
* const ref = useRef<HTMLElement>(null);
|
|
9
|
-
* useOnKeyDown(['Escape', 'Esc'], () => setOpen(false));
|
|
10
|
-
*
|
|
11
|
-
* return isOpen ? <div>innhold</div> : null;
|
|
12
|
-
* ```
|
|
13
|
-
* @param key tasten som trykkes.
|
|
14
|
-
* @param handler funksjonen som skal kjøres.
|
|
15
|
-
*/
|
|
16
|
-
var useOnKeyDown = function useOnKeyDown(key, handler) {
|
|
17
|
-
useEffect(function () {
|
|
18
|
-
var listener = function listener(event) {
|
|
19
|
-
var keys = Array.isArray(key) ? key : [key];
|
|
20
|
-
if (keys.indexOf(event.key) !== -1) {
|
|
21
|
-
handler(event);
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
document.addEventListener('keydown', listener, true);
|
|
25
|
-
return function () {
|
|
26
|
-
document.removeEventListener('keydown', listener, true);
|
|
27
|
-
};
|
|
28
|
-
}, [handler]);
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export { useOnKeyDown };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Returnerer fokus til et element når første eller siste barn i en container mister fokus ved tastaturnavigasjon. Typisk bruk:
|
|
4
|
-
* ```
|
|
5
|
-
* const MyComponent = (props) => {
|
|
6
|
-
*
|
|
7
|
-
* const [isOpen, setOpen] = useState(true);
|
|
8
|
-
* const close = () => setOpen(false);
|
|
9
|
-
* const triggerRef = useRef<HTMLButtonElement>(null);
|
|
10
|
-
* const containerRef = useReturnFocusOnBlur<HTMLDivElement>(
|
|
11
|
-
* isOpen,
|
|
12
|
-
* triggerRef.current,
|
|
13
|
-
* () => close()
|
|
14
|
-
* );
|
|
15
|
-
*
|
|
16
|
-
* return (
|
|
17
|
-
* <div>
|
|
18
|
-
* <button ref={triggerRef} >Åpne popover</button>
|
|
19
|
-
* <div ref={containerRef}>
|
|
20
|
-
* <button>gjør noe</button>
|
|
21
|
-
* </div>
|
|
22
|
-
* </div>
|
|
23
|
-
* )
|
|
24
|
-
* }
|
|
25
|
-
* ```
|
|
26
|
-
* @param active om container skal få fokus, f.eks. når en modal åpnes.
|
|
27
|
-
* @param triggerElement elementet som skal få fokus når fokus forlater container.
|
|
28
|
-
* @param onBlur ekstra logikk når fokus forlater container.
|
|
29
|
-
* @returns ref til container som får fokus.
|
|
30
|
-
*/
|
|
31
|
-
export declare function useReturnFocusOnBlur<T extends HTMLElement>(active: boolean, onBlur: () => void, triggerElement?: HTMLElement | null): RefObject<T>;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { useRef, useEffect } from 'react';
|
|
2
|
-
import '../utils/color.js';
|
|
3
|
-
import { getFocusableElements } from '../utils/getFocusableElements.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Returnerer fokus til et element når første eller siste barn i en container mister fokus ved tastaturnavigasjon. Typisk bruk:
|
|
7
|
-
* ```
|
|
8
|
-
* const MyComponent = (props) => {
|
|
9
|
-
*
|
|
10
|
-
* const [isOpen, setOpen] = useState(true);
|
|
11
|
-
* const close = () => setOpen(false);
|
|
12
|
-
* const triggerRef = useRef<HTMLButtonElement>(null);
|
|
13
|
-
* const containerRef = useReturnFocusOnBlur<HTMLDivElement>(
|
|
14
|
-
* isOpen,
|
|
15
|
-
* triggerRef.current,
|
|
16
|
-
* () => close()
|
|
17
|
-
* );
|
|
18
|
-
*
|
|
19
|
-
* return (
|
|
20
|
-
* <div>
|
|
21
|
-
* <button ref={triggerRef} >Åpne popover</button>
|
|
22
|
-
* <div ref={containerRef}>
|
|
23
|
-
* <button>gjør noe</button>
|
|
24
|
-
* </div>
|
|
25
|
-
* </div>
|
|
26
|
-
* )
|
|
27
|
-
* }
|
|
28
|
-
* ```
|
|
29
|
-
* @param active om container skal få fokus, f.eks. når en modal åpnes.
|
|
30
|
-
* @param triggerElement elementet som skal få fokus når fokus forlater container.
|
|
31
|
-
* @param onBlur ekstra logikk når fokus forlater container.
|
|
32
|
-
* @returns ref til container som får fokus.
|
|
33
|
-
*/
|
|
34
|
-
function useReturnFocusOnBlur(active, onBlur, triggerElement) {
|
|
35
|
-
var elementRef = useRef(null);
|
|
36
|
-
useEffect(function () {
|
|
37
|
-
function handleFocus(e) {
|
|
38
|
-
if (e.key !== 'Tab' || !active || !elementRef.current || !triggerElement) return;
|
|
39
|
-
var focusableElements = getFocusableElements(elementRef);
|
|
40
|
-
var lastElement = focusableElements[focusableElements.length - 1];
|
|
41
|
-
var firstElement = focusableElements[0];
|
|
42
|
-
if (!e.shiftKey && document.activeElement === lastElement || e.shiftKey && document.activeElement === firstElement || e.shiftKey && document.activeElement === element) {
|
|
43
|
-
triggerElement.focus();
|
|
44
|
-
e.preventDefault();
|
|
45
|
-
onBlur();
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
var element = elementRef.current;
|
|
49
|
-
if (element && active) {
|
|
50
|
-
element.focus();
|
|
51
|
-
element.addEventListener('keydown', handleFocus);
|
|
52
|
-
}
|
|
53
|
-
return function () {
|
|
54
|
-
element === null || element === void 0 ? void 0 : element.removeEventListener('keydown', handleFocus);
|
|
55
|
-
};
|
|
56
|
-
}, [active]);
|
|
57
|
-
return elementRef;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export { useReturnFocusOnBlur };
|