@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.
Files changed (194) hide show
  1. package/package.json +2 -3
  2. package/ui/Blocks/CornerDialog/index.d.ts +6 -0
  3. package/ui/Blocks/CornerDialog/index.js +6 -0
  4. package/ui/Blocks/CornerDialog/index.js.map +1 -0
  5. package/ui/Blocks/CornerDialog/types.d.ts +14 -0
  6. package/ui/Blocks/ImageList/ImageList.js +4 -5
  7. package/ui/Blocks/ImageList/ImageList.js.map +1 -1
  8. package/ui/Blocks/ImageList/index.d.ts +7 -0
  9. package/ui/Blocks/ImageList/index.js +6 -0
  10. package/ui/Blocks/ImageList/index.js.map +1 -0
  11. package/ui/Blocks/ImageList/types.d.ts +15 -0
  12. package/ui/Blocks/LightBox/LightBox.js.map +1 -1
  13. package/ui/Blocks/LightBox/index.d.ts +8 -0
  14. package/ui/Blocks/LightBox/index.js +8 -0
  15. package/ui/Blocks/LightBox/index.js.map +1 -0
  16. package/ui/Blocks/LightBox/types.d.ts +26 -0
  17. package/ui/Blocks/Modal/index.d.ts +8 -0
  18. package/ui/Blocks/Modal/index.js +7 -0
  19. package/ui/Blocks/Modal/index.js.map +1 -0
  20. package/ui/Blocks/Modal/types.d.ts +48 -0
  21. package/ui/Blocks/Tabs/index.d.ts +8 -0
  22. package/ui/Blocks/Tabs/index.js +7 -0
  23. package/ui/Blocks/Tabs/index.js.map +1 -0
  24. package/ui/Blocks/Tabs/types.d.ts +22 -0
  25. package/ui/Elements/Alert/index.d.ts +6 -0
  26. package/ui/Elements/Alert/index.js +6 -0
  27. package/ui/Elements/Alert/index.js.map +1 -0
  28. package/ui/Elements/Alert/types.d.ts +19 -0
  29. package/ui/Elements/Avatar/index.d.ts +5 -0
  30. package/ui/Elements/Avatar/index.js +6 -0
  31. package/ui/Elements/Avatar/index.js.map +1 -0
  32. package/ui/Elements/Avatar/types.d.ts +10 -0
  33. package/ui/Elements/Badge/Badge.d.ts +11 -0
  34. package/ui/Elements/Badge/index.d.ts +5 -0
  35. package/ui/Elements/Badge/index.js +6 -0
  36. package/ui/Elements/Badge/index.js.map +1 -0
  37. package/ui/Elements/BorderedBox/index.d.ts +5 -0
  38. package/ui/Elements/BorderedBox/index.js +6 -0
  39. package/ui/Elements/BorderedBox/index.js.map +1 -0
  40. package/ui/Elements/BorderedBox/types.d.ts +7 -0
  41. package/ui/Elements/Button/index.d.ts +6 -0
  42. package/ui/Elements/Button/index.js +6 -0
  43. package/ui/Elements/Button/index.js.map +1 -0
  44. package/ui/Elements/Button/types.d.ts +23 -0
  45. package/ui/Elements/Card/Card.js +7 -3
  46. package/ui/Elements/Card/Card.js.map +1 -1
  47. package/ui/Elements/Card/index.d.ts +7 -0
  48. package/ui/Elements/Card/index.js +7 -0
  49. package/ui/Elements/Card/index.js.map +1 -0
  50. package/ui/Elements/Card/styles.d.ts +12 -0
  51. package/ui/Elements/Card/types.d.ts +10 -0
  52. package/ui/Elements/Dropdown/Dropdown.d.ts +5 -0
  53. package/ui/Elements/Dropdown/index.d.ts +5 -0
  54. package/ui/Elements/Dropdown/index.js +6 -0
  55. package/ui/Elements/Dropdown/index.js.map +1 -0
  56. package/ui/Elements/Dropdown/types.d.ts +13 -0
  57. package/ui/Elements/ErrorMessage/index.d.ts +5 -0
  58. package/ui/Elements/ErrorMessage/index.js +6 -0
  59. package/ui/Elements/ErrorMessage/index.js.map +1 -0
  60. package/ui/Elements/ErrorMessage/types.d.ts +8 -0
  61. package/ui/Elements/Icon/index.d.ts +8 -0
  62. package/ui/Elements/Icon/index.js +9 -0
  63. package/ui/Elements/Icon/index.js.map +1 -0
  64. package/ui/Elements/Icon/types.d.ts +25 -0
  65. package/ui/Elements/Image/Image.d.ts +5 -0
  66. package/ui/Elements/Image/index.d.ts +5 -0
  67. package/ui/Elements/Image/index.js +6 -0
  68. package/ui/Elements/Image/index.js.map +1 -0
  69. package/ui/Elements/Image/types.d.ts +19 -0
  70. package/ui/Elements/Label/Label.d.ts +11 -0
  71. package/ui/Elements/Label/index.d.ts +6 -0
  72. package/ui/Elements/Label/index.js +7 -0
  73. package/ui/Elements/Label/index.js.map +1 -0
  74. package/ui/Elements/Line/index.d.ts +3 -0
  75. package/ui/Elements/Line/index.js +6 -0
  76. package/ui/Elements/Line/index.js.map +1 -0
  77. package/ui/Elements/Line/types.d.ts +13 -0
  78. package/ui/Elements/Link/Link.d.ts +31 -0
  79. package/ui/Elements/Link/index.d.ts +5 -0
  80. package/ui/Elements/Link/index.js +6 -0
  81. package/ui/Elements/Link/index.js.map +1 -0
  82. package/ui/Elements/Logo/index.d.ts +5 -0
  83. package/ui/Elements/Logo/index.js +6 -0
  84. package/ui/Elements/Logo/index.js.map +1 -0
  85. package/ui/Elements/Logo/types.d.ts +12 -0
  86. package/ui/Elements/Pagination/Pagination.d.ts +8 -0
  87. package/ui/Elements/Pagination/index.d.ts +5 -0
  88. package/ui/Elements/Pagination/index.js +6 -0
  89. package/ui/Elements/Pagination/index.js.map +1 -0
  90. package/ui/Elements/Paragraph/Paragraph.d.ts +5 -0
  91. package/ui/Elements/Paragraph/index.d.ts +5 -0
  92. package/ui/Elements/Paragraph/index.js +6 -0
  93. package/ui/Elements/Paragraph/index.js.map +1 -0
  94. package/ui/Elements/Portal/index.d.ts +7 -0
  95. package/ui/Elements/Portal/index.js +1 -1
  96. package/ui/Elements/Portal/index.js.map +1 -1
  97. package/ui/Elements/ProgressBar/ProgressBar.d.ts +10 -0
  98. package/ui/Elements/ProgressBar/index.d.ts +5 -0
  99. package/ui/Elements/ProgressBar/index.js +6 -0
  100. package/ui/Elements/ProgressBar/index.js.map +1 -0
  101. package/ui/Elements/SimpleLink/SimpleLink.d.ts +23 -0
  102. package/ui/Elements/SimpleLink/index.d.ts +5 -0
  103. package/ui/Elements/SimpleLink/index.js +6 -0
  104. package/ui/Elements/SimpleLink/index.js.map +1 -0
  105. package/ui/Elements/SpaceAround/SpaceAround.d.ts +5 -0
  106. package/ui/Elements/SpaceAround/index.d.ts +5 -0
  107. package/ui/Elements/SpaceAround/index.js +6 -0
  108. package/ui/Elements/SpaceAround/index.js.map +1 -0
  109. package/ui/Elements/SpaceAround/types.d.ts +15 -0
  110. package/ui/Elements/Spinner/index.d.ts +5 -0
  111. package/ui/Elements/Spinner/index.js +6 -0
  112. package/ui/Elements/Spinner/index.js.map +1 -0
  113. package/ui/Elements/Spinner/types.d.ts +8 -0
  114. package/ui/Elements/Tag/index.d.ts +7 -0
  115. package/ui/Elements/Tag/index.js +6 -0
  116. package/ui/Elements/Tag/index.js.map +1 -0
  117. package/ui/Elements/Tag/types.d.ts +18 -0
  118. package/ui/Elements/Text/types.d.ts +14 -0
  119. package/ui/Elements/Toast/Toast.d.ts +12 -0
  120. package/ui/Elements/Toast/index.d.ts +5 -0
  121. package/ui/Elements/Toast/index.js +6 -0
  122. package/ui/Elements/Toast/index.js.map +1 -0
  123. package/ui/Elements/Toggle/index.d.ts +5 -0
  124. package/ui/Elements/Toggle/index.js +6 -0
  125. package/ui/Elements/Toggle/index.js.map +1 -0
  126. package/ui/Elements/Toggle/types.d.ts +23 -0
  127. package/ui/Elements/Typography/index.d.ts +19 -0
  128. package/ui/Elements/Typography/index.js +7 -0
  129. package/ui/Elements/Typography/index.js.map +1 -0
  130. package/ui/Forms/Checkbox/index.d.ts +5 -0
  131. package/ui/Forms/Checkbox/index.js +6 -0
  132. package/ui/Forms/Checkbox/index.js.map +1 -0
  133. package/ui/Forms/Checkbox/types.d.ts +19 -0
  134. package/ui/Forms/Input/index.d.ts +5 -0
  135. package/ui/Forms/Input/index.js +6 -0
  136. package/ui/Forms/Input/index.js.map +1 -0
  137. package/ui/Forms/Input/types.d.ts +49 -0
  138. package/ui/Forms/RadioButton/index.d.ts +5 -0
  139. package/ui/Forms/RadioButton/index.js +6 -0
  140. package/ui/Forms/RadioButton/index.js.map +1 -0
  141. package/ui/Forms/RadioButton/types.d.ts +15 -0
  142. package/ui/ThemeProvider/index.d.ts +8 -0
  143. package/ui/ThemeProvider/index.js +6 -0
  144. package/ui/ThemeProvider/index.js.map +1 -0
  145. package/ui/ThemeProvider/types.d.ts +53 -0
  146. package/ui/dts/Blocks/CornerDialog/index.d.ts +2 -1
  147. package/ui/dts/Blocks/ImageList/index.d.ts +2 -1
  148. package/ui/dts/Blocks/LightBox/index.d.ts +2 -1
  149. package/ui/dts/Blocks/Modal/index.d.ts +2 -1
  150. package/ui/dts/Blocks/Tabs/index.d.ts +2 -0
  151. package/ui/dts/Elements/Alert/index.d.ts +1 -0
  152. package/ui/dts/Elements/Alert/types.d.ts +2 -2
  153. package/ui/dts/Elements/Avatar/index.d.ts +2 -0
  154. package/ui/dts/Elements/Badge/index.d.ts +1 -0
  155. package/ui/dts/Elements/BorderedBox/BorderedBox.d.ts +2 -2
  156. package/ui/dts/Elements/BorderedBox/index.d.ts +1 -0
  157. package/ui/dts/Elements/BorderedBox/stories/BorderedBox.stories.d.ts +1 -1
  158. package/ui/dts/Elements/BorderedBox/types.d.ts +1 -1
  159. package/ui/dts/Elements/Button/index.d.ts +1 -0
  160. package/ui/dts/Elements/Card/index.d.ts +2 -0
  161. package/ui/dts/Elements/Dropdown/index.d.ts +1 -0
  162. package/ui/dts/Elements/ErrorMessage/index.d.ts +1 -0
  163. package/ui/dts/Elements/Icon/index.d.ts +1 -0
  164. package/ui/dts/Elements/Image/index.d.ts +1 -0
  165. package/ui/dts/Elements/Label/index.d.ts +2 -0
  166. package/ui/dts/Elements/Line/index.d.ts +1 -0
  167. package/ui/dts/Elements/Link/index.d.ts +1 -0
  168. package/ui/dts/Elements/Logo/index.d.ts +1 -0
  169. package/ui/dts/Elements/Pagination/index.d.ts +1 -0
  170. package/ui/dts/Elements/Paragraph/index.d.ts +1 -0
  171. package/ui/dts/Elements/Portal/index.d.ts +1 -0
  172. package/ui/dts/Elements/ProgressBar/index.d.ts +1 -0
  173. package/ui/dts/Elements/SimpleLink/index.d.ts +1 -0
  174. package/ui/dts/Elements/SpaceAround/index.d.ts +1 -0
  175. package/ui/dts/Elements/Spinner/index.d.ts +1 -0
  176. package/ui/dts/Elements/Tag/index.d.ts +1 -0
  177. package/ui/dts/Elements/Tag/types.d.ts +1 -0
  178. package/ui/dts/Elements/Toast/index.d.ts +1 -0
  179. package/ui/dts/Elements/Toggle/index.d.ts +1 -0
  180. package/ui/dts/Elements/Typography/index.d.ts +2 -0
  181. package/ui/dts/Forms/Checkbox/index.d.ts +1 -0
  182. package/ui/dts/Forms/Input/index.d.ts +1 -0
  183. package/ui/dts/Forms/RadioButton/index.d.ts +1 -0
  184. package/ui/dts/ThemeProvider/index.d.ts +1 -0
  185. package/ui/dts/index.d.ts +36 -0
  186. package/ui/dts/utils/index.d.ts +5 -0
  187. package/ui/index.d.ts +50 -0
  188. package/ui/index.js +4 -3
  189. package/ui/index.js.map +1 -1
  190. package/ui/utils/CreateRgba/types.d.ts +3 -0
  191. package/ui/utils/KeyPress/types.d.ts +7 -0
  192. package/ui/utils/index.d.ts +10 -0
  193. package/ui/utils/index.js +10 -0
  194. 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.4-beta.9",
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
- "publish": "npm publish ./build",
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,6 @@
1
+ import { CornerDialogProps } from './types.js';
2
+ export { Intent } from './types.js';
3
+
4
+ declare const CornerDialog: (props: CornerDialogProps) => JSX.Element | null
5
+
6
+ export { CornerDialog, CornerDialogProps, CornerDialog as default };
@@ -0,0 +1,6 @@
1
+ import { CornerDialog } from './CornerDialog.js';
2
+
3
+
4
+
5
+ export { CornerDialog as default };
6
+ //# sourceMappingURL=index.js.map
@@ -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
- jsx(ImageListContainer, __assign({ ref: ref }, events, { children: images.map(function (item, index) {
19
- var _a, _b;
20
- 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));
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 { 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 &&\n _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,M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K,CAAC,GAAG,KAAK,CAAC,GAAG,YAAY,CAAC,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,eAAe,EAAE,cAAc,EAAE,cAAc,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE;AACrT;;;;"}
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,CAAC,EAAE,MAAM,KAAKA,GAAI,CAAC,kBAAkB,EAAE,QAAQ,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC,UAAU,IAAI,EAAE,KAAK,EAAE;AAClP,oBAAoB,IAAI,EAAE,EAAE,EAAE,CAAC;AAC/B,oBAAoB,QAAQA,GAAI,CAAC,YAAY,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,IAAI,CAAC,QAAQ,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE,aAAa,EAAE,aAAa,KAAK,IAAI,IAAI,aAAa,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,cAAc,EAAE,cAAc,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,EAAE;AACjU,iBAAiB,CAAC,EAAE,CAAC,CAAC,CAAC,EAAEA,GAAI,CAAC,QAAQ,EAAE,EAAE,YAAY,EAAE,YAAY,KAAK,IAAI,IAAI,YAAY,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,YAAY,CAAC,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,eAAe,EAAE,cAAc,EAAE,cAAc,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE;AAClT;;;;"}
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ import { ImageListProps } from './types.js';
3
+ export { ImageUploadProps } from './types.js';
4
+
5
+ declare const ImageList: FC<ImageListProps>
6
+
7
+ export { ImageList, ImageList as default };
@@ -0,0 +1,6 @@
1
+ import { ImageList } from './ImageList.js';
2
+
3
+
4
+
5
+ export { ImageList as default };
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -0,0 +1,15 @@
1
+ import { ImageData } from '../LightBox/types.js';
2
+
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 { 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":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AAE,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;;;;"}
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: \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AAG,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,8 @@
1
+ import { LightBox } from './LightBox.js';
2
+ import 'react';
3
+ import '../Modal/Modal.js';
4
+
5
+
6
+
7
+ export { LightBox as default };
8
+ //# sourceMappingURL=index.js.map
@@ -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,7 @@
1
+ import { Modal } from './Modal.js';
2
+ import 'react';
3
+
4
+
5
+
6
+ export { Modal as default };
7
+ //# sourceMappingURL=index.js.map
@@ -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,7 @@
1
+ import { Tabs } from './Tabs.js';
2
+ import 'react';
3
+
4
+
5
+
6
+ export { Tabs, Tabs as default };
7
+ //# sourceMappingURL=index.js.map
@@ -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,6 @@
1
+ import { IAlert } from './types.js';
2
+ export { AlertProps } from './types.js';
3
+
4
+ declare const Alert: IAlert
5
+
6
+ export { Alert as default };
@@ -0,0 +1,6 @@
1
+ import Alert from './Alert.js';
2
+
3
+
4
+
5
+ export { Alert, Alert as default };
6
+ //# sourceMappingURL=index.js.map
@@ -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,5 @@
1
+ import { Props } from './types.js';
2
+
3
+ declare const Avatar: (props: Props) => JSX.Element
4
+
5
+ export { Avatar as default };
@@ -0,0 +1,6 @@
1
+ import { Avatar } from './Avatar.js';
2
+
3
+
4
+
5
+ export { Avatar, Avatar as default };
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -0,0 +1,10 @@
1
+ type Props = {
2
+ src?: string;
3
+ size?: number;
4
+ className?: string;
5
+ colorFront?: string;
6
+ colorBack?: string;
7
+ hoverColorBack?: string;
8
+ };
9
+
10
+ export { Props };
@@ -0,0 +1,11 @@
1
+ type Props = {
2
+ children?: React.ReactNode;
3
+ label?: string | number | JSX.Element;
4
+ color?: string;
5
+ size?: string | number;
6
+ childWidth?: string | number;
7
+ topPosition?: boolean;
8
+ fontSize?: number;
9
+ };
10
+
11
+ export { Props };
@@ -0,0 +1,5 @@
1
+ import { Props } from './Badge.js';
2
+
3
+ declare const Badge: (props: Props) => JSX.Element
4
+
5
+ export { Badge as default };
@@ -0,0 +1,6 @@
1
+ import Badge from './Badge.js';
2
+
3
+
4
+
5
+ export { Badge, Badge as default };
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -0,0 +1,5 @@
1
+ import { BorderedBoxProps } from './types.js';
2
+
3
+ declare const BorderedBox: (props: BorderedBoxProps) => JSX.Element
4
+
5
+ export { BorderedBoxProps, BorderedBox as default };
@@ -0,0 +1,6 @@
1
+ import BorderedBox from './BorderedBox.js';
2
+
3
+
4
+
5
+ export { BorderedBox, BorderedBox as default };
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -0,0 +1,7 @@
1
+ type BorderedBoxProps = {
2
+ children: React.ReactNode;
3
+ className?: string;
4
+ id?: string;
5
+ };
6
+
7
+ export { BorderedBoxProps };
@@ -0,0 +1,6 @@
1
+ import { Props } from './types.js';
2
+ export { AppearanceValue } from './types.js';
3
+
4
+ declare const Button: (props: Props) => JSX.Element
5
+
6
+ export { Props, Button as default };
@@ -0,0 +1,6 @@
1
+ import Button from './Button.js';
2
+
3
+
4
+
5
+ export { Button, Button as default };
6
+ //# sourceMappingURL=index.js.map
@@ -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 };
@@ -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 { CardWrapper, StyledCard, StyledBody, ImageWrapper, StyledImage } from './styles.js';
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,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,GAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE;AAChI;;;;"}
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","_jsxs"],"mappings":";;;;;AAKU,IAAC,IAAI,GAAG,UAAU,EAAE,EAAE;AAChC,IAAI,IAAI,QAAQ,GAAG,EAAE,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AC;AAC3B,IAAI,IAAI,UAAU,GAAG,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;AACvD,IAAI,QAAQA,GAAI,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAEA,GAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,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,7 @@
1
+ import { CardProps } from './types.js';
2
+
3
+ declare interface Card {
4
+ (props: CardProps): JSX.Element
5
+ }
6
+
7
+ export { Card as default };
@@ -0,0 +1,7 @@
1
+ import CardComponent from './Card.js';
2
+ export { Card, CardBody, CardImage } from './Card.js';
3
+
4
+
5
+
6
+ export { CardComponent as default };
7
+ //# sourceMappingURL=index.js.map
@@ -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,10 @@
1
+ import { StyledCard } from './styles.js';
2
+
3
+ type CardProps = {
4
+ children: React.ReactNode;
5
+ shadow?: boolean;
6
+ block?: boolean;
7
+ hasBorder?: boolean;
8
+ } & React.ComponentProps<typeof StyledCard>;
9
+
10
+ export { CardProps };
@@ -0,0 +1,5 @@
1
+ import { DropdownProps } from './types.js';
2
+
3
+ declare const Dropdown: ({ show, className, wrapRef, children, showArrow, verticalShift, customDropdownPosition, }: DropdownProps) => JSX.Element;
4
+
5
+ export { Dropdown as default };
@@ -0,0 +1,5 @@
1
+ import Dropdown from './Dropdown.js';
2
+
3
+
4
+
5
+ export { Dropdown, Dropdown as default };
@@ -0,0 +1,6 @@
1
+ import Dropdown from './Dropdown.js';
2
+
3
+
4
+
5
+ export { Dropdown, Dropdown as default };
6
+ //# sourceMappingURL=index.js.map
@@ -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 };