@norges-domstoler/dds-components 10.2.0 → 10.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_rollupPluginBabelHelpers.js +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 +5 -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 +307 -281
- 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 +5 -5
- package/dist/components/FileUploader/types.d.ts +9 -9
- package/dist/components/FileUploader/useFileUploader.d.ts +8 -6
- package/dist/components/FileUploader/useFileUploader.js +18 -13
- 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.tokens.js +1 -1
- 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,3 +1,30 @@
|
|
|
1
|
+
function _iterableToArrayLimit(arr, i) {
|
|
2
|
+
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
3
|
+
if (null != _i) {
|
|
4
|
+
var _s,
|
|
5
|
+
_e,
|
|
6
|
+
_x,
|
|
7
|
+
_r,
|
|
8
|
+
_arr = [],
|
|
9
|
+
_n = !0,
|
|
10
|
+
_d = !1;
|
|
11
|
+
try {
|
|
12
|
+
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
13
|
+
if (Object(_i) !== _i) return;
|
|
14
|
+
_n = !1;
|
|
15
|
+
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
16
|
+
} catch (err) {
|
|
17
|
+
_d = !0, _e = err;
|
|
18
|
+
} finally {
|
|
19
|
+
try {
|
|
20
|
+
if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
|
|
21
|
+
} finally {
|
|
22
|
+
if (_d) throw _e;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return _arr;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
1
28
|
function _regeneratorRuntime() {
|
|
2
29
|
_regeneratorRuntime = function () {
|
|
3
30
|
return exports;
|
|
@@ -5,6 +32,9 @@ function _regeneratorRuntime() {
|
|
|
5
32
|
var exports = {},
|
|
6
33
|
Op = Object.prototype,
|
|
7
34
|
hasOwn = Op.hasOwnProperty,
|
|
35
|
+
defineProperty = Object.defineProperty || function (obj, key, desc) {
|
|
36
|
+
obj[key] = desc.value;
|
|
37
|
+
},
|
|
8
38
|
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
|
9
39
|
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
|
10
40
|
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
|
@@ -28,40 +58,9 @@ function _regeneratorRuntime() {
|
|
|
28
58
|
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
|
29
59
|
generator = Object.create(protoGenerator.prototype),
|
|
30
60
|
context = new Context(tryLocsList || []);
|
|
31
|
-
return generator
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if ("executing" === state) throw new Error("Generator is already running");
|
|
35
|
-
if ("completed" === state) {
|
|
36
|
-
if ("throw" === method) throw arg;
|
|
37
|
-
return doneResult();
|
|
38
|
-
}
|
|
39
|
-
for (context.method = method, context.arg = arg;;) {
|
|
40
|
-
var delegate = context.delegate;
|
|
41
|
-
if (delegate) {
|
|
42
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
43
|
-
if (delegateResult) {
|
|
44
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
45
|
-
return delegateResult;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
49
|
-
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
50
|
-
context.dispatchException(context.arg);
|
|
51
|
-
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
52
|
-
state = "executing";
|
|
53
|
-
var record = tryCatch(innerFn, self, context);
|
|
54
|
-
if ("normal" === record.type) {
|
|
55
|
-
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
56
|
-
return {
|
|
57
|
-
value: record.arg,
|
|
58
|
-
done: context.done
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
}(innerFn, self, context), generator;
|
|
61
|
+
return defineProperty(generator, "_invoke", {
|
|
62
|
+
value: makeInvokeMethod(innerFn, self, context)
|
|
63
|
+
}), generator;
|
|
65
64
|
}
|
|
66
65
|
function tryCatch(fn, obj, arg) {
|
|
67
66
|
try {
|
|
@@ -115,24 +114,55 @@ function _regeneratorRuntime() {
|
|
|
115
114
|
reject(record.arg);
|
|
116
115
|
}
|
|
117
116
|
var previousPromise;
|
|
118
|
-
this
|
|
119
|
-
function
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
117
|
+
defineProperty(this, "_invoke", {
|
|
118
|
+
value: function (method, arg) {
|
|
119
|
+
function callInvokeWithMethodAndArg() {
|
|
120
|
+
return new PromiseImpl(function (resolve, reject) {
|
|
121
|
+
invoke(method, arg, resolve, reject);
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
function makeInvokeMethod(innerFn, self, context) {
|
|
129
|
+
var state = "suspendedStart";
|
|
130
|
+
return function (method, arg) {
|
|
131
|
+
if ("executing" === state) throw new Error("Generator is already running");
|
|
132
|
+
if ("completed" === state) {
|
|
133
|
+
if ("throw" === method) throw arg;
|
|
134
|
+
return doneResult();
|
|
135
|
+
}
|
|
136
|
+
for (context.method = method, context.arg = arg;;) {
|
|
137
|
+
var delegate = context.delegate;
|
|
138
|
+
if (delegate) {
|
|
139
|
+
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
140
|
+
if (delegateResult) {
|
|
141
|
+
if (delegateResult === ContinueSentinel) continue;
|
|
142
|
+
return delegateResult;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
146
|
+
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
147
|
+
context.dispatchException(context.arg);
|
|
148
|
+
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
149
|
+
state = "executing";
|
|
150
|
+
var record = tryCatch(innerFn, self, context);
|
|
151
|
+
if ("normal" === record.type) {
|
|
152
|
+
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
153
|
+
return {
|
|
154
|
+
value: record.arg,
|
|
155
|
+
done: context.done
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
123
159
|
}
|
|
124
|
-
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
125
160
|
};
|
|
126
161
|
}
|
|
127
162
|
function maybeInvokeDelegate(delegate, context) {
|
|
128
|
-
var
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
|
|
132
|
-
context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
|
|
133
|
-
}
|
|
134
|
-
return ContinueSentinel;
|
|
135
|
-
}
|
|
163
|
+
var methodName = context.method,
|
|
164
|
+
method = delegate.iterator[methodName];
|
|
165
|
+
if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
|
|
136
166
|
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
137
167
|
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
138
168
|
var info = record.arg;
|
|
@@ -177,7 +207,13 @@ function _regeneratorRuntime() {
|
|
|
177
207
|
done: !0
|
|
178
208
|
};
|
|
179
209
|
}
|
|
180
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype,
|
|
210
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
|
|
211
|
+
value: GeneratorFunctionPrototype,
|
|
212
|
+
configurable: !0
|
|
213
|
+
}), defineProperty(GeneratorFunctionPrototype, "constructor", {
|
|
214
|
+
value: GeneratorFunction,
|
|
215
|
+
configurable: !0
|
|
216
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
181
217
|
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
182
218
|
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
183
219
|
}, exports.mark = function (genFun) {
|
|
@@ -198,8 +234,9 @@ function _regeneratorRuntime() {
|
|
|
198
234
|
return this;
|
|
199
235
|
}), define(Gp, "toString", function () {
|
|
200
236
|
return "[object Generator]";
|
|
201
|
-
}), exports.keys = function (
|
|
202
|
-
var
|
|
237
|
+
}), exports.keys = function (val) {
|
|
238
|
+
var object = Object(val),
|
|
239
|
+
keys = [];
|
|
203
240
|
for (var key in object) keys.push(key);
|
|
204
241
|
return keys.reverse(), function next() {
|
|
205
242
|
for (; keys.length;) {
|
|
@@ -299,6 +336,7 @@ function _typeof(obj) {
|
|
|
299
336
|
}, _typeof(obj);
|
|
300
337
|
}
|
|
301
338
|
function _defineProperty(obj, key, value) {
|
|
339
|
+
key = _toPropertyKey(key);
|
|
302
340
|
if (key in obj) {
|
|
303
341
|
Object.defineProperty(obj, key, {
|
|
304
342
|
value: value,
|
|
@@ -326,30 +364,6 @@ function _arrayWithHoles(arr) {
|
|
|
326
364
|
function _iterableToArray(iter) {
|
|
327
365
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
328
366
|
}
|
|
329
|
-
function _iterableToArrayLimit(arr, i) {
|
|
330
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
331
|
-
if (_i == null) return;
|
|
332
|
-
var _arr = [];
|
|
333
|
-
var _n = true;
|
|
334
|
-
var _d = false;
|
|
335
|
-
var _s, _e;
|
|
336
|
-
try {
|
|
337
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
338
|
-
_arr.push(_s.value);
|
|
339
|
-
if (i && _arr.length === i) break;
|
|
340
|
-
}
|
|
341
|
-
} catch (err) {
|
|
342
|
-
_d = true;
|
|
343
|
-
_e = err;
|
|
344
|
-
} finally {
|
|
345
|
-
try {
|
|
346
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
347
|
-
} finally {
|
|
348
|
-
if (_d) throw _e;
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
return _arr;
|
|
352
|
-
}
|
|
353
367
|
function _unsupportedIterableToArray(o, minLen) {
|
|
354
368
|
if (!o) return;
|
|
355
369
|
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
@@ -420,5 +434,19 @@ function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
|
420
434
|
}
|
|
421
435
|
};
|
|
422
436
|
}
|
|
437
|
+
function _toPrimitive(input, hint) {
|
|
438
|
+
if (typeof input !== "object" || input === null) return input;
|
|
439
|
+
var prim = input[Symbol.toPrimitive];
|
|
440
|
+
if (prim !== undefined) {
|
|
441
|
+
var res = prim.call(input, hint || "default");
|
|
442
|
+
if (typeof res !== "object") return res;
|
|
443
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
444
|
+
}
|
|
445
|
+
return (hint === "string" ? String : Number)(input);
|
|
446
|
+
}
|
|
447
|
+
function _toPropertyKey(arg) {
|
|
448
|
+
var key = _toPrimitive(arg, "string");
|
|
449
|
+
return typeof key === "symbol" ? key : String(key);
|
|
450
|
+
}
|
|
423
451
|
|
|
424
|
-
export { _arrayLikeToArray as arrayLikeToArray, _arrayWithHoles as arrayWithHoles, _arrayWithoutHoles as arrayWithoutHoles, _createForOfIteratorHelper as createForOfIteratorHelper, _defineProperty as defineProperty, _iterableToArray as iterableToArray, _iterableToArrayLimit as iterableToArrayLimit, _nonIterableRest as nonIterableRest, _nonIterableSpread as nonIterableSpread, _regeneratorRuntime as regeneratorRuntime, _slicedToArray as slicedToArray, _toConsumableArray as toConsumableArray, _typeof as typeof, _unsupportedIterableToArray as unsupportedIterableToArray };
|
|
452
|
+
export { _arrayLikeToArray as arrayLikeToArray, _arrayWithHoles as arrayWithHoles, _arrayWithoutHoles as arrayWithoutHoles, _createForOfIteratorHelper as createForOfIteratorHelper, _defineProperty as defineProperty, _iterableToArray as iterableToArray, _iterableToArrayLimit as iterableToArrayLimit, _nonIterableRest as nonIterableRest, _nonIterableSpread as nonIterableSpread, _regeneratorRuntime as regeneratorRuntime, _slicedToArray as slicedToArray, _toConsumableArray as toConsumableArray, _toPrimitive as toPrimitive, _toPropertyKey as toPropertyKey, _typeof as typeof, _unsupportedIterableToArray as unsupportedIterableToArray };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { AnchorHTMLAttributes, HTMLAttributes } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type BreadcrumbProps = HTMLAttributes<HTMLSpanElement> | AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
3
3
|
export declare const Breadcrumb: import("react").ForwardRefExoticComponent<BreadcrumbProps & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseComponentPropsWithChildren } from '../../types';
|
|
2
|
-
export
|
|
2
|
+
export type BreadcrumbsProps = BaseComponentPropsWithChildren<HTMLElement, {
|
|
3
3
|
/** Spesifiserer om versjonen for små skjermer skal vises; den viser `<Breadcrumb />` kun til den forrige siden. */
|
|
4
4
|
smallScreen?: boolean;
|
|
5
5
|
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ButtonAppearance, ButtonPurpose, ButtonSize, IconPosition } from './Button.types';
|
|
2
|
-
|
|
2
|
+
type ButtonWrapperProps = {
|
|
3
3
|
appearance: ButtonAppearance;
|
|
4
4
|
purpose: ButtonPurpose;
|
|
5
5
|
size: ButtonSize;
|
|
@@ -10,7 +10,7 @@ declare type ButtonWrapperProps = {
|
|
|
10
10
|
iconPosition?: IconPosition;
|
|
11
11
|
};
|
|
12
12
|
export declare const ButtonWrapper: import("styled-components").StyledComponent<"button", any, ButtonWrapperProps, never>;
|
|
13
|
-
|
|
13
|
+
type StyledIconWrapperSpanProps = {
|
|
14
14
|
iconPosition?: IconPosition;
|
|
15
15
|
size: ButtonSize;
|
|
16
16
|
absolutePosition?: boolean;
|
|
@@ -18,7 +18,7 @@ declare type StyledIconWrapperSpanProps = {
|
|
|
18
18
|
justIcon?: boolean;
|
|
19
19
|
};
|
|
20
20
|
export declare const StyledIconWrapperSpan: import("styled-components").StyledComponent<"span", any, StyledIconWrapperSpanProps, never>;
|
|
21
|
-
|
|
21
|
+
type LabelProps = {
|
|
22
22
|
isHidden?: boolean;
|
|
23
23
|
};
|
|
24
24
|
export declare const Label: import("styled-components").StyledComponent<"span", any, LabelProps, never>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes } from 'react';
|
|
2
2
|
import { SvgIcon } from '../../icons/utils/propTypes';
|
|
3
3
|
import { BaseComponentProps } from '../../types';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
export
|
|
4
|
+
export type ButtonPurpose = 'primary' | 'secondary' | 'danger';
|
|
5
|
+
export type ButtonSize = 'tiny' | 'small' | 'medium' | 'large';
|
|
6
|
+
export type ButtonAppearance = 'filled' | 'ghost' | 'rounded' | 'borderless';
|
|
7
|
+
export type IconPosition = 'left' | 'right';
|
|
8
|
+
type PickedHTMLAttributes = Pick<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'onFocus' | 'onBlur' | 'type'>;
|
|
9
|
+
export type ButtonProps = BaseComponentProps<HTMLButtonElement, {
|
|
10
10
|
/**Størrelsen på knappen. */
|
|
11
11
|
size?: ButtonSize;
|
|
12
12
|
/**Tekst i knappen. */
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { AnchorHTMLAttributes, RefObject } from 'react';
|
|
2
2
|
import { BaseComponentPropsWithChildren } from '../../types';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
|
|
3
|
+
export type CardColor = 'filledDark' | 'filledLight' | 'strokeDark' | 'strokeLight';
|
|
4
|
+
export type CardType = 'info' | 'navigation' | 'expandable';
|
|
5
|
+
type BaseCardProps<T extends HTMLElement> = BaseComponentPropsWithChildren<T, {
|
|
6
6
|
/** Fargepalett i komponenten. */
|
|
7
7
|
color?: CardColor;
|
|
8
8
|
/** Referanse til komponenten. */
|
|
9
9
|
cardRef?: RefObject<T>;
|
|
10
10
|
}>;
|
|
11
|
-
export
|
|
11
|
+
export type InfoCardProps = BaseCardProps<HTMLDivElement> & {
|
|
12
12
|
/** Spesifiserer funksjonalitet og formål med komponenten. **OBS!** ved `'navigation'` må `href` oppgis. Ved `'expandable'` må alle `<Card />` grupperte sammen ligge egen `<div>` container. */
|
|
13
13
|
cardType: 'info';
|
|
14
14
|
};
|
|
15
|
-
export
|
|
15
|
+
export type NavigationCardProps = BaseCardProps<HTMLAnchorElement> & {
|
|
16
16
|
cardType: 'navigation';
|
|
17
17
|
} & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'target'>;
|
|
18
|
-
export
|
|
18
|
+
export type ExpandableCardProps = BaseCardProps<HTMLDivElement> & {
|
|
19
19
|
cardType: 'expandable';
|
|
20
20
|
};
|
|
21
|
-
export
|
|
21
|
+
export type CardProps = InfoCardProps | NavigationCardProps | ExpandableCardProps;
|
|
22
22
|
export declare const Card: (props: CardProps) => JSX.Element;
|
|
23
23
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseComponentPropsWithChildren } from '../../../types';
|
|
2
|
-
export
|
|
2
|
+
export type CardAccordionProps = BaseComponentPropsWithChildren<HTMLDivElement, {
|
|
3
3
|
/**Spesifiserer om body skal være utvidet ved innlastning. */
|
|
4
4
|
isExpanded?: boolean;
|
|
5
5
|
/**For å lytte til endringer i expanded-state. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Property } from 'csstype';
|
|
2
2
|
import { BaseComponentPropsWithChildren } from '../../../types';
|
|
3
|
-
export
|
|
3
|
+
export type CardAccordionBodyProps = BaseComponentPropsWithChildren<HTMLDivElement, {
|
|
4
4
|
/** **OBS!** denne propen blir satt automatisk av forelder. Forteller komponenten om den skal utvides. */
|
|
5
5
|
isExpanded?: boolean;
|
|
6
6
|
/** **OBS!** denne propen blir satt automatisk av forelder. Forteller `id` til `<CardAccordionHeader />`. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes } from 'react';
|
|
2
2
|
import { BaseComponentPropsWithChildren } from '../../../types';
|
|
3
|
-
export
|
|
3
|
+
export type CardAccordionHeaderProps = BaseComponentPropsWithChildren<HTMLButtonElement, {
|
|
4
4
|
/** **OBS!** denne propen blir satt automatisk av forelder. Forteller body er utvidet. */
|
|
5
5
|
isExpanded?: boolean;
|
|
6
6
|
/** **OBS!** denne propen blir satt automatisk av forelder. Callback for å styre utvidelse og sammentrukking. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InputHTMLAttributes } from 'react';
|
|
2
2
|
import { BaseComponentProps } from '../../types';
|
|
3
3
|
import { CheckboxPickedHTMLAttributes } from '../../types/CheckboxPickedHTMLAttributes';
|
|
4
|
-
export
|
|
4
|
+
export type CheckboxProps = BaseComponentProps<HTMLInputElement, {
|
|
5
5
|
/** Ledetekst for inputelementet. */
|
|
6
6
|
label?: string;
|
|
7
7
|
/**Indikererr ugyldig input, endrer styling. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseComponentPropsWithChildren, Direction } from '../../types';
|
|
2
|
-
export
|
|
2
|
+
export type CheckboxGroupProps = BaseComponentPropsWithChildren<HTMLDivElement, {
|
|
3
3
|
/**Ledetekst for gruppen. */
|
|
4
4
|
label?: string;
|
|
5
5
|
/**Retningen barna gjengis i. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseComponentProps } from '../../types';
|
|
2
|
-
export
|
|
2
|
+
export type ChipProps = BaseComponentProps<HTMLDivElement, {
|
|
3
3
|
/** Teksten som vises i komponenten. */
|
|
4
4
|
text?: string;
|
|
5
5
|
/** Ekstra logikk når `<Chip />` lukkes. */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type ChipGroupProps = HTMLAttributes<HTMLUListElement>;
|
|
3
3
|
export declare const ChipGroup: import("react").ForwardRefExoticComponent<ChipGroupProps & import("react").RefAttributes<HTMLUListElement>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InputProps } from '../../helpers';
|
|
2
|
-
|
|
3
|
-
export
|
|
2
|
+
type DatepickerType = 'date' | 'datetime-local';
|
|
3
|
+
export type DatepickerProps = Omit<InputProps, 'type'> & {
|
|
4
4
|
/** Angi dato-input med eller uten klokkeslett. */
|
|
5
5
|
type?: DatepickerType;
|
|
6
6
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseComponentPropsWithChildren } from '../../types';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type DescriptionListAppearance = 'small' | 'bold';
|
|
3
|
+
export type DescriptionListProps = BaseComponentPropsWithChildren<HTMLDListElement, {
|
|
4
4
|
/**Påvirker tekst styling. */
|
|
5
5
|
appearance?: DescriptionListAppearance;
|
|
6
6
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseComponentPropsWithChildren } from '../../types';
|
|
2
2
|
import { SvgIcon } from '../../icons/utils';
|
|
3
|
-
export
|
|
3
|
+
export type DescriptionListDescProps = BaseComponentPropsWithChildren<HTMLElement, {
|
|
4
4
|
/**Ikon som vises ved siden av teksten. */
|
|
5
5
|
icon?: SvgIcon;
|
|
6
6
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Property } from 'csstype';
|
|
2
2
|
import { BaseComponentPropsWithChildren } from '../../types';
|
|
3
|
-
export
|
|
3
|
+
export type DescriptionListGroupProps = BaseComponentPropsWithChildren<HTMLDivElement, {
|
|
4
4
|
/**Custom margin. */
|
|
5
5
|
margin?: Property.Margin<string>;
|
|
6
6
|
}>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type DescriptionListTermProps = HTMLAttributes<HTMLElement>;
|
|
3
3
|
export declare const DescriptionListTerm: import("react").ForwardRefExoticComponent<DescriptionListTermProps & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseComponentProps } from '../../types';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type DividerColor = 'primary' | 'primaryLighter';
|
|
3
|
+
export type DividerProps = BaseComponentProps<HTMLHRElement, {
|
|
4
4
|
/** Farge på horisontal linje. */
|
|
5
5
|
color?: DividerColor;
|
|
6
6
|
}>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { ReactNode, RefObject } from 'react';
|
|
2
2
|
import { Property } from 'csstype';
|
|
3
3
|
import { BaseComponentPropsWithChildren } from '../../types';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
4
|
+
export type DrawerSize = 'small' | 'large';
|
|
5
|
+
export type DrawerPlacement = 'left' | 'right';
|
|
6
|
+
export type WidthProps = {
|
|
7
7
|
minWidth?: Property.MinWidth<string>;
|
|
8
8
|
maxWidth?: Property.MaxWidth<string>;
|
|
9
9
|
width?: Property.Width<string>;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type DrawerProps = BaseComponentPropsWithChildren<HTMLDivElement, {
|
|
12
12
|
/**Størrelsen på `<Drawer />`. */
|
|
13
13
|
size?: DrawerSize;
|
|
14
14
|
/** Plasseringen til `<Drawer />`. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FileList } from './types';
|
|
2
2
|
import { FileUploaderHookProps } from './useFileUploader';
|
|
3
3
|
import { Property } from 'csstype';
|
|
4
|
-
|
|
4
|
+
type FileUploaderProps = {
|
|
5
5
|
/**Id til filopplasteren. */
|
|
6
6
|
id?: string;
|
|
7
7
|
/**Ledetekst for filopplaster. */
|
|
@@ -14,6 +14,6 @@ declare type FileUploaderProps = {
|
|
|
14
14
|
onChange: (newFiles: FileList) => void;
|
|
15
15
|
/**Bredde for filopplasteren. */
|
|
16
16
|
width?: Property.Width<string>;
|
|
17
|
-
} &
|
|
17
|
+
} & Partial<FileUploaderHookProps>;
|
|
18
18
|
export declare const FileUploader: (props: FileUploaderProps) => JSX.Element;
|
|
19
19
|
export {};
|
|
@@ -7,7 +7,7 @@ declare const _default: {
|
|
|
7
7
|
required?: boolean | undefined;
|
|
8
8
|
onChange: (newFiles: import("./types").FileList) => void;
|
|
9
9
|
width?: import("csstype").Property.Width<string> | undefined;
|
|
10
|
-
} &
|
|
10
|
+
} & Partial<import("./useFileUploader").FileUploaderHookProps>) => JSX.Element;
|
|
11
11
|
argTypes: {
|
|
12
12
|
color: {
|
|
13
13
|
control: {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { FileWithPath } from 'file-selector';
|
|
2
2
|
import { Reducer } from 'react';
|
|
3
|
-
export
|
|
3
|
+
export type FileUploaderFile = {
|
|
4
4
|
file: FileWithPath;
|
|
5
5
|
errors: string[];
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
type FileChangePayload = {
|
|
8
8
|
rootErrors: RootErrorList;
|
|
9
9
|
files: FileUploaderFile[];
|
|
10
10
|
};
|
|
11
|
-
export
|
|
12
|
-
export
|
|
11
|
+
export type RootErrorList = string[];
|
|
12
|
+
export type FileUploaderAction = {
|
|
13
13
|
type: 'focus';
|
|
14
14
|
} | {
|
|
15
15
|
type: 'blur';
|
|
@@ -24,7 +24,7 @@ export declare type FileUploaderAction = {
|
|
|
24
24
|
type: 'onRemoveFile';
|
|
25
25
|
payload: FileChangePayload;
|
|
26
26
|
};
|
|
27
|
-
export
|
|
27
|
+
export type FileUploaderState = {
|
|
28
28
|
files: FileUploaderFile[];
|
|
29
29
|
isFocused: boolean;
|
|
30
30
|
isFileDialogActive: boolean;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export
|
|
9
|
-
export
|
|
1
|
+
type FileExtensionAccept = `.${string}`;
|
|
2
|
+
type AnyMimeType = '*';
|
|
3
|
+
type ImageMimeType = 'png' | 'jpeg' | 'bmp' | 'gif' | 'svg+xml' | 'tiff' | 'webp';
|
|
4
|
+
type VideoMimeType = 'x-msvideo' | 'mp4' | 'mpeg' | 'ogg' | 'mp2t' | 'webm' | '3gpp' | '3gpp2';
|
|
5
|
+
type AudioMimeType = 'aac' | 'midi' | 'x-midi' | 'mpeg' | 'ogg' | 'opus' | 'wav' | 'webm' | '3gpp' | '3gpp2';
|
|
6
|
+
type ApplicationMimeType = 'octet-stream' | 'msword' | 'vnd.openxmlformats-officedocument.wordprocessingml.document' | 'epub+zip' | 'gzip' | 'java-archive' | 'json' | 'vnd.oasis.opendocument.presentation' | 'vnd.oasis.opendocument.spreadsheet' | 'vnd.oasis.opendocument.text' | 'pdf' | 'vnd.ms-powerpoint' | 'vnd.openxmlformats-officedocument.presentationml.presentation' | 'rtf' | 'x-sh' | 'x-tar' | 'vnd.visio' | 'xhtml+xml' | 'vnd.ms-excel' | 'vnd.openxmlformats-officedocument.spreadsheetml.sheet' | 'xml' | 'vnd.mozilla.xul+xml' | 'zip';
|
|
7
|
+
type MimeType = `image/${ImageMimeType | AnyMimeType}` | `video/${VideoMimeType | AnyMimeType}` | `audio/${AudioMimeType | AnyMimeType}` | `application/${ApplicationMimeType}`;
|
|
8
|
+
export type Accept = MimeType | FileExtensionAccept;
|
|
9
|
+
export type FileList = File[];
|
|
10
10
|
export {};
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import React, { ButtonHTMLAttributes, HTMLAttributes, InputHTMLAttributes, Ref } from 'react';
|
|
2
2
|
import { FileUploaderFile } from './fileUploaderReducer';
|
|
3
3
|
import { Accept, FileList } from './types';
|
|
4
|
-
export
|
|
5
|
-
id
|
|
4
|
+
export type FileUploaderHookProps = {
|
|
5
|
+
id: string | undefined;
|
|
6
6
|
/**Dersom komponenten styres utenfra. En liste over filer som skal være med ved første render. */
|
|
7
|
-
initialFiles
|
|
7
|
+
initialFiles: FileList | undefined;
|
|
8
8
|
/**Hvilke filendelser eller mime-typer som filopplasteren skal akseptere. */
|
|
9
|
-
accept
|
|
9
|
+
accept: Accept[] | undefined;
|
|
10
10
|
/**Om filopplasteren er avslått eller ikke */
|
|
11
|
-
disabled
|
|
11
|
+
disabled: boolean | undefined;
|
|
12
12
|
/**Maks antall filer som tillates. */
|
|
13
|
-
maxFiles
|
|
13
|
+
maxFiles: number | undefined;
|
|
14
|
+
/**Feilmelding. Setter også error state. */
|
|
15
|
+
errorMessage: string | undefined;
|
|
14
16
|
};
|
|
15
17
|
export declare const useFileUploader: <TRootElement extends HTMLElement>(props: FileUploaderHookProps) => {
|
|
16
18
|
state: import("./fileUploaderReducer").FileUploaderState;
|