@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.
Files changed (191) hide show
  1. package/dist/_virtual/_rollupPluginBabelHelpers.js +58 -1
  2. package/dist/cjs/components/Card/Card.stories.d.ts +1 -0
  3. package/dist/cjs/components/Card/CardAccordion/CardAccordion.d.ts +4 -0
  4. package/dist/cjs/components/Checkbox/Checkbox.stories.d.ts +1 -0
  5. package/dist/cjs/components/Checkbox/CheckboxGroup.d.ts +1 -1
  6. package/dist/cjs/components/Checkbox/CheckboxGroup.stories.d.ts +1 -1
  7. package/dist/cjs/components/Checkbox/CheckboxGroup.tokens.d.ts +7 -13
  8. package/dist/cjs/components/Datepicker/Datepicker.stories.d.ts +1 -0
  9. package/dist/cjs/components/Datepicker/Datepicker.tokens.d.ts +21 -3
  10. package/dist/cjs/components/InputMessage/InputMessage.tokens.d.ts +12 -9
  11. package/dist/cjs/components/InternalHeader/InternalHeader.styles.d.ts +1 -1
  12. package/dist/cjs/components/List/List.tokens.d.ts +0 -4
  13. package/dist/cjs/components/OverflowMenu/OverflowMenu.stories.d.ts +1 -1
  14. package/dist/cjs/components/RadioButton/RadioButtonGroup.d.ts +31 -2
  15. package/dist/cjs/components/RadioButton/RadioButtonGroup.stories.d.ts +19 -1
  16. package/dist/cjs/components/ScrollableContainer/scrollbarStyling.d.ts +1 -1
  17. package/dist/cjs/components/Search/Search.tokens.d.ts +51 -21
  18. package/dist/cjs/components/Select/CustomSelect.stories.d.ts +2 -2
  19. package/dist/cjs/components/Select/MultiSelect.stories.d.ts +2 -1
  20. package/dist/cjs/components/Select/Select.d.ts +9 -3
  21. package/dist/cjs/components/Select/Select.stories.d.ts +3 -1
  22. package/dist/cjs/components/Select/Select.styles.d.ts +6 -5
  23. package/dist/cjs/components/Select/Select.tokens.d.ts +211 -91
  24. package/dist/cjs/components/Tabs/Tab.d.ts +0 -5
  25. package/dist/cjs/components/Tabs/Tabs.context.d.ts +0 -2
  26. package/dist/cjs/components/Tabs/Tabs.d.ts +4 -4
  27. package/dist/cjs/components/Tabs/Tabs.stories.d.ts +2 -1
  28. package/dist/cjs/components/Tabs/Tabs.tokens.d.ts +1 -6
  29. package/dist/cjs/components/TextInput/TextInput.d.ts +5 -1
  30. package/dist/cjs/components/TextInput/TextInput.stories.d.ts +3 -0
  31. package/dist/cjs/components/TextInput/TextInput.styles.d.ts +14 -6
  32. package/dist/cjs/components/TextInput/TextInput.tokens.d.ts +25 -44
  33. package/dist/cjs/components/TextInput/TextInput.types.d.ts +3 -0
  34. package/dist/cjs/components/Tooltip/Tooltip.stories.d.ts +1 -1
  35. package/dist/cjs/components/Typography/Link/Link.d.ts +1 -1
  36. package/dist/cjs/components/Typography/Link/Link.stories.d.ts +1 -1
  37. package/dist/cjs/components/Typography/Paragraph/Paragraph.d.ts +1 -1
  38. package/dist/cjs/components/Typography/Paragraph/Paragraph.stories.d.ts +1 -1
  39. package/dist/cjs/components/Typography/Typography/Typography.types.d.ts +2 -3
  40. package/dist/cjs/components/Typography/Typography.tokens.d.ts +3 -89
  41. package/dist/cjs/helpers/Input/Input.styles.d.ts +3 -5
  42. package/dist/cjs/helpers/Input/Input.tokens.d.ts +52 -29
  43. package/dist/cjs/helpers/Input/Input.types.d.ts +4 -6
  44. package/dist/cjs/helpers/Input/Input.utils.d.ts +3 -0
  45. package/dist/cjs/helpers/Input/index.d.ts +1 -0
  46. package/dist/cjs/helpers/SelectionControl/SelectionControl.styles.d.ts +15 -0
  47. package/dist/cjs/helpers/SelectionControl/SelectionControl.tokens.d.ts +83 -0
  48. package/dist/cjs/helpers/SelectionControl/SelectionControl.utils.d.ts +2 -0
  49. package/dist/cjs/helpers/SelectionControl/index.d.ts +3 -0
  50. package/dist/cjs/helpers/styling/hover.d.ts +0 -2
  51. package/dist/cjs/hooks/index.d.ts +0 -1
  52. package/dist/cjs/hooks/useCombinedRefs.d.ts +18 -0
  53. package/dist/cjs/hooks/useFloatPosition.d.ts +22 -1
  54. package/dist/cjs/hooks/useFocusTrap.d.ts +16 -1
  55. package/dist/cjs/hooks/useIsMounted.d.ts +2 -0
  56. package/dist/cjs/hooks/useMountTransition.d.ts +32 -0
  57. package/dist/cjs/hooks/useOnClickOutside.d.ts +13 -0
  58. package/dist/cjs/hooks/useOnKeyDown.d.ts +13 -0
  59. package/dist/cjs/hooks/useRoveFocus.d.ts +25 -1
  60. package/dist/cjs/hooks/useScreenSize.d.ts +12 -0
  61. package/dist/cjs/index.d.ts +1 -0
  62. package/dist/cjs/index.js +1683 -1595
  63. package/dist/cjs/test/mocks/ResizeObserver.d.ts +6 -0
  64. package/dist/components/Card/Card.stories.d.ts +1 -0
  65. package/dist/components/Card/CardAccordion/CardAccordion.d.ts +4 -0
  66. package/dist/components/Card/CardAccordion/CardAccordion.js +10 -6
  67. package/dist/components/Card/CardAccordion/CardAccordionBody.js +41 -15
  68. package/dist/components/Checkbox/Checkbox.js +13 -6
  69. package/dist/components/Checkbox/Checkbox.stories.d.ts +1 -0
  70. package/dist/components/Checkbox/CheckboxGroup.d.ts +1 -1
  71. package/dist/components/Checkbox/CheckboxGroup.js +26 -23
  72. package/dist/components/Checkbox/CheckboxGroup.stories.d.ts +1 -1
  73. package/dist/components/Checkbox/CheckboxGroup.tokens.d.ts +7 -13
  74. package/dist/components/Checkbox/CheckboxGroup.tokens.js +12 -24
  75. package/dist/components/Datepicker/Datepicker.js +37 -29
  76. package/dist/components/Datepicker/Datepicker.stories.d.ts +1 -0
  77. package/dist/components/Datepicker/Datepicker.tokens.d.ts +21 -3
  78. package/dist/components/Datepicker/Datepicker.tokens.js +28 -18
  79. package/dist/components/InputMessage/InputMessage.js +4 -4
  80. package/dist/components/InputMessage/InputMessage.tokens.d.ts +12 -9
  81. package/dist/components/InputMessage/InputMessage.tokens.js +16 -21
  82. package/dist/components/InternalHeader/InternalHeader.styles.d.ts +1 -1
  83. package/dist/components/List/List.tokens.d.ts +0 -4
  84. package/dist/components/List/List.tokens.js +0 -8
  85. package/dist/components/OverflowMenu/OverflowMenu.js +7 -4
  86. package/dist/components/OverflowMenu/OverflowMenu.stories.d.ts +1 -1
  87. package/dist/components/Popover/Popover.js +4 -1
  88. package/dist/components/RadioButton/RadioButton.js +12 -4
  89. package/dist/components/RadioButton/RadioButtonGroup.d.ts +31 -2
  90. package/dist/components/RadioButton/RadioButtonGroup.js +34 -27
  91. package/dist/components/RadioButton/RadioButtonGroup.stories.d.ts +19 -1
  92. package/dist/components/ScrollableContainer/scrollbarStyling.d.ts +1 -1
  93. package/dist/components/ScrollableContainer/scrollbarStyling.js +2 -1
  94. package/dist/components/Search/Search.js +32 -11
  95. package/dist/components/Search/Search.tokens.d.ts +51 -21
  96. package/dist/components/Search/Search.tokens.js +41 -49
  97. package/dist/components/Select/CustomSelect.stories.d.ts +2 -2
  98. package/dist/components/Select/MultiSelect.stories.d.ts +2 -1
  99. package/dist/components/Select/Select.d.ts +9 -3
  100. package/dist/components/Select/Select.js +88 -62
  101. package/dist/components/Select/Select.stories.d.ts +3 -1
  102. package/dist/components/Select/Select.styles.d.ts +6 -5
  103. package/dist/components/Select/Select.styles.js +145 -72
  104. package/dist/components/Select/Select.tokens.d.ts +211 -91
  105. package/dist/components/Select/Select.tokens.js +167 -279
  106. package/dist/components/Tabs/Tab.d.ts +0 -5
  107. package/dist/components/Tabs/Tab.js +6 -12
  108. package/dist/components/Tabs/TabList.js +7 -1
  109. package/dist/components/Tabs/Tabs.context.d.ts +0 -2
  110. package/dist/components/Tabs/Tabs.context.js +1 -2
  111. package/dist/components/Tabs/Tabs.d.ts +4 -4
  112. package/dist/components/Tabs/Tabs.js +13 -11
  113. package/dist/components/Tabs/Tabs.stories.d.ts +2 -1
  114. package/dist/components/Tabs/Tabs.tokens.d.ts +1 -6
  115. package/dist/components/Tabs/Tabs.tokens.js +4 -15
  116. package/dist/components/TextInput/TextInput.d.ts +5 -1
  117. package/dist/components/TextInput/TextInput.js +53 -32
  118. package/dist/components/TextInput/TextInput.stories.d.ts +3 -0
  119. package/dist/components/TextInput/TextInput.styles.d.ts +14 -6
  120. package/dist/components/TextInput/TextInput.styles.js +22 -19
  121. package/dist/components/TextInput/TextInput.tokens.d.ts +25 -44
  122. package/dist/components/TextInput/TextInput.tokens.js +35 -41
  123. package/dist/components/TextInput/TextInput.types.d.ts +3 -0
  124. package/dist/components/ToggleButton/ToggleButton.tokens.js +5 -4
  125. package/dist/components/Tooltip/Tooltip.js +3 -1
  126. package/dist/components/Tooltip/Tooltip.stories.d.ts +1 -1
  127. package/dist/components/Typography/Link/Link.d.ts +1 -1
  128. package/dist/components/Typography/Link/Link.stories.d.ts +1 -1
  129. package/dist/components/Typography/Paragraph/Paragraph.d.ts +1 -1
  130. package/dist/components/Typography/Paragraph/Paragraph.stories.d.ts +1 -1
  131. package/dist/components/Typography/Typography/Typography.types.d.ts +2 -3
  132. package/dist/components/Typography/Typography.tokens.d.ts +3 -89
  133. package/dist/components/Typography/Typography.tokens.js +16 -72
  134. package/dist/components/Typography/Typography.utils.js +2 -7
  135. package/dist/helpers/Input/Input.styles.d.ts +3 -5
  136. package/dist/helpers/Input/Input.styles.js +20 -28
  137. package/dist/helpers/Input/Input.tokens.d.ts +52 -29
  138. package/dist/helpers/Input/Input.tokens.js +36 -54
  139. package/dist/helpers/Input/Input.types.d.ts +4 -6
  140. package/dist/helpers/Input/Input.utils.d.ts +3 -0
  141. package/dist/helpers/Input/Input.utils.js +14 -0
  142. package/dist/helpers/Input/index.d.ts +1 -0
  143. package/dist/helpers/SelectionControl/SelectionControl.styles.d.ts +15 -0
  144. package/dist/helpers/SelectionControl/SelectionControl.styles.js +36 -0
  145. package/dist/helpers/SelectionControl/SelectionControl.tokens.d.ts +83 -0
  146. package/dist/helpers/SelectionControl/SelectionControl.tokens.js +100 -0
  147. package/dist/helpers/SelectionControl/SelectionControl.utils.d.ts +2 -0
  148. package/dist/helpers/SelectionControl/SelectionControl.utils.js +4 -0
  149. package/dist/helpers/SelectionControl/index.d.ts +3 -0
  150. package/dist/helpers/styling/danger.js +1 -1
  151. package/dist/helpers/styling/focus.js +5 -6
  152. package/dist/helpers/styling/hover.d.ts +0 -2
  153. package/dist/helpers/styling/hover.js +2 -4
  154. package/dist/hooks/index.d.ts +0 -1
  155. package/dist/hooks/useCombinedRefs.d.ts +18 -0
  156. package/dist/hooks/useCombinedRefs.js +19 -0
  157. package/dist/hooks/useFloatPosition.d.ts +22 -1
  158. package/dist/hooks/useFloatPosition.js +13 -13
  159. package/dist/hooks/useFocusTrap.d.ts +16 -1
  160. package/dist/hooks/useFocusTrap.js +15 -0
  161. package/dist/hooks/useIsMounted.d.ts +2 -0
  162. package/dist/hooks/useIsMounted.js +16 -0
  163. package/dist/hooks/useMountTransition.d.ts +32 -0
  164. package/dist/hooks/useMountTransition.js +33 -0
  165. package/dist/hooks/useOnClickOutside.d.ts +13 -0
  166. package/dist/hooks/useOnClickOutside.js +14 -0
  167. package/dist/hooks/useOnKeyDown.d.ts +13 -0
  168. package/dist/hooks/useOnKeyDown.js +14 -0
  169. package/dist/hooks/useRoveFocus.d.ts +25 -1
  170. package/dist/hooks/useRoveFocus.js +25 -0
  171. package/dist/hooks/useScreenSize.d.ts +12 -0
  172. package/dist/hooks/useScreenSize.js +53 -3
  173. package/dist/index.d.ts +1 -0
  174. package/dist/index.js +8 -0
  175. package/dist/test/mocks/ResizeObserver.d.ts +6 -0
  176. package/package.json +2 -2
  177. package/dist/cjs/components/Checkbox/Checkbox.styles.d.ts +0 -5
  178. package/dist/cjs/components/Checkbox/Checkbox.tokens.d.ts +0 -65
  179. package/dist/cjs/components/RadioButton/RadioButton.styles.d.ts +0 -5
  180. package/dist/cjs/components/RadioButton/RadioButton.tokens.d.ts +0 -43
  181. package/dist/cjs/hooks/useId.d.ts +0 -1
  182. package/dist/components/Checkbox/Checkbox.styles.d.ts +0 -5
  183. package/dist/components/Checkbox/Checkbox.styles.js +0 -38
  184. package/dist/components/Checkbox/Checkbox.tokens.d.ts +0 -65
  185. package/dist/components/Checkbox/Checkbox.tokens.js +0 -132
  186. package/dist/components/RadioButton/RadioButton.styles.d.ts +0 -5
  187. package/dist/components/RadioButton/RadioButton.styles.js +0 -27
  188. package/dist/components/RadioButton/RadioButton.tokens.d.ts +0 -43
  189. package/dist/components/RadioButton/RadioButton.tokens.js +0 -100
  190. package/dist/hooks/useId.d.ts +0 -1
  191. 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
