@popsure/dirty-swan 0.33.3 → 0.33.4

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.
Files changed (39) hide show
  1. package/dist/cjs/index.js +21 -15
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/lib/components/modal/bottomModal/index.d.ts +1 -2
  4. package/dist/cjs/lib/components/modal/bottomOrRegularModal/index.d.ts +1 -2
  5. package/dist/cjs/lib/components/modal/index.d.ts +3 -3
  6. package/dist/cjs/lib/components/modal/index.stories.d.ts +62 -0
  7. package/dist/cjs/lib/components/modal/regularModal/index.d.ts +1 -2
  8. package/dist/cjs/lib/util/images/index.d.ts +5 -0
  9. package/dist/esm/components/input/checkbox/index.stories.js +1 -1
  10. package/dist/esm/components/modal/bottomModal/index.js +3 -3
  11. package/dist/esm/components/modal/bottomModal/index.js.map +1 -1
  12. package/dist/esm/components/modal/bottomOrRegularModal/index.js +5 -5
  13. package/dist/esm/components/modal/bottomOrRegularModal/index.js.map +1 -1
  14. package/dist/esm/components/modal/index.stories.js +118 -0
  15. package/dist/esm/components/modal/index.stories.js.map +1 -0
  16. package/dist/esm/components/modal/regularModal/index.js +3 -3
  17. package/dist/esm/components/modal/regularModal/index.js.map +1 -1
  18. package/dist/esm/index-e81a1766.js +19 -0
  19. package/dist/esm/index-e81a1766.js.map +1 -0
  20. package/dist/esm/index.js +4 -4
  21. package/dist/esm/lib/components/modal/bottomModal/index.d.ts +1 -2
  22. package/dist/esm/lib/components/modal/bottomOrRegularModal/index.d.ts +1 -2
  23. package/dist/esm/lib/components/modal/index.d.ts +3 -3
  24. package/dist/esm/lib/components/modal/index.stories.d.ts +62 -0
  25. package/dist/esm/lib/components/modal/regularModal/index.d.ts +1 -2
  26. package/dist/esm/lib/util/images/index.d.ts +5 -0
  27. package/dist/esm/util/images/index.stories.js +7 -4
  28. package/dist/esm/util/images/index.stories.js.map +1 -1
  29. package/package.json +1 -1
  30. package/src/lib/components/modal/bottomModal/index.tsx +1 -1
  31. package/src/lib/components/modal/bottomOrRegularModal/index.tsx +2 -2
  32. package/src/lib/components/modal/index.stories.tsx +254 -0
  33. package/src/lib/components/modal/index.ts +3 -3
  34. package/src/lib/components/modal/regularModal/index.tsx +1 -1
  35. package/src/lib/util/images/index.stories.tsx +20 -12
  36. package/src/lib/util/images/index.ts +16 -9
  37. package/dist/esm/index-db2e797f.js +0 -13
  38. package/dist/esm/index-db2e797f.js.map +0 -1
  39. package/src/lib/components/modal/index.stories.mdx +0 -313
@@ -1,3 +1,2 @@
1
1
  import { Props } from '..';
2
- declare const _default: ({ title, isOpen, children, onClose, className, dismissible, }: Props) => JSX.Element;
3
- export default _default;
2
+ export declare const BottomModal: ({ title, isOpen, children, onClose, className, dismissible, }: Props) => JSX.Element;
@@ -1,3 +1,2 @@
1
1
  import { Props } from '..';
2
- declare const _default: ({ isOpen, ...props }: Props) => JSX.Element;
3
- export default _default;
2
+ export declare const BottomOrRegularModal: ({ isOpen, ...props }: Props) => JSX.Element;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
- import BottomModal from './bottomModal';
3
- import RegularModal from './regularModal';
4
- import BottomOrRegularModal from './bottomOrRegularModal';
2
+ import { BottomModal } from './bottomModal';
3
+ import { RegularModal } from './regularModal';
4
+ import { BottomOrRegularModal } from './bottomOrRegularModal';
5
5
  export interface Props {
6
6
  title?: string;
7
7
  isOpen: boolean;
@@ -0,0 +1,62 @@
1
+ import { Props } from '.';
2
+ declare const story: {
3
+ title: string;
4
+ component: ({ isOpen, ...props }: Props) => JSX.Element;
5
+ argTypes: {
6
+ title: {
7
+ defaultValue: string;
8
+ description: string;
9
+ };
10
+ isOpen: {
11
+ defaultValue: boolean;
12
+ description: string;
13
+ };
14
+ dismissible: {
15
+ defaultValue: boolean;
16
+ description: string;
17
+ };
18
+ className: {
19
+ defaultValue: string;
20
+ description: string;
21
+ };
22
+ children: {
23
+ defaultValue: string;
24
+ description: string;
25
+ type: string;
26
+ table: {
27
+ type: {
28
+ summary: string;
29
+ };
30
+ };
31
+ };
32
+ onClose: {
33
+ description: string;
34
+ action: boolean;
35
+ table: {
36
+ category: string;
37
+ };
38
+ };
39
+ };
40
+ parameters: {
41
+ componentSubtitle: string;
42
+ docs: {
43
+ description: {
44
+ component: string;
45
+ };
46
+ };
47
+ };
48
+ };
49
+ export declare const BottomOrRegularModalStory: {
50
+ ({ children, className, dismissible, isOpen, onClose, title, }: Props): JSX.Element;
51
+ storyName: string;
52
+ };
53
+ export declare const RegularModalStory: {
54
+ ({ children, isOpen, onClose, title, }: Props): JSX.Element;
55
+ storyName: string;
56
+ };
57
+ export declare const BottomModalStory: {
58
+ ({ children, isOpen, onClose, title, }: Props): JSX.Element;
59
+ storyName: string;
60
+ };
61
+ export declare const NonDismissibleModal: ({ children, isOpen, onClose, title, }: Props) => JSX.Element;
62
+ export default story;
@@ -1,3 +1,2 @@
1
1
  import { Props } from '..';
2
- declare const _default: ({ title, isOpen, children, onClose, className, dismissible, }: Props) => JSX.Element;
3
- export default _default;
2
+ export declare const RegularModal: ({ title, isOpen, children, onClose, className, dismissible, }: Props) => JSX.Element;
@@ -2,6 +2,11 @@ declare const images: {
2
2
  readonly aid: "https://assets.cdn.feather-insurance.com/assets/images/aid.svg";
3
3
  readonly bed: "https://assets.cdn.feather-insurance.com/assets/images/bed.svg";
4
4
  readonly bigDog: "https://assets.cdn.feather-insurance.com/assets/images/bigDog.svg";
5
+ readonly verticalIcons: {
6
+ readonly dogLiability: "https://assets.cdn.feather-insurance.com/assets/images/dogLiabilityIcon.png";
7
+ readonly dogLiability2x: "https://assets.cdn.feather-insurance.com/assets/images/dogLiabilityIcon2x.png";
8
+ readonly dogLiability3x: "https://assets.cdn.feather-insurance.com/assets/images/dogLiabilityIcon3x.png";
9
+ };
5
10
  readonly brokenAquarium: "https://assets.cdn.feather-insurance.com/assets/images/brokenAquarium.svg";
6
11
  readonly brokenGlass: "https://assets.cdn.feather-insurance.com/assets/images/brokenGlass.svg";
7
12
  readonly damagedLaptop: "https://assets.cdn.feather-insurance.com/assets/images/damagedLaptop.svg";
@@ -1,7 +1,7 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { useState } from 'react';
3
3
  import { Checkbox } from './index.js';
4
- import { i as images } from '../../../index-db2e797f.js';
4
+ import { i as images } from '../../../index-e81a1766.js';
5
5
  import '../../../tslib.es6-5bc94358.js';
6
6
  import '../../../index-e9e37a34.js';
7
7
  import '../../../style-inject.es-1f59c1d0.js';
@@ -11,7 +11,7 @@ styleInject(css_248z);
11
11
 
12
12
  var imageClose = "data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M18%206L6%2018%22%20stroke%3D%22%2326262E%22%20strokeWidth%3D%222%22%20strokeLinecap%3D%22round%22%20strokeLinejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M6%206L18%2018%22%20stroke%3D%22%2326262E%22%20strokeWidth%3D%222%22%20strokeLinecap%3D%22round%22%20strokeLinejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E";
13
13
 
14
- var BottomModal = (function (_a) {
14
+ var BottomModal = function (_a) {
15
15
  var title = _a.title, isOpen = _a.isOpen, children = _a.children, onClose = _a.onClose, _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.dismissible, dismissible = _c === void 0 ? true : _c;
16
16
  var _d = useState(0), containerXOffset = _d[0], setContainerXOffset = _d[1];
17
17
  var _e = useOnClose(onClose, isOpen, dismissible), isClosing = _e.isClosing, handleContainerClick = _e.handleContainerClick, handleOnClose = _e.handleOnClose, handleOnOverlayClick = _e.handleOnOverlayClick;
@@ -29,7 +29,7 @@ var BottomModal = (function (_a) {
29
29
  }) }, { children: [jsx("div", __assign({ className: "p-h4 " + styles.title }, { children: title }), void 0),
30
30
  dismissible && (jsx("button", __assign({ type: "button", className: styles.close, onClick: handleOnClose }, { children: jsx("img", { src: imageClose, alt: "Close" }, void 0) }), void 0))] }), void 0),
31
31
  jsx("div", __assign({ className: styles.content }, { children: children }), void 0)] }), void 0) }), void 0));
