@popsure/dirty-swan 0.33.2 → 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.
- package/dist/cjs/index.js +32 -25
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lib/components/modal/bottomModal/index.d.ts +1 -2
- package/dist/cjs/lib/components/modal/bottomOrRegularModal/index.d.ts +1 -2
- package/dist/cjs/lib/components/modal/index.d.ts +3 -3
- package/dist/cjs/lib/components/modal/index.stories.d.ts +62 -0
- package/dist/cjs/lib/components/modal/regularModal/index.d.ts +1 -2
- package/dist/cjs/lib/util/images/index.d.ts +5 -0
- package/dist/esm/components/input/checkbox/index.js +11 -10
- package/dist/esm/components/input/checkbox/index.js.map +1 -1
- package/dist/esm/components/input/checkbox/index.stories.js +1 -1
- package/dist/esm/components/modal/bottomModal/index.js +3 -3
- package/dist/esm/components/modal/bottomModal/index.js.map +1 -1
- package/dist/esm/components/modal/bottomOrRegularModal/index.js +5 -5
- package/dist/esm/components/modal/bottomOrRegularModal/index.js.map +1 -1
- package/dist/esm/components/modal/index.stories.js +118 -0
- package/dist/esm/components/modal/index.stories.js.map +1 -0
- package/dist/esm/components/modal/regularModal/index.js +3 -3
- package/dist/esm/components/modal/regularModal/index.js.map +1 -1
- package/dist/esm/index-e81a1766.js +19 -0
- package/dist/esm/index-e81a1766.js.map +1 -0
- package/dist/esm/index.js +4 -4
- package/dist/esm/lib/components/modal/bottomModal/index.d.ts +1 -2
- package/dist/esm/lib/components/modal/bottomOrRegularModal/index.d.ts +1 -2
- package/dist/esm/lib/components/modal/index.d.ts +3 -3
- package/dist/esm/lib/components/modal/index.stories.d.ts +62 -0
- package/dist/esm/lib/components/modal/regularModal/index.d.ts +1 -2
- package/dist/esm/lib/util/images/index.d.ts +5 -0
- package/dist/esm/util/images/index.stories.js +7 -4
- package/dist/esm/util/images/index.stories.js.map +1 -1
- package/package.json +1 -1
- package/src/lib/components/input/checkbox/index.tsx +2 -2
- package/src/lib/components/input/checkbox/styles.module.scss +8 -0
- package/src/lib/components/modal/bottomModal/index.tsx +1 -1
- package/src/lib/components/modal/bottomOrRegularModal/index.tsx +2 -2
- package/src/lib/components/modal/index.stories.tsx +254 -0
- package/src/lib/components/modal/index.ts +3 -3
- package/src/lib/components/modal/regularModal/index.tsx +1 -1
- package/src/lib/util/images/index.stories.tsx +20 -12
- package/src/lib/util/images/index.ts +16 -9
- package/dist/esm/index-db2e797f.js +0 -13
- package/dist/esm/index-db2e797f.js.map +0 -1
- package/src/lib/components/modal/index.stories.mdx +0 -313
package/dist/cjs/index.js
CHANGED
|
@@ -8746,12 +8746,13 @@ var CurrencyInput = function (_a) {
|
|
|
8746
8746
|
} }, props), void 0));
|
|
8747
8747
|
};
|
|
8748
8748
|
|
|
8749
|
-
var css_248z$l = ".styles-module_container__3zJJC {\n max-width: 100%;\n}";
|
|
8750
|
-
var styles$k = {"container":"styles-module_container__3zJJC"};
|
|
8749
|
+
var css_248z$l = ".styles-module_container__3zJJC {\n max-width: 100%;\n}\n\n.styles-module_narrow__2p34b {\n max-width: 424px;\n}\n\n.styles-module_wide__VxDGe {\n max-width: 736px;\n}";
|
|
8750
|
+
var styles$k = {"container":"styles-module_container__3zJJC","narrow":"styles-module_narrow__2p34b","wide":"styles-module_wide__VxDGe"};
|
|
8751
8751
|
styleInject(css_248z$l);
|
|
8752
8752
|
|
|
8753
8753
|
var Checkbox = function (_a) {
|
|
8754
|
-
var
|
|
8754
|
+
var _b;
|
|
8755
|
+
var options = _a.options, _c = _a.value, value = _c === void 0 ? [] : _c, onChange = _a.onChange, _d = _a.wide, wide = _d === void 0 ? false : _d, _e = _a.inlineLayout, inlineLayout = _e === void 0 ? false : _e, _f = _a.className, className = _f === void 0 ? '' : _f, _g = _a.labelClassName, labelClassName = _g === void 0 ? '' : _g, _h = _a.optionClassName, optionClassName = _h === void 0 ? '' : _h;
|
|
8755
8756
|
var hasNoneValue = Object.keys(options).includes('NONE');
|
|
8756
8757
|
var handleOnChange = function (newValue) {
|
|
8757
8758
|
if (value === null || value === void 0 ? void 0 : value.includes(newValue)) {
|
|
@@ -8774,13 +8775,13 @@ var Checkbox = function (_a) {
|
|
|
8774
8775
|
onChange(newValues);
|
|
8775
8776
|
};
|
|
8776
8777
|
var entries = Object.entries(options);
|
|
8777
|
-
return (jsxRuntime.jsx("div", __assign({ className: classNames(className, styles$k.container, 'd-flex gap8', {
|
|
8778
|
-
|
|
8779
|
-
|
|
8780
|
-
'fd-row'
|
|
8781
|
-
'f-wrap'
|
|
8782
|
-
'fd-column'
|
|
8783
|
-
|
|
8778
|
+
return (jsxRuntime.jsx("div", __assign({ className: classNames(className, styles$k.container, 'd-flex gap8', (_b = {},
|
|
8779
|
+
_b[styles$k.wide] = wide,
|
|
8780
|
+
_b[styles$k.narrow] = !wide,
|
|
8781
|
+
_b['fd-row'] = inlineLayout,
|
|
8782
|
+
_b['f-wrap'] = inlineLayout,
|
|
8783
|
+
_b['fd-column'] = !inlineLayout,
|
|
8784
|
+
_b)) }, { children: entries.map(function (_a) {
|
|
8784
8785
|
var _b;
|
|
8785
8786
|
var currentValue = _a[0], label = _a[1];
|
|
8786
8787
|
var checked = value === null || value === void 0 ? void 0 : value.includes(currentValue);
|
|
@@ -8845,7 +8846,7 @@ var useOnClose = function (onClose, isOpen, dismissable) {
|
|
|
8845
8846
|
return { isClosing: isClosing, handleContainerClick: handleContainerClick, handleOnClose: handleOnClose, handleOnOverlayClick: handleOnOverlayClick };
|
|
8846
8847
|
};
|
|
8847
8848
|
|
|
8848
|
-
var BottomModal =
|
|
8849
|
+
var BottomModal = function (_a) {
|
|
8849
8850
|
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;
|
|
8850
8851
|
var _d = require$$0.useState(0), containerXOffset = _d[0], setContainerXOffset = _d[1];
|
|
8851
8852
|
var _e = useOnClose(onClose, isOpen, dismissible), isClosing = _e.isClosing, handleContainerClick = _e.handleContainerClick, handleOnClose = _e.handleOnClose, handleOnOverlayClick = _e.handleOnOverlayClick;
|
|
@@ -8863,7 +8864,7 @@ var BottomModal = (function (_a) {
|
|
|
8863
8864
|
}) }, { children: [jsxRuntime.jsx("div", __assign({ className: "p-h4 " + styles$j.title }, { children: title }), void 0),
|
|
8864
8865
|
dismissible && (jsxRuntime.jsx("button", __assign({ type: "button", className: styles$j.close, onClick: handleOnClose }, { children: jsxRuntime.jsx("img", { src: imageClose$1, alt: "Close" }, void 0) }), void 0))] }), void 0),
|
|
8865
8866
|
jsxRuntime.jsx("div", __assign({ className: styles$j.content }, { children: children }), void 0)] }), void 0) }), void 0));
|
|
8866
|
-
}
|
|
8867
|
+
};
|
|
8867
8868
|
|
|
8868
8869
|
var css_248z$j = "@keyframes style-module_fade-in__nLzzO {\n 0% {\n background-color: rgba(0, 0, 0, 0);\n visibility: hidden;\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.3);\n visibility: visible;\n }\n}\n@keyframes style-module_fade-out__IuSV7 {\n from {\n background-color: rgba(0, 0, 0, 0.3);\n visibility: visible;\n }\n to {\n background-color: rgba(0, 0, 0, 0);\n visibility: hidden;\n }\n}\n@keyframes style-module_appear-in__2ZMqz {\n 0% {\n transform: translateY(24px);\n opacity: 0;\n visibility: hidden;\n }\n 100% {\n transform: translateY(0);\n opacity: 1;\n visibility: visible;\n }\n}\n@keyframes style-module_disappear-out__38TSV {\n 0% {\n transform: translateY(0);\n opacity: 1;\n visibility: visible;\n }\n 100% {\n transform: translateY(24px);\n opacity: 0;\n visibility: hidden;\n }\n}\n.style-module_overlay__1Zbce, .style-module_overlay--close__2dytn {\n position: fixed;\n z-index: 100;\n overflow: auto;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n animation: style-module_fade-in__nLzzO 0.3s both;\n}\n.style-module_overlay--close__2dytn {\n animation-delay: 0.1s;\n animation: style-module_fade-out__IuSV7 0.3s both;\n}\n\n.style-module_container__1XZj_, .style-module_container--close__3UYsJ {\n position: relative;\n display: flex;\n align-items: center;\n max-width: 592px;\n width: 100%;\n min-height: 100%;\n margin: 0 auto;\n animation-name: style-module_appear-in__2ZMqz;\n animation-duration: 0.4s;\n animation-fill-mode: both;\n animation-timing-function: ease-out;\n}\n.style-module_container--close__3UYsJ {\n animation-name: style-module_disappear-out__38TSV;\n animation-duration: 0.4s;\n animation-delay: 0s;\n animation-fill-mode: both;\n animation-timing-function: ease-out;\n}\n\n.style-module_body__lbUih {\n background-color: white;\n border-radius: 8px;\n margin: 80px auto;\n}\n\n.style-module_header__2oEKp {\n display: flex;\n align-items: center;\n padding: 24px 24px 0 24px;\n}\n\n.style-module_close__p3Axi {\n border: none;\n background-color: transparent;\n cursor: pointer;\n}";
|
|
8869
8870
|
var styles$i = {"overlay":"style-module_overlay__1Zbce","overlay--close":"style-module_overlay--close__2dytn","fade-in":"style-module_fade-in__nLzzO","fade-out":"style-module_fade-out__IuSV7","container":"style-module_container__1XZj_","container--close":"style-module_container--close__3UYsJ","appear-in":"style-module_appear-in__2ZMqz","disappear-out":"style-module_disappear-out__38TSV","body":"style-module_body__lbUih","header":"style-module_header__2oEKp","close":"style-module_close__p3Axi"};
|
|
@@ -8871,7 +8872,7 @@ styleInject(css_248z$j);
|
|
|
8871
8872
|
|
|
8872
8873
|
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";
|
|
8873
8874
|
|
|
8874
|
-
var RegularModal =
|
|
8875
|
+
var RegularModal = function (_a) {
|
|
8875
8876
|
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;
|
|
8876
8877
|
var _d = useOnClose(onClose, isOpen, dismissible), isClosing = _d.isClosing, handleContainerClick = _d.handleContainerClick, handleOnClose = _d.handleOnClose, handleOnOverlayClick = _d.handleOnOverlayClick;
|
|
8877
8878
|
if (!isOpen) {
|
|
@@ -8882,13 +8883,13 @@ var RegularModal = (function (_a) {
|
|
|
8882
8883
|
'jc-end': !title
|
|
8883
8884
|
}) }, { children: [title && jsxRuntime.jsx("div", __assign({ className: "p-h2 " + styles$i.title }, { children: title }), void 0),
|
|
8884
8885
|
dismissible && (jsxRuntime.jsx("button", __assign({ type: "button", className: styles$i.close, onClick: handleOnClose }, { children: jsxRuntime.jsx("img", { src: imageClose, alt: "Close" }, void 0) }), void 0))] }), void 0), children] }), void 0) }), void 0) }), void 0));
|
|
8885
|
-
}
|
|
8886
|
+
};
|
|
8886
8887
|
|
|
8887
8888
|
var css_248z$i = "@media (min-width: 34rem) {\n .style-module_mobile__3k175 {\n display: none;\n }\n}\n@media (max-width: 34rem) {\n .style-module_mobile__3k175 {\n display: block !important;\n }\n}\n\n@media (max-width: 34rem) {\n .style-module_desktop__2lclr {\n display: none;\n }\n}";
|
|
8888
8889
|
var styles$h = {"mobile":"style-module_mobile__3k175","desktop":"style-module_desktop__2lclr"};
|
|
8889
8890
|
styleInject(css_248z$i);
|
|
8890
8891
|
|
|
8891
|
-
var
|
|
8892
|
+
var BottomOrRegularModal = function (_a) {
|
|
8892
8893
|
var isOpen = _a.isOpen, props = __rest$1(_a, ["isOpen"]);
|
|
8893
8894
|
var mobileRef = require$$0.useRef(null);
|
|
8894
8895
|
var _b = require$$0.useState('desktop'), visibleSize = _b[0], setVisibleSize = _b[1];
|
|
@@ -8907,7 +8908,7 @@ var index$6 = (function (_a) {
|
|
|
8907
8908
|
}, []);
|
|
8908
8909
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", __assign({ className: styles$h.mobile, ref: mobileRef }, { children: visibleSize === 'mobile' && jsxRuntime.jsx(BottomModal, __assign({}, props, { isOpen: isOpen }), void 0) }), void 0),
|
|
8909
8910
|
visibleSize === 'desktop' && (jsxRuntime.jsx("div", __assign({ className: styles$h.desktop }, { children: jsxRuntime.jsx(RegularModal, __assign({}, props, { isOpen: isOpen }), void 0) }), void 0))] }, void 0));
|
|
8910
|
-
}
|
|
8911
|
+
};
|
|
8911
8912
|
|
|
8912
8913
|
var arrowRightImage = "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%22M5%2012H19%22%20stroke%3D%22%238E8CEE%22%20strokeWidth%3D%222%22%20strokeLinecap%3D%22round%22%20strokeLinejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M12%205L19%2012L12%2019%22%20stroke%3D%22%238E8CEE%22%20strokeWidth%3D%222%22%20strokeLinecap%3D%22round%22%20strokeLinejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E";
|
|
8913
8914
|
|
|
@@ -36258,22 +36259,28 @@ var Markdown = function (_a) {
|
|
|
36258
36259
|
return (jsxRuntime.jsx(ReactMarkdown, { children: children, className: className, components: __assign({ a: Link(openLinksInNewTab), p: Paragraph(paragraphClassName), h1: Heading, h2: Heading, h3: Heading, h4: Heading, h5: Heading, ol: OList, ul: UList, strong: Strong, em: Italic, code: Code }, customMDComponents), remarkPlugins: [remarkDirective, directiveToHTMLTag] }, void 0));
|
|
36259
36260
|
};
|
|
36260
36261
|
|
|
36262
|
+
var basePath = 'https://assets.cdn.feather-insurance.com/assets/images';
|
|
36261
36263
|
var images = {
|
|
36262
|
-
aid:
|
|
36263
|
-
bed:
|
|
36264
|
-
bigDog:
|
|
36265
|
-
|
|
36266
|
-
|
|
36267
|
-
|
|
36268
|
-
|
|
36269
|
-
|
|
36264
|
+
aid: basePath + "/aid.svg",
|
|
36265
|
+
bed: basePath + "/bed.svg",
|
|
36266
|
+
bigDog: basePath + "/bigDog.svg",
|
|
36267
|
+
verticalIcons: {
|
|
36268
|
+
dogLiability: basePath + "/dogLiabilityIcon.png",
|
|
36269
|
+
dogLiability2x: basePath + "/dogLiabilityIcon2x.png",
|
|
36270
|
+
dogLiability3x: basePath + "/dogLiabilityIcon3x.png",
|
|
36271
|
+
},
|
|
36272
|
+
brokenAquarium: basePath + "/brokenAquarium.svg",
|
|
36273
|
+
brokenGlass: basePath + "/brokenGlass.svg",
|
|
36274
|
+
damagedLaptop: basePath + "/damagedLaptop.svg",
|
|
36275
|
+
moneyIncome: basePath + "/moneyIncome.svg",
|
|
36276
|
+
washingMachine: basePath + "/washingMachine.svg",
|
|
36270
36277
|
};
|
|
36271
36278
|
|
|
36272
36279
|
exports.AutoSuggestInput = AutoSuggestInput;
|
|
36273
36280
|
exports.AutoSuggestMultiSelect = index$1;
|
|
36274
36281
|
exports.AutocompleteAddress = AutocompleteAddress;
|
|
36275
36282
|
exports.BottomModal = BottomModal;
|
|
36276
|
-
exports.BottomOrRegularModal =
|
|
36283
|
+
exports.BottomOrRegularModal = BottomOrRegularModal;
|
|
36277
36284
|
exports.Button = Button;
|
|
36278
36285
|
exports.CardButton = CardButton;
|
|
36279
36286
|
exports.CardWithLeftIcon = index$4;
|