@norges-domstoler/dds-components 10.4.1 → 10.6.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/cjs/components/Card/Card.stories.d.ts +1 -0
- package/dist/cjs/components/Card/CardAccordion/CardAccordionBody.d.ts +4 -0
- package/dist/cjs/components/Card/CardAccordion/CardAccordionHeader.d.ts +14 -0
- package/dist/cjs/icons/tsx/doubleChevronLeft.d.ts +2 -0
- package/dist/cjs/icons/tsx/doubleChevronRight.d.ts +2 -0
- package/dist/cjs/icons/tsx/index.d.ts +2 -0
- package/dist/cjs/index.js +48 -7
- package/dist/components/Card/Card.stories.d.ts +1 -0
- package/dist/components/Card/CardAccordion/CardAccordionBody.d.ts +4 -0
- package/dist/components/Card/CardAccordion/CardAccordionBody.js +7 -3
- package/dist/components/Card/CardAccordion/CardAccordionHeader.d.ts +14 -0
- package/dist/components/Card/CardAccordion/CardAccordionHeader.js +26 -7
- package/dist/icons/tsx/doubleChevronLeft.d.ts +2 -0
- package/dist/icons/tsx/doubleChevronLeft.js +12 -0
- package/dist/icons/tsx/doubleChevronRight.d.ts +2 -0
- package/dist/icons/tsx/doubleChevronRight.js +12 -0
- package/dist/icons/tsx/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/package.json +3 -3
|
@@ -8,4 +8,5 @@ export declare const Overview: () => JSX.Element;
|
|
|
8
8
|
export declare const Default: (args: CardProps) => JSX.Element;
|
|
9
9
|
export declare const Accordion: (args: ExpandableCardProps) => JSX.Element;
|
|
10
10
|
export declare const AccordionControlled: (args: ExpandableCardProps) => JSX.Element;
|
|
11
|
+
export declare const AccordionCustom: (args: ExpandableCardProps) => JSX.Element;
|
|
11
12
|
export declare const Examples: (args: CardProps) => JSX.Element;
|
|
@@ -7,6 +7,8 @@ export type CardAccordionBodyProps = BaseComponentPropsWithChildren<HTMLDivEleme
|
|
|
7
7
|
headerId?: string;
|
|
8
8
|
/**Overskriver default padding på toppen. Brukes når barn har spacing på toppen, f.eks. en overskrift. */
|
|
9
9
|
paddingTop?: Property.PaddingTop<string>;
|
|
10
|
+
/**Overskriver default padding. */
|
|
11
|
+
padding?: Property.Padding<string>;
|
|
10
12
|
}>;
|
|
11
13
|
export declare const CardAccordionBody: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLDivElement>, "className" | "id"> & {
|
|
12
14
|
/** **OBS!** denne propen blir satt automatisk av forelder. Forteller komponenten om den skal utvides. */
|
|
@@ -15,6 +17,8 @@ export declare const CardAccordionBody: import("react").ForwardRefExoticComponen
|
|
|
15
17
|
headerId?: string | undefined;
|
|
16
18
|
/**Overskriver default padding på toppen. Brukes når barn har spacing på toppen, f.eks. en overskrift. */
|
|
17
19
|
paddingTop?: Property.PaddingTop<string> | undefined;
|
|
20
|
+
/**Overskriver default padding. */
|
|
21
|
+
padding?: Property.Padding<string> | undefined;
|
|
18
22
|
} & {
|
|
19
23
|
children?: import("react").ReactNode;
|
|
20
24
|
} & {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes } from 'react';
|
|
2
2
|
import { BaseComponentPropsWithChildren } from '../../../types';
|
|
3
|
+
import { Property } from 'csstype';
|
|
4
|
+
import { StaticTypographyType } from '../../Typography';
|
|
3
5
|
export type CardAccordionHeaderProps = BaseComponentPropsWithChildren<HTMLButtonElement, {
|
|
4
6
|
/** **OBS!** denne propen blir satt automatisk av forelder. Forteller body er utvidet. */
|
|
5
7
|
isExpanded?: boolean;
|
|
@@ -7,6 +9,12 @@ export type CardAccordionHeaderProps = BaseComponentPropsWithChildren<HTMLButton
|
|
|
7
9
|
toggleExpanded?: () => void;
|
|
8
10
|
/** **OBS!** denne propen blir satt automatisk av forelder. Forteller `id` til `<CardAccordionBody />`. */
|
|
9
11
|
bodyId?: string;
|
|
12
|
+
/**Overskriver default padding. */
|
|
13
|
+
padding?: Property.Padding<string>;
|
|
14
|
+
/**Overskriver default teksttype. */
|
|
15
|
+
typographyType?: StaticTypographyType;
|
|
16
|
+
/**Angir om teksten skal være i "bold"-format. */
|
|
17
|
+
bold?: boolean;
|
|
10
18
|
}, ButtonHTMLAttributes<HTMLButtonElement>>;
|
|
11
19
|
export declare const CardAccordionHeader: import("react").ForwardRefExoticComponent<Pick<ButtonHTMLAttributes<HTMLButtonElement>, "className" | "id"> & {
|
|
12
20
|
/** **OBS!** denne propen blir satt automatisk av forelder. Forteller body er utvidet. */
|
|
@@ -15,6 +23,12 @@ export declare const CardAccordionHeader: import("react").ForwardRefExoticCompon
|
|
|
15
23
|
toggleExpanded?: (() => void) | undefined;
|
|
16
24
|
/** **OBS!** denne propen blir satt automatisk av forelder. Forteller `id` til `<CardAccordionBody />`. */
|
|
17
25
|
bodyId?: string | undefined;
|
|
26
|
+
/**Overskriver default padding. */
|
|
27
|
+
padding?: Property.Padding<string> | undefined;
|
|
28
|
+
/**Overskriver default teksttype. */
|
|
29
|
+
typographyType?: StaticTypographyType | undefined;
|
|
30
|
+
/**Angir om teksten skal være i "bold"-format. */
|
|
31
|
+
bold?: boolean | undefined;
|
|
18
32
|
} & {
|
|
19
33
|
children?: import("react").ReactNode;
|
|
20
34
|
} & {
|
|
@@ -37,6 +37,8 @@ export * from './copy';
|
|
|
37
37
|
export * from './court';
|
|
38
38
|
export * from './dateRange';
|
|
39
39
|
export * from './deaths';
|
|
40
|
+
export * from './doubleChevronLeft';
|
|
41
|
+
export * from './doubleChevronRight';
|
|
40
42
|
export * from './download';
|
|
41
43
|
export * from './downloadDone';
|
|
42
44
|
export * from './dragHandle';
|
package/dist/cjs/index.js
CHANGED
|
@@ -1262,6 +1262,22 @@ function DeathsIcon(props) {
|
|
|
1262
1262
|
}));
|
|
1263
1263
|
}
|
|
1264
1264
|
|
|
1265
|
+
function DoubleChevronLeftIcon(props) {
|
|
1266
|
+
return jsxRuntime.jsx(SvgWrapper, Object.assign({}, props, {
|
|
1267
|
+
children: jsxRuntime.jsx("path", {
|
|
1268
|
+
d: "M 18.414,7.41398L 17,6L 11,12L 17,18L 18.414,16.586L 13.828,12L 18.414,7.41398 Z M 12.414,7.41398L 11,6L 5.00001,12L 11,18L 12.414,16.586L 7.82801,12L 12.414,7.41398 Z "
|
|
1269
|
+
})
|
|
1270
|
+
}));
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
function DoubleChevronRightIcon(props) {
|
|
1274
|
+
return jsxRuntime.jsx(SvgWrapper, Object.assign({}, props, {
|
|
1275
|
+
children: jsxRuntime.jsx("path", {
|
|
1276
|
+
d: "M 5.586,7.41398L 7,6L 13,12L 7,18L 5.586,16.586L 10.172,12L 5.586,7.41398 Z M 11.586,7.41399L 13,6.00001L 19,12L 13,18L 11.586,16.586L 16.172,12L 11.586,7.41399 Z "
|
|
1277
|
+
})
|
|
1278
|
+
}));
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1265
1281
|
function DownloadIcon(props) {
|
|
1266
1282
|
return jsxRuntime.jsx(SvgWrapper, Object.assign({}, props, {
|
|
1267
1283
|
children: jsxRuntime.jsx("path", {
|
|
@@ -7429,10 +7445,22 @@ var ContentWrapper = styled__default.default.div.withConfig({
|
|
|
7429
7445
|
displayName: "CardAccordionHeader__ContentWrapper",
|
|
7430
7446
|
componentId: "sc-1qs6bkj-0"
|
|
7431
7447
|
})(["text-align:left;"]);
|
|
7448
|
+
function getPadding$1(props) {
|
|
7449
|
+
var padding = props.padding;
|
|
7450
|
+
return padding || header.padding;
|
|
7451
|
+
}
|
|
7452
|
+
function getTypographyType(props) {
|
|
7453
|
+
var typographyType = props.typographyType;
|
|
7454
|
+
return typographyType || typographyTypes$3.header;
|
|
7455
|
+
}
|
|
7432
7456
|
var HeaderContainer$2 = styled__default.default.div.withConfig({
|
|
7433
7457
|
displayName: "CardAccordionHeader__HeaderContainer",
|
|
7434
7458
|
componentId: "sc-1qs6bkj-1"
|
|
7435
|
-
})(["display:flex;justify-content:space-between;align-items:center;@media (prefers-reduced-motion:no-preference){transition:box-shadow 0.2s;}padding:", ";", ""],
|
|
7459
|
+
})(["display:flex;justify-content:space-between;align-items:center;@media (prefers-reduced-motion:no-preference){transition:box-shadow 0.2s;}padding:", ";", " ", ""], getPadding$1, function (props) {
|
|
7460
|
+
return getFontStyling(getTypographyType(props));
|
|
7461
|
+
}, function (props) {
|
|
7462
|
+
return props.bold && styled.css(["font-weight:600;"]);
|
|
7463
|
+
});
|
|
7436
7464
|
var HeaderWrapper = styled__default.default.button.withConfig({
|
|
7437
7465
|
displayName: "CardAccordionHeader__HeaderWrapper",
|
|
7438
7466
|
componentId: "sc-1qs6bkj-2"
|
|
@@ -7450,7 +7478,10 @@ var CardAccordionHeader = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
7450
7478
|
id = props.id,
|
|
7451
7479
|
className = props.className,
|
|
7452
7480
|
htmlProps = props.htmlProps,
|
|
7453
|
-
|
|
7481
|
+
padding = props.padding,
|
|
7482
|
+
typographyType = props.typographyType,
|
|
7483
|
+
bold = props.bold,
|
|
7484
|
+
rest = tslib.__rest(props, ["children", "isExpanded", "toggleExpanded", "bodyId", "id", "className", "htmlProps", "padding", "typographyType", "bold"]);
|
|
7454
7485
|
var handleClick = function handleClick() {
|
|
7455
7486
|
if (toggleExpanded) {
|
|
7456
7487
|
toggleExpanded();
|
|
@@ -7468,13 +7499,17 @@ var CardAccordionHeader = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
7468
7499
|
height: cardAccordionTokens.chevron.height
|
|
7469
7500
|
};
|
|
7470
7501
|
return jsxRuntime.jsx(HeaderWrapper, Object.assign({}, headerWrapperProps, {
|
|
7471
|
-
children: jsxRuntime.jsxs(HeaderContainer$2, {
|
|
7472
|
-
|
|
7473
|
-
|
|
7502
|
+
children: jsxRuntime.jsxs(HeaderContainer$2, Object.assign({
|
|
7503
|
+
typographyType: typographyType,
|
|
7504
|
+
padding: padding,
|
|
7505
|
+
bold: bold
|
|
7506
|
+
}, {
|
|
7507
|
+
children: [jsxRuntime.jsx(ContentWrapper, {
|
|
7508
|
+
children: children
|
|
7474
7509
|
}), jsxRuntime.jsx(ChevronWrapper, {
|
|
7475
7510
|
children: jsxRuntime.jsx(AnimatedChevronUpDown, Object.assign({}, chevronProps))
|
|
7476
7511
|
})]
|
|
7477
|
-
})
|
|
7512
|
+
}))
|
|
7478
7513
|
}));
|
|
7479
7514
|
});
|
|
7480
7515
|
|
|
@@ -7492,13 +7527,17 @@ var useIsMounted = function useIsMounted() {
|
|
|
7492
7527
|
};
|
|
7493
7528
|
|
|
7494
7529
|
var expandingAnimation = styled.css(["@media (prefers-reduced-motion:no-preference){transition:padding 0.2s,visibility 0.3s,max-height 0.2s cubic-bezier(0.4,0,0.2,1);}"]);
|
|
7530
|
+
function getPadding(props) {
|
|
7531
|
+
var padding = props.padding;
|
|
7532
|
+
return padding || cardAccordionTokens.body.padding;
|
|
7533
|
+
}
|
|
7495
7534
|
var Body = styled__default.default.div.withConfig({
|
|
7496
7535
|
displayName: "CardAccordionBody__Body",
|
|
7497
7536
|
componentId: "sc-igsnpx-0"
|
|
7498
7537
|
})(["@media (prefers-reduced-motion:no-preference){", "}padding:", ";", " ", " ", ""], function (_ref) {
|
|
7499
7538
|
var animate = _ref.animate;
|
|
7500
7539
|
return animate && expandingAnimation;
|
|
7501
|
-
},
|
|
7540
|
+
}, getPadding, getFontStyling(typographyTypes$3.body), function (_ref2) {
|
|
7502
7541
|
var paddingTop = _ref2.paddingTop;
|
|
7503
7542
|
return paddingTop && styled.css(["padding-top:", ";"], paddingTop);
|
|
7504
7543
|
}, function (_ref3) {
|
|
@@ -11548,6 +11587,8 @@ exports.DescriptionListDesc = DescriptionListDesc;
|
|
|
11548
11587
|
exports.DescriptionListGroup = DescriptionListGroup;
|
|
11549
11588
|
exports.DescriptionListTerm = DescriptionListTerm;
|
|
11550
11589
|
exports.Divider = Divider;
|
|
11590
|
+
exports.DoubleChevronLeftIcon = DoubleChevronLeftIcon;
|
|
11591
|
+
exports.DoubleChevronRightIcon = DoubleChevronRightIcon;
|
|
11551
11592
|
exports.DownloadDoneIcon = DownloadDoneIcon;
|
|
11552
11593
|
exports.DownloadIcon = DownloadIcon;
|
|
11553
11594
|
exports.DragHandleIcon = DragHandleIcon;
|
|
@@ -8,4 +8,5 @@ export declare const Overview: () => JSX.Element;
|
|
|
8
8
|
export declare const Default: (args: CardProps) => JSX.Element;
|
|
9
9
|
export declare const Accordion: (args: ExpandableCardProps) => JSX.Element;
|
|
10
10
|
export declare const AccordionControlled: (args: ExpandableCardProps) => JSX.Element;
|
|
11
|
+
export declare const AccordionCustom: (args: ExpandableCardProps) => JSX.Element;
|
|
11
12
|
export declare const Examples: (args: CardProps) => JSX.Element;
|
|
@@ -7,6 +7,8 @@ export type CardAccordionBodyProps = BaseComponentPropsWithChildren<HTMLDivEleme
|
|
|
7
7
|
headerId?: string;
|
|
8
8
|
/**Overskriver default padding på toppen. Brukes når barn har spacing på toppen, f.eks. en overskrift. */
|
|
9
9
|
paddingTop?: Property.PaddingTop<string>;
|
|
10
|
+
/**Overskriver default padding. */
|
|
11
|
+
padding?: Property.Padding<string>;
|
|
10
12
|
}>;
|
|
11
13
|
export declare const CardAccordionBody: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLDivElement>, "className" | "id"> & {
|
|
12
14
|
/** **OBS!** denne propen blir satt automatisk av forelder. Forteller komponenten om den skal utvides. */
|
|
@@ -15,6 +17,8 @@ export declare const CardAccordionBody: import("react").ForwardRefExoticComponen
|
|
|
15
17
|
headerId?: string | undefined;
|
|
16
18
|
/**Overskriver default padding på toppen. Brukes når barn har spacing på toppen, f.eks. en overskrift. */
|
|
17
19
|
paddingTop?: Property.PaddingTop<string> | undefined;
|
|
20
|
+
/**Overskriver default padding. */
|
|
21
|
+
padding?: Property.Padding<string> | undefined;
|
|
18
22
|
} & {
|
|
19
23
|
children?: import("react").ReactNode;
|
|
20
24
|
} & {
|
|
@@ -3,19 +3,23 @@ import { __rest } from 'tslib';
|
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
import { forwardRef, useRef, useState, useLayoutEffect, useEffect } from 'react';
|
|
5
5
|
import styled, { css } from 'styled-components';
|
|
6
|
-
import { cardAccordionTokens, typographyTypes } from './CardAccordion.tokens.js';
|
|
7
|
-
import { getBaseHTMLProps } from '../../../types/BaseComponentProps.js';
|
|
8
6
|
import useIsMounted from '../../../hooks/useIsMounted.js';
|
|
7
|
+
import { getBaseHTMLProps } from '../../../types/BaseComponentProps.js';
|
|
9
8
|
import { getFontStyling } from '../../Typography/Typography.utils.js';
|
|
9
|
+
import { cardAccordionTokens, typographyTypes } from './CardAccordion.tokens.js';
|
|
10
10
|
|
|
11
11
|
var expandingAnimation = css(["@media (prefers-reduced-motion:no-preference){transition:padding 0.2s,visibility 0.3s,max-height 0.2s cubic-bezier(0.4,0,0.2,1);}"]);
|
|
12
|
+
function getPadding(props) {
|
|
13
|
+
var padding = props.padding;
|
|
14
|
+
return padding || cardAccordionTokens.body.padding;
|
|
15
|
+
}
|
|
12
16
|
var Body = styled.div.withConfig({
|
|
13
17
|
displayName: "CardAccordionBody__Body",
|
|
14
18
|
componentId: "sc-igsnpx-0"
|
|
15
19
|
})(["@media (prefers-reduced-motion:no-preference){", "}padding:", ";", " ", " ", ""], function (_ref) {
|
|
16
20
|
var animate = _ref.animate;
|
|
17
21
|
return animate && expandingAnimation;
|
|
18
|
-
},
|
|
22
|
+
}, getPadding, getFontStyling(typographyTypes.body), function (_ref2) {
|
|
19
23
|
var paddingTop = _ref2.paddingTop;
|
|
20
24
|
return paddingTop && css(["padding-top:", ";"], paddingTop);
|
|
21
25
|
}, function (_ref3) {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes } from 'react';
|
|
2
2
|
import { BaseComponentPropsWithChildren } from '../../../types';
|
|
3
|
+
import { Property } from 'csstype';
|
|
4
|
+
import { StaticTypographyType } from '../../Typography';
|
|
3
5
|
export type CardAccordionHeaderProps = BaseComponentPropsWithChildren<HTMLButtonElement, {
|
|
4
6
|
/** **OBS!** denne propen blir satt automatisk av forelder. Forteller body er utvidet. */
|
|
5
7
|
isExpanded?: boolean;
|
|
@@ -7,6 +9,12 @@ export type CardAccordionHeaderProps = BaseComponentPropsWithChildren<HTMLButton
|
|
|
7
9
|
toggleExpanded?: () => void;
|
|
8
10
|
/** **OBS!** denne propen blir satt automatisk av forelder. Forteller `id` til `<CardAccordionBody />`. */
|
|
9
11
|
bodyId?: string;
|
|
12
|
+
/**Overskriver default padding. */
|
|
13
|
+
padding?: Property.Padding<string>;
|
|
14
|
+
/**Overskriver default teksttype. */
|
|
15
|
+
typographyType?: StaticTypographyType;
|
|
16
|
+
/**Angir om teksten skal være i "bold"-format. */
|
|
17
|
+
bold?: boolean;
|
|
10
18
|
}, ButtonHTMLAttributes<HTMLButtonElement>>;
|
|
11
19
|
export declare const CardAccordionHeader: import("react").ForwardRefExoticComponent<Pick<ButtonHTMLAttributes<HTMLButtonElement>, "className" | "id"> & {
|
|
12
20
|
/** **OBS!** denne propen blir satt automatisk av forelder. Forteller body er utvidet. */
|
|
@@ -15,6 +23,12 @@ export declare const CardAccordionHeader: import("react").ForwardRefExoticCompon
|
|
|
15
23
|
toggleExpanded?: (() => void) | undefined;
|
|
16
24
|
/** **OBS!** denne propen blir satt automatisk av forelder. Forteller `id` til `<CardAccordionBody />`. */
|
|
17
25
|
bodyId?: string | undefined;
|
|
26
|
+
/**Overskriver default padding. */
|
|
27
|
+
padding?: Property.Padding<string> | undefined;
|
|
28
|
+
/**Overskriver default teksttype. */
|
|
29
|
+
typographyType?: StaticTypographyType | undefined;
|
|
30
|
+
/**Angir om teksten skal være i "bold"-format. */
|
|
31
|
+
bold?: boolean | undefined;
|
|
18
32
|
} & {
|
|
19
33
|
children?: import("react").ReactNode;
|
|
20
34
|
} & {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __rest } from 'tslib';
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
|
-
import styled from 'styled-components';
|
|
4
|
+
import styled, { css } from 'styled-components';
|
|
5
5
|
import { cardAccordionTokens, typographyTypes } from './CardAccordion.tokens.js';
|
|
6
6
|
import '../../../helpers/Backdrop/Backdrop.js';
|
|
7
7
|
import { AnimatedChevronUpDown } from '../../../helpers/Chevron/AnimatedChevronUpDown.js';
|
|
@@ -27,10 +27,22 @@ var ContentWrapper = styled.div.withConfig({
|
|
|
27
27
|
displayName: "CardAccordionHeader__ContentWrapper",
|
|
28
28
|
componentId: "sc-1qs6bkj-0"
|
|
29
29
|
})(["text-align:left;"]);
|
|
30
|
+
function getPadding(props) {
|
|
31
|
+
var padding = props.padding;
|
|
32
|
+
return padding || header.padding;
|
|
33
|
+
}
|
|
34
|
+
function getTypographyType(props) {
|
|
35
|
+
var typographyType = props.typographyType;
|
|
36
|
+
return typographyType || typographyTypes.header;
|
|
37
|
+
}
|
|
30
38
|
var HeaderContainer = styled.div.withConfig({
|
|
31
39
|
displayName: "CardAccordionHeader__HeaderContainer",
|
|
32
40
|
componentId: "sc-1qs6bkj-1"
|
|
33
|
-
})(["display:flex;justify-content:space-between;align-items:center;@media (prefers-reduced-motion:no-preference){transition:box-shadow 0.2s;}padding:", ";", ""],
|
|
41
|
+
})(["display:flex;justify-content:space-between;align-items:center;@media (prefers-reduced-motion:no-preference){transition:box-shadow 0.2s;}padding:", ";", " ", ""], getPadding, function (props) {
|
|
42
|
+
return getFontStyling(getTypographyType(props));
|
|
43
|
+
}, function (props) {
|
|
44
|
+
return props.bold && css(["font-weight:600;"]);
|
|
45
|
+
});
|
|
34
46
|
var HeaderWrapper = styled.button.withConfig({
|
|
35
47
|
displayName: "CardAccordionHeader__HeaderWrapper",
|
|
36
48
|
componentId: "sc-1qs6bkj-2"
|
|
@@ -48,7 +60,10 @@ var CardAccordionHeader = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
48
60
|
id = props.id,
|
|
49
61
|
className = props.className,
|
|
50
62
|
htmlProps = props.htmlProps,
|
|
51
|
-
|
|
63
|
+
padding = props.padding,
|
|
64
|
+
typographyType = props.typographyType,
|
|
65
|
+
bold = props.bold,
|
|
66
|
+
rest = __rest(props, ["children", "isExpanded", "toggleExpanded", "bodyId", "id", "className", "htmlProps", "padding", "typographyType", "bold"]);
|
|
52
67
|
var handleClick = function handleClick() {
|
|
53
68
|
if (toggleExpanded) {
|
|
54
69
|
toggleExpanded();
|
|
@@ -66,13 +81,17 @@ var CardAccordionHeader = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
66
81
|
height: cardAccordionTokens.chevron.height
|
|
67
82
|
};
|
|
68
83
|
return jsx(HeaderWrapper, Object.assign({}, headerWrapperProps, {
|
|
69
|
-
children: jsxs(HeaderContainer, {
|
|
70
|
-
|
|
71
|
-
|
|
84
|
+
children: jsxs(HeaderContainer, Object.assign({
|
|
85
|
+
typographyType: typographyType,
|
|
86
|
+
padding: padding,
|
|
87
|
+
bold: bold
|
|
88
|
+
}, {
|
|
89
|
+
children: [jsx(ContentWrapper, {
|
|
90
|
+
children: children
|
|
72
91
|
}), jsx(ChevronWrapper, {
|
|
73
92
|
children: jsx(AnimatedChevronUpDown, Object.assign({}, chevronProps))
|
|
74
93
|
})]
|
|
75
|
-
})
|
|
94
|
+
}))
|
|
76
95
|
}));
|
|
77
96
|
});
|
|
78
97
|
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { SvgWrapper } from '../utils/SvgWrapper.js';
|
|
3
|
+
|
|
4
|
+
function DoubleChevronLeftIcon(props) {
|
|
5
|
+
return jsx(SvgWrapper, Object.assign({}, props, {
|
|
6
|
+
children: jsx("path", {
|
|
7
|
+
d: "M 18.414,7.41398L 17,6L 11,12L 17,18L 18.414,16.586L 13.828,12L 18.414,7.41398 Z M 12.414,7.41398L 11,6L 5.00001,12L 11,18L 12.414,16.586L 7.82801,12L 12.414,7.41398 Z "
|
|
8
|
+
})
|
|
9
|
+
}));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { DoubleChevronLeftIcon };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { SvgWrapper } from '../utils/SvgWrapper.js';
|
|
3
|
+
|
|
4
|
+
function DoubleChevronRightIcon(props) {
|
|
5
|
+
return jsx(SvgWrapper, Object.assign({}, props, {
|
|
6
|
+
children: jsx("path", {
|
|
7
|
+
d: "M 5.586,7.41398L 7,6L 13,12L 7,18L 5.586,16.586L 10.172,12L 5.586,7.41398 Z M 11.586,7.41399L 13,6.00001L 19,12L 13,18L 11.586,16.586L 16.172,12L 11.586,7.41399 Z "
|
|
8
|
+
})
|
|
9
|
+
}));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { DoubleChevronRightIcon };
|
|
@@ -37,6 +37,8 @@ export * from './copy';
|
|
|
37
37
|
export * from './court';
|
|
38
38
|
export * from './dateRange';
|
|
39
39
|
export * from './deaths';
|
|
40
|
+
export * from './doubleChevronLeft';
|
|
41
|
+
export * from './doubleChevronRight';
|
|
40
42
|
export * from './download';
|
|
41
43
|
export * from './downloadDone';
|
|
42
44
|
export * from './dragHandle';
|
package/dist/index.js
CHANGED
|
@@ -100,6 +100,8 @@ export { CopyIcon } from './icons/tsx/copy.js';
|
|
|
100
100
|
export { CourtIcon } from './icons/tsx/court.js';
|
|
101
101
|
export { DateRangeIcon } from './icons/tsx/dateRange.js';
|
|
102
102
|
export { DeathsIcon } from './icons/tsx/deaths.js';
|
|
103
|
+
export { DoubleChevronLeftIcon } from './icons/tsx/doubleChevronLeft.js';
|
|
104
|
+
export { DoubleChevronRightIcon } from './icons/tsx/doubleChevronRight.js';
|
|
103
105
|
export { DownloadIcon } from './icons/tsx/download.js';
|
|
104
106
|
export { DownloadDoneIcon } from './icons/tsx/downloadDone.js';
|
|
105
107
|
export { DragHandleIcon } from './icons/tsx/dragHandle.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@norges-domstoler/dds-components",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.6.0",
|
|
4
4
|
"description": "React components used in Elsa - domstolenes designsystem",
|
|
5
5
|
"author": "Elsa team",
|
|
6
6
|
"license": "MIT",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@testing-library/jest-dom": "^5.16.5",
|
|
68
68
|
"@testing-library/react": "^13.4.0",
|
|
69
69
|
"@testing-library/user-event": "^14.4.3",
|
|
70
|
-
"@types/jest": "^29.0
|
|
70
|
+
"@types/jest": "^29.4.0",
|
|
71
71
|
"@types/react": "^18.0.21",
|
|
72
72
|
"@types/react-dom": "^18.0.6",
|
|
73
73
|
"@types/styled-components": "^5.1.26",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"eslint-plugin-prettier": "^4.2.1",
|
|
82
82
|
"eslint-plugin-react": "^7.31.8",
|
|
83
83
|
"eslint-plugin-storybook": "^0.6.4",
|
|
84
|
-
"jest": "^29.
|
|
84
|
+
"jest": "^29.4.2",
|
|
85
85
|
"jest-environment-jsdom": "^29.0.3",
|
|
86
86
|
"react": "^18.2.0",
|
|
87
87
|
"react-dom": "^18.2.0",
|