32
- });
32
+ };
33
33
 
34
- export default BottomModal;
34
+ export { BottomModal };
35
35
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/lib/components/modal/bottomModal/img/close.svg","../../../../../../src/lib/components/modal/bottomModal/index.tsx"],"sourcesContent":["export default \"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M18%206L6%2018%22%20stroke%3D%22%2326262E%22%20strokeWidth%3D%222%22%20strokeLinecap%3D%22round%22%20strokeLinejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M6%206L18%2018%22%20stroke%3D%22%2326262E%22%20strokeWidth%3D%222%22%20strokeLinecap%3D%22round%22%20strokeLinejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","import React, { useState, useCallback } from 'react';\n\nimport { Props } from '..';\nimport styles from './style.module.scss';\n\nimport imageClose from './img/close.svg';\nimport useOnClose from '../hooks/useOnClose';\nimport classNames from 'classnames';\n\nexport default ({\n title,\n isOpen,\n children,\n onClose,\n className = '',\n dismissible = true,\n}: Props) => {\n const [containerXOffset, setContainerXOffset] = useState(0);\n const {\n isClosing,\n handleContainerClick,\n handleOnClose,\n handleOnOverlayClick\n } = useOnClose(\n onClose,\n isOpen,\n dismissible\n );\n\n const containerRef = useCallback((node: HTMLDivElement) => {\n if (node !== null) {\n setContainerXOffset(\n Math.max(\n window.innerHeight * 0.1,\n window.innerHeight - node.getBoundingClientRect().height\n )\n );\n }\n }, []);\n\n if (!isOpen) {\n return <></>;\n }\n\n return (\n <div\n className={isClosing ? styles['overlay--close'] : styles.overlay}\n onClick={handleOnOverlayClick}\n >\n <div\n className={`${\n isClosing ? styles['container--close'] : styles.container\n } ${className}`}\n ref={containerRef}\n style={{ top: `${containerXOffset}px` }}\n onClick={handleContainerClick}\n >\n <div className={classNames(styles.header, {\n 'jc-between': !!title,\n 'jc-end': !title\n })}>\n <div className={`p-h4 ${styles.title}`}>{title}</div>\n {dismissible && (\n <button\n type=\"button\"\n className={styles.close}\n onClick={handleOnClose}\n >\n <img src={imageClose} alt=\"Close\" />\n </button>\n )}\n </div>\n <div className={styles.content}>{children}</div>\n </div>\n </div>\n );\n};\n"],"names":["_jsx","_jsxs","classNames"],"mappings":";;;;;;;;;;;AAAA,iBAAe;;ACSf,mBAAe,UAAC,EAOR;QANN,KAAK,WAAA,EACL,MAAM,YAAA,EACN,QAAQ,cAAA,EACR,OAAO,aAAA,EACP,iBAAc,EAAd,SAAS,mBAAG,EAAE,KAAA,EACd,mBAAkB,EAAlB,WAAW,mBAAG,IAAI,KAAA;IAEZ,IAAA,KAA0C,QAAQ,CAAC,CAAC,CAAC,EAApD,gBAAgB,QAAA,EAAE,mBAAmB,QAAe,CAAC;IACtD,IAAA,KAKD,UAAU,CACb,OAAO,EACP,MAAM,EACN,WAAW,CACZ,EARC,SAAS,eAAA,EACT,oBAAoB,0BAAA,EACpB,aAAa,mBAAA,EACb,oBAAoB,0BAKrB,CAAC;IAEF,IAAM,YAAY,GAAG,WAAW,CAAC,UAAC,IAAoB;QACpD,IAAI,IAAI,KAAK,IAAI,EAAE;YACjB,mBAAmB,CACjB,IAAI,CAAC,GAAG,CACN,MAAM,CAAC,WAAW,GAAG,GAAG,EACxB,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,qBAAqB,EAAE,CAAC,MAAM,CACzD,CACF,CAAC;SACH;KACF,EAAE,EAAE,CAAC,CAAC;IAEP,IAAI,CAAC,MAAM,EAAE;QACX,OAAOA,yBAAK,CAAC;KACd;IAED,QACEA,sBACE,SAAS,EAAE,SAAS,GAAG,MAAM,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAAC,OAAO,EAChE,OAAO,EAAE,oBAAoB,gBAE7BC,uBACE,SAAS,EAAE,CACT,SAAS,GAAG,MAAM,CAAC,kBAAkB,CAAC,GAAG,MAAM,CAAC,SAAS,UACvD,SAAW,EACf,GAAG,EAAE,YAAY,EACjB,KAAK,EAAE,EAAE,GAAG,EAAK,gBAAgB,OAAI,EAAE,EACvC,OAAO,EAAE,oBAAoB,iBAE7BA,uBAAK,SAAS,EAAEC,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE;wBACxC,YAAY,EAAE,CAAC,CAAC,KAAK;wBACrB,QAAQ,EAAE,CAAC,KAAK;qBACjB,CAAC,iBACAF,sBAAK,SAAS,EAAE,UAAQ,MAAM,CAAC,KAAO,gBAAG,KAAK,YAAO;wBACpD,WAAW,KACVA,yBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,MAAM,CAAC,KAAK,EACvB,OAAO,EAAE,aAAa,gBAEtBA,aAAK,GAAG,EAAE,UAAU,EAAE,GAAG,EAAC,OAAO,WAAG,YAC7B,CACV,aACG;gBACNA,sBAAK,SAAS,EAAE,MAAM,CAAC,OAAO,gBAAG,QAAQ,YAAO,aAC5C,YACF,EACN;AACJ,CAAC;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/lib/components/modal/bottomModal/img/close.svg","../../../../../../src/lib/components/modal/bottomModal/index.tsx"],"sourcesContent":["export default \"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M18%206L6%2018%22%20stroke%3D%22%2326262E%22%20strokeWidth%3D%222%22%20strokeLinecap%3D%22round%22%20strokeLinejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M6%206L18%2018%22%20stroke%3D%22%2326262E%22%20strokeWidth%3D%222%22%20strokeLinecap%3D%22round%22%20strokeLinejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","import React, { useState, useCallback } from 'react';\n\nimport { Props } from '..';\nimport styles from './style.module.scss';\n\nimport imageClose from './img/close.svg';\nimport useOnClose from '../hooks/useOnClose';\nimport classNames from 'classnames';\n\nexport const BottomModal = ({\n title,\n isOpen,\n children,\n onClose,\n className = '',\n dismissible = true,\n}: Props) => {\n const [containerXOffset, setContainerXOffset] = useState(0);\n const {\n isClosing,\n handleContainerClick,\n handleOnClose,\n handleOnOverlayClick\n } = useOnClose(\n onClose,\n isOpen,\n dismissible\n );\n\n const containerRef = useCallback((node: HTMLDivElement) => {\n if (node !== null) {\n setContainerXOffset(\n Math.max(\n window.innerHeight * 0.1,\n window.innerHeight - node.getBoundingClientRect().height\n )\n );\n }\n }, []);\n\n if (!isOpen) {\n return <></>;\n }\n\n return (\n <div\n className={isClosing ? styles['overlay--close'] : styles.overlay}\n onClick={handleOnOverlayClick}\n >\n <div\n className={`${\n isClosing ? styles['container--close'] : styles.container\n } ${className}`}\n ref={containerRef}\n style={{ top: `${containerXOffset}px` }}\n onClick={handleContainerClick}\n >\n <div className={classNames(styles.header, {\n 'jc-between': !!title,\n 'jc-end': !title\n })}>\n <div className={`p-h4 ${styles.title}`}>{title}</div>\n {dismissible && (\n <button\n type=\"button\"\n className={styles.close}\n onClick={handleOnClose}\n >\n <img src={imageClose} alt=\"Close\" />\n </button>\n )}\n </div>\n <div className={styles.content}>{children}</div>\n </div>\n </div>\n );\n};\n"],"names":["_jsx","_jsxs","classNames"],"mappings":";;;;;;;;;;;AAAA,iBAAe;;ICSF,WAAW,GAAG,UAAC,EAOpB;QANN,KAAK,WAAA,EACL,MAAM,YAAA,EACN,QAAQ,cAAA,EACR,OAAO,aAAA,EACP,iBAAc,EAAd,SAAS,mBAAG,EAAE,KAAA,EACd,mBAAkB,EAAlB,WAAW,mBAAG,IAAI,KAAA;IAEZ,IAAA,KAA0C,QAAQ,CA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AU,EAAE,GAAG,EAAC,OAAO,WAAG,YAC7B,CACV,aACG;gBACNA,sBAAK,SAAS,EAAE,MAAM,CAAC,OAAO,gBAAG,QAAQ,YAAO,aAC5C,YACF,EACN;AACJ;;;;"}
@@ -1,8 +1,8 @@
1
1
  import { a as __rest, _ as __assign } from '../../../tslib.es6-5bc94358.js';