- container: {
6
- base: CSSObject;
7
- defaultWidth: Property.Width<string>;
8
- hover: {
9
- base: CSSObject;
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
- focus: {
12
- base: CSSObject;
12
+ readOnly: {
13
+ borderColor: string;
14
+ backgroundColor: string;
13
15
  };
14
- danger: {
15
- base: CSSObject;
16
- hover: {
17
- base: CSSObject;
18
- };
19
- focus: {
20
- base: CSSObject;
16
+ isMulti: {
17
+ sizes: {
18
+ medium: {
19
+ padding: string;
20
+ };
21
+ small: {
22
+ padding: string;
23
+ };
21
24
  };
22
25
  };
23
- disabled: {
24
- base: CSSObject;
25
- };
26
- readOnly: {
27
- base: CSSObject;
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
- label: {
31
- base: CSSObject;
62
+ dropdownIndicator: {
63
+ base: {
64
+ color: string;
65
+ };
32
66
  hover: {
33
- base: CSSObject;
67
+ color: string;
34
68
  };
35
- focus: {
36
- base: CSSObject;
69
+ readOnly: {
70
+ color: string;
37
71
  };
38
72
  };
39
- input: {
40
- base: CSSObject;
41
- noLabel: {
42
- base: CSSObject;
43
- };
44
- isMulti: {
45
- noLabel: {
46
- base: CSSObject;
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
- base: CSSObject;
55
- spaceTop: number;
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: CSSObject;
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
- base: CSSObject;
144
+ color: string;
145
+ backgroundColor: string;
61
146
  };
62
147
  selected: {
63
- base: CSSObject;
64
- icon: {
65
- margin: string;
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
- withLabel: {
71
- base: CSSObject;
72
- };
73
- noLabel: {
74
- base: CSSObject;
190
+ isMulti: {
191
+ gap: string;
75
192
  };
193
+ };
194
+ inputContainer: {
76
195
  isMulti: {
77
- base: CSSObject;
78
- withLabel: {
79
- base: CSSObject;
80
- };
81
- noLabel: {
82
- base: CSSObject;
83
- };
196
+ minHeight: string;
84
197
  };
85
198
  };
86
199
  multiValue: {
87
- base: CSSObject;
200
+ base: {
201
+ borderRadius: string;
202
+ };
88
203
  enabled: {
89
- base: CSSObject;
204
+ backgroundColor: string;
90
205
  };
91
206
  disabled: {
92
- base: CSSObject;
207
+ backgroundColor: string;
93
208
  };
94
209
  };
95
210
  multiValueLabel: {
96
- base: CSSObject;
97
- };
98
- multiValueRemove: {
99
- base: CSSObject;
100
- hover: {
101
- base: CSSObject;
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
- indicatorsContainer: {
105
- withLabel: {
106
- base: CSSObject;
107
- };
108
- noLabel: {
109
- base: CSSObject;
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
- base: CSSObject;
124
- };
125
- readOnly: {
126
- base: CSSObject;
230
+ color: string;
231
+ backgroundColor: string;
232
+ boxShadow: string;
127
233
  };
128
234
  };
129
235
  noOptionsMessage: {
130
- base: CSSObject;
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: CSSObject;
248
+ base: {
249
+ color: string;
250
+ };
134
251
  hover: {
135
- base: CSSObject;
252
+ color: string;
136
253
  };
137
254
  };
138
255
  loadingIndicator: {
139
- base: CSSObject;
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
- /**Custom bredde lik for alle `<Tab />`. */
12
- tabWidth?: Property.Width;
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
- /**Custom bredde lik for alle `<Tab />`. */
22
- tabWidth?: Property.Width<0 | (string & {})> | undefined;
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 TabWidth: Story<TabsProps>;
9
+ export declare const WithWidth: Story<TabsProps>;
10
+ export declare const TabLongNames: Story<TabsProps>;
10
11
  export declare const ManyTabs: Story<TabsProps>;
@@ -1,11 +1,6 @@
1
1
  import { CSSObject } from 'styled-components';
2
2
  export declare const tabsTokens: {
3
- tabList: {
4
- base: CSSObject;
5
- focus: {
6
- base: CSSObject;
7
- };
8
- };
3
+ tabList: CSSObject;
9
4
  tab: {
10
5
  base: CSSObject;
11
6
  direction: {
@@ -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
- width?: import("csstype").Property.Width<string> | undefined;
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 { TextInputProps } from './TextInput.types';
2
- export declare const TextArea: import("styled-components").StyledComponent<"input", any, Pick<import("../../helpers").InputProps, "disabled" | "readOnly"> & {
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
- hasLabel: import("../../helpers").LabelPresence;
5
- }, never>;
5
+ } & StyledInputProps, never>;
6
6
  export declare const MessageContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
7
- declare type LabelProps = Pick<TextInputProps, 'multiline' | 'disabled' | 'readOnly'>;
8
- export declare const Label: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../Typography").TypographyProps & import("react").RefAttributes<HTMLElement>>, any, import("../../helpers").StyledLabelProps & LabelProps, never>;
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
- general: {
5
- input: {
6
- borderRadius: string;
7
- borderWidth: string;
8
- borderColor: string;
9
- textColor: string;
10
- font: {
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
- hover: {
19
- backgroundColor: string;
20
- borderColor: string;
21
- borderWidth: string;
10
+ small: {
11
+ paddingLeft: string;
22
12
  };
23
- focus: {
24
- borderColor: string;
25
- borderWidth: string;
13
+ tiny: {
14
+ paddingLeft: string;
26
15
  };
27
16
  };
28
- label: {
29
- hover: {
30
- textColor: string;
17
+ };
18
+ icon: {
19
+ color: string;
20
+ sizes: {
21
+ medium: {
22
+ top: string;
23
+ left: string;
31
24
  };
32
- focus: {
33
- textColor: string;
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("../../hooks").Placement | undefined;
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?: TypographyBodyType | undefined;
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?: import("..").TypographyBodyType | undefined;
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?: TypographyBodyType | TypographyLeadType | undefined;
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?: import("..").TypographyBodyType | import("..").TypographyLeadType | undefined;
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 TypographyBodySerifType = 'bodySerif01' | 'bodySerif02' | 'bodySerif03' | 'bodySerif04';
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 = 'supportingStyleInputText01' | 'supportingStyleInputText02' | 'supportingStyleInputText03' | 'supportingStyleHelperText01' | 'supportingStylePlaceholderText01' | 'supportingStyleTiny01' | 'supportingStyleTiny02';
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;