@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
|
@@ -41,7 +41,18 @@
|
|
|
41
41
|
text-align: center;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
&--
|
|
44
|
+
&--inline {
|
|
45
|
+
align-self: center;
|
|
46
|
+
padding-left: .5rem;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&--overlay{
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&--overlay-screen {
|
|
45
56
|
z-index: 9999;
|
|
46
57
|
background: $transparentGrey;
|
|
47
58
|
position: fixed;
|
|
@@ -49,9 +60,13 @@
|
|
|
49
60
|
left: 0;
|
|
50
61
|
right: 0;
|
|
51
62
|
bottom: 0;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
63
|
+
}
|
|
64
|
+
&--overlay-parent {
|
|
65
|
+
position: absolute;
|
|
66
|
+
top: 0;
|
|
67
|
+
background: $transparentGrey;
|
|
68
|
+
height: 100%;
|
|
69
|
+
width: 100%;
|
|
55
70
|
}
|
|
56
71
|
}
|
|
57
72
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Logo/index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,eAAe,IAAI,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Logo/index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,eAAe,IAAI,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { ZIndex } from '../../constants';
|
|
2
3
|
export declare enum ModalVariants {
|
|
3
4
|
normal = "normal",
|
|
4
5
|
warning = "warning",
|
|
@@ -43,10 +44,14 @@ export interface ModalProps {
|
|
|
43
44
|
afterTitleChildren?: React.ReactNode;
|
|
44
45
|
/** Adds custom classes to the element. */
|
|
45
46
|
className?: string;
|
|
47
|
+
/** Customize the z-index of the modal */
|
|
48
|
+
zIndex?: number;
|
|
46
49
|
/** Function is called when user clicks primary button */
|
|
47
50
|
onSuccess?: () => void;
|
|
48
51
|
/** Function is called when user clicks secondary button */
|
|
49
52
|
onClose?: () => void;
|
|
53
|
+
/** When enabled the component will be rendered in the bottom of document.body */
|
|
54
|
+
printable?: boolean;
|
|
50
55
|
}
|
|
51
56
|
declare const Modal: {
|
|
52
57
|
(props: ModalProps): JSX.Element;
|
|
@@ -56,6 +61,7 @@ declare const Modal: {
|
|
|
56
61
|
large: boolean;
|
|
57
62
|
className: string;
|
|
58
63
|
size: ModalSize;
|
|
64
|
+
zIndex: ZIndex;
|
|
59
65
|
};
|
|
60
66
|
};
|
|
61
67
|
export default Modal;
|
|
@@ -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,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,oBAAY,aAAa;IACvB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,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,8BAA8B;IAC9B,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC1B,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,kCAAkC;IAClC,kBAAkB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACrC,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yCAAyC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,2DAA2D;IAC3D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,iFAAiF;IACjF,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAuCD,QAAA,MAAM,KAAK;;;;;;;;;;CAwJV,CAAC;AAIF,eAAe,KAAK,CAAC"}
|
|
@@ -345,6 +345,27 @@
|
|
|
345
345
|
"name": "string"
|
|
346
346
|
}
|
|
347
347
|
},
|
|
348
|
+
"zIndex": {
|
|
349
|
+
"defaultValue": {
|
|
350
|
+
"value": "ZIndex.Modal"
|
|
351
|
+
},
|
|
352
|
+
"description": "Customize the z-index of the modal",
|
|
353
|
+
"name": "zIndex",
|
|
354
|
+
"parent": {
|
|
355
|
+
"fileName": "src/components/Modal/Modal.tsx",
|
|
356
|
+
"name": "ModalProps"
|
|
357
|
+
},
|
|
358
|
+
"declarations": [
|
|
359
|
+
{
|
|
360
|
+
"fileName": "src/components/Modal/Modal.tsx",
|
|
361
|
+
"name": "ModalProps"
|
|
362
|
+
}
|
|
363
|
+
],
|
|
364
|
+
"required": false,
|
|
365
|
+
"type": {
|
|
366
|
+
"name": "number"
|
|
367
|
+
}
|
|
368
|
+
},
|
|
348
369
|
"onSuccess": {
|
|
349
370
|
"defaultValue": null,
|
|
350
371
|
"description": "Function is called when user clicks primary button",
|
|
@@ -382,6 +403,25 @@
|
|
|
382
403
|
"type": {
|
|
383
404
|
"name": "(() => void)"
|
|
384
405
|
}
|
|
406
|
+
},
|
|
407
|
+
"printable": {
|
|
408
|
+
"defaultValue": null,
|
|
409
|
+
"description": "When enabled the component will be rendered in the bottom of document.body",
|
|
410
|
+
"name": "printable",
|
|
411
|
+
"parent": {
|
|
412
|
+
"fileName": "src/components/Modal/Modal.tsx",
|
|
413
|
+
"name": "ModalProps"
|
|
414
|
+
},
|
|
415
|
+
"declarations": [
|
|
416
|
+
{
|
|
417
|
+
"fileName": "src/components/Modal/Modal.tsx",
|
|
418
|
+
"name": "ModalProps"
|
|
419
|
+
}
|
|
420
|
+
],
|
|
421
|
+
"required": false,
|
|
422
|
+
"type": {
|
|
423
|
+
"name": "boolean"
|
|
424
|
+
}
|
|
385
425
|
}
|
|
386
426
|
}
|
|
387
427
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,eAAe,KAAK,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{M as s}from"../../Modal-
|
|
1
|
+
import{M as s}from"../../Modal-b7d10081.js";export{b as ModalSize,a as ModalVariants,M as default}from"../../Modal-b7d10081.js";import"../../_rollupPluginBabelHelpers-d0752906.js";import"react";import"../../index-9b84fabc.js";import"../../palette-f206f488.js";import"../../Button-8af0be6e.js";import"../../_tslib-51c8a283.js";import"../../color-acb834c6.js";import"../../index-19b48c51.js";import"../../grid-11a70eb7.js";import"../../Icon-04613a89.js";import"../../constants-42547490.js";import"../../Loader-b3fd59f4.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-90910763.js";import"../Title/styles.module.scss";import"../../Close-9f68bcd0.js";import"../Close/styles.module.scss";import"../../useBreakpoint-324a9b14.js";import"react-dom";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
@import '../../scss/_font-settings.scss';
|
|
5
5
|
|
|
6
6
|
.modal-overlay {
|
|
7
|
-
z-index: 1300000;
|
|
8
7
|
background: rgba(51, 51, 51, 0.75);
|
|
9
8
|
display: block;
|
|
10
9
|
position: fixed;
|
|
@@ -14,7 +13,7 @@
|
|
|
14
13
|
bottom: 0;
|
|
15
14
|
|
|
16
15
|
@media print {
|
|
17
|
-
|
|
16
|
+
position: absolute;
|
|
18
17
|
}
|
|
19
18
|
}
|
|
20
19
|
|
|
@@ -23,6 +22,13 @@
|
|
|
23
22
|
left: 50%;
|
|
24
23
|
top: 50%;
|
|
25
24
|
transform: translate(-50%, -50%);
|
|
25
|
+
|
|
26
|
+
@media print {
|
|
27
|
+
position: initial;
|
|
28
|
+
left: 0;
|
|
29
|
+
top: 0;
|
|
30
|
+
transform: none;
|
|
31
|
+
}
|
|
26
32
|
}
|
|
27
33
|
|
|
28
34
|
.modal {
|
|
@@ -123,6 +129,10 @@
|
|
|
123
129
|
}
|
|
124
130
|
|
|
125
131
|
&__closeWrapper {
|
|
132
|
+
@media print {
|
|
133
|
+
display: none;
|
|
134
|
+
}
|
|
135
|
+
|
|
126
136
|
position: relative;
|
|
127
137
|
width: 100%;
|
|
128
138
|
|
|
@@ -137,6 +147,11 @@
|
|
|
137
147
|
max-height: calc(100vh - 10rem);
|
|
138
148
|
overflow: auto;
|
|
139
149
|
|
|
150
|
+
@media print {
|
|
151
|
+
overflow: hidden;
|
|
152
|
+
max-height: none;
|
|
153
|
+
}
|
|
154
|
+
|
|
140
155
|
&--image {
|
|
141
156
|
max-height: 100vh;
|
|
142
157
|
}
|
|
@@ -219,4 +234,8 @@
|
|
|
219
234
|
transform: scale(1);
|
|
220
235
|
}
|
|
221
236
|
}
|
|
237
|
+
|
|
238
|
+
@media print {
|
|
239
|
+
width: 100%;
|
|
240
|
+
}
|
|
222
241
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/NotificationPanel/index.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,eAAe,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/NotificationPanel/index.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,cAAc,qBAAqB,CAAC;AACpC,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../_rollupPluginBabelHelpers-d0752906.js";import e from"react";import{c as t}from"../../index-9b84fabc.js";import{p as
|
|
1
|
+
import{a}from"../../_rollupPluginBabelHelpers-d0752906.js";import e from"react";import{c as t}from"../../index-9b84fabc.js";import{p as o}from"../../palette-f206f488.js";import{I as n}from"../../Icon-04613a89.js";import"../../constants-42547490.js";import{a as i,A as r}from"../../AlertSignFill-e607ff43.js";import l from"./styles.module.scss";import{C as c}from"../../Close-9f68bcd0.js";import"../../_tslib-51c8a283.js";import"../Close/styles.module.scss";import"../../useBreakpoint-324a9b14.js";import"../../useWindowSize-73b47451.js";import"../../grid-11a70eb7.js";var s={info:{color:"kiwi",depth:50},warn:{color:"banana",depth:50},alert:{color:"cherry",depth:100},crisis:{color:"black",depth:0}},m={info:e.createElement(n,{svgIcon:function(a){var t=a.isExtraSmall,o=a.isHovered,n=e.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"}),i=e.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=e.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?e.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?i:n},color:o.kiwi900,hoverColor:o.kiwi900}),warn:e.createElement(n,{svgIcon:i,color:"black",hoverColor:"black"}),alert:e.createElement(n,{svgIcon:r,color:o.cherry500,hoverColor:o.cherry500}),alertLabel:e.createElement(n,{svgIcon:i,color:o.cherry500,hoverColor:o.cherry500}),crisis:e.createElement(n,{svgIcon:r,color:o.banana200,hoverColor:o.banana200})},p=e.forwardRef((function(o,n){var i,r,s=o.children,p=o.variant,f=void 0===p?"info":p,v=o.shadow,d=void 0!==v&&v,h=o.dismissable,b=void 0!==h&&h,_=o.onClick,u=o.label,E=o.fluid,C=void 0!==E&&E,w=o.size,j=o.className,g=o.testId;var k;return k=e.createElement("div",{ref:n,"data-testid":g,className:t(l["notification-panel"],l["notification-panel--"+w],l["notification-panel--"+f],(i={},a(i,l["notification-panel--shadow"],!C&&d),a(i,l["notification-panel--haslabel"],!!u&&!s),a(i,l["notification-panel--dismissable"],b),i),j||"")},e.createElement("span",{className:l["notification-panel__icon"]},m["alert"===f&&u&&!s?"alertLabel":f]),e.createElement("section",{"aria-label":function(){if(s){var a="";return e.Children.map(s,(function(e){"string"==typeof e&&(a+=e)})),a}return""}(),className:t(l["notification-panel__content"],(r={},a(r,l["notification-panel__content--crisis"],"crisis"===f),a(r,l["notification-panel__content--haslabel"],!!u&&!s),a(r,l["notification-panel__content--isred"],"alert"===f&&!!u&&!s),r))},u?e.createElement("h1",{className:l["notification-panel__label"],dangerouslySetInnerHTML:{__html:u}}):null,s),b?e.createElement("span",{className:l["notification-panel__action-column"]},e.createElement(c,{ariaLabel:o.ariaLabelCloseBtn,onClick:_})):null),C?e.createElement("div",{className:t(l["notification-panel__fluidwrapper"],l["notification-panel__fluidwrapper--"+f],a({},l["notification-panel__fluidwrapper--shadow"],d))},k):k}));export default p;export{s as variantToColorMap};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"props": {
|
|
3
|
+
"className": {
|
|
4
|
+
"defaultValue": null,
|
|
5
|
+
"description": "Add custom class to portal, default class is portal-container",
|
|
6
|
+
"name": "className",
|
|
7
|
+
"parent": {
|
|
8
|
+
"fileName": "src/components/Portal/index.tsx",
|
|
9
|
+
"name": "PortalProps"
|
|
10
|
+
},
|
|
11
|
+
"declarations": [
|
|
12
|
+
{
|
|
13
|
+
"fileName": "src/components/Portal/index.tsx",
|
|
14
|
+
"name": "PortalProps"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"required": false,
|
|
18
|
+
"type": {
|
|
19
|
+
"name": "string"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"children": {
|
|
23
|
+
"defaultValue": null,
|
|
24
|
+
"description": "Content to be displayed in Portal",
|
|
25
|
+
"name": "children",
|
|
26
|
+
"parent": {
|
|
27
|
+
"fileName": "src/components/Portal/index.tsx",
|
|
28
|
+
"name": "PortalProps"
|
|
29
|
+
},
|
|
30
|
+
"declarations": [
|
|
31
|
+
{
|
|
32
|
+
"fileName": "src/components/Portal/index.tsx",
|
|
33
|
+
"name": "PortalProps"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"required": false,
|
|
37
|
+
"type": {
|
|
38
|
+
"name": "ReactNode"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"parent": {
|
|
42
|
+
"defaultValue": null,
|
|
43
|
+
"description": "Default is document.body",
|
|
44
|
+
"name": "parent",
|
|
45
|
+
"parent": {
|
|
46
|
+
"fileName": "src/components/Portal/index.tsx",
|
|
47
|
+
"name": "PortalProps"
|
|
48
|
+
},
|
|
49
|
+
"declarations": [
|
|
50
|
+
{
|
|
51
|
+
"fileName": "src/components/Portal/index.tsx",
|
|
52
|
+
"name": "PortalProps"
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"required": false,
|
|
56
|
+
"type": {
|
|
57
|
+
"name": "HTMLElement"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"testId": {
|
|
61
|
+
"defaultValue": null,
|
|
62
|
+
"description": "Sets the data-testid attribute.",
|
|
63
|
+
"name": "testId",
|
|
64
|
+
"parent": {
|
|
65
|
+
"fileName": "src/components/Portal/index.tsx",
|
|
66
|
+
"name": "PortalProps"
|
|
67
|
+
},
|
|
68
|
+
"declarations": [
|
|
69
|
+
{
|
|
70
|
+
"fileName": "src/components/Portal/index.tsx",
|
|
71
|
+
"name": "PortalProps"
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"required": false,
|
|
75
|
+
"type": {
|
|
76
|
+
"name": "string"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface PortalProps {
|
|
3
|
+
/** Add custom class to portal, default class is portal-container */
|
|
4
|
+
className?: string;
|
|
5
|
+
/** Content to be displayed in Portal */
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
/** Default is document.body */
|
|
8
|
+
parent?: HTMLElement;
|
|
9
|
+
/** Sets the data-testid attribute. */
|
|
10
|
+
testId?: string;
|
|
11
|
+
}
|
|
12
|
+
export default function Portal({ children, parent, className, testId }: PortalProps): React.ReactPortal;
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Portal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,WAAW;IAC1B,oEAAoE;IACpE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,+BAA+B;IAC/B,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,WAAW,GAAG,KAAK,CAAC,WAAW,CAyBtG"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import t from"react";import{createPortal as e}from"react-dom";export default function(r){var n=r.children,o=r.parent,a=r.className,c=r.testId,i=t.useMemo((function(){return document.createElement("div")}),[]);return c&&i.setAttribute("data-testid",c),t.useEffect((function(){var t=o&&o.appendChild?o:document.body,e=["portal-container"];return a&&a.split(" ").forEach((function(t){return e.push(t)})),e.forEach((function(t){return i.classList.add(t)})),t.appendChild(i),function(){t.removeChild(i)}}),[i,o,a]),e(n,i)}
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FormMode, FormVariant } from '../../constants';
|
|
3
|
+
export interface RadioButtonProps {
|
|
4
|
+
/** Adds custom classes to the element. */
|
|
5
|
+
className?: string;
|
|
6
|
+
/** Sets radioButton as checked by default */
|
|
7
|
+
defaultChecked?: boolean;
|
|
8
|
+
/** Disables the radioButton */
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
/** The label text next to the radioButton */
|
|
11
|
+
label: string;
|
|
12
|
+
/** input id of the radioButton */
|
|
13
|
+
inputid?: string;
|
|
14
|
+
/** Changes the visuals of the radioButton */
|
|
15
|
+
mode?: keyof typeof FormMode;
|
|
16
|
+
/** Unique identifyer for the input tag */
|
|
17
|
+
name?: string;
|
|
18
|
+
/** Return value for the radioButton */
|
|
19
|
+
value?: string;
|
|
20
|
+
/** Changes the visuals of the radioButton */
|
|
21
|
+
variant?: keyof typeof FormVariant;
|
|
22
|
+
/** Activates Error style for the radioButton - This is can be true while errorText is empty, when in a FormGroup */
|
|
23
|
+
error?: boolean;
|
|
24
|
+
/** Error text to show above the component */
|
|
25
|
+
errorText?: string;
|
|
26
|
+
/** Sets the data-testid attribute. */
|
|
27
|
+
testId?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare const RadioButton: React.ForwardRefExoticComponent<RadioButtonProps & React.RefAttributes<HTMLInputElement>>;
|
|
30
|
+
export default RadioButton;
|
|
31
|
+
//# sourceMappingURL=RadioButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioButton.d.ts","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAExD,MAAM,WAAW,gBAAgB;IAC/B,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6CAA6C;IAC7C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6CAA6C;IAC7C,IAAI,CAAC,EAAE,MAAM,OAAO,QAAQ,CAAC;IAC7B,0CAA0C;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,OAAO,CAAC,EAAE,MAAM,OAAO,WAAW,CAAC;IACnC,oHAAoH;IACpH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,WAAW,2FA+DtB,CAAC;AAEH,eAAe,WAAW,CAAC"}
|