@entur/expand 3.6.13-beta.9 → 3.6.13
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/expand.cjs.js +234 -0
- package/dist/expand.cjs.js.map +1 -0
- package/dist/expand.esm.js +204 -218
- package/dist/expand.esm.js.map +1 -1
- package/dist/index.d.ts +121 -8
- package/dist/styles.css +113 -123
- package/package.json +24 -14
- package/dist/Accordion.d.ts +0 -17
- package/dist/AccordionItem.d.ts +0 -16
- package/dist/BaseExpand.d.ts +0 -11
- package/dist/BaseExpandablePanel.d.ts +0 -20
- package/dist/ExpandArrow.d.ts +0 -13
- package/dist/ExpandablePanel.d.ts +0 -17
- package/dist/ExpandableText.d.ts +0 -25
- package/dist/ExpandableTextButton.d.ts +0 -14
- package/dist/expand.cjs.development.js +0 -259
- package/dist/expand.cjs.development.js.map +0 -1
- package/dist/expand.cjs.production.min.js +0 -2
- package/dist/expand.cjs.production.min.js.map +0 -1
- package/dist/index.js +0 -8
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,121 @@
|
|
|
1
|
-
import '
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
export
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { default as default_2 } from 'react';
|
|
3
|
+
|
|
4
|
+
export declare const Accordion: default_2.FC<AccordionProps>;
|
|
5
|
+
|
|
6
|
+
export declare const AccordionItem: default_2.FC<AccordionItemProps>;
|
|
7
|
+
|
|
8
|
+
export declare type AccordionItemProps = {
|
|
9
|
+
/** Teksten som skal stå i panelet */
|
|
10
|
+
title: default_2.ReactNode;
|
|
11
|
+
/** Innholdet som skal vises under panelet */
|
|
12
|
+
children: default_2.ReactNode;
|
|
13
|
+
/** Hvilken tilstand AccordionItem skal ha som default
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
defaultOpen?: boolean;
|
|
17
|
+
/** Styling som sendes til innholdet av AccordionItem */
|
|
18
|
+
contentStyle?: CSSProperties;
|
|
19
|
+
disableAnimation?: boolean;
|
|
20
|
+
[key: string]: any;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export declare type AccordionProps = {
|
|
24
|
+
/** To eller flere AccordionItem-komponenter */
|
|
25
|
+
children: default_2.ReactNode;
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export declare const BaseExpand: default_2.FC<BaseExpandProps>;
|
|
30
|
+
|
|
31
|
+
declare type BaseExpandProps = {
|
|
32
|
+
/** Innholdet som skal være expandable */
|
|
33
|
+
children: default_2.ReactNode;
|
|
34
|
+
/** Boolean for om innholdet vises eller ikke */
|
|
35
|
+
open: boolean;
|
|
36
|
+
[key: string]: any;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export declare type ExandableTextButtonProps = {
|
|
40
|
+
children: default_2.ReactNode;
|
|
41
|
+
/** Prop for om innholdet er åpent */
|
|
42
|
+
open?: boolean;
|
|
43
|
+
/** Funksjonen som styrer åpningen av ExpandableTextButton */
|
|
44
|
+
onToggle: () => void;
|
|
45
|
+
/** Den typografiske komponenten for tittelen
|
|
46
|
+
* @default Heading5
|
|
47
|
+
*/
|
|
48
|
+
as?: default_2.ElementType;
|
|
49
|
+
[key: string]: any;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export declare const ExpandablePanel: default_2.FC<ExpandablePanelProps>;
|
|
53
|
+
|
|
54
|
+
export declare type ExpandablePanelProps = {
|
|
55
|
+
/** Teksten som skal stå i panelet */
|
|
56
|
+
title: default_2.ReactNode;
|
|
57
|
+
/** Innholdet som skal vises under panelet */
|
|
58
|
+
children: default_2.ReactNode;
|
|
59
|
+
/** Hvilken tilstand ExpandablePanel skal ha som default
|
|
60
|
+
* @default false
|
|
61
|
+
*/
|
|
62
|
+
defaultOpen?: boolean;
|
|
63
|
+
/** Funksjonen som styrer åpningen av ExpandablePanel */
|
|
64
|
+
onToggle?: () => void;
|
|
65
|
+
/** Styling som sendes til innholdet av ExpandablePanel */
|
|
66
|
+
contentStyle?: CSSProperties;
|
|
67
|
+
[key: string]: any;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export declare const ExpandableText: default_2.FC<ExpandableTextProps>;
|
|
71
|
+
|
|
72
|
+
export declare const ExpandableTextButton: default_2.FC<ExandableTextButtonProps>;
|
|
73
|
+
|
|
74
|
+
export declare type ExpandableTextProps = {
|
|
75
|
+
/** Teksten som skal "vises" */
|
|
76
|
+
title: default_2.ReactNode;
|
|
77
|
+
/** Innholdet som skal vises under linken */
|
|
78
|
+
children: default_2.ReactNode;
|
|
79
|
+
/** Hvilken tilstand ExpandableText skal ha som default (med mindre den er kontrollert)
|
|
80
|
+
* @default false
|
|
81
|
+
*/
|
|
82
|
+
defaultOpen?: boolean;
|
|
83
|
+
/** Prop for om innholdet er åpent. Brukes hvis du vil kontrollere ExpandableText, sammen med onToggle */
|
|
84
|
+
open?: boolean;
|
|
85
|
+
/** Funksjonen som styrer åpningen av ExpandableText */
|
|
86
|
+
onToggle?: () => void;
|
|
87
|
+
/**Styling som sendes til innholdet av ExpandableText */
|
|
88
|
+
contentStyle?: CSSProperties;
|
|
89
|
+
/** Hvilket typografisk element tittelen er
|
|
90
|
+
* @default "Heading5"
|
|
91
|
+
*/
|
|
92
|
+
titleElement?: 'Heading5' | 'Paragraph' | 'SubParagraph';
|
|
93
|
+
disableAnimation?: boolean;
|
|
94
|
+
[key: string]: any;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export declare const ExpandArrow: default_2.FC<ExpandArrowProps>;
|
|
98
|
+
|
|
99
|
+
declare type ExpandArrowProps = {
|
|
100
|
+
/** Om innholdet er åpent eller ikke, som bestemmer retningen på pila
|
|
101
|
+
* @default false
|
|
102
|
+
*/
|
|
103
|
+
open?: boolean;
|
|
104
|
+
/** Ekstra klassenavn */
|
|
105
|
+
className?: string;
|
|
106
|
+
[key: string]: any;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
declare type Id = string | null;
|
|
110
|
+
|
|
111
|
+
export declare const useAccordion: ({ id, defaultOpen }: UseAccordionArgs) => {
|
|
112
|
+
isOpen: boolean;
|
|
113
|
+
toggle: () => void;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
declare type UseAccordionArgs = {
|
|
117
|
+
id: Id;
|
|
118
|
+
defaultOpen?: boolean;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
export { }
|
package/dist/styles.css
CHANGED
|
@@ -1,128 +1,5 @@
|
|
|
1
1
|
/* DO NOT CHANGE!*/
|
|
2
2
|
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
3
|
-
.ReactCollapse--collapse {
|
|
4
|
-
transition: height 0.5s ease-out;
|
|
5
|
-
}
|
|
6
|
-
/* DO NOT CHANGE!*/
|
|
7
|
-
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
8
|
-
.eds-expandable-panel {
|
|
9
|
-
width: 100%;
|
|
10
|
-
position: relative;
|
|
11
|
-
}
|
|
12
|
-
.eds-expandable-panel + .eds-expandable-panel {
|
|
13
|
-
margin-top: 0.125rem;
|
|
14
|
-
}
|
|
15
|
-
.eds-expandable-panel:focus, .eds-expandable-panel:focus-within {
|
|
16
|
-
z-index: 2;
|
|
17
|
-
}
|
|
18
|
-
.eds-expandable-panel__grid {
|
|
19
|
-
display: grid;
|
|
20
|
-
grid-template-columns: auto 2rem;
|
|
21
|
-
}
|
|
22
|
-
.eds-expandable-panel__trigger {
|
|
23
|
-
-webkit-appearance: none;
|
|
24
|
-
-moz-appearance: none;
|
|
25
|
-
appearance: none;
|
|
26
|
-
background: var(--components-expand-expandablepanel-standard-fill-default);
|
|
27
|
-
border: none;
|
|
28
|
-
border-radius: 0.25rem;
|
|
29
|
-
color: var(--components-expand-expandablepanel-standard-text);
|
|
30
|
-
cursor: pointer;
|
|
31
|
-
font-family: inherit;
|
|
32
|
-
font-size: inherit;
|
|
33
|
-
margin: 0;
|
|
34
|
-
padding: 1rem 1.5rem 1rem 1.5rem;
|
|
35
|
-
text-align: left;
|
|
36
|
-
-webkit-user-select: none;
|
|
37
|
-
-moz-user-select: none;
|
|
38
|
-
user-select: none;
|
|
39
|
-
width: 100%;
|
|
40
|
-
word-break: break-word;
|
|
41
|
-
}
|
|
42
|
-
.eds-contrast .eds-expandable-panel__trigger {
|
|
43
|
-
background: var(--components-expand-expandablepanel-contrast-fill-default);
|
|
44
|
-
color: var(--components-expand-expandablepanel-contrast-text);
|
|
45
|
-
}
|
|
46
|
-
.eds-expandable-panel__trigger:hover {
|
|
47
|
-
background: var(--components-expand-expandablepanel-standard-fill-hover);
|
|
48
|
-
}
|
|
49
|
-
.eds-contrast .eds-expandable-panel__trigger:hover {
|
|
50
|
-
background: var(--components-expand-expandablepanel-contrast-fill-hover);
|
|
51
|
-
}
|
|
52
|
-
.eds-expandable-panel__trigger:focus-visible {
|
|
53
|
-
outline: 2px solid #181c56;
|
|
54
|
-
outline-color: var(--basecolors-stroke-focus-standard);
|
|
55
|
-
outline-offset: 0.125rem;
|
|
56
|
-
}
|
|
57
|
-
.eds-contrast .eds-expandable-panel__trigger:focus-visible {
|
|
58
|
-
outline-color: var(--basecolors-stroke-focus-contrast);
|
|
59
|
-
}
|
|
60
|
-
.eds-expandable-panel__icon-container {
|
|
61
|
-
display: flex;
|
|
62
|
-
align-items: center;
|
|
63
|
-
justify-content: flex-end;
|
|
64
|
-
}
|
|
65
|
-
.eds-expandable-panel__content {
|
|
66
|
-
overflow: auto;
|
|
67
|
-
padding: 1rem 1rem 1rem 1.5rem;
|
|
68
|
-
}
|
|
69
|
-
.eds-expandable-panel .ReactCollapse--collapse {
|
|
70
|
-
transition: height 0.5s ease-out;
|
|
71
|
-
}
|
|
72
|
-
.eds-expandable-panel--disable-animation .ReactCollapse--collapse {
|
|
73
|
-
transition: none;
|
|
74
|
-
}
|
|
75
|
-
/* DO NOT CHANGE!*/
|
|
76
|
-
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
77
|
-
.eds-expandable-arrow {
|
|
78
|
-
color: var(--components-expand-expandablepanel-standard-icon);
|
|
79
|
-
transition: 0.2s transform ease-out;
|
|
80
|
-
}
|
|
81
|
-
.eds-expandable-arrow--open {
|
|
82
|
-
transform: rotate(-180deg);
|
|
83
|
-
}
|
|
84
|
-
.eds-contrast .eds-expandable-arrow {
|
|
85
|
-
color: var(--components-expand-expandablepanel-contrast-icon);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.eds-expandable-text--disable-animation .eds-expandable-arrow,
|
|
89
|
-
.eds-expandable-panel--disable-animation .eds-expandable-arrow {
|
|
90
|
-
transition: none;
|
|
91
|
-
}
|
|
92
|
-
/* DO NOT CHANGE!*/
|
|
93
|
-
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
94
|
-
.eds-expandable-text__trigger {
|
|
95
|
-
-webkit-appearance: none;
|
|
96
|
-
-moz-appearance: none;
|
|
97
|
-
appearance: none;
|
|
98
|
-
margin: 0;
|
|
99
|
-
border: none;
|
|
100
|
-
padding: 0.5rem 0;
|
|
101
|
-
cursor: pointer;
|
|
102
|
-
font-family: inherit;
|
|
103
|
-
color: var(--components-expand-expandabletext-standard-text);
|
|
104
|
-
background: inherit;
|
|
105
|
-
font-size: inherit;
|
|
106
|
-
display: flex;
|
|
107
|
-
align-items: center;
|
|
108
|
-
}
|
|
109
|
-
.eds-contrast .eds-expandable-text__trigger {
|
|
110
|
-
color: var(--components-expand-expandabletext-contrast-text);
|
|
111
|
-
}
|
|
112
|
-
.eds-expandable-text__trigger > h5, .eds-expandable-text__trigger > h4, .eds-expandable-text__trigger > h3, .eds-expandable-text__trigger > h2, .eds-expandable-text__trigger > p {
|
|
113
|
-
margin-top: 0;
|
|
114
|
-
margin-bottom: 0;
|
|
115
|
-
}
|
|
116
|
-
.eds-expandable-text__trigger:focus-visible {
|
|
117
|
-
outline: 2px solid #181c56;
|
|
118
|
-
outline-color: var(--basecolors-stroke-focus-standard);
|
|
119
|
-
outline-offset: 0.125rem;
|
|
120
|
-
}
|
|
121
|
-
.eds-contrast .eds-expandable-text__trigger:focus-visible {
|
|
122
|
-
outline-color: var(--basecolors-stroke-focus-contrast);
|
|
123
|
-
}
|
|
124
|
-
/* DO NOT CHANGE!*/
|
|
125
|
-
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
126
3
|
/* DO NOT CHANGE!*/
|
|
127
4
|
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
128
5
|
/* DO NOT CHANGE!*/
|
|
@@ -310,4 +187,117 @@
|
|
|
310
187
|
.eds-expandable-arrow {
|
|
311
188
|
transition: none !important;
|
|
312
189
|
}
|
|
190
|
+
}/* DO NOT CHANGE!*/
|
|
191
|
+
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
192
|
+
.ReactCollapse--collapse {
|
|
193
|
+
transition: height 0.5s ease-out;
|
|
194
|
+
}/* DO NOT CHANGE!*/
|
|
195
|
+
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
196
|
+
.eds-expandable-arrow {
|
|
197
|
+
color: var(--components-expand-expandablepanel-standard-icon);
|
|
198
|
+
transition: 0.2s transform ease-out;
|
|
199
|
+
}
|
|
200
|
+
.eds-expandable-arrow--open {
|
|
201
|
+
transform: rotate(-180deg);
|
|
202
|
+
}
|
|
203
|
+
.eds-contrast .eds-expandable-arrow {
|
|
204
|
+
color: var(--components-expand-expandablepanel-contrast-icon);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.eds-expandable-text--disable-animation .eds-expandable-arrow,
|
|
208
|
+
.eds-expandable-panel--disable-animation .eds-expandable-arrow {
|
|
209
|
+
transition: none;
|
|
210
|
+
}/* DO NOT CHANGE!*/
|
|
211
|
+
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
212
|
+
.eds-expandable-panel {
|
|
213
|
+
width: 100%;
|
|
214
|
+
position: relative;
|
|
215
|
+
}
|
|
216
|
+
.eds-expandable-panel + .eds-expandable-panel {
|
|
217
|
+
margin-top: 0.125rem;
|
|
218
|
+
}
|
|
219
|
+
.eds-expandable-panel:focus, .eds-expandable-panel:focus-within {
|
|
220
|
+
z-index: 2;
|
|
221
|
+
}
|
|
222
|
+
.eds-expandable-panel__grid {
|
|
223
|
+
display: grid;
|
|
224
|
+
grid-template-columns: auto 2rem;
|
|
225
|
+
}
|
|
226
|
+
.eds-expandable-panel__trigger {
|
|
227
|
+
appearance: none;
|
|
228
|
+
background: var(--components-expand-expandablepanel-standard-fill-default);
|
|
229
|
+
border: none;
|
|
230
|
+
border-radius: 0.25rem;
|
|
231
|
+
color: var(--components-expand-expandablepanel-standard-text);
|
|
232
|
+
cursor: pointer;
|
|
233
|
+
font-family: inherit;
|
|
234
|
+
font-size: inherit;
|
|
235
|
+
margin: 0;
|
|
236
|
+
padding: 1rem 1.5rem 1rem 1.5rem;
|
|
237
|
+
text-align: left;
|
|
238
|
+
user-select: none;
|
|
239
|
+
width: 100%;
|
|
240
|
+
word-break: break-word;
|
|
241
|
+
}
|
|
242
|
+
.eds-contrast .eds-expandable-panel__trigger {
|
|
243
|
+
background: var(--components-expand-expandablepanel-contrast-fill-default);
|
|
244
|
+
color: var(--components-expand-expandablepanel-contrast-text);
|
|
313
245
|
}
|
|
246
|
+
.eds-expandable-panel__trigger:hover {
|
|
247
|
+
background: var(--components-expand-expandablepanel-standard-fill-hover);
|
|
248
|
+
}
|
|
249
|
+
.eds-contrast .eds-expandable-panel__trigger:hover {
|
|
250
|
+
background: var(--components-expand-expandablepanel-contrast-fill-hover);
|
|
251
|
+
}
|
|
252
|
+
.eds-expandable-panel__trigger:focus-visible {
|
|
253
|
+
outline: 2px solid #181c56;
|
|
254
|
+
outline-color: var(--basecolors-stroke-focus-standard);
|
|
255
|
+
outline-offset: 0.125rem;
|
|
256
|
+
}
|
|
257
|
+
.eds-contrast .eds-expandable-panel__trigger:focus-visible {
|
|
258
|
+
outline-color: var(--basecolors-stroke-focus-contrast);
|
|
259
|
+
}
|
|
260
|
+
.eds-expandable-panel__icon-container {
|
|
261
|
+
display: flex;
|
|
262
|
+
align-items: center;
|
|
263
|
+
justify-content: flex-end;
|
|
264
|
+
}
|
|
265
|
+
.eds-expandable-panel__content {
|
|
266
|
+
overflow: auto;
|
|
267
|
+
padding: 1rem 1rem 1rem 1.5rem;
|
|
268
|
+
}
|
|
269
|
+
.eds-expandable-panel .ReactCollapse--collapse {
|
|
270
|
+
transition: height 0.5s ease-out;
|
|
271
|
+
}
|
|
272
|
+
.eds-expandable-panel--disable-animation .ReactCollapse--collapse {
|
|
273
|
+
transition: none;
|
|
274
|
+
}/* DO NOT CHANGE!*/
|
|
275
|
+
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
276
|
+
.eds-expandable-text__trigger {
|
|
277
|
+
appearance: none;
|
|
278
|
+
margin: 0;
|
|
279
|
+
border: none;
|
|
280
|
+
padding: 0.5rem 0;
|
|
281
|
+
cursor: pointer;
|
|
282
|
+
font-family: inherit;
|
|
283
|
+
color: var(--components-expand-expandabletext-standard-text);
|
|
284
|
+
background: inherit;
|
|
285
|
+
font-size: inherit;
|
|
286
|
+
display: flex;
|
|
287
|
+
align-items: center;
|
|
288
|
+
}
|
|
289
|
+
.eds-contrast .eds-expandable-text__trigger {
|
|
290
|
+
color: var(--components-expand-expandabletext-contrast-text);
|
|
291
|
+
}
|
|
292
|
+
.eds-expandable-text__trigger > :is(h5, h4, h3, h2, p) {
|
|
293
|
+
margin-top: 0;
|
|
294
|
+
margin-bottom: 0;
|
|
295
|
+
}
|
|
296
|
+
.eds-expandable-text__trigger:focus-visible {
|
|
297
|
+
outline: 2px solid #181c56;
|
|
298
|
+
outline-color: var(--basecolors-stroke-focus-standard);
|
|
299
|
+
outline-offset: 0.125rem;
|
|
300
|
+
}
|
|
301
|
+
.eds-contrast .eds-expandable-text__trigger:focus-visible {
|
|
302
|
+
outline-color: var(--basecolors-stroke-focus-contrast);
|
|
303
|
+
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@entur/expand",
|
|
3
|
-
"version": "3.6.13
|
|
3
|
+
"version": "3.6.13",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
|
-
"main": "dist/
|
|
5
|
+
"main": "dist/expand.cjs.js",
|
|
6
6
|
"module": "dist/expand.esm.js",
|
|
7
|
-
"
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
8
|
"files": [
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
@@ -17,26 +17,36 @@
|
|
|
17
17
|
"access": "public"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
|
-
"start": "
|
|
21
|
-
"build": "
|
|
22
|
-
"test": "
|
|
23
|
-
"lint": "
|
|
20
|
+
"start": "vite build --watch",
|
|
21
|
+
"build": "vite build",
|
|
22
|
+
"test": "jest",
|
|
23
|
+
"lint": "eslint src"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"react": ">=16.8.0",
|
|
27
27
|
"react-dom": ">=16.8.0"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@entur/icons": "^8.0.
|
|
31
|
-
"@entur/tokens": "^3.19.
|
|
32
|
-
"@entur/typography": "^1.
|
|
33
|
-
"@entur/utils": "^0.12.
|
|
34
|
-
"classnames": "^2.
|
|
30
|
+
"@entur/icons": "^8.0.1",
|
|
31
|
+
"@entur/tokens": "^3.19.2",
|
|
32
|
+
"@entur/typography": "^1.9.13",
|
|
33
|
+
"@entur/utils": "^0.12.4",
|
|
34
|
+
"classnames": "^2.5.1",
|
|
35
35
|
"react-collapse": "^5.1.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
+
"@testing-library/jest-dom": "^5.17.0",
|
|
39
|
+
"@testing-library/react": "^10.4.9",
|
|
40
|
+
"@testing-library/user-event": "14.6.1",
|
|
38
41
|
"@types/react-collapse": "5.0.4",
|
|
39
|
-
"
|
|
42
|
+
"@vitejs/plugin-react": "^5.0.1",
|
|
43
|
+
"eslint": "^7.32.0",
|
|
44
|
+
"jest": "^29.0.0",
|
|
45
|
+
"jest-environment-jsdom": "^29.0.0",
|
|
46
|
+
"ts-jest": "^29.0.0",
|
|
47
|
+
"typescript": "^5.9.2",
|
|
48
|
+
"vite": "^7.1.3",
|
|
49
|
+
"vite-plugin-dts": "^4.5.4"
|
|
40
50
|
},
|
|
41
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "268fb2f3387485206586a7c4c6f2a058f824f5d6"
|
|
42
52
|
}
|
package/dist/Accordion.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
type Id = string | null;
|
|
3
|
-
export type AccordionProps = {
|
|
4
|
-
/** To eller flere AccordionItem-komponenter */
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
[key: string]: any;
|
|
7
|
-
};
|
|
8
|
-
export declare const Accordion: React.FC<AccordionProps>;
|
|
9
|
-
type UseAccordionArgs = {
|
|
10
|
-
id: Id;
|
|
11
|
-
defaultOpen?: boolean;
|
|
12
|
-
};
|
|
13
|
-
export declare const useAccordion: ({ id, defaultOpen }: UseAccordionArgs) => {
|
|
14
|
-
isOpen: boolean;
|
|
15
|
-
toggle: () => void;
|
|
16
|
-
};
|
|
17
|
-
export {};
|
package/dist/AccordionItem.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React, { CSSProperties } from 'react';
|
|
2
|
-
export type AccordionItemProps = {
|
|
3
|
-
/** Teksten som skal stå i panelet */
|
|
4
|
-
title: React.ReactNode;
|
|
5
|
-
/** Innholdet som skal vises under panelet */
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
/** Hvilken tilstand AccordionItem skal ha som default
|
|
8
|
-
* @default false
|
|
9
|
-
*/
|
|
10
|
-
defaultOpen?: boolean;
|
|
11
|
-
/** Styling som sendes til innholdet av AccordionItem */
|
|
12
|
-
contentStyle?: CSSProperties;
|
|
13
|
-
disableAnimation?: boolean;
|
|
14
|
-
[key: string]: any;
|
|
15
|
-
};
|
|
16
|
-
export declare const AccordionItem: React.FC<AccordionItemProps>;
|
package/dist/BaseExpand.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './BaseExpand.scss';
|
|
3
|
-
type BaseExpandProps = {
|
|
4
|
-
/** Innholdet som skal være expandable */
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
/** Boolean for om innholdet vises eller ikke */
|
|
7
|
-
open: boolean;
|
|
8
|
-
[key: string]: any;
|
|
9
|
-
};
|
|
10
|
-
export declare const BaseExpand: React.FC<BaseExpandProps>;
|
|
11
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React, { CSSProperties } from 'react';
|
|
2
|
-
import './BaseExpandablePanel.scss';
|
|
3
|
-
type BaseExpandablePanelProps = {
|
|
4
|
-
/** Teksten som skal stå i panelet */
|
|
5
|
-
title: React.ReactNode;
|
|
6
|
-
/** Innholdet som skal vises under panelet */
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
/** IDen til expand-panelet */
|
|
9
|
-
id: string;
|
|
10
|
-
/** Prop for om innholdet er åpent */
|
|
11
|
-
open: boolean;
|
|
12
|
-
/** Funksjonen som styrer åpningen av BaseExpandablePanel */
|
|
13
|
-
onToggle: () => void;
|
|
14
|
-
/** Styling som sendes til innholdet av BaseExpandablePanel */
|
|
15
|
-
contentStyle?: CSSProperties;
|
|
16
|
-
disableAnimation?: boolean;
|
|
17
|
-
[key: string]: any;
|
|
18
|
-
};
|
|
19
|
-
export declare const BaseExpandablePanel: React.FC<BaseExpandablePanelProps>;
|
|
20
|
-
export {};
|
package/dist/ExpandArrow.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './ExpandArrow.scss';
|
|
3
|
-
type ExpandArrowProps = {
|
|
4
|
-
/** Om innholdet er åpent eller ikke, som bestemmer retningen på pila
|
|
5
|
-
* @default false
|
|
6
|
-
*/
|
|
7
|
-
open?: boolean;
|
|
8
|
-
/** Ekstra klassenavn */
|
|
9
|
-
className?: string;
|
|
10
|
-
[key: string]: any;
|
|
11
|
-
};
|
|
12
|
-
export declare const ExpandArrow: React.FC<ExpandArrowProps>;
|
|
13
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React, { CSSProperties } from 'react';
|
|
2
|
-
export type ExpandablePanelProps = {
|
|
3
|
-
/** Teksten som skal stå i panelet */
|
|
4
|
-
title: React.ReactNode;
|
|
5
|
-
/** Innholdet som skal vises under panelet */
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
/** Hvilken tilstand ExpandablePanel skal ha som default
|
|
8
|
-
* @default false
|
|
9
|
-
*/
|
|
10
|
-
defaultOpen?: boolean;
|
|
11
|
-
/** Funksjonen som styrer åpningen av ExpandablePanel */
|
|
12
|
-
onToggle?: () => void;
|
|
13
|
-
/** Styling som sendes til innholdet av ExpandablePanel */
|
|
14
|
-
contentStyle?: CSSProperties;
|
|
15
|
-
[key: string]: any;
|
|
16
|
-
};
|
|
17
|
-
export declare const ExpandablePanel: React.FC<ExpandablePanelProps>;
|
package/dist/ExpandableText.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React, { CSSProperties } from 'react';
|
|
2
|
-
import './ExpandableText.scss';
|
|
3
|
-
export type ExpandableTextProps = {
|
|
4
|
-
/** Teksten som skal "vises" */
|
|
5
|
-
title: React.ReactNode;
|
|
6
|
-
/** Innholdet som skal vises under linken */
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
/** Hvilken tilstand ExpandableText skal ha som default (med mindre den er kontrollert)
|
|
9
|
-
* @default false
|
|
10
|
-
*/
|
|
11
|
-
defaultOpen?: boolean;
|
|
12
|
-
/** Prop for om innholdet er åpent. Brukes hvis du vil kontrollere ExpandableText, sammen med onToggle */
|
|
13
|
-
open?: boolean;
|
|
14
|
-
/** Funksjonen som styrer åpningen av ExpandableText */
|
|
15
|
-
onToggle?: () => void;
|
|
16
|
-
/**Styling som sendes til innholdet av ExpandableText */
|
|
17
|
-
contentStyle?: CSSProperties;
|
|
18
|
-
/** Hvilket typografisk element tittelen er
|
|
19
|
-
* @default "Heading5"
|
|
20
|
-
*/
|
|
21
|
-
titleElement?: 'Heading5' | 'Paragraph' | 'SubParagraph';
|
|
22
|
-
disableAnimation?: boolean;
|
|
23
|
-
[key: string]: any;
|
|
24
|
-
};
|
|
25
|
-
export declare const ExpandableText: React.FC<ExpandableTextProps>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export type ExandableTextButtonProps = {
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
/** Prop for om innholdet er åpent */
|
|
5
|
-
open?: boolean;
|
|
6
|
-
/** Funksjonen som styrer åpningen av ExpandableTextButton */
|
|
7
|
-
onToggle: () => void;
|
|
8
|
-
/** Den typografiske komponenten for tittelen
|
|
9
|
-
* @default Heading5
|
|
10
|
-
*/
|
|
11
|
-
as?: React.ElementType;
|
|
12
|
-
[key: string]: any;
|
|
13
|
-
};
|
|
14
|
-
export declare const ExpandableTextButton: React.FC<ExandableTextButtonProps>;
|