@norges-domstoler/dds-components 5.5.0 → 7.0.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 +58 -1
- package/dist/cjs/components/Card/Card.stories.d.ts +1 -0
- package/dist/cjs/components/Card/CardAccordion/CardAccordion.d.ts +4 -0
- package/dist/cjs/components/Checkbox/Checkbox.stories.d.ts +1 -0
- package/dist/cjs/components/Checkbox/CheckboxGroup.d.ts +1 -1
- package/dist/cjs/components/Checkbox/CheckboxGroup.stories.d.ts +1 -1
- package/dist/cjs/components/Checkbox/CheckboxGroup.tokens.d.ts +7 -13
- package/dist/cjs/components/Datepicker/Datepicker.stories.d.ts +1 -0
- package/dist/cjs/components/Datepicker/Datepicker.tokens.d.ts +21 -3
- package/dist/cjs/components/InputMessage/InputMessage.tokens.d.ts +12 -9
- package/dist/cjs/components/InternalHeader/InternalHeader.styles.d.ts +1 -1
- package/dist/cjs/components/List/List.tokens.d.ts +0 -4
- package/dist/cjs/components/OverflowMenu/OverflowMenu.stories.d.ts +1 -1
- package/dist/cjs/components/RadioButton/RadioButtonGroup.d.ts +31 -2
- package/dist/cjs/components/RadioButton/RadioButtonGroup.stories.d.ts +19 -1
- package/dist/cjs/components/ScrollableContainer/scrollbarStyling.d.ts +1 -1
- package/dist/cjs/components/Search/Search.tokens.d.ts +51 -21
- package/dist/cjs/components/Select/CustomSelect.stories.d.ts +2 -2
- package/dist/cjs/components/Select/MultiSelect.stories.d.ts +2 -1
- package/dist/cjs/components/Select/Select.d.ts +9 -3
- package/dist/cjs/components/Select/Select.stories.d.ts +3 -1
- package/dist/cjs/components/Select/Select.styles.d.ts +6 -5
- package/dist/cjs/components/Select/Select.tokens.d.ts +211 -91
- package/dist/cjs/components/Tabs/Tab.d.ts +0 -5
- package/dist/cjs/components/Tabs/Tabs.context.d.ts +0 -2
- package/dist/cjs/components/Tabs/Tabs.d.ts +4 -4
- package/dist/cjs/components/Tabs/Tabs.stories.d.ts +2 -1
- package/dist/cjs/components/Tabs/Tabs.tokens.d.ts +1 -6
- package/dist/cjs/components/TextInput/TextInput.d.ts +5 -1
- package/dist/cjs/components/TextInput/TextInput.stories.d.ts +3 -0
- package/dist/cjs/components/TextInput/TextInput.styles.d.ts +14 -6
- package/dist/cjs/components/TextInput/TextInput.tokens.d.ts +25 -44
- package/dist/cjs/components/TextInput/TextInput.types.d.ts +3 -0
- package/dist/cjs/components/Tooltip/Tooltip.stories.d.ts +1 -1
- package/dist/cjs/components/Typography/Link/Link.d.ts +1 -1
- 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.types.d.ts +2 -3
- package/dist/cjs/components/Typography/Typography.tokens.d.ts +3 -89
- package/dist/cjs/helpers/Input/Input.styles.d.ts +3 -5
- package/dist/cjs/helpers/Input/Input.tokens.d.ts +52 -29
- package/dist/cjs/helpers/Input/Input.types.d.ts +4 -6
- package/dist/cjs/helpers/Input/Input.utils.d.ts +3 -0
- package/dist/cjs/helpers/Input/index.d.ts +1 -0
- package/dist/cjs/helpers/SelectionControl/SelectionControl.styles.d.ts +15 -0
- package/dist/cjs/helpers/SelectionControl/SelectionControl.tokens.d.ts +83 -0
- package/dist/cjs/helpers/SelectionControl/SelectionControl.utils.d.ts +2 -0
- package/dist/cjs/helpers/SelectionControl/index.d.ts +3 -0
- package/dist/cjs/helpers/styling/hover.d.ts +0 -2
- package/dist/cjs/hooks/index.d.ts +0 -1
- package/dist/cjs/hooks/useCombinedRefs.d.ts +18 -0
- package/dist/cjs/hooks/useFloatPosition.d.ts +22 -1
- package/dist/cjs/hooks/useFocusTrap.d.ts +16 -1
- package/dist/cjs/hooks/useIsMounted.d.ts +2 -0
- package/dist/cjs/hooks/useMountTransition.d.ts +32 -0
- package/dist/cjs/hooks/useOnClickOutside.d.ts +13 -0
- package/dist/cjs/hooks/useOnKeyDown.d.ts +13 -0
- package/dist/cjs/hooks/useRoveFocus.d.ts +25 -1
- package/dist/cjs/hooks/useScreenSize.d.ts +12 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +1683 -1595
- package/dist/cjs/test/mocks/ResizeObserver.d.ts +6 -0
- package/dist/components/Card/Card.stories.d.ts +1 -0
- package/dist/components/Card/CardAccordion/CardAccordion.d.ts +4 -0
- package/dist/components/Card/CardAccordion/CardAccordion.js +10 -6
- package/dist/components/Card/CardAccordion/CardAccordionBody.js +41 -15
- package/dist/components/Checkbox/Checkbox.js +13 -6
- package/dist/components/Checkbox/Checkbox.stories.d.ts +1 -0
- package/dist/components/Checkbox/CheckboxGroup.d.ts +1 -1
- package/dist/components/Checkbox/CheckboxGroup.js +26 -23
- package/dist/components/Checkbox/CheckboxGroup.stories.d.ts +1 -1
- package/dist/components/Checkbox/CheckboxGroup.tokens.d.ts +7 -13
- package/dist/components/Checkbox/CheckboxGroup.tokens.js +12 -24
- package/dist/components/Datepicker/Datepicker.js +37 -29
- package/dist/components/Datepicker/Datepicker.stories.d.ts +1 -0
- package/dist/components/Datepicker/Datepicker.tokens.d.ts +21 -3
- package/dist/components/Datepicker/Datepicker.tokens.js +28 -18
- package/dist/components/InputMessage/InputMessage.js +4 -4
- package/dist/components/InputMessage/InputMessage.tokens.d.ts +12 -9
- package/dist/components/InputMessage/InputMessage.tokens.js +16 -21
- package/dist/components/InternalHeader/InternalHeader.styles.d.ts +1 -1
- package/dist/components/List/List.tokens.d.ts +0 -4
- package/dist/components/List/List.tokens.js +0 -8
- package/dist/components/OverflowMenu/OverflowMenu.js +7 -4
- package/dist/components/OverflowMenu/OverflowMenu.stories.d.ts +1 -1
- package/dist/components/Popover/Popover.js +4 -1
- package/dist/components/RadioButton/RadioButton.js +12 -4
- package/dist/components/RadioButton/RadioButtonGroup.d.ts +31 -2
- package/dist/components/RadioButton/RadioButtonGroup.js +34 -27
- package/dist/components/RadioButton/RadioButtonGroup.stories.d.ts +19 -1
- package/dist/components/ScrollableContainer/scrollbarStyling.d.ts +1 -1
- package/dist/components/ScrollableContainer/scrollbarStyling.js +2 -1
- package/dist/components/Search/Search.js +32 -11
- package/dist/components/Search/Search.tokens.d.ts +51 -21
- package/dist/components/Search/Search.tokens.js +41 -49
- package/dist/components/Select/CustomSelect.stories.d.ts +2 -2
- package/dist/components/Select/MultiSelect.stories.d.ts +2 -1
- package/dist/components/Select/Select.d.ts +9 -3
- package/dist/components/Select/Select.js +88 -62
- package/dist/components/Select/Select.stories.d.ts +3 -1
- package/dist/components/Select/Select.styles.d.ts +6 -5
- package/dist/components/Select/Select.styles.js +145 -72
- package/dist/components/Select/Select.tokens.d.ts +211 -91
- package/dist/components/Select/Select.tokens.js +167 -279
- package/dist/components/Tabs/Tab.d.ts +0 -5
- package/dist/components/Tabs/Tab.js +6 -12
- package/dist/components/Tabs/TabList.js +7 -1
- package/dist/components/Tabs/Tabs.context.d.ts +0 -2
- package/dist/components/Tabs/Tabs.context.js +1 -2
- package/dist/components/Tabs/Tabs.d.ts +4 -4
- package/dist/components/Tabs/Tabs.js +13 -11
- package/dist/components/Tabs/Tabs.stories.d.ts +2 -1
- package/dist/components/Tabs/Tabs.tokens.d.ts +1 -6
- package/dist/components/Tabs/Tabs.tokens.js +4 -15
- package/dist/components/TextInput/TextInput.d.ts +5 -1
- package/dist/components/TextInput/TextInput.js +53 -32
- package/dist/components/TextInput/TextInput.stories.d.ts +3 -0
- package/dist/components/TextInput/TextInput.styles.d.ts +14 -6
- package/dist/components/TextInput/TextInput.styles.js +22 -19
- package/dist/components/TextInput/TextInput.tokens.d.ts +25 -44
- package/dist/components/TextInput/TextInput.tokens.js +35 -41
- package/dist/components/TextInput/TextInput.types.d.ts +3 -0
- package/dist/components/ToggleButton/ToggleButton.tokens.js +5 -4
- package/dist/components/Tooltip/Tooltip.js +3 -1
- package/dist/components/Tooltip/Tooltip.stories.d.ts +1 -1
- package/dist/components/Typography/Link/Link.d.ts +1 -1
- 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.types.d.ts +2 -3
- package/dist/components/Typography/Typography.tokens.d.ts +3 -89
- package/dist/components/Typography/Typography.tokens.js +16 -72
- package/dist/components/Typography/Typography.utils.js +2 -7
- package/dist/helpers/Input/Input.styles.d.ts +3 -5
- package/dist/helpers/Input/Input.styles.js +20 -28
- package/dist/helpers/Input/Input.tokens.d.ts +52 -29
- package/dist/helpers/Input/Input.tokens.js +36 -54
- package/dist/helpers/Input/Input.types.d.ts +4 -6
- package/dist/helpers/Input/Input.utils.d.ts +3 -0
- package/dist/helpers/Input/Input.utils.js +14 -0
- package/dist/helpers/Input/index.d.ts +1 -0
- package/dist/helpers/SelectionControl/SelectionControl.styles.d.ts +15 -0
- package/dist/helpers/SelectionControl/SelectionControl.styles.js +36 -0
- package/dist/helpers/SelectionControl/SelectionControl.tokens.d.ts +83 -0
- package/dist/helpers/SelectionControl/SelectionControl.tokens.js +100 -0
- package/dist/helpers/SelectionControl/SelectionControl.utils.d.ts +2 -0
- package/dist/helpers/SelectionControl/SelectionControl.utils.js +4 -0
- package/dist/helpers/SelectionControl/index.d.ts +3 -0
- package/dist/helpers/styling/danger.js +1 -1
- package/dist/helpers/styling/focus.js +5 -6
- package/dist/helpers/styling/hover.d.ts +0 -2
- package/dist/helpers/styling/hover.js +2 -4
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/useCombinedRefs.d.ts +18 -0
- package/dist/hooks/useCombinedRefs.js +19 -0
- package/dist/hooks/useFloatPosition.d.ts +22 -1
- package/dist/hooks/useFloatPosition.js +13 -13
- package/dist/hooks/useFocusTrap.d.ts +16 -1
- package/dist/hooks/useFocusTrap.js +15 -0
- package/dist/hooks/useIsMounted.d.ts +2 -0
- package/dist/hooks/useIsMounted.js +16 -0
- package/dist/hooks/useMountTransition.d.ts +32 -0
- package/dist/hooks/useMountTransition.js +33 -0
- package/dist/hooks/useOnClickOutside.d.ts +13 -0
- package/dist/hooks/useOnClickOutside.js +14 -0
- package/dist/hooks/useOnKeyDown.d.ts +13 -0
- package/dist/hooks/useOnKeyDown.js +14 -0
- package/dist/hooks/useRoveFocus.d.ts +25 -1
- package/dist/hooks/useRoveFocus.js +25 -0
- package/dist/hooks/useScreenSize.d.ts +12 -0
- package/dist/hooks/useScreenSize.js +53 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.js +8 -0
- package/dist/test/mocks/ResizeObserver.d.ts +6 -0
- package/package.json +2 -2
- package/dist/cjs/components/Checkbox/Checkbox.styles.d.ts +0 -5
- package/dist/cjs/components/Checkbox/Checkbox.tokens.d.ts +0 -65
- package/dist/cjs/components/RadioButton/RadioButton.styles.d.ts +0 -5
- package/dist/cjs/components/RadioButton/RadioButton.tokens.d.ts +0 -43
- package/dist/cjs/hooks/useId.d.ts +0 -1
- package/dist/components/Checkbox/Checkbox.styles.d.ts +0 -5
- package/dist/components/Checkbox/Checkbox.styles.js +0 -38
- package/dist/components/Checkbox/Checkbox.tokens.d.ts +0 -65
- package/dist/components/Checkbox/Checkbox.tokens.js +0 -132
- package/dist/components/RadioButton/RadioButton.styles.d.ts +0 -5
- package/dist/components/RadioButton/RadioButton.styles.js +0 -27
- package/dist/components/RadioButton/RadioButton.tokens.d.ts +0 -43
- package/dist/components/RadioButton/RadioButton.tokens.js +0 -100
- package/dist/hooks/useId.d.ts +0 -1
- package/dist/hooks/useId.js +0 -15
|
@@ -1,141 +1,261 @@
|
|
|
1
|
-
import { CSSObject } from 'styled-components';
|
|
2
|
-
import { Property } from 'csstype';
|
|
3
|
-
export declare const multiValueContainerMinHeight: string;
|
|
4
1
|
export declare const selectTokens: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
control: {
|
|
3
|
+
borderRadius: string;
|
|
4
|
+
border: string;
|
|
5
|
+
borderColor: string;
|
|
6
|
+
backgroundColor: string;
|
|
7
|
+
color: string;
|
|
8
|
+
disabled: {
|
|
9
|
+
backgroundColor: string;
|
|
10
|
+
borderColor: string;
|
|
10
11
|
};
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
readOnly: {
|
|
13
|
+
borderColor: string;
|
|
14
|
+
backgroundColor: string;
|
|
13
15
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
isMulti: {
|
|
17
|
+
sizes: {
|
|
18
|
+
medium: {
|
|
19
|
+
padding: string;
|
|
20
|
+
};
|
|
21
|
+
small: {
|
|
22
|
+
padding: string;
|
|
23
|
+
};
|
|
21
24
|
};
|
|
22
25
|
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
sizes: {
|
|
27
|
+
medium: {
|
|
28
|
+
font: {
|
|
29
|
+
lineHeight: any;
|
|
30
|
+
fontSize: string;
|
|
31
|
+
letterSpacing: any;
|
|
32
|
+
fontFamily: any;
|
|
33
|
+
fontWeight: any;
|
|
34
|
+
fontStyle: any;
|
|
35
|
+
};
|
|
36
|
+
padding: string;
|
|
37
|
+
};
|
|
38
|
+
small: {
|
|
39
|
+
font: {
|
|
40
|
+
lineHeight: any;
|
|
41
|
+
fontSize: string;
|
|
42
|
+
letterSpacing: any;
|
|
43
|
+
fontFamily: any;
|
|
44
|
+
fontWeight: any;
|
|
45
|
+
fontStyle: any;
|
|
46
|
+
};
|
|
47
|
+
padding: string;
|
|
48
|
+
};
|
|
49
|
+
tiny: {
|
|
50
|
+
font: {
|
|
51
|
+
lineHeight: any;
|
|
52
|
+
fontSize: string;
|
|
53
|
+
letterSpacing: any;
|
|
54
|
+
fontFamily: any;
|
|
55
|
+
fontWeight: any;
|
|
56
|
+
fontStyle: any;
|
|
57
|
+
};
|
|
58
|
+
padding: string;
|
|
59
|
+
};
|
|
28
60
|
};
|
|
29
61
|
};
|
|
30
|
-
|
|
31
|
-
base:
|
|
62
|
+
dropdownIndicator: {
|
|
63
|
+
base: {
|
|
64
|
+
color: string;
|
|
65
|
+
};
|
|
32
66
|
hover: {
|
|
33
|
-
|
|
67
|
+
color: string;
|
|
34
68
|
};
|
|
35
|
-
|
|
36
|
-
|
|
69
|
+
readOnly: {
|
|
70
|
+
color: string;
|
|
37
71
|
};
|
|
38
72
|
};
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
73
|
+
placeholder: {
|
|
74
|
+
color: string;
|
|
75
|
+
sizes: {
|
|
76
|
+
medium: {
|
|
77
|
+
font: {
|
|
78
|
+
lineHeight: any;
|
|
79
|
+
fontSize: string;
|
|
80
|
+
letterSpacing: any;
|
|
81
|
+
fontFamily: any;
|
|
82
|
+
fontWeight: any;
|
|
83
|
+
fontStyle: any;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
small: {
|
|
87
|
+
font: {
|
|
88
|
+
lineHeight: any;
|
|
89
|
+
fontSize: string;
|
|
90
|
+
letterSpacing: any;
|
|
91
|
+
fontFamily: any;
|
|
92
|
+
fontWeight: any;
|
|
93
|
+
fontStyle: any;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
tiny: {
|
|
97
|
+
font: {
|
|
98
|
+
lineHeight: any;
|
|
99
|
+
fontSize: string;
|
|
100
|
+
letterSpacing: any;
|
|
101
|
+
fontFamily: any;
|
|
102
|
+
fontWeight: any;
|
|
103
|
+
fontStyle: any;
|
|
104
|
+
};
|
|
47
105
|
};
|
|
48
106
|
};
|
|
49
107
|
};
|
|
50
|
-
placeholder: {
|
|
51
|
-
base: CSSObject;
|
|
52
|
-
};
|
|
53
108
|
menu: {
|
|
54
|
-
|
|
55
|
-
|
|
109
|
+
border: string;
|
|
110
|
+
borderColor: string;
|
|
111
|
+
backgroundColor: string;
|
|
112
|
+
borderRadius: string;
|
|
113
|
+
marginTop: string;
|
|
114
|
+
marginBottom: string;
|
|
115
|
+
};
|
|
116
|
+
groupHeading: {
|
|
117
|
+
color: string;
|
|
118
|
+
font: {
|
|
119
|
+
lineHeight: any;
|
|
120
|
+
fontSize: string;
|
|
121
|
+
letterSpacing: any;
|
|
122
|
+
fontFamily: any;
|
|
123
|
+
fontWeight: any;
|
|
124
|
+
fontStyle: any;
|
|
125
|
+
};
|
|
126
|
+
padding: string;
|
|
56
127
|
};
|
|
57
128
|
option: {
|
|
58
|
-
base:
|
|
129
|
+
base: {
|
|
130
|
+
gap: string;
|
|
131
|
+
padding: string;
|
|
132
|
+
font: {
|
|
133
|
+
lineHeight: any;
|
|
134
|
+
fontSize: string;
|
|
135
|
+
letterSpacing: any;
|
|
136
|
+
fontFamily: any;
|
|
137
|
+
fontWeight: any;
|
|
138
|
+
fontStyle: any;
|
|
139
|
+
};
|
|
140
|
+
color: string;
|
|
141
|
+
backgroundColor: string;
|
|
142
|
+
};
|
|
59
143
|
hover: {
|
|
60
|
-
|
|
144
|
+
color: string;
|
|
145
|
+
backgroundColor: string;
|
|
61
146
|
};
|
|
62
147
|
selected: {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
148
|
+
lineHeight: any;
|
|
149
|
+
fontSize: string;
|
|
150
|
+
letterSpacing: any;
|
|
151
|
+
fontFamily: any;
|
|
152
|
+
fontWeight: any;
|
|
153
|
+
fontStyle: any;
|
|
154
|
+
backgroundColor: string;
|
|
155
|
+
};
|
|
156
|
+
sizes: {
|
|
157
|
+
medium: {
|
|
158
|
+
font: {
|
|
159
|
+
lineHeight: any;
|
|
160
|
+
fontSize: string;
|
|
161
|
+
letterSpacing: any;
|
|
162
|
+
fontFamily: any;
|
|
163
|
+
fontWeight: any;
|
|
164
|
+
fontStyle: any;
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
small: {
|
|
168
|
+
font: {
|
|
169
|
+
lineHeight: any;
|
|
170
|
+
fontSize: string;
|
|
171
|
+
letterSpacing: any;
|
|
172
|
+
fontFamily: any;
|
|
173
|
+
fontWeight: any;
|
|
174
|
+
fontStyle: any;
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
tiny: {
|
|
178
|
+
font: {
|
|
179
|
+
lineHeight: any;
|
|
180
|
+
fontSize: string;
|
|
181
|
+
letterSpacing: any;
|
|
182
|
+
fontFamily: any;
|
|
183
|
+
fontWeight: any;
|
|
184
|
+
fontStyle: any;
|
|
185
|
+
};
|
|
66
186
|
};
|
|
67
187
|
};
|
|
68
188
|
};
|
|
69
189
|
valueContainer: {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
};
|
|
73
|
-
noLabel: {
|
|
74
|
-
base: CSSObject;
|
|
190
|
+
isMulti: {
|
|
191
|
+
gap: string;
|
|
75
192
|
};
|
|
193
|
+
};
|
|
194
|
+
inputContainer: {
|
|
76
195
|
isMulti: {
|
|
77
|
-
|
|
78
|
-
withLabel: {
|
|
79
|
-
base: CSSObject;
|
|
80
|
-
};
|
|
81
|
-
noLabel: {
|
|
82
|
-
base: CSSObject;
|
|
83
|
-
};
|
|
196
|
+
minHeight: string;
|
|
84
197
|
};
|
|
85
198
|
};
|
|
86
199
|
multiValue: {
|
|
87
|
-
base:
|
|
200
|
+
base: {
|
|
201
|
+
borderRadius: string;
|
|
202
|
+
};
|
|
88
203
|
enabled: {
|
|
89
|
-
|
|
204
|
+
backgroundColor: string;
|
|
90
205
|
};
|
|
91
206
|
disabled: {
|
|
92
|
-
|
|
207
|
+
backgroundColor: string;
|
|
93
208
|
};
|
|
94
209
|
};
|
|
95
210
|
multiValueLabel: {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
211
|
+
padding: string;
|
|
212
|
+
color: string;
|
|
213
|
+
font: {
|
|
214
|
+
lineHeight: any;
|
|
215
|
+
fontSize: string;
|
|
216
|
+
letterSpacing: any;
|
|
217
|
+
fontFamily: any;
|
|
218
|
+
fontWeight: any;
|
|
219
|
+
fontStyle: any;
|
|
102
220
|
};
|
|
103
221
|
};
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
};
|
|
111
|
-
isMulti: {
|
|
112
|
-
withLabel: {
|
|
113
|
-
base: CSSObject;
|
|
114
|
-
};
|
|
115
|
-
noLabel: {
|
|
116
|
-
base: CSSObject;
|
|
117
|
-
};
|
|
222
|
+
multiValueRemove: {
|
|
223
|
+
base: {
|
|
224
|
+
color: string;
|
|
225
|
+
padding: string;
|
|
226
|
+
borderTopRightRadius: string;
|
|
227
|
+
borderBottomRightRadius: string;
|
|
118
228
|
};
|
|
119
|
-
};
|
|
120
|
-
dropdownIndicator: {
|
|
121
|
-
base: CSSObject;
|
|
122
229
|
hover: {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
base: CSSObject;
|
|
230
|
+
color: string;
|
|
231
|
+
backgroundColor: string;
|
|
232
|
+
boxShadow: string;
|
|
127
233
|
};
|
|
128
234
|
};
|
|
129
235
|
noOptionsMessage: {
|
|
130
|
-
|
|
236
|
+
padding: string;
|
|
237
|
+
color: string;
|
|
238
|
+
font: {
|
|
239
|
+
lineHeight: any;
|
|
240
|
+
fontSize: string;
|
|
241
|
+
letterSpacing: any;
|
|
242
|
+
fontFamily: any;
|
|
243
|
+
fontWeight: any;
|
|
244
|
+
fontStyle: any;
|
|
245
|
+
};
|
|
131
246
|
};
|
|
132
247
|
clearIndicator: {
|
|
133
|
-
base:
|
|
248
|
+
base: {
|
|
249
|
+
color: string;
|
|
250
|
+
};
|
|
134
251
|
hover: {
|
|
135
|
-
|
|
252
|
+
color: string;
|
|
136
253
|
};
|
|
137
254
|
};
|
|
138
255
|
loadingIndicator: {
|
|
139
|
-
|
|
256
|
+
color: string;
|
|
257
|
+
};
|
|
258
|
+
icon: {
|
|
259
|
+
marginRight: string;
|
|
140
260
|
};
|
|
141
261
|
};
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes, Dispatch, SetStateAction } from 'react';
|
|
2
2
|
import { BaseComponentPropsWithChildren } from '../../types';
|
|
3
|
-
import { Property } from 'csstype';
|
|
4
3
|
import { SvgIcon } from '../../icons/utils';
|
|
5
4
|
export declare type TabProps = BaseComponentPropsWithChildren<HTMLButtonElement, {
|
|
6
5
|
/**Spesifiserer om fanen er aktiv. */
|
|
7
6
|
active?: boolean;
|
|
8
7
|
/** Ikon. */
|
|
9
8
|
icon?: SvgIcon;
|
|
10
|
-
/** Custom bredde for enkel fane. */
|
|
11
|
-
width?: Property.Width;
|
|
12
9
|
/** Spesifiserer om `<Tab />` skal ha fokus. **OBS!** settes automatisk av forelder.*/
|
|
13
10
|
focus?: boolean;
|
|
14
11
|
/** Callback som setter fokus. **OBS!** settes automatisk av forelder.*/
|
|
@@ -21,8 +18,6 @@ export declare const Tab: import("react").ForwardRefExoticComponent<Pick<Omit<Bu
|
|
|
21
18
|
active?: boolean | undefined;
|
|
22
19
|
/** Ikon. */
|
|
23
20
|
icon?: SvgIcon | undefined;
|
|
24
|
-
/** Custom bredde for enkel fane. */
|
|
25
|
-
width?: Property.Width<0 | (string & {})> | undefined;
|
|
26
21
|
/** Spesifiserer om `<Tab />` skal ha fokus. **OBS!** settes automatisk av forelder.*/
|
|
27
22
|
focus?: boolean | undefined;
|
|
28
23
|
/** Callback som setter fokus. **OBS!** settes automatisk av forelder.*/
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
2
|
import { Direction } from '../../types';
|
|
3
|
-
import { Property } from 'csstype';
|
|
4
3
|
declare type Tabs = {
|
|
5
4
|
activeTab: number;
|
|
6
5
|
tabsId: string;
|
|
@@ -10,7 +9,6 @@ declare type Tabs = {
|
|
|
10
9
|
hasTabFocus: boolean;
|
|
11
10
|
setHasTabFocus: (hasFocus: boolean) => void;
|
|
12
11
|
tabContentDirection: Direction;
|
|
13
|
-
tabWidth: Property.Width;
|
|
14
12
|
};
|
|
15
13
|
export declare const TabsContext: import("react").Context<Tabs>;
|
|
16
14
|
export declare const useTabsContext: () => Tabs;
|
|
@@ -8,8 +8,8 @@ export declare type TabsProps = BaseComponentPropsWithChildren<HTMLDivElement, {
|
|
|
8
8
|
onChange?: (index: number) => void;
|
|
9
9
|
/** Retningen ikon og tekst vises i `<Tab />`-elementer. */
|
|
10
10
|
tabContentDirection?: Direction;
|
|
11
|
-
/**
|
|
12
|
-
|
|
11
|
+
/**Bredde for hele komponenten. */
|
|
12
|
+
width?: Property.Width;
|
|
13
13
|
}, Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>>;
|
|
14
14
|
export declare const Tabs: import("react").ForwardRefExoticComponent<Pick<Omit<HTMLAttributes<HTMLDivElement>, "onChange">, "className" | "id"> & {
|
|
15
15
|
/** Indeksen til den aktive fanen. **OBS!** Ved å sette denne vil brukere aldri kunne endre tab uten at du også registrerer en `onChange`-lytter for å ta vare på aktiv tab utenfor komponenten. */
|
|
@@ -18,8 +18,8 @@ export declare const Tabs: import("react").ForwardRefExoticComponent<Pick<Omit<H
|
|
|
18
18
|
onChange?: ((index: number) => void) | undefined;
|
|
19
19
|
/** Retningen ikon og tekst vises i `<Tab />`-elementer. */
|
|
20
20
|
tabContentDirection?: Direction | undefined;
|
|
21
|
-
/**
|
|
22
|
-
|
|
21
|
+
/**Bredde for hele komponenten. */
|
|
22
|
+
width?: Property.Width<0 | (string & {})> | undefined;
|
|
23
23
|
} & {
|
|
24
24
|
children?: import("react").ReactNode;
|
|
25
25
|
} & {
|
|
@@ -6,5 +6,6 @@ export declare const Overview: Story<TabsProps>;
|
|
|
6
6
|
export declare const Default: Story<TabsProps>;
|
|
7
7
|
export declare const WithIcon: Story<TabsProps>;
|
|
8
8
|
export declare const ActiveTab: Story<TabsProps>;
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const WithWidth: Story<TabsProps>;
|
|
10
|
+
export declare const TabLongNames: Story<TabsProps>;
|
|
10
11
|
export declare const ManyTabs: Story<TabsProps>;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { InputSize } from '../../helpers';
|
|
3
|
+
import { Property } from 'csstype';
|
|
2
4
|
export declare const TextInput: React.ForwardRefExoticComponent<{
|
|
3
5
|
multiline?: boolean | undefined;
|
|
4
6
|
withCharacterCounter?: boolean | undefined;
|
|
7
|
+
icon?: import("../../icons/utils").SvgIcon | undefined;
|
|
5
8
|
} & {
|
|
6
9
|
label?: string | undefined;
|
|
7
|
-
|
|
10
|
+
componentSize?: InputSize | undefined;
|
|
11
|
+
width?: Property.Width<string> | undefined;
|
|
8
12
|
tip?: string | undefined;
|
|
9
13
|
errorMessage?: string | undefined;
|
|
10
14
|
} & React.InputHTMLAttributes<HTMLInputElement> & React.InputHTMLAttributes<HTMLTextAreaElement> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -4,8 +4,10 @@ declare const _default: {
|
|
|
4
4
|
component: import("react").ForwardRefExoticComponent<{
|
|
5
5
|
multiline?: boolean | undefined;
|
|
6
6
|
withCharacterCounter?: boolean | undefined;
|
|
7
|
+
icon?: import("../../icons/utils").SvgIcon | undefined;
|
|
7
8
|
} & {
|
|
8
9
|
label?: string | undefined;
|
|
10
|
+
componentSize?: import("../../helpers").InputSize | undefined;
|
|
9
11
|
width?: import("csstype").Property.Width<string> | undefined;
|
|
10
12
|
tip?: string | undefined;
|
|
11
13
|
errorMessage?: string | undefined;
|
|
@@ -60,6 +62,7 @@ declare const _default: {
|
|
|
60
62
|
};
|
|
61
63
|
export default _default;
|
|
62
64
|
export declare const TextInputOverview: (args: TextInputProps) => JSX.Element;
|
|
65
|
+
export declare const TextInputOverviewSizes: () => JSX.Element;
|
|
63
66
|
export declare const TextareaOverview: (args: TextInputProps) => JSX.Element;
|
|
64
67
|
export declare const Default: (args: TextInputProps) => JSX.Element;
|
|
65
68
|
export declare const WithLabel: (args: TextInputProps) => JSX.Element;
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { InputSize } from '../../helpers';
|
|
2
|
+
import { Icon } from '../Icon';
|
|
3
|
+
export declare const TextArea: import("styled-components").StyledComponent<"input", any, Pick<import("../../helpers").InputProps, "disabled" | "readOnly" | "componentSize"> & {
|
|
3
4
|
hasErrorMessage: boolean;
|
|
4
|
-
|
|
5
|
-
}, never>;
|
|
5
|
+
} & StyledInputProps, never>;
|
|
6
6
|
export declare const MessageContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
|
-
declare type
|
|
8
|
-
|
|
7
|
+
declare type StyledIconProps = {
|
|
8
|
+
size: InputSize;
|
|
9
|
+
};
|
|
10
|
+
export declare const StyledIcon: import("styled-components").StyledComponent<typeof Icon, any, StyledIconProps, never>;
|
|
11
|
+
declare type StyledInputProps = {
|
|
12
|
+
hasIcon?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare const StyledInput: import("styled-components").StyledComponent<"input", any, Pick<import("../../helpers").InputProps, "disabled" | "readOnly" | "componentSize"> & {
|
|
15
|
+
hasErrorMessage: boolean;
|
|
16
|
+
} & StyledInputProps, never>;
|
|
9
17
|
export {};
|
|
@@ -1,54 +1,35 @@
|
|
|
1
|
-
import { CSSObject } from 'styled-components';
|
|
2
|
-
import { Property } from 'csstype';
|
|
3
1
|
export declare const textInputTokens: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
lineHeight: any;
|
|
12
|
-
fontSize: string;
|
|
13
|
-
letterSpacing: any;
|
|
14
|
-
fontFamily: any;
|
|
15
|
-
fontWeight: any;
|
|
16
|
-
fontStyle: any;
|
|
2
|
+
input: {
|
|
3
|
+
multiline: {
|
|
4
|
+
paddingBottom: string;
|
|
5
|
+
};
|
|
6
|
+
withIcon: {
|
|
7
|
+
medium: {
|
|
8
|
+
paddingLeft: string;
|
|
17
9
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
borderColor: string;
|
|
21
|
-
borderWidth: string;
|
|
10
|
+
small: {
|
|
11
|
+
paddingLeft: string;
|
|
22
12
|
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
borderWidth: string;
|
|
13
|
+
tiny: {
|
|
14
|
+
paddingLeft: string;
|
|
26
15
|
};
|
|
27
16
|
};
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
17
|
+
};
|
|
18
|
+
icon: {
|
|
19
|
+
color: string;
|
|
20
|
+
sizes: {
|
|
21
|
+
medium: {
|
|
22
|
+
top: string;
|
|
23
|
+
left: string;
|
|
31
24
|
};
|
|
32
|
-
|
|
33
|
-
|
|
25
|
+
small: {
|
|
26
|
+
top: string;
|
|
27
|
+
left: string;
|
|
28
|
+
};
|
|
29
|
+
tiny: {
|
|
30
|
+
top: string;
|
|
31
|
+
left: string;
|
|
34
32
|
};
|
|
35
33
|
};
|
|
36
34
|
};
|
|
37
|
-
multiline: {
|
|
38
|
-
base: CSSObject;
|
|
39
|
-
hasLabel: {
|
|
40
|
-
base: CSSObject;
|
|
41
|
-
};
|
|
42
|
-
noLabel: {
|
|
43
|
-
base: CSSObject;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
label: {
|
|
47
|
-
multiline: {
|
|
48
|
-
base: CSSObject;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
wrapper: {
|
|
52
|
-
defaultWidth: Property.Width<string>;
|
|
53
|
-
};
|
|
54
35
|
};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { InputHTMLAttributes } from 'react';
|
|
2
2
|
import { InputProps } from '../../helpers';
|
|
3
|
+
import { SvgIcon } from '../../icons/utils';
|
|
3
4
|
export declare type TextInputProps = {
|
|
4
5
|
/**Gjør inputfeltet om til `<textarea>`. */
|
|
5
6
|
multiline?: boolean;
|
|
6
7
|
/** Spesifiserer om tegntelleren skal vises. */
|
|
7
8
|
withCharacterCounter?: boolean;
|
|
9
|
+
/** Ikonet som vises i komponenten. */
|
|
10
|
+
icon?: SvgIcon;
|
|
8
11
|
} & InputProps & InputHTMLAttributes<HTMLTextAreaElement>;
|
|
@@ -3,7 +3,7 @@ declare const _default: {
|
|
|
3
3
|
title: string;
|
|
4
4
|
component: import("react").ForwardRefExoticComponent<Pick<Omit<import("react").HTMLAttributes<HTMLDivElement>, "children" | "style" | "onMouseLeave" | "onMouseOver">, "id" | "className"> & {
|
|
5
5
|
text: string;
|
|
6
|
-
placement?: import("
|
|
6
|
+
placement?: import("../..").Placement | undefined;
|
|
7
7
|
children: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> & import("react").RefAttributes<HTMLElement>;
|
|
8
8
|
delay?: number | undefined;
|
|
9
9
|
tooltipId?: string | undefined;
|
|
@@ -12,7 +12,7 @@ export declare const Link: import("react").ForwardRefExoticComponent<Pick<Omit<A
|
|
|
12
12
|
/**Spesifiserer om lenken fører til et eksternt nettsted eller åpnes i nytt vindu. Påvirker styling og setter `target` prop. */
|
|
13
13
|
external?: boolean | undefined;
|
|
14
14
|
/**Spesifiserer typografistil basert på utvalget for brødtekst. */
|
|
15
|
-
typographyType?:
|
|
15
|
+
typographyType?: ("bodySans01" | "bodySans02" | "bodySans03" | "bodySans04") | undefined;
|
|
16
16
|
} & {
|
|
17
17
|
withMargins?: boolean | undefined;
|
|
18
18
|
} & {
|
|
@@ -6,7 +6,7 @@ declare const _default: {
|
|
|
6
6
|
title: string;
|
|
7
7
|
component: import("react").ForwardRefExoticComponent<Pick<Omit<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, "onClick" | "href" | "target">, "id" | "className"> & {
|
|
8
8
|
external?: boolean | undefined;
|
|
9
|
-
typographyType?:
|
|
9
|
+
typographyType?: ("bodySans01" | "bodySans02" | "bodySans03" | "bodySans04") | undefined;
|
|
10
10
|
} & {
|
|
11
11
|
withMargins?: boolean | undefined;
|
|
12
12
|
} & {
|
|
@@ -6,7 +6,7 @@ export declare type ParagraphProps = BaseComponentPropsWithChildren<HTMLParagrap
|
|
|
6
6
|
} & BaseTypographyProps>;
|
|
7
7
|
export declare const Paragraph: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLParagraphElement>, "id" | "className"> & {
|
|
8
8
|
/**Spesifiserer typografistil basert på utvalget for brødtekst og ingress. */
|
|
9
|
-
typographyType?:
|
|
9
|
+
typographyType?: ("bodySans01" | "bodySans02" | "bodySans03" | "bodySans04") | TypographyLeadType | undefined;
|
|
10
10
|
} & {
|
|
11
11
|
withMargins?: boolean | undefined;
|
|
12
12
|
} & {
|
|
@@ -5,7 +5,7 @@ declare type StoryTProps = {
|
|
|
5
5
|
declare const _default: {
|
|
6
6
|
title: string;
|
|
7
7
|
component: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLParagraphElement>, "id" | "className"> & {
|
|
8
|
-
typographyType?:
|
|
8
|
+
typographyType?: ("bodySans01" | "bodySans02" | "bodySans03" | "bodySans04") | import("..").TypographyLeadType | undefined;
|
|
9
9
|
} & {
|
|
10
10
|
withMargins?: boolean | undefined;
|
|
11
11
|
} & {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { CSSProperties, ElementType, HTMLAttributes, PropsWithChildren } from 'react';
|
|
2
2
|
import { TextColor } from '../../../utils';
|
|
3
3
|
declare type TypographyBodySansType = 'bodySans01' | 'bodySans02' | 'bodySans03' | 'bodySans04';
|
|
4
|
-
declare type
|
|
5
|
-
export declare type TypographyBodyType = TypographyBodySansType | TypographyBodySerifType;
|
|
4
|
+
export declare type TypographyBodyType = TypographyBodySansType;
|
|
6
5
|
export declare type TypographyHeadingType = 'headingSans01' | 'headingSans02' | 'headingSans03' | 'headingSans04' | 'headingSans05' | 'headingSans06' | 'headingSans07' | 'headingSans08';
|
|
7
6
|
export declare type TypographyLeadType = 'leadSans01' | 'leadSans02' | 'leadSans03' | 'leadSans04' | 'leadSans05';
|
|
8
|
-
declare type TypographySupportingType = '
|
|
7
|
+
declare type TypographySupportingType = 'supportingStyleHelperText01' | 'supportingStylePlaceholderText01' | 'supportingStylePlaceholderText02' | 'supportingStylePlaceholderText03' | 'supportingStyleTiny01' | 'supportingStyleTiny02';
|
|
9
8
|
export declare type AnchorTypographyType = 'a';
|
|
10
9
|
export declare type LabelTypographyType = 'supportingStyleLabel01';
|
|
11
10
|
export declare type OtherTypographyType = TypographyHeadingType | TypographyBodyType | TypographyLeadType | TypographySupportingType;
|