@helsenorge/designsystem-react 7.1.0 → 7.2.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 +31 -3
- package/components/AnchorLink/AnchorLink.stories.d.ts +1 -0
- package/components/Avatar/Avatar.stories.d.ts +2 -0
- package/components/Badge/Badge.stories.d.ts +2 -0
- package/components/Button/Button.js +21 -21
- package/components/Button/Button.js.map +1 -1
- package/components/Checkbox/Checkbox.stories.d.ts +1 -0
- package/components/Close/Close.stories.d.ts +1 -0
- package/components/DictionaryTrigger/DictionaryTrigger.stories.d.ts +1 -0
- package/components/Dropdown/Dropdown.js +17 -17
- package/components/Dropdown/Dropdown.js.map +1 -1
- package/components/Dropdown/Dropdown.stories.d.ts +1 -0
- package/components/Duolist/Duolist.stories.d.ts +1 -0
- package/components/Duolist/styles.module.scss +19 -19
- package/components/EmptyState/EmptyState.stories.d.ts +1 -0
- package/components/Expander/Expander.stories.d.ts +1 -0
- package/components/Expander/styles.module.scss +13 -13
- package/components/ExpanderHierarchy/ExpanderHierarchy.stories.d.ts +1 -0
- package/components/ExpanderList/ExpanderList.stories.d.ts +2 -0
- package/components/FormGroup/FormGroup.stories.d.ts +1 -0
- package/components/FormLayout/FormLayout.stories.d.ts +1 -0
- package/components/GridExample/GridExample.js +2 -5
- package/components/GridExample/GridExample.js.map +1 -1
- package/components/HelpBubble/HelpBubble.stories.d.ts +1 -0
- package/components/HelpPanel/HelpPanel.stories.d.ts +1 -0
- package/components/HelpQuestion/HelpQuestion.stories.d.ts +1 -0
- package/components/HighlightBox/HighlightBox.stories.d.ts +1 -0
- package/components/HorizontalScroll/styles.module.scss +2 -0
- package/components/Icon/Icon.stories.d.ts +1 -0
- package/components/Illustration/Illustration.stories.d.ts +1 -0
- package/components/Illustration/Illustrations.stories.d.ts +1 -0
- package/components/Input/Input.stories.d.ts +1 -0
- package/components/Label/Label.stories.d.ts +1 -0
- package/components/LazyIcon/LazyIcon.stories.d.ts +1 -0
- package/components/LazyIllustration/LazyIllustration.stories.d.ts +1 -0
- package/components/LinkList/LinkList.stories.d.ts +2 -0
- package/components/List/styles.module.scss +6 -0
- package/components/Loader/Loader.stories.d.ts +1 -0
- package/components/Logo/Logo.stories.d.ts +1 -0
- package/components/NotificationPanel/NotificationPanel.stories.d.ts +1 -0
- package/components/Panel/Panel.stories.d.ts +1 -0
- package/components/PanelList/PanelList.stories.d.ts +1 -0
- package/components/PopMenu/PopMenu.stories.d.ts +1 -0
- package/components/PopMenu/styles.module.scss +7 -8
- package/components/PopOver/styles.module.scss +4 -4
- package/components/PromoPanel/PromoPanel.stories.d.ts +1 -0
- package/components/RadioButton/RadioButton.stories.d.ts +1 -0
- package/components/Select/Select.stories.d.ts +1 -0
- package/components/ServiceMessage/ServiceMessage.stories.d.ts +1 -0
- package/components/SharingStatus/SharingStatus.stories.d.ts +1 -0
- package/components/Slider/Slider.stories.d.ts +1 -0
- package/components/Spacer/Spacer.stories.d.ts +1 -0
- package/components/StatusDot/StatusDot.stories.d.ts +1 -0
- package/components/Step/Step.stories.d.ts +1 -0
- package/components/StepButtons/StepButtons.stories.d.ts +1 -0
- package/components/Stepper/Stepper.stories.d.ts +1 -0
- package/components/Table/Table.stories.d.ts +1 -0
- package/components/Tag/Tag.stories.d.ts +1 -0
- package/components/TagList/TagList.stories.d.ts +1 -0
- package/components/Textarea/Textarea.stories.d.ts +1 -0
- package/components/Tile/Tile.stories.d.ts +2 -0
- package/components/Title/Title.stories.d.ts +1 -0
- package/components/Tooltip/Tooltip.stories.d.ts +1 -0
- package/components/Trigger/Trigger.stories.d.ts +1 -0
- package/components/Validation/Validation.stories.d.ts +2 -1
- package/docs/index.d.ts +1 -0
- package/docs/index.js +9 -4
- package/docs/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GridExample.js","sources":["../../../src/components/GridExample/GridExample.tsx"],"sourcesContent":["import React from 'react';\n\nimport { isSupernova } from '../../docs';\n\ntype GridLayout = 'helsenorge' | 'padding' | 'none';\ninterface GridExampleProps {\n gridLayout: GridLayout;\n}\n\nexport const GridExample: React.FC<GridExampleProps> = ({ gridLayout, children }) => {\n
|
|
1
|
+
{"version":3,"file":"GridExample.js","sources":["../../../src/components/GridExample/GridExample.tsx"],"sourcesContent":["import React from 'react';\n\nimport { isSupernova } from '../../docs';\n\ntype GridLayout = 'helsenorge' | 'padding' | 'none';\n\ninterface GridExampleProps {\n gridLayout: GridLayout;\n}\n\nexport const GridExample: React.FC<GridExampleProps> = ({ gridLayout = isSupernova(), children }) => {\n if (isSupernova() || gridLayout === 'padding') {\n return <div style={{ padding: '0.5rem' }}>{children}</div>;\n }\n\n if (gridLayout === 'helsenorge') {\n return (\n <div className=\"container py-5\">\n <div className=\"row\">\n <div className=\"col\">{children}</div>\n </div>\n </div>\n );\n }\n\n return <>{children}</>;\n};\n\nexport default GridExample;\n"],"names":["GridExample","gridLayout","isSupernova","children","React","GridExample$1"],"mappings":";;AAUO,MAAMA,IAA0C,CAAC,EAAE,YAAAC,IAAaC,EAAY,GAAG,UAAAC,QAChFD,EAAA,KAAiBD,MAAe,4CAC1B,OAAI,EAAA,OAAO,EAAE,SAAS,SAAA,KAAaE,CAAS,IAGlDF,MAAe,eAEdG,gBAAAA,EAAA,cAAA,OAAA,EAAI,WAAU,oDACZ,OAAI,EAAA,WAAU,MACb,GAAAA,gBAAAA,EAAA,cAAC,OAAI,EAAA,WAAU,MAAO,GAAAD,CAAS,CACjC,CACF,sDAIMA,CAAS,GAGrBE,IAAeL;"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { StoryObj } from '@storybook/react';
|
|
2
3
|
declare const meta: {
|
|
3
4
|
title: string;
|
|
4
5
|
component: import("./LinkList").CompoundComponent;
|
|
5
6
|
parameters: {
|
|
6
7
|
docs: {
|
|
8
|
+
page: () => React.JSX.Element;
|
|
7
9
|
description: {
|
|
8
10
|
component: string;
|
|
9
11
|
};
|
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
|
|
21
21
|
> #{$list}__item {
|
|
22
22
|
> #{$list}--bullet {
|
|
23
|
+
// for å beholde utseende disables warning på whitespace her
|
|
24
|
+
/* stylelint-disable-next-line no-irregular-whitespace */
|
|
23
25
|
list-style-type: '⬥ ';
|
|
24
26
|
|
|
25
27
|
> #{$list}__item {
|
|
@@ -28,6 +30,8 @@
|
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
> #{$list}--bullet {
|
|
33
|
+
// for å beholde utseende disables warning på whitespace her
|
|
34
|
+
/* stylelint-disable-next-line no-irregular-whitespace */
|
|
31
35
|
list-style-type: '– ';
|
|
32
36
|
}
|
|
33
37
|
}
|
|
@@ -38,6 +42,8 @@
|
|
|
38
42
|
}
|
|
39
43
|
|
|
40
44
|
&--dashed {
|
|
45
|
+
// for å beholde utseende disables warning på whitespace her
|
|
46
|
+
/* stylelint-disable-next-line no-irregular-whitespace */
|
|
41
47
|
list-style-type: '– ';
|
|
42
48
|
}
|
|
43
49
|
|
|
@@ -18,20 +18,20 @@
|
|
|
18
18
|
box-shadow: none;
|
|
19
19
|
outline: none;
|
|
20
20
|
}
|
|
21
|
+
}
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
html :focus > .pop-menu-button {
|
|
24
|
+
box-shadow: none;
|
|
25
|
+
border: solid;
|
|
25
26
|
}
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
:focus > .pop-menu-button:hover {
|
|
28
|
+
.pop-menu-button :focus > .pop-menu-button {
|
|
29
29
|
box-shadow: none;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
// overrides
|
|
33
|
+
:focus > .pop-menu-button:hover {
|
|
33
34
|
box-shadow: none;
|
|
34
|
-
border: solid;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.pop-menu-button--on-white {
|
|
@@ -108,7 +108,6 @@ html :focus > .pop-menu-button {
|
|
|
108
108
|
|
|
109
109
|
.pop-menu__pop-over {
|
|
110
110
|
width: 20.875rem;
|
|
111
|
-
width: 26.125rem;
|
|
112
111
|
border: 0.125rem solid rgb(24 128 151);
|
|
113
112
|
box-shadow: 0 0 0.3125rem 0 rgb(0 0 0 / 50%);
|
|
114
113
|
|
|
@@ -20,10 +20,6 @@
|
|
|
20
20
|
z-index: 3;
|
|
21
21
|
visibility: hidden;
|
|
22
22
|
|
|
23
|
-
& + &__arrow {
|
|
24
|
-
visibility: hidden;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
23
|
&--visible {
|
|
28
24
|
visibility: visible;
|
|
29
25
|
|
|
@@ -65,4 +61,8 @@
|
|
|
65
61
|
filter: drop-shadow(0 0.2rem 0 var(--drop-shadow-color));
|
|
66
62
|
}
|
|
67
63
|
}
|
|
64
|
+
|
|
65
|
+
& + &__arrow {
|
|
66
|
+
visibility: hidden;
|
|
67
|
+
}
|
|
68
68
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { StoryObj } from '@storybook/react';
|
|
2
3
|
declare const meta: {
|
|
3
4
|
title: string;
|
|
4
5
|
component: import("./Tile").TileCompound;
|
|
5
6
|
parameters: {
|
|
6
7
|
docs: {
|
|
8
|
+
page: () => React.JSX.Element;
|
|
7
9
|
description: {
|
|
8
10
|
component: string;
|
|
9
11
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { StoryObj } from '@storybook/react';
|
|
3
3
|
import { FormSize } from '../../constants';
|
|
4
4
|
declare const meta: {
|
|
@@ -6,6 +6,7 @@ declare const meta: {
|
|
|
6
6
|
component: (props: import("../FormExample/FormExample").FormExampleProps) => JSX.Element;
|
|
7
7
|
parameters: {
|
|
8
8
|
docs: {
|
|
9
|
+
page: () => React.JSX.Element;
|
|
9
10
|
description: {
|
|
10
11
|
component: string;
|
|
11
12
|
markdown: string;
|
package/docs/index.d.ts
CHANGED
package/docs/index.js
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import * as e from "react";
|
|
2
2
|
import "../node_modules/@storybook/addon-docs/dist/chunk-HLWAVYOI.js";
|
|
3
|
-
import { ArgTypes as n, Title as
|
|
4
|
-
const
|
|
3
|
+
import { ArgTypes as n, Title as o, Subtitle as l, Description as i, Primary as c, Stories as s } from "../node_modules/@storybook/blocks/dist/index.js";
|
|
4
|
+
const m = () => (window.location != window.parent.location ? document.referrer : document.location.href).startsWith("https://frankenstein.helsenorge.design") || window.location.search.includes("isSupernova"), w = (t) => {
|
|
5
|
+
if (m())
|
|
6
|
+
return /* @__PURE__ */ e.createElement(n, { of: t.component });
|
|
7
|
+
const r = new URLSearchParams(window.location.search), a = `${window.location.pathname}?id=${r.get("id")}&viewMode=docs`;
|
|
8
|
+
return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", { style: { display: "flex", justifyContent: "space-between" } }, /* @__PURE__ */ e.createElement(o, null), /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement("a", { target: "_blank", href: a, rel: "noreferrer" }, "Åpne i ny fane"))), /* @__PURE__ */ e.createElement(l, null), /* @__PURE__ */ e.createElement(i, null), /* @__PURE__ */ e.createElement(c, null), /* @__PURE__ */ e.createElement(n, { of: t.component }), !t.hideStories && /* @__PURE__ */ e.createElement(s, null));
|
|
9
|
+
};
|
|
5
10
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
11
|
+
w as default,
|
|
12
|
+
m as isSupernova
|
|
8
13
|
};
|
|
9
14
|
//# sourceMappingURL=index.js.map
|
package/docs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/docs/index.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Title, Subtitle, Description, Primary, ArgTypes, Stories } from '@storybook/addon-docs';\n\ninterface DocsProps<T> {\n component: T;\n}\n\nexport const isSupernova = (): boolean
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/docs/index.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Title, Subtitle, Description, Primary, ArgTypes, Stories } from '@storybook/addon-docs';\n\ninterface DocsProps<T> {\n component: T;\n hideStories?: boolean;\n}\n\nexport const isSupernova = (): boolean => {\n const url = window.location != window.parent.location ? document.referrer : document.location.href;\n return url.startsWith('https://frankenstein.helsenorge.design') || window.location.search.includes('isSupernova');\n};\n\nconst Docs = <T,>(props: DocsProps<T>): React.JSX.Element => {\n if (isSupernova()) {\n return <ArgTypes of={props.component} />;\n }\n\n const searchParams = new URLSearchParams(window.location.search);\n const newWindowUrl = `${window.location.pathname}?id=${searchParams.get('id')}&viewMode=docs`;\n\n return (\n <>\n <div style={{ display: 'flex', justifyContent: 'space-between' }}>\n <Title />\n <div>\n <a target=\"_blank\" href={newWindowUrl} rel=\"noreferrer\">\n {'Åpne i ny fane'}\n </a>\n </div>\n </div>\n <Subtitle />\n <Description />\n <Primary />\n <ArgTypes of={props.component} />\n {!props.hideStories && <Stories />}\n </>\n );\n};\n\nexport default Docs;\n"],"names":["isSupernova","Docs","props","React","ArgTypes","searchParams","newWindowUrl","Title","Subtitle","Description","Primary","Stories"],"mappings":";;;AASO,MAAMA,IAAc,OACb,OAAO,YAAY,OAAO,OAAO,WAAW,SAAS,WAAW,SAAS,SAAS,MACnF,WAAW,wCAAwC,KAAK,OAAO,SAAS,OAAO,SAAS,aAAa,GAG5GC,IAAO,CAAKC,MAA2C;AAC3D,MAAIF;AACF,WAAQ,gBAAAG,EAAA,cAAAC,GAAA,EAAS,IAAIF,EAAM,UAAW,CAAA;AAGxC,QAAMG,IAAe,IAAI,gBAAgB,OAAO,SAAS,MAAM,GACzDC,IAAe,GAAG,OAAO,SAAS,QAAQ,OAAOD,EAAa,IAAI,IAAI,CAAC;AAG3E,SAAA,gBAAAF,EAAA,cAAAA,EAAA,UAAA,sCACG,OAAI,EAAA,OAAO,EAAE,SAAS,QAAQ,gBAAgB,kBAAgB,mCAC5DI,GAAM,IAAA,mCACN,OACC,MAAA,gBAAAJ,EAAA,cAAC,OAAE,QAAO,UAAS,MAAMG,GAAc,KAAI,aAAA,GACxC,gBACH,CACF,CACF,GACC,gBAAAH,EAAA,cAAAK,GAAA,IAAS,GACT,gBAAAL,EAAA,cAAAM,GAAA,IAAY,GACb,gBAAAN,EAAA,cAACO,GAAQ,IAAA,mCACRN,GAAS,EAAA,IAAIF,EAAM,UAAW,CAAA,GAC9B,CAACA,EAAM,eAAgB,gBAAAC,EAAA,cAAAQ,GAAA,IAAQ,CAClC;AAEJ;"}
|