2
2
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
3
3
  import { useRef, useState, useEffect } from 'react';
4
- import BottomModal from '../bottomModal/index.js';
5
- import RegularModal from '../regularModal/index.js';
4
+ import { BottomModal } from '../bottomModal/index.js';
5
+ import { RegularModal } from '../regularModal/index.js';
6
6
  import { s as styleInject } from '../../../style-inject.es-1f59c1d0.js';
7
7
  import '../../../useOnClose-d818a54f.js';
8
8
  import '../../../index-e9e37a34.js';
@@ -11,7 +11,7 @@ var css_248z = "@media (min-width: 34rem) {\n .style-module_mobile__3k175 {\n
11
11
  var styles = {"mobile":"style-module_mobile__3k175","desktop":"style-module_desktop__2lclr"};
12
12
  styleInject(css_248z);
13
13
 
14
- var index = (function (_a) {
14
+ var BottomOrRegularModal = function (_a) {
15
15
  var isOpen = _a.isOpen, props = __rest(_a, ["isOpen"]);
16
16
  var mobileRef = useRef(null);
17
17
  var _b = useState('desktop'), visibleSize = _b[0], setVisibleSize = _b[1];
@@ -30,7 +30,7 @@ var index = (function (_a) {
30
30
  }, []);
31
31
  return (jsxs(Fragment, { children: [jsx("div", __assign({ className: styles.mobile, ref: mobileRef }, { children: visibleSize === 'mobile' && jsx(BottomModal, __assign({}, props, { isOpen: isOpen }), void 0) }), void 0),
32
32
  visibleSize === 'desktop' && (jsx("div", __assign({ className: styles.desktop }, { children: jsx(RegularModal, __assign({}, props, { isOpen: isOpen }), void 0) }), void 0))] }, void 0));
33
- });
33
+ };
34
34
 
