@mailstep/design-system 0.1.4-beta.9 → 0.1.6
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/package.json +2 -3
- package/ui/Blocks/CornerDialog/index.d.ts +6 -0
- package/ui/Blocks/CornerDialog/index.js +6 -0
- package/ui/Blocks/CornerDialog/index.js.map +1 -0
- package/ui/Blocks/CornerDialog/types.d.ts +14 -0
- package/ui/Blocks/ImageList/ImageList.js +4 -5
- package/ui/Blocks/ImageList/ImageList.js.map +1 -1
- package/ui/Blocks/ImageList/index.d.ts +7 -0
- package/ui/Blocks/ImageList/index.js +6 -0
- package/ui/Blocks/ImageList/index.js.map +1 -0
- package/ui/Blocks/ImageList/types.d.ts +15 -0
- package/ui/Blocks/LightBox/LightBox.js.map +1 -1
- package/ui/Blocks/LightBox/index.d.ts +8 -0
- package/ui/Blocks/LightBox/index.js +8 -0
- package/ui/Blocks/LightBox/index.js.map +1 -0
- package/ui/Blocks/LightBox/types.d.ts +26 -0
- package/ui/Blocks/Modal/index.d.ts +8 -0
- package/ui/Blocks/Modal/index.js +7 -0
- package/ui/Blocks/Modal/index.js.map +1 -0
- package/ui/Blocks/Modal/types.d.ts +48 -0
- package/ui/Blocks/Tabs/index.d.ts +8 -0
- package/ui/Blocks/Tabs/index.js +7 -0
- package/ui/Blocks/Tabs/index.js.map +1 -0
- package/ui/Blocks/Tabs/types.d.ts +22 -0
- package/ui/Elements/Alert/index.d.ts +6 -0
- package/ui/Elements/Alert/index.js +6 -0
- package/ui/Elements/Alert/index.js.map +1 -0
- package/ui/Elements/Alert/types.d.ts +19 -0
- package/ui/Elements/Avatar/index.d.ts +5 -0
- package/ui/Elements/Avatar/index.js +6 -0
- package/ui/Elements/Avatar/index.js.map +1 -0
- package/ui/Elements/Avatar/types.d.ts +10 -0
- package/ui/Elements/Badge/Badge.d.ts +11 -0
- package/ui/Elements/Badge/index.d.ts +5 -0
- package/ui/Elements/Badge/index.js +6 -0
- package/ui/Elements/Badge/index.js.map +1 -0
- package/ui/Elements/BorderedBox/index.d.ts +5 -0
- package/ui/Elements/BorderedBox/index.js +6 -0
- package/ui/Elements/BorderedBox/index.js.map +1 -0
- package/ui/Elements/BorderedBox/types.d.ts +7 -0
- package/ui/Elements/Button/index.d.ts +6 -0
- package/ui/Elements/Button/index.js +6 -0
- package/ui/Elements/Button/index.js.map +1 -0
- package/ui/Elements/Button/types.d.ts +23 -0
- package/ui/Elements/Card/Card.js +7 -3
- package/ui/Elements/Card/Card.js.map +1 -1
- package/ui/Elements/Card/index.d.ts +7 -0
- package/ui/Elements/Card/index.js +7 -0
- package/ui/Elements/Card/index.js.map +1 -0
- package/ui/Elements/Card/styles.d.ts +12 -0
- package/ui/Elements/Card/types.d.ts +10 -0
- package/ui/Elements/Dropdown/Dropdown.d.ts +5 -0
- package/ui/Elements/Dropdown/index.d.ts +5 -0
- package/ui/Elements/Dropdown/index.js +6 -0
- package/ui/Elements/Dropdown/index.js.map +1 -0
- package/ui/Elements/Dropdown/types.d.ts +13 -0
- package/ui/Elements/ErrorMessage/index.d.ts +5 -0
- package/ui/Elements/ErrorMessage/index.js +6 -0
- package/ui/Elements/ErrorMessage/index.js.map +1 -0
- package/ui/Elements/ErrorMessage/types.d.ts +8 -0
- package/ui/Elements/Icon/index.d.ts +8 -0
- package/ui/Elements/Icon/index.js +9 -0
- package/ui/Elements/Icon/index.js.map +1 -0
- package/ui/Elements/Icon/types.d.ts +25 -0
- package/ui/Elements/Image/Image.d.ts +5 -0
- package/ui/Elements/Image/index.d.ts +5 -0
- package/ui/Elements/Image/index.js +6 -0
- package/ui/Elements/Image/index.js.map +1 -0
- package/ui/Elements/Image/types.d.ts +19 -0
- package/ui/Elements/Label/Label.d.ts +11 -0
- package/ui/Elements/Label/index.d.ts +6 -0
- package/ui/Elements/Label/index.js +7 -0
- package/ui/Elements/Label/index.js.map +1 -0
- package/ui/Elements/Line/index.d.ts +3 -0
- package/ui/Elements/Line/index.js +6 -0
- package/ui/Elements/Line/index.js.map +1 -0
- package/ui/Elements/Line/types.d.ts +13 -0
- package/ui/Elements/Link/Link.d.ts +31 -0
- package/ui/Elements/Link/index.d.ts +5 -0
- package/ui/Elements/Link/index.js +6 -0
- package/ui/Elements/Link/index.js.map +1 -0
- package/ui/Elements/Logo/index.d.ts +5 -0
- package/ui/Elements/Logo/index.js +6 -0
- package/ui/Elements/Logo/index.js.map +1 -0
- package/ui/Elements/Logo/types.d.ts +12 -0
- package/ui/Elements/Pagination/Pagination.d.ts +8 -0
- package/ui/Elements/Pagination/index.d.ts +5 -0
- package/ui/Elements/Pagination/index.js +6 -0
- package/ui/Elements/Pagination/index.js.map +1 -0
- package/ui/Elements/Paragraph/Paragraph.d.ts +5 -0
- package/ui/Elements/Paragraph/index.d.ts +5 -0
- package/ui/Elements/Paragraph/index.js +6 -0
- package/ui/Elements/Paragraph/index.js.map +1 -0
- package/ui/Elements/Portal/index.d.ts +7 -0
- package/ui/Elements/Portal/index.js +1 -1
- package/ui/Elements/Portal/index.js.map +1 -1
- package/ui/Elements/ProgressBar/ProgressBar.d.ts +10 -0
- package/ui/Elements/ProgressBar/index.d.ts +5 -0
- package/ui/Elements/ProgressBar/index.js +6 -0
- package/ui/Elements/ProgressBar/index.js.map +1 -0
- package/ui/Elements/SimpleLink/SimpleLink.d.ts +23 -0
- package/ui/Elements/SimpleLink/index.d.ts +5 -0
- package/ui/Elements/SimpleLink/index.js +6 -0
- package/ui/Elements/SimpleLink/index.js.map +1 -0
- package/ui/Elements/SpaceAround/SpaceAround.d.ts +5 -0
- package/ui/Elements/SpaceAround/index.d.ts +5 -0
- package/ui/Elements/SpaceAround/index.js +6 -0
- package/ui/Elements/SpaceAround/index.js.map +1 -0
- package/ui/Elements/SpaceAround/types.d.ts +15 -0
- package/ui/Elements/Spinner/index.d.ts +5 -0
- package/ui/Elements/Spinner/index.js +6 -0
- package/ui/Elements/Spinner/index.js.map +1 -0
- package/ui/Elements/Spinner/types.d.ts +8 -0
- package/ui/Elements/Tag/index.d.ts +7 -0
- package/ui/Elements/Tag/index.js +6 -0
- package/ui/Elements/Tag/index.js.map +1 -0
- package/ui/Elements/Tag/types.d.ts +18 -0
- package/ui/Elements/Text/types.d.ts +14 -0
- package/ui/Elements/Toast/Toast.d.ts +12 -0
- package/ui/Elements/Toast/index.d.ts +5 -0
- package/ui/Elements/Toast/index.js +6 -0
- package/ui/Elements/Toast/index.js.map +1 -0
- package/ui/Elements/Toggle/index.d.ts +5 -0
- package/ui/Elements/Toggle/index.js +6 -0
- package/ui/Elements/Toggle/index.js.map +1 -0
- package/ui/Elements/Toggle/types.d.ts +23 -0
- package/ui/Elements/Typography/index.d.ts +19 -0
- package/ui/Elements/Typography/index.js +7 -0
- package/ui/Elements/Typography/index.js.map +1 -0
- package/ui/Forms/Checkbox/index.d.ts +5 -0
- package/ui/Forms/Checkbox/index.js +6 -0
- package/ui/Forms/Checkbox/index.js.map +1 -0
- package/ui/Forms/Checkbox/types.d.ts +19 -0
- package/ui/Forms/Input/index.d.ts +5 -0
- package/ui/Forms/Input/index.js +6 -0
- package/ui/Forms/Input/index.js.map +1 -0
- package/ui/Forms/Input/types.d.ts +49 -0
- package/ui/Forms/RadioButton/index.d.ts +5 -0
- package/ui/Forms/RadioButton/index.js +6 -0
- package/ui/Forms/RadioButton/index.js.map +1 -0
- package/ui/Forms/RadioButton/types.d.ts +15 -0
- package/ui/ThemeProvider/index.d.ts +8 -0
- package/ui/ThemeProvider/index.js +6 -0
- package/ui/ThemeProvider/index.js.map +1 -0
- package/ui/ThemeProvider/types.d.ts +53 -0
- package/ui/dts/Blocks/CornerDialog/index.d.ts +2 -1
- package/ui/dts/Blocks/ImageList/index.d.ts +2 -1
- package/ui/dts/Blocks/LightBox/index.d.ts +2 -1
- package/ui/dts/Blocks/Modal/index.d.ts +2 -1
- package/ui/dts/Blocks/Tabs/index.d.ts +2 -0
- package/ui/dts/Elements/Alert/index.d.ts +1 -0
- package/ui/dts/Elements/Alert/types.d.ts +2 -2
- package/ui/dts/Elements/Avatar/index.d.ts +2 -0
- package/ui/dts/Elements/Badge/index.d.ts +1 -0
- package/ui/dts/Elements/BorderedBox/BorderedBox.d.ts +2 -2
- package/ui/dts/Elements/BorderedBox/index.d.ts +1 -0
- package/ui/dts/Elements/BorderedBox/stories/BorderedBox.stories.d.ts +1 -1
- package/ui/dts/Elements/BorderedBox/types.d.ts +1 -1
- package/ui/dts/Elements/Button/index.d.ts +1 -0
- package/ui/dts/Elements/Card/index.d.ts +2 -0
- package/ui/dts/Elements/Dropdown/index.d.ts +1 -0
- package/ui/dts/Elements/ErrorMessage/index.d.ts +1 -0
- package/ui/dts/Elements/Icon/index.d.ts +1 -0
- package/ui/dts/Elements/Image/index.d.ts +1 -0
- package/ui/dts/Elements/Label/index.d.ts +2 -0
- package/ui/dts/Elements/Line/index.d.ts +1 -0
- package/ui/dts/Elements/Link/index.d.ts +1 -0
- package/ui/dts/Elements/Logo/index.d.ts +1 -0
- package/ui/dts/Elements/Pagination/index.d.ts +1 -0
- package/ui/dts/Elements/Paragraph/index.d.ts +1 -0
- package/ui/dts/Elements/Portal/index.d.ts +1 -0
- package/ui/dts/Elements/ProgressBar/index.d.ts +1 -0
- package/ui/dts/Elements/SimpleLink/index.d.ts +1 -0
- package/ui/dts/Elements/SpaceAround/index.d.ts +1 -0
- package/ui/dts/Elements/Spinner/index.d.ts +1 -0
- package/ui/dts/Elements/Tag/index.d.ts +1 -0
- package/ui/dts/Elements/Tag/types.d.ts +1 -0
- package/ui/dts/Elements/Toast/index.d.ts +1 -0
- package/ui/dts/Elements/Toggle/index.d.ts +1 -0
- package/ui/dts/Elements/Typography/index.d.ts +2 -0
- package/ui/dts/Forms/Checkbox/index.d.ts +1 -0
- package/ui/dts/Forms/Input/index.d.ts +1 -0
- package/ui/dts/Forms/RadioButton/index.d.ts +1 -0
- package/ui/dts/ThemeProvider/index.d.ts +1 -0
- package/ui/dts/index.d.ts +36 -0
- package/ui/dts/utils/index.d.ts +5 -0
- package/ui/index.d.ts +50 -0
- package/ui/index.js +4 -3
- package/ui/index.js.map +1 -1
- package/ui/utils/CreateRgba/types.d.ts +3 -0
- package/ui/utils/KeyPress/types.d.ts +7 -0
- package/ui/utils/index.d.ts +10 -0
- package/ui/utils/index.js +10 -0
- package/ui/utils/index.js.map +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mailstep/design-system",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./ui/index.js",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"storybook": "storybook dev -p 6006",
|
|
14
14
|
"build": "rm -rf ./build && rollup -c && cp package.json build",
|
|
15
15
|
"build-storybook": "storybook build",
|
|
16
|
-
"
|
|
16
|
+
"deploy": "npm run build && npm publish ./build",
|
|
17
17
|
"dev": "yarn storybook",
|
|
18
18
|
"test": "echo \"The tests are still waiting to be written, but it seems like they're really good at procrastinating!\""
|
|
19
19
|
},
|
|
@@ -28,7 +28,6 @@
|
|
|
28
28
|
"@fortawesome/pro-regular-svg-icons": "^6.0.0",
|
|
29
29
|
"@fortawesome/pro-solid-svg-icons": "^6.3.0",
|
|
30
30
|
"@fortawesome/react-fontawesome": "^0.2.0",
|
|
31
|
-
"@rollup/plugin-alias": "^5.0.1",
|
|
32
31
|
"@rollup/plugin-commonjs": "^25.0.0",
|
|
33
32
|
"@rollup/plugin-image": "^3.0.3",
|
|
34
33
|
"@rollup/plugin-node-resolve": "^15.0.2",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactChild } from 'react';
|
|
2
|
+
|
|
3
|
+
type Intent = 'success' | 'error' | 'warning' | 'info';
|
|
4
|
+
interface CornerDialogProps {
|
|
5
|
+
title: JSX.Element | string;
|
|
6
|
+
children: ReactChild;
|
|
7
|
+
icon?: string;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
isOpen?: boolean;
|
|
10
|
+
intent?: Intent;
|
|
11
|
+
statusToTitle: Record<Intent, () => string>;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { CornerDialogProps, Intent };
|
|
@@ -14,11 +14,10 @@ var ImageList = function (_a) {
|
|
|
14
14
|
var ref = useRef();
|
|
15
15
|
var events = useDraggable(ref, { isMounted: !!(images === null || images === void 0 ? void 0 : images.length) }).events;
|
|
16
16
|
var _b = useLightBox(), isLightBoxOpen = _b.isLightBoxOpen, onCloseLightBox = _b.onCloseLightBox, onOpenLightBox = _b.onOpenLightBox, lightBoxData = _b.lightBoxData;
|
|
17
|
-
return (jsxs(x.div, { display: "flex", alignItems: "flex-end", children: [jsx(AddPhoto, { onImageUpload: onImageUpload }), images &&
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}) })), jsx(LightBox, { initialSlide: lightBoxData === null || lightBoxData === void 0 ? void 0 : lightBoxData.initialSlide, isLightBoxOpen: isLightBoxOpen, onCloseLightBox: onCloseLightBox, lightBoxAction: lightBoxAction, lightBoxActionTitle: lightBoxActionTitle, images: images })] }));
|
|
17
|
+
return (jsxs(x.div, { display: "flex", alignItems: "flex-end", children: [jsx(AddPhoto, { onImageUpload: onImageUpload }), images && (jsx(ImageListContainer, __assign({ ref: ref }, events, { children: images.map(function (item, index) {
|
|
18
|
+
var _a, _b;
|
|
19
|
+
return (jsx(ImageElement, { imageUrl: (_a = item.smallUrl) !== null && _a !== void 0 ? _a : item.url, onImageRemove: onImageRemove === null || onImageRemove === void 0 ? void 0 : onImageRemove(item.id), onOpenLightBox: onOpenLightBox(index) }, (_b = item.id) !== null && _b !== void 0 ? _b : index));
|
|
20
|
+
}) }))), jsx(LightBox, { initialSlide: lightBoxData === null || lightBoxData === void 0 ? void 0 : lightBoxData.initialSlide, isLightBoxOpen: isLightBoxOpen, onCloseLightBox: onCloseLightBox, lightBoxAction: lightBoxAction, lightBoxActionTitle: lightBoxActionTitle, images: images })] }));
|
|
22
21
|
};
|
|
23
22
|
|
|
24
23
|
export { ImageList };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageList.js","sources":["../../../../packages/ui/Blocks/ImageList/ImageList.tsx"],"sourcesContent":["import { __assign } from \"tslib\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useRef } from 'react';\nimport { useDraggable } from 'react-use-draggable-scroll';\nimport
|
|
1
|
+
{"version":3,"file":"ImageList.js","sources":["../../../../packages/ui/Blocks/ImageList/ImageList.tsx"],"sourcesContent":["import { __assign } from \"tslib\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useRef } from 'react';\nimport { useDraggable } from 'react-use-draggable-scroll';\nimport LightBox, { useLightBox } from '../LightBox';\nimport { AddPhoto } from './components/AddPhoto';\nimport { ImageElement } from './components/ImageElement';\nimport { x } from '@xstyled/styled-components';\nimport { ImageListContainer } from './styles';\nexport var ImageList = function (_a) {\n var onImageUpload = _a.onImageUpload, onImageRemove = _a.onImageRemove, lightBoxAction = _a.lightBoxAction, lightBoxActionTitle = _a.lightBoxActionTitle, images = _a.images;\n var ref = useRef();\n var events = useDraggable(ref, { isMounted: !!(images === null || images === void 0 ? void 0 : images.length) }).events;\n var _b = useLightBox(), isLightBoxOpen = _b.isLightBoxOpen, onCloseLightBox = _b.onCloseLightBox, onOpenLightBox = _b.onOpenLightBox, lightBoxData = _b.lightBoxData;\n return (_jsxs(x.div, { display: \"flex\", alignItems: \"flex-end\", children: [_jsx(AddPhoto, { onImageUpload: onImageUpload }), images && (_jsx(ImageListContainer, __assign({ ref: ref }, events, { children: images.map(function (item, index) {\n var _a, _b;\n return (_jsx(ImageElement, { imageUrl: (_a = item.smallUrl) !== null && _a !== void 0 ? _a : item.url, onImageRemove: onImageRemove === null || onImageRemove === void 0 ? void 0 : onImageRemove(item.id), onOpenLightBox: onOpenLightBox(index) }, (_b = item.id) !== null && _b !== void 0 ? _b : index));\n }) }))), _jsx(LightBox, { initialSlide: lightBoxData === null || lightBoxData === void 0 ? void 0 : lightBoxData.initialSlide, isLightBoxOpen: isLightBoxOpen, onCloseLightBox: onCloseLightBox, lightBoxAction: lightBoxAction, lightBoxActionTitle: lightBoxActionTitle, images: images })] }));\n};\n//# sourceMappingURL=ImageList.js.map"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;;AASU,IAAC,SAAS,GAAG,UAAU,EAAE,EAAE;AACrC,IAAI,IAAI,aAAa,GAAG,EAAE,CAAC,aAAa,EAAE,aAAa,GAAG,EAAE,CAAC,aAAa,EAAE,cAAc,GAAG,EAAE,CAAC,cAAc,EAAE,mBAAmB,GAAG,EAAE,CAAC,mBAAmB,EAAE,MAAM,GAAG,EAAE,CAAC,MAAM,CAAC;AACjL,IAAI,IAAI,GAAG,GAAG,MAAM,EAAE,CAAC;AACvB,IAAI,IAAI,MAAM,GAAG,YAAY,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC;AAC5H,IAAI,IAAI,EAAE,GAAG,WAAW,EAAE,EAAE,cAAc,GAAG,EAAE,CAAC,cAAc,EAAE,eAAe,GAAG,EAAE,CAAC,eAAe,EAAE,cAAc,GAAG,EAAE,CAAC,cAAc,EAAE,YAAY,GAAG,EAAE,CAAC,YAAY,CAAC;AACzK,IAAI,QAAQA,IAAK,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,CAACC,GAAI,CAAC,QAAQ,EAAE,EAAE,aAAa,EAAE,aAAa,EAAE,C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|
|
3
|
+
interface ImageUploadProps {
|
|
4
|
+
base64?: string;
|
|
5
|
+
file?: File;
|
|
6
|
+
}
|
|
7
|
+
interface ImageListProps {
|
|
8
|
+
images: ImageData[] | undefined;
|
|
9
|
+
onImageUpload?: (props: ImageUploadProps) => Promise<void>;
|
|
10
|
+
onImageRemove?: (id?: string) => () => void;
|
|
11
|
+
lightBoxAction?: (id?: string) => () => Promise<void>;
|
|
12
|
+
lightBoxActionTitle?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { ImageListProps, ImageUploadProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LightBox.js","sources":["../../../../packages/ui/Blocks/LightBox/LightBox.tsx"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Button } from '../../Elements/Button';\nimport
|
|
1
|
+
{"version":3,"file":"LightBox.js","sources":["../../../../packages/ui/Blocks/LightBox/LightBox.tsx"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Button } from '../../Elements/Button';\nimport Modal from '../Modal';\nimport 'swiper/css';\nimport { Swiper, SwiperSlide } from 'swiper/react';\nimport { Container, Image, ButtonContainer } from './styles';\nexport var LightBox = function (_a) {\n var isLightBoxOpen = _a.isLightBoxOpen, onCloseLightBox = _a.onCloseLightBox, lightBoxAction = _a.lightBoxAction, lightBoxActionTitle = _a.lightBoxActionTitle, images = _a.images, _b = _a.initialSlide, initialSlide = _b === void 0 ? 0 : _b;\n if (!(images === null || images === void 0 ? void 0 : images.length))\n return null;\n return (_jsx(Modal, { isShown: isLightBoxOpen, onClose: onCloseLightBox, mobileFullscreen: true, miniCloseBtn: true, withCloseIcon: true, children: _jsx(Swiper, { initialSlide: initialSlide, slidesPerView: 1, autoHeight: true, children: images.map(function (item) {\n var _a;\n return (_jsx(SwiperSlide, { children: _jsxs(Container, { children: [_jsx(Image, { src: (_a = item.originalUrl) !== null && _a !== void 0 ? _a : item.url, loading: \"lazy\", alt: \"\" }), !!item.withLightBoxAction && lightBoxAction && lightBoxActionTitle && (_jsx(ButtonContainer, { children: _jsx(Button, { onClick: lightBoxAction(item.id), appearance: \"primaryLight\", children: lightBoxActionTitle }) }))] }) }, item.id));\n }) }) }));\n};\n//# sourceMappingURL=LightBox.js.map"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;AAMU,IAAC,QAAQ,GAAG,UAAU,EAAE,EAAE;AACpC,IAAI,IAAI,cAAc,GAAG,EAAE,CAAC,cAAc,EAAE,eAAe,GAAG,EAAE,CAAC,eAAe,EAAE,cAAc,GAAG,EAAE,CAAC,cAAc,EAAE,mBAAmB,GAAG,EAAE,CAAC,mBAAmB,EAAE,MAAM,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,GAAG,EAAE,CAAC,YAAY,EAAE,YAAY,GAAG,EAAE,KAAK,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;AACpP,IAAI,IAAI,EAAE,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC;AACxE,QAAQ,OAAO,IAAI,CAAC;AACpB,IAAI,QAAQA,GAAI,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,EAAEA,GAAI,CAAC,MAAM,EAAE,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC,UAAU,IAAI,EAAE;AAC5Q,gBAAgB,IAAI,EAAE,CAAC;AACvB,gBAAgB,QAAQA,GAAI,CAAC,WAAW,EAAE,EAAE,QAAQ,EAAEC,IAAK,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,CAACD,GAAI,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,IAAI,CAAC,WAAW,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,kBAAkB,IAAI,cAAc,IAAI,mBAAmB,KAAKA,GAAI,CAAC,eAAe,EAAE,EAAE,QAAQ,EAAEA,GAAI,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,UAAU,EAAE,cAAc,EAAE,QAAQ,EAAE,mBAAmB,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC,EAAE;AACnb,aAAa,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;AACtB;;;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { LightBoxProps, UseLightBoxHookType } from './types.js';
|
|
3
|
+
export { ImageData } from './types.js';
|
|
4
|
+
|
|
5
|
+
declare const LightBox: FC<LightBoxProps>
|
|
6
|
+
declare const useLightBox: UseLightBoxHookType
|
|
7
|
+
|
|
8
|
+
export { LightBox, LightBox as default, useLightBox };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
interface LightBoxData {
|
|
2
|
+
initialSlide: number;
|
|
3
|
+
}
|
|
4
|
+
type UseLightBoxHookType = () => {
|
|
5
|
+
onOpenLightBox: (index?: number) => () => void;
|
|
6
|
+
onCloseLightBox: () => void;
|
|
7
|
+
isLightBoxOpen: boolean;
|
|
8
|
+
lightBoxData?: LightBoxData;
|
|
9
|
+
};
|
|
10
|
+
interface ImageData {
|
|
11
|
+
id: string;
|
|
12
|
+
url?: string;
|
|
13
|
+
smallUrl?: string;
|
|
14
|
+
originalUrl?: string;
|
|
15
|
+
withLightBoxAction?: boolean;
|
|
16
|
+
}
|
|
17
|
+
interface LightBoxProps {
|
|
18
|
+
images: ImageData[] | undefined;
|
|
19
|
+
isLightBoxOpen: boolean;
|
|
20
|
+
onCloseLightBox: () => void;
|
|
21
|
+
lightBoxAction?: (id?: string) => () => Promise<void>;
|
|
22
|
+
lightBoxActionTitle?: string;
|
|
23
|
+
initialSlide?: number;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { ImageData, LightBoxData, LightBoxProps, UseLightBoxHookType };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC, RefObject } from 'react';
|
|
2
|
+
import { ModalProps, UseClickOutsideProps, ModalData, ControlProps } from './types.js';
|
|
3
|
+
|
|
4
|
+
declare const Modal: FC<ModalProps>
|
|
5
|
+
declare const useClickOutside: (props: UseClickOutsideProps) => RefObject<HTMLDivElement>
|
|
6
|
+
declare const useModal: <T = ModalData>(initialValue?: T) => ControlProps<T>
|
|
7
|
+
|
|
8
|
+
export { ControlProps, Modal, ModalData, ModalProps, Modal as default, useClickOutside, useModal };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { MutableRefObject } from 'react';
|
|
2
|
+
|
|
3
|
+
type TopSpace = 'default' | 'medium';
|
|
4
|
+
type Width = 'wide' | 'mediumLarge' | 'medium' | 'narrow' | 'auto';
|
|
5
|
+
interface ModalProps {
|
|
6
|
+
isShown?: boolean;
|
|
7
|
+
children: JSX.Element | JSX.Element[];
|
|
8
|
+
title?: JSX.Element | string;
|
|
9
|
+
titleIcon?: JSX.Element | string;
|
|
10
|
+
onConfirm?: (close: () => void) => void;
|
|
11
|
+
onCancel?: () => void;
|
|
12
|
+
onClose?: () => void;
|
|
13
|
+
confirmLabel?: JSX.Element | string;
|
|
14
|
+
cancelLabel?: JSX.Element | string;
|
|
15
|
+
isLoading?: boolean;
|
|
16
|
+
isConfirmDisabled?: boolean;
|
|
17
|
+
hasFooter?: boolean;
|
|
18
|
+
hasHeader?: boolean;
|
|
19
|
+
width?: Width;
|
|
20
|
+
whiteBg?: boolean;
|
|
21
|
+
miniCloseBtn?: boolean;
|
|
22
|
+
ignoreClickOutside?: boolean;
|
|
23
|
+
closeEverywhere?: boolean;
|
|
24
|
+
withCloseIcon?: boolean;
|
|
25
|
+
overlayColor?: string;
|
|
26
|
+
minWidth?: string;
|
|
27
|
+
minHeight?: string;
|
|
28
|
+
maxWidth?: string;
|
|
29
|
+
maxHeight?: string;
|
|
30
|
+
topSpace?: TopSpace;
|
|
31
|
+
mobileFullscreen?: boolean;
|
|
32
|
+
}
|
|
33
|
+
type ModalData = Record<string, any>;
|
|
34
|
+
type ControlProps<T = ModalData> = {
|
|
35
|
+
isOpen: boolean;
|
|
36
|
+
onClose: () => void;
|
|
37
|
+
onOpen: (data?: T) => void;
|
|
38
|
+
data?: T;
|
|
39
|
+
};
|
|
40
|
+
interface UseClickOutsideProps {
|
|
41
|
+
onClose?: () => void;
|
|
42
|
+
ignoreClickOutside?: boolean;
|
|
43
|
+
parentRef?: MutableRefObject<HTMLDivElement | null | undefined>;
|
|
44
|
+
closeCurrent?: boolean;
|
|
45
|
+
allowScrollbarClick?: boolean;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { ControlProps, ModalData, ModalProps, TopSpace, UseClickOutsideProps, Width };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TabsProps, UseTabsHook, TabContentProps } from './types.js';
|
|
2
|
+
export { TabDefinition } from './types.js';
|
|
3
|
+
|
|
4
|
+
declare const Tabs: (props: TabsProps) => JSX.Element | null
|
|
5
|
+
declare const useTabs: UseTabsHook
|
|
6
|
+
declare const TabContent: (props: TabContentProps) => React.ReactNode | React.ReactNode[]
|
|
7
|
+
|
|
8
|
+
export { TabContent, Tabs, Tabs as default, useTabs };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type TabDefinition = {
|
|
2
|
+
label: string;
|
|
3
|
+
icon?: string;
|
|
4
|
+
badgeCount?: number;
|
|
5
|
+
default?: true;
|
|
6
|
+
};
|
|
7
|
+
type TabsProps = {
|
|
8
|
+
tabsDefinition: TabDefinition[];
|
|
9
|
+
activeTab: number;
|
|
10
|
+
onTabSwitch: (tab: number) => void;
|
|
11
|
+
};
|
|
12
|
+
type UseTabsHook = (tabDefinitions: TabDefinition[]) => {
|
|
13
|
+
activeTab: number;
|
|
14
|
+
onTabSwitch: (tab: number) => void;
|
|
15
|
+
};
|
|
16
|
+
type TabContentProps = {
|
|
17
|
+
activeTab: number;
|
|
18
|
+
value: number;
|
|
19
|
+
children: React.ReactNode | React.ReactNode[];
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { TabContentProps, TabDefinition, TabsProps, UseTabsHook };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
type AlertProps = {
|
|
2
|
+
intent?: 'success' | 'info' | 'warning' | 'danger';
|
|
3
|
+
inline?: boolean;
|
|
4
|
+
onClick?: () => void;
|
|
5
|
+
onClose?: () => void;
|
|
6
|
+
title?: string;
|
|
7
|
+
text?: string;
|
|
8
|
+
closeAnywhere?: boolean;
|
|
9
|
+
href?: string;
|
|
10
|
+
actionLabel?: React.ReactElement | string;
|
|
11
|
+
actionType?: 'link' | 'button';
|
|
12
|
+
desc?: string;
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
};
|
|
15
|
+
interface IAlert {
|
|
16
|
+
(props: AlertProps): JSX.Element;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { AlertProps, IAlert };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
type SizingValue = 'icon' | 'iconLg' | 'normal' | 'large' | 'grid';
|
|
2
|
+
type AppearanceValue = 'primary' | 'primaryLight' | 'secondary' | 'primaryLg' | 'secondaryLg' | 'minimal' | 'minimalRed' | 'success';
|
|
3
|
+
type Props = React.HTMLProps<HTMLButtonElement> & {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
appearance?: AppearanceValue;
|
|
7
|
+
buttonRef?: any;
|
|
8
|
+
sizing?: SizingValue;
|
|
9
|
+
isLoading?: boolean;
|
|
10
|
+
name?: string;
|
|
11
|
+
as?: string | React.ComponentType;
|
|
12
|
+
loadingText?: string | JSX.Element;
|
|
13
|
+
columnAlign?: boolean;
|
|
14
|
+
icon?: string | JSX.Element;
|
|
15
|
+
type?: 'button' | 'submit' | 'reset';
|
|
16
|
+
fullWidth?: boolean;
|
|
17
|
+
mt?: string | number;
|
|
18
|
+
mr?: string | number;
|
|
19
|
+
mb?: string | number;
|
|
20
|
+
ml?: string | number;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { AppearanceValue, Props, SizingValue };
|
package/ui/Elements/Card/Card.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __rest, __assign } from 'tslib';
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { useTheme, th } from '@xstyled/styled-components';
|
|
4
|
-
import {
|
|
4
|
+
import { StyledBody, ImageWrapper, StyledImage, CardWrapper, StyledCard } from './styles.js';
|
|
5
5
|
|
|
6
6
|
var Card = function (_a) {
|
|
7
7
|
var children = _a.children, block = _a.block, _b = _a.hasBorder, hasBorder = _b === void 0 ? true : _b, backgroundColor = _a.backgroundColor, rest = __rest(_a, ["children", "block", "hasBorder", "backgroundColor"]);
|
|
@@ -17,6 +17,10 @@ var CardImage = function (_a) {
|
|
|
17
17
|
var themeColor = th.color(color)({ theme: theme });
|
|
18
18
|
return (jsx(ImageWrapper, { color: themeColor, children: jsx(StyledImage, __assign({}, rest, { children: children })) }));
|
|
19
19
|
};
|
|
20
|
+
var CardComponent = function (_a) {
|
|
21
|
+
var img = _a.img, body = _a.body, children = _a.children, color = _a.color;
|
|
22
|
+
return (jsxs(Card, { children: [img && (jsx(CardImage, { color: color, children: jsx("img", { src: img, width: "300" }) })), jsxs(CardBody, { children: [body, children] })] }));
|
|
23
|
+
};
|
|
20
24
|
|
|
21
|
-
export { Card, CardBody, CardImage };
|
|
25
|
+
export { Card, CardBody, CardImage, CardComponent as default };
|
|
22
26
|
//# sourceMappingURL=Card.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.js","sources":["../../../../packages/ui/Elements/Card/Card.tsx"],"sourcesContent":["import { __assign, __rest } from \"tslib\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { th } from '@xstyled/styled-components';\nimport { useTheme } from '@xstyled/styled-components';\nimport { StyledCard, CardWrapper, StyledBody, ImageWrapper, StyledImage } from './styles';\nexport var Card = function (_a) {\n var children = _a.children, block = _a.block, _b = _a.hasBorder, hasBorder = _b === void 0 ? true : _b, backgroundColor = _a.backgroundColor, rest = __rest(_a, [\"children\", \"block\", \"hasBorder\", \"backgroundColor\"]);\n return (_jsx(CardWrapper, { block: block, children: _jsx(StyledCard, __assign({ block: block, hasBorder: hasBorder, backgroundColor: backgroundColor }, rest, { children: children })) }));\n};\nexport var CardBody = function (_a) {\n var children = _a.children, rest = __rest(_a, [\"children\"]);\n return _jsx(StyledBody, __assign({}, rest, { children: children }));\n};\nexport var CardImage = function (_a) {\n var children = _a.children, _b = _a.color, color = _b === void 0 ? 'white' : _b, rest = __rest(_a, [\"children\", \"color\"]);\n var theme = useTheme();\n var themeColor = th.color(color)({ theme: theme });\n return (_jsx(ImageWrapper, { color: themeColor, children: _jsx(StyledImage, __assign({}, rest, { children: children })) }));\n};\nvar CardComponent = function (_a) {\n var img = _a.img, body = _a.body, children = _a.children, color = _a.color;\n return (_jsxs(Card, { children: [img && (_jsx(CardImage, { color: color, children: _jsx(\"img\", { src: img, width: \"300\" }) })), _jsxs(CardBody, { children: [body, children] })] }));\n};\nexport default CardComponent;\n//# sourceMappingURL=Card.js.map"],"names":["_jsx"],"mappings":";;;;;AAKU,IAAC,IAAI,GAAG,UAAU,EAAE,EAAE;AAChC,IAAI,IAAI,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,KAAK,GAAG,EAAE,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,CAAC,SAAS,EAAE,SAAS,GAAG,EAAE,KAAK,KAAK,CAAC,GAAG,IAAI,GAAG,EAAE,EAAE,eAAe,GAAG,EAAE,CAAC,eAAe,EAAE,IAAI,GAAG,MAAM,CAAC,EAAE,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,iBAAiB,CAAC,CAAC,CAAC;AAC3N,IAAI,QAAQA,GAAI,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAEA,GAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,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sx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { th } from '@xstyled/styled-components';\nimport { useTheme } from '@xstyled/styled-components';\nimport { StyledCard, CardWrapper, StyledBody, ImageWrapper, StyledImage } from './styles';\nexport var Card = function (_a) {\n var children = _a.children, block = _a.block, _b = _a.hasBorder, hasBorder = _b === void 0 ? true : _b, backgroundColor = _a.backgroundColor, rest = __rest(_a, [\"children\", \"block\", \"hasBorder\", \"backgroundColor\"]);\n return (_jsx(CardWrapper, { block: block, children: _jsx(StyledCard, __assign({ block: block, hasBorder: hasBorder, backgroundColor: backgroundColor }, rest, { children: children })) }));\n};\nexport var CardBody = function (_a) {\n var children = _a.children, rest = __rest(_a, [\"children\"]);\n return _jsx(StyledBody, __assign({}, rest, { children: children }));\n};\nexport var CardImage = function (_a) {\n var children = _a.children, _b = _a.color, color = _b === void 0 ? 'white' : _b, rest = __rest(_a, [\"children\", \"color\"]);\n var theme = useTheme();\n var themeColor = th.color(color)({ theme: theme });\n return (_jsx(ImageWrapper, { color: themeColor, children: _jsx(StyledImage, __assign({}, rest, { children: children })) }));\n};\nvar CardComponent = function (_a) {\n var img = _a.img, body = _a.body, children = _a.children, color = _a.color;\n return (_jsxs(Card, { children: [img && (_jsx(CardImage, { color: color, children: _jsx(\"img\", { src: img, width: \"300\" }) })), _jsxs(CardBody, { children: [body, children] })] }));\n};\nexport default CardComponent;\n//# sourceMappingURL=Card.js.map"],"names":["_jsx","_jsxs"],"mappings":";;;;;AAKU,IAAC,IAAI,GAAG,UAAU,EAAE,EAAE;AAChC,IAAI,IAAI,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,KAAK,GAAG,EAAE,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,CAAC,SAAS,EAAE,SAAS,GAAG,EAAE,KAAK,KAAK,CAAC,GAAG,IAAI,GAAG,EAAE,EAAE,eAAe,GAAG,EAAE,CAAC,eAAe,EAAE,IAAI,GAAG,MAAM,CAAC,EAAE,EAAE,CAAC,UAAU,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C,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE;AAChI,EAAE;AACC,IAAC,aAAa,GAAG,UAAU,EAAE,EAAE;AAClC,IAAI,IAAI,GAAG,GAAG,EAAE,CAAC,GAAG,EAAE,IAAI,GAAG,EAAE,CAAC,IAAI,EAAE,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,KAAK,GAAG,EAAE,CAAC,KAAK,CAAC;AAC/E,IAAI,QAAQC,IAAK,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,GAAG,KAAKD,GAAI,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAEA,GAAI,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,EAAEC,IAAK,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE;AACzL;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as styled_components from 'styled-components';
|
|
2
|
+
import * as _xstyled_system from '@xstyled/system';
|
|
3
|
+
|
|
4
|
+
declare const StyledCard: styled_components.StyledComponent<"div", _xstyled_system.Theme, {
|
|
5
|
+
block?: boolean | undefined;
|
|
6
|
+
hasBorder?: boolean | undefined;
|
|
7
|
+
shadow?: boolean | undefined;
|
|
8
|
+
p?: string | undefined;
|
|
9
|
+
backgroundColor?: string | undefined;
|
|
10
|
+
}, never>;
|
|
11
|
+
|
|
12
|
+
export { StyledCard };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
|
|
3
|
+
type DropdownProps = {
|
|
4
|
+
show?: boolean;
|
|
5
|
+
className?: string;
|
|
6
|
+
wrapRef?: RefObject<HTMLElement>;
|
|
7
|
+
showArrow?: boolean;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
verticalShift?: boolean;
|
|
10
|
+
customDropdownPosition?: any;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export { DropdownProps };
|