@norges-domstoler/dds-components 10.2.1 → 10.3.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 +104 -76
- package/dist/cjs/components/Breadcrumbs/Breadcrumb.d.ts +1 -1
- package/dist/cjs/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/cjs/components/Button/Button.styles.d.ts +3 -3
- package/dist/cjs/components/Button/Button.types.d.ts +6 -6
- package/dist/cjs/components/Card/Card.d.ts +7 -7
- package/dist/cjs/components/Card/CardAccordion/CardAccordion.d.ts +1 -1
- package/dist/cjs/components/Card/CardAccordion/CardAccordionBody.d.ts +1 -1
- package/dist/cjs/components/Card/CardAccordion/CardAccordionHeader.d.ts +1 -1
- package/dist/cjs/components/Checkbox/Checkbox.types.d.ts +1 -1
- package/dist/cjs/components/Checkbox/CheckboxGroup.d.ts +1 -1
- package/dist/cjs/components/Chip/Chip.d.ts +1 -1
- package/dist/cjs/components/Chip/ChipGroup.d.ts +1 -1
- package/dist/cjs/components/Datepicker/Datepicker.d.ts +2 -2
- package/dist/cjs/components/DescriptionList/DescriptionList.d.ts +2 -2
- package/dist/cjs/components/DescriptionList/DescriptionListDesc.d.ts +1 -1
- package/dist/cjs/components/DescriptionList/DescriptionListGroup.d.ts +1 -1
- package/dist/cjs/components/DescriptionList/DescriptionListTerm.d.ts +1 -1
- package/dist/cjs/components/Divider/Divider.d.ts +2 -2
- package/dist/cjs/components/Drawer/Drawer.d.ts +4 -4
- package/dist/cjs/components/Drawer/DrawerGroup.d.ts +1 -1
- package/dist/cjs/components/FileUploader/ErrorList.d.ts +1 -1
- package/dist/cjs/components/FileUploader/File.d.ts +1 -1
- package/dist/cjs/components/FileUploader/FileUploader.d.ts +2 -2
- package/dist/cjs/components/FileUploader/FileUploader.stories.d.ts +1 -1
- package/dist/cjs/components/FileUploader/fileUploaderReducer.d.ts +8 -5
- package/dist/cjs/components/FileUploader/types.d.ts +9 -9
- package/dist/cjs/components/FileUploader/useFileUploader.d.ts +8 -6
- package/dist/cjs/components/FormGenerator/FormGenerator.types.d.ts +33 -33
- package/dist/cjs/components/GlobalMessage/GlobalMessage.d.ts +2 -2
- package/dist/cjs/components/Grid/Grid.context.d.ts +1 -1
- package/dist/cjs/components/Grid/Grid.d.ts +6 -6
- package/dist/cjs/components/Grid/Grid.utils.d.ts +2 -2
- package/dist/cjs/components/Grid/GridChild.d.ts +4 -4
- package/dist/cjs/components/Icon/Icon.d.ts +2 -2
- package/dist/cjs/components/InlineEdit/InlineEdit.styles.d.ts +1 -1
- package/dist/cjs/components/InlineEdit/InlineEdit.types.d.ts +5 -5
- package/dist/cjs/components/InlineEdit/InlineInput.d.ts +1 -1
- package/dist/cjs/components/InlineEdit/InlineTextArea.d.ts +1 -1
- package/dist/cjs/components/InputMessage/InputMessage.d.ts +2 -2
- package/dist/cjs/components/InternalHeader/InternalHeader.styles.d.ts +2 -2
- package/dist/cjs/components/InternalHeader/InternalHeader.types.d.ts +4 -4
- package/dist/cjs/components/InternalHeader/InternalHeaderListItem.d.ts +1 -1
- package/dist/cjs/components/InternalHeader/NavigationItem.d.ts +2 -2
- package/dist/cjs/components/List/List.d.ts +3 -3
- package/dist/cjs/components/List/List.stories.d.ts +3 -3
- package/dist/cjs/components/List/ListItem.d.ts +1 -1
- package/dist/cjs/components/LocalMessage/LocalMessage.d.ts +3 -3
- package/dist/cjs/components/Modal/Modal.d.ts +1 -1
- package/dist/cjs/components/Modal/ModalActions.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.types.d.ts +7 -7
- package/dist/cjs/components/OverflowMenu/OverflowMenuGroup.d.ts +1 -1
- package/dist/cjs/components/OverflowMenu/OverflowMenuItem.d.ts +5 -5
- package/dist/cjs/components/Pagination/Pagination.d.ts +2 -2
- package/dist/cjs/components/Popover/Popover.d.ts +2 -2
- package/dist/cjs/components/Popover/PopoverGroup.d.ts +1 -1
- package/dist/cjs/components/ProgressTracker/ProgressTracker.context.d.ts +1 -1
- package/dist/cjs/components/ProgressTracker/ProgressTracker.d.ts +2 -2
- package/dist/cjs/components/ProgressTracker/ProgressTrackerItem.d.ts +2 -2
- package/dist/cjs/components/RadioButton/RadioButton.types.d.ts +2 -2
- package/dist/cjs/components/RadioButton/RadioButtonGroup.d.ts +1 -1
- 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/AutocompleteSearch.context.d.ts +1 -1
- package/dist/cjs/components/Search/Search.d.ts +3 -3
- package/dist/cjs/components/Search/SearchAutocompleteWrapper.d.ts +4 -4
- package/dist/cjs/components/Search/SearchSuggestions.d.ts +1 -1
- package/dist/cjs/components/Search/index.d.ts +1 -1
- package/dist/cjs/components/Select/CustomSelect.stories.d.ts +1 -1
- package/dist/cjs/components/Select/MultiSelect.stories.d.ts +2 -2
- package/dist/cjs/components/Select/Select.d.ts +4 -4
- package/dist/cjs/components/Select/Select.stories.d.ts +1 -1
- package/dist/cjs/components/Select/Select.styles.d.ts +1 -1
- package/dist/cjs/components/SkipToContent/SkipToContent.d.ts +1 -1
- package/dist/cjs/components/Spinner/Spinner.d.ts +1 -1
- package/dist/cjs/components/SplitButton/SplitButton.d.ts +2 -2
- package/dist/cjs/components/Stack/Stack.d.ts +3 -3
- package/dist/cjs/components/Table/Body.d.ts +1 -1
- package/dist/cjs/components/Table/Cell.d.ts +4 -4
- package/dist/cjs/components/Table/Foot.d.ts +1 -1
- package/dist/cjs/components/Table/Head.d.ts +1 -1
- package/dist/cjs/components/Table/SortCell.d.ts +2 -2
- package/dist/cjs/components/Table/Table.styles.d.ts +1 -1
- package/dist/cjs/components/Table/Table.types.d.ts +7 -7
- package/dist/cjs/components/Table/TableWrapper.d.ts +1 -1
- package/dist/cjs/components/Table/collapsible/Table.context.d.ts +1 -1
- package/dist/cjs/components/Table/index.d.ts +2 -2
- package/dist/cjs/components/Table/tableData.d.ts +2 -2
- package/dist/cjs/components/Tabs/Tab.d.ts +1 -1
- package/dist/cjs/components/Tabs/TabList.d.ts +1 -1
- package/dist/cjs/components/Tabs/TabPanel.d.ts +1 -1
- package/dist/cjs/components/Tabs/TabPanels.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/Tag/Tag.d.ts +2 -2
- package/dist/cjs/components/TextArea/TextArea.d.ts +1 -1
- package/dist/cjs/components/TextInput/CharCounter.d.ts +1 -1
- package/dist/cjs/components/TextInput/TextInput.styles.d.ts +2 -2
- package/dist/cjs/components/TextInput/TextInput.types.d.ts +1 -1
- package/dist/cjs/components/ToggleBar/ToggleBar.context.d.ts +1 -1
- package/dist/cjs/components/ToggleBar/ToggleBar.types.d.ts +3 -3
- package/dist/cjs/components/ToggleBar/ToggleRadio.d.ts +2 -2
- package/dist/cjs/components/ToggleBar/ToggleRadio.styles.d.ts +2 -2
- package/dist/cjs/components/ToggleButton/ToggleButton.types.d.ts +1 -1
- package/dist/cjs/components/ToggleButton/ToggleButtonGroup.d.ts +2 -2
- package/dist/cjs/components/Tooltip/Tooltip.d.ts +3 -3
- package/dist/cjs/components/Tooltip/Tooltip.styles.d.ts +1 -1
- package/dist/cjs/components/Typography/Caption/Caption.d.ts +1 -1
- package/dist/cjs/components/Typography/Caption/Caption.stories.d.ts +1 -1
- package/dist/cjs/components/Typography/Heading/Heading.d.ts +2 -2
- package/dist/cjs/components/Typography/Heading/Heading.stories.d.ts +1 -1
- package/dist/cjs/components/Typography/Label/Label.d.ts +3 -3
- package/dist/cjs/components/Typography/Label/Label.stories.d.ts +1 -1
- package/dist/cjs/components/Typography/Legend/Legend.d.ts +1 -1
- package/dist/cjs/components/Typography/Legend/Legend.stories.d.ts +1 -1
- package/dist/cjs/components/Typography/Link/Link.d.ts +2 -2
- package/dist/cjs/components/Typography/Link/Link.stories.d.ts +1 -1
- package/dist/cjs/components/Typography/Paragraph/Paragraph.d.ts +1 -1
- package/dist/cjs/components/Typography/Paragraph/Paragraph.stories.d.ts +1 -1
- package/dist/cjs/components/Typography/Typography/Typography.d.ts +4 -4
- package/dist/cjs/components/Typography/Typography/Typography.stories.d.ts +1 -1
- package/dist/cjs/components/Typography/Typography/Typography.types.d.ts +14 -14
- package/dist/cjs/components/VisuallyHidden/VisuallyHidden.d.ts +3 -3
- package/dist/cjs/helpers/Backdrop/Backdrop.d.ts +1 -1
- package/dist/cjs/helpers/Chevron/AnimatedChevronUpDown.d.ts +1 -1
- package/dist/cjs/helpers/Chevron/AnimatedChevronUpDown.styles.d.ts +1 -1
- package/dist/cjs/helpers/Input/Input.styles.d.ts +1 -1
- package/dist/cjs/helpers/Input/Input.types.d.ts +6 -6
- package/dist/cjs/helpers/Paper/Paper.d.ts +3 -3
- package/dist/cjs/helpers/SelectionControl/SelectionControl.styles.d.ts +3 -3
- package/dist/cjs/hooks/useFloatPosition.d.ts +1 -1
- package/dist/cjs/icons/utils/StyledSvg.d.ts +1 -1
- package/dist/cjs/icons/utils/propTypes.d.ts +2 -2
- package/dist/cjs/index.js +318 -280
- package/dist/cjs/types/BaseComponentProps.d.ts +3 -3
- package/dist/cjs/types/CheckboxPickedHTMLAttributes.d.ts +1 -1
- package/dist/cjs/types/Direction.d.ts +1 -1
- package/dist/cjs/types/utils.d.ts +2 -2
- package/dist/cjs/utils/color.d.ts +3 -3
- package/dist/components/Breadcrumbs/Breadcrumb.d.ts +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/components/Button/Button.styles.d.ts +3 -3
- package/dist/components/Button/Button.types.d.ts +6 -6
- package/dist/components/Card/Card.d.ts +7 -7
- package/dist/components/Card/CardAccordion/CardAccordion.d.ts +1 -1
- package/dist/components/Card/CardAccordion/CardAccordionBody.d.ts +1 -1
- package/dist/components/Card/CardAccordion/CardAccordionHeader.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.types.d.ts +1 -1
- package/dist/components/Checkbox/CheckboxGroup.d.ts +1 -1
- package/dist/components/Chip/Chip.d.ts +1 -1
- package/dist/components/Chip/ChipGroup.d.ts +1 -1
- package/dist/components/Datepicker/Datepicker.d.ts +2 -2
- package/dist/components/DescriptionList/DescriptionList.d.ts +2 -2
- package/dist/components/DescriptionList/DescriptionListDesc.d.ts +1 -1
- package/dist/components/DescriptionList/DescriptionListGroup.d.ts +1 -1
- package/dist/components/DescriptionList/DescriptionListTerm.d.ts +1 -1
- package/dist/components/Divider/Divider.d.ts +2 -2
- package/dist/components/Drawer/Drawer.d.ts +4 -4
- package/dist/components/Drawer/DrawerGroup.d.ts +1 -1
- package/dist/components/FileUploader/ErrorList.d.ts +1 -1
- package/dist/components/FileUploader/File.d.ts +1 -1
- package/dist/components/FileUploader/FileUploader.d.ts +2 -2
- package/dist/components/FileUploader/FileUploader.js +5 -3
- package/dist/components/FileUploader/FileUploader.stories.d.ts +1 -1
- package/dist/components/FileUploader/fileUploaderReducer.d.ts +8 -5
- package/dist/components/FileUploader/fileUploaderReducer.js +4 -0
- package/dist/components/FileUploader/types.d.ts +9 -9
- package/dist/components/FileUploader/useFileUploader.d.ts +8 -6
- package/dist/components/FileUploader/useFileUploader.js +27 -14
- package/dist/components/FormGenerator/FormGenerator.types.d.ts +33 -33
- package/dist/components/GlobalMessage/GlobalMessage.d.ts +2 -2
- package/dist/components/Grid/Grid.context.d.ts +1 -1
- package/dist/components/Grid/Grid.d.ts +6 -6
- package/dist/components/Grid/Grid.utils.d.ts +2 -2
- package/dist/components/Grid/GridChild.d.ts +4 -4
- package/dist/components/Icon/Icon.d.ts +2 -2
- package/dist/components/InlineEdit/InlineEdit.styles.d.ts +1 -1
- package/dist/components/InlineEdit/InlineEdit.types.d.ts +5 -5
- package/dist/components/InlineEdit/InlineInput.d.ts +1 -1
- package/dist/components/InlineEdit/InlineTextArea.d.ts +1 -1
- package/dist/components/InputMessage/InputMessage.d.ts +2 -2
- package/dist/components/InternalHeader/InternalHeader.styles.d.ts +2 -2
- package/dist/components/InternalHeader/InternalHeader.types.d.ts +4 -4
- package/dist/components/InternalHeader/InternalHeaderListItem.d.ts +1 -1
- package/dist/components/InternalHeader/NavigationItem.d.ts +2 -2
- package/dist/components/List/List.d.ts +3 -3
- package/dist/components/List/List.stories.d.ts +3 -3
- package/dist/components/List/ListItem.d.ts +1 -1
- package/dist/components/LocalMessage/LocalMessage.d.ts +3 -3
- package/dist/components/Modal/Modal.d.ts +1 -1
- package/dist/components/Modal/ModalActions.d.ts +1 -1
- package/dist/components/Modal/ModalBody.d.ts +1 -1
- package/dist/components/OverflowMenu/OverflowMenu.d.ts +1 -1
- package/dist/components/OverflowMenu/OverflowMenu.types.d.ts +7 -7
- package/dist/components/OverflowMenu/OverflowMenuGroup.d.ts +1 -1
- package/dist/components/OverflowMenu/OverflowMenuItem.d.ts +5 -5
- package/dist/components/Pagination/Pagination.d.ts +2 -2
- package/dist/components/Popover/Popover.d.ts +2 -2
- package/dist/components/Popover/PopoverGroup.d.ts +1 -1
- package/dist/components/ProgressTracker/ProgressTracker.context.d.ts +1 -1
- package/dist/components/ProgressTracker/ProgressTracker.d.ts +2 -2
- package/dist/components/ProgressTracker/ProgressTrackerItem.d.ts +2 -2
- package/dist/components/RadioButton/RadioButton.types.d.ts +2 -2
- package/dist/components/RadioButton/RadioButtonGroup.d.ts +1 -1
- package/dist/components/ScrollableContainer/ScrollableContainer.d.ts +1 -1
- package/dist/components/ScrollableContainer/Scrollbar.d.ts +1 -1
- package/dist/components/Search/AutocompleteSearch.context.d.ts +1 -1
- package/dist/components/Search/Search.d.ts +3 -3
- package/dist/components/Search/SearchAutocompleteWrapper.d.ts +4 -4
- package/dist/components/Search/SearchSuggestions.d.ts +1 -1
- package/dist/components/Search/index.d.ts +1 -1
- package/dist/components/Select/CustomSelect.stories.d.ts +1 -1
- package/dist/components/Select/MultiSelect.stories.d.ts +2 -2
- package/dist/components/Select/Select.d.ts +4 -4
- package/dist/components/Select/Select.stories.d.ts +1 -1
- package/dist/components/Select/Select.styles.d.ts +1 -1
- package/dist/components/SkipToContent/SkipToContent.d.ts +1 -1
- package/dist/components/Spinner/Spinner.d.ts +1 -1
- package/dist/components/SplitButton/SplitButton.d.ts +2 -2
- package/dist/components/Stack/Stack.d.ts +3 -3
- package/dist/components/Table/Body.d.ts +1 -1
- package/dist/components/Table/Cell.d.ts +4 -4
- package/dist/components/Table/Foot.d.ts +1 -1
- package/dist/components/Table/Head.d.ts +1 -1
- package/dist/components/Table/SortCell.d.ts +2 -2
- package/dist/components/Table/Table.styles.d.ts +1 -1
- package/dist/components/Table/Table.types.d.ts +7 -7
- package/dist/components/Table/TableWrapper.d.ts +1 -1
- package/dist/components/Table/collapsible/Table.context.d.ts +1 -1
- package/dist/components/Table/index.d.ts +2 -2
- package/dist/components/Table/tableData.d.ts +2 -2
- package/dist/components/Tabs/Tab.d.ts +1 -1
- package/dist/components/Tabs/TabList.d.ts +1 -1
- package/dist/components/Tabs/TabPanel.d.ts +1 -1
- package/dist/components/Tabs/TabPanels.d.ts +1 -1
- package/dist/components/Tabs/Tabs.context.d.ts +1 -1
- package/dist/components/Tabs/Tabs.d.ts +1 -1
- package/dist/components/Tag/Tag.d.ts +2 -2
- package/dist/components/TextArea/TextArea.d.ts +1 -1
- package/dist/components/TextInput/CharCounter.d.ts +1 -1
- package/dist/components/TextInput/TextInput.styles.d.ts +2 -2
- package/dist/components/TextInput/TextInput.types.d.ts +1 -1
- package/dist/components/ToggleBar/ToggleBar.context.d.ts +1 -1
- package/dist/components/ToggleBar/ToggleBar.types.d.ts +3 -3
- package/dist/components/ToggleBar/ToggleRadio.d.ts +2 -2
- package/dist/components/ToggleBar/ToggleRadio.styles.d.ts +2 -2
- package/dist/components/ToggleButton/ToggleButton.types.d.ts +1 -1
- package/dist/components/ToggleButton/ToggleButtonGroup.d.ts +2 -2
- package/dist/components/Tooltip/Tooltip.d.ts +3 -3
- package/dist/components/Tooltip/Tooltip.styles.d.ts +1 -1
- package/dist/components/Typography/Caption/Caption.d.ts +1 -1
- package/dist/components/Typography/Caption/Caption.stories.d.ts +1 -1
- package/dist/components/Typography/Heading/Heading.d.ts +2 -2
- package/dist/components/Typography/Heading/Heading.stories.d.ts +1 -1
- package/dist/components/Typography/Label/Label.d.ts +3 -3
- package/dist/components/Typography/Label/Label.stories.d.ts +1 -1
- package/dist/components/Typography/Legend/Legend.d.ts +1 -1
- package/dist/components/Typography/Legend/Legend.stories.d.ts +1 -1
- package/dist/components/Typography/Link/Link.d.ts +2 -2
- package/dist/components/Typography/Link/Link.stories.d.ts +1 -1
- package/dist/components/Typography/Paragraph/Paragraph.d.ts +1 -1
- package/dist/components/Typography/Paragraph/Paragraph.stories.d.ts +1 -1
- package/dist/components/Typography/Typography/Typography.d.ts +4 -4
- package/dist/components/Typography/Typography/Typography.stories.d.ts +1 -1
- package/dist/components/Typography/Typography/Typography.types.d.ts +14 -14
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +3 -3
- package/dist/helpers/Backdrop/Backdrop.d.ts +1 -1
- package/dist/helpers/Chevron/AnimatedChevronUpDown.d.ts +1 -1
- package/dist/helpers/Chevron/AnimatedChevronUpDown.styles.d.ts +1 -1
- package/dist/helpers/Input/Input.styles.d.ts +1 -1
- package/dist/helpers/Input/Input.types.d.ts +6 -6
- package/dist/helpers/Paper/Paper.d.ts +3 -3
- package/dist/helpers/SelectionControl/SelectionControl.styles.d.ts +3 -3
- package/dist/hooks/useFloatPosition.d.ts +1 -1
- package/dist/icons/utils/StyledSvg.d.ts +1 -1
- package/dist/icons/utils/propTypes.d.ts +2 -2
- package/dist/types/BaseComponentProps.d.ts +3 -3
- package/dist/types/CheckboxPickedHTMLAttributes.d.ts +1 -1
- package/dist/types/Direction.d.ts +1 -1
- package/dist/types/utils.d.ts +2 -2
- package/dist/utils/color.d.ts +3 -3
- package/package.json +19 -17
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ForwardRefExoticComponent } from 'react';
|
|
2
2
|
import { BaseComponentPropsWithChildren } from '../../types';
|
|
3
3
|
import { ProgressTrackerItem } from './ProgressTrackerItem';
|
|
4
|
-
|
|
4
|
+
type ProgressTrackerProps = BaseComponentPropsWithChildren<HTMLDivElement, {
|
|
5
5
|
/** Indeksen til det aktive steget. */
|
|
6
6
|
activeStep?: number;
|
|
7
7
|
/** Ekstra logikk ved klikking på et steg. */
|
|
@@ -9,7 +9,7 @@ declare type ProgressTrackerProps = BaseComponentPropsWithChildren<HTMLDivElemen
|
|
|
9
9
|
/** Om brukeren kan hoppe mellom stegene via museklikk på et steg. */
|
|
10
10
|
clickable?: boolean;
|
|
11
11
|
}>;
|
|
12
|
-
|
|
12
|
+
type ProgressTrackerComponent = ForwardRefExoticComponent<ProgressTrackerProps> & {
|
|
13
13
|
Item: typeof ProgressTrackerItem;
|
|
14
14
|
};
|
|
15
15
|
export declare const ProgressTracker: ProgressTrackerComponent;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SvgIcon } from '../../icons/utils';
|
|
2
2
|
import { BaseComponentPropsWithChildren } from '../../types';
|
|
3
|
-
|
|
3
|
+
type BaseItemProps = {
|
|
4
4
|
/** Om steget er valgt eller ikke. Settes av konsument. */
|
|
5
5
|
active?: boolean;
|
|
6
6
|
/** Om steget er ferdig eller ikke. Settes av konsument. */
|
|
@@ -14,7 +14,7 @@ declare type BaseItemProps = {
|
|
|
14
14
|
/** Indeksen til steget. NB! Denne settes automatisk av `<ProgressTracker />` og skal ikke settes manuelt. */
|
|
15
15
|
index?: number;
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
type ProgressTrackerItemProps = ({
|
|
18
18
|
/** Click-handler som gjør det mulig for bruker å klikke på steget for å navigere. Valgfri. */
|
|
19
19
|
onClick: (index: number) => void;
|
|
20
20
|
} & BaseComponentPropsWithChildren<HTMLButtonElement, BaseItemProps>) | ({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InputHTMLAttributes } from 'react';
|
|
2
2
|
import { BaseComponentPropsWithChildren } from '../../types';
|
|
3
|
-
|
|
4
|
-
export
|
|
3
|
+
type PickedInputHTMLAttributes = Pick<InputHTMLAttributes<HTMLInputElement>, 'name' | 'readOnly' | 'checked' | 'value' | 'required' | 'onChange' | 'aria-describedby'>;
|
|
4
|
+
export type RadioButtonProps = BaseComponentPropsWithChildren<HTMLInputElement, {
|
|
5
5
|
/**Ledetekst for alternativet. */
|
|
6
6
|
label?: string;
|
|
7
7
|
/**Spesifiserer om input er disabled. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChangeEvent, HTMLAttributes, ReactElement, Ref } from 'react';
|
|
2
2
|
import { BaseComponentPropsWithChildren, Direction } from '../../types';
|
|
3
|
-
export
|
|
3
|
+
export type RadioButtonGroupProps<T extends string | number> = BaseComponentPropsWithChildren<HTMLDivElement, {
|
|
4
4
|
/** Gir alle barna `name` prop.*/
|
|
5
5
|
name?: string;
|
|
6
6
|
/**Ledetekst for hele gruppen. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseComponentPropsWithChildren } from '../../types';
|
|
2
2
|
import { Property } from 'csstype';
|
|
3
|
-
export
|
|
3
|
+
export type ScrollableContainerProps = BaseComponentPropsWithChildren<HTMLDivElement, {
|
|
4
4
|
/**Høyde på innholdscontainer. */
|
|
5
5
|
contentHeight?: Property.Height;
|
|
6
6
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
2
|
import { BaseComponentProps } from '../../types';
|
|
3
|
-
export
|
|
3
|
+
export type ScrollbarProps = BaseComponentProps<HTMLDivElement, {
|
|
4
4
|
/** Ref til container med innholdet som skal scrolles. */
|
|
5
5
|
contentRef?: RefObject<HTMLDivElement>;
|
|
6
6
|
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChangeEvent, MouseEvent, RefObject } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type AutocompleteSearchContextType = {
|
|
3
3
|
onValueChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
4
4
|
onSugggestionClick?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
5
5
|
suggestions?: string[];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes, InputHTMLAttributes, MouseEvent } from 'react';
|
|
2
2
|
import { InputProps as BaseInputProps } from '../../helpers';
|
|
3
|
-
export
|
|
4
|
-
|
|
3
|
+
export type SearchSize = 'small' | 'medium' | 'large';
|
|
4
|
+
type ButtonProps = {
|
|
5
5
|
onClick: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
6
6
|
label?: string;
|
|
7
7
|
loading?: boolean;
|
|
8
8
|
} & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
9
|
-
export
|
|
9
|
+
export type SearchProps = Pick<BaseInputProps, 'tip' | 'label'> & {
|
|
10
10
|
/**Størrelsen på komponenten. */
|
|
11
11
|
componentSize?: SearchSize;
|
|
12
12
|
/**Props for søkeknappen. */
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { ChangeEvent, ReactNode } from 'react';
|
|
2
|
-
|
|
2
|
+
type WeightedValue = {
|
|
3
3
|
text: string;
|
|
4
4
|
relevance: number;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
6
|
+
export type WeightedSearchData = {
|
|
7
7
|
array: WeightedValue[];
|
|
8
8
|
sortFunction?: (a: WeightedValue, b: WeightedValue) => number;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type SearchData = {
|
|
11
11
|
array: string[];
|
|
12
12
|
sortFunction?: (a: string, b: string) => number;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export type SearchAutocompleteWrapperProps = {
|
|
15
15
|
/**Array med data som kan søkes på og eventuelt tilhørende sorteringsfunksjon. Array kan bestå av elementer av typen `string` eller objekter med vekt og tekst.*/
|
|
16
16
|
data?: SearchData | WeightedSearchData;
|
|
17
17
|
/** Ekstra callback ved `onChange` i `<Search>`. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SearchProps } from './Search';
|
|
2
2
|
import { BaseComponentProps } from '../../types';
|
|
3
3
|
import { MouseEvent } from 'react';
|
|
4
|
-
export
|
|
4
|
+
export type SearchSuggestionsProps = BaseComponentProps<HTMLDivElement, Pick<SearchProps, 'componentSize'> & {
|
|
5
5
|
/**Forslag som vises i listen. */
|
|
6
6
|
suggestions?: string[];
|
|
7
7
|
/** Om listen skal vises. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Search as BaseSearch, SearchProps, SearchSize } from './Search';
|
|
2
2
|
import { SearchAutocompleteWrapper, SearchAutocompleteWrapperProps, SearchData, WeightedSearchData } from './SearchAutocompleteWrapper';
|
|
3
3
|
import { SearchSuggestions, SearchSuggestionsProps } from './SearchSuggestions';
|
|
4
|
-
|
|
4
|
+
type SearchCompoundProps = typeof BaseSearch & {
|
|
5
5
|
AutocompleteWrapper: typeof SearchAutocompleteWrapper;
|
|
6
6
|
Suggestions: typeof SearchSuggestions;
|
|
7
7
|
};
|
|
@@ -62,5 +62,5 @@ declare const _default: {
|
|
|
62
62
|
};
|
|
63
63
|
};
|
|
64
64
|
export default _default;
|
|
65
|
-
|
|
65
|
+
type SingleSelectProps = SelectProps<SelectOption, false>;
|
|
66
66
|
export declare const Example: (args: SingleSelectProps) => JSX.Element;
|
|
@@ -61,11 +61,11 @@ declare const _default: {
|
|
|
61
61
|
};
|
|
62
62
|
};
|
|
63
63
|
export default _default;
|
|
64
|
-
|
|
64
|
+
type Option = {
|
|
65
65
|
label: string;
|
|
66
66
|
value: string;
|
|
67
67
|
};
|
|
68
|
-
|
|
68
|
+
type MultiSelectProps = SelectProps<Option, true>;
|
|
69
69
|
export declare const Overview: (args: MultiSelectProps) => JSX.Element;
|
|
70
70
|
export declare const OverviewSizes: (args: MultiSelectProps) => JSX.Element;
|
|
71
71
|
export declare const Default: (args: MultiSelectProps) => JSX.Element;
|
|
@@ -4,13 +4,13 @@ import { GroupBase, OptionProps, Props as ReactSelectProps, SelectInstance, Sing
|
|
|
4
4
|
import { InputSize } from '../../helpers';
|
|
5
5
|
import { WithRequiredIf } from '../../types/utils';
|
|
6
6
|
import { SvgIcon } from '../../icons/utils';
|
|
7
|
-
export
|
|
7
|
+
export type SelectOption<TValue = unknown> = {
|
|
8
8
|
label: string | number;
|
|
9
9
|
value: TValue;
|
|
10
10
|
};
|
|
11
11
|
export declare const createSelectOptions: <TValue extends string | number>(...args: TValue[]) => SelectOption<TValue>[];
|
|
12
|
-
|
|
13
|
-
export
|
|
12
|
+
type WrappedReactSelectProps<TOption extends Record<string, unknown>, IsMulti extends boolean, Group extends GroupBase<TOption>> = WithRequiredIf<TOption extends SelectOption ? false : true, ReactSelectProps<TOption, IsMulti, Group>, 'getOptionLabel' | 'getOptionValue'>;
|
|
13
|
+
export type SelectProps<TOption extends Record<string, unknown>, IsMulti extends boolean> = {
|
|
14
14
|
/**Ledetekst for nedtrekkslisten. */
|
|
15
15
|
label?: string;
|
|
16
16
|
/**Størrelsen på komponenten. */
|
|
@@ -32,6 +32,6 @@ export declare type SelectProps<TOption extends Record<string, unknown>, IsMulti
|
|
|
32
32
|
customOptionElement?: (props: OptionProps<TOption, IsMulti, GroupBase<TOption>>) => JSX.Element;
|
|
33
33
|
customSingleValueElement?: (props: SingleValueProps<TOption, IsMulti, GroupBase<TOption>>) => JSX.Element;
|
|
34
34
|
} & Pick<HTMLAttributes<HTMLInputElement>, 'aria-required'> & WrappedReactSelectProps<TOption, IsMulti, GroupBase<TOption>>;
|
|
35
|
-
|
|
35
|
+
type ForwardRefType<TOption, IsMulti extends boolean> = React.ForwardedRef<SelectInstance<TOption, IsMulti, GroupBase<TOption>>>;
|
|
36
36
|
export declare const Select: <TOption extends Record<string, unknown>, IsMulti extends boolean = false>(props: SelectProps<TOption, IsMulti>, ref: ForwardRefType<TOption, IsMulti>) => JSX.Element;
|
|
37
37
|
export {};
|
|
@@ -61,7 +61,7 @@ declare const _default: {
|
|
|
61
61
|
};
|
|
62
62
|
};
|
|
63
63
|
export default _default;
|
|
64
|
-
|
|
64
|
+
type SingleSelectProps = SelectProps<SelectOption, false>;
|
|
65
65
|
export declare const Overview: (args: SingleSelectProps) => JSX.Element;
|
|
66
66
|
export declare const OverviewSizes: (args: SingleSelectProps) => JSX.Element;
|
|
67
67
|
export declare const Default: (args: SingleSelectProps) => JSX.Element;
|
|
@@ -3,7 +3,7 @@ import { Property } from 'csstype';
|
|
|
3
3
|
import { Icon } from '../Icon';
|
|
4
4
|
import { InputSize } from '../../helpers';
|
|
5
5
|
export declare const prefix = "dds-select";
|
|
6
|
-
|
|
6
|
+
type StyledContainerProps = {
|
|
7
7
|
errorMessage?: string;
|
|
8
8
|
isDisabled?: boolean;
|
|
9
9
|
readOnly?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Property } from 'csstype';
|
|
2
2
|
import { BaseComponentProps } from '../../types';
|
|
3
|
-
export
|
|
3
|
+
export type SkipToContentProps = BaseComponentProps<HTMLAnchorElement, {
|
|
4
4
|
/** Teksten som vises i lenka. */
|
|
5
5
|
text?: string;
|
|
6
6
|
/**Spesifiserer hvor det skal hoppes til via `id`-attributtet til innholdet. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Property } from 'csstype';
|
|
2
2
|
import { TextColor } from '../../utils';
|
|
3
3
|
import { BaseComponentProps } from '../../types';
|
|
4
|
-
export
|
|
4
|
+
export type SpinnerProps = BaseComponentProps<SVGElement, {
|
|
5
5
|
/**Farge på spinneren. */
|
|
6
6
|
color?: TextColor | string;
|
|
7
7
|
/**Størrelse; Setter høyde og bredde på spinneren. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ExtractStrict } from '../../types';
|
|
2
2
|
import { ButtonProps, ButtonPurpose, ButtonSize } from '../Button';
|
|
3
3
|
import { OverflowMenuButtonItem } from '../OverflowMenu';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export type SplitButtonPurpose = ExtractStrict<ButtonPurpose, 'primary' | 'secondary'>;
|
|
5
|
+
export type SplitButtonProps = {
|
|
6
6
|
/**Størrelse på komponenten. */
|
|
7
7
|
size?: ButtonSize;
|
|
8
8
|
/**Props for primær handling. Samme props som for `<Button />` unntatt `size`, `purpose`, og `appearance`. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { stackTokens } from './Stack.tokens';
|
|
2
2
|
import { BaseComponentPropsWithChildren } from '../../types';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type Align = 'stretch' | 'center' | 'flex-start' | 'flex-end';
|
|
4
|
+
type Justify = 'flex-start' | 'flex-end' | 'space-between' | 'space-around';
|
|
5
5
|
export interface StackStyleProps {
|
|
6
6
|
/**
|
|
7
7
|
* Hvilken retning elementene skal plasseres i.
|
|
@@ -23,7 +23,7 @@ export interface StackStyleProps {
|
|
|
23
23
|
*/
|
|
24
24
|
gap?: keyof typeof stackTokens.gap | 0;
|
|
25
25
|
}
|
|
26
|
-
export
|
|
26
|
+
export type StackProps = BaseComponentPropsWithChildren<HTMLDivElement, Omit<StackStyleProps, 'direction'>>;
|
|
27
27
|
export declare const HStack: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLDivElement>, "className" | "id"> & Omit<StackStyleProps, "direction"> & {
|
|
28
28
|
children?: import("react").ReactNode;
|
|
29
29
|
} & {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type TableBodyProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
3
3
|
export declare const Body: import("react").ForwardRefExoticComponent<TableBodyProps & import("react").RefAttributes<HTMLTableSectionElement>>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ThHTMLAttributes, TdHTMLAttributes } from 'react';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
2
|
+
export type TableCellType = 'data' | 'head';
|
|
3
|
+
export type TableCellLayout = 'left' | 'right' | 'center' | 'text and icon';
|
|
4
|
+
export type CollapsibleProps = {
|
|
5
5
|
isCollapsibleChild?: boolean;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type TableCellProps = {
|
|
8
8
|
/**Type celle. Returnerer enten `<td>` eller `<th>`. */
|
|
9
9
|
type?: TableCellType;
|
|
10
10
|
/**Layout av innholdet i cellen. 'tekst and icon' legger `gap` mellom barna og andre barnet i cellen. */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type TableFootProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
3
3
|
export declare const Foot: import("react").ForwardRefExoticComponent<TableFootProps & import("react").RefAttributes<HTMLTableSectionElement>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type TableHeadProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
3
3
|
export declare const Head: import("react").ForwardRefExoticComponent<TableHeadProps & import("react").RefAttributes<HTMLTableSectionElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MouseEvent } from 'react';
|
|
2
2
|
import { TableCellProps } from './Cell';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type SortOrder = 'ascending' | 'descending';
|
|
4
|
+
export type TableSortCellProps = {
|
|
5
5
|
/**Spesifiserer om kolonnen er sortert. */
|
|
6
6
|
isSorted?: boolean;
|
|
7
7
|
/**Sorteringsrekkefølge i kolonnen. Avgjør hvilket ikon skal vises i cellen. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RowMode, TableRowType } from './Table.types';
|
|
2
2
|
export declare const bodyRowStyles: (mode?: RowMode, selected?: boolean) => import("styled-components").FlattenSimpleInterpolation;
|
|
3
|
-
|
|
3
|
+
type StyledProps = {
|
|
4
4
|
type: TableRowType;
|
|
5
5
|
mode?: RowMode;
|
|
6
6
|
selected?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type TableDensity = 'normal' | 'compact';
|
|
3
|
+
export type TableProps = {
|
|
4
4
|
/**Spesifiserer hvor romslige cellene i tabellen skal være. */
|
|
5
5
|
density?: TableDensity;
|
|
6
6
|
/**Spesifiserer om cellene i `<Head>` skal bli sticky ved scrolling. */
|
|
@@ -8,11 +8,11 @@ export declare type TableProps = {
|
|
|
8
8
|
/**Legger skillelinjer mellom radene. */
|
|
9
9
|
withDividers?: boolean;
|
|
10
10
|
} & HTMLAttributes<HTMLTableElement>;
|
|
11
|
-
export
|
|
11
|
+
export type HeaderValues = {
|
|
12
12
|
key: string;
|
|
13
13
|
content: ReactNode;
|
|
14
14
|
}[];
|
|
15
|
-
export
|
|
15
|
+
export type CollapsibleTableProps = {
|
|
16
16
|
/**Om tabellen skal kollapse. */
|
|
17
17
|
isCollapsed?: boolean;
|
|
18
18
|
/**Innhold i headere (`content`) og deres `key`. `headerValues.content` må være den samme som faktisk innhold i `<Table.Cell type='head'>`. */
|
|
@@ -23,9 +23,9 @@ export declare type CollapsibleTableProps = {
|
|
|
23
23
|
* */
|
|
24
24
|
definingColumnIndex?: number[];
|
|
25
25
|
} & TableProps;
|
|
26
|
-
export
|
|
27
|
-
export
|
|
28
|
-
export
|
|
26
|
+
export type TableRowType = 'body' | 'head';
|
|
27
|
+
export type RowMode = 'normal' | 'sum';
|
|
28
|
+
export type TableRowProps = {
|
|
29
29
|
/**Spesifiserer om raden skal brukes i `<head>` eller `<body>`-seksjonen. */
|
|
30
30
|
type?: TableRowType;
|
|
31
31
|
/**Custom modus for rader som har ytterligere semantisk betydning (f.eks. summeringsrad), definerer kun styling. Ved bruk av sum må `<Cell>` med tall i høyrestilles vha layout prop. */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type TableWrapperProps = HTMLAttributes<HTMLDivElement>;
|
|
3
3
|
export declare const TableWrapper: ({ children, ...rest }: TableWrapperProps) => JSX.Element;
|
|
@@ -9,7 +9,7 @@ import { CollapsibleRow } from './collapsible/CollapsibleRow';
|
|
|
9
9
|
import { Cell, TableCellProps, TableCellLayout, TableCellType } from './Cell';
|
|
10
10
|
import { SortCell, TableSortCellProps, SortOrder } from './SortCell';
|
|
11
11
|
import { TableWrapper } from './TableWrapper';
|
|
12
|
-
|
|
12
|
+
type TableCompoundProps = typeof BaseTable & {
|
|
13
13
|
Wrapper: typeof TableWrapper;
|
|
14
14
|
Head: typeof Head;
|
|
15
15
|
Body: typeof Body;
|
|
@@ -19,7 +19,7 @@ declare type TableCompoundProps = typeof BaseTable & {
|
|
|
19
19
|
SortCell: typeof SortCell;
|
|
20
20
|
};
|
|
21
21
|
declare const Table: TableCompoundProps;
|
|
22
|
-
|
|
22
|
+
type CollapsibleTableCompoundProps = typeof BaseCollapsibleTable & {
|
|
23
23
|
Row: typeof CollapsibleRow;
|
|
24
24
|
};
|
|
25
25
|
declare const CollapsibleTable: CollapsibleTableCompoundProps;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { SortOrder } from './SortCell';
|
|
2
|
-
export
|
|
2
|
+
export type HeaderCellToSort = {
|
|
3
3
|
name: string;
|
|
4
4
|
dataName: string;
|
|
5
5
|
sortOrder?: SortOrder | 'none';
|
|
6
6
|
isSorted?: boolean;
|
|
7
7
|
};
|
|
8
8
|
export declare const headerCells: HeaderCellToSort[];
|
|
9
|
-
export
|
|
9
|
+
export type CellDataToSort = {
|
|
10
10
|
name: string;
|
|
11
11
|
fnumber: string;
|
|
12
12
|
employer: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes, Dispatch, SetStateAction } from 'react';
|
|
2
2
|
import { BaseComponentPropsWithChildren } from '../../types';
|
|
3
3
|
import { SvgIcon } from '../../icons/utils';
|
|
4
|
-
export
|
|
4
|
+
export type TabProps = BaseComponentPropsWithChildren<HTMLButtonElement, {
|
|
5
5
|
/**Spesifiserer om fanen er aktiv. */
|
|
6
6
|
active?: boolean;
|
|
7
7
|
/** Ikon. */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type TabListProps = HTMLAttributes<HTMLDivElement>;
|
|
3
3
|
export declare const TabList: import("react").ForwardRefExoticComponent<TabListProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseComponentPropsWithChildren } from '../../types';
|
|
2
|
-
export
|
|
2
|
+
export type TabPanelProps = BaseComponentPropsWithChildren<HTMLDivElement, {
|
|
3
3
|
/** Spesifiserer om panelet skal vises basert på aktiv fane. */
|
|
4
4
|
active?: boolean;
|
|
5
5
|
}>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type TabPanelsProps = HTMLAttributes<HTMLDivElement>;
|
|
3
3
|
export declare const TabPanels: import("react").ForwardRefExoticComponent<TabPanelsProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import { BaseComponentPropsWithChildren, Direction } from '../../types';
|
|
3
3
|
import { Property } from 'csstype';
|
|
4
|
-
export
|
|
4
|
+
export type TabsProps = BaseComponentPropsWithChildren<HTMLDivElement, {
|
|
5
5
|
/** Indeksen til den aktive fanen. **OBS!** Ved å sette denne vil brukere aldri kunne endre tab uten at du også registrerer en `onChange`-lytter for å ta vare på aktiv tab utenfor komponenten. */
|
|
6
6
|
activeTab?: number;
|
|
7
7
|
/** Ekstra logikk ved endring av aktiv fane. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseComponentProps } from '../../types';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type TagPurpose = 'success' | 'info' | 'danger' | 'warning' | 'default';
|
|
3
|
+
export type TagProps = BaseComponentProps<HTMLSpanElement, {
|
|
4
4
|
/**Tekst som vises i `<Tag />.` */
|
|
5
5
|
text?: string;
|
|
6
6
|
/**Formål med status eller kategorisering. Påvirker styling. */
|
|
@@ -3,5 +3,5 @@ import { CommonInputProps } from '../../helpers/Input';
|
|
|
3
3
|
export declare const StyledTextArea: import("styled-components").StyledComponent<"input", any, Pick<import("../../helpers/Input").InputProps, "disabled" | "readOnly"> & {
|
|
4
4
|
hasErrorMessage: boolean;
|
|
5
5
|
} & Pick<import("../../helpers/Input").InputProps, "componentSize">, never>;
|
|
6
|
-
export
|
|
6
|
+
export type TextAreaProps = CommonInputProps & TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
7
7
|
export declare const TextArea: import("react").ForwardRefExoticComponent<CommonInputProps & TextareaHTMLAttributes<HTMLTextAreaElement> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { InputSize } from '../../helpers';
|
|
2
2
|
import { Icon } from '../Icon';
|
|
3
3
|
export declare const MessageContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
-
|
|
4
|
+
type StyledIconProps = {
|
|
5
5
|
size: InputSize;
|
|
6
6
|
};
|
|
7
7
|
export declare const StyledIcon: import("styled-components").StyledComponent<typeof Icon, any, StyledIconProps, never>;
|
|
8
|
-
|
|
8
|
+
type StyledInputProps = {
|
|
9
9
|
hasIcon?: boolean;
|
|
10
10
|
};
|
|
11
11
|
export declare const StyledInput: import("styled-components").StyledComponent<"input", any, Pick<import("../../helpers").InputProps, "disabled" | "readOnly"> & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InputProps } from '../../helpers';
|
|
2
2
|
import { SvgIcon } from '../../icons/utils';
|
|
3
|
-
export
|
|
3
|
+
export type TextInputProps = InputProps & {
|
|
4
4
|
/** Spesifiserer om tegntelleren skal vises ved bruk av `maxLength` attributt. */
|
|
5
5
|
withCharacterCounter?: boolean;
|
|
6
6
|
/** Ikonet som vises i komponenten. */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ChangeEvent } from 'react';
|
|
2
2
|
import { BaseComponentPropsWithChildren } from '../../types';
|
|
3
3
|
import { Property } from 'csstype';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
4
|
+
export type ToggleBarValue = string | number | null | undefined;
|
|
5
|
+
export type ToggleBarSize = 'tiny' | 'small' | 'medium' | 'large';
|
|
6
|
+
export type ToggleBarProps<T extends string | number> = BaseComponentPropsWithChildren<HTMLDivElement, {
|
|
7
7
|
/**Størrelse på komponenten. */
|
|
8
8
|
size?: ToggleBarSize;
|
|
9
9
|
/**Ledetekst for hele gruppen. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { InputHTMLAttributes } from 'react';
|
|
2
2
|
import { SvgIcon } from '../../icons/utils';
|
|
3
3
|
import { BaseComponentProps } from '../../types';
|
|
4
|
-
|
|
5
|
-
export
|
|
4
|
+
type PickedInputHTMLAttributes = Pick<InputHTMLAttributes<HTMLInputElement>, 'name' | 'checked' | 'value' | 'onChange' | 'aria-label' | 'aria-labelledby'>;
|
|
5
|
+
export type ToggleRadioProps = BaseComponentProps<HTMLInputElement, {
|
|
6
6
|
/**Ledetekst som vises i komponenten. */
|
|
7
7
|
label?: string;
|
|
8
8
|
/**Ikonet som vises i komponenten. */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ToggleBarSize } from './ToggleBar.types';
|
|
2
|
-
|
|
2
|
+
type ContentProps = {
|
|
3
3
|
size: ToggleBarSize;
|
|
4
4
|
justIcon: boolean;
|
|
5
5
|
};
|
|
6
6
|
export declare const Content: import("styled-components").StyledComponent<"span", any, ContentProps, never>;
|
|
7
|
-
|
|
7
|
+
type LabelProps = {
|
|
8
8
|
size: ToggleBarSize;
|
|
9
9
|
};
|
|
10
10
|
export declare const Label: import("styled-components").StyledComponent<"label", any, LabelProps, never>;
|
|
@@ -2,7 +2,7 @@ import { InputHTMLAttributes } from 'react';
|
|
|
2
2
|
import { SvgIcon } from '../../icons/utils';
|
|
3
3
|
import { BaseComponentProps } from '../../types';
|
|
4
4
|
import { CheckboxPickedHTMLAttributes } from '../../types/CheckboxPickedHTMLAttributes';
|
|
5
|
-
export
|
|
5
|
+
export type ToggleButtonProps = BaseComponentProps<HTMLInputElement, {
|
|
6
6
|
/**Ledetekst for inputelementet. */
|
|
7
7
|
label?: string;
|
|
8
8
|
/** Ikon. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseComponentPropsWithChildren } from '../../types';
|
|
2
|
-
|
|
3
|
-
export
|
|
2
|
+
type Direction = 'row' | 'column';
|
|
3
|
+
export type ToggleButtonGroupProps = BaseComponentPropsWithChildren<HTMLDivElement, {
|
|
4
4
|
/** Ledetekst for gruppen. */
|
|
5
5
|
label?: string;
|
|
6
6
|
/**Retningen barna legger seg i. */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { HTMLAttributes } from 'react';
|
|
2
2
|
import { Placement } from '../../hooks';
|
|
3
3
|
import { BaseComponentProps } from '../../types';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export
|
|
4
|
+
type AnchorElement = React.ReactElement & React.RefAttributes<HTMLElement>;
|
|
5
|
+
type PickedHTMLAttributes = Pick<HTMLAttributes<HTMLDivElement>, 'style' | 'onMouseLeave' | 'onMouseOver'>;
|
|
6
|
+
export type TooltipProps = BaseComponentProps<HTMLDivElement, {
|
|
7
7
|
/**Innhold i tooltip. */
|
|
8
8
|
text: string;
|
|
9
9
|
/**Plassering i forhold til anchor-elementet. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const SvgArrow: import("styled-components").StyledComponent<"svg", any, {}, never>;
|
|
2
2
|
export declare const ArrowWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
3
|
export declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
-
|
|
4
|
+
type WrapperProps = {
|
|
5
5
|
open: boolean;
|
|
6
6
|
};
|
|
7
7
|
export declare const TooltipWrapper: import("styled-components").StyledComponent<"div", any, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseComponentPropsWithChildren } from '../../../types';
|
|
2
2
|
import { BaseTypographyProps } from '../Typography';
|
|
3
|
-
export
|
|
3
|
+
export type CaptionProps = BaseComponentPropsWithChildren<HTMLTableCaptionElement, BaseTypographyProps>;
|
|
4
4
|
export declare const Caption: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLTableCaptionElement>, "id" | "className"> & {
|
|
5
5
|
withMargins?: boolean | undefined;
|
|
6
6
|
} & {
|