35
- export default index;
35
+ export { BottomOrRegularModal };
36
36
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../src/lib/components/modal/bottomOrRegularModal/index.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react';\n\nimport { Props, RegularModal } from '..';\nimport BottomModal from '../bottomModal';\n\nimport styles from './style.module.scss';\n\nexport default ({ isOpen, ...props }: Props) => {\n const mobileRef = useRef<HTMLDivElement>(null);\n const [visibleSize, setVisibleSize] = useState<'desktop' | 'mobile'>(\n 'desktop'\n );\n\n const handleResize = () => {\n setVisibleSize(\n mobileRef.current !== null &&\n window.getComputedStyle(mobileRef.current).display !== 'none'\n ? 'mobile'\n : 'desktop'\n );\n };\n\n useEffect(() => {\n window.addEventListener('resize', handleResize);\n handleResize();\n return () => {\n window.removeEventListener('resize', handleResize);\n };\n }, []);\n\n return (\n <>\n <div className={styles.mobile} ref={mobileRef}>\n {visibleSize === 'mobile' && <BottomModal {...props} isOpen={isOpen} />}\n </div>\n {visibleSize === 'desktop' && (\n <div className={styles.desktop}>\n <RegularModal {...props} isOpen={isOpen} />\n </div>\n )}\n </>\n );\n};\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;;;;AAOA,aAAe,UAAC,EAA2B;IAAzB,IAAA,MAAM,YAAA,EAAK,KAAK,cAAlB,UAAoB,CAAF;IAChC,IAAM,SAAS,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IACzC,IAAA,KAAgC,QAAQ,CAC5C,SAAS,CACV,EAFM,WAAW,QAAA,EAAE,cAAc,QAEjC,CAAC;IAEF,IAAM,YAAY,GAAG;QACnB,cAAc,CACZ,SAAS,CAAC,OAAO,KAAK,IAAI;YACxB,MAAM,CAAC,gBAAgB,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,OAAO,KAAK,MAAM;cAC3D,QAAQ;cACR,SAAS,CACd,CAAC;KACH,CAAC;IAEF,SAAS,CAAC;QACR,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;QAChD,YAAY,EAAE,CAAC;QACf,OAAO;YACL,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;SACpD,CAAC;KACH,EAAE,EAAE,CAAC,CAAC;IAEP,QACEA,4BACEC,sBAAK,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,SAAS,gBAC1C,WAAW,KAAK,QAAQ,IAAIA,IAAC,WAAW,eAAK,KAAK,IAAE,MAAM,EAAE,MAAM,YAAI,YACnE;YACL,WAAW,KAAK,SAAS,KACxBA,sBAAK,SAAS,EAAE,MAAM,CAAC,OAAO,gBAC5BA,IAAC,YAAY,eAAK,KAAK,IAAE,MAAM,EAAE,MAAM,YAAI,YACvC,CACP,YACA,EACH;AACJ,CAAC;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../../src/lib/components/modal/bottomOrRegularModal/index.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react';\n\nimport { Props, RegularModal } from '..';\nimport { BottomModal } from '../bottomModal';\n\nimport styles from './style.module.scss';\n\nexport const BottomOrRegularModal = ({ isOpen, ...props }: Props) => {\n const mobileRef = useRef<HTMLDivElement>(null);\n const [visibleSize, setVisibleSize] = useState<'desktop' | 'mobile'>(\n 'desktop'\n );\n\n const handleResize = () => {\n setVisibleSize(\n mobileRef.current !== null &&\n window.getComputedStyle(mobileRef.current).display !== 'none'\n ? 'mobile'\n : 'desktop'\n );\n };\n\n useEffect(() => {\n window.addEventListener('resize', handleResize);\n handleResize();\n return () => {\n window.removeEventListener('resize', handleResize);\n };\n }, []);\n\n return (\n <>\n <div className={styles.mobile} ref={mobileRef}>\n {visibleSize === 'mobile' && <BottomModal {...props} isOpen={isOpen} />}\n </div>\n {visibleSize === 'desktop' && (\n <div className={styles.desktop}>\n <RegularModal {...props} isOpen={isOpen} />\n </div>\n )}\n </>\n );\n};\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;;;;IAOa,oBAAoB,GAAG,UAAC,EAA2B;IAAzB,IAAA,MAAM,YAAA,EAAK,KAAK,cAAlB,UAAoB,CAAF;IACrD,IAAM,SAAS,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IACzC,IAAA,KAAgC,QAAQ,CAC5C,SAAS,CACV,EAFM,WAAW,QAAA,EAAE,cAAc,QAEjC,CAAC;IAEF,IAAM,YAAY,GAAG;QACnB,cAAc,CACZ,SAAS,CAAC,OAAO,KAAK,IAAI;YACxB,MAAM,CAAC,gBAAgB,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,OAAO,KAAK,MAAM;cAC3D,QAAQ;cACR,SAAS,CACd,CAAC;KACH,CAAC;IAEF,SAAS,CAAC;QACR,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;QAChD,YAAY,EAAE,CAAC;QACf,OAAO;YACL,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;SACpD,CAAC;KACH,EAAE,EAAE,CAAC,CAAC;IAEP,QACEA,4BACEC,sBAAK,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,SAAS,gBAC1C,WAAW,KAAK,QAAQ,IAAIA,IAAC,WAAW,eAAK,KAAK,IAAE,MAAM,EAAE,MAAM,YAAI,YACnE;YACL,WAAW,KAAK,SAAS,KACxBA,sBAAK,SAAS,EAAE,MAAM,CAAC,OAAO,gBAC5BA,IAAC,YAAY,eAAK,KAAK,IAAE,MAAM,EAAE,MAAM,YAAI,YACvC,CACP,YACA,EACH;AACJ;;;;"}
@@ -0,0 +1,118 @@
1
+ import { _ as __assign } from '../../tslib.es6-5bc94358.js';
2
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
3
+ import { useState } from 'react';
4
+ import { BottomModal } from './bottomModal/index.js';
5
+ import { RegularModal } from './regularModal/index.js';
6
+ import { BottomOrRegularModal } from './bottomOrRegularModal/index.js';
7
+ import { Markdown } from '../markdown/index.js';
8
+ import '../../style-inject.es-1f59c1d0.js';
9
+ import '../../useOnClose-d818a54f.js';
10
+ import '../../index-e9e37a34.js';
11
+ import '../../index-171a0108.js';
12
+ import '../../index-dd80248b.js';
13
+ import '../../_commonjsHelpers-e7f67fd8.js';
14
+ import 'path';
15
+ import 'querystring';
16
+
17
+ var story = {
18
+ title: 'JSX/Modals',
19
+ component: BottomOrRegularModal,
20
+ argTypes: {
21
+ title: {
22
+ defaultValue: "Modal title",
23
+ description: "The title that needs to be displayed on the modal",
24
+ },
25
+ isOpen: {
26
+ defaultValue: false,
27
+ description: "When set to `true`, the modal is displayed. When set to `false` the modal gets removed",
28
+ },
29
+ dismissible: {
30
+ defaultValue: true,
31
+ description: "The content that gets displayed on the modal",
32
+ },
33
+ className: {
34
+ defaultValue: '',
35
+ description: 'Any additional className',
36
+ },
37
+ children: {
38
+ defaultValue: 'Modal content to be displayed',
39
+ description: 'The content that gets displayed on the modal',
40
+ type: 'text',
41
+ table: {
42
+ type: {
43
+ summary: 'ReactNode'
44
+ }
45
+ }
46
+ },
47
+ onClose: {
48
+ description: 'Callback when the user close the modal',
49
+ action: true,
50
+ table: {
51
+ category: "Callbacks",
52
+ },
53
+ },
54
+ },
55
+ parameters: {
56
+ componentSubtitle: 'Bottom or Regular modal will automatically choose what’s best to display based on the users screen width.',
57
+ docs: {
58
+ description: {
59
+ component: 'Modals are dialog overlays that prevent the user from interacting with the rest of the website until an action is taken or the dialog is dismissed. Modals are purposefully disruptive and should be used thoughtfully and sparingly.',
60
+ }
61
+ },
62
+ },
63
+ };
64
+ var BottomOrRegularModalStory = function (_a) {
65
+ var children = _a.children, className = _a.className, dismissible = _a.dismissible, isOpen = _a.isOpen, onClose = _a.onClose, title = _a.title;
66
+ var _b = useState(isOpen), display = _b[0], setDisplay = _b[1];
67
+ var handleOnClose = function () {
68
+ onClose();
69
+ setDisplay(false);
70
+ };
71
+ return (jsxs(Fragment, { children: [jsx("button", __assign({ className: "p-btn--primary wmn2", onClick: function () { return setDisplay(true); } }, { children: "Click to open modal" }), void 0),
72
+ jsx(BottomOrRegularModal, __assign({ dismissible: dismissible, className: className, title: title, isOpen: display, onClose: handleOnClose }, { children: jsxs("div", __assign({ style: { padding: '0 24px 24px 24px' } }, { children: [jsx("div", { children: children }, void 0),
73
+ jsx("button", __assign({ className: "p-btn--primary mt24 wmn3", onClick: function () { return setDisplay(false); } }, { children: "Continue" }), void 0)] }), void 0) }), void 0)] }, void 0));
74
+ };
75
+ BottomOrRegularModalStory.storyName = 'BottomOrRegularModal';
76
+ var RegularModalStory = function (_a) {
77
+ var children = _a.children, isOpen = _a.isOpen, onClose = _a.onClose, title = _a.title;
78
+ var _b = useState(isOpen), display = _b[0], setDisplay = _b[1];
79
+ var handleOnClose = function () {
80
+ onClose();
81
+ setDisplay(false);
82
+ };
83
+ return (jsxs(Fragment, { children: ["Regular modals are primary meant to be used on Desktop or Tablet environment. The modal will appear in the middle of the screen and the user will be able to dismiss them using the top left \"X\" icon.", jsx(Markdown, { children: "If you want to use it for Mobile only, you should check [Bottom modal](#bottommodal) instead. Want to use either Regular Modal or Bottom Modal based on the screen width? You can use [Bottom or Regular modal](#bottomorregularmodal)." }, void 0),
84
+ jsx("button", __assign({ className: "p-btn--primary wmn2 mt24", onClick: function () { return setDisplay(true); } }, { children: "Click to open modal" }), void 0),
85
+ jsx(RegularModal, __assign({ title: title, isOpen: display, onClose: handleOnClose }, { children: jsxs("div", __assign({ style: { padding: '0 24px 24px 24px' } }, { children: [jsx("div", { children: children }, void 0),
86
+ jsx("button", __assign({ className: "p-btn--primary mt24 wmn3", onClick: function () { return setDisplay(false); } }, { children: "Continue" }), void 0)] }), void 0) }), void 0)] }, void 0));
87
+ };
88
+ RegularModalStory.storyName = 'RegularModal';
89
+ var BottomModalStory = function (_a) {
90
+ var children = _a.children, isOpen = _a.isOpen, onClose = _a.onClose, title = _a.title;
91
+ var _b = useState(isOpen), display = _b[0], setDisplay = _b[1];
92
+ var handleOnClose = function () {
93
+ onClose();
94
+ setDisplay(false);
95
+ };
96
+ return (jsxs(Fragment, { children: ["Bottom modals are primary meant to be used on Mobile environment. The modal will appear from the bottom of the screen and the user will be able to dismiss them using the top left \"X\" icon.", jsx(Markdown, { children: "If you want to use it for Desktop only, you should check [Regular modal](#regularmodal) instead. Want to use either Regular Modal or Bottom Modal based on the screen width? You can use [Bottom or Regular modal](#bottomorregularmodal)." }, void 0),
97
+ jsx("button", __assign({ className: "p-btn--primary wmn2 mt24", onClick: function () { return setDisplay(true); } }, { children: "Click to open modal" }), void 0),
98
+ jsx(BottomModal, __assign({ title: title, isOpen: display, onClose: handleOnClose }, { children: jsxs("div", __assign({ style: { padding: '0 24px 24px 24px' } }, { children: [jsx("div", { children: children }, void 0),
99
+ jsx("button", __assign({ className: "p-btn--primary mt24 wmn3", onClick: function () { return setDisplay(false); } }, { children: "Continue" }), void 0)] }), void 0) }), void 0)] }, void 0));
100
+ };
101
+ BottomModalStory.storyName = 'BottomModal';
102
+ var NonDismissibleModal = function (_a) {
103
+ var children = _a.children, isOpen = _a.isOpen, onClose = _a.onClose, title = _a.title;
104
+ var _b = useState(isOpen), display = _b[0], setDisplay = _b[1];
105
+ var handleOnClose = function () {
106
+ onClose();
107
+ setDisplay(false);
108
+ };
109
+ return (jsxs(Fragment, { children: [jsx(Markdown, { children: "Setting the dismissible prop to false will hide the close button and prevent the user from closing it using the escape key or clicking outside. This prop can be useful if we want the user to explicitly interact with the modal options." }, void 0),
110
+ jsx(Markdown, { children: "**Warning:** a modal with the dismissible prop can only be closed by changing the isOpen prop to false." }, void 0),
111
+ jsx("button", __assign({ className: "p-btn--primary wmn2 mt24", onClick: function () { return setDisplay(true); } }, { children: "Click to open modal" }), void 0),
112
+ jsx(BottomOrRegularModal, __assign({ dismissible: false, title: title, isOpen: display, onClose: handleOnClose }, { children: jsxs("div", __assign({ style: { padding: '0 24px 24px 24px' } }, { children: [jsx("div", { children: children }, void 0),
113
+ jsx("button", __assign({ className: "p-btn--primary mt24 wmn3", onClick: function () { return setDisplay(false); } }, { children: "Continue" }), void 0)] }), void 0) }), void 0)] }, void 0));
114
+ };
115
+
116
+ export default story;
117
+ export { BottomModalStory, BottomOrRegularModalStory, NonDismissibleModal, RegularModalStory };
118
+ //# sourceMappingURL=index.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.stories.js","sources":["../../../../../src/lib/components/modal/index.stories.tsx"],"sourcesContent":["\nimport { useState } from 'react';\nimport { BottomModal, BottomOrRegularModal, Props, RegularModal } from '.';\nimport { Markdown } from '../markdown';\n\nconst story = {\n title: 'JSX/Modals',\n component: BottomOrRegularModal,\n argTypes: {\n title: {\n defaultValue: \"Modal title\",\n description: \"The title that needs to be displayed on the modal\",\n },\n isOpen: {\n defaultValue: false,\n description: \"When set to `true`, the modal is displayed. When set to `false` the modal gets removed\",\n },\n dismissible: {\n defaultValue: true,\n description: \"The content that gets displayed on the modal\",\n },\n className: {\n defaultValue: '',\n description: 'Any additional className',\n },\n children: {\n defaultValue: 'Modal content to be displayed',\n description: 'The content that gets displayed on the modal',\n type: 'text',\n table: {\n type: {\n summary: 'ReactNode'\n }\n }\n },\n onClose: {\n description: 'Callback when the user close the modal',\n action: true,\n table: {\n category: \"Callbacks\",\n },\n },\n },\n parameters: {\n componentSubtitle: 'Bottom or Regular modal will automatically choose what’s best to display based on the users screen width.',\n docs: {\n description: {\n component: 'Modals are dialog overlays that prevent the user from interacting with the rest of the website until an action is taken or the dialog is dismissed. Modals are purposefully disruptive and should be used thoughtfully and sparingly.',\n }\n },\n },\n};\n\nexport const BottomOrRegularModalStory = ({\n children,\n className,\n dismissible,\n isOpen,\n onClose,\n title,\n}: Props) => {\n const [display, setDisplay] = useState(isOpen);\n const handleOnClose = () => {\n onClose();\n setDisplay(false);\n };\n\n return (\n <>\n <button\n className=\"p-btn--primary wmn2\"\n onClick={() => setDisplay(true)}\n >\n Click to open modal\n </button>\n\n <BottomOrRegularModal\n dismissible={dismissible}\n className={className}\n title={title}\n isOpen={display}\n onClose={handleOnClose}\n >\n <div style={{ padding: '0 24px 24px 24px' }}>\n <div>\n {children}\n </div>\n <button\n className=\"p-btn--primary mt24 wmn3\"\n onClick={() => setDisplay(false)}\n >\n Continue\n </button>\n </div>\n </BottomOrRegularModal>\n </>\n );\n}\n\nBottomOrRegularModalStory.storyName = 'BottomOrRegularModal';\n\nexport const RegularModalStory = ({\n children,\n isOpen,\n onClose,\n title,\n}: Props) => {\n const [display, setDisplay] = useState(isOpen);\n const handleOnClose = () => {\n onClose();\n setDisplay(false);\n };\n\n return (\n <>\n Regular modals are primary meant to be used on Desktop or Tablet environment. The modal will appear in the middle of the screen and the user will be able to dismiss them using the top left \"X\" icon. \n <Markdown>\n If you want to use it for Mobile only, you should check [Bottom modal](#bottommodal) instead.\n Want to use either Regular Modal or Bottom Modal based on the screen width? You can use [Bottom or Regular modal](#bottomorregularmodal).\n </Markdown>\n\n <button\n className=\"p-btn--primary wmn2 mt24\"\n onClick={() => setDisplay(true)}\n >\n Click to open modal\n </button>\n\n <RegularModal\n title={title}\n isOpen={display}\n onClose={handleOnClose}\n >\n <div style={{ padding: '0 24px 24px 24px' }}>\n <div>\n {children}\n </div>\n <button\n className=\"p-btn--primary mt24 wmn3\"\n onClick={() => setDisplay(false)}\n >\n Continue\n </button>\n </div>\n </RegularModal>\n </>\n );\n}\n\nRegularModalStory.storyName = 'RegularModal';\n\nexport const BottomModalStory = ({\n children,\n isOpen,\n onClose,\n title,\n}: Props) => {\n const [display, setDisplay] = useState(isOpen);\n const handleOnClose = () => {\n onClose();\n setDisplay(false);\n };\n\n return (\n <>\n Bottom modals are primary meant to be used on Mobile environment. The modal will appear from the bottom of the screen and the user will be able to dismiss them using the top left \"X\" icon.\n <Markdown>\n If you want to use it for Desktop only, you should check [Regular modal](#regularmodal) instead.\n Want to use either Regular Modal or Bottom Modal based on the screen width? You can use [Bottom or Regular modal](#bottomorregularmodal).\n </Markdown>\n\n <button\n className=\"p-btn--primary wmn2 mt24\"\n onClick={() => setDisplay(true)}\n >\n Click to open modal\n </button>\n\n <BottomModal\n title={title}\n isOpen={display}\n onClose={handleOnClose}\n >\n <div style={{ padding: '0 24px 24px 24px' }}>\n <div>\n {children}\n </div>\n <button\n className=\"p-btn--primary mt24 wmn3\"\n onClick={() => setDisplay(false)}\n >\n Continue\n </button>\n </div>\n </BottomModal>\n </>\n );\n}\n\nBottomModalStory.storyName = 'BottomModal';\n\nexport const NonDismissibleModal = ({\n children,\n isOpen,\n onClose,\n title,\n}: Props) => {\n const [display, setDisplay] = useState(isOpen);\n const handleOnClose = () => {\n onClose();\n setDisplay(false);\n };\n\n return (\n <>\n <Markdown>\n Setting the dismissible prop to false will hide the close button and prevent the user from closing it using the escape key or clicking outside.\n This prop can be useful if we want the user to explicitly interact with the modal options.\n </Markdown>\n\n <Markdown>\n **Warning:** a modal with the dismissible prop can only be closed by changing the isOpen prop to false.\n </Markdown>\n\n <button\n className=\"p-btn--primary wmn2 mt24\"\n onClick={() => setDisplay(true)}\n >\n Click to open modal\n </button>\n\n <BottomOrRegularModal\n dismissible={false}\n title={title}\n isOpen={display}\n onClose={handleOnClose}\n >\n <div style={{ padding: '0 24px 24px 24px' }}>\n <div>\n {children}\n </div>\n <button\n className=\"p-btn--primary mt24 wmn3\"\n onClick={() => setDisplay(false)}\n >\n Continue\n </button>\n </div>\n </BottomOrRegularModal>\n </>\n );\n}\n\nexport default story;\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;;;;;;;IAKM,KAAK,GAAG;IACZ,KAAK,EAAE,YAAY;IACnB,SAAS,EAAE,oBAAoB;IAC/B,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,YAAY,EAAE,aAAa;YAC3B,WAAW,EAAE,mDAAmD;SACjE;QACD,MAAM,EAAE;YACN,YAAY,EAAE,KAAK;YACnB,WAAW,EAAE,wFAAwF;SACtG;QACD,WAAW,EAAE;YACX,YAAY,EAAE,IAAI;YAClB,WAAW,EAAE,8CAA8C;SAC5D;QACD,SAAS,EAAE;YACT,YAAY,EAAE,EAAE;YAChB,WAAW,EAAE,0BAA0B;SACxC;QACD,QAAQ,EAAE;YACR,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3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M18%206L6%2018%22%20stroke%3D%22%2326262E%22%20strokeWidth%3D%222%22%20strokeLinecap%3D%22round%22%20strokeLinejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M6%206L18%2018%22%20stroke%3D%22%2326262E%22%20strokeWidth%3D%222%22%20strokeLinecap%3D%22round%22%20strokeLinejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E";
13
13
 
