@activecollab/components 1.0.318 → 1.0.320
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/components/EmptySlate/EmptySlate.js +2 -1
- package/dist/cjs/components/EmptySlate/EmptySlate.js.map +1 -1
- package/dist/cjs/components/EmptySlate/EmptySlate.styles.js +9 -4
- package/dist/cjs/components/EmptySlate/EmptySlate.styles.js.map +1 -1
- package/dist/cjs/components/Popper/Popper.js +10 -6
- package/dist/cjs/components/Popper/Popper.js.map +1 -1
- package/dist/esm/components/EmptySlate/EmptySlate.d.ts.map +1 -1
- package/dist/esm/components/EmptySlate/EmptySlate.js +3 -2
- package/dist/esm/components/EmptySlate/EmptySlate.js.map +1 -1
- package/dist/esm/components/EmptySlate/EmptySlate.styles.d.ts +1 -0
- package/dist/esm/components/EmptySlate/EmptySlate.styles.d.ts.map +1 -1
- package/dist/esm/components/EmptySlate/EmptySlate.styles.js +7 -3
- package/dist/esm/components/EmptySlate/EmptySlate.styles.js.map +1 -1
- package/dist/esm/components/Popper/Popper.d.ts.map +1 -1
- package/dist/esm/components/Popper/Popper.js +10 -6
- package/dist/esm/components/Popper/Popper.js.map +1 -1
- package/dist/index.js +19 -10
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -21,12 +21,13 @@ var EmptySlate = function EmptySlate(_ref) {
|
|
|
21
21
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
22
22
|
return /*#__PURE__*/_react.default.createElement(_EmptySlate.Container, _extends({}, rest, {
|
|
23
23
|
role: "status"
|
|
24
|
-
}), /*#__PURE__*/_react.default.createElement(
|
|
24
|
+
}), /*#__PURE__*/_react.default.createElement(_EmptySlate.StyledImg, {
|
|
25
25
|
src: src,
|
|
26
26
|
alt: alt
|
|
27
27
|
}), /*#__PURE__*/_react.default.createElement(_EmptySlate.SubContainer, null, /*#__PURE__*/_react.default.createElement(_EmptySlate.Title, {
|
|
28
28
|
variant: "Title 1"
|
|
29
29
|
}, title), description && /*#__PURE__*/_react.default.createElement(_EmptySlate.Description, {
|
|
30
|
+
color: "secondary",
|
|
30
31
|
variant: "Body 1"
|
|
31
32
|
}, description), children));
|
|
32
33
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptySlate.js","names":["EmptySlate","title","description","src","alt","children","rest","Footer","EmptySlateFooter","displayName"],"sources":["../../../../src/components/EmptySlate/EmptySlate.tsx"],"sourcesContent":["import React, { HTMLAttributes } from \"react\";\nimport {\n Container,\n Description,\n SubContainer,\n Title,\n} from \"./EmptySlate.styles\";\nimport { EmptySlateFooter } from \"./EmptySlateFooter\";\n\nexport interface EmptySlateProps extends HTMLAttributes<HTMLDivElement> {\n src: string;\n alt: string;\n title: string;\n description?: string;\n}\n\nexport const EmptySlate = ({\n title,\n description,\n src,\n alt,\n children,\n ...rest\n}: EmptySlateProps) => {\n return (\n <Container {...rest} role=\"status\">\n <
|
|
1
|
+
{"version":3,"file":"EmptySlate.js","names":["EmptySlate","title","description","src","alt","children","rest","Footer","EmptySlateFooter","displayName"],"sources":["../../../../src/components/EmptySlate/EmptySlate.tsx"],"sourcesContent":["import React, { HTMLAttributes } from \"react\";\nimport {\n Container,\n Description,\n SubContainer,\n Title,\n StyledImg,\n} from \"./EmptySlate.styles\";\nimport { EmptySlateFooter } from \"./EmptySlateFooter\";\n\nexport interface EmptySlateProps extends HTMLAttributes<HTMLDivElement> {\n src: string;\n alt: string;\n title: string;\n description?: string;\n}\n\nexport const EmptySlate = ({\n title,\n description,\n src,\n alt,\n children,\n ...rest\n}: EmptySlateProps) => {\n return (\n <Container {...rest} role=\"status\">\n <StyledImg src={src} alt={alt} />\n <SubContainer>\n <Title variant=\"Title 1\">{title}</Title>\n {description && (\n <Description color=\"secondary\" variant=\"Body 1\">\n {description}\n </Description>\n )}\n\n {children}\n </SubContainer>\n </Container>\n );\n};\n\nEmptySlate.Footer = EmptySlateFooter;\n\nEmptySlate.displayName = \"EmptySlate\";\n"],"mappings":";;;;;;AAAA;AACA;AAOA;AAAsD;AAAA;AAAA;AAAA;AAAA;AAS/C,IAAMA,UAAU,GAAG,SAAbA,UAAU,OAOA;EAAA,IANrBC,KAAK,QAALA,KAAK;IACLC,WAAW,QAAXA,WAAW;IACXC,GAAG,QAAHA,GAAG;IACHC,GAAG,QAAHA,GAAG;IACHC,QAAQ,QAARA,QAAQ;IACLC,IAAI;EAEP,oBACE,6BAAC,qBAAS,eAAKA,IAAI;IAAE,IAAI,EAAC;EAAQ,iBAChC,6BAAC,qBAAS;IAAC,GAAG,EAAEH,GAAI;IAAC,GAAG,EAAEC;EAAI,EAAG,eACjC,6BAAC,wBAAY,qBACX,6BAAC,iBAAK;IAAC,OAAO,EAAC;EAAS,GAAEH,KAAK,CAAS,EACvCC,WAAW,iBACV,6BAAC,uBAAW;IAAC,KAAK,EAAC,WAAW;IAAC,OAAO,EAAC;EAAQ,GAC5CA,WAAW,CAEf,EAEAG,QAAQ,CACI,CACL;AAEhB,CAAC;AAAC;AAEFL,UAAU,CAACO,MAAM,GAAGC,kCAAgB;AAEpCR,UAAU,CAACS,WAAW,GAAG,YAAY"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.Title = exports.SubContainer = exports.FooterContainer = exports.Description = exports.Container = void 0;
|
|
6
|
+
exports.Title = exports.SubContainer = exports.StyledImg = exports.FooterContainer = exports.Description = exports.Container = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
8
|
var _Typography = require("../Typography/Typography");
|
|
9
9
|
var _BreakPoints = require("../BreakPoints");
|
|
@@ -18,19 +18,24 @@ var SubContainer = _styledComponents.default.div.withConfig({
|
|
|
18
18
|
componentId: "sc-jfbqky-1"
|
|
19
19
|
})(["display:flex;align-items:center;flex-direction:column;justify-content:center;max-width:400px;", "{align-items:flex-start;}"], _BreakPoints.screen.lg);
|
|
20
20
|
exports.SubContainer = SubContainer;
|
|
21
|
+
var StyledImg = _styledComponents.default.img.withConfig({
|
|
22
|
+
displayName: "EmptySlatestyles__StyledImg",
|
|
23
|
+
componentId: "sc-jfbqky-2"
|
|
24
|
+
})(["width:280px;height:280px;"]);
|
|
25
|
+
exports.StyledImg = StyledImg;
|
|
21
26
|
var Title = (0, _styledComponents.default)(_Typography.Typography).withConfig({
|
|
22
27
|
displayName: "EmptySlatestyles__Title",
|
|
23
|
-
componentId: "sc-jfbqky-
|
|
28
|
+
componentId: "sc-jfbqky-3"
|
|
24
29
|
})(["margin-block-end:8px;text-align:center;", "{text-align:start;}"], _BreakPoints.screen.lg);
|
|
25
30
|
exports.Title = Title;
|
|
26
31
|
var Description = (0, _styledComponents.default)(_Typography.Typography).withConfig({
|
|
27
32
|
displayName: "EmptySlatestyles__Description",
|
|
28
|
-
componentId: "sc-jfbqky-
|
|
33
|
+
componentId: "sc-jfbqky-4"
|
|
29
34
|
})(["text-align:center;", "{text-align:start;}"], _BreakPoints.screen.lg);
|
|
30
35
|
exports.Description = Description;
|
|
31
36
|
var FooterContainer = _styledComponents.default.div.withConfig({
|
|
32
37
|
displayName: "EmptySlatestyles__FooterContainer",
|
|
33
|
-
componentId: "sc-jfbqky-
|
|
38
|
+
componentId: "sc-jfbqky-5"
|
|
34
39
|
})(["margin-block-start:24px;display:flex;flex-direction:column;gap:12px;align-items:center;", "{flex-direction:row;}"], _BreakPoints.screen.lg);
|
|
35
40
|
exports.FooterContainer = FooterContainer;
|
|
36
41
|
//# sourceMappingURL=EmptySlate.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptySlate.styles.js","names":["Container","styled","div","screen","lg","SubContainer","Title","Typography","Description","FooterContainer"],"sources":["../../../../src/components/EmptySlate/EmptySlate.styles.ts"],"sourcesContent":["import styled from \"styled-components\";\nimport { Typography } from \"../Typography/Typography\";\nimport { screen } from \"../BreakPoints\";\n\nexport const Container = styled.div`\n display: flex;\n align-items: center;\n flex-direction: column;\n justify-content: center;\n text-align: center;\n gap: 24px;\n\n ${screen.lg} {\n flex-direction: row;\n }\n`;\n\nexport const SubContainer = styled.div`\n display: flex;\n align-items: center;\n flex-direction: column;\n justify-content: center;\n max-width: 400px;\n\n ${screen.lg} {\n align-items: flex-start;\n }\n`;\n\nexport const Title = styled(Typography)`\n margin-block-end: 8px;\n text-align: center;\n\n ${screen.lg} {\n text-align: start;\n }\n`;\n\nexport const Description = styled(Typography)`\n text-align: center;\n\n ${screen.lg} {\n text-align: start;\n }\n`;\n\nexport const FooterContainer = styled.div`\n margin-block-start: 24px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n align-items: center;\n\n ${screen.lg} {\n flex-direction: row;\n }\n`;\n"],"mappings":";;;;;;AAAA;AACA;AACA;AAAwC;AAEjC,IAAMA,SAAS,GAAGC,yBAAM,CAACC,GAAG;EAAA;EAAA;AAAA,0IAQ/BC,mBAAM,CAACC,EAAE,CAGZ;AAAC;AAEK,IAAMC,YAAY,GAAGJ,yBAAM,CAACC,GAAG;EAAA;EAAA;AAAA,mIAOlCC,mBAAM,CAACC,EAAE,CAGZ;AAAC;AAEK,IAAME,KAAK,GAAG,
|
|
1
|
+
{"version":3,"file":"EmptySlate.styles.js","names":["Container","styled","div","screen","lg","SubContainer","StyledImg","img","Title","Typography","Description","FooterContainer"],"sources":["../../../../src/components/EmptySlate/EmptySlate.styles.ts"],"sourcesContent":["import styled from \"styled-components\";\nimport { Typography } from \"../Typography/Typography\";\nimport { screen } from \"../BreakPoints\";\n\nexport const Container = styled.div`\n display: flex;\n align-items: center;\n flex-direction: column;\n justify-content: center;\n text-align: center;\n gap: 24px;\n\n ${screen.lg} {\n flex-direction: row;\n }\n`;\n\nexport const SubContainer = styled.div`\n display: flex;\n align-items: center;\n flex-direction: column;\n justify-content: center;\n max-width: 400px;\n\n ${screen.lg} {\n align-items: flex-start;\n }\n`;\n\nexport const StyledImg = styled.img`\n width: 280px;\n height: 280px;\n`;\n\nexport const Title = styled(Typography)`\n margin-block-end: 8px;\n text-align: center;\n\n ${screen.lg} {\n text-align: start;\n }\n`;\n\nexport const Description = styled(Typography)`\n text-align: center;\n\n ${screen.lg} {\n text-align: start;\n }\n`;\n\nexport const FooterContainer = styled.div`\n margin-block-start: 24px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n align-items: center;\n\n ${screen.lg} {\n flex-direction: row;\n }\n`;\n"],"mappings":";;;;;;AAAA;AACA;AACA;AAAwC;AAEjC,IAAMA,SAAS,GAAGC,yBAAM,CAACC,GAAG;EAAA;EAAA;AAAA,0IAQ/BC,mBAAM,CAACC,EAAE,CAGZ;AAAC;AAEK,IAAMC,YAAY,GAAGJ,yBAAM,CAACC,GAAG;EAAA;EAAA;AAAA,mIAOlCC,mBAAM,CAACC,EAAE,CAGZ;AAAC;AAEK,IAAME,SAAS,GAAGL,yBAAM,CAACM,GAAG;EAAA;EAAA;AAAA,iCAGlC;AAAC;AAEK,IAAMC,KAAK,GAAG,IAAAP,yBAAM,EAACQ,sBAAU,CAAC;EAAA;EAAA;AAAA,uEAInCN,mBAAM,CAACC,EAAE,CAGZ;AAAC;AAEK,IAAMM,WAAW,GAAG,IAAAT,yBAAM,EAACQ,sBAAU,CAAC;EAAA;EAAA;AAAA,kDAGzCN,mBAAM,CAACC,EAAE,CAGZ;AAAC;AAEK,IAAMO,eAAe,GAAGV,yBAAM,CAACC,GAAG;EAAA;EAAA;AAAA,yHAOrCC,mBAAM,CAACC,EAAE,CAGZ;AAAC"}
|
|
@@ -59,16 +59,20 @@ var Popper = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
59
59
|
if (popperRef.current) {
|
|
60
60
|
popperRef.current.destroy();
|
|
61
61
|
}
|
|
62
|
+
var modifiers = [];
|
|
63
|
+
if (typeof afterWrite === "function") {
|
|
64
|
+
modifiers.push({
|
|
65
|
+
phase: "afterWrite",
|
|
66
|
+
enabled: true,
|
|
67
|
+
name: "popper-after-write",
|
|
68
|
+
fn: afterWrite
|
|
69
|
+
});
|
|
70
|
+
}
|
|
62
71
|
popperRef.current = (0, _core.createPopper)(anchorEl, ownRef.current, {
|
|
63
72
|
placement: placement,
|
|
64
73
|
onFirstUpdate: handlePopperUpdate,
|
|
65
74
|
strategy: strategy,
|
|
66
|
-
modifiers:
|
|
67
|
-
phase: "afterWrite",
|
|
68
|
-
enabled: typeof afterWrite === "function",
|
|
69
|
-
name: "popper-after-write",
|
|
70
|
-
fn: afterWrite
|
|
71
|
-
}]
|
|
75
|
+
modifiers: modifiers
|
|
72
76
|
});
|
|
73
77
|
}, [afterWrite, anchorEl, open, placement, strategy]);
|
|
74
78
|
var handleClose = function handleClose() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popper.js","names":["Popper","forwardRef","ref","children","anchorEl","open","style","transition","placement","initialPlacement","strategy","afterWrite","rest","useState","exited","setExited","setPlacement","ownRef","useRef","popperRef","handleInnerRef","useForkRef","handlePopperUpdate","data","handleOpen","useCallback","current","destroy","
|
|
1
|
+
{"version":3,"file":"Popper.js","names":["Popper","forwardRef","ref","children","anchorEl","open","style","transition","placement","initialPlacement","strategy","afterWrite","rest","useState","exited","setExited","setPlacement","ownRef","useRef","popperRef","handleInnerRef","useForkRef","handlePopperUpdate","data","handleOpen","useCallback","current","destroy","modifiers","push","phase","enabled","name","fn","createPopper","onFirstUpdate","handleClose","handleRef","node","handleEnter","handleExited","useEffect","update","childProps","transitionProps","in","onEnter","onExited","displayName"],"sources":["../../../../src/components/Popper/Popper.tsx"],"sourcesContent":["import React, {\n forwardRef,\n useCallback,\n useRef,\n useEffect,\n useState,\n CSSProperties,\n HTMLAttributes,\n} from \"react\";\nimport {\n createPopper,\n Instance,\n Modifier,\n PositioningStrategy,\n State,\n} from \"@popperjs/core\";\nimport { Placement } from \".\";\nimport useForkRef from \"../../utils/useForkRef\";\ntype CustomModifier = Modifier<string, unknown>;\ninterface TransitionProps {\n in: boolean;\n onEnter: () => void;\n onExited: () => void;\n}\ninterface IChildProps {\n placement: Placement;\n transitionProps: Partial<TransitionProps>;\n}\n\ninterface PopperProps {\n /** Anchor Element. */\n anchorEl?: Element | null;\n /** Open */\n open?: boolean;\n /** Inline style */\n style?: CSSProperties;\n /** Child with transition */\n transition?: boolean;\n /** Placement */\n placement?: Placement;\n /** Strategy */\n strategy?: PositioningStrategy;\n /** After Write callback */\n afterWrite?: (...args) => void;\n}\n\nexport const Popper = forwardRef<\n HTMLDivElement,\n PopperProps & HTMLAttributes<HTMLDivElement>\n>(\n (\n {\n children,\n anchorEl,\n open = false,\n style,\n transition = false,\n placement: initialPlacement = \"bottom\",\n strategy = \"absolute\",\n afterWrite,\n ...rest\n },\n ref\n ) => {\n const [exited, setExited] = useState(true);\n const [placement, setPlacement] = useState(initialPlacement);\n const ownRef = useRef<HTMLDivElement | null>(null);\n const popperRef = useRef<Instance>();\n\n const handleInnerRef = useForkRef(ownRef, ref);\n\n const handlePopperUpdate = (data: Partial<State>): void => {\n setPlacement(data.placement || \"bottom\");\n };\n\n const handleOpen = useCallback(() => {\n if (!ownRef.current || !anchorEl || !open) {\n return;\n }\n\n if (popperRef.current) {\n popperRef.current.destroy();\n }\n\n const modifiers: CustomModifier[] = [];\n if (typeof afterWrite === \"function\") {\n modifiers.push({\n phase: \"afterWrite\",\n enabled: true,\n name: \"popper-after-write\",\n fn: afterWrite,\n });\n }\n\n popperRef.current = createPopper(anchorEl, ownRef.current, {\n placement,\n onFirstUpdate: handlePopperUpdate,\n strategy,\n modifiers,\n });\n }, [afterWrite, anchorEl, open, placement, strategy]);\n\n const handleClose = (): void => {\n if (!popperRef.current) {\n return;\n }\n\n popperRef.current.destroy();\n };\n\n const handleRef = useCallback(\n (node: HTMLDivElement) => {\n handleInnerRef(node);\n handleOpen();\n },\n [handleOpen, handleInnerRef]\n );\n\n const handleEnter = (): void => {\n setExited(false);\n };\n\n const handleExited = (): void => {\n setExited(true);\n handleClose();\n };\n\n useEffect(() => {\n return (): void => {\n handleClose();\n };\n }, []);\n\n useEffect(() => {\n if (!open && !transition) {\n handleClose();\n }\n }, [open, transition]);\n\n useEffect(() => {\n if (popperRef.current) {\n popperRef.current.update();\n }\n });\n\n if (!open && (!transition || exited)) {\n return null;\n }\n\n const childProps: Partial<IChildProps> = { placement };\n\n if (transition) {\n childProps.transitionProps = {\n in: open,\n onEnter: handleEnter,\n onExited: handleExited,\n };\n }\n\n return (\n <div\n ref={handleRef}\n {...rest}\n style={{\n ...style,\n }}\n >\n {typeof children === \"function\" ? children(childProps) : children}\n </div>\n );\n }\n);\n\nPopper.displayName = \"Popper\";\n"],"mappings":";;;;;;;AAAA;AASA;AAQA;AAAgD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA6BzC,IAAMA,MAAM,gBAAG,IAAAC,iBAAU,EAI9B,gBAYEC,GAAG,EACA;EAAA,IAXDC,QAAQ,QAARA,QAAQ;IACRC,QAAQ,QAARA,QAAQ;IAAA,iBACRC,IAAI;IAAJA,IAAI,0BAAG,KAAK;IACZC,KAAK,QAALA,KAAK;IAAA,uBACLC,UAAU;IAAVA,UAAU,gCAAG,KAAK;IAAA,sBAClBC,SAAS;IAAEC,gBAAgB,+BAAG,QAAQ;IAAA,qBACtCC,QAAQ;IAARA,QAAQ,8BAAG,UAAU;IACrBC,UAAU,QAAVA,UAAU;IACPC,IAAI;EAIT,gBAA4B,IAAAC,eAAQ,EAAC,IAAI,CAAC;IAAA;IAAnCC,MAAM;IAAEC,SAAS;EACxB,iBAAkC,IAAAF,eAAQ,EAACJ,gBAAgB,CAAC;IAAA;IAArDD,SAAS;IAAEQ,YAAY;EAC9B,IAAMC,MAAM,GAAG,IAAAC,aAAM,EAAwB,IAAI,CAAC;EAClD,IAAMC,SAAS,GAAG,IAAAD,aAAM,GAAY;EAEpC,IAAME,cA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
|
1
|
-
{"version":3,"file":"EmptySlate.d.ts","sourceRoot":"","sources":["../../../../src/components/EmptySlate/EmptySlate.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"EmptySlate.d.ts","sourceRoot":"","sources":["../../../../src/components/EmptySlate/EmptySlate.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAU9C,MAAM,WAAW,eAAgB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACrE,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,UAAU;0DAOpB,eAAe;;;;;;;;;CAgBjB,CAAC"}
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
var _excluded = ["title", "description", "src", "alt", "children"];
|
|
4
4
|
import React from "react";
|
|
5
|
-
import { Container, Description, SubContainer, Title } from "./EmptySlate.styles";
|
|
5
|
+
import { Container, Description, SubContainer, Title, StyledImg } from "./EmptySlate.styles";
|
|
6
6
|
import { EmptySlateFooter } from "./EmptySlateFooter";
|
|
7
7
|
export var EmptySlate = function EmptySlate(_ref) {
|
|
8
8
|
var title = _ref.title,
|
|
@@ -13,12 +13,13 @@ export var EmptySlate = function EmptySlate(_ref) {
|
|
|
13
13
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
14
14
|
return /*#__PURE__*/React.createElement(Container, _extends({}, rest, {
|
|
15
15
|
role: "status"
|
|
16
|
-
}), /*#__PURE__*/React.createElement(
|
|
16
|
+
}), /*#__PURE__*/React.createElement(StyledImg, {
|
|
17
17
|
src: src,
|
|
18
18
|
alt: alt
|
|
19
19
|
}), /*#__PURE__*/React.createElement(SubContainer, null, /*#__PURE__*/React.createElement(Title, {
|
|
20
20
|
variant: "Title 1"
|
|
21
21
|
}, title), description && /*#__PURE__*/React.createElement(Description, {
|
|
22
|
+
color: "secondary",
|
|
22
23
|
variant: "Body 1"
|
|
23
24
|
}, description), children));
|
|
24
25
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptySlate.js","names":["React","Container","Description","SubContainer","Title","EmptySlateFooter","EmptySlate","title","description","src","alt","children","rest","Footer","displayName"],"sources":["../../../../src/components/EmptySlate/EmptySlate.tsx"],"sourcesContent":["import React, { HTMLAttributes } from \"react\";\nimport {\n Container,\n Description,\n SubContainer,\n Title,\n} from \"./EmptySlate.styles\";\nimport { EmptySlateFooter } from \"./EmptySlateFooter\";\n\nexport interface EmptySlateProps extends HTMLAttributes<HTMLDivElement> {\n src: string;\n alt: string;\n title: string;\n description?: string;\n}\n\nexport const EmptySlate = ({\n title,\n description,\n src,\n alt,\n children,\n ...rest\n}: EmptySlateProps) => {\n return (\n <Container {...rest} role=\"status\">\n <
|
|
1
|
+
{"version":3,"file":"EmptySlate.js","names":["React","Container","Description","SubContainer","Title","StyledImg","EmptySlateFooter","EmptySlate","title","description","src","alt","children","rest","Footer","displayName"],"sources":["../../../../src/components/EmptySlate/EmptySlate.tsx"],"sourcesContent":["import React, { HTMLAttributes } from \"react\";\nimport {\n Container,\n Description,\n SubContainer,\n Title,\n StyledImg,\n} from \"./EmptySlate.styles\";\nimport { EmptySlateFooter } from \"./EmptySlateFooter\";\n\nexport interface EmptySlateProps extends HTMLAttributes<HTMLDivElement> {\n src: string;\n alt: string;\n title: string;\n description?: string;\n}\n\nexport const EmptySlate = ({\n title,\n description,\n src,\n alt,\n children,\n ...rest\n}: EmptySlateProps) => {\n return (\n <Container {...rest} role=\"status\">\n <StyledImg src={src} alt={alt} />\n <SubContainer>\n <Title variant=\"Title 1\">{title}</Title>\n {description && (\n <Description color=\"secondary\" variant=\"Body 1\">\n {description}\n </Description>\n )}\n\n {children}\n </SubContainer>\n </Container>\n );\n};\n\nEmptySlate.Footer = EmptySlateFooter;\n\nEmptySlate.displayName = \"EmptySlate\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAA0B,OAAO;AAC7C,SACEC,SAAS,EACTC,WAAW,EACXC,YAAY,EACZC,KAAK,EACLC,SAAS,QACJ,qBAAqB;AAC5B,SAASC,gBAAgB,QAAQ,oBAAoB;AASrD,OAAO,IAAMC,UAAU,GAAG,SAAbA,UAAU,OAOA;EAAA,IANrBC,KAAK,QAALA,KAAK;IACLC,WAAW,QAAXA,WAAW;IACXC,GAAG,QAAHA,GAAG;IACHC,GAAG,QAAHA,GAAG;IACHC,QAAQ,QAARA,QAAQ;IACLC,IAAI;EAEP,oBACE,oBAAC,SAAS,eAAKA,IAAI;IAAE,IAAI,EAAC;EAAQ,iBAChC,oBAAC,SAAS;IAAC,GAAG,EAAEH,GAAI;IAAC,GAAG,EAAEC;EAAI,EAAG,eACjC,oBAAC,YAAY,qBACX,oBAAC,KAAK;IAAC,OAAO,EAAC;EAAS,GAAEH,KAAK,CAAS,EACvCC,WAAW,iBACV,oBAAC,WAAW;IAAC,KAAK,EAAC,WAAW;IAAC,OAAO,EAAC;EAAQ,GAC5CA,WAAW,CAEf,EAEAG,QAAQ,CACI,CACL;AAEhB,CAAC;AAEDL,UAAU,CAACO,MAAM,GAAGR,gBAAgB;AAEpCC,UAAU,CAACQ,WAAW,GAAG,YAAY"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
2
|
export declare const SubContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const StyledImg: import("styled-components").StyledComponent<"img", any, {}, never>;
|
|
3
4
|
export declare const Title: import("styled-components").StyledComponent<import("../Typography/Typography").TypographyComponent & {
|
|
4
5
|
displayName?: string | undefined;
|
|
5
6
|
}, any, {}, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptySlate.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/EmptySlate/EmptySlate.styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,SAAS,oEAWrB,CAAC;AAEF,eAAO,MAAM,YAAY,oEAUxB,CAAC;AAEF,eAAO,MAAM,KAAK;;kBAOjB,CAAC;AAEF,eAAO,MAAM,WAAW;;kBAMvB,CAAC;AAEF,eAAO,MAAM,eAAe,oEAU3B,CAAC"}
|
|
1
|
+
{"version":3,"file":"EmptySlate.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/EmptySlate/EmptySlate.styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,SAAS,oEAWrB,CAAC;AAEF,eAAO,MAAM,YAAY,oEAUxB,CAAC;AAEF,eAAO,MAAM,SAAS,oEAGrB,CAAC;AAEF,eAAO,MAAM,KAAK;;kBAOjB,CAAC;AAEF,eAAO,MAAM,WAAW;;kBAMvB,CAAC;AAEF,eAAO,MAAM,eAAe,oEAU3B,CAAC"}
|
|
@@ -9,16 +9,20 @@ export var SubContainer = styled.div.withConfig({
|
|
|
9
9
|
displayName: "EmptySlatestyles__SubContainer",
|
|
10
10
|
componentId: "sc-jfbqky-1"
|
|
11
11
|
})(["display:flex;align-items:center;flex-direction:column;justify-content:center;max-width:400px;", "{align-items:flex-start;}"], screen.lg);
|
|
12
|
+
export var StyledImg = styled.img.withConfig({
|
|
13
|
+
displayName: "EmptySlatestyles__StyledImg",
|
|
14
|
+
componentId: "sc-jfbqky-2"
|
|
15
|
+
})(["width:280px;height:280px;"]);
|
|
12
16
|
export var Title = styled(Typography).withConfig({
|
|
13
17
|
displayName: "EmptySlatestyles__Title",
|
|
14
|
-
componentId: "sc-jfbqky-
|
|
18
|
+
componentId: "sc-jfbqky-3"
|
|
15
19
|
})(["margin-block-end:8px;text-align:center;", "{text-align:start;}"], screen.lg);
|
|
16
20
|
export var Description = styled(Typography).withConfig({
|
|
17
21
|
displayName: "EmptySlatestyles__Description",
|
|
18
|
-
componentId: "sc-jfbqky-
|
|
22
|
+
componentId: "sc-jfbqky-4"
|
|
19
23
|
})(["text-align:center;", "{text-align:start;}"], screen.lg);
|
|
20
24
|
export var FooterContainer = styled.div.withConfig({
|
|
21
25
|
displayName: "EmptySlatestyles__FooterContainer",
|
|
22
|
-
componentId: "sc-jfbqky-
|
|
26
|
+
componentId: "sc-jfbqky-5"
|
|
23
27
|
})(["margin-block-start:24px;display:flex;flex-direction:column;gap:12px;align-items:center;", "{flex-direction:row;}"], screen.lg);
|
|
24
28
|
//# sourceMappingURL=EmptySlate.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptySlate.styles.js","names":["styled","Typography","screen","Container","div","lg","SubContainer","Title","Description","FooterContainer"],"sources":["../../../../src/components/EmptySlate/EmptySlate.styles.ts"],"sourcesContent":["import styled from \"styled-components\";\nimport { Typography } from \"../Typography/Typography\";\nimport { screen } from \"../BreakPoints\";\n\nexport const Container = styled.div`\n display: flex;\n align-items: center;\n flex-direction: column;\n justify-content: center;\n text-align: center;\n gap: 24px;\n\n ${screen.lg} {\n flex-direction: row;\n }\n`;\n\nexport const SubContainer = styled.div`\n display: flex;\n align-items: center;\n flex-direction: column;\n justify-content: center;\n max-width: 400px;\n\n ${screen.lg} {\n align-items: flex-start;\n }\n`;\n\nexport const Title = styled(Typography)`\n margin-block-end: 8px;\n text-align: center;\n\n ${screen.lg} {\n text-align: start;\n }\n`;\n\nexport const Description = styled(Typography)`\n text-align: center;\n\n ${screen.lg} {\n text-align: start;\n }\n`;\n\nexport const FooterContainer = styled.div`\n margin-block-start: 24px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n align-items: center;\n\n ${screen.lg} {\n flex-direction: row;\n }\n`;\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,mBAAmB;AACtC,SAASC,UAAU,QAAQ,0BAA0B;AACrD,SAASC,MAAM,QAAQ,gBAAgB;AAEvC,OAAO,IAAMC,SAAS,GAAGH,MAAM,CAACI,GAAG;EAAA;EAAA;AAAA,0IAQ/BF,MAAM,CAACG,EAAE,CAGZ;AAED,OAAO,IAAMC,YAAY,GAAGN,MAAM,CAACI,GAAG;EAAA;EAAA;AAAA,mIAOlCF,MAAM,CAACG,EAAE,CAGZ;AAED,OAAO,IAAME,
|
|
1
|
+
{"version":3,"file":"EmptySlate.styles.js","names":["styled","Typography","screen","Container","div","lg","SubContainer","StyledImg","img","Title","Description","FooterContainer"],"sources":["../../../../src/components/EmptySlate/EmptySlate.styles.ts"],"sourcesContent":["import styled from \"styled-components\";\nimport { Typography } from \"../Typography/Typography\";\nimport { screen } from \"../BreakPoints\";\n\nexport const Container = styled.div`\n display: flex;\n align-items: center;\n flex-direction: column;\n justify-content: center;\n text-align: center;\n gap: 24px;\n\n ${screen.lg} {\n flex-direction: row;\n }\n`;\n\nexport const SubContainer = styled.div`\n display: flex;\n align-items: center;\n flex-direction: column;\n justify-content: center;\n max-width: 400px;\n\n ${screen.lg} {\n align-items: flex-start;\n }\n`;\n\nexport const StyledImg = styled.img`\n width: 280px;\n height: 280px;\n`;\n\nexport const Title = styled(Typography)`\n margin-block-end: 8px;\n text-align: center;\n\n ${screen.lg} {\n text-align: start;\n }\n`;\n\nexport const Description = styled(Typography)`\n text-align: center;\n\n ${screen.lg} {\n text-align: start;\n }\n`;\n\nexport const FooterContainer = styled.div`\n margin-block-start: 24px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n align-items: center;\n\n ${screen.lg} {\n flex-direction: row;\n }\n`;\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,mBAAmB;AACtC,SAASC,UAAU,QAAQ,0BAA0B;AACrD,SAASC,MAAM,QAAQ,gBAAgB;AAEvC,OAAO,IAAMC,SAAS,GAAGH,MAAM,CAACI,GAAG;EAAA;EAAA;AAAA,0IAQ/BF,MAAM,CAACG,EAAE,CAGZ;AAED,OAAO,IAAMC,YAAY,GAAGN,MAAM,CAACI,GAAG;EAAA;EAAA;AAAA,mIAOlCF,MAAM,CAACG,EAAE,CAGZ;AAED,OAAO,IAAME,SAAS,GAAGP,MAAM,CAACQ,GAAG;EAAA;EAAA;AAAA,iCAGlC;AAED,OAAO,IAAMC,KAAK,GAAGT,MAAM,CAACC,UAAU,CAAC;EAAA;EAAA;AAAA,uEAInCC,MAAM,CAACG,EAAE,CAGZ;AAED,OAAO,IAAMK,WAAW,GAAGV,MAAM,CAACC,UAAU,CAAC;EAAA;EAAA;AAAA,kDAGzCC,MAAM,CAACG,EAAE,CAGZ;AAED,OAAO,IAAMM,eAAe,GAAGX,MAAM,CAACI,GAAG;EAAA;EAAA;AAAA,yHAOrCF,MAAM,CAACG,EAAE,CAGZ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popper.d.ts","sourceRoot":"","sources":["../../../../src/components/Popper/Popper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAMZ,aAAa,EAEd,MAAM,OAAO,CAAC;AACf,OAAO,
|
|
1
|
+
{"version":3,"file":"Popper.d.ts","sourceRoot":"","sources":["../../../../src/components/Popper/Popper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAMZ,aAAa,EAEd,MAAM,OAAO,CAAC;AACf,OAAO,EAIL,mBAAmB,EAEpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,GAAG,CAAC;AAa9B,UAAU,WAAW;IACnB,sBAAsB;IACtB,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC1B,WAAW;IACX,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,mBAAmB;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,4BAA4B;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB;IAChB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,eAAe;IACf,QAAQ,CAAC,EAAE,mBAAmB,CAAC;IAC/B,2BAA2B;IAC3B,UAAU,CAAC,EAAE,CAAC,GAAG,IAAI,OAAA,KAAK,IAAI,CAAC;CAChC;AAED,eAAO,MAAM,MAAM,2HA6HlB,CAAC"}
|
|
@@ -37,16 +37,20 @@ export var Popper = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
37
37
|
if (popperRef.current) {
|
|
38
38
|
popperRef.current.destroy();
|
|
39
39
|
}
|
|
40
|
+
var modifiers = [];
|
|
41
|
+
if (typeof afterWrite === "function") {
|
|
42
|
+
modifiers.push({
|
|
43
|
+
phase: "afterWrite",
|
|
44
|
+
enabled: true,
|
|
45
|
+
name: "popper-after-write",
|
|
46
|
+
fn: afterWrite
|
|
47
|
+
});
|
|
48
|
+
}
|
|
40
49
|
popperRef.current = createPopper(anchorEl, ownRef.current, {
|
|
41
50
|
placement: placement,
|
|
42
51
|
onFirstUpdate: handlePopperUpdate,
|
|
43
52
|
strategy: strategy,
|
|
44
|
-
modifiers:
|
|
45
|
-
phase: "afterWrite",
|
|
46
|
-
enabled: typeof afterWrite === "function",
|
|
47
|
-
name: "popper-after-write",
|
|
48
|
-
fn: afterWrite
|
|
49
|
-
}]
|
|
53
|
+
modifiers: modifiers
|
|
50
54
|
});
|
|
51
55
|
}, [afterWrite, anchorEl, open, placement, strategy]);
|
|
52
56
|
var handleClose = function handleClose() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popper.js","names":["React","forwardRef","useCallback","useRef","useEffect","useState","createPopper","useForkRef","Popper","ref","children","anchorEl","open","style","transition","placement","initialPlacement","strategy","afterWrite","rest","exited","setExited","setPlacement","ownRef","popperRef","handleInnerRef","handlePopperUpdate","data","handleOpen","current","destroy","
|
|
1
|
+
{"version":3,"file":"Popper.js","names":["React","forwardRef","useCallback","useRef","useEffect","useState","createPopper","useForkRef","Popper","ref","children","anchorEl","open","style","transition","placement","initialPlacement","strategy","afterWrite","rest","exited","setExited","setPlacement","ownRef","popperRef","handleInnerRef","handlePopperUpdate","data","handleOpen","current","destroy","modifiers","push","phase","enabled","name","fn","onFirstUpdate","handleClose","handleRef","node","handleEnter","handleExited","update","childProps","transitionProps","in","onEnter","onExited","displayName"],"sources":["../../../../src/components/Popper/Popper.tsx"],"sourcesContent":["import React, {\n forwardRef,\n useCallback,\n useRef,\n useEffect,\n useState,\n CSSProperties,\n HTMLAttributes,\n} from \"react\";\nimport {\n createPopper,\n Instance,\n Modifier,\n PositioningStrategy,\n State,\n} from \"@popperjs/core\";\nimport { Placement } from \".\";\nimport useForkRef from \"../../utils/useForkRef\";\ntype CustomModifier = Modifier<string, unknown>;\ninterface TransitionProps {\n in: boolean;\n onEnter: () => void;\n onExited: () => void;\n}\ninterface IChildProps {\n placement: Placement;\n transitionProps: Partial<TransitionProps>;\n}\n\ninterface PopperProps {\n /** Anchor Element. */\n anchorEl?: Element | null;\n /** Open */\n open?: boolean;\n /** Inline style */\n style?: CSSProperties;\n /** Child with transition */\n transition?: boolean;\n /** Placement */\n placement?: Placement;\n /** Strategy */\n strategy?: PositioningStrategy;\n /** After Write callback */\n afterWrite?: (...args) => void;\n}\n\nexport const Popper = forwardRef<\n HTMLDivElement,\n PopperProps & HTMLAttributes<HTMLDivElement>\n>(\n (\n {\n children,\n anchorEl,\n open = false,\n style,\n transition = false,\n placement: initialPlacement = \"bottom\",\n strategy = \"absolute\",\n afterWrite,\n ...rest\n },\n ref\n ) => {\n const [exited, setExited] = useState(true);\n const [placement, setPlacement] = useState(initialPlacement);\n const ownRef = useRef<HTMLDivElement | null>(null);\n const popperRef = useRef<Instance>();\n\n const handleInnerRef = useForkRef(ownRef, ref);\n\n const handlePopperUpdate = (data: Partial<State>): void => {\n setPlacement(data.placement || \"bottom\");\n };\n\n const handleOpen = useCallback(() => {\n if (!ownRef.current || !anchorEl || !open) {\n return;\n }\n\n if (popperRef.current) {\n popperRef.current.destroy();\n }\n\n const modifiers: CustomModifier[] = [];\n if (typeof afterWrite === \"function\") {\n modifiers.push({\n phase: \"afterWrite\",\n enabled: true,\n name: \"popper-after-write\",\n fn: afterWrite,\n });\n }\n\n popperRef.current = createPopper(anchorEl, ownRef.current, {\n placement,\n onFirstUpdate: handlePopperUpdate,\n strategy,\n modifiers,\n });\n }, [afterWrite, anchorEl, open, placement, strategy]);\n\n const handleClose = (): void => {\n if (!popperRef.current) {\n return;\n }\n\n popperRef.current.destroy();\n };\n\n const handleRef = useCallback(\n (node: HTMLDivElement) => {\n handleInnerRef(node);\n handleOpen();\n },\n [handleOpen, handleInnerRef]\n );\n\n const handleEnter = (): void => {\n setExited(false);\n };\n\n const handleExited = (): void => {\n setExited(true);\n handleClose();\n };\n\n useEffect(() => {\n return (): void => {\n handleClose();\n };\n }, []);\n\n useEffect(() => {\n if (!open && !transition) {\n handleClose();\n }\n }, [open, transition]);\n\n useEffect(() => {\n if (popperRef.current) {\n popperRef.current.update();\n }\n });\n\n if (!open && (!transition || exited)) {\n return null;\n }\n\n const childProps: Partial<IChildProps> = { placement };\n\n if (transition) {\n childProps.transitionProps = {\n in: open,\n onEnter: handleEnter,\n onExited: handleExited,\n };\n }\n\n return (\n <div\n ref={handleRef}\n {...rest}\n style={{\n ...style,\n }}\n >\n {typeof children === \"function\" ? children(childProps) : children}\n </div>\n );\n }\n);\n\nPopper.displayName = \"Popper\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,IACVC,UAAU,EACVC,WAAW,EACXC,MAAM,EACNC,SAAS,EACTC,QAAQ,QAGH,OAAO;AACd,SACEC,YAAY,QAKP,gBAAgB;AAEvB,OAAOC,UAAU,MAAM,wBAAwB;AA6B/C,OAAO,IAAMC,MAAM,gBAAGP,UAAU,CAI9B,gBAYEQ,GAAG,EACA;EAAA,IAXDC,QAAQ,QAARA,QAAQ;IACRC,QAAQ,QAARA,QAAQ;IAAA,iBACRC,IAAI;IAAJA,IAAI,0BAAG,KAAK;IACZC,KAAK,QAALA,KAAK;IAAA,uBACLC,UAAU;IAAVA,UAAU,gCAAG,KAAK;IAAA,s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AAI;MACRmC,OAAO,EAAEN,WAAW;MACpBO,QAAQ,EAAEN;IACZ,CAAC;EACH;EAEA,oBACE;IACE,GAAG,EAAEH;EAAU,GACXpB,IAAI;IACR,KAAK,eACAN,KAAK;EACR,IAED,OAAOH,QAAQ,KAAK,UAAU,GAAGA,QAAQ,CAACkC,UAAU,CAAC,GAAGlC,QAAQ,CAC7D;AAEV,CAAC,CACF;AAEDF,MAAM,CAACyC,WAAW,GAAG,QAAQ"}
|
package/dist/index.js
CHANGED
|
@@ -510,16 +510,20 @@
|
|
|
510
510
|
if (popperRef.current) {
|
|
511
511
|
popperRef.current.destroy();
|
|
512
512
|
}
|
|
513
|
+
var modifiers = [];
|
|
514
|
+
if (typeof afterWrite === "function") {
|
|
515
|
+
modifiers.push({
|
|
516
|
+
phase: "afterWrite",
|
|
517
|
+
enabled: true,
|
|
518
|
+
name: "popper-after-write",
|
|
519
|
+
fn: afterWrite
|
|
520
|
+
});
|
|
521
|
+
}
|
|
513
522
|
popperRef.current = core.createPopper(anchorEl, ownRef.current, {
|
|
514
523
|
placement: placement,
|
|
515
524
|
onFirstUpdate: handlePopperUpdate,
|
|
516
525
|
strategy: strategy,
|
|
517
|
-
modifiers:
|
|
518
|
-
phase: "afterWrite",
|
|
519
|
-
enabled: typeof afterWrite === "function",
|
|
520
|
-
name: "popper-after-write",
|
|
521
|
-
fn: afterWrite
|
|
522
|
-
}]
|
|
526
|
+
modifiers: modifiers
|
|
523
527
|
});
|
|
524
528
|
}, [afterWrite, anchorEl, open, placement, strategy]);
|
|
525
529
|
var handleClose = function handleClose() {
|
|
@@ -16794,17 +16798,21 @@
|
|
|
16794
16798
|
displayName: "EmptySlatestyles__SubContainer",
|
|
16795
16799
|
componentId: "sc-jfbqky-1"
|
|
16796
16800
|
})(["display:flex;align-items:center;flex-direction:column;justify-content:center;max-width:400px;", "{align-items:flex-start;}"], screen.lg);
|
|
16801
|
+
var StyledImg = styled__default["default"].img.withConfig({
|
|
16802
|
+
displayName: "EmptySlatestyles__StyledImg",
|
|
16803
|
+
componentId: "sc-jfbqky-2"
|
|
16804
|
+
})(["width:280px;height:280px;"]);
|
|
16797
16805
|
var Title = styled__default["default"](Typography).withConfig({
|
|
16798
16806
|
displayName: "EmptySlatestyles__Title",
|
|
16799
|
-
componentId: "sc-jfbqky-
|
|
16807
|
+
componentId: "sc-jfbqky-3"
|
|
16800
16808
|
})(["margin-block-end:8px;text-align:center;", "{text-align:start;}"], screen.lg);
|
|
16801
16809
|
var Description = styled__default["default"](Typography).withConfig({
|
|
16802
16810
|
displayName: "EmptySlatestyles__Description",
|
|
16803
|
-
componentId: "sc-jfbqky-
|
|
16811
|
+
componentId: "sc-jfbqky-4"
|
|
16804
16812
|
})(["text-align:center;", "{text-align:start;}"], screen.lg);
|
|
16805
16813
|
var FooterContainer = styled__default["default"].div.withConfig({
|
|
16806
16814
|
displayName: "EmptySlatestyles__FooterContainer",
|
|
16807
|
-
componentId: "sc-jfbqky-
|
|
16815
|
+
componentId: "sc-jfbqky-5"
|
|
16808
16816
|
})(["margin-block-start:24px;display:flex;flex-direction:column;gap:12px;align-items:center;", "{flex-direction:row;}"], screen.lg);
|
|
16809
16817
|
|
|
16810
16818
|
var _excluded$1 = ["children"];
|
|
@@ -16828,12 +16836,13 @@
|
|
|
16828
16836
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
16829
16837
|
return /*#__PURE__*/React__default["default"].createElement(Container, _extends({}, rest, {
|
|
16830
16838
|
role: "status"
|
|
16831
|
-
}), /*#__PURE__*/React__default["default"].createElement(
|
|
16839
|
+
}), /*#__PURE__*/React__default["default"].createElement(StyledImg, {
|
|
16832
16840
|
src: src,
|
|
16833
16841
|
alt: alt
|
|
16834
16842
|
}), /*#__PURE__*/React__default["default"].createElement(SubContainer, null, /*#__PURE__*/React__default["default"].createElement(Title, {
|
|
16835
16843
|
variant: "Title 1"
|
|
16836
16844
|
}, title), description && /*#__PURE__*/React__default["default"].createElement(Description, {
|
|
16845
|
+
color: "secondary",
|
|
16837
16846
|
variant: "Body 1"
|
|
16838
16847
|
}, description), children));
|
|
16839
16848
|
};
|