@helsenorge/designsystem-react 1.0.0-beta83 → 1.0.0-beta87
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/AlertSignFill-e607ff43.js +2 -0
- package/AlertSignFill-e607ff43.js.map +1 -0
- package/Button-55952154.js +2 -0
- package/Button-55952154.js.map +1 -0
- package/{Checkbox-ffdd3cb7.js → Checkbox-46666e69.js} +2 -2
- package/Checkbox-46666e69.js.map +1 -0
- package/Close-a6cbd165.js +2 -0
- package/Close-a6cbd165.js.map +1 -0
- package/FormGroup-56d60079.js +2 -0
- package/FormGroup-56d60079.js.map +1 -0
- package/Loader-6ff0d481.js +2 -0
- package/Loader-6ff0d481.js.map +1 -0
- package/Modal-ac3a4757.js +2 -0
- package/Modal-ac3a4757.js.map +1 -0
- package/Title-72851d51.js +2 -0
- package/Title-72851d51.js.map +1 -0
- package/Validation-372a97b9.js +2 -0
- package/Validation-372a97b9.js.map +1 -0
- package/X-8d8ff918.js +2 -0
- package/X-8d8ff918.js.map +1 -0
- package/_rollupPluginBabelHelpers-d0752906.js +2 -0
- package/_rollupPluginBabelHelpers-d0752906.js.map +1 -0
- package/components/AnchorLink/AnchorLink.d.ts +2 -0
- package/components/AnchorLink/AnchorLink.d.ts.map +1 -1
- package/components/AnchorLink/componentdata.json +19 -0
- package/components/AnchorLink/index.js +1 -1
- package/components/Avatar/Avatar.d.ts +2 -0
- package/components/Avatar/Avatar.d.ts.map +1 -1
- package/components/Avatar/componentdata.json +19 -0
- package/components/Avatar/index.js +1 -1
- package/components/Badge/Badge.d.ts +2 -0
- package/components/Badge/Badge.d.ts.map +1 -1
- package/components/Badge/componentdata.json +19 -0
- package/components/Badge/index.js +1 -1
- package/components/Button/Button.d.ts.map +1 -1
- package/components/Button/index.js +1 -1
- package/components/ButtonWithModal/ButtonWithModal.d.ts +2 -0
- package/components/ButtonWithModal/ButtonWithModal.d.ts.map +1 -1
- package/components/ButtonWithModal/componentdata.json +36 -24
- package/components/ButtonWithModal/index.js +1 -1
- package/components/Checkbox/index.js +1 -1
- package/components/Checkbox/styles.module.scss +20 -8
- package/components/Checkbox/styles.module.scss.d.ts +1 -0
- package/components/Close/Close.d.ts +12 -0
- package/components/Close/Close.d.ts.map +1 -0
- package/components/Close/componentdata.json +61 -0
- package/components/Close/index.d.ts +3 -0
- package/components/Close/index.d.ts.map +1 -0
- package/components/Close/index.js +2 -0
- package/components/Close/index.js.map +1 -0
- package/components/Close/styles.module.scss +32 -0
- package/components/Close/styles.module.scss.d.ts +9 -0
- package/components/ExpanderList/ExpanderList.d.ts +2 -0
- package/components/ExpanderList/ExpanderList.d.ts.map +1 -1
- package/components/ExpanderList/componentdata.json +19 -0
- package/components/ExpanderList/index.js +1 -1
- package/components/FormExample/FormExample.d.ts.map +1 -1
- package/components/FormExample/index.js +1 -1
- package/components/FormGroup/FormGroup.d.ts +1 -1
- package/components/FormGroup/FormGroup.d.ts.map +1 -1
- package/components/FormGroup/componentdata.json +1 -1
- package/components/FormGroup/index.js +1 -1
- package/components/FormGroup/styles.module.scss +16 -37
- package/components/FormGroup/styles.module.scss.d.ts +4 -10
- package/components/Icons/AcupunctureBack.d.ts +5 -0
- package/components/Icons/AcupunctureBack.d.ts.map +1 -0
- package/components/Icons/AcupunctureBack.js +2 -0
- package/components/Icons/AcupunctureBack.js.map +1 -0
- package/components/Icons/AdditionalIconInformation.js +6 -0
- package/components/Icons/AdditionalIconInformation.js.map +1 -1
- package/components/Icons/Icon.d.ts +1 -0
- package/components/Icons/Icon.d.ts.map +1 -1
- package/components/Icons/Icon.js +1 -1
- package/components/Icons/NoEye.d.ts +5 -0
- package/components/Icons/NoEye.d.ts.map +1 -0
- package/components/Icons/NoEye.js +2 -0
- package/components/Icons/NoEye.js.map +1 -0
- package/components/Icons/SectionSign.d.ts +5 -0
- package/components/Icons/SectionSign.d.ts.map +1 -0
- package/components/Icons/SectionSign.js +2 -0
- package/components/Icons/SectionSign.js.map +1 -0
- package/components/Icons/SpeechBubble.d.ts +5 -0
- package/components/Icons/SpeechBubble.d.ts.map +1 -0
- package/components/Icons/SpeechBubble.js +2 -0
- package/components/Icons/SpeechBubble.js.map +1 -0
- package/components/Icons/SupportingPerson.d.ts +5 -0
- package/components/Icons/SupportingPerson.d.ts.map +1 -0
- package/components/Icons/SupportingPerson.js +2 -0
- package/components/Icons/SupportingPerson.js.map +1 -0
- package/components/Icons/Syringe.d.ts +5 -0
- package/components/Icons/Syringe.d.ts.map +1 -0
- package/components/Icons/Syringe.js +2 -0
- package/components/Icons/Syringe.js.map +1 -0
- package/components/Icons/index.js +1 -1
- package/components/LinkList/LinkList.d.ts +4 -0
- package/components/LinkList/LinkList.d.ts.map +1 -1
- package/components/LinkList/componentdata.json +19 -0
- package/components/LinkList/index.js +1 -1
- package/components/List/List.d.ts +2 -0
- package/components/List/List.d.ts.map +1 -1
- package/components/List/componentdata.json +19 -0
- package/components/List/index.js +1 -1
- package/components/Loader/index.js +1 -1
- package/components/Logo/Logo.d.ts +2 -0
- package/components/Logo/Logo.d.ts.map +1 -1
- package/components/Logo/componentdata.json +19 -0
- package/components/Logo/index.js +1 -1
- package/components/Modal/Modal.d.ts +17 -4
- package/components/Modal/Modal.d.ts.map +1 -1
- package/components/Modal/__mocks__/IntersectionObserver.d.ts +6 -0
- package/components/Modal/__mocks__/IntersectionObserver.d.ts.map +1 -0
- package/components/Modal/componentdata.json +18 -6
- package/components/Modal/index.js +1 -1
- package/components/Modal/styles.module.scss +102 -88
- package/components/Modal/styles.module.scss.d.ts +17 -11
- package/components/NotificationPanel/NotificationPanel.d.ts +2 -0
- package/components/NotificationPanel/NotificationPanel.d.ts.map +1 -1
- package/components/NotificationPanel/componentdata.json +19 -0
- package/components/NotificationPanel/index.js +1 -1
- package/components/Slider/Slider.d.ts +2 -0
- package/components/Slider/Slider.d.ts.map +1 -1
- package/components/Slider/componentdata.json +19 -0
- package/components/Slider/index.js +1 -1
- package/components/Spacer/Spacer.d.ts +2 -0
- package/components/Spacer/Spacer.d.ts.map +1 -1
- package/components/Spacer/componentdata.json +19 -0
- package/components/Spacer/index.js +1 -1
- package/components/Tile/Tile.d.ts +2 -0
- package/components/Tile/Tile.d.ts.map +1 -1
- package/components/Tile/componentdata.json +19 -0
- package/components/Tile/index.js +1 -1
- package/components/Title/Title.d.ts +8 -1
- package/components/Title/Title.d.ts.map +1 -1
- package/components/Title/componentdata.json +1 -145
- package/components/Title/index.js +1 -1
- package/components/Validation/Validation.d.ts +1 -1
- package/components/Validation/Validation.d.ts.map +1 -1
- package/components/Validation/componentdata.json +1 -1
- package/components/Validation/index.js +1 -1
- package/components/Validation/styles.module.scss +6 -3
- package/components/Validation/styles.module.scss.d.ts +1 -1
- package/components/__mocks__/index.js +2 -0
- package/components/__mocks__/index.js.map +1 -0
- package/constants-d919236e.js +2 -0
- package/constants-d919236e.js.map +1 -0
- package/hooks/focus-utils.d.ts +7 -0
- package/hooks/focus-utils.d.ts.map +1 -0
- package/hooks/useFocusTrap.d.ts +1 -1
- package/hooks/useFocusTrap.d.ts.map +1 -1
- package/hooks/useVisibility.d.ts +3 -0
- package/hooks/useVisibility.d.ts.map +1 -0
- package/index.js +1 -1
- package/package.json +1 -1
- package/useBreakpoint-324a9b14.js +2 -0
- package/useBreakpoint-324a9b14.js.map +1 -0
- package/useHover-037be19d.js +2 -0
- package/useHover-037be19d.js.map +1 -0
- package/useWindowSize-73b47451.js +2 -0
- package/useWindowSize-73b47451.js.map +1 -0
- package/utils/uuid.d.ts +1 -0
- package/utils/uuid.d.ts.map +1 -1
- package/uuid-8870ab4b.js +2 -0
- package/uuid-8870ab4b.js.map +1 -0
- package/AlertSignFill-64bfef57.js +0 -2
- package/AlertSignFill-64bfef57.js.map +0 -1
- package/Button-7200b617.js +0 -2
- package/Button-7200b617.js.map +0 -1
- package/Checkbox-ffdd3cb7.js.map +0 -1
- package/FormGroup-17d2a3d3.js +0 -2
- package/FormGroup-17d2a3d3.js.map +0 -1
- package/Loader-9e099b42.js +0 -2
- package/Loader-9e099b42.js.map +0 -1
- package/Modal-5c2defa7.js +0 -2
- package/Modal-5c2defa7.js.map +0 -1
- package/Title-863af332.js +0 -2
- package/Title-863af332.js.map +0 -1
- package/Validation-e113da7e.js +0 -2
- package/Validation-e113da7e.js.map +0 -1
- package/_rollupPluginBabelHelpers-e1c7fe69.js +0 -2
- package/_rollupPluginBabelHelpers-e1c7fe69.js.map +0 -1
- package/constants-d1f48e8e.js +0 -2
- package/constants-d1f48e8e.js.map +0 -1
- package/useBreakpoint-a8fa8a61.js +0 -2
- package/useBreakpoint-a8fa8a61.js.map +0 -1
- package/useHover-57ad4df9.js +0 -2
- package/useHover-57ad4df9.js.map +0 -1
- package/useWindowSize-c22d7634.js +0 -2
- package/useWindowSize-c22d7634.js.map +0 -1
- package/uuid-484288be.js +0 -2
- package/uuid-484288be.js.map +0 -1
|
@@ -5,6 +5,10 @@ export declare enum ModalVariants {
|
|
|
5
5
|
error = "error",
|
|
6
6
|
image = "image"
|
|
7
7
|
}
|
|
8
|
+
export declare enum ModalSize {
|
|
9
|
+
large = "large",
|
|
10
|
+
medium = "medium"
|
|
11
|
+
}
|
|
8
12
|
export interface ModalProps {
|
|
9
13
|
/** Title of the modal */
|
|
10
14
|
title: string;
|
|
@@ -13,9 +17,9 @@ export interface ModalProps {
|
|
|
13
17
|
/** Description of the modal */
|
|
14
18
|
description?: string;
|
|
15
19
|
/** Changes the visual representation of the modal. Description will not render if children prop is provided */
|
|
16
|
-
variant?: ModalVariants;
|
|
17
|
-
/**
|
|
18
|
-
|
|
20
|
+
variant?: keyof typeof ModalVariants;
|
|
21
|
+
/** Change width of the modal (default: large) */
|
|
22
|
+
size?: keyof typeof ModalSize;
|
|
19
23
|
/** Hides the close button */
|
|
20
24
|
noCloseButton?: boolean;
|
|
21
25
|
/** Sets the data-testid attribute. */
|
|
@@ -39,6 +43,15 @@ export interface ModalProps {
|
|
|
39
43
|
/** Function is called when user clicks secondary button */
|
|
40
44
|
onClose?: () => void;
|
|
41
45
|
}
|
|
42
|
-
declare const Modal:
|
|
46
|
+
declare const Modal: {
|
|
47
|
+
(props: ModalProps): JSX.Element;
|
|
48
|
+
defaultProps: {
|
|
49
|
+
variant: ModalVariants;
|
|
50
|
+
primaryButtonText: string;
|
|
51
|
+
large: boolean;
|
|
52
|
+
className: string;
|
|
53
|
+
size: ModalSize;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
43
56
|
export default Modal;
|
|
44
57
|
//# sourceMappingURL=Modal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAiBzC,oBAAY,aAAa;IACvB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,KAAK,UAAU;CAChB;AAED,oBAAY,SAAS;IACnB,KAAK,UAAU;IACf,MAAM,WAAW;CAClB;AAED,MAAM,WAAW,UAAU;IACzB,yBAAyB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,yBAAyB;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+BAA+B;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+GAA+G;IAC/G,OAAO,CAAC,EAAE,MAAM,OAAO,aAAa,CAAC;IACrC,iDAAiD;IACjD,IAAI,CAAC,EAAE,MAAM,OAAO,SAAS,CAAC;IAC9B,6BAA6B;IAC7B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yBAAyB;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,2BAA2B;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,uCAAuC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,8BAA8B;IAC9B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,qCAAqC;IACrC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,2DAA2D;IAC3D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAuBD,QAAA,MAAM,KAAK;;;;;;;;;CAwIV,CAAC;AAIF,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IntersectionObserver.d.ts","sourceRoot":"","sources":["../../../../src/components/Modal/__mocks__/IntersectionObserver.ts"],"names":[],"mappings":"AAAA,cAAM,oBAAoB;IACxB,OAAO,IAAI,IAAI;IAGf,SAAS,IAAI,IAAI;CAGlB;AAMD,eAAe,oBAAoB,CAAC"}
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"required": false,
|
|
77
77
|
"type": {
|
|
78
78
|
"name": "enum",
|
|
79
|
-
"raw": "
|
|
79
|
+
"raw": "\"normal\" | \"warning\" | \"error\" | \"image\" | undefined",
|
|
80
80
|
"value": [
|
|
81
81
|
{
|
|
82
82
|
"value": "undefined"
|
|
@@ -96,12 +96,12 @@
|
|
|
96
96
|
]
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
|
-
"
|
|
99
|
+
"size": {
|
|
100
100
|
"defaultValue": {
|
|
101
|
-
"value": "
|
|
101
|
+
"value": "ModalSize.large"
|
|
102
102
|
},
|
|
103
|
-
"description": "
|
|
104
|
-
"name": "
|
|
103
|
+
"description": "Change width of the modal (default: large)",
|
|
104
|
+
"name": "size",
|
|
105
105
|
"parent": {
|
|
106
106
|
"fileName": "src/components/Modal/Modal.tsx",
|
|
107
107
|
"name": "ModalProps"
|
|
@@ -114,7 +114,19 @@
|
|
|
114
114
|
],
|
|
115
115
|
"required": false,
|
|
116
116
|
"type": {
|
|
117
|
-
"name": "
|
|
117
|
+
"name": "enum",
|
|
118
|
+
"raw": "\"large\" | \"medium\" | undefined",
|
|
119
|
+
"value": [
|
|
120
|
+
{
|
|
121
|
+
"value": "undefined"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"value": "\"large\""
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"value": "\"medium\""
|
|
128
|
+
}
|
|
129
|
+
]
|
|
118
130
|
}
|
|
119
131
|
},
|
|
120
132
|
"noCloseButton": {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{M as s}from"../../Modal-
|
|
1
|
+
import{M as s}from"../../Modal-ac3a4757.js";export{M as default}from"../../Modal-ac3a4757.js";import"../../_rollupPluginBabelHelpers-d0752906.js";import"react";import"../../index-9b84fabc.js";import"../../palette-f206f488.js";import"../../Button-55952154.js";import"../../_tslib-51c8a283.js";import"../../color-acb834c6.js";import"../../index-19b48c51.js";import"../../grid-11a70eb7.js";import"../../constants-d919236e.js";import"../../Loader-6ff0d481.js";import"../../uuid-8870ab4b.js";import"../Loader/styles.module.scss";import"../../useHover-037be19d.js";import"../../useWindowSize-73b47451.js";import"../Button/styles.module.scss";import"./styles.module.scss";import"../../AlertSignFill-e607ff43.js";import"../../Title-72851d51.js";import"../Title/styles.module.scss";import"../../Close-a6cbd165.js";import"../../X-8d8ff918.js";import"../Close/styles.module.scss";import"../../useBreakpoint-324a9b14.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
@import '../../scss/_spacers.scss';
|
|
1
2
|
@import '../../scss/_palette.scss';
|
|
2
|
-
@import '../../scss/spacers.scss';
|
|
3
3
|
@import '../../scss/_breakpoints.scss';
|
|
4
|
+
@import '../../scss/_font-settings.scss';
|
|
4
5
|
|
|
5
6
|
.modal-overlay {
|
|
6
7
|
z-index: 1300000;
|
|
@@ -12,10 +13,6 @@
|
|
|
12
13
|
right: 0;
|
|
13
14
|
bottom: 0;
|
|
14
15
|
|
|
15
|
-
&--lowerzindex {
|
|
16
|
-
z-index: 1100000;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
16
|
@media print {
|
|
20
17
|
display: none;
|
|
21
18
|
}
|
|
@@ -34,8 +31,16 @@
|
|
|
34
31
|
background-color: $white;
|
|
35
32
|
animation: open 200ms 1;
|
|
36
33
|
|
|
34
|
+
&__title--error {
|
|
35
|
+
color: $cherry600;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&__iconWrapper {
|
|
39
|
+
padding-right: 0.75rem;
|
|
40
|
+
}
|
|
41
|
+
|
|
37
42
|
p {
|
|
38
|
-
font-size:
|
|
43
|
+
font-size: 1.125rem;
|
|
39
44
|
}
|
|
40
45
|
|
|
41
46
|
&--normal {
|
|
@@ -43,98 +48,103 @@
|
|
|
43
48
|
}
|
|
44
49
|
&--error {
|
|
45
50
|
background-color: $cherry100;
|
|
46
|
-
|
|
47
|
-
&__title {
|
|
48
|
-
color: $cherry600;
|
|
49
|
-
}
|
|
50
51
|
}
|
|
51
52
|
&--warning {
|
|
52
53
|
background-color: $banana50;
|
|
53
54
|
}
|
|
54
|
-
|
|
55
|
-
&--
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
|
|
56
|
+
&--large {
|
|
57
|
+
width: calc(100vw - 0.75rem);
|
|
58
|
+
@media (max-width: map-get($grid-breakpoints, sm)) {
|
|
59
|
+
p {
|
|
60
|
+
font-size: 1.125rem;
|
|
59
61
|
}
|
|
60
62
|
}
|
|
61
|
-
}
|
|
62
63
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
65
|
+
width: 612px;
|
|
66
|
+
}
|
|
67
|
+
@media (min-width: map-get($grid-breakpoints, lg)) {
|
|
68
|
+
width: 696px;
|
|
67
69
|
}
|
|
68
70
|
}
|
|
69
71
|
|
|
70
|
-
|
|
71
|
-
width:
|
|
72
|
-
}
|
|
73
|
-
@media (min-width: map-get($grid-breakpoints, lg)) {
|
|
74
|
-
width: 515px;
|
|
75
|
-
}
|
|
72
|
+
&--medium {
|
|
73
|
+
width: calc(100vw - 0.75rem);
|
|
76
74
|
|
|
77
|
-
&--large {
|
|
78
75
|
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
79
|
-
width:
|
|
76
|
+
width: 335px;
|
|
80
77
|
}
|
|
81
78
|
@media (min-width: map-get($grid-breakpoints, lg)) {
|
|
82
|
-
width:
|
|
79
|
+
width: 515px;
|
|
83
80
|
}
|
|
84
81
|
}
|
|
85
82
|
|
|
86
83
|
&--image {
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
85
|
+
max-height: calc(100vh - 24px);
|
|
86
|
+
max-width: calc(100vw - 24px);
|
|
87
|
+
width: 100%;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&__shadow {
|
|
89
92
|
width: 100%;
|
|
93
|
+
height: 16px;
|
|
94
|
+
position: absolute;
|
|
95
|
+
transition: opacity 0.5s;
|
|
96
|
+
opacity: 0;
|
|
97
|
+
}
|
|
90
98
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
max-width: calc(100vw - 57px);
|
|
96
|
-
min-width: 100%;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
+
&__shadow--top {
|
|
100
|
+
//box-shadow: 0 3px 8px 4px grey;
|
|
101
|
+
background: linear-gradient(0deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.45702030812324934) 100%);
|
|
102
|
+
}
|
|
99
103
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
104
|
+
&__shadow--bottom {
|
|
105
|
+
//box-shadow: 0 -3px 8px 4px grey;
|
|
106
|
+
background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.45702030812324934) 100%);
|
|
107
|
+
margin-top: -16px;
|
|
105
108
|
}
|
|
106
109
|
|
|
107
|
-
&
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
top: 15px;
|
|
111
|
-
@media (max-width: map-get($grid-breakpoints, md)) {
|
|
112
|
-
right: 0px;
|
|
113
|
-
top: 0px;
|
|
114
|
-
}
|
|
110
|
+
&__shadow--show {
|
|
111
|
+
opacity: 1;
|
|
112
|
+
}
|
|
115
113
|
|
|
116
|
-
|
|
114
|
+
&__closeWrapper {
|
|
115
|
+
position: relative;
|
|
116
|
+
width: 100%;
|
|
117
|
+
|
|
118
|
+
&__close {
|
|
117
119
|
position: absolute;
|
|
118
|
-
right:
|
|
119
|
-
|
|
120
|
+
right: getSpacer(2xs);
|
|
121
|
+
top: getSpacer(2xs);
|
|
120
122
|
}
|
|
121
123
|
}
|
|
122
124
|
|
|
123
125
|
&__contentWrapper {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
padding: 32px 24px;
|
|
127
|
-
}
|
|
126
|
+
max-height: calc(100vh - 10rem);
|
|
127
|
+
overflow: auto;
|
|
128
128
|
|
|
129
129
|
&--image {
|
|
130
|
-
|
|
130
|
+
max-height: 100vh;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
&
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
133
|
+
&__scroll {
|
|
134
|
+
&--large {
|
|
135
|
+
@media (max-width: map-get($grid-breakpoints, sm)) {
|
|
136
|
+
padding: getSpacer(xl) getSpacer(m) getSpacer(xs) getSpacer(m);
|
|
137
|
+
}
|
|
138
|
+
padding: getSpacer(xl) getSpacer(xl) getSpacer(xs) getSpacer(xl);
|
|
139
|
+
}
|
|
140
|
+
&--medium {
|
|
141
|
+
@media (max-width: map-get($grid-breakpoints, sm)) {
|
|
142
|
+
padding: getSpacer(xl) getSpacer(m) getSpacer(xs) getSpacer(m);
|
|
143
|
+
}
|
|
144
|
+
padding: getSpacer(l) getSpacer(m) getSpacer(xs) getSpacer(m);
|
|
145
|
+
}
|
|
146
|
+
&--large#{&}--image {
|
|
147
|
+
padding: getSpacer(xl) getSpacer(xs) getSpacer(l) getSpacer(xs);
|
|
138
148
|
}
|
|
139
149
|
}
|
|
140
150
|
|
|
@@ -146,39 +156,43 @@
|
|
|
146
156
|
align-items: center;
|
|
147
157
|
}
|
|
148
158
|
}
|
|
159
|
+
|
|
160
|
+
&__imageWrapper {
|
|
161
|
+
line-height: 0;
|
|
162
|
+
text-align: center;
|
|
163
|
+
img {
|
|
164
|
+
max-height: calc(100vh - 185px);
|
|
165
|
+
max-width: calc(100vw - 57px);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
&__imageDescription {
|
|
170
|
+
font-size: $font-size-xs;
|
|
171
|
+
padding-top: getSpacer(s);
|
|
172
|
+
display: block;
|
|
173
|
+
}
|
|
149
174
|
}
|
|
150
175
|
|
|
151
176
|
&__description {
|
|
152
177
|
white-space: pre-line;
|
|
153
178
|
}
|
|
154
179
|
|
|
155
|
-
&
|
|
156
|
-
height: 42px;
|
|
157
|
-
width: 42px;
|
|
158
|
-
padding: 0;
|
|
159
|
-
border: 0;
|
|
160
|
-
background-color: transparent;
|
|
161
|
-
cursor: pointer;
|
|
162
|
-
|
|
163
|
-
&:hover,
|
|
164
|
-
&:active {
|
|
165
|
-
background-color: rgba(88, 171, 187, 0.1);
|
|
166
|
-
}
|
|
167
|
-
&:focus {
|
|
168
|
-
box-shadow: 0px 0px 0px 2px $black;
|
|
169
|
-
background-color: rgba(88, 171, 187, 0.1);
|
|
170
|
-
border-radius: 0;
|
|
171
|
-
border: 0;
|
|
172
|
-
outline: none;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
&__actions {
|
|
180
|
+
&__call-to-action {
|
|
177
181
|
display: flex;
|
|
178
|
-
|
|
182
|
+
|
|
179
183
|
button:first-child {
|
|
180
184
|
margin-right: 24px;
|
|
181
185
|
}
|
|
186
|
+
|
|
187
|
+
&--large {
|
|
188
|
+
padding: getSpacer(l) getSpacer(xl) getSpacer(xl) getSpacer(xl);
|
|
189
|
+
@media (max-width: map-get($grid-breakpoints, sm)) {
|
|
190
|
+
padding: getSpacer(l) getSpacer(m) getSpacer(l) getSpacer(m);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
&--medium {
|
|
194
|
+
padding: getSpacer(m) getSpacer(m) getSpacer(m) getSpacer(m);
|
|
195
|
+
}
|
|
182
196
|
}
|
|
183
197
|
|
|
184
198
|
/* animation on open */
|
|
@@ -1,27 +1,33 @@
|
|
|
1
1
|
export type Styles = {
|
|
2
2
|
align: string;
|
|
3
3
|
modal: string;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
'
|
|
4
|
+
'modal__call-to-action': string;
|
|
5
|
+
'modal__call-to-action--large': string;
|
|
6
|
+
'modal__call-to-action--medium': string;
|
|
7
|
+
modal__closeWrapper: string;
|
|
8
|
+
modal__closeWrapper__close: string;
|
|
7
9
|
modal__contentWrapper: string;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
modal__contentWrapper__imageDescription: string;
|
|
11
|
+
modal__contentWrapper__imageWrapper: string;
|
|
12
|
+
'modal__contentWrapper__scroll--image': string;
|
|
13
|
+
'modal__contentWrapper__scroll--large': string;
|
|
14
|
+
'modal__contentWrapper__scroll--medium': string;
|
|
10
15
|
modal__contentWrapper__title: string;
|
|
11
16
|
'modal__contentWrapper--image': string;
|
|
12
17
|
modal__description: string;
|
|
13
|
-
|
|
18
|
+
modal__iconWrapper: string;
|
|
19
|
+
modal__shadow: string;
|
|
20
|
+
'modal__shadow--bottom': string;
|
|
21
|
+
'modal__shadow--show': string;
|
|
22
|
+
'modal__shadow--top': string;
|
|
23
|
+
'modal__title--error': string;
|
|
14
24
|
'modal--error': string;
|
|
15
|
-
'modal--error__title': string;
|
|
16
25
|
'modal--image': string;
|
|
17
|
-
'modal--image__img': string;
|
|
18
|
-
'modal--image__text': string;
|
|
19
26
|
'modal--large': string;
|
|
27
|
+
'modal--medium': string;
|
|
20
28
|
'modal--normal': string;
|
|
21
29
|
'modal--warning': string;
|
|
22
|
-
'modal--warning__title': string;
|
|
23
30
|
'modal-overlay': string;
|
|
24
|
-
'modal-overlay--lowerzindex': string;
|
|
25
31
|
open: string;
|
|
26
32
|
};
|
|
27
33
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationPanel.d.ts","sourceRoot":"","sources":["../../../src/components/NotificationPanel/NotificationPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAe1B,oBAAY,yBAAyB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAC7E,oBAAY,sBAAsB,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAElE,UAAU,sBAAsB;IAC9B,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,mEAAmE;IACnE,OAAO,CAAC,EAAE,yBAAyB,CAAC;IACpC,0DAA0D;IAC1D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mDAAmD;IACnD,IAAI,CAAC,EAAE,sBAAsB,CAAC;IAC9B,sFAAsF;IACtF,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;IAClE,wDAAwD;IACxD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,6EAA6E;IAC7E,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8BAA8B;IAC9B,iBAAiB,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"NotificationPanel.d.ts","sourceRoot":"","sources":["../../../src/components/NotificationPanel/NotificationPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAe1B,oBAAY,yBAAyB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAC7E,oBAAY,sBAAsB,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAElE,UAAU,sBAAsB;IAC9B,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,mEAAmE;IACnE,OAAO,CAAC,EAAE,yBAAyB,CAAC;IACpC,0DAA0D;IAC1D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mDAAmD;IACnD,IAAI,CAAC,EAAE,sBAAsB,CAAC;IAC9B,sFAAsF;IACtF,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;IAClE,wDAAwD;IACxD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,6EAA6E;IAC7E,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8BAA8B;IAC9B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;CAK7B,CAAC;AAUF,QAAA,MAAM,iBAAiB,+FAyFrB,CAAC;AAEH,eAAe,iBAAiB,CAAC"}
|
|
@@ -222,6 +222,25 @@
|
|
|
222
222
|
"type": {
|
|
223
223
|
"name": "string"
|
|
224
224
|
}
|
|
225
|
+
},
|
|
226
|
+
"testId": {
|
|
227
|
+
"defaultValue": null,
|
|
228
|
+
"description": "Sets the data-testid attribute.",
|
|
229
|
+
"name": "testId",
|
|
230
|
+
"parent": {
|
|
231
|
+
"fileName": "src/components/NotificationPanel/NotificationPanel.tsx",
|
|
232
|
+
"name": "NotificationPanelProps"
|
|
233
|
+
},
|
|
234
|
+
"declarations": [
|
|
235
|
+
{
|
|
236
|
+
"fileName": "src/components/NotificationPanel/NotificationPanel.tsx",
|
|
237
|
+
"name": "NotificationPanelProps"
|
|
238
|
+
}
|
|
239
|
+
],
|
|
240
|
+
"required": false,
|
|
241
|
+
"type": {
|
|
242
|
+
"name": "string"
|
|
243
|
+
}
|
|
225
244
|
}
|
|
226
245
|
}
|
|
227
246
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
import{a as e}from"../../_rollupPluginBabelHelpers-d0752906.js";import a from"react";import{c as t}from"../../index-9b84fabc.js";import{p as o}from"../../palette-f206f488.js";import{I as i,a as n}from"../../constants-d919236e.js";import{u as r}from"../../useHover-037be19d.js";import{a as l,A as c}from"../../AlertSignFill-e607ff43.js";import{X as s}from"../../X-8d8ff918.js";import m from"./styles.module.scss";import"../../_tslib-51c8a283.js";var f={info:a.createElement(i,{svgIcon:function(e){var t=e.isExtraSmall,o=e.isHovered,i=a.createElement("path",{d:"M25.672 30.501a.682.682 0 01-.322-.272.835.835 0 01-.11-.443v-7.917l-.112-.112-3.651.194v.544c.148.015.314.05.495.104.18.055.316.112.406.172a.994.994 0 01.299.316.88.88 0 01.119.459v6.337a.879.879 0 01-.098.443.623.623 0 01-.335.257c-.09.035-.197.06-.32.074a8.883 8.883 0 01-.38.038v.544h4.709v-.544a2.45 2.45 0 01-.7-.194M24 37.604c-7.5 0-13.604-6.103-13.604-13.604 0-7.501 6.104-13.603 13.604-13.603 7.502 0 13.602 6.102 13.602 13.603 0 7.501-6.1 13.604-13.601 13.604m0-28.909C15.56 8.695 8.694 15.562 8.694 24c0 8.438 6.867 15.305 15.305 15.305 8.438 0 15.304-6.867 15.304-15.305 0-8.438-6.866-15.305-15.304-15.305m-.274 10.632a1.559 1.559 0 100-3.118 1.559 1.559 0 000 3.118"}),n=a.createElement("path",{d:"M25.672 30.501a.682.682 0 01-.322-.272.835.835 0 01-.11-.443v-7.917l-.112-.112-3.651.194v.544c.148.015.314.05.495.104.18.055.316.112.406.172a.994.994 0 01.299.316.88.88 0 01.119.459v6.337a.879.879 0 01-.098.443.623.623 0 01-.335.257c-.09.035-.197.06-.32.074a8.883 8.883 0 01-.38.038v.544h4.709v-.544a2.45 2.45 0 01-.7-.194M24 37.604c-7.5 0-13.604-6.103-13.604-13.604 0-7.501 6.104-13.603 13.604-13.603 7.502 0 13.602 6.102 13.602 13.603 0 7.501-6.1 13.604-13.601 13.604m0-28.909C15.56 8.695 8.694 15.562 8.694 24c0 8.438 6.867 15.305 15.305 15.305 8.438 0 15.304-6.867 15.304-15.305 0-8.438-6.866-15.305-15.304-15.305m-.274 8.632a1.559 1.559 0 100-3.118 1.559 1.559 0 000 3.118"}),r=a.createElement("path",{d:"M25.668 30.487a.68.68 0 01-.32-.271.833.833 0 01-.111-.442v-7.9l-.112-.112-3.643.193v.543c.148.015.313.05.495.104.18.055.315.112.405.172a.991.991 0 01.297.315.877.877 0 01.119.458v6.324c0 .182-.032.33-.097.442a.622.622 0 01-.334.256c-.09.035-.197.06-.32.074-.124.015-.25.028-.38.038v.543h4.7v-.543a2.445 2.445 0 01-.699-.194M24 37.575c-7.485 0-13.575-6.09-13.575-13.575 0-7.485 6.09-13.574 13.575-13.574 7.486 0 13.574 6.089 13.574 13.574 0 7.485-6.088 13.575-13.574 13.575m0-28.848C15.58 8.727 8.728 15.58 8.728 24S15.579 39.273 24 39.273c8.42 0 15.272-6.853 15.272-15.273S32.421 8.727 24 8.727m-.274 10.61a1.556 1.556 0 100-3.112 1.556 1.556 0 000 3.112"});return t?o?a.createElement("path",{d:"M25.668 30.487a.68.68 0 01-.32-.271.833.833 0 01-.111-.442v-7.9l-.112-.112-3.643.193v.543c.148.015.313.05.495.104.18.055.315.112.405.172a.991.991 0 01.297.315.877.877 0 01.119.458v6.324c0 .182-.032.33-.097.442a.622.622 0 01-.334.256c-.09.035-.197.06-.32.074-.124.015-.25.028-.38.038v.543h4.7v-.543a2.445 2.445 0 01-.699-.194M24 37.575c-7.485 0-13.575-6.09-13.575-13.575 0-7.485 6.09-13.574 13.575-13.574 7.486 0 13.574 6.089 13.574 13.574 0 7.485-6.088 13.575-13.574 13.575m0-28.848C15.58 8.727 8.728 15.58 8.728 24S15.579 39.273 24 39.273c8.42 0 15.272-6.853 15.272-15.273S32.421 8.727 24 8.727m-.274 8.084a1.556 1.556 0 100-3.112 1.556 1.556 0 000 3.112"}):r:o?n:i},color:o.kiwi900,hoverColor:o.kiwi900}),warn:a.createElement(i,{svgIcon:l,color:"black",hoverColor:"black"}),alert:a.createElement(i,{svgIcon:c,color:o.cherry500,hoverColor:o.cherry500}),alertLabel:a.createElement(i,{svgIcon:l,color:o.cherry500,hoverColor:o.cherry500}),crisis:a.createElement(i,{svgIcon:c,color:o.banana200,hoverColor:o.banana200})},v=a.forwardRef((function(l,c){var v,p,d,h=l.children,u=l.variant,_=void 0===u?"info":u,b=l.shadow,E=void 0!==b&&b,C=l.dismissable,w=void 0!==C&&C,g=l.onClick,y=l.label,I=l.fluid,M=void 0!==I&&I,j=l.size,k=l.className,N=l.testId,S=r(void 0,w),H=S.hoverRef,L=S.isHovered,x=t(m["notification-panel__close-button"],"crisis"===_?m["notification-panel__close-button--crisis"]:"");var z;return z=a.createElement("div",{ref:c,"data-testid":N,className:t(m["notification-panel"],m["notification-panel--"+j],m["notification-panel--"+_],(v={},e(v,m["notification-panel--shadow"],!M&&E),e(v,m["notification-panel--haslabel"],!!y&&!h),e(v,m["notification-panel--dismissable"],w),v),k||"")},a.createElement("span",{className:m["notification-panel__icon"]},f["alert"===_&&y&&!h?"alertLabel":_]),a.createElement("section",{"aria-label":function(){if(h){var e="";return a.Children.map(h,(function(a){"string"==typeof a&&(e+=a)})),e}return""}(),className:t(m["notification-panel__content"],(p={},e(p,m["notification-panel__content--crisis"],"crisis"===_),e(p,m["notification-panel__content--haslabel"],!!y&&!h),e(p,m["notification-panel__content--isred"],"alert"===_&&!!y&&!h),p))},y?a.createElement("h1",{className:m["notification-panel__label"],dangerouslySetInnerHTML:{__html:y}}):null,h),w?a.createElement("span",{className:m["notification-panel__action-column"]},a.createElement("button",{className:x,onClick:g,ref:H,"aria-label":null!==(d=l.ariaLabelCloseBtn)&&void 0!==d?d:"Lukk"},a.createElement(i,{svgIcon:s,isHovered:L,size:n.XSmall,color:"crisis"===_?o.white:o.blueberry500,hoverColor:"crisis"===_?o.white:o.blueberry700}))):null),M?a.createElement("div",{className:t(m["notification-panel__fluidwrapper"],m["notification-panel__fluidwrapper--"+_],e({},m["notification-panel__fluidwrapper--shadow"],E))},z):z}));export default v;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -12,6 +12,8 @@ interface SliderProps {
|
|
|
12
12
|
disabled?: boolean;
|
|
13
13
|
/** Function to be called when the value state has changed. */
|
|
14
14
|
onChange?: (value: number) => void;
|
|
15
|
+
/** Sets the data-testid attribute. */
|
|
16
|
+
testId?: string;
|
|
15
17
|
}
|
|
16
18
|
export declare const Slider: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLElement>>;
|
|
17
19
|
export default Slider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.d.ts","sourceRoot":"","sources":["../../../src/components/Slider/Slider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAqB3D,UAAU,WAAW;IACnB,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gDAAgD;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mEAAmE;IACnE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"Slider.d.ts","sourceRoot":"","sources":["../../../src/components/Slider/Slider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAqB3D,UAAU,WAAW;IACnB,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gDAAgD;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mEAAmE;IACnE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,MAAM,iFA+IjB,CAAC;AAEH,eAAe,MAAM,CAAC"}
|
|
@@ -113,6 +113,25 @@
|
|
|
113
113
|
"type": {
|
|
114
114
|
"name": "((value: number) => void)"
|
|
115
115
|
}
|
|
116
|
+
},
|
|
117
|
+
"testId": {
|
|
118
|
+
"defaultValue": null,
|
|
119
|
+
"description": "Sets the data-testid attribute.",
|
|
120
|
+
"name": "testId",
|
|
121
|
+
"parent": {
|
|
122
|
+
"fileName": "src/components/Slider/Slider.tsx",
|
|
123
|
+
"name": "SliderProps"
|
|
124
|
+
},
|
|
125
|
+
"declarations": [
|
|
126
|
+
{
|
|
127
|
+
"fileName": "src/components/Slider/Slider.tsx",
|
|
128
|
+
"name": "SliderProps"
|
|
129
|
+
}
|
|
130
|
+
],
|
|
131
|
+
"required": false,
|
|
132
|
+
"type": {
|
|
133
|
+
"name": "string"
|
|
134
|
+
}
|
|
116
135
|
}
|
|
117
136
|
}
|
|
118
137
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as e}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
import{_ as e}from"../../_rollupPluginBabelHelpers-d0752906.js";import t,{useState as n,useRef as r,useEffect as o}from"react";import{c as a}from"../../index-9b84fabc.js";import{T as i}from"../../Title-72851d51.js";import c from"./styles.module.scss";import"../Title/styles.module.scss";var u=function(e){return e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),!1},l=function(e){return d(e)?e.touches[0].pageX:e.pageX},s=function(e){var t=e?e.getBoundingClientRect():void 0;return t?t.right-t.left:0},d=function(e){return("touchcancel"===e.type||"touchend"===e.type||"touchenter"===e.type||"touchleave"===e.type||"touchmove"===e.type||"touchstart"===e.type)&&!(0===e.touches.length)},m=function(e,t,n){var r=e-e%t,o=Math.floor(n/t)*t;e>o&&(e>o+(n-o)/2&&(r=n));return Math.round(r)},f=t.forwardRef((function(d,f){var v=d.title,p=d.labelLeft,h=d.labelRight,_=d.disabled,g=void 0!==_&&_,E=d.step,y=void 0===E?1:E,b=d.onChange,w=d.testId,k=n(50),L=e(k,2),N=L[0],x=L[1],D=n(!1),M=e(D,2),R=M[0],A=M[1],T=n(0),j=e(T,2),B=j[0],C=j[1],P=n(0),I=e(P,2),X=I[0],H=I[1],K=n(0),S=e(K,2),U=S[0],q=S[1],z=n(0),F=e(z,2),G=F[0],J=F[1],O=f||r(null),Q=r(null),V=function(e){te(e)},W=function(e){ee(e)},Y=function(e){te(e)},Z=function(e){ee(e)};o((function(){var e=s(O.current),t=s(Q.current);q(function(e,t,n,r,o){return(t-n)/(o-r)*e}(N,e,t,0,100)),C(e),H(t)}),[]),o((function(){R&&(function(e,t){document.addEventListener("mousemove",e,!1),document.addEventListener("mouseup",t,!1)}(V,W),function(e,t){document.addEventListener("touchmove",e,!1),document.addEventListener("touchend",t,!1)}(Y,Z))}),[R]),o((function(){!g&&b&&b(N)}),[N]);var $=function(e){var t;if(!g){var n=s(O.current),r=s(Q.current),o=l(e);!function(e,t,n,r){var o=t?t.getBoundingClientRect():void 0,a=o?o.left:0;r(a?e-(a+n/2):0)}(o,Q.current,r,ne),A(!0),J(o),C(n),H(r),null===(t=Q.current)||void 0===t||t.focus(),u(e)}},ee=function(e){g||(A(!1),function(e,t){document.removeEventListener("mousemove",e,!1),document.removeEventListener("mouseup",t,!1)}(V,W),function(e,t){document.removeEventListener("touchmove",e,!1),document.removeEventListener("touchend",t,!1)}(Y,Z),u(e))},te=function(e){if(!g&&R){var t=l(e);ne(t-G),u(e)}},ne=function(e){if(0!==e){var t=function(e,t,n,r){var o=r+e;return o<0&&(o=0),o>t-n&&(o=t-n),o}(e,B,X,U);q(t),J(t+e),x(function(e,t,n,r,o,a){var i=(t-n)/(a-o),c=Math.round(e/i);return m(c,r,a)}(t,B,X,y,0,100))}};return t.createElement("div",{className:c.slider,"data-testid":w},v&&t.createElement(i,{htmlMarkup:"h3",margin:1.5,appearance:"title3"},v),t.createElement("div",{ref:O,className:a(c["slider__track-wrapper"],g?c["slider__track-wrapper--disabled"]:""),onMouseDown:$,onTouchStart:$,"data-testid":"tracker"},t.createElement("div",{className:a(c.slider__track,g?c["slider__track--disabled"]:"")}),t.createElement("div",{ref:Q,className:a(c.slider__trigger,g?c["slider__trigger--disabled"]:""),style:{left:"".concat(U,"px")},onKeyDown:function(e){if(!g){var t=(B-X)/100;"ArrowRight"!==e.key&&"ArrowDown"!==e.key||ne(y*t),"ArrowLeft"!==e.key&&"ArrowUp"!==e.key||ne(-y*t)}},role:"slider","aria-valuenow":N,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"".concat(v?v+" ":"").concat(p?p+" ":"").concat(h?h+" ":""),tabIndex:g?-1:0},t.createElement("div",{className:a(c["slider__trigger-inner"],g?c["slider__trigger-inner--disabled"]:"")}))),(p||h)&&t.createElement("span",{className:c.slider__options},t.createElement("p",{className:c.slider__text,"aria-hidden":!0},p),t.createElement("p",{className:c.slider__text,"aria-hidden":!0},h)))}));export default f;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -5,6 +5,8 @@ interface SpacerProps {
|
|
|
5
5
|
size?: SpacerSizes;
|
|
6
6
|
/** Adds custom classes to the element. */
|
|
7
7
|
className?: string;
|
|
8
|
+
/** Sets the data-testid attribute. */
|
|
9
|
+
testId?: string;
|
|
8
10
|
}
|
|
9
11
|
declare const Spacer: React.ForwardRefExoticComponent<SpacerProps & React.RefAttributes<HTMLElement>>;
|
|
10
12
|
export default Spacer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spacer.d.ts","sourceRoot":"","sources":["../../../src/components/Spacer/Spacer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIpD,UAAU,WAAW;IACnB,mCAAmC;IACnC,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"Spacer.d.ts","sourceRoot":"","sources":["../../../src/components/Spacer/Spacer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIpD,UAAU,WAAW;IACnB,mCAAmC;IACnC,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,QAAA,MAAM,MAAM,iFAqBV,CAAC;AAEH,eAAe,MAAM,CAAC"}
|
|
@@ -79,6 +79,25 @@
|
|
|
79
79
|
"type": {
|
|
80
80
|
"name": "string"
|
|
81
81
|
}
|
|
82
|
+
},
|
|
83
|
+
"testId": {
|
|
84
|
+
"defaultValue": null,
|
|
85
|
+
"description": "Sets the data-testid attribute.",
|
|
86
|
+
"name": "testId",
|
|
87
|
+
"parent": {
|
|
88
|
+
"fileName": "src/components/Spacer/Spacer.tsx",
|
|
89
|
+
"name": "SpacerProps"
|
|
90
|
+
},
|
|
91
|
+
"declarations": [
|
|
92
|
+
{
|
|
93
|
+
"fileName": "src/components/Spacer/Spacer.tsx",
|
|
94
|
+
"name": "SpacerProps"
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
"required": false,
|
|
98
|
+
"type": {
|
|
99
|
+
"name": "string"
|
|
100
|
+
}
|
|
82
101
|
}
|
|
83
102
|
}
|
|
84
103
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
import{a as s}from"../../_rollupPluginBabelHelpers-d0752906.js";import e from"react";import{c as r}from"../../index-9b84fabc.js";import a from"./styles.module.scss";var l=e.forwardRef((function(l,c){var p,x=l.size,t=void 0===x?"s":x,m=l.className,o=l.testId,f=r(a.spacer,(s(p={},a["spacer--2xs"],"2xs"===t),s(p,a["spacer--xs"],"xs"===t),s(p,a["spacer--s"],"s"===t),s(p,a["spacer--m"],"m"===t),s(p,a["spacer--l"],"l"===t),s(p,a["spacer--xl"],"xl"===t),s(p,a["spacer--2xl"],"2xl"===t),s(p,a["spacer--3xl"],"3xl"===t),s(p,a["spacer--4xl"],"4xl"===t),s(p,a["spacer--5xl"],"5xl"===t),s(p,a["spacer--6xl"],"6xl"===t),p),m);return e.createElement("span",{className:f,ref:c,"data-testid":o})}));export default l;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -16,6 +16,8 @@ interface TileProps extends HTMLAnchorProps {
|
|
|
16
16
|
fixed?: boolean;
|
|
17
17
|
/** Called when the tile is clicked on. */
|
|
18
18
|
onClick?: (e?: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
19
|
+
/** Sets the data-testid attribute. */
|
|
20
|
+
testId?: string;
|
|
19
21
|
}
|
|
20
22
|
interface TileTitleProps {
|
|
21
23
|
children: React.ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tile.d.ts","sourceRoot":"","sources":["../../../src/components/Tile/Tile.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAK7C,UAAU,SAAU,SAAQ,eAAe;IACzC,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,IAAI,EAAE,KAAK,CAAC,YAAY,CAAC;IACzB,sDAAsD;IACtD,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC;IAC1B,iDAAiD;IACjD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,4DAA4D;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mDAAmD;IACnD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"Tile.d.ts","sourceRoot":"","sources":["../../../src/components/Tile/Tile.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAK7C,UAAU,SAAU,SAAQ,eAAe;IACzC,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,IAAI,EAAE,KAAK,CAAC,YAAY,CAAC;IACzB,sDAAsD;IACtD,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC;IAC1B,iDAAiD;IACjD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,4DAA4D;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mDAAmD;IACnD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;IAClE,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,UAAU,cAAc;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,YAAa,SAAQ,KAAK,CAAC,yBAAyB,CAAC,SAAS,GAAG,KAAK,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC;IACvH,KAAK,EAAE,KAAK,CAAC,yBAAyB,CAAC,cAAc,GAAG,KAAK,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC,CAAC;CAClG;AAqBD,eAAO,MAAM,IAAI,cAmCC,CAAC;AAInB,eAAe,IAAI,CAAC"}
|