14
- var RegularModal = (function (_a) {
14
+ var RegularModal = function (_a) {
15
15
  var title = _a.title, isOpen = _a.isOpen, children = _a.children, onClose = _a.onClose, _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.dismissible, dismissible = _c === void 0 ? true : _c;
16
16
  var _d = useOnClose(onClose, isOpen, dismissible), isClosing = _d.isClosing, handleContainerClick = _d.handleContainerClick, handleOnClose = _d.handleOnClose, handleOnOverlayClick = _d.handleOnOverlayClick;
17
17
  if (!isOpen) {
@@ -22,7 +22,7 @@ var RegularModal = (function (_a) {
22
22
  'jc-end': !title
23
23
  }) }, { children: [title && jsx("div", __assign({ className: "p-h2 " + styles.title }, { children: title }), void 0),
24
24
  dismissible && (jsx("button", __assign({ type: "button", className: styles.close, onClick: handleOnClose }, { children: jsx("img", { src: imageClose, alt: "Close" }, void 0) }), void 0))] }), void 0), children] }), void 0) }), void 0) }), void 0));
25
- });
25
+ };
26
26
 
27
- export default RegularModal;
27
+ export { RegularModal };
28
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/lib/components/modal/regularModal/img/close.svg","../../../../../../src/lib/components/modal/regularModal/index.tsx"],"sourcesContent":["export default \"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M18%206L6%2018%22%20stroke%3D%22%2326262E%22%20strokeWidth%3D%222%22%20strokeLinecap%3D%22round%22%20strokeLinejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M6%206L18%2018%22%20stroke%3D%22%2326262E%22%20strokeWidth%3D%222%22%20strokeLinecap%3D%22round%22%20strokeLinejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","import React from 'react';\n\nimport { Props } from '..';\nimport useOnClose from '../hooks/useOnClose';\n\nimport styles from './style.module.scss';\n\nimport imageClose from './img/close.svg';\nimport classNames from 'classnames';\n\nexport default ({\n title,\n isOpen,\n children,\n onClose,\n className = '',\n dismissible = true,\n}: Props) => {\n const {\n isClosing,\n handleContainerClick,\n handleOnClose,\n handleOnOverlayClick\n } = useOnClose(\n onClose,\n isOpen,\n dismissible\n );\n\n if (!isOpen) {\n return <></>;\n }\n\n return (\n <div\n className={isClosing ? styles['overlay--close'] : styles.overlay}\n onClick={handleOnOverlayClick}\n >\n <div\n className={`${\n isClosing ? styles['container--close'] : styles.container\n } ${className}`}\n >\n <div\n className={styles.body}\n onClick={handleContainerClick}\n >\n <div className={classNames(styles.header, {\n 'jc-between': !!title,\n 'jc-end': !title\n })}>\n {title && <div className={`p-h2 ${styles.title}`}>{title}</div>}\n {dismissible && (\n <button\n type=\"button\"\n className={styles.close}\n onClick={handleOnClose}\n >\n <img src={imageClose} alt=\"Close\" />\n </button>\n )}\n </div>\n {children}\n </div>\n </div>\n </div>\n );\n};\n"],"names":["_jsx","_jsxs","classNames"],"mappings":";;;;;;;;;;;AAAA,iBAAe;;ACUf,oBAAe,UAAC,EAOR;QANN,KAAK,WAAA,EACL,MAAM,YAAA,EACN,QAAQ,cAAA,EACR,OAAO,aAAA,EACP,iBAAc,EAAd,SAAS,mBAAG,EAAE,KAAA,EACd,mBAAkB,EAAlB,WAAW,mBAAG,IAAI,KAAA;IAEZ,IAAA,KAKF,UAAU,CACZ,OAAO,EACP,MAAM,EACN,WAAW,CACZ,EARC,SAAS,eAAA,EACT,oBAAoB,0BAAA,EACpB,aAAa,mBAAA,EACb,oBAAoB,0BAKrB,CAAC;IAEF,IAAI,CAAC,MAAM,EAAE;QACX,OAAOA,yBAAK,CAAC;KACd;IAED,QACEA,sBACE,SAAS,EAAE,SAAS,GAAG,MAAM,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAAC,OAAO,EAChE,OAAO,EAAE,oBAAoB,gBAE7BA,sBACE,SAAS,EAAE,CACT,SAAS,GAAG,MAAM,CAAC,kBAAkB,CAAC,GAAG,MAAM,CAAC,SAAS,UACvD,SAAW,gBAEfC,uBACE,SAAS,EAAE,MAAM,CAAC,IAAI,EACtB,OAAO,EAAE,oBAAoB,iBAE7BA,uBAAK,SAAS,EAAEC,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE;4BACxC,YAAY,EAAE,CAAC,CAAC,KAAK;4BACrB,QAAQ,EAAE,CAAC,KAAK;yBACjB,CAAC,iBACC,KAAK,IAAIF,sBAAK,SAAS,EAAE,UAAQ,MAAM,CAAC,KAAO,gBAAG,KAAK,YAAO;4BAC9D,WAAW,KACVA,yBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,MAAM,CAAC,KAAK,EACvB,OAAO,EAAE,aAAa,gBAEtBA,aAAK,GAAG,EAAE,UAAU,EAAE,GAAG,EAAC,OAAO,WAAG,YAC7B,CACV,aACG,EACL,QAAQ,aACL,YACF,YACF,EACN;AACJ,CAAC;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/lib/components/modal/regularModal/img/close.svg","../../../../../../src/lib/components/modal/regularModal/index.tsx"],"sourcesContent":["export default \"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M18%206L6%2018%22%20stroke%3D%22%2326262E%22%20strokeWidth%3D%222%22%20strokeLinecap%3D%22round%22%20strokeLinejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M6%206L18%2018%22%20stroke%3D%22%2326262E%22%20strokeWidth%3D%222%22%20strokeLinecap%3D%22round%22%20strokeLinejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","import React from 'react';\n\nimport { Props } from '..';\nimport useOnClose from '../hooks/useOnClose';\n\nimport styles from './style.module.scss';\n\nimport imageClose from './img/close.svg';\nimport classNames from 'classnames';\n\nexport const RegularModal = ({\n title,\n isOpen,\n children,\n onClose,\n className = '',\n dismissible = true,\n}: Props) => {\n const {\n isClosing,\n handleContainerClick,\n handleOnClose,\n handleOnOverlayClick\n } = useOnClose(\n onClose,\n isOpen,\n dismissible\n );\n\n if (!isOpen) {\n return <></>;\n }\n\n return (\n <div\n className={isClosing ? styles['overlay--close'] : styles.overlay}\n onClick={handleOnOverlayClick}\n >\n <div\n className={`${\n isClosing ? styles['container--close'] : styles.container\n } ${className}`}\n >\n <div\n className={styles.body}\n onClick={handleContainerClick}\n >\n <div className={classNames(styles.header, {\n 'jc-between': !!title,\n 'jc-end': !title\n })}>\n {title && <div className={`p-h2 ${styles.title}`}>{title}</div>}\n {dismissible && (\n <button\n type=\"button\"\n className={styles.close}\n onClick={handleOnClose}\n >\n <img src={imageClose} alt=\"Close\" />\n </button>\n )}\n </div>\n {children}\n </div>\n </div>\n </div>\n );\n};\n"],"names":["_jsx","_jsxs","classNames"],"mappings":";;;;;;;;;;;AAAA,iBAAe;;ICUF,YAAY,GAAG,UAAC,EAOrB;QANN,KAAK,WAAA,EACL,MAAM,YAAA,EACN,QAAQ,cAAA,EACR,OAAO,aAAA,EACP,iBAAc,EAAd,SAAS,mBAAG,EAAE,KAAA,EACd,mBAAkB,EAAlB,WAAW,mBAAG,IAAI,KAAA;IAEZ,IAAA,KAKF,UAAU,CACZ,OAAO,EACP,MAAM,EACN,WAAW,CACZ,EARC,SAAS,eAAA,EACT,oBAAoB,0BAAA,EACpB,aAAa,mBAAA,EACb,oBAAoB,0BAKrB,CAAC;IAEF,IAAI,CAAC,MAAM,EAAE;QACX,OAAOA,yBAAK,CAAC;KACd;IAED,QACEA,sBACE,SAAS,EAAE,SAAS,GAAG,MAAM,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAAC,OAAO,EAChE,OAAO,EAAE,oBAAoB,gBAE7BA,sBACE,SAAS,EAAE,CACT,SAAS,GAAG,MAAM,CAAC,kBAAkB,CAAC,GAAG,MAAM,CAAC,SAAS,UACvD,SAAW,gBAEfC,uBACE,SAAS,EAAE,MAAM,CAAC,IAAI,EACtB,OAAO,EAAE,oBAAoB,iBAE7BA,uBAAK,SAAS,EAAEC,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE;4BACxC,YAAY,EAAE,CAAC,CAAC,KAAK;4BACrB,QAAQ,EAAE,CAAC,KAAK;yBACjB,CAAC,iBACC,KAAK,IAAIF,sBAAK,SAAS,EAAE,UAAQ,MAAM,CAAC,KAAO,gBAAG,KAAK,YAAO;4BAC9D,WAAW,KACVA,yBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,MAAM,CAAC,KAAK,EACvB,OAAO,EAAE,aAAa,gBAEtBA,aAAK,GAAG,EAAE,UAAU,EAAE,GAAG,EAAC,OAAO,WAAG,YAC7B,CACV,aACG,EACL,QAAQ,aACL,YACF,YACF,EACN;AACJ;;;;"}
@@ -0,0 +1,19 @@
1
+ var basePath = 'https://assets.cdn.feather-insurance.com/assets/images';
2
+ var images = {
3
+ aid: basePath + "/aid.svg",
4
+ bed: basePath + "/bed.svg",
5
+ bigDog: basePath + "/bigDog.svg",
6
+ verticalIcons: {
7
+ dogLiability: basePath + "/dogLiabilityIcon.png",
8
+ dogLiability2x: basePath + "/dogLiabilityIcon2x.png",
9
+ dogLiability3x: basePath + "/dogLiabilityIcon3x.png",
10
+ },
11
+ brokenAquarium: basePath + "/brokenAquarium.svg",
12
+ brokenGlass: basePath + "/brokenGlass.svg",
13
+ damagedLaptop: basePath + "/damagedLaptop.svg",
14
+ moneyIncome: basePath + "/moneyIncome.svg",
15
+ washingMachine: basePath + "/washingMachine.svg",
16
+ };
17
+
18
+ export { images as i };
19
+ //# sourceMappingURL=index-e81a1766.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-e81a1766.js","sources":["../../../src/lib/util/images/index.ts"],"sourcesContent":["const basePath = 'https://assets.cdn.feather-insurance.com/assets/images';\n\nconst images = {\n aid: `${basePath}/aid.svg`,\n bed: `${basePath}/bed.svg`,\n bigDog: `${basePath}/bigDog.svg`,\n verticalIcons: {\n dogLiability: `${basePath}/dogLiabilityIcon.png`,\n dogLiability2x: `${basePath}/dogLiabilityIcon2x.png`,\n dogLiability3x: `${basePath}/dogLiabilityIcon3x.png`,\n },\n brokenAquarium: `${basePath}/brokenAquarium.svg`,\n brokenGlass: `${basePath}/brokenGlass.svg`,\n damagedLaptop: `${basePath}/damagedLaptop.svg`,\n moneyIncome: `${basePath}/moneyIncome.svg`,\n washingMachine: `${basePath}/washingMachine.svg`,\n} as const;\n\nexport { images };\n"],"names":[],"mappings":"AAAA,IAAM,QAAQ,GAAG,wDAAwD,CAAC;IAEpE,MAAM,GAAG;IACb,GAAG,EAAK,QAAQ,aAAU;IAC1B,GAAG,EAAK,QAAQ,aAAU;IAC1B,MAAM,EAAK,QAAQ,gBAAa;IAChC,aAAa,EAAE;QACb,YAAY,EAAK,QAAQ,0BAAuB;QAChD,cAAc,EAAK,QAAQ,4BAAyB;QACpD,cAAc,EAAK,QAAQ,4BAAyB;KACrD;IACD,cAAc,EAAK,QAAQ,wBAAqB;IAChD,WAAW,EAAK,QAAQ,qBAAkB;IAC1C,aAAa,EAAK,QAAQ,uBAAoB;IAC9C,WAAW,EAAK,QAAQ,qBAAkB;IAC1C,cAAc,EAAK,QAAQ,wBAAqB;;;;;"}
package/dist/esm/index.js CHANGED
@@ -7,9 +7,9 @@ export { DownloadButton } from './components/downloadButton/index.js';
7
7
  export { default as IbanInput } from './components/input/iban/index.js';
