@helsenorge/designsystem-react 11.2.0 → 11.4.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/CHANGELOG.md +73 -0
- package/Close.js +1 -1
- package/Close.js.map +1 -1
- package/Drawer.js +10 -2
- package/Drawer.js.map +1 -1
- 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 +13 -7
- 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/Close/styles.module.scss +5 -0
- package/components/Close/styles.module.scss.d.ts +1 -0
- package/components/Drawer/Drawer.d.ts +1 -1
- package/components/Drawer/styles.module.scss +41 -6
- package/components/Drawer/styles.module.scss.d.ts +1 -0
- 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/Modal/styles.module.scss +3 -1
- package/components/NotificationPanel/styles.module.scss +1 -1
- package/components/Panel/Panel.d.ts +10 -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 +17 -5
- package/package.json +1 -1
- package/scss/supernova/styles/colors.css +17 -5
- package/scss/supernova/styles/typography.css +2 -2
|
@@ -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,9 +75,9 @@
|
|
|
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: #
|
|
79
|
-
--color-help-graphics: #5b22a6;
|
|
80
|
-
--color-help-border: #5b22a6;
|
|
78
|
+
--color-help-background-normal: #f4ecfe;
|
|
79
|
+
--color-help-graphics-normal: #5b22a6;
|
|
80
|
+
--color-help-border-normal: #5b22a6;
|
|
81
81
|
--core-color-blueberry-100: #cae7ed;
|
|
82
82
|
--core-color-blueberry-200: #afdae3;
|
|
83
83
|
--core-color-blueberry-300: #7abecc;
|
|
@@ -172,8 +172,6 @@
|
|
|
172
172
|
--color-placeholder-text-onlight: #62625f;
|
|
173
173
|
--color-base-border-onlight-subtle: #d6d4d3;
|
|
174
174
|
--color-base-border-neutral: #d6d4d3;
|
|
175
|
-
|
|
176
|
-
/* Subtle border for Blueberry 50 background */
|
|
177
175
|
--color-base-border-blueberry: #afdae3;
|
|
178
176
|
--color-base-border-cherry: #eec0a5;
|
|
179
177
|
|
|
@@ -186,4 +184,18 @@
|
|
|
186
184
|
--color-notification-text-success: #078141;
|
|
187
185
|
--color-base-border-neutral-emphasized: #bdbab9;
|
|
188
186
|
--color-notification-status-draft: #7d7c79;
|
|
187
|
+
|
|
188
|
+
/* hoverstate on help components on white background */
|
|
189
|
+
--color-help-background-transparent-onlight-hover: #6c36b31a;
|
|
190
|
+
--color-help-background-transparent-onlight-hover-selected: #6c38b333;
|
|
191
|
+
--color-help-background-transparent-onlight-active: #6c38b34d;
|
|
192
|
+
--color-action-background-transparent-onlight-active: #126f874d;
|
|
193
|
+
|
|
194
|
+
/* Background outside of modal and bottomsheet to mask inactive screen-area */
|
|
195
|
+
--color-shadow-pagemask: #2c2b2cb8;
|
|
196
|
+
--color-help-border-subtle-wcag: #9153e2;
|
|
197
|
+
--color-help-graphics-dark: #4c1b8c;
|
|
198
|
+
--color-help-border-dark: #4c1b8c;
|
|
199
|
+
--color-help-graphics-verydark: #3c1471;
|
|
200
|
+
--color-help-border-verydark: #3c1471;
|
|
189
201
|
}
|
package/package.json
CHANGED
|
@@ -75,9 +75,9 @@
|
|
|
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: #
|
|
79
|
-
--color-help-graphics: #5b22a6;
|
|
80
|
-
--color-help-border: #5b22a6;
|
|
78
|
+
--color-help-background-normal: #f4ecfe;
|
|
79
|
+
--color-help-graphics-normal: #5b22a6;
|
|
80
|
+
--color-help-border-normal: #5b22a6;
|
|
81
81
|
--core-color-blueberry-100: #cae7ed;
|
|
82
82
|
--core-color-blueberry-200: #afdae3;
|
|
83
83
|
--core-color-blueberry-300: #7abecc;
|
|
@@ -172,8 +172,6 @@
|
|
|
172
172
|
--color-placeholder-text-onlight: #62625f;
|
|
173
173
|
--color-base-border-onlight-subtle: #d6d4d3;
|
|
174
174
|
--color-base-border-neutral: #d6d4d3;
|
|
175
|
-
|
|
176
|
-
/* Subtle border for Blueberry 50 background */
|
|
177
175
|
--color-base-border-blueberry: #afdae3;
|
|
178
176
|
--color-base-border-cherry: #eec0a5;
|
|
179
177
|
|
|
@@ -186,4 +184,18 @@
|
|
|
186
184
|
--color-notification-text-success: #078141;
|
|
187
185
|
--color-base-border-neutral-emphasized: #bdbab9;
|
|
188
186
|
--color-notification-status-draft: #7d7c79;
|
|
187
|
+
|
|
188
|
+
/* hoverstate on help components on white background */
|
|
189
|
+
--color-help-background-transparent-onlight-hover: #6c36b31a;
|
|
190
|
+
--color-help-background-transparent-onlight-hover-selected: #6c38b333;
|
|
191
|
+
--color-help-background-transparent-onlight-active: #6c38b34d;
|
|
192
|
+
--color-action-background-transparent-onlight-active: #126f874d;
|
|
193
|
+
|
|
194
|
+
/* Background outside of modal and bottomsheet to mask inactive screen-area */
|
|
195
|
+
--color-shadow-pagemask: #2c2b2cb8;
|
|
196
|
+
--color-help-border-subtle-wcag: #9153e2;
|
|
197
|
+
--color-help-graphics-dark: #4c1b8c;
|
|
198
|
+
--color-help-border-dark: #4c1b8c;
|
|
199
|
+
--color-help-graphics-verydark: #3c1471;
|
|
200
|
+
--color-help-border-verydark: #3c1471;
|
|
189
201
|
}
|
|
@@ -97,13 +97,13 @@
|
|
|
97
97
|
/* Renders clumping in ordinary clumps */
|
|
98
98
|
--mobile-textlist: 400 1.125rem/120% "Source Sans Pro";
|
|
99
99
|
|
|
100
|
-
/* For use as body text in help components */
|
|
100
|
+
/* For use as body text in smaller help components as HelpExpander (detail panel), HelpBubble and HelpTooltip */
|
|
101
101
|
--desktop-help-text: 400 1.125rem/140% "Source Sans Pro";
|
|
102
102
|
|
|
103
103
|
/* For use in Help trigger components */
|
|
104
104
|
--desktop-help-trigger-text: 600 1.125rem/130% "Source Sans 3";
|
|
105
105
|
|
|
106
|
-
/* For use as body text in help components */
|
|
106
|
+
/* For use as body text in smaller help components as HelpExpander (detail panel), HelpBubble and HelpTooltip */
|
|
107
107
|
--mobile-help-text: 400 1rem/150% "Source Sans Pro";
|
|
108
108
|
|
|
109
109
|
/* For use in Help trigger components */
|