@norges-domstoler/dds-components 5.4.1 → 5.5.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/README.md +8 -1
- package/dist/cjs/components/Breadcrumbs/Breadcrumbs.d.ts +3 -3
- package/dist/cjs/components/Breadcrumbs/Breadcrumbs.stories.d.ts +3 -3
- package/dist/cjs/components/Button/Button.d.ts +3 -3
- package/dist/cjs/components/Button/Button.stories.d.ts +3 -3
- package/dist/cjs/components/Card/CardAccordion/CardAccordion.d.ts +3 -3
- package/dist/cjs/components/Card/CardAccordion/CardAccordionBody.d.ts +3 -3
- package/dist/cjs/components/Card/CardAccordion/CardAccordionHeader.d.ts +3 -3
- package/dist/cjs/components/Checkbox/Checkbox.d.ts +3 -3
- package/dist/cjs/components/Checkbox/Checkbox.stories.d.ts +3 -3
- package/dist/cjs/components/Chip/Chip.d.ts +3 -3
- package/dist/cjs/components/Chip/Chip.stories.d.ts +3 -3
- package/dist/cjs/components/Datepicker/Datepicker.d.ts +2 -2
- package/dist/cjs/components/DescriptionList/DescriptionList.d.ts +3 -3
- package/dist/cjs/components/DescriptionList/DescriptionList.stories.d.ts +3 -3
- package/dist/cjs/components/DescriptionList/DescriptionListDesc.d.ts +3 -3
- package/dist/cjs/components/DescriptionList/DescriptionListGroup.d.ts +3 -3
- package/dist/cjs/components/Divider/Divider.d.ts +3 -3
- package/dist/cjs/components/Divider/Divider.stories.d.ts +3 -3
- package/dist/cjs/components/Drawer/Drawer.d.ts +3 -3
- package/dist/cjs/components/Drawer/Drawer.stories.d.ts +3 -3
- package/dist/cjs/components/GlobalMessage/GlobalMessage.d.ts +3 -3
- package/dist/cjs/components/GlobalMessage/GlobalMessage.stories.d.ts +3 -3
- package/dist/cjs/components/InputMessage/InputMessage.d.ts +3 -3
- package/dist/cjs/components/InputMessage/InputMessage.stories.d.ts +3 -3
- package/dist/cjs/components/InternalHeader/InternalHeader.styles.d.ts +3 -3
- 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/LocalMessage/LocalMessage.d.ts +3 -3
- package/dist/cjs/components/LocalMessage/LocalMessage.stories.d.ts +3 -3
- package/dist/cjs/components/Modal/Modal.d.ts +3 -3
- package/dist/cjs/components/Modal/Modal.stories.d.ts +3 -3
- package/dist/cjs/components/Modal/ModalBody.d.ts +3 -3
- package/dist/cjs/components/OverflowMenu/OverflowMenu.d.ts +3 -3
- package/dist/cjs/components/OverflowMenu/OverflowMenu.stories.d.ts +3 -3
- package/dist/cjs/components/Pagination/Pagination.d.ts +3 -3
- package/dist/cjs/components/Pagination/Pagination.stories.d.ts +3 -3
- package/dist/cjs/components/Popover/Popover.d.ts +3 -3
- package/dist/cjs/components/Popover/Popover.stories.d.ts +3 -3
- package/dist/cjs/components/RadioButton/RadioButton.d.ts +3 -3
- package/dist/cjs/components/RadioButton/RadioButton.stories.d.ts +3 -3
- package/dist/cjs/components/SkipToContent/SkipToContent.d.ts +3 -3
- package/dist/cjs/components/SkipToContent/SkipToContent.stories.d.ts +3 -3
- package/dist/cjs/components/Spinner/Spinner.d.ts +1 -1
- package/dist/cjs/components/Stepper/Stepper.d.ts +3 -3
- package/dist/cjs/components/Stepper/Stepper.stories.d.ts +3 -3
- package/dist/cjs/components/Tabs/Tab.d.ts +3 -3
- package/dist/cjs/components/Tabs/TabPanel.d.ts +3 -3
- package/dist/cjs/components/Tabs/Tabs.d.ts +3 -3
- package/dist/cjs/components/Tag/Tag.d.ts +3 -3
- package/dist/cjs/components/Tag/Tag.stories.d.ts +3 -3
- package/dist/cjs/components/ToggleBar/ToggleRadio.d.ts +4 -4
- package/dist/cjs/components/ToggleButton/ToggleButton.d.ts +3 -3
- package/dist/cjs/components/ToggleButton/ToggleButton.stories.d.ts +3 -3
- package/dist/cjs/components/Tooltip/Tooltip.d.ts +4 -4
- package/dist/cjs/components/Tooltip/Tooltip.stories.d.ts +3 -3
- package/dist/cjs/components/Typography/Caption/Caption.d.ts +10 -0
- package/dist/cjs/components/Typography/Caption/Caption.stories.d.ts +28 -0
- package/dist/cjs/components/Typography/Caption/index.d.ts +1 -0
- package/dist/cjs/components/Typography/Heading/Heading.d.ts +21 -0
- package/dist/cjs/components/Typography/Heading/Heading.stories.d.ts +37 -0
- package/dist/cjs/components/Typography/Heading/index.d.ts +1 -0
- package/dist/cjs/components/Typography/Label/Label.d.ts +13 -0
- package/dist/cjs/components/Typography/Label/Label.stories.d.ts +30 -0
- package/dist/cjs/components/Typography/Label/index.d.ts +1 -0
- package/dist/cjs/components/Typography/Legend/Legend.d.ts +10 -0
- package/dist/cjs/components/Typography/Legend/Legend.stories.d.ts +28 -0
- package/dist/cjs/components/Typography/Legend/index.d.ts +1 -0
- package/dist/cjs/components/Typography/Link/Link.d.ts +23 -0
- package/dist/cjs/components/Typography/Link/Link.stories.d.ts +47 -0
- package/dist/cjs/components/Typography/Link/index.d.ts +1 -0
- package/dist/cjs/components/Typography/Paragraph/Paragraph.d.ts +16 -0
- package/dist/cjs/components/Typography/Paragraph/Paragraph.stories.d.ts +35 -0
- package/dist/cjs/components/Typography/Paragraph/index.d.ts +1 -0
- package/dist/cjs/components/Typography/Typography/Typography.d.ts +25 -0
- package/dist/{components → cjs/components/Typography}/Typography/Typography.stories.d.ts +2 -1
- package/dist/cjs/components/Typography/Typography/Typography.types.d.ts +37 -0
- package/dist/cjs/components/Typography/Typography/index.d.ts +2 -0
- package/dist/cjs/components/Typography/Typography.tokens.d.ts +401 -100
- package/dist/cjs/components/Typography/Typography.utils.d.ts +9 -0
- package/dist/cjs/components/Typography/index.d.ts +6 -1
- package/dist/cjs/components/Typography/stories/Examples.stories.d.ts +5 -0
- package/dist/cjs/components/Typography/stories/TypographyComponents.stories.d.ts +42 -0
- package/dist/cjs/components/Typography/{Body.stories.d.ts → stories/TypographyTypes.stories.d.ts} +1 -1
- package/dist/cjs/index.js +741 -688
- package/dist/cjs/types/BaseComponentProps.d.ts +2 -2
- package/dist/cjs/utils/color.d.ts +24 -0
- package/dist/components/Breadcrumbs/Breadcrumb.js +2 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +3 -3
- package/dist/components/Breadcrumbs/Breadcrumbs.js +3 -2
- package/dist/components/Breadcrumbs/Breadcrumbs.stories.d.ts +3 -3
- package/dist/components/Button/Button.d.ts +3 -3
- package/dist/components/Button/Button.js +2 -2
- package/dist/components/Button/Button.stories.d.ts +3 -3
- package/dist/components/Button/Button.styles.js +6 -3
- package/dist/components/Button/Button.tokens.js +6 -0
- package/dist/components/Card/Card.js +6 -2
- package/dist/components/Card/Card.tokens.js +5 -1
- package/dist/components/Card/CardAccordion/CardAccordion.d.ts +3 -3
- package/dist/components/Card/CardAccordion/CardAccordionBody.d.ts +3 -3
- package/dist/components/Card/CardAccordion/CardAccordionHeader.d.ts +3 -3
- package/dist/components/Card/CardAccordion/CardAccordionHeader.js +11 -0
- package/dist/components/Checkbox/Checkbox.d.ts +3 -3
- package/dist/components/Checkbox/Checkbox.js +10 -2
- package/dist/components/Checkbox/Checkbox.stories.d.ts +3 -3
- package/dist/components/Checkbox/Checkbox.styles.js +5 -1
- package/dist/components/Checkbox/Checkbox.tokens.js +4 -1
- package/dist/components/Checkbox/CheckboxGroup.js +12 -4
- package/dist/components/Chip/Chip.d.ts +3 -3
- package/dist/components/Chip/Chip.js +2 -1
- package/dist/components/Chip/Chip.stories.d.ts +3 -3
- package/dist/components/Datepicker/Datepicker.d.ts +2 -2
- package/dist/components/Datepicker/Datepicker.js +16 -6
- package/dist/components/DescriptionList/DescriptionList.d.ts +3 -3
- package/dist/components/DescriptionList/DescriptionList.js +7 -3
- package/dist/components/DescriptionList/DescriptionList.stories.d.ts +3 -3
- package/dist/components/DescriptionList/DescriptionListDesc.d.ts +3 -3
- package/dist/components/DescriptionList/DescriptionListDesc.js +1 -1
- package/dist/components/DescriptionList/DescriptionListGroup.d.ts +3 -3
- package/dist/components/Divider/Divider.d.ts +3 -3
- package/dist/components/Divider/Divider.js +1 -1
- package/dist/components/Divider/Divider.stories.d.ts +3 -3
- package/dist/components/Drawer/Drawer.d.ts +3 -3
- package/dist/components/Drawer/Drawer.js +25 -9
- package/dist/components/Drawer/Drawer.stories.d.ts +3 -3
- package/dist/components/GlobalMessage/GlobalMessage.d.ts +3 -3
- package/dist/components/GlobalMessage/GlobalMessage.js +5 -3
- package/dist/components/GlobalMessage/GlobalMessage.stories.d.ts +3 -3
- package/dist/components/GlobalMessage/GlobalMessage.tokens.js +4 -1
- package/dist/components/InputMessage/InputMessage.d.ts +3 -3
- package/dist/components/InputMessage/InputMessage.js +5 -3
- package/dist/components/InputMessage/InputMessage.stories.d.ts +3 -3
- package/dist/components/InternalHeader/InternalHeader.js +5 -3
- package/dist/components/InternalHeader/InternalHeader.styles.d.ts +3 -3
- package/dist/components/InternalHeader/InternalHeader.styles.js +8 -2
- package/dist/components/InternalHeader/NavigationItem.js +5 -1
- package/dist/components/List/List.d.ts +3 -3
- package/dist/components/List/List.js +6 -2
- package/dist/components/List/List.stories.d.ts +3 -3
- package/dist/components/LocalMessage/LocalMessage.d.ts +3 -3
- package/dist/components/LocalMessage/LocalMessage.js +10 -4
- package/dist/components/LocalMessage/LocalMessage.stories.d.ts +3 -3
- package/dist/components/LocalMessage/LocalMessage.tokens.js +5 -2
- package/dist/components/Modal/Modal.d.ts +3 -3
- package/dist/components/Modal/Modal.js +23 -9
- package/dist/components/Modal/Modal.stories.d.ts +3 -3
- package/dist/components/Modal/Modal.tokens.js +5 -0
- package/dist/components/Modal/ModalBody.d.ts +3 -3
- package/dist/components/Modal/ModalBody.js +3 -1
- package/dist/components/OverflowMenu/OverflowMenu.d.ts +3 -3
- package/dist/components/OverflowMenu/OverflowMenu.js +17 -9
- package/dist/components/OverflowMenu/OverflowMenu.stories.d.ts +3 -3
- package/dist/components/OverflowMenu/OverflowMenuItem.js +8 -2
- package/dist/components/Pagination/Pagination.d.ts +3 -3
- package/dist/components/Pagination/Pagination.js +9 -7
- package/dist/components/Pagination/Pagination.stories.d.ts +3 -3
- package/dist/components/Popover/Popover.d.ts +3 -3
- package/dist/components/Popover/Popover.js +12 -4
- package/dist/components/Popover/Popover.stories.d.ts +3 -3
- package/dist/components/Popover/PopoverGroup.js +3 -1
- package/dist/components/RadioButton/RadioButton.d.ts +3 -3
- package/dist/components/RadioButton/RadioButton.js +9 -2
- package/dist/components/RadioButton/RadioButton.stories.d.ts +3 -3
- package/dist/components/RadioButton/RadioButton.styles.js +4 -0
- package/dist/components/RadioButton/RadioButton.tokens.js +4 -1
- package/dist/components/RadioButton/RadioButtonGroup.js +12 -4
- package/dist/components/ScrollableContainer/ScrollableContainer.js +5 -1
- package/dist/components/ScrollableContainer/Scrollbar.js +1 -1
- package/dist/components/Search/Search.js +12 -4
- package/dist/components/Select/Select.js +13 -5
- package/dist/components/Select/Select.styles.js +14 -5
- package/dist/components/Select/Select.tokens.js +4 -0
- package/dist/components/SkipToContent/SkipToContent.d.ts +3 -3
- package/dist/components/SkipToContent/SkipToContent.js +4 -0
- package/dist/components/SkipToContent/SkipToContent.stories.d.ts +3 -3
- package/dist/components/SkipToContent/SkipToContent.tokens.js +5 -0
- package/dist/components/Spinner/Spinner.d.ts +1 -1
- package/dist/components/Spinner/Spinner.js +1 -1
- package/dist/components/Stepper/Step.js +6 -2
- package/dist/components/Stepper/Stepper.d.ts +3 -3
- package/dist/components/Stepper/Stepper.js +1 -1
- package/dist/components/Stepper/Stepper.stories.d.ts +3 -3
- package/dist/components/Table/Cell.tokens.js +5 -0
- package/dist/components/Table/Row.tokens.js +5 -0
- package/dist/components/Table/SortCell.js +10 -4
- package/dist/components/Table/Table.js +9 -3
- package/dist/components/Table/TableWrapper.js +2 -0
- package/dist/components/Tabs/Tab.d.ts +3 -3
- package/dist/components/Tabs/Tab.js +9 -3
- package/dist/components/Tabs/TabList.js +8 -4
- package/dist/components/Tabs/TabPanel.d.ts +3 -3
- package/dist/components/Tabs/TabPanel.js +5 -1
- package/dist/components/Tabs/TabPanels.js +3 -1
- package/dist/components/Tabs/Tabs.d.ts +3 -3
- package/dist/components/Tabs/Tabs.js +1 -1
- package/dist/components/Tabs/Tabs.tokens.js +6 -1
- package/dist/components/Tag/Tag.d.ts +3 -3
- package/dist/components/Tag/Tag.js +2 -1
- package/dist/components/Tag/Tag.stories.d.ts +3 -3
- package/dist/components/TextInput/CharCounter.js +3 -2
- package/dist/components/TextInput/TextInput.js +9 -3
- package/dist/components/TextInput/TextInput.styles.js +9 -1
- package/dist/components/ToggleBar/ToggleBar.js +10 -4
- package/dist/components/ToggleBar/ToggleBar.tokens.js +1 -0
- package/dist/components/ToggleBar/ToggleRadio.d.ts +4 -4
- package/dist/components/ToggleBar/ToggleRadio.js +8 -2
- package/dist/components/ToggleBar/ToggleRadio.styles.js +11 -0
- package/dist/components/ToggleButton/ToggleButton.d.ts +3 -3
- package/dist/components/ToggleButton/ToggleButton.js +14 -5
- package/dist/components/ToggleButton/ToggleButton.stories.d.ts +3 -3
- package/dist/components/ToggleButton/ToggleButton.tokens.js +6 -1
- package/dist/components/ToggleButton/ToggleButtonGroup.js +3 -2
- package/dist/components/Tooltip/Tooltip.d.ts +4 -4
- package/dist/components/Tooltip/Tooltip.js +6 -4
- package/dist/components/Tooltip/Tooltip.stories.d.ts +3 -3
- package/dist/components/Tooltip/Tooltip.styles.js +7 -3
- package/dist/components/Typography/Caption/Caption.d.ts +10 -0
- package/dist/components/Typography/Caption/Caption.js +23 -0
- package/dist/components/Typography/Caption/Caption.stories.d.ts +28 -0
- package/dist/components/Typography/Caption/index.d.ts +1 -0
- package/dist/components/Typography/Heading/Heading.d.ts +21 -0
- package/dist/components/Typography/Heading/Heading.js +56 -0
- package/dist/components/Typography/Heading/Heading.stories.d.ts +37 -0
- package/dist/components/Typography/Heading/index.d.ts +1 -0
- package/dist/components/Typography/Label/Label.d.ts +13 -0
- package/dist/components/Typography/Label/Label.js +22 -0
- package/dist/components/Typography/Label/Label.stories.d.ts +30 -0
- package/dist/components/Typography/Label/index.d.ts +1 -0
- package/dist/components/Typography/Legend/Legend.d.ts +10 -0
- package/dist/components/Typography/Legend/Legend.js +23 -0
- package/dist/components/Typography/Legend/Legend.stories.d.ts +28 -0
- package/dist/components/Typography/Legend/index.d.ts +1 -0
- package/dist/components/Typography/Link/Link.d.ts +23 -0
- package/dist/components/Typography/Link/Link.js +45 -0
- package/dist/components/Typography/Link/Link.stories.d.ts +47 -0
- package/dist/components/Typography/Link/index.d.ts +1 -0
- package/dist/components/Typography/Paragraph/Paragraph.d.ts +16 -0
- package/dist/components/Typography/Paragraph/Paragraph.js +25 -0
- package/dist/components/Typography/Paragraph/Paragraph.stories.d.ts +35 -0
- package/dist/components/Typography/Paragraph/index.d.ts +1 -0
- package/dist/components/Typography/Typography/Typography.d.ts +25 -0
- package/dist/components/Typography/Typography/Typography.js +101 -0
- package/dist/{cjs/components → components/Typography}/Typography/Typography.stories.d.ts +2 -1
- package/dist/components/Typography/Typography/Typography.types.d.ts +37 -0
- package/dist/components/Typography/Typography/index.d.ts +2 -0
- package/dist/components/Typography/Typography.tokens.d.ts +401 -100
- package/dist/components/Typography/Typography.tokens.js +354 -482
- package/dist/components/Typography/Typography.utils.d.ts +9 -0
- package/dist/components/Typography/Typography.utils.js +75 -0
- package/dist/components/Typography/index.d.ts +6 -1
- package/dist/components/Typography/stories/Examples.stories.d.ts +5 -0
- package/dist/components/Typography/stories/TypographyComponents.stories.d.ts +42 -0
- package/dist/components/Typography/{Body.stories.d.ts → stories/TypographyTypes.stories.d.ts} +1 -1
- package/dist/helpers/Input/Input.styles.js +11 -3
- package/dist/helpers/Input/Input.tokens.js +4 -1
- package/dist/helpers/Paper/Paper.js +6 -2
- package/dist/hooks/useScreenSize.js +17 -0
- package/dist/index.js +7 -1
- package/dist/types/BaseComponentProps.d.ts +2 -2
- package/dist/utils/color.d.ts +24 -0
- package/dist/utils/color.js +31 -1
- package/package.json +3 -3
- package/dist/cjs/components/Typography/Examples.stories.d.ts +0 -7
- package/dist/cjs/components/Typography/Typography.d.ts +0 -49
- package/dist/cjs/components/Typography/Typography.types.d.ts +0 -13
- package/dist/components/Typography/Examples.stories.d.ts +0 -7
- package/dist/components/Typography/Typography.d.ts +0 -49
- package/dist/components/Typography/Typography.js +0 -172
- package/dist/components/Typography/Typography.types.d.ts +0 -13
|
@@ -4,11 +4,11 @@ export declare type DescriptionListGroupProps = BaseComponentPropsWithChildren<H
|
|
|
4
4
|
/**Custom margin. */
|
|
5
5
|
margin?: Property.Margin<string>;
|
|
6
6
|
}>;
|
|
7
|
-
export declare const DescriptionListGroup: import("react").ForwardRefExoticComponent<{
|
|
8
|
-
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
9
|
-
} & Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
|
|
7
|
+
export declare const DescriptionListGroup: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
|
|
10
8
|
/**Custom margin. */
|
|
11
9
|
margin?: Property.Margin<string> | undefined;
|
|
12
10
|
} & {
|
|
13
11
|
children?: import("react").ReactNode;
|
|
12
|
+
} & {
|
|
13
|
+
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
14
14
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -4,9 +4,9 @@ export declare type DividerProps = BaseComponentProps<HTMLHRElement, {
|
|
|
4
4
|
/** Farge på horisontal linje. */
|
|
5
5
|
color?: DividerColor;
|
|
6
6
|
}>;
|
|
7
|
-
export declare const Divider: import("react").ForwardRefExoticComponent<{
|
|
8
|
-
htmlProps?: import("react").HTMLAttributes<HTMLHRElement> | undefined;
|
|
9
|
-
} & Pick<import("react").HTMLAttributes<HTMLHRElement>, "id" | "className"> & {
|
|
7
|
+
export declare const Divider: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLHRElement>, "id" | "className"> & {
|
|
10
8
|
/** Farge på horisontal linje. */
|
|
11
9
|
color?: DividerColor | undefined;
|
|
10
|
+
} & {
|
|
11
|
+
htmlProps?: import("react").HTMLAttributes<HTMLHRElement> | undefined;
|
|
12
12
|
} & import("react").RefAttributes<HTMLHRElement>>;
|
|
@@ -2,8 +2,8 @@ import { __rest } from 'tslib';
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import styled, { css } from 'styled-components';
|
|
5
|
-
import { dividerTokens, dividerColors } from './Divider.tokens.js';
|
|
6
5
|
import { getBaseHTMLProps } from '../../types/BaseComponentProps.js';
|
|
6
|
+
import { dividerTokens, dividerColors } from './Divider.tokens.js';
|
|
7
7
|
|
|
8
8
|
var DividerLine = styled.hr.withConfig({
|
|
9
9
|
displayName: "Divider__DividerLine",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { DividerProps } from '.';
|
|
2
2
|
declare const _default: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: import("react").ForwardRefExoticComponent<{
|
|
5
|
-
htmlProps?: import("react").HTMLAttributes<HTMLHRElement> | undefined;
|
|
6
|
-
} & Pick<import("react").HTMLAttributes<HTMLHRElement>, "id" | "className"> & {
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLHRElement>, "id" | "className"> & {
|
|
7
5
|
color?: import("./Divider").DividerColor | undefined;
|
|
6
|
+
} & {
|
|
7
|
+
htmlProps?: import("react").HTMLAttributes<HTMLHRElement> | undefined;
|
|
8
8
|
} & import("react").RefAttributes<HTMLHRElement>>;
|
|
9
9
|
argTypes: {};
|
|
10
10
|
};
|
|
@@ -26,9 +26,7 @@ export declare type DrawerProps = BaseComponentPropsWithChildren<HTMLDivElement,
|
|
|
26
26
|
/**Ref til elementet som åpner `<Drawer />`. **OBS!** nødvendig kun hvis `<DrawerGroup />` ikke er i bruk. */
|
|
27
27
|
triggerRef?: RefObject<HTMLElement>;
|
|
28
28
|
}>;
|
|
29
|
-
export declare const Drawer: import("react").ForwardRefExoticComponent<{
|
|
30
|
-
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
31
|
-
} & Pick<import("react").HTMLAttributes<HTMLDivElement>, "className" | "id"> & {
|
|
29
|
+
export declare const Drawer: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLDivElement>, "className" | "id"> & {
|
|
32
30
|
/**Størrelsen på `<Drawer />`. */
|
|
33
31
|
size?: DrawerSize | undefined;
|
|
34
32
|
/** Plasseringen til `<Drawer />`. */
|
|
@@ -47,4 +45,6 @@ export declare const Drawer: import("react").ForwardRefExoticComponent<{
|
|
|
47
45
|
triggerRef?: RefObject<HTMLElement> | undefined;
|
|
48
46
|
} & {
|
|
49
47
|
children?: ReactNode;
|
|
48
|
+
} & {
|
|
49
|
+
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
50
50
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -3,19 +3,35 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { forwardRef, useId } from 'react';
|
|
4
4
|
import { createPortal } from 'react-dom';
|
|
5
5
|
import styled, { css } from 'styled-components';
|
|
6
|
-
import { drawerTokens } from './Drawer.tokens.js';
|
|
7
|
-
import { Paper } from '../../helpers/Paper/Paper.js';
|
|
8
|
-
import { useMountTransition } from '../../hooks/useMountTransition.js';
|
|
9
|
-
import { focusVisible } from '../../helpers/styling/focusVisible.js';
|
|
10
6
|
import { Button } from '../Button/Button.js';
|
|
11
|
-
import {
|
|
7
|
+
import { Typography } from '../Typography/Typography/Typography.js';
|
|
8
|
+
import { getBaseHTMLProps } from '../../types/BaseComponentProps.js';
|
|
9
|
+
import '../Typography/Link/Link.js';
|
|
12
10
|
import { useCombinedRef } from '../../hooks/useCombinedRefs.js';
|
|
13
|
-
import { useOnKeyDown } from '../../hooks/useOnKeyDown.js';
|
|
14
11
|
import { useOnClickOutside } from '../../hooks/useOnClickOutside.js';
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
12
|
+
import { useOnKeyDown } from '../../hooks/useOnKeyDown.js';
|
|
13
|
+
import '../../hooks/useFloatPosition.js';
|
|
14
|
+
import { useFocusTrap } from '../../hooks/useFocusTrap.js';
|
|
15
|
+
import { useMountTransition } from '../../hooks/useMountTransition.js';
|
|
16
|
+
import '../../hooks/useScreenSize.js';
|
|
17
|
+
import { drawerTokens } from './Drawer.tokens.js';
|
|
18
|
+
import { focusVisible } from '../../helpers/styling/focusVisible.js';
|
|
19
|
+
import '../../helpers/styling/hover.js';
|
|
20
|
+
import '../../helpers/styling/focus.js';
|
|
21
|
+
import '../../helpers/styling/danger.js';
|
|
22
|
+
import '../../helpers/styling/selection.js';
|
|
23
|
+
import '../../helpers/Backdrop/Backdrop.js';
|
|
24
|
+
import '../../helpers/Chevron/AnimatedChevronUpDown.styles.js';
|
|
25
|
+
import '../../helpers/HiddenInput/HiddenInput.js';
|
|
26
|
+
import '../../helpers/Input/Input.styles.js';
|
|
27
|
+
import '../../helpers/Input/Input.tokens.js';
|
|
28
|
+
import { Paper } from '../../helpers/Paper/Paper.js';
|
|
29
|
+
import '../../helpers/RequiredMarker/RequiredMarker.js';
|
|
30
|
+
import '../../icons/utils/StyledSvg.js';
|
|
18
31
|
import { CloseIcon } from '../../icons/tsx/close.js';
|
|
32
|
+
import '../ScrollableContainer/Scrollbar.js';
|
|
33
|
+
import { ScrollableContainer } from '../ScrollableContainer/ScrollableContainer.js';
|
|
34
|
+
import '../ScrollableContainer/ScrollableContainer.tokens.js';
|
|
19
35
|
|
|
20
36
|
var Container = styled(Paper).withConfig({
|
|
21
37
|
displayName: "Drawer__Container",
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { DrawerProps } from '.';
|
|
2
2
|
declare const _default: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: import("react").ForwardRefExoticComponent<{
|
|
5
|
-
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
6
|
-
} & Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
|
|
7
5
|
size?: import("./Drawer").DrawerSize | undefined;
|
|
8
6
|
placement?: import("./Drawer").DrawerPlacement | undefined;
|
|
9
7
|
header?: import("react").ReactNode;
|
|
@@ -14,6 +12,8 @@ declare const _default: {
|
|
|
14
12
|
triggerRef?: import("react").RefObject<HTMLElement> | undefined;
|
|
15
13
|
} & {
|
|
16
14
|
children?: import("react").ReactNode;
|
|
15
|
+
} & {
|
|
16
|
+
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
17
17
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
18
|
};
|
|
19
19
|
export default _default;
|
|
@@ -10,9 +10,7 @@ export declare type GlobalMessageProps = BaseComponentPropsWithChildren<HTMLDivE
|
|
|
10
10
|
/**Ekstra logikk å kjøre når meldingen lukkes. */
|
|
11
11
|
onClose?: () => void;
|
|
12
12
|
}>;
|
|
13
|
-
export declare const GlobalMessage: import("react").ForwardRefExoticComponent<{
|
|
14
|
-
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
15
|
-
} & Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
|
|
13
|
+
export declare const GlobalMessage: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
|
|
16
14
|
/**Meldingen som vises til brukeren. Brukes kun når meldingen er en `string`. */
|
|
17
15
|
message?: string | undefined;
|
|
18
16
|
/**Formålet med meldingen. Påvirker styling. */
|
|
@@ -23,4 +21,6 @@ export declare const GlobalMessage: import("react").ForwardRefExoticComponent<{
|
|
|
23
21
|
onClose?: (() => void) | undefined;
|
|
24
22
|
} & {
|
|
25
23
|
children?: import("react").ReactNode;
|
|
24
|
+
} & {
|
|
25
|
+
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
26
26
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -2,13 +2,15 @@ import { slicedToArray as _slicedToArray } from '../../_virtual/_rollupPluginBab
|
|
|
2
2
|
import { __rest } from 'tslib';
|
|
3
3
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
4
|
import styled, { css } from 'styled-components';
|
|
5
|
+
import { Button } from '../Button/Button.js';
|
|
5
6
|
import { forwardRef, useState } from 'react';
|
|
6
7
|
import { globalMessageTokens } from './GlobalMessage.tokens.js';
|
|
7
|
-
import { Button } from '../Button/Button.js';
|
|
8
|
-
import { CloseIcon } from '../../icons/tsx/close.js';
|
|
9
8
|
import { Icon } from '../Icon/Icon.js';
|
|
9
|
+
import { Typography } from '../Typography/Typography/Typography.js';
|
|
10
10
|
import { getBaseHTMLProps } from '../../types/BaseComponentProps.js';
|
|
11
|
-
import
|
|
11
|
+
import '../Typography/Link/Link.js';
|
|
12
|
+
import '../../icons/utils/StyledSvg.js';
|
|
13
|
+
import { CloseIcon } from '../../icons/tsx/close.js';
|
|
12
14
|
|
|
13
15
|
var Container = styled.div.withConfig({
|
|
14
16
|
displayName: "GlobalMessage__Container",
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { GlobalMessageProps } from './GlobalMessage';
|
|
2
2
|
declare const _default: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: import("react").ForwardRefExoticComponent<{
|
|
5
|
-
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
6
|
-
} & Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
|
|
7
5
|
message?: string | undefined;
|
|
8
6
|
purpose?: import("./GlobalMessage").GlobalMessagePurpose | undefined;
|
|
9
7
|
closable?: boolean | undefined;
|
|
10
8
|
onClose?: (() => void) | undefined;
|
|
11
9
|
} & {
|
|
12
10
|
children?: import("react").ReactNode;
|
|
11
|
+
} & {
|
|
12
|
+
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
13
13
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
14
14
|
argTypes: {
|
|
15
15
|
message: {
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { ddsBaseTokens } from '@norges-domstoler/dds-design-tokens';
|
|
2
|
+
import 'tslib';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
import '../../icons/utils/StyledSvg.js';
|
|
5
|
+
import { ErrorIcon } from '../../icons/tsx/error.js';
|
|
2
6
|
import { InfoIcon } from '../../icons/tsx/info.js';
|
|
3
7
|
import { WarningIcon } from '../../icons/tsx/warning.js';
|
|
4
|
-
import { ErrorIcon } from '../../icons/tsx/error.js';
|
|
5
8
|
|
|
6
9
|
var Colors = ddsBaseTokens.colors,
|
|
7
10
|
Spacing = ddsBaseTokens.spacing,
|
|
@@ -6,11 +6,11 @@ export declare type InputMessageProps = BaseComponentProps<HTMLDivElement, {
|
|
|
6
6
|
/** Formålet med meldingen. Påvirker styling. */
|
|
7
7
|
messageType: InputMessageType;
|
|
8
8
|
}>;
|
|
9
|
-
export declare const InputMessage: import("react").ForwardRefExoticComponent<{
|
|
10
|
-
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
11
|
-
} & Pick<import("react").HTMLAttributes<HTMLDivElement>, "className" | "id"> & {
|
|
9
|
+
export declare const InputMessage: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLDivElement>, "className" | "id"> & {
|
|
12
10
|
/** Meldingen som vises til brukeren. */
|
|
13
11
|
message: string;
|
|
14
12
|
/** Formålet med meldingen. Påvirker styling. */
|
|
15
13
|
messageType: InputMessageType;
|
|
14
|
+
} & {
|
|
15
|
+
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
16
16
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { __rest } from 'tslib';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import styled, { css } from 'styled-components';
|
|
4
|
+
import { Icon } from '../Icon/Icon.js';
|
|
4
5
|
import { inputMessageTokens } from './InputMessage.tokens.js';
|
|
6
|
+
import { Typography } from '../Typography/Typography/Typography.js';
|
|
5
7
|
import { forwardRef } from 'react';
|
|
6
|
-
import { ErrorIcon } from '../../icons/tsx/error.js';
|
|
7
8
|
import { getBaseHTMLProps } from '../../types/BaseComponentProps.js';
|
|
8
|
-
import
|
|
9
|
-
import
|
|
9
|
+
import '../Typography/Link/Link.js';
|
|
10
|
+
import '../../icons/utils/StyledSvg.js';
|
|
11
|
+
import { ErrorIcon } from '../../icons/tsx/error.js';
|
|
10
12
|
|
|
11
13
|
var InputMessageWrapper = styled.div.withConfig({
|
|
12
14
|
displayName: "InputMessage__InputMessageWrapper",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { InputMessageProps } from '.';
|
|
2
2
|
declare const _default: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: import("react").ForwardRefExoticComponent<{
|
|
5
|
-
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
6
|
-
} & Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
|
|
7
5
|
message: string;
|
|
8
6
|
messageType: import("./InputMessage").InputMessageType;
|
|
7
|
+
} & {
|
|
8
|
+
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
9
9
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
10
|
argTypes: {
|
|
11
11
|
message: {
|
|
@@ -2,14 +2,16 @@ import { slicedToArray as _slicedToArray } from '../../_virtual/_rollupPluginBab
|
|
|
2
2
|
import { __rest } from 'tslib';
|
|
3
3
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
4
|
import { useState, useRef } from 'react';
|
|
5
|
+
import { Typography } from '../Typography/Typography/Typography.js';
|
|
6
|
+
import { getBaseHTMLProps } from '../../types/BaseComponentProps.js';
|
|
7
|
+
import '../Typography/Link/Link.js';
|
|
8
|
+
import { Button } from '../Button/Button.js';
|
|
5
9
|
import { Navigation, NavigationList, OuterContainer, BannerWrapper, BannerLeftWrapper, LovisaWrapper, ApplicationNameWrapper, ContextMenuGroup, StyledOverflowMenu } from './InternalHeader.styles.js';
|
|
6
10
|
import { NavigationItem } from './NavigationItem.js';
|
|
7
11
|
import { InternalHeaderListItem } from './InternalHeaderListItem.js';
|
|
12
|
+
import '../../icons/utils/StyledSvg.js';
|
|
8
13
|
import { MenuIcon } from '../../icons/tsx/menu.js';
|
|
9
14
|
import { MoreVerticalIcon } from '../../icons/tsx/moreVertical.js';
|
|
10
|
-
import { getBaseHTMLProps } from '../../types/BaseComponentProps.js';
|
|
11
|
-
import { Typography } from '../Typography/Typography.js';
|
|
12
|
-
import { Button } from '../Button/Button.js';
|
|
13
15
|
|
|
14
16
|
var InternalHeader = function InternalHeader(props) {
|
|
15
17
|
var applicationDesc = props.applicationDesc,
|
|
@@ -11,9 +11,7 @@ export declare const Navigation: import("styled-components").StyledComponent<"na
|
|
|
11
11
|
declare type NavListProps = Pick<InternalHeaderProps, 'smallScreen'>;
|
|
12
12
|
export declare const NavigationList: import("styled-components").StyledComponent<"ul", any, NavListProps, never>;
|
|
13
13
|
export declare const ContextMenuGroup: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
14
|
-
export declare const StyledOverflowMenu: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<{
|
|
15
|
-
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
16
|
-
} & Pick<import("react").HTMLAttributes<HTMLDivElement>, "className" | "id"> & {
|
|
14
|
+
export declare const StyledOverflowMenu: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLDivElement>, "className" | "id"> & {
|
|
17
15
|
items?: import("../OverflowMenu").OverflowMenuContextItem[] | undefined;
|
|
18
16
|
userProps?: ({
|
|
19
17
|
name: string;
|
|
@@ -25,5 +23,7 @@ export declare const StyledOverflowMenu: import("styled-components").StyledCompo
|
|
|
25
23
|
anchorRef?: import("react").RefObject<HTMLButtonElement> | undefined;
|
|
26
24
|
placement?: import("../../hooks").Placement | undefined;
|
|
27
25
|
offset?: number | undefined;
|
|
26
|
+
} & {
|
|
27
|
+
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
28
28
|
} & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
29
29
|
export {};
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import { typographyTokens } from '../Typography/Typography.tokens.js';
|
|
2
1
|
import styled, { css } from 'styled-components';
|
|
3
2
|
import { internalHeaderTokens } from './InternalHeader.tokens.js';
|
|
4
3
|
import { OverflowMenu } from '../OverflowMenu/OverflowMenu.js';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import 'react';
|
|
6
|
+
import '../../helpers/styling/focusVisible.js';
|
|
7
|
+
import '../../helpers/styling/hover.js';
|
|
8
|
+
import '../../helpers/styling/focus.js';
|
|
9
|
+
import '../../helpers/styling/danger.js';
|
|
10
|
+
import { selection } from '../../helpers/styling/selection.js';
|
|
5
11
|
|
|
6
12
|
var outerContainer = internalHeaderTokens.outerContainer,
|
|
7
13
|
applicationNameWrapper = internalHeaderTokens.applicationNameWrapper,
|
|
@@ -12,7 +18,7 @@ var outerContainer = internalHeaderTokens.outerContainer,
|
|
|
12
18
|
var OuterContainer = styled.div.withConfig({
|
|
13
19
|
displayName: "InternalHeaderstyles__OuterContainer",
|
|
14
20
|
componentId: "sc-91bnca-0"
|
|
15
|
-
})(["position:relative;*::selection{", "}background-color:", ";"],
|
|
21
|
+
})(["position:relative;*::selection{", "}background-color:", ";"], selection, outerContainer.backgroundColor);
|
|
16
22
|
var BannerWrapper = styled.div.withConfig({
|
|
17
23
|
displayName: "InternalHeaderstyles__BannerWrapper",
|
|
18
24
|
componentId: "sc-91bnca-1"
|
|
@@ -2,8 +2,12 @@ import { __rest } from 'tslib';
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import styled, { css } from 'styled-components';
|
|
5
|
-
import { internalHeaderTokens } from './InternalHeader.tokens.js';
|
|
6
5
|
import { focusVisible } from '../../helpers/styling/focusVisible.js';
|
|
6
|
+
import '../../helpers/styling/hover.js';
|
|
7
|
+
import '../../helpers/styling/focus.js';
|
|
8
|
+
import '../../helpers/styling/danger.js';
|
|
9
|
+
import '../../helpers/styling/selection.js';
|
|
10
|
+
import { internalHeaderTokens } from './InternalHeader.tokens.js';
|
|
7
11
|
|
|
8
12
|
var navLink = internalHeaderTokens.navLink;
|
|
9
13
|
var Link = styled.a.withConfig({
|
|
@@ -8,13 +8,13 @@ export declare type ListProps = BaseComponentPropsWithChildren<HTMLUListElement
|
|
|
8
8
|
/**Spesifiserer typografi for listen. Komponenten arver i utgangspunktet fra forelder, men hvis forelder stiller ikke med relevant styling må det velges `TypographyBodyType` som brukes i `<body>` ellers på siden. */
|
|
9
9
|
typographyType?: ListTypographyType;
|
|
10
10
|
}>;
|
|
11
|
-
export declare const List: import("react").ForwardRefExoticComponent<{
|
|
12
|
-
htmlProps?: import("react").HTMLAttributes<HTMLUListElement | HTMLOListElement> | undefined;
|
|
13
|
-
} & Pick<import("react").HTMLAttributes<HTMLUListElement | HTMLOListElement>, "id" | "className"> & {
|
|
11
|
+
export declare const List: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLUListElement | HTMLOListElement>, "id" | "className"> & {
|
|
14
12
|
/**Spesifiserer om komponenten skal returnere `<ul />` (punktliste) eller `<ol />` (nummerert liste). */
|
|
15
13
|
listType?: ListType | undefined;
|
|
16
14
|
/**Spesifiserer typografi for listen. Komponenten arver i utgangspunktet fra forelder, men hvis forelder stiller ikke med relevant styling må det velges `TypographyBodyType` som brukes i `<body>` ellers på siden. */
|
|
17
15
|
typographyType?: ListTypographyType | undefined;
|
|
18
16
|
} & {
|
|
19
17
|
children?: import("react").ReactNode;
|
|
18
|
+
} & {
|
|
19
|
+
htmlProps?: import("react").HTMLAttributes<HTMLUListElement | HTMLOListElement> | undefined;
|
|
20
20
|
} & import("react").RefAttributes<HTMLUListElement | HTMLOListElement>>;
|
|
@@ -5,17 +5,21 @@ import styled, { css } from 'styled-components';
|
|
|
5
5
|
import bullet from '../../assets/svg/bullets/jordskifterett_bullet1.svg.js';
|
|
6
6
|
import bulletLvl2 from '../../assets/svg/bullets/lagmannsrett_bullet2.svg.js';
|
|
7
7
|
import bulletLvl3 from '../../assets/svg/bullets/tingrett_bullet3.svg.js';
|
|
8
|
-
import { typographyTokens } from '../Typography/Typography.tokens.js';
|
|
9
8
|
import { listItemTokens } from './ListItem.tokens.js';
|
|
10
9
|
import { listTokens } from './List.tokens.js';
|
|
11
10
|
import { getBaseHTMLProps } from '../../types/BaseComponentProps.js';
|
|
11
|
+
import '../../helpers/styling/focusVisible.js';
|
|
12
|
+
import '../../helpers/styling/hover.js';
|
|
13
|
+
import '../../helpers/styling/focus.js';
|
|
14
|
+
import '../../helpers/styling/danger.js';
|
|
15
|
+
import { selection } from '../../helpers/styling/selection.js';
|
|
12
16
|
|
|
13
17
|
var liTextPadding = "1em + ".concat(listItemTokens.bulletSpacing);
|
|
14
18
|
var ulPaddingLeft = "".concat(listTokens.spaceLeft, " - (").concat(liTextPadding, ")");
|
|
15
19
|
var StyledList = styled.ul.withConfig({
|
|
16
20
|
displayName: "List__StyledList",
|
|
17
21
|
componentId: "sc-1f1c7eb-0"
|
|
18
|
-
})(["", " ul,ol{margin:0;}*::selection{", "}", " ", ""], listTokens.base,
|
|
22
|
+
})(["", " ul,ol{margin:0;}*::selection{", "}", " ", ""], listTokens.base, selection, function (_ref) {
|
|
19
23
|
var typographyType = _ref.typographyType;
|
|
20
24
|
return typographyType && css(["", " ul,ol{", "}"], listTokens.sizes[typographyType], listTokens.sizes[typographyType]);
|
|
21
25
|
}, function (_ref2) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ListProps } from '.';
|
|
2
2
|
declare const _default: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: import("react").ForwardRefExoticComponent<{
|
|
5
|
-
htmlProps?: import("react").HTMLAttributes<HTMLOListElement | HTMLUListElement> | undefined;
|
|
6
|
-
} & Pick<import("react").HTMLAttributes<HTMLOListElement | HTMLUListElement>, "id" | "className"> & {
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLOListElement | HTMLUListElement>, "id" | "className"> & {
|
|
7
5
|
listType?: import("./List").ListType | undefined;
|
|
8
6
|
typographyType?: import("./List").ListTypographyType | undefined;
|
|
9
7
|
} & {
|
|
10
8
|
children?: import("react").ReactNode;
|
|
9
|
+
} & {
|
|
10
|
+
htmlProps?: import("react").HTMLAttributes<HTMLOListElement | HTMLUListElement> | undefined;
|
|
11
11
|
} & import("react").RefAttributes<HTMLOListElement | HTMLUListElement>>;
|
|
12
12
|
};
|
|
13
13
|
export default _default;
|
|
@@ -16,9 +16,7 @@ export declare type LocalMessageProps = BaseComponentPropsWithChildren<HTMLDivEl
|
|
|
16
16
|
/**Custom bredde ved behov. */
|
|
17
17
|
width?: Property.Width<string>;
|
|
18
18
|
}>;
|
|
19
|
-
export declare const LocalMessage: import("react").ForwardRefExoticComponent<{
|
|
20
|
-
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
21
|
-
} & Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
|
|
19
|
+
export declare const LocalMessage: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
|
|
22
20
|
/**Meldingen som vises til brukeren. Brukes kun når meldingen er string. */
|
|
23
21
|
message?: string | undefined;
|
|
24
22
|
/**Formålet med meldingen. Påvirker styling. */
|
|
@@ -33,4 +31,6 @@ export declare const LocalMessage: import("react").ForwardRefExoticComponent<{
|
|
|
33
31
|
width?: Property.Width<string> | undefined;
|
|
34
32
|
} & {
|
|
35
33
|
children?: import("react").ReactNode;
|
|
34
|
+
} & {
|
|
35
|
+
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
36
36
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -2,14 +2,20 @@ import { slicedToArray as _slicedToArray } from '../../_virtual/_rollupPluginBab
|
|
|
2
2
|
import { __rest } from 'tslib';
|
|
3
3
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
4
|
import styled, { css } from 'styled-components';
|
|
5
|
+
import { Button } from '../Button/Button.js';
|
|
5
6
|
import { forwardRef, useState } from 'react';
|
|
6
7
|
import { localMessageTokens } from './LocalMessage.tokens.js';
|
|
7
|
-
import { typographyTokens } from '../Typography/Typography.tokens.js';
|
|
8
8
|
import { Icon } from '../Icon/Icon.js';
|
|
9
|
+
import { Typography } from '../Typography/Typography/Typography.js';
|
|
9
10
|
import { getBaseHTMLProps } from '../../types/BaseComponentProps.js';
|
|
10
|
-
import
|
|
11
|
-
import
|
|
11
|
+
import '../Typography/Link/Link.js';
|
|
12
|
+
import '../../icons/utils/StyledSvg.js';
|
|
12
13
|
import { CloseIcon } from '../../icons/tsx/close.js';
|
|
14
|
+
import '../../helpers/styling/focusVisible.js';
|
|
15
|
+
import '../../helpers/styling/hover.js';
|
|
16
|
+
import '../../helpers/styling/focus.js';
|
|
17
|
+
import '../../helpers/styling/danger.js';
|
|
18
|
+
import { selection } from '../../helpers/styling/selection.js';
|
|
13
19
|
|
|
14
20
|
var Container = styled.div.withConfig({
|
|
15
21
|
displayName: "LocalMessage__Container",
|
|
@@ -20,7 +26,7 @@ var Container = styled.div.withConfig({
|
|
|
20
26
|
}, function (_ref2) {
|
|
21
27
|
var layout = _ref2.layout;
|
|
22
28
|
return layout === 'horisontal' && css(["align-items:center;justify-content:space-between;"]);
|
|
23
|
-
},
|
|
29
|
+
}, selection, function (_ref3) {
|
|
24
30
|
var purpose = _ref3.purpose;
|
|
25
31
|
return purpose && css(["", " ", ""], localMessageTokens.container.base, localMessageTokens.container[purpose].base);
|
|
26
32
|
}, function (_ref4) {
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { LocalMessageProps } from './LocalMessage';
|
|
2
2
|
declare const _default: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: import("react").ForwardRefExoticComponent<{
|
|
5
|
-
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
6
|
-
} & Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
|
|
7
5
|
message?: string | undefined;
|
|
8
6
|
purpose?: import("./LocalMessage").LocalMessagePurpose | undefined;
|
|
9
7
|
closable?: boolean | undefined;
|
|
@@ -12,6 +10,8 @@ declare const _default: {
|
|
|
12
10
|
width?: import("csstype").Property.Width<string> | undefined;
|
|
13
11
|
} & {
|
|
14
12
|
children?: import("react").ReactNode;
|
|
13
|
+
} & {
|
|
14
|
+
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
15
15
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
16
16
|
argTypes: {
|
|
17
17
|
message: {
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { ddsBaseTokens } from '@norges-domstoler/dds-design-tokens';
|
|
2
|
+
import 'tslib';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
import '../../icons/utils/StyledSvg.js';
|
|
2
5
|
import { CheckCircledIcon } from '../../icons/tsx/checkCircled.js';
|
|
3
|
-
import { TipIcon } from '../../icons/tsx/tip.js';
|
|
4
|
-
import { InfoIcon } from '../../icons/tsx/info.js';
|
|
5
6
|
import { ErrorIcon } from '../../icons/tsx/error.js';
|
|
7
|
+
import { InfoIcon } from '../../icons/tsx/info.js';
|
|
8
|
+
import { TipIcon } from '../../icons/tsx/tip.js';
|
|
6
9
|
import { WarningIcon } from '../../icons/tsx/warning.js';
|
|
7
10
|
|
|
8
11
|
var Colors = ddsBaseTokens.colors,
|
|
@@ -12,9 +12,7 @@ export declare type ModalProps = BaseComponentPropsWithChildren<HTMLDivElement,
|
|
|
12
12
|
/**Ref som brukes til returnering av fokus. */
|
|
13
13
|
triggerRef?: RefObject<HTMLElement>;
|
|
14
14
|
}>;
|
|
15
|
-
export declare const Modal: import("react").ForwardRefExoticComponent<{
|
|
16
|
-
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
17
|
-
} & Pick<import("react").HTMLAttributes<HTMLDivElement>, "className" | "id"> & {
|
|
15
|
+
export declare const Modal: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLDivElement>, "className" | "id"> & {
|
|
18
16
|
/**Spesifiserer om modal skal vises. */
|
|
19
17
|
isOpen?: boolean | undefined;
|
|
20
18
|
/**Funksjon kjørt ved lukking; Settes hvis modal skal være lukkbar. Legger en lukkeknapp i hjørnet og kjøres ved Esc-trykk, lukkeknappklikk og museklikk utenfor. */
|
|
@@ -27,4 +25,6 @@ export declare const Modal: import("react").ForwardRefExoticComponent<{
|
|
|
27
25
|
triggerRef?: RefObject<HTMLElement> | undefined;
|
|
28
26
|
} & {
|
|
29
27
|
children?: ReactNode;
|
|
28
|
+
} & {
|
|
29
|
+
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
30
30
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -2,25 +2,39 @@ import { __rest } from 'tslib';
|
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { forwardRef, useId, useEffect } from 'react';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
|
-
import { modalTokens } from './Modal.tokens.js';
|
|
6
|
-
import { createPortal } from 'react-dom';
|
|
7
|
-
import { useMountTransition } from '../../hooks/useMountTransition.js';
|
|
8
|
-
import { typographyTokens } from '../Typography/Typography.tokens.js';
|
|
9
|
-
import { useFocusTrap } from '../../hooks/useFocusTrap.js';
|
|
10
|
-
import { handleElementWithBackdropMount, handleElementWithBackdropUnmount } from '../../helpers/Backdrop/Backdrop.utils.js';
|
|
11
|
-
import { Backdrop } from '../../helpers/Backdrop/Backdrop.js';
|
|
12
5
|
import { Button } from '../Button/Button.js';
|
|
6
|
+
import { modalTokens } from './Modal.tokens.js';
|
|
13
7
|
import { useCombinedRef } from '../../hooks/useCombinedRefs.js';
|
|
14
8
|
import { useOnClickOutside } from '../../hooks/useOnClickOutside.js';
|
|
15
9
|
import { useOnKeyDown } from '../../hooks/useOnKeyDown.js';
|
|
10
|
+
import '../../hooks/useFloatPosition.js';
|
|
11
|
+
import { useFocusTrap } from '../../hooks/useFocusTrap.js';
|
|
12
|
+
import { useMountTransition } from '../../hooks/useMountTransition.js';
|
|
13
|
+
import '../../hooks/useScreenSize.js';
|
|
14
|
+
import { createPortal } from 'react-dom';
|
|
15
|
+
import { Typography } from '../Typography/Typography/Typography.js';
|
|
16
16
|
import { getBaseHTMLProps } from '../../types/BaseComponentProps.js';
|
|
17
|
-
import
|
|
17
|
+
import '../Typography/Link/Link.js';
|
|
18
|
+
import { Backdrop } from '../../helpers/Backdrop/Backdrop.js';
|
|
19
|
+
import { handleElementWithBackdropMount, handleElementWithBackdropUnmount } from '../../helpers/Backdrop/Backdrop.utils.js';
|
|
20
|
+
import '../../helpers/Chevron/AnimatedChevronUpDown.styles.js';
|
|
21
|
+
import '../../helpers/HiddenInput/HiddenInput.js';
|
|
22
|
+
import '../../helpers/Input/Input.styles.js';
|
|
23
|
+
import '../../helpers/Input/Input.tokens.js';
|
|
24
|
+
import '../../helpers/Paper/Paper.js';
|
|
25
|
+
import '../../helpers/RequiredMarker/RequiredMarker.js';
|
|
26
|
+
import '../../icons/utils/StyledSvg.js';
|
|
18
27
|
import { CloseIcon } from '../../icons/tsx/close.js';
|
|
28
|
+
import '../../helpers/styling/focusVisible.js';
|
|
29
|
+
import '../../helpers/styling/hover.js';
|
|
30
|
+
import '../../helpers/styling/focus.js';
|
|
31
|
+
import '../../helpers/styling/danger.js';
|
|
32
|
+
import { selection } from '../../helpers/styling/selection.js';
|
|
19
33
|
|
|
20
34
|
var Container = styled.div.withConfig({
|
|
21
35
|
displayName: "Modal__Container",
|
|
22
36
|
componentId: "sc-12c14zx-0"
|
|
23
|
-
})(["display:flex;flex-direction:column-reverse;box-sizing:border-box;margin:0;min-width:200px;&::selection,*::selection{", "}", " :focus-visible,&.focus-visible{", "}"],
|
|
37
|
+
})(["display:flex;flex-direction:column-reverse;box-sizing:border-box;margin:0;min-width:200px;&::selection,*::selection{", "}", " :focus-visible,&.focus-visible{", "}"], selection, modalTokens.base, modalTokens.focus.base);
|
|
24
38
|
var ContentContainer = styled.div.withConfig({
|
|
25
39
|
displayName: "Modal__ContentContainer",
|
|
26
40
|
componentId: "sc-12c14zx-1"
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { ModalProps } from '.';
|
|
2
2
|
declare const _default: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: import("react").ForwardRefExoticComponent<{
|
|
5
|
-
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
6
|
-
} & Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
|
|
7
5
|
isOpen?: boolean | undefined;
|
|
8
6
|
onClose?: (() => void) | undefined;
|
|
9
7
|
parentElement?: HTMLElement | undefined;
|
|
@@ -11,6 +9,8 @@ declare const _default: {
|
|
|
11
9
|
triggerRef?: import("react").RefObject<HTMLElement> | undefined;
|
|
12
10
|
} & {
|
|
13
11
|
children?: import("react").ReactNode;
|
|
12
|
+
} & {
|
|
13
|
+
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
14
14
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
15
15
|
argTypes: {
|
|
16
16
|
header: {
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { ddsBaseTokens } from '@norges-domstoler/dds-design-tokens';
|
|
2
|
+
import 'styled-components';
|
|
2
3
|
import { focusVisible } from '../../helpers/styling/focusVisible.js';
|
|
4
|
+
import '../../helpers/styling/hover.js';
|
|
5
|
+
import '../../helpers/styling/focus.js';
|
|
6
|
+
import '../../helpers/styling/danger.js';
|
|
7
|
+
import '../../helpers/styling/selection.js';
|
|
3
8
|
|
|
4
9
|
var BorderRadius = ddsBaseTokens.borderRadius,
|
|
5
10
|
Colors = ddsBaseTokens.colors,
|
|
@@ -6,13 +6,13 @@ export declare type ModalBodyProps = BaseComponentPropsWithChildren<HTMLDivEleme
|
|
|
6
6
|
/**Høyde på container. */
|
|
7
7
|
height?: Property.Height;
|
|
8
8
|
}>;
|
|
9
|
-
export declare const ModalBody: import("react").ForwardRefExoticComponent<{
|
|
10
|
-
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
11
|
-
} & Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
|
|
9
|
+
export declare const ModalBody: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
|
|
12
10
|
/**Gjør at innholdet kan scrolles. Det må eventuelt settes (max)bredde og (max)høyde styling på både denne subkomponenten og `<Modal />`. */
|
|
13
11
|
scrollable?: boolean | undefined;
|
|
14
12
|
/**Høyde på container. */
|
|
15
13
|
height?: Property.Height<0 | (string & {})> | undefined;
|
|
16
14
|
} & {
|
|
17
15
|
children?: import("react").ReactNode;
|
|
16
|
+
} & {
|
|
17
|
+
htmlProps?: import("react").HTMLAttributes<HTMLDivElement> | undefined;
|
|
18
18
|
} & import("react").RefAttributes<HTMLDivElement>>;
|