@helsenorge/designsystem-react 11.3.0 → 11.4.1
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/CHANGELOG.md +1609 -912
- package/LazyIcon.js +1 -1
- package/LazyIcon.js.map +1 -1
- package/ListHeader.js +1 -1
- package/ListHeader.js.map +1 -1
- package/NotificationBadge.js +1 -1
- package/NotificationBadge.js.map +1 -1
- package/Panel.js +20 -9
- package/Panel.js.map +1 -1
- package/StatusDot.js +9 -0
- package/StatusDot.js.map +1 -1
- package/components/ArticleTeaser/styles.module.scss +7 -3
- package/components/Icons/AdditionalIconInformation.d.ts +4 -0
- package/components/Icons/AdditionalIconInformation.js +2 -1
- package/components/Icons/AdditionalIconInformation.js.map +1 -1
- package/components/Icons/DotActive.d.ts +4 -0
- package/components/Icons/DotActive.js +16 -0
- package/components/Icons/DotActive.js.map +1 -0
- package/components/Icons/DotInactive.d.ts +4 -0
- package/components/Icons/DotInactive.js +30 -0
- package/components/Icons/DotInactive.js.map +1 -0
- package/components/Icons/DotPending.d.ts +4 -0
- package/components/Icons/DotPending.js +16 -0
- package/components/Icons/DotPending.js.map +1 -0
- package/components/Icons/IconNames.d.ts +1 -1
- package/components/Icons/IconNames.js +4 -0
- package/components/Icons/IconNames.js.map +1 -1
- package/components/Icons/TreatmentAids.d.ts +4 -0
- package/components/Icons/TreatmentAids.js +41 -0
- package/components/Icons/TreatmentAids.js.map +1 -0
- package/components/NotificationPanel/styles.module.scss +1 -1
- package/components/Panel/Panel.d.ts +12 -8
- package/components/Panel/styles.module.scss +10 -1
- package/components/Panel/styles.module.scss.d.ts +2 -0
- package/components/StatusDot/StatusDot.d.ts +4 -1
- package/components/StatusDot/styles.module.scss +12 -6
- package/components/StatusDot/styles.module.scss.d.ts +3 -0
- package/components/Step/Step.d.ts +4 -0
- package/components/Step/index.js +5 -2
- package/components/Step/index.js.map +1 -1
- package/designsystem-react.css +1 -1
- package/package.json +1 -1
- package/scss/supernova/styles/colors.css +1 -1
|
@@ -37,6 +37,8 @@ export interface PanelProps {
|
|
|
37
37
|
color?: PanelColors;
|
|
38
38
|
/** Sets classes on the outermost container of the panel */
|
|
39
39
|
className?: string;
|
|
40
|
+
/** Action called when toggling expansion of ExpandedContent */
|
|
41
|
+
onExpand?: () => void;
|
|
40
42
|
/** Sets the stacking order of the content boxes */
|
|
41
43
|
stacking?: PanelStacking;
|
|
42
44
|
/** Sets the data-testid attribute. */
|
|
@@ -48,14 +50,7 @@ export interface PanelProps {
|
|
|
48
50
|
/** Resources for component */
|
|
49
51
|
resources?: Partial<HNDesignsystemPanel>;
|
|
50
52
|
}
|
|
51
|
-
declare const
|
|
52
|
-
PreContainer: React.FC<ContentProps>;
|
|
53
|
-
Title: React.FC<PanelTitleProps>;
|
|
54
|
-
A: React.FC<ContentProps>;
|
|
55
|
-
B: React.FC<ContentProps>;
|
|
56
|
-
C: React.FC<ContentProps>;
|
|
57
|
-
ExpandedContent: React.FC<ContentProps>;
|
|
58
|
-
};
|
|
53
|
+
declare const PanelRoot: React.ForwardRefExoticComponent<PanelProps & React.RefAttributes<HTMLDivElement>>;
|
|
59
54
|
export interface ContentProps {
|
|
60
55
|
/** Children elements to be rendered inside the content box */
|
|
61
56
|
children?: React.ReactNode;
|
|
@@ -65,4 +60,13 @@ export declare const A: React.FC<ContentProps>;
|
|
|
65
60
|
export declare const B: React.FC<ContentProps>;
|
|
66
61
|
export declare const C: React.FC<ContentProps>;
|
|
67
62
|
export declare const ExpandedContent: React.FC<ContentProps>;
|
|
63
|
+
type PanelComponent = typeof PanelRoot & {
|
|
64
|
+
PreContainer: React.FC<ContentProps>;
|
|
65
|
+
Title: React.FC<PanelTitleProps>;
|
|
66
|
+
A: React.FC<ContentProps>;
|
|
67
|
+
B: React.FC<ContentProps>;
|
|
68
|
+
C: React.FC<ContentProps>;
|
|
69
|
+
ExpandedContent: React.FC<ContentProps>;
|
|
70
|
+
};
|
|
71
|
+
declare const Panel: PanelComponent;
|
|
68
72
|
export default Panel;
|
|
@@ -138,7 +138,15 @@
|
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
&--fill--neutral {
|
|
141
|
-
border: 1px solid var(--
|
|
141
|
+
border: 1px solid var(--color-base-border-neutral-emphasized);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
&--fill--new {
|
|
145
|
+
border: 1px solid var(--core-color-blueberry-200);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&--fill--status {
|
|
149
|
+
border-left: none;
|
|
142
150
|
}
|
|
143
151
|
}
|
|
144
152
|
|
|
@@ -154,6 +162,7 @@
|
|
|
154
162
|
|
|
155
163
|
&--new {
|
|
156
164
|
border-left-color: var(--color-notification-status-info);
|
|
165
|
+
background-color: var(--color-base-background-blueberry);
|
|
157
166
|
}
|
|
158
167
|
|
|
159
168
|
&--draft {
|
|
@@ -32,6 +32,8 @@ export type Styles = {
|
|
|
32
32
|
'expander__button--expanded': string;
|
|
33
33
|
panel: string;
|
|
34
34
|
'panel__border--fill--neutral': string;
|
|
35
|
+
'panel__border--fill--new': string;
|
|
36
|
+
'panel__border--fill--status': string;
|
|
35
37
|
'panel__border--line': string;
|
|
36
38
|
'panel__border--outline--inner': string;
|
|
37
39
|
'panel__border--outline--outer': string;
|
|
@@ -19,7 +19,10 @@ export declare enum StatusDotVariant {
|
|
|
19
19
|
draft = "draft",
|
|
20
20
|
hidden = "hidden",
|
|
21
21
|
login = "login",
|
|
22
|
-
attachment = "attachment"
|
|
22
|
+
attachment = "attachment",
|
|
23
|
+
active = "active",
|
|
24
|
+
pending = "pending",
|
|
25
|
+
inactive = "inactive"
|
|
23
26
|
}
|
|
24
27
|
export interface StatusDotIconProps {
|
|
25
28
|
/** Defines the color of the icon */
|
|
@@ -25,32 +25,38 @@ $status-dot-size: 1rem;
|
|
|
25
25
|
min-width: $status-dot-size;
|
|
26
26
|
min-height: $status-dot-size;
|
|
27
27
|
|
|
28
|
-
&--success
|
|
28
|
+
&--success,
|
|
29
|
+
&--active {
|
|
29
30
|
fill: var(--color-notification-graphics-success);
|
|
30
31
|
}
|
|
31
|
-
&--success#{&}--on-dark
|
|
32
|
+
&--success#{&}--on-dark,
|
|
33
|
+
&--active#{&}--on-dark {
|
|
32
34
|
fill: var(--core-color-kiwi-200);
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
&--inprocess,
|
|
36
38
|
&--exception,
|
|
37
39
|
&--unknown,
|
|
38
|
-
&--inspected
|
|
40
|
+
&--inspected,
|
|
41
|
+
&--pending {
|
|
39
42
|
fill: var(--color-notification-graphics-warning);
|
|
40
43
|
}
|
|
41
44
|
&--inprocess#{&}--on-dark,
|
|
42
45
|
&--exception#{&}--on-dark,
|
|
43
46
|
&--unknown#{&}--on-dark,
|
|
44
|
-
&--inspected#{&}--on-dark
|
|
47
|
+
&--inspected#{&}--on-dark,
|
|
48
|
+
&--pending#{&}--on-dark {
|
|
45
49
|
fill: var(--core-color-banana-300);
|
|
46
50
|
}
|
|
47
51
|
|
|
48
52
|
&--cancelled,
|
|
49
|
-
&--alert
|
|
53
|
+
&--alert,
|
|
54
|
+
&--inactive {
|
|
50
55
|
fill: var(--color-notification-graphics-error);
|
|
51
56
|
}
|
|
52
57
|
&--cancelled#{&}--on-dark,
|
|
53
|
-
&--alert#{&}--on-dark
|
|
58
|
+
&--alert#{&}--on-dark,
|
|
59
|
+
&--inactive#{&}--on-dark {
|
|
54
60
|
fill: var(--core-color-cherry-100);
|
|
55
61
|
}
|
|
56
62
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export type Styles = {
|
|
2
2
|
statusdot: string;
|
|
3
3
|
statusdot__dot: string;
|
|
4
|
+
'statusdot__dot--active': string;
|
|
4
5
|
'statusdot__dot--alert': string;
|
|
5
6
|
'statusdot__dot--attachment': string;
|
|
6
7
|
'statusdot__dot--cancelled': string;
|
|
@@ -8,12 +9,14 @@ export type Styles = {
|
|
|
8
9
|
'statusdot__dot--exception': string;
|
|
9
10
|
'statusdot__dot--group': string;
|
|
10
11
|
'statusdot__dot--hidden': string;
|
|
12
|
+
'statusdot__dot--inactive': string;
|
|
11
13
|
'statusdot__dot--info': string;
|
|
12
14
|
'statusdot__dot--inprocess': string;
|
|
13
15
|
'statusdot__dot--inspected': string;
|
|
14
16
|
'statusdot__dot--login': string;
|
|
15
17
|
'statusdot__dot--noaccess': string;
|
|
16
18
|
'statusdot__dot--on-dark': string;
|
|
19
|
+
'statusdot__dot--pending': string;
|
|
17
20
|
'statusdot__dot--recurring': string;
|
|
18
21
|
'statusdot__dot--success': string;
|
|
19
22
|
'statusdot__dot--transparent': string;
|
|
@@ -6,6 +6,10 @@ export interface StepProps {
|
|
|
6
6
|
stepper?: React.ReactElement<StepperProps>;
|
|
7
7
|
/** Innhold i steget */
|
|
8
8
|
children: React.ReactNode;
|
|
9
|
+
/** Adds custom classes to the element. */
|
|
10
|
+
className?: string;
|
|
11
|
+
/** Adds custom classes to the content element. */
|
|
12
|
+
contentClassName?: string;
|
|
9
13
|
/** Knapp for å gå tilbake. Vises med "outline" variant. */
|
|
10
14
|
backButton?: React.ReactElement<ButtonProps>;
|
|
11
15
|
/** Knapp for å gå videre. Vises med "fill" variant. */
|
package/components/Step/index.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import classNames from "classnames";
|
|
2
3
|
import { AnalyticsId } from "../../constants.js";
|
|
3
4
|
import { S as StepButtons } from "../../StepButtons.js";
|
|
4
5
|
import styles from "./styles.module.scss";
|
|
5
6
|
const Step = ({
|
|
6
7
|
stepper,
|
|
7
8
|
children,
|
|
9
|
+
className,
|
|
10
|
+
contentClassName,
|
|
8
11
|
backButton,
|
|
9
12
|
forwardButton,
|
|
10
13
|
additionalButtons,
|
|
@@ -13,9 +16,9 @@ const Step = ({
|
|
|
13
16
|
testId
|
|
14
17
|
}) => {
|
|
15
18
|
const hasNavigation = backButton || forwardButton || additionalButtons || cancelButton;
|
|
16
|
-
return /* @__PURE__ */ jsxs("div", { "data-testid": testId, "data-analyticsid": AnalyticsId.Step, children: [
|
|
19
|
+
return /* @__PURE__ */ jsxs("div", { "data-testid": testId, "data-analyticsid": AnalyticsId.Step, className, children: [
|
|
17
20
|
stepper && /* @__PURE__ */ jsx("div", { className: styles.step__stepper, children: stepper }),
|
|
18
|
-
/* @__PURE__ */ jsx("div", { className: styles.step__content, children }),
|
|
21
|
+
/* @__PURE__ */ jsx("div", { className: classNames(styles.step__content, contentClassName), children }),
|
|
19
22
|
hasNavigation && /* @__PURE__ */ jsx(
|
|
20
23
|
StepButtons,
|
|
21
24
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/Step/Step.tsx"],"sourcesContent":["import React from 'react';\n\nimport { AnalyticsId } from '../../constants';\nimport { ButtonProps } from '../Button';\nimport StepButtons from '../StepButtons';\nimport { StepperProps } from '../Stepper';\n\nimport styles from './styles.module.scss';\n\nexport interface StepProps {\n /** Stepper viser fremdriften */\n stepper?: React.ReactElement<StepperProps>;\n /** Innhold i steget */\n children: React.ReactNode;\n /** Knapp for å gå tilbake. Vises med \"outline\" variant. */\n backButton?: React.ReactElement<ButtonProps>;\n /** Knapp for å gå videre. Vises med \"fill\" variant. */\n forwardButton?: React.ReactElement<ButtonProps>;\n /** Ekstra knapper. Valgfritt utseende. */\n additionalButtons?: React.ReactElement<ButtonProps>[];\n /** Knapp for å avbryte eller fortsette senere. Vises med \"borderless\" variant. */\n cancelButton?: React.ReactElement<ButtonProps>;\n /** Knappene vil vises sticky nederst på skjermen dersom innholdet i Step tar mer plass enn vinduet. Default: false */\n stickyButtons?: boolean;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst Step: React.FC<StepProps> = ({\n stepper,\n children,\n backButton,\n forwardButton,\n additionalButtons,\n cancelButton,\n stickyButtons = false,\n testId,\n}) => {\n const hasNavigation = backButton || forwardButton || additionalButtons || cancelButton;\n\n return (\n <div data-testid={testId} data-analyticsid={AnalyticsId.Step}>\n {stepper && <div className={styles.step__stepper}>{stepper}</div>}\n <div className={styles.step__content}>{children}</div>\n {hasNavigation && (\n <StepButtons\n backButton={backButton}\n forwardButton={forwardButton}\n additionalButtons={additionalButtons}\n cancelButton={cancelButton}\n sticky={stickyButtons}\n />\n )}\n </div>\n );\n};\n\nexport default Step;\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/Step/Step.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport { ButtonProps } from '../Button';\nimport StepButtons from '../StepButtons';\nimport { StepperProps } from '../Stepper';\n\nimport styles from './styles.module.scss';\n\nexport interface StepProps {\n /** Stepper viser fremdriften */\n stepper?: React.ReactElement<StepperProps>;\n /** Innhold i steget */\n children: React.ReactNode;\n /** Adds custom classes to the element. */\n className?: string;\n /** Adds custom classes to the content element. */\n contentClassName?: string;\n /** Knapp for å gå tilbake. Vises med \"outline\" variant. */\n backButton?: React.ReactElement<ButtonProps>;\n /** Knapp for å gå videre. Vises med \"fill\" variant. */\n forwardButton?: React.ReactElement<ButtonProps>;\n /** Ekstra knapper. Valgfritt utseende. */\n additionalButtons?: React.ReactElement<ButtonProps>[];\n /** Knapp for å avbryte eller fortsette senere. Vises med \"borderless\" variant. */\n cancelButton?: React.ReactElement<ButtonProps>;\n /** Knappene vil vises sticky nederst på skjermen dersom innholdet i Step tar mer plass enn vinduet. Default: false */\n stickyButtons?: boolean;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst Step: React.FC<StepProps> = ({\n stepper,\n children,\n className,\n contentClassName,\n backButton,\n forwardButton,\n additionalButtons,\n cancelButton,\n stickyButtons = false,\n testId,\n}) => {\n const hasNavigation = backButton || forwardButton || additionalButtons || cancelButton;\n\n return (\n <div data-testid={testId} data-analyticsid={AnalyticsId.Step} className={className}>\n {stepper && <div className={styles.step__stepper}>{stepper}</div>}\n <div className={classNames(styles.step__content, contentClassName)}>{children}</div>\n {hasNavigation && (\n <StepButtons\n backButton={backButton}\n forwardButton={forwardButton}\n additionalButtons={additionalButtons}\n cancelButton={cancelButton}\n sticky={stickyButtons}\n />\n )}\n </div>\n );\n};\n\nexport default Step;\n"],"names":[],"mappings":";;;;;AAkCA,MAAM,OAA4B,CAAC;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,gBAAgB;AAAA,EAChB;AACF,MAAM;AACE,QAAA,gBAAgB,cAAc,iBAAiB,qBAAqB;AAE1E,8BACG,OAAI,EAAA,eAAa,QAAQ,oBAAkB,YAAY,MAAM,WAC3D,UAAA;AAAA,IAAA,WAAY,oBAAA,OAAA,EAAI,WAAW,OAAO,eAAgB,UAAQ,SAAA;AAAA,IAC3D,oBAAC,SAAI,WAAW,WAAW,OAAO,eAAe,gBAAgB,GAAI,UAAS;AAAA,IAC7E,iBACC;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,QAAQ;AAAA,MAAA;AAAA,IAAA;AAAA,EACV,GAEJ;AAEJ;"}
|
package/designsystem-react.css
CHANGED
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
--color-base-border-ondark: #d6d4d3;
|
|
76
76
|
--color-base-border-onlight: #7d7c79;
|
|
77
77
|
--color-base-border-onlight-emphasized: #62625f;
|
|
78
|
-
--color-help-background-normal: #
|
|
78
|
+
--color-help-background-normal: #f4ecfe;
|
|
79
79
|
--color-help-graphics-normal: #5b22a6;
|
|
80
80
|
--color-help-border-normal: #5b22a6;
|
|
81
81
|
--core-color-blueberry-100: #cae7ed;
|
package/package.json
CHANGED
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
--color-base-border-ondark: #d6d4d3;
|
|
76
76
|
--color-base-border-onlight: #7d7c79;
|
|
77
77
|
--color-base-border-onlight-emphasized: #62625f;
|
|
78
|
-
--color-help-background-normal: #
|
|
78
|
+
--color-help-background-normal: #f4ecfe;
|
|
79
79
|
--color-help-graphics-normal: #5b22a6;
|
|
80
80
|
--color-help-border-normal: #5b22a6;
|
|
81
81
|
--core-color-blueberry-100: #cae7ed;
|