@norges-domstoler/dds-components 9.2.0-beta.0 → 9.2.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 +2 -1
- package/dist/assets/svg/bullets/jordskifterett_bullet1.svg.js +2 -2
- package/dist/cjs/components/Breadcrumbs/Breadcrumb.tokens.d.ts +2 -8
- package/dist/cjs/components/Button/Button.stories.d.ts +4 -4
- package/dist/cjs/components/Button/Button.styles.d.ts +1 -0
- package/dist/cjs/components/Button/Button.tokens.d.ts +294 -165
- package/dist/cjs/components/Card/Card.tokens.d.ts +17 -16
- package/dist/cjs/components/Card/CardAccordion/CardAccordion.tokens.d.ts +28 -0
- package/dist/cjs/components/Checkbox/Checkbox.stories.d.ts +2 -2
- package/dist/cjs/components/Checkbox/CheckboxGroup.d.ts +1 -3
- package/dist/cjs/components/Chip/Chip.tokens.d.ts +8 -6
- package/dist/cjs/components/DescriptionList/DescriptionList.tokens.d.ts +6 -36
- package/dist/cjs/components/Divider/Divider.tokens.d.ts +11 -6
- package/dist/cjs/components/Drawer/Drawer.tokens.d.ts +3 -11
- package/dist/cjs/components/GlobalMessage/GlobalMessage.tokens.d.ts +24 -22
- package/dist/cjs/components/Grid/Grid.d.ts +8 -7
- package/dist/cjs/components/Grid/Grid.tokens.d.ts +5 -5
- package/dist/cjs/components/InternalHeader/InternalHeader.styles.d.ts +3 -2
- package/dist/cjs/components/InternalHeader/InternalHeader.tokens.d.ts +4 -9
- package/dist/cjs/components/List/List.d.ts +1 -1
- package/dist/cjs/components/List/List.tokens.d.ts +21 -9
- package/dist/cjs/components/LocalMessage/LocalMessage.tokens.d.ts +49 -53
- package/dist/cjs/components/Modal/Modal.tokens.d.ts +5 -6
- package/dist/cjs/components/OverflowMenu/OverflowMenu.d.ts +4 -3
- package/dist/cjs/components/OverflowMenu/OverflowMenu.stories.d.ts +4 -3
- package/dist/cjs/components/OverflowMenu/OverflowMenu.tokens.d.ts +2 -8
- package/dist/cjs/components/OverflowMenu/OverflowMenu.types.d.ts +8 -6
- package/dist/cjs/components/Pagination/Pagination.tokens.d.ts +7 -8
- package/dist/cjs/components/Popover/Popover.tokens.d.ts +0 -1
- package/dist/cjs/components/ProgressTracker/ProgressTracker.tokens.d.ts +9 -6
- package/dist/cjs/components/RadioButton/RadioButton.stories.d.ts +4 -4
- package/dist/cjs/components/RadioButton/RadioButtonGroup.d.ts +2 -4
- package/dist/cjs/components/RadioButton/RadioButtonGroup.stories.d.ts +1 -1
- package/dist/cjs/components/Search/Search.tokens.d.ts +5 -24
- package/dist/cjs/components/Select/Select.tokens.d.ts +14 -127
- package/dist/cjs/components/SkipToContent/SkipToContent.d.ts +2 -2
- package/dist/cjs/components/SkipToContent/SkipToContent.stories.d.ts +1 -1
- package/dist/cjs/components/SkipToContent/SkipToContent.tokens.d.ts +5 -10
- package/dist/cjs/components/SplitButton/SplitButton.d.ts +11 -0
- package/dist/cjs/components/SplitButton/SplitButton.stories.d.ts +9 -0
- package/dist/cjs/components/SplitButton/index.d.ts +1 -0
- package/dist/cjs/components/Table/Table.tokens.d.ts +0 -19
- package/dist/cjs/components/Tabs/Tabs.tokens.d.ts +21 -22
- package/dist/cjs/components/Tag/Tag.d.ts +1 -1
- package/dist/cjs/components/Tag/Tag.tokens.d.ts +19 -14
- package/dist/cjs/components/TextInput/TextInput.tokens.d.ts +0 -3
- package/dist/cjs/components/ToggleBar/ToggleBar.tokens.d.ts +5 -32
- package/dist/cjs/components/ToggleButton/ToggleButton.stories.d.ts +2 -2
- package/dist/cjs/components/ToggleButton/ToggleButton.tokens.d.ts +23 -13
- package/dist/cjs/components/Tooltip/Tooltip.stories.d.ts +2 -2
- package/dist/cjs/components/Tooltip/Tooltip.styles.d.ts +4 -1
- package/dist/cjs/components/Tooltip/Tooltip.tokens.d.ts +1 -2
- package/dist/cjs/components/Typography/Typography.utils.d.ts +195 -1
- package/dist/cjs/helpers/Input/Input.tokens.d.ts +2 -68
- package/dist/cjs/helpers/Input/Input.types.d.ts +4 -0
- package/dist/cjs/helpers/SelectionControl/SelectionControl.styles.d.ts +5 -0
- package/dist/cjs/helpers/SelectionControl/SelectionControl.tokens.d.ts +11 -0
- package/dist/cjs/helpers/TextOverflowEllipsis/TextOverflowEllipsis.d.ts +2 -0
- package/dist/cjs/helpers/TextOverflowEllipsis/index.d.ts +1 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +1475 -1823
- package/dist/cjs/utils/color.d.ts +1 -1
- package/dist/components/Breadcrumbs/Breadcrumb.tokens.d.ts +2 -8
- package/dist/components/Breadcrumbs/Breadcrumb.tokens.js +3 -4
- package/dist/components/Breadcrumbs/Breadcrumbs.js +3 -2
- package/dist/components/Button/Button.js +7 -4
- package/dist/components/Button/Button.stories.d.ts +4 -4
- package/dist/components/Button/Button.styles.d.ts +1 -0
- package/dist/components/Button/Button.styles.js +49 -24
- package/dist/components/Button/Button.tokens.d.ts +294 -165
- package/dist/components/Button/Button.tokens.js +232 -349
- package/dist/components/Card/Card.js +6 -5
- package/dist/components/Card/Card.tokens.d.ts +17 -16
- package/dist/components/Card/Card.tokens.js +26 -54
- package/dist/components/Card/CardAccordion/CardAccordion.tokens.d.ts +28 -0
- package/dist/components/Card/CardAccordion/CardAccordion.tokens.js +37 -0
- package/dist/components/Card/CardAccordion/CardAccordionBody.js +4 -3
- package/dist/components/Card/CardAccordion/CardAccordionHeader.js +9 -6
- package/dist/components/Checkbox/Checkbox.stories.d.ts +2 -2
- package/dist/components/Checkbox/CheckboxGroup.d.ts +1 -3
- package/dist/components/Checkbox/CheckboxGroup.js +3 -16
- package/dist/components/Chip/Chip.js +9 -9
- package/dist/components/Chip/Chip.tokens.d.ts +8 -6
- package/dist/components/Chip/Chip.tokens.js +8 -25
- package/dist/components/Chip/ChipGroup.js +1 -1
- package/dist/components/DescriptionList/DescriptionList.js +3 -2
- package/dist/components/DescriptionList/DescriptionList.tokens.d.ts +6 -36
- package/dist/components/DescriptionList/DescriptionList.tokens.js +7 -18
- package/dist/components/DescriptionList/DescriptionListDesc.js +3 -2
- package/dist/components/Divider/Divider.js +6 -6
- package/dist/components/Divider/Divider.tokens.d.ts +11 -6
- package/dist/components/Divider/Divider.tokens.js +16 -16
- package/dist/components/Drawer/Drawer.js +11 -4
- package/dist/components/Drawer/Drawer.tokens.d.ts +3 -11
- package/dist/components/Drawer/Drawer.tokens.js +10 -26
- package/dist/components/GlobalMessage/GlobalMessage.js +13 -10
- package/dist/components/GlobalMessage/GlobalMessage.tokens.d.ts +24 -22
- package/dist/components/GlobalMessage/GlobalMessage.tokens.js +45 -64
- package/dist/components/Grid/Grid.d.ts +8 -7
- package/dist/components/Grid/Grid.js +7 -5
- package/dist/components/Grid/Grid.tokens.d.ts +5 -5
- package/dist/components/Grid/Grid.tokens.js +5 -5
- package/dist/components/InternalHeader/InternalHeader.styles.d.ts +3 -2
- package/dist/components/InternalHeader/InternalHeader.tokens.d.ts +4 -9
- package/dist/components/InternalHeader/InternalHeader.tokens.js +6 -6
- package/dist/components/InternalHeader/NavigationItem.js +3 -2
- package/dist/components/List/List.d.ts +1 -1
- package/dist/components/List/List.js +8 -7
- package/dist/components/List/List.tokens.d.ts +21 -9
- package/dist/components/List/List.tokens.js +26 -20
- package/dist/components/List/ListItem.js +2 -2
- package/dist/components/LocalMessage/LocalMessage.js +19 -15
- package/dist/components/LocalMessage/LocalMessage.tokens.d.ts +49 -53
- package/dist/components/LocalMessage/LocalMessage.tokens.js +94 -127
- package/dist/components/Modal/Modal.js +9 -5
- package/dist/components/Modal/Modal.tokens.d.ts +5 -6
- package/dist/components/Modal/Modal.tokens.js +11 -31
- package/dist/components/Modal/ModalActions.js +1 -1
- package/dist/components/OverflowMenu/OverflowMenu.d.ts +4 -3
- package/dist/components/OverflowMenu/OverflowMenu.js +12 -3
- package/dist/components/OverflowMenu/OverflowMenu.stories.d.ts +4 -3
- package/dist/components/OverflowMenu/OverflowMenu.tokens.d.ts +2 -8
- package/dist/components/OverflowMenu/OverflowMenu.tokens.js +5 -5
- package/dist/components/OverflowMenu/OverflowMenu.types.d.ts +8 -6
- package/dist/components/OverflowMenu/OverflowMenuGroup.js +1 -0
- package/dist/components/OverflowMenu/OverflowMenuItem.js +3 -2
- package/dist/components/Pagination/Pagination.js +13 -8
- package/dist/components/Pagination/Pagination.tokens.d.ts +7 -8
- package/dist/components/Pagination/Pagination.tokens.js +17 -16
- package/dist/components/Popover/Popover.tokens.d.ts +0 -1
- package/dist/components/Popover/Popover.tokens.js +0 -1
- package/dist/components/ProgressTracker/ProgressTracker.tokens.d.ts +9 -6
- package/dist/components/ProgressTracker/ProgressTracker.tokens.js +11 -9
- package/dist/components/ProgressTracker/ProgressTrackerItem.js +7 -6
- package/dist/components/RadioButton/RadioButton.stories.d.ts +4 -4
- package/dist/components/RadioButton/RadioButtonGroup.d.ts +2 -4
- package/dist/components/RadioButton/RadioButtonGroup.js +3 -15
- package/dist/components/RadioButton/RadioButtonGroup.stories.d.ts +1 -1
- package/dist/components/Search/Search.js +3 -2
- package/dist/components/Search/Search.tokens.d.ts +5 -24
- package/dist/components/Search/Search.tokens.js +6 -5
- package/dist/components/Select/Select.js +5 -4
- package/dist/components/Select/Select.styles.js +13 -14
- package/dist/components/Select/Select.tokens.d.ts +14 -127
- package/dist/components/Select/Select.tokens.js +28 -36
- package/dist/components/SkipToContent/SkipToContent.d.ts +2 -2
- package/dist/components/SkipToContent/SkipToContent.js +7 -4
- package/dist/components/SkipToContent/SkipToContent.stories.d.ts +1 -1
- package/dist/components/SkipToContent/SkipToContent.tokens.d.ts +5 -10
- package/dist/components/SkipToContent/SkipToContent.tokens.js +14 -37
- package/dist/components/Spinner/Spinner.js +1 -2
- package/dist/components/SplitButton/SplitButton.d.ts +11 -0
- package/dist/components/SplitButton/SplitButton.js +62 -0
- package/dist/components/SplitButton/SplitButton.stories.d.ts +9 -0
- package/dist/components/SplitButton/index.d.ts +1 -0
- package/dist/components/Table/Row.js +2 -1
- package/dist/components/Table/Table.tokens.d.ts +0 -19
- package/dist/components/Table/Table.tokens.js +1 -8
- package/dist/components/Tabs/Tab.js +8 -5
- package/dist/components/Tabs/TabPanel.js +4 -3
- package/dist/components/Tabs/Tabs.tokens.d.ts +21 -22
- package/dist/components/Tabs/Tabs.tokens.js +31 -79
- package/dist/components/Tag/Tag.d.ts +1 -1
- package/dist/components/Tag/Tag.js +8 -21
- package/dist/components/Tag/Tag.tokens.d.ts +19 -14
- package/dist/components/Tag/Tag.tokens.js +14 -41
- package/dist/components/TextArea/TextArea.js +3 -2
- package/dist/components/TextInput/TextInput.tokens.d.ts +0 -3
- package/dist/components/TextInput/TextInput.tokens.js +0 -3
- package/dist/components/ToggleBar/ToggleBar.tokens.d.ts +5 -32
- package/dist/components/ToggleBar/ToggleBar.tokens.js +7 -5
- package/dist/components/ToggleBar/ToggleRadio.styles.js +3 -2
- package/dist/components/ToggleButton/ToggleButton.js +14 -8
- package/dist/components/ToggleButton/ToggleButton.stories.d.ts +2 -2
- package/dist/components/ToggleButton/ToggleButton.tokens.d.ts +23 -13
- package/dist/components/ToggleButton/ToggleButton.tokens.js +26 -49
- package/dist/components/ToggleButton/ToggleButtonGroup.js +2 -2
- package/dist/components/Tooltip/Tooltip.js +6 -2
- package/dist/components/Tooltip/Tooltip.stories.d.ts +2 -2
- package/dist/components/Tooltip/Tooltip.styles.d.ts +4 -1
- package/dist/components/Tooltip/Tooltip.styles.js +15 -4
- package/dist/components/Tooltip/Tooltip.tokens.d.ts +1 -2
- package/dist/components/Tooltip/Tooltip.tokens.js +14 -24
- package/dist/components/Typography/Typography.utils.d.ts +195 -1
- package/dist/components/Typography/Typography.utils.js +7 -1
- package/dist/helpers/Input/Input.styles.js +3 -2
- package/dist/helpers/Input/Input.tokens.d.ts +2 -68
- package/dist/helpers/Input/Input.tokens.js +10 -46
- package/dist/helpers/Input/Input.types.d.ts +4 -0
- package/dist/helpers/SelectionControl/SelectionControl.styles.d.ts +5 -0
- package/dist/helpers/SelectionControl/SelectionControl.styles.js +15 -2
- package/dist/helpers/SelectionControl/SelectionControl.tokens.d.ts +11 -0
- package/dist/helpers/SelectionControl/SelectionControl.tokens.js +14 -1
- package/dist/helpers/TextOverflowEllipsis/TextOverflowEllipsis.d.ts +2 -0
- package/dist/helpers/TextOverflowEllipsis/TextOverflowEllipsis.js +12 -0
- package/dist/helpers/TextOverflowEllipsis/index.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/utils/color.d.ts +1 -1
- package/package.json +1 -1
- package/dist/cjs/components/Card/CardAccordion/CardAccordionBody.tokens.d.ts +0 -4
- package/dist/cjs/components/Card/CardAccordion/CardAccordionHeader.tokens.d.ts +0 -17
- package/dist/cjs/components/List/ListItem.tokens.d.ts +0 -5
- package/dist/cjs/components/RadioButton/RadioButtonGroup.tokens.d.ts +0 -19
- package/dist/cjs/components/Spinner/Spinner.tokens.d.ts +0 -6
- package/dist/components/Card/CardAccordion/CardAccordionBody.tokens.d.ts +0 -4
- package/dist/components/Card/CardAccordion/CardAccordionBody.tokens.js +0 -12
- package/dist/components/Card/CardAccordion/CardAccordionHeader.tokens.d.ts +0 -17
- package/dist/components/Card/CardAccordion/CardAccordionHeader.tokens.js +0 -38
- package/dist/components/Checkbox/CheckboxGroup.tokens.js +0 -20
- package/dist/components/List/ListItem.tokens.d.ts +0 -5
- package/dist/components/List/ListItem.tokens.js +0 -12
- package/dist/components/RadioButton/RadioButtonGroup.tokens.d.ts +0 -19
- package/dist/components/RadioButton/RadioButtonGroup.tokens.js +0 -32
- package/dist/components/Spinner/Spinner.tokens.d.ts +0 -6
- package/dist/components/Spinner/Spinner.tokens.js +0 -13
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InputTypographyTypes } from './Input.types';
|
|
2
|
+
export declare const inputTypographyTypes: InputTypographyTypes;
|
|
2
3
|
export declare const inputTokens: {
|
|
3
4
|
input: {
|
|
4
5
|
base: {
|
|
@@ -19,83 +20,16 @@ export declare const inputTokens: {
|
|
|
19
20
|
sizes: {
|
|
20
21
|
medium: {
|
|
21
22
|
padding: string;
|
|
22
|
-
font: {
|
|
23
|
-
lineHeight: any;
|
|
24
|
-
fontSize: string;
|
|
25
|
-
letterSpacing: any;
|
|
26
|
-
fontFamily: any;
|
|
27
|
-
fontWeight: any;
|
|
28
|
-
fontStyle: any;
|
|
29
|
-
};
|
|
30
23
|
};
|
|
31
24
|
small: {
|
|
32
25
|
padding: string;
|
|
33
|
-
font: {
|
|
34
|
-
lineHeight: any;
|
|
35
|
-
fontSize: string;
|
|
36
|
-
letterSpacing: any;
|
|
37
|
-
fontFamily: any;
|
|
38
|
-
fontWeight: any;
|
|
39
|
-
fontStyle: any;
|
|
40
|
-
};
|
|
41
26
|
};
|
|
42
27
|
tiny: {
|
|
43
28
|
padding: string;
|
|
44
|
-
font: {
|
|
45
|
-
lineHeight: any;
|
|
46
|
-
fontSize: string;
|
|
47
|
-
letterSpacing: any;
|
|
48
|
-
fontFamily: any;
|
|
49
|
-
fontWeight: any;
|
|
50
|
-
fontStyle: any;
|
|
51
|
-
};
|
|
52
29
|
};
|
|
53
30
|
};
|
|
54
31
|
};
|
|
55
32
|
container: {
|
|
56
33
|
gap: string;
|
|
57
34
|
};
|
|
58
|
-
general: {
|
|
59
|
-
input: {
|
|
60
|
-
borderRadius: string;
|
|
61
|
-
borderWidth: string;
|
|
62
|
-
borderColor: string;
|
|
63
|
-
textColor: string;
|
|
64
|
-
hover: {
|
|
65
|
-
backgroundColor: string;
|
|
66
|
-
borderColor: string;
|
|
67
|
-
borderWidth: string;
|
|
68
|
-
};
|
|
69
|
-
focus: {
|
|
70
|
-
borderColor: string;
|
|
71
|
-
borderWidth: string;
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
label: {
|
|
75
|
-
hover: {
|
|
76
|
-
textColor: string;
|
|
77
|
-
};
|
|
78
|
-
focus: {
|
|
79
|
-
textColor: string;
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
};
|
|
83
|
-
hasLabel: {
|
|
84
|
-
base: CSSObject;
|
|
85
|
-
};
|
|
86
|
-
noLabel: {
|
|
87
|
-
base: CSSObject;
|
|
88
|
-
};
|
|
89
|
-
label: {
|
|
90
|
-
base: CSSObject;
|
|
91
|
-
hover: {
|
|
92
|
-
base: CSSObject;
|
|
93
|
-
};
|
|
94
|
-
focus: {
|
|
95
|
-
base: CSSObject;
|
|
96
|
-
};
|
|
97
|
-
disabled: {
|
|
98
|
-
base: CSSObject;
|
|
99
|
-
};
|
|
100
|
-
};
|
|
101
35
|
};
|
|
@@ -2,9 +2,13 @@ import { ddsBaseTokens, ddsReferenceTokens } from '@norges-domstoler/dds-design-
|
|
|
2
2
|
|
|
3
3
|
var colors = ddsBaseTokens.colors,
|
|
4
4
|
spacing = ddsBaseTokens.spacing,
|
|
5
|
-
fontPackages = ddsBaseTokens.fontPackages,
|
|
6
5
|
border = ddsBaseTokens.border;
|
|
7
6
|
var TextInput = ddsReferenceTokens.textInput;
|
|
7
|
+
var inputTypographyTypes = {
|
|
8
|
+
medium: 'bodySans02',
|
|
9
|
+
small: 'bodySans01',
|
|
10
|
+
tiny: 'supportingStyleTiny01'
|
|
11
|
+
};
|
|
8
12
|
var input = {
|
|
9
13
|
base: {
|
|
10
14
|
color: TextInput.input.textColor,
|
|
@@ -23,62 +27,22 @@ var input = {
|
|
|
23
27
|
},
|
|
24
28
|
sizes: {
|
|
25
29
|
medium: {
|
|
26
|
-
padding: spacing.SizesDdsSpacingLocalX075
|
|
27
|
-
font: fontPackages.body_sans_02.base
|
|
30
|
+
padding: spacing.SizesDdsSpacingLocalX075
|
|
28
31
|
},
|
|
29
32
|
small: {
|
|
30
|
-
padding: "".concat(spacing.SizesDdsSpacingLocalX05, " ").concat(spacing.SizesDdsSpacingLocalX075, " ").concat(spacing.SizesDdsSpacingLocalX05, " ").concat(spacing.SizesDdsSpacingLocalX075)
|
|
31
|
-
font: fontPackages.body_sans_01.base
|
|
33
|
+
padding: "".concat(spacing.SizesDdsSpacingLocalX05, " ").concat(spacing.SizesDdsSpacingLocalX075, " ").concat(spacing.SizesDdsSpacingLocalX05, " ").concat(spacing.SizesDdsSpacingLocalX075)
|
|
32
34
|
},
|
|
33
35
|
tiny: {
|
|
34
|
-
padding: "".concat(spacing.SizesDdsSpacingLocalX025, " ").concat(spacing.SizesDdsSpacingLocalX05, " ").concat(spacing.SizesDdsSpacingLocalX025, " ").concat(spacing.SizesDdsSpacingLocalX05)
|
|
35
|
-
font: fontPackages.supportingStyle_tiny_01.base
|
|
36
|
+
padding: "".concat(spacing.SizesDdsSpacingLocalX025, " ").concat(spacing.SizesDdsSpacingLocalX05, " ").concat(spacing.SizesDdsSpacingLocalX025, " ").concat(spacing.SizesDdsSpacingLocalX05)
|
|
36
37
|
}
|
|
37
38
|
}
|
|
38
39
|
};
|
|
39
|
-
var inputHasLabelBase = {
|
|
40
|
-
padding: "".concat(spacing.SizesDdsSpacingLocalX075NumberPx + fontPackages.supportingStyle_label_01.numbers.lineHeightNumber * 0.01 * fontPackages.supportingStyle_label_01.numbers.fontSizeNumber, "px ").concat(spacing.SizesDdsSpacingLocalX1, " ").concat(spacing.SizesDdsSpacingLocalX075, " ").concat(spacing.SizesDdsSpacingLocalX1)
|
|
41
|
-
};
|
|
42
|
-
var inputNoLabelBase = {
|
|
43
|
-
padding: "".concat(spacing.SizesDdsSpacingLocalX075, " ").concat(spacing.SizesDdsSpacingLocalX1, " ").concat(spacing.SizesDdsSpacingLocalX075, " ").concat(spacing.SizesDdsSpacingLocalX1)
|
|
44
|
-
};
|
|
45
|
-
var inputLabelBase = {
|
|
46
|
-
padding: "".concat(spacing.SizesDdsSpacingLocalX075, " ").concat(spacing.SizesDdsSpacingLocalX1)
|
|
47
|
-
};
|
|
48
|
-
var inputLabelHoverBase = {
|
|
49
|
-
color: TextInput.label.hover.textColor
|
|
50
|
-
};
|
|
51
|
-
var inputLabelFocusBase = {
|
|
52
|
-
color: TextInput.label.focus.textColor
|
|
53
|
-
};
|
|
54
|
-
var inputLabelDisabledBase = {
|
|
55
|
-
color: colors.DdsColorNeutralsGray6
|
|
56
|
-
};
|
|
57
40
|
var container = {
|
|
58
41
|
gap: spacing.SizesDdsSpacingLocalX0125
|
|
59
42
|
};
|
|
60
43
|
var inputTokens = {
|
|
61
44
|
input: input,
|
|
62
|
-
container: container
|
|
63
|
-
general: TextInput,
|
|
64
|
-
hasLabel: {
|
|
65
|
-
base: inputHasLabelBase
|
|
66
|
-
},
|
|
67
|
-
noLabel: {
|
|
68
|
-
base: inputNoLabelBase
|
|
69
|
-
},
|
|
70
|
-
label: {
|
|
71
|
-
base: inputLabelBase,
|
|
72
|
-
hover: {
|
|
73
|
-
base: inputLabelHoverBase
|
|
74
|
-
},
|
|
75
|
-
focus: {
|
|
76
|
-
base: inputLabelFocusBase
|
|
77
|
-
},
|
|
78
|
-
disabled: {
|
|
79
|
-
base: inputLabelDisabledBase
|
|
80
|
-
}
|
|
81
|
-
}
|
|
45
|
+
container: container
|
|
82
46
|
};
|
|
83
47
|
|
|
84
|
-
export { inputTokens };
|
|
48
|
+
export { inputTokens, inputTypographyTypes };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { InputHTMLAttributes } from 'react';
|
|
2
2
|
import { Property } from 'csstype';
|
|
3
|
+
import { StaticTypographyType } from '../../components/Typography';
|
|
3
4
|
export declare type CommonInputProps = {
|
|
4
5
|
/**Ledetekst for input. */
|
|
5
6
|
label?: string;
|
|
@@ -19,3 +20,6 @@ export declare type StyledCommonInputProps = Pick<InputProps, 'readOnly' | 'disa
|
|
|
19
20
|
hasErrorMessage: boolean;
|
|
20
21
|
};
|
|
21
22
|
export declare type StyledInputProps = StyledCommonInputProps & Pick<InputProps, 'componentSize'>;
|
|
23
|
+
export declare type InputTypographyTypes = {
|
|
24
|
+
[k in InputSize]: StaticTypographyType;
|
|
25
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Direction } from '../../types';
|
|
1
2
|
declare type SelectionControlType = 'radio' | 'checkbox';
|
|
2
3
|
declare type CustomSelectionControlProps = {
|
|
3
4
|
controlType?: SelectionControlType;
|
|
@@ -12,4 +13,8 @@ declare type ContainerProps = {
|
|
|
12
13
|
controlType: SelectionControlType;
|
|
13
14
|
};
|
|
14
15
|
export declare const Container: import("styled-components").StyledComponent<"label", any, ContainerProps, never>;
|
|
16
|
+
export declare const OuterGroupContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
17
|
+
export declare const GroupContainer: import("styled-components").StyledComponent<"div", any, {
|
|
18
|
+
direction: Direction;
|
|
19
|
+
}, never>;
|
|
15
20
|
export {};
|
|
@@ -8,7 +8,9 @@ import { selectionControlTokens } from './SelectionControl.tokens.js';
|
|
|
8
8
|
|
|
9
9
|
var selectionControl = selectionControlTokens.selectionControl,
|
|
10
10
|
container = selectionControlTokens.container,
|
|
11
|
-
checkmark = selectionControlTokens.checkmark
|
|
11
|
+
checkmark = selectionControlTokens.checkmark,
|
|
12
|
+
groupContainer = selectionControlTokens.groupContainer,
|
|
13
|
+
outerGroupContainer = selectionControlTokens.outerGroupContainer;
|
|
12
14
|
var CustomSelectionControl = styled.span.withConfig({
|
|
13
15
|
displayName: "SelectionControlstyles__CustomSelectionControl",
|
|
14
16
|
componentId: "sc-1wv80b7-0"
|
|
@@ -32,5 +34,16 @@ var Container = styled.label.withConfig({
|
|
|
32
34
|
var controlType = _ref5.controlType;
|
|
33
35
|
return controlType === 'checkbox' ? css(["", ":after{border:solid ", ";border-width:0 1px 1px 0;left:35%;top:10%;width:30%;height:65%;transform:rotate(45deg);}input[data-indeterminate='true'] ~ ", ":after{border-width:1px 0 0 0;left:25%;top:50%;width:50%;height:1px;transform:none;}"], CustomSelectionControl, checkmark.checkbox.borderColor, CustomSelectionControl) : css(["", ":after{border-radius:50%;background-color:", ";width:", ";height:", ";left:", ";top:", ";}"], CustomSelectionControl, checkmark.radio.backgroundColor, checkmark.radio.width, checkmark.radio.height, checkmark.radio.left, checkmark.radio.top);
|
|
34
36
|
});
|
|
37
|
+
var OuterGroupContainer = styled.div.withConfig({
|
|
38
|
+
displayName: "SelectionControlstyles__OuterGroupContainer",
|
|
39
|
+
componentId: "sc-1wv80b7-2"
|
|
40
|
+
})(["display:flex;flex-direction:column;gap:", ";"], outerGroupContainer.gap);
|
|
41
|
+
var GroupContainer = styled.div.withConfig({
|
|
42
|
+
displayName: "SelectionControlstyles__GroupContainer",
|
|
43
|
+
componentId: "sc-1wv80b7-3"
|
|
44
|
+
})(["display:flex;", ""], function (_ref6) {
|
|
45
|
+
var direction = _ref6.direction;
|
|
46
|
+
return css(["flex-direction:", ";gap:", ";"], direction, groupContainer[direction].gap);
|
|
47
|
+
});
|
|
35
48
|
|
|
36
|
-
export { Container, CustomSelectionControl };
|
|
49
|
+
export { Container, CustomSelectionControl, GroupContainer, OuterGroupContainer };
|
|
@@ -91,10 +91,23 @@ var container = {
|
|
|
91
91
|
padding: "".concat(selectionControlSizeNumberPx / 2, "px")
|
|
92
92
|
}
|
|
93
93
|
};
|
|
94
|
+
var groupContainer = {
|
|
95
|
+
row: {
|
|
96
|
+
gap: spacing.SizesDdsSpacingLocalX075
|
|
97
|
+
},
|
|
98
|
+
column: {
|
|
99
|
+
gap: spacing.SizesDdsSpacingLocalX05
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
var outerGroupContainer = {
|
|
103
|
+
gap: spacing.SizesDdsSpacingLocalX0125
|
|
104
|
+
};
|
|
94
105
|
var selectionControlTokens = {
|
|
95
106
|
selectionControl: selectionControl,
|
|
96
107
|
checkmark: checkmark,
|
|
97
|
-
container: container
|
|
108
|
+
container: container,
|
|
109
|
+
groupContainer: groupContainer,
|
|
110
|
+
outerGroupContainer: outerGroupContainer
|
|
98
111
|
};
|
|
99
112
|
|
|
100
113
|
export { selectionControlTokens };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
var TextOverflowEllipsisWrapper = styled.span.withConfig({
|
|
4
|
+
displayName: "TextOverflowEllipsis__TextOverflowEllipsisWrapper",
|
|
5
|
+
componentId: "sc-1e0ljyj-0"
|
|
6
|
+
})(["max-width:100%;"]);
|
|
7
|
+
var TextOverflowEllipsisInner = styled.span.withConfig({
|
|
8
|
+
displayName: "TextOverflowEllipsis__TextOverflowEllipsisInner",
|
|
9
|
+
componentId: "sc-1e0ljyj-1"
|
|
10
|
+
})(["white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"]);
|
|
11
|
+
|
|
12
|
+
export { TextOverflowEllipsisInner, TextOverflowEllipsisWrapper };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TextOverflowEllipsis';
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -211,3 +211,4 @@ export { useMountTransition } from './hooks/useMountTransition.js';
|
|
|
211
211
|
export { ScreenSize, useScreenSize } from './hooks/useScreenSize.js';
|
|
212
212
|
export { useReturnFocusOnBlur } from './hooks/useReturnFocusOnBlur.js';
|
|
213
213
|
export { StyledTextArea, TextArea } from './components/TextArea/TextArea.js';
|
|
214
|
+
export { SplitButton } from './components/SplitButton/SplitButton.js';
|
package/dist/utils/color.d.ts
CHANGED
|
@@ -27,4 +27,4 @@ export declare type DDSTextColor = 'interactive' | 'primary' | 'danger' | 'warni
|
|
|
27
27
|
export declare const textColorsArray: string[];
|
|
28
28
|
export declare type TextColor = DDSTextColor | Property.Color;
|
|
29
29
|
export declare function isTextColor(color: string): color is DDSTextColor;
|
|
30
|
-
export declare const getTextColor: (color: TextColor) =>
|
|
30
|
+
export declare const getTextColor: (color: TextColor) => TextColor;
|
package/package.json
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { CSSObject } from 'styled-components';
|
|
2
|
-
export declare const cardAccordionHeaderTokens: {
|
|
3
|
-
base: CSSObject;
|
|
4
|
-
focus: {
|
|
5
|
-
base: CSSObject;
|
|
6
|
-
};
|
|
7
|
-
hover: {
|
|
8
|
-
base: CSSObject;
|
|
9
|
-
};
|
|
10
|
-
chevronWrapper: {
|
|
11
|
-
base: CSSObject;
|
|
12
|
-
};
|
|
13
|
-
chevron: {
|
|
14
|
-
width: string;
|
|
15
|
-
height: string;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { CSSObject } from 'styled-components';
|
|
2
|
-
export declare const radioButtonGroupTokens: {
|
|
3
|
-
label: {
|
|
4
|
-
spaceLeft: string;
|
|
5
|
-
};
|
|
6
|
-
container: {
|
|
7
|
-
base: CSSObject;
|
|
8
|
-
};
|
|
9
|
-
groupContainer: {
|
|
10
|
-
direction: {
|
|
11
|
-
row: {
|
|
12
|
-
base: CSSObject;
|
|
13
|
-
};
|
|
14
|
-
column: {
|
|
15
|
-
base: CSSObject;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ddsBaseTokens } from '@norges-domstoler/dds-design-tokens';
|
|
2
|
-
|
|
3
|
-
var Spacing = ddsBaseTokens.spacing,
|
|
4
|
-
FontPackages = ddsBaseTokens.fontPackages;
|
|
5
|
-
var base = Object.assign({
|
|
6
|
-
padding: "".concat(Spacing.SizesDdsSpacingLocalX1, " ").concat(Spacing.SizesDdsSpacingLocalX2NumberPx + Spacing.SizesDdsSpacingLocalX075NumberPx, "px ").concat(Spacing.SizesDdsSpacingLocalX2, " ").concat(Spacing.SizesDdsSpacingLocalX15)
|
|
7
|
-
}, FontPackages.body_sans_03.base);
|
|
8
|
-
var cardAccordionBodyTokens = {
|
|
9
|
-
base: base
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export { cardAccordionBodyTokens };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { CSSObject } from 'styled-components';
|
|
2
|
-
export declare const cardAccordionHeaderTokens: {
|
|
3
|
-
base: CSSObject;
|
|
4
|
-
focus: {
|
|
5
|
-
base: CSSObject;
|
|
6
|
-
};
|
|
7
|
-
hover: {
|
|
8
|
-
base: CSSObject;
|
|
9
|
-
};
|
|
10
|
-
chevronWrapper: {
|
|
11
|
-
base: CSSObject;
|
|
12
|
-
};
|
|
13
|
-
chevron: {
|
|
14
|
-
width: string;
|
|
15
|
-
height: string;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { ddsBaseTokens } from '@norges-domstoler/dds-design-tokens';
|
|
2
|
-
|
|
3
|
-
var Spacing = ddsBaseTokens.spacing,
|
|
4
|
-
FontPackages = ddsBaseTokens.fontPackages,
|
|
5
|
-
Border = ddsBaseTokens.border,
|
|
6
|
-
IconSizes = ddsBaseTokens.iconSizes;
|
|
7
|
-
var base = Object.assign({
|
|
8
|
-
padding: "".concat(Spacing.SizesDdsSpacingLocalX1, " ").concat(Spacing.SizesDdsSpacingLocalX075, " ").concat(Spacing.SizesDdsSpacingLocalX1, " ").concat(Spacing.SizesDdsSpacingLocalX15)
|
|
9
|
-
}, FontPackages.heading_sans_03.base);
|
|
10
|
-
var focusBase = {
|
|
11
|
-
boxShadow: "0 0 0 ".concat(Border.BordersDdsBorderFocusCardStrokeWeight, " ").concat(Border.BordersDdsBorderFocusCardStroke)
|
|
12
|
-
};
|
|
13
|
-
var hoverBase = {
|
|
14
|
-
boxShadow: "0 0 0 ".concat(Border.BordersDdsBorderFocusInputfieldStrokeWeight, " ").concat(Border.BordersDdsBorderFocusInputfieldStroke)
|
|
15
|
-
};
|
|
16
|
-
var chevronWrapperBase = {
|
|
17
|
-
width: IconSizes.DdsIconsizeMedium,
|
|
18
|
-
height: IconSizes.DdsIconsizeMedium,
|
|
19
|
-
marginLeft: Spacing.SizesDdsSpacingLocalX05
|
|
20
|
-
};
|
|
21
|
-
var cardAccordionHeaderTokens = {
|
|
22
|
-
base: base,
|
|
23
|
-
focus: {
|
|
24
|
-
base: focusBase
|
|
25
|
-
},
|
|
26
|
-
hover: {
|
|
27
|
-
base: hoverBase
|
|
28
|
-
},
|
|
29
|
-
chevronWrapper: {
|
|
30
|
-
base: chevronWrapperBase
|
|
31
|
-
},
|
|
32
|
-
chevron: {
|
|
33
|
-
width: IconSizes.DdsIconsizeMedium,
|
|
34
|
-
height: Spacing.SizesDdsSpacingLocalX05
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export { cardAccordionHeaderTokens };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { ddsBaseTokens } from '@norges-domstoler/dds-design-tokens';
|
|
2
|
-
|
|
3
|
-
var spacing = ddsBaseTokens.spacing;
|
|
4
|
-
var groupContainer = {
|
|
5
|
-
row: {
|
|
6
|
-
gap: spacing.SizesDdsSpacingLocalX075
|
|
7
|
-
},
|
|
8
|
-
column: {
|
|
9
|
-
gap: spacing.SizesDdsSpacingLocalX05
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
var outerContainer = {
|
|
13
|
-
gap: spacing.SizesDdsSpacingLocalX0125
|
|
14
|
-
};
|
|
15
|
-
var checkboxGroupTokens = {
|
|
16
|
-
outerContainer: outerContainer,
|
|
17
|
-
groupContainer: groupContainer
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export { checkboxGroupTokens };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ddsBaseTokens } from '@norges-domstoler/dds-design-tokens';
|
|
2
|
-
|
|
3
|
-
var Spacing = ddsBaseTokens.spacing;
|
|
4
|
-
var base = {
|
|
5
|
-
lineHeight: '2.5em'
|
|
6
|
-
};
|
|
7
|
-
var listItemTokens = {
|
|
8
|
-
base: base,
|
|
9
|
-
bulletSpacing: Spacing.SizesDdsSpacingLocalX025
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export { listItemTokens };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { CSSObject } from 'styled-components';
|
|
2
|
-
export declare const radioButtonGroupTokens: {
|
|
3
|
-
label: {
|
|
4
|
-
spaceLeft: string;
|
|
5
|
-
};
|
|
6
|
-
container: {
|
|
7
|
-
base: CSSObject;
|
|
8
|
-
};
|
|
9
|
-
groupContainer: {
|
|
10
|
-
direction: {
|
|
11
|
-
row: {
|
|
12
|
-
base: CSSObject;
|
|
13
|
-
};
|
|
14
|
-
column: {
|
|
15
|
-
base: CSSObject;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { ddsBaseTokens } from '@norges-domstoler/dds-design-tokens';
|
|
2
|
-
|
|
3
|
-
var Spacing = ddsBaseTokens.spacing;
|
|
4
|
-
var groupContainerRowBase = {
|
|
5
|
-
gap: Spacing.SizesDdsSpacingLocalX075
|
|
6
|
-
};
|
|
7
|
-
var groupContainerColumnBase = {
|
|
8
|
-
gap: Spacing.SizesDdsSpacingLocalX05
|
|
9
|
-
};
|
|
10
|
-
var containerBase = {
|
|
11
|
-
gap: Spacing.SizesDdsSpacingLocalX0125
|
|
12
|
-
};
|
|
13
|
-
var radioButtonGroupTokens = {
|
|
14
|
-
label: {
|
|
15
|
-
spaceLeft: Spacing.SizesDdsSpacingLocalX025
|
|
16
|
-
},
|
|
17
|
-
container: {
|
|
18
|
-
base: containerBase
|
|
19
|
-
},
|
|
20
|
-
groupContainer: {
|
|
21
|
-
direction: {
|
|
22
|
-
row: {
|
|
23
|
-
base: groupContainerRowBase
|
|
24
|
-
},
|
|
25
|
-
column: {
|
|
26
|
-
base: groupContainerColumnBase
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export { radioButtonGroupTokens };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ddsBaseTokens } from '@norges-domstoler/dds-design-tokens';
|
|
2
|
-
|
|
3
|
-
var Colors = ddsBaseTokens.colors;
|
|
4
|
-
var ciclreBase = {
|
|
5
|
-
stroke: Colors.DdsColorInteractiveBase
|
|
6
|
-
};
|
|
7
|
-
var spinnerTokens = {
|
|
8
|
-
circle: {
|
|
9
|
-
base: ciclreBase
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export { spinnerTokens };
|