8
8
  export { default as CurrencyInput } from './components/input/currency/index.js';
9
9
  export { Checkbox } from './components/input/checkbox/index.js';
10
- export { default as BottomModal } from './components/modal/bottomModal/index.js';
11
- export { default as RegularModal } from './components/modal/regularModal/index.js';
12
- export { default as BottomOrRegularModal } from './components/modal/bottomOrRegularModal/index.js';
10
+ export { BottomModal } from './components/modal/bottomModal/index.js';
11
+ export { RegularModal } from './components/modal/regularModal/index.js';
12
+ export { BottomOrRegularModal } from './components/modal/bottomOrRegularModal/index.js';
13
13
  export { CardWithLeftIcon, CardWithTopIcon, CardWithTopLeftIcon, InfoCard } from './components/cards/index.js';
14
14
  export { C as CardButton } from './index-47663d39.js';
15
15
  export { default as Button } from './components/button/index.js';
@@ -19,7 +19,7 @@ export { default as AutoSuggestInput } from './components/input/autoSuggestInput
19
19
  export { ComparisonTable } from './components/comparisonTable/index.js';
20
20
  export { SegmentedControl } from './components/segmentedControl/index.js';
21
21
  export { Markdown } from './components/markdown/index.js';
22
- export { i as images } from './index-db2e797f.js';
22
+ export { i as images } from './index-e81a1766.js';
23
23
  export { default as TableRating } from './components/comparisonTable/components/TableRating/index.js';
