@helsenorge/designsystem-react 1.0.0-beta90 → 1.0.0-beta95
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/Button-8af0be6e.js +2 -0
- package/Button-8af0be6e.js.map +1 -0
- package/Checkbox-fb5dff56.js +2 -0
- package/Checkbox-fb5dff56.js.map +1 -0
- package/Close-9f68bcd0.js +2 -0
- package/Close-9f68bcd0.js.map +1 -0
- package/FormGroup-6c545646.js +2 -0
- package/FormGroup-6c545646.js.map +1 -0
- package/Icon-04613a89.js +2 -0
- package/Icon-04613a89.js.map +1 -0
- package/Input-adeb7f88.js +2 -0
- package/Input-adeb7f88.js.map +1 -0
- package/Loader-b3fd59f4.js +2 -0
- package/Loader-b3fd59f4.js.map +1 -0
- package/Modal-b7d10081.js +2 -0
- package/Modal-b7d10081.js.map +1 -0
- package/RadioButton-d90884c9.js +2 -0
- package/RadioButton-d90884c9.js.map +1 -0
- package/Textarea-05e33ba3.js +2 -0
- package/Textarea-05e33ba3.js.map +1 -0
- package/Title-90910763.js +2 -0
- package/Title-90910763.js.map +1 -0
- package/Validation-9bf0c0ec.js +2 -0
- package/Validation-9bf0c0ec.js.map +1 -0
- package/components/AnchorLink/index.d.ts +1 -0
- package/components/AnchorLink/index.d.ts.map +1 -1
- package/components/AnchorLink/index.js +1 -1
- package/components/Avatar/index.d.ts +1 -0
- package/components/Avatar/index.d.ts.map +1 -1
- package/components/Avatar/index.js +1 -1
- package/components/Badge/index.d.ts +1 -0
- package/components/Badge/index.d.ts.map +1 -1
- package/components/Button/Button.d.ts.map +1 -1
- package/components/Button/index.d.ts +1 -0
- package/components/Button/index.d.ts.map +1 -1
- package/components/Button/index.js +1 -1
- package/components/ButtonWithModal/componentdata.json +38 -0
- package/components/ButtonWithModal/index.d.ts +1 -0
- package/components/ButtonWithModal/index.d.ts.map +1 -1
- package/components/ButtonWithModal/index.js +1 -1
- package/components/Checkbox/Checkbox.d.ts +3 -3
- package/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/components/Checkbox/componentdata.json +10 -4
- package/components/Checkbox/index.d.ts +1 -0
- package/components/Checkbox/index.d.ts.map +1 -1
- package/components/Checkbox/index.js +1 -1
- package/components/Close/index.d.ts +1 -0
- package/components/Close/index.d.ts.map +1 -1
- package/components/Close/index.js +1 -1
- package/components/ExpanderList/index.d.ts +1 -0
- package/components/ExpanderList/index.d.ts.map +1 -1
- package/components/ExpanderList/index.js +1 -1
- package/components/FormExample/FormExample.d.ts +8 -5
- package/components/FormExample/FormExample.d.ts.map +1 -1
- package/components/FormExample/componentdata.json +9 -0
- package/components/FormExample/index.d.ts +1 -0
- package/components/FormExample/index.d.ts.map +1 -1
- package/components/FormExample/index.js +1 -1
- package/components/FormExample/index.js.map +1 -1
- package/components/FormGroup/FormGroup.d.ts +5 -6
- package/components/FormGroup/FormGroup.d.ts.map +1 -1
- package/components/FormGroup/componentdata.json +29 -4
- package/components/FormGroup/index.d.ts +1 -0
- package/components/FormGroup/index.d.ts.map +1 -1
- package/components/FormGroup/index.js +1 -1
- package/components/FormGroup/styles.module.scss +12 -3
- package/components/HighlightBox/HighlightBox.d.ts +24 -0
- package/components/HighlightBox/HighlightBox.d.ts.map +1 -0
- package/components/HighlightBox/componentdata.json +484 -0
- package/components/HighlightBox/index.d.ts +4 -0
- package/components/HighlightBox/index.d.ts.map +1 -0
- package/components/HighlightBox/index.js +2 -0
- package/components/HighlightBox/index.js.map +1 -0
- package/components/HighlightBox/styles.module.scss +89 -0
- package/components/Icons/AcupunctureBack.js +1 -1
- package/components/Icons/Icon.js +1 -1
- package/components/Icons/NoEye.js +1 -1
- package/components/Icons/SectionSign.js +1 -1
- package/components/Icons/SpeechBubble.js +1 -1
- package/components/Icons/SupportingPerson.js +1 -1
- package/components/Icons/Syringe.js +1 -1
- package/components/Icons/index.js +1 -1
- package/components/Input/Input.d.ts +55 -0
- package/components/Input/Input.d.ts.map +1 -0
- package/components/Input/componentdata.json +425 -0
- package/components/Input/index.d.ts +4 -0
- package/components/Input/index.d.ts.map +1 -0
- package/components/Input/index.js +2 -0
- package/components/Input/index.js.map +1 -0
- package/components/Input/styles.module.scss +55 -0
- package/components/Input/styles.module.scss.d.ts +23 -0
- package/components/LinkList/index.d.ts +1 -0
- package/components/LinkList/index.d.ts.map +1 -1
- package/components/LinkList/index.js +1 -1
- package/components/List/index.d.ts +1 -0
- package/components/List/index.d.ts.map +1 -1
- package/components/Loader/Loader.d.ts +7 -1
- package/components/Loader/Loader.d.ts.map +1 -1
- package/components/Loader/componentdata.json +32 -1
- package/components/Loader/index.d.ts +1 -0
- package/components/Loader/index.d.ts.map +1 -1
- package/components/Loader/index.js +1 -1
- package/components/Loader/styles.module.scss +19 -4
- package/components/Logo/index.d.ts +1 -0
- package/components/Logo/index.d.ts.map +1 -1
- package/components/Modal/Modal.d.ts +6 -0
- package/components/Modal/Modal.d.ts.map +1 -1
- package/components/Modal/componentdata.json +40 -0
- package/components/Modal/index.d.ts +1 -0
- package/components/Modal/index.d.ts.map +1 -1
- package/components/Modal/index.js +1 -1
- package/components/Modal/styles.module.scss +21 -2
- package/components/NotificationPanel/index.d.ts +1 -0
- package/components/NotificationPanel/index.d.ts.map +1 -1
- package/components/NotificationPanel/index.js +1 -1
- package/components/Portal/componentdata.json +80 -0
- package/components/Portal/index.d.ts +13 -0
- package/components/Portal/index.d.ts.map +1 -0
- package/components/Portal/index.js +2 -0
- package/components/Portal/index.js.map +1 -0
- package/components/RadioButton/RadioButton.d.ts +31 -0
- package/components/RadioButton/RadioButton.d.ts.map +1 -0
- package/components/RadioButton/componentdata.json +265 -0
- package/components/RadioButton/index.d.ts +4 -0
- package/components/RadioButton/index.d.ts.map +1 -0
- package/components/RadioButton/index.js +2 -0
- package/components/RadioButton/index.js.map +1 -0
- package/components/RadioButton/styles.module.scss +236 -0
- package/components/RadioButton/styles.module.scss.d.ts +23 -0
- package/components/Slider/index.d.ts +1 -0
- package/components/Slider/index.d.ts.map +1 -1
- package/components/Slider/index.js +1 -1
- package/components/Spacer/index.d.ts +1 -0
- package/components/Spacer/index.d.ts.map +1 -1
- package/components/Textarea/Textarea.d.ts +35 -0
- package/components/Textarea/Textarea.d.ts.map +1 -0
- package/components/Textarea/componentdata.json +565 -0
- package/components/Textarea/index.d.ts +4 -0
- package/components/Textarea/index.d.ts.map +1 -0
- package/components/Textarea/index.js +2 -0
- package/components/Textarea/index.js.map +1 -0
- package/components/Textarea/styles.module.scss +57 -0
- package/components/Textarea/styles.module.scss.d.ts +26 -0
- package/components/Tile/index.d.ts +1 -0
- package/components/Tile/index.d.ts.map +1 -1
- package/components/Tile/index.js +1 -1
- package/components/Title/index.d.ts +1 -0
- package/components/Title/index.d.ts.map +1 -1
- package/components/Title/index.js +1 -1
- package/components/Validation/Validation.d.ts +2 -2
- package/components/Validation/Validation.d.ts.map +1 -1
- package/components/Validation/index.d.ts +1 -0
- package/components/Validation/index.d.ts.map +1 -1
- package/components/Validation/index.js +1 -1
- package/constants-42547490.js +2 -0
- package/constants-42547490.js.map +1 -0
- package/constants.d.ts +29 -0
- package/constants.d.ts.map +1 -1
- package/hooks/useIcons.d.ts +4 -0
- package/hooks/useIcons.d.ts.map +1 -0
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +1 -1
- package/package.json +2 -1
- package/scss/_input.scss +174 -0
- package/scss/_title.scss +16 -12
- package/Button-48132cc3.js +0 -2
- package/Button-48132cc3.js.map +0 -1
- package/Checkbox-46666e69.js +0 -2
- package/Checkbox-46666e69.js.map +0 -1
- package/Close-591125bb.js +0 -2
- package/Close-591125bb.js.map +0 -1
- package/FormGroup-56d60079.js +0 -2
- package/FormGroup-56d60079.js.map +0 -1
- package/Loader-6ff0d481.js +0 -2
- package/Loader-6ff0d481.js.map +0 -1
- package/Modal-145869ba.js +0 -2
- package/Modal-145869ba.js.map +0 -1
- package/Title-72851d51.js +0 -2
- package/Title-72851d51.js.map +0 -1
- package/Validation-372a97b9.js +0 -2
- package/Validation-372a97b9.js.map +0 -1
- package/constants-d919236e.js +0 -2
- package/constants-d919236e.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Title/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,eAAe,KAAK,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Title/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,eAAe,KAAK,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{T as s}from"../../Title-
|
|
1
|
+
import{T as s}from"../../Title-90910763.js";export{T as default,i as instanceOfTitleMargin}from"../../Title-90910763.js";import"../../_rollupPluginBabelHelpers-d0752906.js";import"react";import"../../index-9b84fabc.js";import"./styles.module.scss";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { FormVariant } from '
|
|
2
|
+
import { FormVariant } from '../../constants';
|
|
3
3
|
interface ValidationProps {
|
|
4
4
|
/** text placed in the legend tag of the fieldset */
|
|
5
5
|
errorSummary?: string;
|
|
@@ -8,7 +8,7 @@ interface ValidationProps {
|
|
|
8
8
|
/** Adds custom classes to the element. */
|
|
9
9
|
className?: string;
|
|
10
10
|
/** Changes the visuals of the formgroup */
|
|
11
|
-
variant?: FormVariant;
|
|
11
|
+
variant?: keyof typeof FormVariant;
|
|
12
12
|
/** Sets the data-testid attribute. */
|
|
13
13
|
testId?: string;
|
|
14
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Validation.d.ts","sourceRoot":"","sources":["../../../src/components/Validation/Validation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Validation.d.ts","sourceRoot":"","sources":["../../../src/components/Validation/Validation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,UAAU,eAAe;IACvB,oDAAoD;IACpD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,MAAM,OAAO,WAAW,CAAC;IACnC,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,UAAU,qFAmBrB,CAAC;AAEH,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Validation/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,eAAe,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Validation/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,eAAe,UAAU,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{V as s}from"../../Validation-
|
|
1
|
+
import{V as s}from"../../Validation-9bf0c0ec.js";export{V as Validation,V as default}from"../../Validation-9bf0c0ec.js";import"react";import"../../index-9b84fabc.js";import"../../FormGroup-6c545646.js";import"../../_rollupPluginBabelHelpers-d0752906.js";import"../FormGroup/styles.module.scss";import"../../Checkbox-fb5dff56.js";import"../../uuid-8870ab4b.js";import"../../Check-6291ad09.js";import"../../Icon-04613a89.js";import"../../_tslib-51c8a283.js";import"../../constants-42547490.js";import"../../color-acb834c6.js";import"../../index-19b48c51.js";import"../../palette-f206f488.js";import"../../grid-11a70eb7.js";import"../Checkbox/styles.module.scss";import"../../RadioButton-d90884c9.js";import"../RadioButton/styles.module.scss";import"../../Input-adeb7f88.js";import"../../useBreakpoint-324a9b14.js";import"../../useWindowSize-73b47451.js";import"../Input/styles.module.scss";import"../../Title-90910763.js";import"../Title/styles.module.scss";import"./styles.module.scss";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var a,n,o,r;!function(a){a[a.XSmall=38]="XSmall",a[a.Small=48]="Small",a[a.Medium=64]="Medium",a[a.Large=80]="Large",a[a.XLarge=130]="XLarge"}(a||(a={})),function(a){a[a.Modal=13e5]="Modal"}(n||(n={})),function(a){a.onwhite="onwhite",a.ongrey="ongrey",a.onblueberry="onblueberry",a.ondark="ondark",a.oninvalid="oninvalid"}(o||(o={})),function(a){a.normal="normal",a.bigform="bigform"}(r||(r={}));export{o as F,a as I,n as Z,r as a};
|
|
2
|
+
//# sourceMappingURL=constants-42547490.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants-42547490.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/constants.d.ts
CHANGED
|
@@ -5,6 +5,9 @@ export declare enum IconSize {
|
|
|
5
5
|
Large = 80,
|
|
6
6
|
XLarge = 130
|
|
7
7
|
}
|
|
8
|
+
export declare enum ZIndex {
|
|
9
|
+
Modal = 1300000
|
|
10
|
+
}
|
|
8
11
|
export interface HTMLButtonProps {
|
|
9
12
|
autoFocus?: boolean;
|
|
10
13
|
disabled?: boolean;
|
|
@@ -18,6 +21,21 @@ export interface HTMLButtonProps {
|
|
|
18
21
|
type?: 'submit' | 'reset' | 'button' | string;
|
|
19
22
|
value?: string | string[] | number;
|
|
20
23
|
}
|
|
24
|
+
export interface HTMLTextareaProps {
|
|
25
|
+
autoFocus?: boolean;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
form?: string;
|
|
28
|
+
formNoValidate?: boolean;
|
|
29
|
+
formTarget?: string;
|
|
30
|
+
name?: string;
|
|
31
|
+
id?: string;
|
|
32
|
+
autocomplete?: 'off' | 'on';
|
|
33
|
+
placeholder?: string;
|
|
34
|
+
readonly?: boolean;
|
|
35
|
+
required?: boolean;
|
|
36
|
+
spellcheck?: 'true' | 'default' | 'false';
|
|
37
|
+
'aria-invalid'?: boolean;
|
|
38
|
+
}
|
|
21
39
|
export interface HTMLAnchorProps {
|
|
22
40
|
download?: string;
|
|
23
41
|
href?: string;
|
|
@@ -29,4 +47,15 @@ export interface HTMLAnchorProps {
|
|
|
29
47
|
referrerPolicy?: '' | 'same-origin' | 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url';
|
|
30
48
|
}
|
|
31
49
|
export declare type ButtonVariant = 'secondary' | 'tertiary' | string | undefined | null;
|
|
50
|
+
export declare enum FormMode {
|
|
51
|
+
onwhite = "onwhite",
|
|
52
|
+
ongrey = "ongrey",
|
|
53
|
+
onblueberry = "onblueberry",
|
|
54
|
+
ondark = "ondark",
|
|
55
|
+
oninvalid = "oninvalid"
|
|
56
|
+
}
|
|
57
|
+
export declare enum FormVariant {
|
|
58
|
+
normal = "normal",
|
|
59
|
+
bigform = "bigform"
|
|
60
|
+
}
|
|
32
61
|
//# sourceMappingURL=constants.d.ts.map
|
package/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IAClB,MAAM,KAAK;IACX,KAAK,KAAK;IACV,MAAM,KAAK;IACX,KAAK,KAAK;IACV,MAAM,MAAM;CACb;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC9C,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC;CACpC;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EACX,EAAE,GACF,aAAa,GACb,aAAa,GACb,4BAA4B,GAC5B,QAAQ,GACR,0BAA0B,GAC1B,eAAe,GACf,iCAAiC,GACjC,YAAY,CAAC;CAClB;AAED,oBAAY,aAAa,GAAG,WAAW,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC"}
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IAClB,MAAM,KAAK;IACX,KAAK,KAAK;IACV,MAAM,KAAK;IACX,KAAK,KAAK;IACV,MAAM,MAAM;CACb;AAED,oBAAY,MAAM;IAChB,KAAK,UAAU;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC9C,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC;CACpC;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;IAC1C,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EACX,EAAE,GACF,aAAa,GACb,aAAa,GACb,4BAA4B,GAC5B,QAAQ,GACR,0BAA0B,GAC1B,eAAe,GACf,iCAAiC,GACjC,YAAY,CAAC;CAClB;AAED,oBAAY,aAAa,GAAG,WAAW,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;AAEjF,oBAAY,QAAQ;IAClB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,WAAW,gBAAgB;IAC3B,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB;AAED,oBAAY,WAAW;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IconProps } from '../components/Icons';
|
|
3
|
+
export declare const useIcons: (children: import("react").ReactNode[]) => (string | number | boolean | {} | import("react").ReactElement<any, string | ((props: any) => import("react").ReactElement<any, any> | null) | (new (props: any) => import("react").Component<any, any, any>)> | import("react").ReactNodeArray | import("react").ReactPortal | import("react").ReactElement<IconProps, string | ((props: any) => import("react").ReactElement<any, any> | null) | (new (props: any) => import("react").Component<any, any, any>)> | null | undefined)[];
|
|
4
|
+
//# sourceMappingURL=useIcons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIcons.d.ts","sourceRoot":"","sources":["../../src/hooks/useIcons.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,eAAO,MAAM,QAAQ,qgBAapB,CAAC"}
|
package/index.d.ts
CHANGED
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AAC3B,cAAc,aAAa,CAAC"}
|
package/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{t as theme}from"./index-19b48c51.js";export{u as useHover}from"./useHover-037be19d.js";import"./palette-f206f488.js";import"./grid-11a70eb7.js";import"./_rollupPluginBabelHelpers-d0752906.js";import"react";
|
|
1
|
+
export{t as theme}from"./index-19b48c51.js";export{u as useHover}from"./useHover-037be19d.js";export{F as FormMode,a as FormVariant,I as IconSize,Z as ZIndex}from"./constants-42547490.js";import"./palette-f206f488.js";import"./grid-11a70eb7.js";import"./_rollupPluginBabelHelpers-d0752906.js";import"react";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@helsenorge/designsystem-react",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "1.0.0-
|
|
4
|
+
"version": "1.0.0-beta95",
|
|
5
5
|
"description": "The official design system for Helsenorge built with React.",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "tfs",
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"@types/classnames": "^2.2.11",
|
|
55
55
|
"@types/jest": "^25.2.3",
|
|
56
56
|
"@types/prettier": "1.19.0",
|
|
57
|
+
"@types/react-dom": "16.9.8",
|
|
57
58
|
"@types/styled-components": "5.0.1",
|
|
58
59
|
"@types/testing-library__react": "^10.0.5",
|
|
59
60
|
"async": "^3.1.0",
|
package/scss/_input.scss
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
@mixin input-wrapper {
|
|
2
|
+
width: 100%;
|
|
3
|
+
line-height: 0;
|
|
4
|
+
|
|
5
|
+
&__label-wrapper {
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
line-height: getSpacer(m);
|
|
9
|
+
font-size: $font-size-sm;
|
|
10
|
+
font-weight: 600;
|
|
11
|
+
padding-bottom: getSpacer(xs);
|
|
12
|
+
|
|
13
|
+
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
14
|
+
line-height: getSpacer(l);
|
|
15
|
+
font-size: $font-size-md;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&--on-dark {
|
|
19
|
+
color: $white;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&__after-label-children {
|
|
24
|
+
padding-left: 0.75rem;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@mixin content-wrapper {
|
|
29
|
+
font-size: $font-size-sm;
|
|
30
|
+
width: 100%;
|
|
31
|
+
border: $neutral700 2px solid;
|
|
32
|
+
outline: none;
|
|
33
|
+
background: $white;
|
|
34
|
+
|
|
35
|
+
svg:first-child {
|
|
36
|
+
padding-left: 0.375rem;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
svg:last-child {
|
|
40
|
+
padding-right: 0.375rem;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&--bigform {
|
|
44
|
+
padding: getSpacer(xs) 0;
|
|
45
|
+
|
|
46
|
+
svg:first-child {
|
|
47
|
+
padding-left: getSpacer(xs);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
svg:last-child {
|
|
51
|
+
padding-right: getSpacer(xs);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&:hover {
|
|
56
|
+
background: $neutral50;
|
|
57
|
+
border-color: $neutral700;
|
|
58
|
+
box-shadow: 0px 0px 0px 1px $neutral700;
|
|
59
|
+
|
|
60
|
+
&:focus-within {
|
|
61
|
+
border-color: $black;
|
|
62
|
+
box-shadow: 0px 0px 0px 2px $black;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
&:focus-within {
|
|
66
|
+
background: $white;
|
|
67
|
+
border-color: $neutral900;
|
|
68
|
+
box-shadow: 0px 0px 0px 2px $neutral900;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&--on-blueberry {
|
|
72
|
+
border-color: $blueberry500;
|
|
73
|
+
|
|
74
|
+
&:hover {
|
|
75
|
+
background: $blueberry50;
|
|
76
|
+
box-shadow: 0px 0px 0px 1px $blueberry500;
|
|
77
|
+
border-color: $blueberry500;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&:focus-within {
|
|
81
|
+
background: $white;
|
|
82
|
+
border-color: $neutral900;
|
|
83
|
+
box-shadow: 0px 0px 0px 2px $neutral900;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
&--on-dark {
|
|
87
|
+
border-color: $blueberry900;
|
|
88
|
+
&:hover {
|
|
89
|
+
background: $blueberry50;
|
|
90
|
+
border-color: $blueberry900;
|
|
91
|
+
box-shadow: 0px 0px 0px 1px $blueberry900;
|
|
92
|
+
}
|
|
93
|
+
&:focus-within {
|
|
94
|
+
background: $white;
|
|
95
|
+
border-color: $neutral900;
|
|
96
|
+
box-shadow: 0px 0px 0px 2px $neutral900;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
&--invalid {
|
|
100
|
+
border-color: $cherry500;
|
|
101
|
+
|
|
102
|
+
&:hover {
|
|
103
|
+
background: $cherry100;
|
|
104
|
+
border-color: $cherry500;
|
|
105
|
+
box-shadow: 0px 0px 0px 2px $cherry500;
|
|
106
|
+
}
|
|
107
|
+
&:focus-within {
|
|
108
|
+
background: $white;
|
|
109
|
+
border-color: $neutral900;
|
|
110
|
+
box-shadow: 0px 0px 0px 2px $neutral900;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
&--transparent {
|
|
114
|
+
background: transparent;
|
|
115
|
+
|
|
116
|
+
&:hover {
|
|
117
|
+
background: $neutral100;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&:focus-within {
|
|
121
|
+
background: $white;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
&--transparent#{&}--on-blueberry {
|
|
125
|
+
&:hover {
|
|
126
|
+
background: $blueberry100;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&:focus-within {
|
|
130
|
+
background: $white;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&--disabled {
|
|
135
|
+
background: $neutral50;
|
|
136
|
+
border-color: $neutral500;
|
|
137
|
+
color: $neutral500;
|
|
138
|
+
|
|
139
|
+
&:hover {
|
|
140
|
+
border-color: $neutral500;
|
|
141
|
+
box-shadow: none;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&__input {
|
|
146
|
+
line-height: 1.625rem;
|
|
147
|
+
font-size: $font-size-sm;
|
|
148
|
+
padding: 0 getSpacer(xs);
|
|
149
|
+
border: none;
|
|
150
|
+
outline: none;
|
|
151
|
+
background-color: transparent;
|
|
152
|
+
width: 100%;
|
|
153
|
+
|
|
154
|
+
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
155
|
+
font-size: $font-size-md;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
&::placeholder {
|
|
159
|
+
color: $neutral500;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
&--disabled {
|
|
163
|
+
color: $neutral500;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
&:first-child {
|
|
167
|
+
padding-left: getSpacer(s);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
&:last-child {
|
|
171
|
+
padding-right: getSpacer(s);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
package/scss/_title.scss
CHANGED
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
@import './font-settings';
|
|
4
4
|
|
|
5
5
|
@mixin title-feature {
|
|
6
|
-
font-size:
|
|
7
|
-
line-height:
|
|
6
|
+
font-size: 2.375rem;
|
|
7
|
+
line-height: 2.875rem;
|
|
8
8
|
font-weight: 600;
|
|
9
9
|
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
10
|
-
font-size:
|
|
11
|
-
line-height:
|
|
10
|
+
font-size: 4rem;
|
|
11
|
+
line-height: 5rem;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
@mixin title1 {
|
|
16
|
-
font-size: 2.
|
|
17
|
-
line-height:
|
|
16
|
+
font-size: 2.25rem;
|
|
17
|
+
line-height: 2.75rem;
|
|
18
18
|
font-weight: 600;
|
|
19
19
|
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
20
20
|
font-size: 3.25rem;
|
|
@@ -23,19 +23,23 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
@mixin title2 {
|
|
26
|
-
font-size: 1.
|
|
27
|
-
line-height: 2.
|
|
26
|
+
font-size: 1.625rem;
|
|
27
|
+
line-height: 2.125rem;
|
|
28
28
|
font-weight: 600;
|
|
29
29
|
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
30
|
-
font-size:
|
|
30
|
+
font-size: 2rem;
|
|
31
31
|
line-height: 2.75rem;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
@mixin title3 {
|
|
36
|
-
font-size:
|
|
37
|
-
line-height:
|
|
36
|
+
font-size: 1.375rem;
|
|
37
|
+
line-height: 1.875rem;
|
|
38
38
|
font-weight: 600;
|
|
39
|
+
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
40
|
+
font-size: 1.5rem;
|
|
41
|
+
line-height: 2rem;
|
|
42
|
+
}
|
|
39
43
|
}
|
|
40
44
|
|
|
41
45
|
@mixin title4 {
|
|
@@ -46,7 +50,7 @@
|
|
|
46
50
|
|
|
47
51
|
@mixin title5 {
|
|
48
52
|
font-size: $spacer;
|
|
49
|
-
line-height:
|
|
53
|
+
line-height: 1.5rem;
|
|
50
54
|
font-weight: 700;
|
|
51
55
|
text-transform: uppercase;
|
|
52
56
|
@media (min-width: map-get($grid-breakpoints, md)) {
|
package/Button-48132cc3.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_ as t,a as e}from"./_rollupPluginBabelHelpers-d0752906.js";import{_ as n}from"./_tslib-51c8a283.js";import o from"react";import{g as r}from"./color-acb834c6.js";import{a as l}from"./constants-d919236e.js";import{L as i}from"./Loader-6ff0d481.js";import{u as a}from"./useHover-037be19d.js";import{u as s}from"./useWindowSize-73b47451.js";import{b as u}from"./grid-11a70eb7.js";import{c as d}from"./index-9b84fabc.js";import c from"./components/Button/styles.module.scss";var m={primary:"blueberry",warning:"banana",danger:"cherry"};var b=function(t,e){return e&&e<u.md&&t?l.Small:t?l.Medium:l.XSmall},f=o.forwardRef((function(u,f){var v,p,_,g=u.children,h=u.className,w=void 0===h?"":h,j=u.fluid,E=void 0!==j&&j,k=u.intent,y=void 0===k?"primary":k,N=u.inverted,C=void 0!==N&&N,I=u.htmlMarkup,H=void 0===I?"button":I,O=u.onClick,S=u.large,z=void 0!==S&&S,B=u.loading,F=void 0!==B&&B,M=u.variant,x=void 0===M?"fill":M,L=u.disabled,R=void 0!==L&&L,X=u.ellipsis,A=void 0!==X&&X,P=u.testId,W=u.href,q=u.target,D=n(u,["children","className","fluid","intent","inverted","htmlMarkup","onClick","large","loading","variant","disabled","ellipsis","testId","href","target"]),G=function(t){var e,n,o,r,l=null,i=null;void 0!==(null===(n=null===(e=t[0])||void 0===e?void 0:e.props)||void 0===n?void 0:n.svgIcon)&&(l=t.shift()),void 0!==(null===(r=null===(o=t[t.length-1])||void 0===o?void 0:o.props)||void 0===r?void 0:r.svgIcon)&&(i=t.pop());var a=t.filter((function(t){return t}));return[l,i,a.length>0?a:null]}(o.Children.toArray(g)),J=t(G,3),K=J[0],Q=J[1],T=J[2],U=a(f),V=U.hoverRef,Y=U.isHovered,Z=function(t,e,n,o,l){return e?r("neutral",600):t&&!o||!t&&o?"white":r(m[n],l?700:600)}("fill"===x,R,y,C,Y),$=s(),tt="fill"===x,et="outline"===x,nt="borderless"===x,ot="warning"===y,rt="danger"===y,lt=!(!K&&!Q||F),it=Object.assign({},D),at=d(c.button,(e(v={},c["button--fluid"],E),e(v,c["button--large"],z),e(v,c["button--warning"],ot),e(v,c["button--danger"],rt),e(v,c["button--inverted"],C),e(v,c["button--fill"],tt),e(v,c["button--outline"],et),e(v,c["button--borderless"],nt),e(v,c["button--with-icon"],lt),e(v,c["button--ellipsis"],A),v),w),st=d(c.button__content,(e(p={},c["button__content--warning"],ot),e(p,c["button__content--danger"],rt),e(p,c["button__content--fill"],tt),e(p,c["button__content--borderless"],nt),e(p,c["button__content--with-icon"],lt),e(p,c["button__content--large"],z),e(p,c["button__content--ellipsis"],A),e(p,c["button__content--inverted"],C),e(p,c["button__content--fluid"],E),p)),ut=d(c["button__left-fluid-content"],(e(_={},c["button__left-fluid-content--with-icon"],lt),e(_,c["button__left-fluid-content--large"],z),_));function dt(t,e,n,r){var l=t&&t.props&&t.props.color?t.props.color:n;return t&&Object.keys(t).length>0?o.cloneElement(t,{size:e,color:l,isHovered:r}):null}var ct=function(){return T?o.createElement("span",{className:st},T):null},mt=function(){return o.createElement("span",{className:c["content-wrapper"]},F?o.createElement("div",{className:c["button__left-fluid-content"]},o.createElement(i,{testId:"test-id-loader",color:"fill"!==x||C?m[y]:"white",size:"tiny"})):o.createElement(o.Fragment,null,E?o.createElement("div",{className:ut},dt(K,b(z,$.width),Z,Y),ct()):o.createElement(o.Fragment,null,dt(K,b(z,$.width),Z,Y),ct()),dt(Q,l.XSmall,Z,Y)))};return o.createElement(o.Fragment,null,"button"===H&&o.createElement("button",Object.assign({onClick:O,disabled:R,"data-testid":P,className:at,ref:V},it),mt()),"a"===H&&o.createElement("a",Object.assign({onClick:O,"data-testid":P,className:at,href:W,target:q,rel:"_blank"===q?"noopener noreferrer":u.rel,ref:V},D),mt()))}));export{f as B};
|
|
2
|
-
//# sourceMappingURL=Button-48132cc3.js.map
|
package/Button-48132cc3.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button-48132cc3.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Checkbox-46666e69.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_ as e,a as r}from"./_rollupPluginBabelHelpers-d0752906.js";import c,{useState as o,useEffect as a}from"react";import{c as l}from"./index-9b84fabc.js";import{u as b}from"./uuid-8870ab4b.js";import{C as i}from"./Check-6291ad09.js";import{I as s}from"./constants-d919236e.js";import{g as n}from"./color-acb834c6.js";import t from"./components/Checkbox/styles.module.scss";var m=c.forwardRef((function(m,d){var p,h,k,x=m.className,u=m.checked,f=void 0!==u&&u,_=m.disabled,v=m.label,w=m.inputid,g=void 0===w?b():w,y=m.mode,N=m.name,j=void 0===N?g:N,E=m.variant,C=m.errorText,I=m.error,z=void 0===I?!!C:I,B=m.value,F=void 0===B?v:B,H=o(f),P=e(H,2),R=P[0],T=P[1],q=z,A="on-dark"===y,D="on-blueberry"===y,G="bigform"===E,J=l(t["checkbox-wrapper"],(r(p={},t["checkbox-wrapper--with-error"],C),r(p,t["checkbox-wrapper--bigform"],G),p)),K=l(t["checkbox-label"],(r(h={},t["checkbox-label--disabled"],_),r(h,t["checkbox-label--on-dark"],A),r(h,t["checkbox-label--on-blueberry"],D),r(h,t["checkbox-label--invalid"],q),r(h,t["checkbox-label--bigform"],G),h)),L=l(t.checkbox,x),M=l(t["checkbox__icon-wrapper"],(r(k={},t["checkbox__icon-wrapper--checked"],R),r(k,t["checkbox__icon-wrapper--disabled"],_),r(k,t["checkbox__icon-wrapper--on-dark"],A),r(k,t["checkbox__icon-wrapper--on-blueberry"],D),r(k,t["checkbox__icon-wrapper--invalid"],q),k)),O=l(t["checkbox-errors"],r({},t["checkbox-errors--bigform"],G)),Q=n("blueberry",500);return _&&(Q=n("neutral",400)),A&&(Q=n("blueberry",200)),q&&(Q=n("cherry",500)),a((function(){T(f)}),[f]),c.createElement("div",{"data-testid":m.testId,className:J},C&&c.createElement("p",{className:O},C),c.createElement("label",{htmlFor:g,className:K},c.createElement("input",{id:g,name:j,className:L,type:"checkbox",checked:R,disabled:_,onChange:function(){T(!R)},value:F,ref:d,"aria-invalid":z}),c.createElement("span",{className:M},R&&c.createElement(s,{color:Q,className:t.checkbox__icon,svgIcon:i,size:38})),v))}));export{m as C};
|
|
2
|
-
//# sourceMappingURL=Checkbox-46666e69.js.map
|
package/Checkbox-46666e69.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox-46666e69.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Close-591125bb.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import e from"react";import{p as t}from"./palette-f206f488.js";import{I as a}from"./constants-d919236e.js";import l from"./components/Close/styles.module.scss";import{u as r,B as o}from"./useBreakpoint-324a9b14.js";var s=function(t){var a=t.isExtraSmall,l=t.isHovered,r=e.createElement("path",{d:"M25.403 24l10.259-10.259-1.403-1.403L24 22.597l-10.259-10.26-1.403 1.403L22.597 24 12.338 34.26l1.403 1.403L24 25.403l10.259 10.259 1.403-1.403z"}),o=e.createElement("path",{d:"M24 22.597L12.327 10.924l-1.403 1.402L22.597 24 10.923 35.674l1.403 1.402L24 25.403l11.674 11.673 1.403-1.402L25.403 24l11.673-11.674-1.403-1.402z"}),s=e.createElement("path",{d:"M25.773 24l10.432-10.432-1.772-1.773-10.432 10.433-10.433-10.433-1.773 1.772L22.229 24 11.795 34.433l1.773 1.772 10.433-10.433 10.432 10.433 1.772-1.773z"});return a?l?e.createElement("path",{d:"M24 22.227L11.781 10.008l-1.772 1.772 12.219 12.219-12.22 12.22 1.772 1.772L24 25.771l12.22 12.22 1.772-1.772-12.22-12.22L37.991 11.78l-1.772-1.772z"}):s:l?o:r},n=function(n){var m=r()===o.Xs?38:48;return e.createElement("button",{"data-testid":n.testId,className:l.close,"aria-label":n.ariaLabel||"Lukk",onClick:n.onClick,role:"button"},e.createElement(a,{svgIcon:s,color:t.blueberry600,size:m}))};export{n as C};
|
|
2
|
-
//# sourceMappingURL=Close-591125bb.js.map
|
package/Close-591125bb.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Close-591125bb.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/FormGroup-56d60079.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./_rollupPluginBabelHelpers-d0752906.js";import r from"react";import{c as o}from"./index-9b84fabc.js";import a from"./components/FormGroup/styles.module.scss";import{C as t}from"./Checkbox-46666e69.js";import{T as m}from"./Title-72851d51.js";var l=r.forwardRef((function(l,i){var p,n,s,d=l.className,f=l.mode,c=void 0===f?"on-white":f,g=l.variant,u=void 0===g?"normal":g,_=l.error,v="on-dark"===c,w="bigform"===u,b=o(a["form-group-wrapper"],(e(p={},a["form-group-wrapper--on-dark"],v),e(p,a["form-group-wrapper--invalid"],_),p),d),E=o(a["form-group-wrapper__title"],(e(n={},a["form-group-wrapper__title--on-dark"],v&&!_),e(n,a["form-group-wrapper__title--bigform"],w),n)),N=o(a["form-group"],e({},a["form-group--invalid"],_)),h=o(a["form-group-wrapper__errors"],e({},a["form-group-wrapper__errors--bigform"],w)),k=o(a["field-set__legend"],(e(s={},a["field-set__legend--on-dark"],v&&!_),e(s,a["field-set__legend--bigform"],w),s));return r.createElement("div",{"data-testid":l.testId,className:b},l.title&&r.createElement(m,{className:E,htmlMarkup:"h4",appearance:"title4",margin:{marginTop:0,marginBottom:2}},l.title),r.createElement("div",{className:N},_&&r.createElement("p",{className:h},_),r.createElement("fieldset",{name:l.title,className:a["field-set"]},l.legend&&r.createElement("legend",{className:k},l.legend),r.Children.map(l.children,(function(e){return e.type===t?r.cloneElement(e,{mode:c,variant:u,error:!!_}):e})))))}));export{l as F};
|
|
2
|
-
//# sourceMappingURL=FormGroup-56d60079.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FormGroup-56d60079.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Loader-6ff0d481.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./_rollupPluginBabelHelpers-d0752906.js";import a from"react";import{c as r}from"./index-9b84fabc.js";import{u as l}from"./uuid-8870ab4b.js";import o from"./components/Loader/styles.module.scss";var d=a.forwardRef((function(d,t){var s,m,i,c=d.overlay,n=d.color,_=void 0===n?c?"black":"neutral":n,p=d.size,u=void 0===p?"small":p,b=d.className,v=void 0===b?"":b,f=d.testId,w=d.center,N=d.ariaLabelledById,y=d.ariaLabel,E=void 0===y?"Laster inn":y,g="small"===u,h="medium"===u,k="large"===u,L=r(o["loader-wrapper"],(e(s={},o["loader-wrapper--center"],w),e(s,o["loader-wrapper--overlay"],c),s)),j=r(o.loader,(e(m={},o["loader--small"],g),e(m,o["loader--medium"],h),e(m,o["loader--large"],k),m),v),x=r(o.loader__dot,(e(i={},o["loader__dot--small"],g),e(i,o["loader__dot--medium"],h),e(i,o["loader__dot--large"],k),e(i,o["loader__dot--banana"],"banana"===_),e(i,o["loader__dot--cherry"],"cherry"===_),e(i,o["loader__dot--kiwi"],"kiwi"===_),e(i,o["loader__dot--neutral"],"neutral"===_),e(i,o["loader__dot--plum"],"plum"===_),e(i,o["loader__dot--black"],"black"===_),e(i,o["loader__dot--white"],"white"===_),i)),B="loader".concat(l());return a.createElement("div",{role:"progressbar",className:L},a.createElement("div",{"data-testid":f,"aria-labelledby":N||B,className:j},a.createElement("div",{className:x}),a.createElement("div",{className:x}),a.createElement("div",{className:x}),a.createElement("div",{className:x}),!N&&a.createElement("span",{id:B,className:o["loader__hidden-text"]},E)))}));export{d as L};
|
|
2
|
-
//# sourceMappingURL=Loader-6ff0d481.js.map
|
package/Loader-6ff0d481.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Loader-6ff0d481.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Modal-145869ba.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_ as e,a as t}from"./_rollupPluginBabelHelpers-d0752906.js";import a,{useRef as r,useEffect as n,useState as l}from"react";import{c as o}from"./index-9b84fabc.js";import{p as c}from"./palette-f206f488.js";import{B as i}from"./Button-48132cc3.js";import{a as s,I as m}from"./constants-d919236e.js";import d from"./components/Modal/styles.module.scss";import{A as u,a as v}from"./AlertSignFill-e607ff43.js";import{T as p}from"./Title-72851d51.js";import{u as f}from"./uuid-8870ab4b.js";import{C as _}from"./Close-591125bb.js";function E(){var e=r(null);function t(t){var a=e.current,r="Tab"===t.key;if(a&&r){var n=function(e){try{return("string"==typeof e?document.querySelector(e):e).getRootNode().activeElement}catch(t){return console.error("Feil ved å ta tak i active element basert på angitt node: ",e,t),null}}(a),l=null==a?void 0:a.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),o=l[0],c=1===l.length?o:l[l.length-1];t.shiftKey?n===o&&(c.focus(),t.preventDefault()):n===c&&(o.focus(),t.preventDefault())}}function a(t){var a=e.current;if(a){var r=a.querySelectorAll('a[href], button, textarea, input[type="text"], input[type="radio"], input[type="checkbox"], select');1===r.length&&(r[0].focus(),t.preventDefault())}}return n((function(){var r=e.current;return r.addEventListener("keydown",t),r.addEventListener("click",a),function(){r.removeEventListener("keydown",t),r.removeEventListener("click",a)}}),[]),e}var g,h,y=function(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=l(!1),o=e(r,2),c=o[0],i=o[1];return n((function(){var e=new IntersectionObserver((function(e){i(e[0].intersectionRatio>=a)}),{threshold:a});return(null==t?void 0:t.current)&&e.observe(t.current),function(){(null==t?void 0:t.current)&&e.unobserve(t.current)}}),[t]),c},b=function(e){e.isExtraSmall;var t=e.isHovered,r=a.createElement("path",{d:"m9.16 23.421 2.883-2.773 8.262 8.584L35.958 12.97l2.882 2.774-18.536 19.257-11.143-11.58zm26.744-13.279-15.6 16.206-8.206-8.529-5.766 5.547 13.973 14.518 21.362-22.193-5.764-5.549z","fill-rule":"evenodd"});return t?a.createElement("path",{d:"m11.128 25.394 2.88-2.771 6.291 6.613 17.071-17.68 2.882 2.775-19.944 20.668-9.18-9.605zM37.318 8.73 20.31 26.345l-6.239-6.558-5.766 5.548 11.996 12.552 22.781-23.609-5.764-5.548z","fill-rule":"evenodd"}):r};!function(e){e.normal="normal",e.warning="warning",e.error="error",e.success="success",e.image="image"}(g||(g={})),function(e){e.large="large",e.medium="medium"}(h||(h={}));var N={variant:g.normal,primaryButtonText:"OK",large:!1,className:"",size:h.large},w=function(e,t){var r=function(e){return e===g.error?a.createElement(m,{size:s.Small,svgIcon:u,color:c.cherry500}):e===g.warning?a.createElement(m,{size:s.Small,svgIcon:v,color:c.black}):e===g.success?a.createElement(m,{size:s.Small,svgIcon:b,color:c.kiwi900}):null}(e);return r?a.createElement("div",{className:d.modal__iconWrapper},r):t?a.createElement("div",{className:d.modal__iconWrapper},a.cloneElement(t,{size:s.Small})):null},k=function(r){var l,c,s,m,u=a.useState(0),v=e(u,2),h=v[0],b=v[1],N=a.useState(f()),k=e(N,1)[0],x=a.useRef(null),B=a.useRef(null),C=a.useRef(null),L=y(B),S=a.useRef(null),T=y(S),z=C.current&&C.current.scrollHeight>C.current.clientHeight;function W(e){"Escape"===e.key&&r.onClose&&(e.stopPropagation(),r.onClose())}function j(e){e.target&&P.current===e.target&&r.onClose&&(e.stopPropagation(),r.onClose())}var I=r.variant===g.image,R=null!==(c=r.titleId)&&void 0!==c?c:k,P=a.useRef(null),A=r.secondaryButtonText&&(null===(s=r.secondaryButtonText)||void 0===s?void 0:s.length)>0||r.onSuccess,D=r.ariaLabelledBy?void 0:r.ariaLabel,H=r.ariaLabelledBy?r.ariaLabelledBy:r.ariaLabel?void 0:R;n((function(){var e,t=P.current;return null===(e=x.current)||void 0===e||e.focus(),document.body.style.overflow="hidden",t&&!A&&(t.addEventListener("keydown",W),t.addEventListener("click",j)),function(){document.body.style.removeProperty("overflow"),t&&!A&&(t.removeEventListener("keydown",W),t.removeEventListener("click",j))}}),[]);var M=o((t(l={},d["modal__title--error"],r.variant===g.error),t(l,d["modal__title--success"],r.variant===g.success),l));return a.createElement("div",{"data-testid":"dialog-container"},a.createElement("div",{ref:P,className:d["modal-overlay"],"data-testid":r.testId},a.createElement("div",{className:d.align,ref:E()},a.createElement("div",{className:o(r.className,d.modal,d["modal--".concat(r.variant)],d["modal--".concat(r.size)]),role:"dialog","aria-label":D,"aria-labelledby":H},a.createElement("div",{tabIndex:h,ref:x,onBlur:function(){return b(-1)}}),a.createElement("div",{className:o(d.modal__shadow,d["modal__shadow--top"],t({},d["modal__shadow--show"],!L&&z))}),a.createElement("div",{className:o(d.modal__contentWrapper,t({},d["modal__contentWrapper--image"],I)),ref:C},!r.noCloseButton&&a.createElement("div",{className:d.modal__closeWrapper},a.createElement("div",{className:o(d.modal__closeWrapper__close)},a.createElement(_,{onClick:r.onClose,ariaLabel:r.ariaLabelCloseBtn}))),a.createElement("div",{className:o(d["modal__contentWrapper__scroll--".concat(r.size)],t({},d["modal__contentWrapper__scroll--image"],I))},a.createElement("div",{ref:B}),a.createElement("div",{className:d.modal__contentWrapper__title},w(r.variant,r.icon),a.createElement(p,{id:R,htmlMarkup:"h3",appearance:"title3",className:M},r.title),r.afterTitleChildren&&a.createElement("div",{className:d.modal__afterTitleChildren},r.afterTitleChildren)),I&&a.createElement("div",null,a.createElement("div",{className:d.modal__contentWrapper__imageWrapper},r.children),a.createElement("span",{className:d.modal__contentWrapper__imageDescription},r.description)),!I&&r.children&&a.createElement("div",null,r.children),!I&&!r.children&&a.createElement("p",{className:d.modal__description},r.description),a.createElement("div",{ref:S}))),a.createElement("div",{className:o(d.modal__shadow,d["modal__shadow--bottom"],t({},d["modal__shadow--show"],!T&&z))}),A&&a.createElement("div",{className:o(d["modal__call-to-action"],d["modal__call-to-action--".concat(r.size)])},r.onSuccess&&a.createElement(i,{onClick:r.onSuccess},r.primaryButtonText),r.secondaryButtonText&&(null===(m=r.secondaryButtonText)||void 0===m?void 0:m.length)>0&&a.createElement(i,{variant:"borderless",onClick:r.onClose},r.secondaryButtonText))))))};k.defaultProps=N;export{k as M};
|
|
2
|
-
//# sourceMappingURL=Modal-145869ba.js.map
|
package/Modal-145869ba.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Modal-145869ba.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Title-72851d51.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as t}from"./_rollupPluginBabelHelpers-d0752906.js";import e from"react";import{c as r}from"./index-9b84fabc.js";import i from"./components/Title/styles.module.scss";var o=e.forwardRef((function(o,a){var l,m=o.id,n=o.children,c=o.className,p=o.htmlMarkup,s=void 0===p?"h1":p,d=o.appearance,f=void 0===d?"title1":d,g=o.margin,u=void 0===g?0:g,y=o.testId,T=r(i.title,(t(l={},i["title--feature"],"titleFeature"===f),t(l,i["title--title1"],"title1"===f),t(l,i["title--title2"],"title2"===f),t(l,i["title--title3"],"title3"===f),t(l,i["title--title4"],"title4"===f),t(l,i["title--title5"],"title5"===f),l),c),b=s,h=function(t){return Object.prototype.hasOwnProperty.call(t,"marginTop")&&Object.prototype.hasOwnProperty.call(t,"marginBottom")}(u)?{marginTop:"".concat(u.marginTop,"rem"),marginBottom:"".concat(u.marginBottom,"rem")}:{marginTop:"".concat(u,"rem"),marginBottom:"".concat(u,"rem")};return e.createElement(b,{id:m,className:T,style:h,ref:a,"data-testid":y},n)}));export{o as T};
|
|
2
|
-
//# sourceMappingURL=Title-72851d51.js.map
|
package/Title-72851d51.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Title-72851d51.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Validation-372a97b9.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import r from"react";import{c as e}from"./index-9b84fabc.js";import{F as a}from"./FormGroup-56d60079.js";import t from"./components/Validation/styles.module.scss";var o=r.forwardRef((function(o,m){var n=o.errorSummary,s=o.className;o.variant;var i=e(t.validation,s);return r.createElement(r.Fragment,null,r.createElement("div",{"data-testid":o.testId,className:i},r.Children.map(o.children,(function(e){return e.type===a?r.cloneElement(e,{className:n?t["form-group-wrapper--error-sibling"]:""}):e}))),n&&r.createElement("p",{className:t.validation__errors},n))}));export{o as V};
|
|
2
|
-
//# sourceMappingURL=Validation-372a97b9.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Validation-372a97b9.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/constants-d919236e.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_ as e}from"./_tslib-51c8a283.js";import a from"react";var i,l=function(e,a,i,l,r,t){return e&&r&&t?a?t:r:a?l:i},r=a.forwardRef((function(l,r){var t=l.svgIcon,o=l.ariaLabel,s=l.id,d=l.className,c=void 0===d?"":d,m=l.size,n=void 0===m?i.Small:m,v=l.color,g=void 0===v?"black":v,b=l.hoverColor,f=void 0===b?g||"black":b,h=l.isHovered,u=void 0!==h&&h,S=l.testId,I=e(l,["svgIcon","ariaLabel","id","className","size","color","hoverColor","isHovered","testId"]),L=a.createElement(t,{isExtraSmall:n<=i.XSmall,isHovered:u}),X=s&&o?"title-".concat(s):void 0;return a.createElement("svg",Object.assign({id:s,"data-testid":S,ref:r,className:"hnds-style-icon ".concat(c),role:"img","aria-label":!s&&o?o:void 0,"aria-labelledby":X,"aria-hidden":"true",viewBox:"0 0 48 48",style:{minWidth:n,minHeight:n},width:n,height:n,fill:u?f:g},I),X&&a.createElement("title",{id:X},o),L)}));r.displayName="Icon",function(e){e[e.XSmall=38]="XSmall",e[e.Small=48]="Small",e[e.Medium=64]="Medium",e[e.Large=80]="Large",e[e.XLarge=130]="XLarge"}(i||(i={}));export{r as I,i as a,l as r};
|
|
2
|
-
//# sourceMappingURL=constants-d919236e.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants-d919236e.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|