24
24
  export { default as TableTrueFalse } from './components/comparisonTable/components/TableTrueFalse.js';
25
25
  export { default as TableRowHeader } from './components/comparisonTable/components/TableRowHeader/index.js';
@@ -1,3 +1,2 @@
1
1
  import { Props } from '..';
2
- declare const _default: ({ title, isOpen, children, onClose, className, dismissible, }: Props) => JSX.Element;
3
- export default _default;
2
+ export declare const BottomModal: ({ title, isOpen, children, onClose, className, dismissible, }: Props) => JSX.Element;
@@ -1,3 +1,2 @@
1
1
  import { Props } from '..';
2
- declare const _default: ({ isOpen, ...props }: Props) => JSX.Element;
3
- export default _default;
2
+ export declare const BottomOrRegularModal: ({ isOpen, ...props }: Props) => JSX.Element;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
- import BottomModal from './bottomModal';
3
- import RegularModal from './regularModal';
4
- import BottomOrRegularModal from './bottomOrRegularModal';
2
+ import { BottomModal } from './bottomModal';
3
+ import { RegularModal } from './regularModal';
4
+ import { BottomOrRegularModal } from './bottomOrRegularModal';
5
5
  export interface Props {
6
6
  title?: string;
7
7
  isOpen: boolean;
@@ -0,0 +1,62 @@
1
+ import { Props } from '.';
2
+ declare const story: {
3
+ title: string;
4
+ component: ({ isOpen, ...props }: Props) => JSX.Element;
5
+ argTypes: {
6
+ title: {
7
+ defaultValue: string;
8
+ description: string;
9
+ };
10
+ isOpen: {
11
+ defaultValue: boolean;
12
+ description: string;
13
+ };
14
+ dismissible: {
15
+ defaultValue: boolean;
16
+ description: string;
17
+ };
18
+ className: {
19
+ defaultValue: string;
20
+ description: string;
21
+ };
22
+ children: {
23
+ defaultValue: string;
24
+ description: string;
25
+ type: string;
26
+ table: {
27
+ type: {
28
+ summary: string;
29
+ };
30
+ };
31
+ };
32
+ onClose: {
33
+ description: string;
34
+ action: boolean;
35
+ table: {
36
+ category: string;
37
+ };
38
+ };
39
+ };
40
+ parameters: {
41
+ componentSubtitle: string;
42
+ docs: {
43
+ description: {
44
+ component: string;
45
+ };
46
+ };
47
+ };
48
+ };
49
+ export declare const BottomOrRegularModalStory: {
50
+ ({ children, className, dismissible, isOpen, onClose, title, }: Props): JSX.Element;
51
+ storyName: string;
52
+ };
53
+ export declare const RegularModalStory: {
54
+ ({ children, isOpen, onClose, title, }: Props): JSX.Element;
55
+ storyName: string;
56
+ };
57
+ export declare const BottomModalStory: {
58
+ ({ children, isOpen, onClose, title, }: Props): JSX.Element;
59
+ storyName: string;
60
+ };
61
+ export declare const NonDismissibleModal: ({ children, isOpen, onClose, title, }: Props) => JSX.Element;
62
+ export default story;
@@ -1,3 +1,2 @@
1
1
  import { Props } from '..';
2
- declare const _default: ({ title, isOpen, children, onClose, className, dismissible, }: Props) => JSX.Element;
3
- export default _default;
2
+ export declare const RegularModal: ({ title, isOpen, children, onClose, className, dismissible, }: Props) => JSX.Element;
@@ -2,6 +2,11 @@ declare const images: {
2
2
  readonly aid: "https://assets.cdn.feather-insurance.com/assets/images/aid.svg";
3
3
  readonly bed: "https://assets.cdn.feather-insurance.com/assets/images/bed.svg";
4
4
  readonly bigDog: "https://assets.cdn.feather-insurance.com/assets/images/bigDog.svg";
5
+ readonly verticalIcons: {
6
+ readonly dogLiability: "https://assets.cdn.feather-insurance.com/assets/images/dogLiabilityIcon.png";
7
+ readonly dogLiability2x: "https://assets.cdn.feather-insurance.com/assets/images/dogLiabilityIcon2x.png";
8
+ readonly dogLiability3x: "https://assets.cdn.feather-insurance.com/assets/images/dogLiabilityIcon3x.png";
9
+ };
5
10
  readonly brokenAquarium: "https://assets.cdn.feather-insurance.com/assets/images/brokenAquarium.svg";
6
11
  readonly brokenGlass: "https://assets.cdn.feather-insurance.com/assets/images/brokenGlass.svg";
7
12
  readonly damagedLaptop: "https://assets.cdn.feather-insurance.com/assets/images/damagedLaptop.svg";
@@ -1,6 +1,6 @@
1
1
  import { _ as __assign } from '../../tslib.es6-5bc94358.js';
2
2
  import { jsx, jsxs } from 'react/jsx-runtime';
3
- import { i as images } from '../../index-db2e797f.js';
3
+ import { i as images } from '../../index-e81a1766.js';
4
4
 
5
5
  var story = {
6
6
  title: 'Utils/Images',
@@ -10,11 +10,14 @@ var story = {
10
10
  component: 'Use the `images` object export to access our list of available images.',
11
11
  },
12
12
  },
13
- }
13
+ },
14
14
  };
15
- var Images = function () { return (jsx("div", __assign({ className: 'd-flex gap8 f-wrap' }, { children: Object.entries(images).map(function (_a) {
15
+ var Images = function () { return (jsx("div", __assign({ className: "d-flex gap8 f-wrap" }, { children: Object.entries(images).map(function (_a) {
16
16
  var key = _a[0], value = _a[1];
17
- return (jsxs("div", __assign({ className: "ws3 d-flex fd-column ai-center br4 p24 pt16 pb16 bg-grey-100" }, { children: [jsx("span", __assign({ className: 'p-p--small mb8' }, { children: key }), void 0),
17
+ if (typeof value !== 'string') {
18
+ return null;
19
+ }
20
+ return (jsxs("div", __assign({ className: "ws3 d-flex fd-column ai-center br4 p24 pt16 pb16 bg-grey-100" }, { children: [jsx("span", __assign({ className: "p-p--small mb8" }, { children: key }), void 0),
18
21
  jsx("img", { alt: key, src: value }, void 0)] }), key));
19
22
  }) }), void 0)); };
20
23
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.stories.js","sources":["../../../../../src/lib/util/images/index.stories.tsx"],"sourcesContent":["import { images } from \"../../util/images\";\n\nconst story = {\n title: 'Utils/Images',\n parameters: {\n docs: {\n description: {\n component: 'Use the `images` object export to access our list of available images.',\n },\n },\n }\n};\n\n\nexport const Images = () => (\n <div className='d-flex gap8 f-wrap'>\n {Object.entries(images).map(([key, value]) => (\n <div key={key} className=\"ws3 d-flex fd-column ai-center br4 p24 pt16 pb16 bg-grey-100\">\n <span className='p-p--small mb8'>{key}</span>\n \n <img alt={key} src={value} />\n </div>\n ))}\n </div>\n);\n\nexport default story;\n"],"names":["_jsx","_jsxs"],"mappings":";;;;IAEM,KAAK,GAAG;IACZ,KAAK,EAAE,cAAc;IACrB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,WAAW,EAAE;gBACX,SAAS,EAAE,wEAAwE;aACpF;SACF;KACF;EACD;IAGW,MAAM,GAAG,cAAM,QAC1BA,sBAAK,SAAS,EAAC,oBAAoB,gBAChC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,UAAC,EAAY;YAAX,GAAG,QAAA,EAAE,KAAK,QAAA;QAAM,QAC5CC,uBAAe,SAAS,EAAC,8DAA8D,iBACrFD,uBAAM,SAAS,EAAC,gBAAgB,gBAAE,GAAG,YAAQ;gBAE7CA,aAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,WAAI,MAHrB,GAAG,CAIP;KACP,CAAC,YACE;;;;;"}
1
+ {"version":3,"file":"index.stories.js","sources":["../../../../../src/lib/util/images/index.stories.tsx"],"sourcesContent":["import { images } from '../../util/images';\n\nconst story = {\n title: 'Utils/Images',\n parameters: {\n docs: {\n description: {\n component:\n 'Use the `images` object export to access our list of available images.',\n },\n },\n },\n};\n\nexport const Images = () => (\n <div className=\"d-flex gap8 f-wrap\">\n {Object.entries(images).map(([key, value]) => {\n if (typeof value !== 'string') {\n return null;\n }\n return (\n <div\n key={key}\n className=\"ws3 d-flex fd-column ai-center br4 p24 pt16 pb16 bg-grey-100\"\n >\n <span className=\"p-p--small mb8\">{key}</span>\n\n <img alt={key} src={value} />\n </div>\n );\n })}\n </div>\n);\n\nexport default story;\n"],"names":["_jsx","_jsxs"],"mappings":";;;;IAEM,KAAK,GAAG;IACZ,KAAK,EAAE,cAAc;IACrB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,WAAW,EAAE;gBACX,SAAS,EACP,wEAAwE;aAC3E;SACF;KACF;EACD;IAEW,MAAM,GAAG,cAAM,QAC1BA,sBAAK,SAAS,EAAC,oBAAoB,gBAChC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,UAAC,EAAY;YAAX,GAAG,QAAA,EAAE,KAAK,QAAA;QACtC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC7B,OAAO,IAAI,CAAC;SACb;QACD,QACEC,uBAEE,SAAS,EAAC,8DAA8D,iBAExED,uBAAM,SAAS,EAAC,gBAAgB,gBAAE,GAAG,YAAQ;gBAE7CA,aAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,WAAI,MALxB,GAAG,CAMJ,EACN;KACH,CAAC,YACE;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@popsure/dirty-swan",
3
- "version": "0.33.3",
3
+ "version": "0.33.4",
4
4
  "author": "Vincent Audoire <vincent@getpopsure.com>",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -7,7 +7,7 @@ import imageClose from './img/close.svg';
7
7
  import useOnClose from '../hooks/useOnClose';
8
8
  import classNames from 'classnames';
9
9
 
10
- export default ({
10
+ export const BottomModal = ({
11
11
  title,
12
12
  isOpen,
13
13
  children,