se-design 0.0.107 → 0.0.109
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/assets/icons/rounded-plus.svg +11 -0
- package/dist/assets/style.css +1 -1
- package/dist/components/Avatar/index.d.ts +10 -0
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/CustomModal/index.d.ts +9 -0
- package/dist/components/Dropdown/index.d.ts +1 -0
- package/dist/components/LoadingModal/index.d.ts +5 -0
- package/dist/components/Spinner/index.d.ts +2 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/index.js +70 -62
- package/dist/index.js.map +1 -1
- package/dist/index10.js +16 -30
- package/dist/index10.js.map +1 -1
- package/dist/index100.js +5 -0
- package/dist/index100.js.map +1 -0
- package/dist/index101.js +5 -0
- package/dist/index101.js.map +1 -0
- package/dist/index102.js +152 -0
- package/dist/index102.js.map +1 -0
- package/dist/index11.js +14 -29
- package/dist/index11.js.map +1 -1
- package/dist/index118.js +1233 -6
- package/dist/index118.js.map +1 -1
- package/dist/index119.js +7 -35
- package/dist/index119.js.map +1 -1
- package/dist/index12.js +6 -19
- package/dist/index12.js.map +1 -1
- package/dist/index120.js +10 -2
- package/dist/index120.js.map +1 -1
- package/dist/index121.js +4 -7
- package/dist/index121.js.map +1 -1
- package/dist/index122.js +165 -322
- package/dist/index122.js.map +1 -1
- package/dist/index123.js +11 -50
- package/dist/index123.js.map +1 -1
- package/dist/index124.js +6 -2
- package/dist/index124.js.map +1 -1
- package/dist/index125.js +5 -75
- package/dist/index125.js.map +1 -1
- package/dist/index126.js +37 -92
- package/dist/index126.js.map +1 -1
- package/dist/index127.js +2 -52
- package/dist/index127.js.map +1 -1
- package/dist/index128.js +7 -7
- package/dist/index128.js.map +1 -1
- package/dist/index129.js +326 -4
- package/dist/index129.js.map +1 -1
- package/dist/index13.js +30 -123
- package/dist/index13.js.map +1 -1
- package/dist/index130.js +47 -49
- package/dist/index130.js.map +1 -1
- package/dist/index131.js +2 -2
- package/dist/index132.js +76 -2
- package/dist/index132.js.map +1 -1
- package/dist/index133.js +96 -0
- package/dist/index133.js.map +1 -0
- package/dist/index134.js +55 -0
- package/dist/index134.js.map +1 -0
- package/dist/index135.js +11 -0
- package/dist/index135.js.map +1 -0
- package/dist/index136.js +8 -0
- package/dist/index136.js.map +1 -0
- package/dist/index137.js +55 -0
- package/dist/index137.js.map +1 -0
- package/dist/index138.js +5 -0
- package/dist/index138.js.map +1 -0
- package/dist/index139.js +5 -0
- package/dist/index139.js.map +1 -0
- package/dist/index14.js +30 -28
- package/dist/index14.js.map +1 -1
- package/dist/index15.js +19 -27
- package/dist/index15.js.map +1 -1
- package/dist/index16.js +116 -71
- package/dist/index16.js.map +1 -1
- package/dist/index17.js +28 -38
- package/dist/index17.js.map +1 -1
- package/dist/index18.js +26 -22
- package/dist/index18.js.map +1 -1
- package/dist/index19.js +77 -67
- package/dist/index19.js.map +1 -1
- package/dist/index20.js +36 -132
- package/dist/index20.js.map +1 -1
- package/dist/index21.js +20 -16
- package/dist/index21.js.map +1 -1
- package/dist/index22.js +67 -44
- package/dist/index22.js.map +1 -1
- package/dist/index23.js +133 -28
- package/dist/index23.js.map +1 -1
- package/dist/index24.js +15 -60
- package/dist/index24.js.map +1 -1
- package/dist/index25.js +44 -41
- package/dist/index25.js.map +1 -1
- package/dist/index26.js +28 -97
- package/dist/index26.js.map +1 -1
- package/dist/index27.js +61 -55
- package/dist/index27.js.map +1 -1
- package/dist/index28.js +42 -38
- package/dist/index28.js.map +1 -1
- package/dist/index29.js +95 -31
- package/dist/index29.js.map +1 -1
- package/dist/index3.js +2 -2
- package/dist/index3.js.map +1 -1
- package/dist/index30.js +58 -33
- package/dist/index30.js.map +1 -1
- package/dist/index31.js +36 -44
- package/dist/index31.js.map +1 -1
- package/dist/index32.js +35 -38
- package/dist/index32.js.map +1 -1
- package/dist/index33.js +29 -30
- package/dist/index33.js.map +1 -1
- package/dist/index34.js +44 -49
- package/dist/index34.js.map +1 -1
- package/dist/index35.js +36 -69
- package/dist/index35.js.map +1 -1
- package/dist/index36.js +27 -47
- package/dist/index36.js.map +1 -1
- package/dist/index37.js +48 -68
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +67 -83
- package/dist/index38.js.map +1 -1
- package/dist/index39.js +48 -32
- package/dist/index39.js.map +1 -1
- package/dist/index4.js +79 -77
- package/dist/index4.js.map +1 -1
- package/dist/index40.js +74 -2
- package/dist/index40.js.map +1 -1
- package/dist/index41.js +87 -2
- package/dist/index41.js.map +1 -1
- package/dist/index42.js +38 -2
- package/dist/index42.js.map +1 -1
- package/dist/index43.js +29 -2
- package/dist/index43.js.map +1 -1
- package/dist/index44.js +1 -1
- package/dist/index44.js.map +1 -1
- package/dist/index45.js +1 -1
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +1 -1
- package/dist/index46.js.map +1 -1
- package/dist/index47.js +1 -1
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +1 -1
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +1 -1
- package/dist/index49.js.map +1 -1
- package/dist/index5.js +1 -1
- package/dist/index50.js +1 -1
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +1 -1
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +1 -1
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +1 -1
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +1 -1
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +2 -2
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +1 -1
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +1 -1
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +1 -1
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +2 -2
- package/dist/index59.js.map +1 -1
- package/dist/index60.js +1 -1
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +2 -2
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +1 -1
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +1 -1
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +1 -1
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +2 -2
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +1 -1
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +1 -1
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +1 -1
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +1 -1
- package/dist/index69.js.map +1 -1
- package/dist/index70.js +1 -1
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +1 -1
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +1 -1
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +1 -1
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +1 -1
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +1 -1
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +1 -1
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +1 -1
- package/dist/index77.js.map +1 -1
- package/dist/index78.js +2 -2
- package/dist/index78.js.map +1 -1
- package/dist/index79.js +2 -2
- package/dist/index79.js.map +1 -1
- package/dist/index80.js +1 -1
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +1 -1
- package/dist/index81.js.map +1 -1
- package/dist/index82.js +2 -2
- package/dist/index82.js.map +1 -1
- package/dist/index83.js +2 -2
- package/dist/index83.js.map +1 -1
- package/dist/index84.js +2 -2
- package/dist/index84.js.map +1 -1
- package/dist/index85.js +1 -1
- package/dist/index85.js.map +1 -1
- package/dist/index86.js +1 -1
- package/dist/index86.js.map +1 -1
- package/dist/index87.js +2 -2
- package/dist/index87.js.map +1 -1
- package/dist/index88.js +1 -1
- package/dist/index88.js.map +1 -1
- package/dist/index89.js +1 -1
- package/dist/index89.js.map +1 -1
- package/dist/index90.js +1 -1
- package/dist/index90.js.map +1 -1
- package/dist/index91.js +1 -1
- package/dist/index91.js.map +1 -1
- package/dist/index92.js +2 -2
- package/dist/index92.js.map +1 -1
- package/dist/index93.js +1 -1
- package/dist/index93.js.map +1 -1
- package/dist/index94.js +2 -2
- package/dist/index94.js.map +1 -1
- package/dist/index95.js +1 -1
- package/dist/index95.js.map +1 -1
- package/dist/index96.js +2 -2
- package/dist/index96.js.map +1 -1
- package/dist/index97.js +2 -149
- package/dist/index97.js.map +1 -1
- package/dist/index98.js +5 -0
- package/dist/index98.js.map +1 -0
- package/dist/index99.js +5 -0
- package/dist/index99.js.map +1 -0
- package/package.json +1 -1
- package/dist/index111.js +0 -1236
- package/dist/index111.js.map +0 -1
- package/dist/index112.js +0 -13
- package/dist/index112.js.map +0 -1
- package/dist/index113.js +0 -13
- package/dist/index113.js.map +0 -1
- package/dist/index114.js +0 -8
- package/dist/index114.js.map +0 -1
- package/dist/index115.js +0 -173
- package/dist/index115.js.map +0 -1
- package/dist/index116.js +0 -14
- package/dist/index116.js.map +0 -1
- package/dist/index117.js +0 -9
- package/dist/index117.js.map +0 -1
package/dist/index38.js
CHANGED
@@ -1,90 +1,74 @@
|
|
1
|
-
import
|
1
|
+
import e, { useState as x } from "react";
|
2
|
+
import { Icon as l } from "./index4.js";
|
3
|
+
import { Button as p } from "./index3.js";
|
2
4
|
/* empty css */
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
5
|
+
const r = {
|
6
|
+
messageBarCtn: "min-h-[45px] fixed top-0 w-full flex items-center justify-center py-2",
|
7
|
+
messageCtn: "flex items-center justify-center gap-2 flex-wrap px-4 pr-12",
|
8
|
+
info: "bg-[var(--color-yellow-50)]",
|
9
|
+
alert: "bg-[var(--color-red-500)]",
|
10
|
+
nudge: "bg-[var(--color-blue-500)]",
|
11
|
+
infoMessage: "text-[var(--color-yellow-700)] text-center",
|
12
|
+
alertMessage: "text-[var(--color-white)] text-center",
|
13
|
+
closeIconCtn: "absolute right-[12px] cursor-pointer cursor-pointer hover:bg-[var(--color-gray-500)] rounded-full p-1",
|
14
|
+
customInfoClassBtn: "bg-[var(--color-yellow-50)] text-[var(--color-yellow-700)] hover:bg-[var(--color-yellow-50)] border border-[var(--color-yellow-700)] hover:border-[var(--color-yellow-900)]",
|
15
|
+
customAlertClassBtn: "bg-[var(--color-red-500)] text-[var(--color-white)] hover:bg-[var(--color-red-500)] border border-[var(--color-white)] hover:border-[var(--color-white)]",
|
16
|
+
customNudgeClassBtn: "bg-[var(--color-blue-500)] text-[var(--color-white)] hover:bg-[var(--color-blue-500)] border border-[var(--color-white)] hover:border-[var(--color-white)]"
|
17
|
+
}, I = ({
|
18
|
+
messageBarCtnClassName: s = "",
|
19
|
+
messageBarType: o = "info",
|
20
|
+
message: a = "",
|
21
|
+
hasCloseIcon: c = !1,
|
22
|
+
hasButton: n = !1,
|
23
|
+
buttonLabel: i = "",
|
24
|
+
buttonOnClick: m = () => {
|
25
|
+
},
|
26
|
+
handleClose: t = () => {
|
27
|
+
}
|
11
28
|
}) => {
|
12
|
-
const [
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
const k = (e) => {
|
29
|
-
const n = e.replace(/\D/g, "");
|
30
|
-
console.log("numericValue", n), h(n), f(n);
|
31
|
-
};
|
32
|
-
return /* @__PURE__ */ t.createElement("div", {
|
33
|
-
className: "phone-input-container-se-design-main-container"
|
34
|
-
}, /* @__PURE__ */ t.createElement("div", {
|
35
|
-
className: `phone-input-container-se-design-main ${m ? "error" : ""}`,
|
36
|
-
ref: l
|
37
|
-
}, /* @__PURE__ */ t.createElement("div", {
|
38
|
-
className: "phone-input-container-se-design"
|
39
|
-
}, /* @__PURE__ */ t.createElement("div", {
|
40
|
-
className: "phone-input-container-se-design-country-code",
|
41
|
-
onClick: () => {
|
42
|
-
i(!r);
|
29
|
+
const [u, v] = x(!0), b = e.useCallback(() => {
|
30
|
+
v(!1);
|
31
|
+
const h = setTimeout(() => {
|
32
|
+
t == null || t();
|
33
|
+
}, 300);
|
34
|
+
return () => clearTimeout(h);
|
35
|
+
}, [t]), f = o === "info" ? r.infoMessage : r.alertMessage, g = e.useMemo(() => {
|
36
|
+
switch (o) {
|
37
|
+
case "info":
|
38
|
+
return r.customInfoClassBtn;
|
39
|
+
case "alert":
|
40
|
+
return r.customAlertClassBtn;
|
41
|
+
case "nudge":
|
42
|
+
return r.customNudgeClassBtn;
|
43
|
+
default:
|
44
|
+
return "";
|
43
45
|
}
|
44
|
-
},
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
className:
|
51
|
-
}
|
52
|
-
className:
|
53
|
-
}
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
className:
|
62
|
-
}, /* @__PURE__ */
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
}), /* @__PURE__ */ t.createElement("input", {
|
68
|
-
type: "text",
|
69
|
-
placeholder: "Search",
|
70
|
-
className: "phone-input-container-se-design-country-code-list-item-input",
|
71
|
-
onChange: V,
|
72
|
-
value: L
|
73
|
-
})), p.length > 0 ? p.map((e) => /* @__PURE__ */ t.createElement("div", {
|
74
|
-
key: e.code,
|
75
|
-
className: "phone-input-container-se-design-country-code-list-item",
|
76
|
-
onClick: () => b(e.dial_code)
|
77
|
-
}, /* @__PURE__ */ t.createElement("img", {
|
78
|
-
src: `https://flagcdn.com/${e.code.toLowerCase()}.svg`,
|
79
|
-
alt: e.name,
|
80
|
-
width: "16"
|
81
|
-
}), /* @__PURE__ */ t.createElement("span", null, e.name), /* @__PURE__ */ t.createElement("span", null, "(", e.dial_code, ")"))) : /* @__PURE__ */ t.createElement("div", {
|
82
|
-
className: "phone-input-container-se-design-country-code-list-item-no-resuts"
|
83
|
-
}, "No results found"))), m && /* @__PURE__ */ t.createElement("div", {
|
84
|
-
className: "error-message"
|
85
|
-
}, N));
|
46
|
+
}, [o]), d = o === "info" ? "info-brown" : "info-white", w = o === "info" ? "close" : "white-close";
|
47
|
+
return /* @__PURE__ */ e.createElement("div", {
|
48
|
+
className: `se-design-message-bar ${s} ${r.messageBarCtn} ${r[o]} ${u ? "show" : "hide"}`
|
49
|
+
}, /* @__PURE__ */ e.createElement("div", {
|
50
|
+
className: r.messageCtn
|
51
|
+
}, /* @__PURE__ */ e.createElement("div", {
|
52
|
+
className: "inline-flex items-center"
|
53
|
+
}, /* @__PURE__ */ e.createElement("span", {
|
54
|
+
className: f
|
55
|
+
}, /* @__PURE__ */ e.createElement(l, {
|
56
|
+
name: d,
|
57
|
+
className: "inline-block h-fit relative top-[3px] mr-1"
|
58
|
+
}), a, n && /* @__PURE__ */ e.createElement(p, {
|
59
|
+
label: i,
|
60
|
+
type: "primary",
|
61
|
+
size: "sm",
|
62
|
+
onClick: m,
|
63
|
+
className: `${g} ml-2 alert-btn`
|
64
|
+
})))), c && /* @__PURE__ */ e.createElement(l, {
|
65
|
+
name: w,
|
66
|
+
className: r.closeIconCtn,
|
67
|
+
onClick: b
|
68
|
+
}));
|
86
69
|
};
|
87
70
|
export {
|
88
|
-
|
71
|
+
I as MessageBar,
|
72
|
+
I as default
|
89
73
|
};
|
90
74
|
//# sourceMappingURL=index38.js.map
|
package/dist/index38.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index38.js","sources":["../src/components/
|
1
|
+
{"version":3,"file":"index38.js","sources":["../src/components/MessageBar/index.tsx"],"sourcesContent":["import React, { FC, useState } from 'react';\nimport { Map } from 'src/utils/common.types';\nimport { Icon } from '../Icon';\nimport { Button } from '../Button';\nimport './style.scss';\n\nexport interface MessageBarProps {\n messageBarCtnClassName?: string;\n messageBarType: 'info' | 'alert' | 'nudge';\n message: string;\n hasCloseIcon?: boolean;\n hasButton?: boolean,\n buttonLabel: string | '',\n buttonOnClick?: () => void,\n handleClose?: () => void,\n}\n\nconst classNames: Map = {\n messageBarCtn: \"min-h-[45px] fixed top-0 w-full flex items-center justify-center py-2\",\n messageCtn: \"flex items-center justify-center gap-2 flex-wrap px-4 pr-12\",\n info: \"bg-[var(--color-yellow-50)]\",\n alert: \"bg-[var(--color-red-500)]\",\n nudge: \"bg-[var(--color-blue-500)]\",\n infoMessage: \"text-[var(--color-yellow-700)] text-center\", \n alertMessage: \"text-[var(--color-white)] text-center\",\n closeIconCtn: \"absolute right-[12px] cursor-pointer cursor-pointer hover:bg-[var(--color-gray-500)] rounded-full p-1\",\n customInfoClassBtn: \"bg-[var(--color-yellow-50)] text-[var(--color-yellow-700)] hover:bg-[var(--color-yellow-50)] border border-[var(--color-yellow-700)] hover:border-[var(--color-yellow-900)]\",\n customAlertClassBtn: \"bg-[var(--color-red-500)] text-[var(--color-white)] hover:bg-[var(--color-red-500)] border border-[var(--color-white)] hover:border-[var(--color-white)]\",\n customNudgeClassBtn: \"bg-[var(--color-blue-500)] text-[var(--color-white)] hover:bg-[var(--color-blue-500)] border border-[var(--color-white)] hover:border-[var(--color-white)]\",\n};\n\nexport const MessageBar: FC<MessageBarProps> = ({\n messageBarCtnClassName = \"\",\n messageBarType = 'info',\n message = '',\n hasCloseIcon = false,\n hasButton = false,\n buttonLabel = '',\n buttonOnClick = () => {},\n handleClose = () => {},\n}) => {\n const [visible, setVisible] = useState(true);\n\n const handleClickOnCloseIcon = React.useCallback(() => {\n setVisible(false);\n const timer = setTimeout(() => {\n handleClose?.();\n }, 300);\n return () => clearTimeout(timer);\n }, [handleClose]);\n\n const messageClass = messageBarType === 'info' ? classNames.infoMessage : classNames.alertMessage;\n \n const buttonClassName = React.useMemo(() => {\n switch(messageBarType) {\n case 'info': return classNames.customInfoClassBtn;\n case 'alert': return classNames.customAlertClassBtn;\n case 'nudge': return classNames.customNudgeClassBtn;\n default: return '';\n }\n }, [messageBarType]);\n\n const iconName = messageBarType === 'info' ? \"info-brown\" : \"info-white\";\n const closeIconName = messageBarType === 'info' ? \"close\" : \"white-close\";\n\n return (\n <div className={`se-design-message-bar ${messageBarCtnClassName} ${classNames.messageBarCtn} ${classNames[messageBarType]} ${visible ? \"show\" : \"hide\"}`}>\n <div className={classNames.messageCtn}>\n <div className=\"inline-flex items-center\">\n <span className={messageClass}>\n <Icon name={iconName} className=\"inline-block h-fit relative top-[3px] mr-1\"/>\n {message}\n {hasButton && (\n <Button \n label={buttonLabel} \n type='primary' \n size=\"sm\" \n onClick={buttonOnClick}\n className={`${buttonClassName} ml-2 alert-btn`}\n />\n )}\n </span>\n </div>\n </div>\n {hasCloseIcon && (\n <Icon \n name={closeIconName} \n className={classNames.closeIconCtn} \n onClick={handleClickOnCloseIcon} \n />\n )}\n </div>\n );\n};\n\nexport default MessageBar;"],"names":["React__default","useState","Icon","Button","classNames","messageBarCtn","messageCtn","info","alert","nudge","infoMessage","alertMessage","closeIconCtn","customInfoClassBtn","customAlertClassBtn","customNudgeClassBtn","MessageBar","messageBarCtnClassName","messageBarType","message","hasCloseIcon","hasButton","buttonLabel","buttonOnClick","handleClose","visible","setVisible","handleClickOnCloseIcon","React","useCallback","timer","setTimeout","clearTimeout","messageClass","buttonClassName","useMemo","iconName","closeIconName","createElement","className","name","label","type","size","onClick"],"mappings":"AAiBA,OAAAA,KAAA,YAAAC,SAAA;AAAA,SAAA,QAAAC,SAAA;AAAA,SAAA,UAAAC,SAAA;AAAA,OAAA;AAAA,MAAMC,IAAkB;AAAA,EACtBC,eAAe;AAAA,EACfC,YAAY;AAAA,EACZC,MAAM;AAAA,EACNC,OAAO;AAAA,EACPC,OAAO;AAAA,EACPC,aAAa;AAAA,EACbC,cAAc;AAAA,EACdC,cAAc;AAAA,EACdC,oBAAoB;AAAA,EACpBC,qBAAqB;AAAA,EACrBC,qBAAqB;AACvB,GAEaC,IAAkCA,CAAC;AAAA,EAC9CC,wBAAAA,IAAyB;AAAA,EACzBC,gBAAAA,IAAiB;AAAA,EACjBC,SAAAA,IAAU;AAAA,EACVC,cAAAA,IAAe;AAAA,EACfC,WAAAA,IAAY;AAAA,EACZC,aAAAA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,KACCO,gBAAAA,EAAAU,cAACnC,GAAM;AAAA,IACLsC,OAAOnB;AAAAA,IACPoB,MAAK;AAAA,IACLC,MAAK;AAAA,IACLC,SAASrB;AAAAA,IACTgB,WAAW,GAAGL,CAAe;AAAA,EAAA,CAC9B,CAEC,CACH,CACF,GACJd,KACCQ,gBAAAA,EAAAU,cAACpC,GAAI;AAAA,IACHsC,MAAMH;AAAAA,IACNE,WAAWnC,EAAWQ;AAAAA,IACtBgC,SAASjB;AAAAA,EAAAA,CACV,CAEA;AAET;"}
|
package/dist/index39.js
CHANGED
@@ -1,41 +1,57 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
import e, { useState as f, useEffect as g } from "react";
|
2
|
+
import { Icon as o } from "./index4.js";
|
3
|
+
/* empty css */
|
4
|
+
const t = {
|
5
|
+
toastBarCtn: "min-h-[45px] fixed top-0 w-full flex items-center justify-center flex-wrap",
|
6
|
+
success: "linear-gradient(90deg, var(--color-green-700) 0%, var(--color-green-400) 100%)",
|
7
|
+
error: "linear-gradient(90deg, var(--color-red-700) 0%, var(--color-red-500) 100%)",
|
8
|
+
info: "var(--color-gray-700)",
|
9
|
+
toastMessageCtn: "flex items-center gap-2",
|
10
|
+
toastMessage: "text-[var(--color-white)] text-center word-break",
|
11
|
+
closeIconCtn: "absolute right-[12px] cursor-pointer cursor-pointer hover:bg-[var(--color-gray-500)] rounded-full p-1"
|
12
|
+
}, x = ({
|
13
|
+
toastBarCtnClassName: c = "",
|
14
|
+
toastType: a,
|
15
|
+
toastMessage: n = "",
|
16
|
+
shouldAutoClose: i = !1,
|
17
|
+
delay: l = 5e3,
|
18
|
+
onClose: r = () => {
|
19
|
+
}
|
8
20
|
}) => {
|
9
|
-
const
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
21
|
+
const [m, u] = f(!0);
|
22
|
+
g(() => {
|
23
|
+
if (i) {
|
24
|
+
const d = setTimeout(() => {
|
25
|
+
s();
|
26
|
+
}, l);
|
27
|
+
return () => clearTimeout(d);
|
15
28
|
}
|
16
|
-
},
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
}
|
24
|
-
|
25
|
-
|
26
|
-
r: t,
|
27
|
-
stroke: s,
|
28
|
-
strokeWidth: r,
|
29
|
-
strokeDasharray: c,
|
30
|
-
strokeDashoffset: l,
|
31
|
-
fill: "none",
|
32
|
-
strokeLinecap: "round",
|
29
|
+
}, []);
|
30
|
+
const s = () => {
|
31
|
+
setTimeout(() => {
|
32
|
+
u(!1), setTimeout(() => {
|
33
|
+
r == null || r();
|
34
|
+
}, 300);
|
35
|
+
}, 300);
|
36
|
+
};
|
37
|
+
return /* @__PURE__ */ e.createElement("div", {
|
38
|
+
className: `se-design-toast-bar ${c} ${t.toastBarCtn} ${m ? "show" : "hide"}`,
|
33
39
|
style: {
|
34
|
-
|
40
|
+
background: t[a]
|
35
41
|
}
|
42
|
+
}, /* @__PURE__ */ e.createElement("div", {
|
43
|
+
className: t.toastMessageCtn
|
44
|
+
}, /* @__PURE__ */ e.createElement(o, {
|
45
|
+
name: a === "info" ? "info-white" : "checked-circle-white"
|
46
|
+
}), /* @__PURE__ */ e.createElement("span", {
|
47
|
+
className: t.toastMessage
|
48
|
+
}, n)), /* @__PURE__ */ e.createElement(o, {
|
49
|
+
name: "white-close",
|
50
|
+
className: t.closeIconCtn,
|
51
|
+
onClick: s
|
36
52
|
}));
|
37
53
|
};
|
38
54
|
export {
|
39
|
-
|
55
|
+
x as ToastBar
|
40
56
|
};
|
41
57
|
//# sourceMappingURL=index39.js.map
|
package/dist/index39.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index39.js","sources":["../src/components/
|
1
|
+
{"version":3,"file":"index39.js","sources":["../src/components/ToastBar/index.tsx"],"sourcesContent":["import React, { FC, useEffect, useState } from \"react\";\nimport { Map } from \"../../utils/common.types\";\nimport { Icon } from \"../Icon\";\nimport \"./style.scss\";\n\nexport interface ToastBarProps {\n toastBarCtnClassName?: string;\n toastType: \"success\" | \"error\" | \"info\";\n toastMessage: string;\n shouldAutoClose?: boolean;\n delay?: number;\n onClose?: () => void;\n}\n\nconst classNames: Map = {\n toastBarCtn: \"min-h-[45px] fixed top-0 w-full flex items-center justify-center flex-wrap\",\n success: \"linear-gradient(90deg, var(--color-green-700) 0%, var(--color-green-400) 100%)\",\n error: \"linear-gradient(90deg, var(--color-red-700) 0%, var(--color-red-500) 100%)\",\n info: \"var(--color-gray-700)\", \n toastMessageCtn: \"flex items-center gap-2\",\n toastMessage: \"text-[var(--color-white)] text-center word-break\",\n closeIconCtn: \"absolute right-[12px] cursor-pointer cursor-pointer hover:bg-[var(--color-gray-500)] rounded-full p-1\",\n};\n\nexport const ToastBar: FC<ToastBarProps> = ({\n toastBarCtnClassName = \"\",\n toastType,\n toastMessage = \"\",\n shouldAutoClose = false,\n delay = 5000,\n onClose = () => {}\n}) => {\n const [visible, setVisible] = useState(true);\n\n useEffect(() => {\n if (shouldAutoClose) {\n const timer = setTimeout(() => {\n handleClose();\n }, delay);\n return () => clearTimeout(timer);\n }\n }, []);\n\n const handleClose = () => {\n setTimeout(() => {\n setVisible(false);\n setTimeout(() => {\n onClose?.();\n }, 300);\n }, 300);\n };\n\n return (\n <div\n className={`se-design-toast-bar ${toastBarCtnClassName} ${classNames.toastBarCtn} ${visible ? \"show\" : \"hide\"}`}\n style={{ background: classNames[toastType] }}\n >\n <div className={classNames.toastMessageCtn} >\n <Icon name={toastType === \"info\" ? \"info-white\" : \"checked-circle-white\"} />\n <span className={classNames.toastMessage}>{toastMessage}</span>\n </div>\n <Icon name=\"white-close\" className={classNames.closeIconCtn} onClick={handleClose} />\n </div>\n );\n};"],"names":["React__default","useState","useEffect","Icon","classNames","toastBarCtn","success","error","info","toastMessageCtn","toastMessage","closeIconCtn","ToastBar","toastBarCtnClassName","toastType","shouldAutoClose","delay","onClose","visible","setVisible","timer","setTimeout","handleClose","clearTimeout","React","createElement","className","style","background","name","onClick"],"mappings":"AAcA,OAAAA,KAAA,YAAAC,GAAA,aAAAC,SAAA;AAAA,SAAA,QAAAC,SAAA;AAAA,OAAA;AAAA,MAAMC,IAAkB;AAAA,EACtBC,aAAa;AAAA,EACbC,SAAS;AAAA,EACTC,OAAO;AAAA,EACPC,MAAM;AAAA,EACNC,iBAAiB;AAAA,EACjBC,cAAc;AAAA,EACdC,cAAc;AAChB,GAEaC,IAA8BA,CAAC;AAAA,EAC1CC,sBAAAA,IAAuB;AAAA,EACvBC,WAAAA;AAAAA,EACAJ,cAAAA,IAAe;AAAA,EACfK,iBAAAA,IAAkB;AAAA,EAClBC,OAAAA,IAAQ;AAAA,EACRC,SAAAA,IAAUA,MAAM;AAAA,EAAA;AAClB,MAAM;AACJ,QAAM,CAACC,GAASC,CAAU,IAAIlB,EAAS,EAAI;AAE3CC,EAAAA,EAAU,MAAM;AACd,QAAIa,GAAiB;AACbK,YAAAA,IAAQC,WAAW,MAAM;AACjB,QAAAC,EAAA;AAAA,SACXN,CAAK;AACD,aAAA,MAAMO,aAAaH,CAAK;AAAA,IAAA;AAAA,EAEnC,GAAG,EAAE;AAEL,QAAME,IAAcA,MAAM;AACxBD,eAAW,MAAM;AACfF,MAAAA,EAAW,EAAK,GAChBE,WAAW,MAAM;AACL,QAAAJ,KAAA,QAAAA;AAAA,SACT,GAAG;AAAA,OACL,GAAG;AAAA,EACR;AAGEO,SAAAA,gBAAAA,EAAAC,cAAA,OAAA;AAAA,IACEC,WAAW,uBAAuBb,CAAoB,IAAIT,EAAWC,WAAW,IAAIa,IAAU,SAAS,MAAM;AAAA,IAC7GS,OAAO;AAAA,MAAEC,YAAYxB,EAAWU,CAAS;AAAA,IAAA;AAAA,EAAE,GAE3CW,gBAAAA,EAAAA,cAAA,OAAA;AAAA,IAAKC,WAAWtB,EAAWK;AAAAA,EAAAA,GACzBgB,gBAAAA,EAAAA,cAACtB,GAAI;AAAA,IAAC0B,MAAMf,MAAc,SAAS,eAAe;AAAA,EAAA,CAAyB,GAC3EW,gBAAAA,EAAAA,cAAA,QAAA;AAAA,IAAMC,WAAWtB,EAAWM;AAAAA,KAAeA,CAAmB,CAC3D,GACLc,gBAAAA,EAAAC,cAACtB,GAAI;AAAA,IAAC0B,MAAK;AAAA,IAAcH,WAAWtB,EAAWO;AAAAA,IAAcmB,SAASR;AAAAA,EAAAA,CAAc,CACjF;AAET;"}
|
package/dist/index4.js
CHANGED
@@ -1,63 +1,64 @@
|
|
1
|
-
import v from "./
|
2
|
-
import l from "./
|
3
|
-
import a from "./
|
4
|
-
import n from "./
|
5
|
-
import b from "./
|
6
|
-
import f from "./
|
7
|
-
import p from "./
|
8
|
-
import d from "./
|
9
|
-
import h from "./
|
10
|
-
import k from "./
|
11
|
-
import u from "./
|
12
|
-
import x from "./
|
13
|
-
import w from "./
|
14
|
-
import A from "./
|
15
|
-
import I from "./
|
16
|
-
import E from "./
|
17
|
-
import F from "./
|
18
|
-
import N from "./
|
19
|
-
import C from "./
|
20
|
-
import O from "./
|
21
|
-
import $ from "./
|
22
|
-
import j from "./
|
23
|
-
import y from "./
|
24
|
-
import M from "./
|
25
|
-
import P from "./
|
26
|
-
import R from "./
|
27
|
-
import S from "./
|
28
|
-
import G from "./
|
29
|
-
import T from "./
|
30
|
-
import V from "./
|
31
|
-
import q from "./
|
32
|
-
import z from "./
|
33
|
-
import B from "./
|
34
|
-
import D from "./
|
35
|
-
import H from "./
|
36
|
-
import J from "./
|
37
|
-
import K from "./
|
38
|
-
import L from "./
|
39
|
-
import Q from "./
|
40
|
-
import U from "./
|
41
|
-
import W from "./
|
42
|
-
import X from "./
|
43
|
-
import Y from "./
|
44
|
-
import Z from "./
|
45
|
-
import ss from "./
|
46
|
-
import os from "./
|
47
|
-
import _s from "./
|
48
|
-
import is from "./
|
49
|
-
import ts from "./
|
50
|
-
import rs from "./
|
51
|
-
import es from "./
|
52
|
-
import cs from "./
|
53
|
-
import ms from "./
|
54
|
-
import gs from "./
|
55
|
-
import vs from "./
|
56
|
-
import ls from "./
|
57
|
-
import as from "./
|
1
|
+
import v from "./index44.js";
|
2
|
+
import l from "./index45.js";
|
3
|
+
import a from "./index46.js";
|
4
|
+
import n from "./index47.js";
|
5
|
+
import b from "./index48.js";
|
6
|
+
import f from "./index49.js";
|
7
|
+
import p from "./index50.js";
|
8
|
+
import d from "./index51.js";
|
9
|
+
import h from "./index52.js";
|
10
|
+
import k from "./index53.js";
|
11
|
+
import u from "./index54.js";
|
12
|
+
import x from "./index55.js";
|
13
|
+
import w from "./index56.js";
|
14
|
+
import A from "./index57.js";
|
15
|
+
import I from "./index58.js";
|
16
|
+
import E from "./index59.js";
|
17
|
+
import F from "./index60.js";
|
18
|
+
import N from "./index61.js";
|
19
|
+
import C from "./index62.js";
|
20
|
+
import O from "./index63.js";
|
21
|
+
import $ from "./index64.js";
|
22
|
+
import j from "./index65.js";
|
23
|
+
import y from "./index66.js";
|
24
|
+
import M from "./index67.js";
|
25
|
+
import P from "./index68.js";
|
26
|
+
import R from "./index69.js";
|
27
|
+
import S from "./index70.js";
|
28
|
+
import G from "./index71.js";
|
29
|
+
import T from "./index72.js";
|
30
|
+
import V from "./index73.js";
|
31
|
+
import q from "./index74.js";
|
32
|
+
import z from "./index75.js";
|
33
|
+
import B from "./index76.js";
|
34
|
+
import D from "./index77.js";
|
35
|
+
import H from "./index78.js";
|
36
|
+
import J from "./index79.js";
|
37
|
+
import K from "./index80.js";
|
38
|
+
import L from "./index81.js";
|
39
|
+
import Q from "./index82.js";
|
40
|
+
import U from "./index83.js";
|
41
|
+
import W from "./index84.js";
|
42
|
+
import X from "./index85.js";
|
43
|
+
import Y from "./index86.js";
|
44
|
+
import Z from "./index87.js";
|
45
|
+
import ss from "./index88.js";
|
46
|
+
import os from "./index89.js";
|
47
|
+
import _s from "./index90.js";
|
48
|
+
import is from "./index91.js";
|
49
|
+
import ts from "./index92.js";
|
50
|
+
import rs from "./index93.js";
|
51
|
+
import es from "./index94.js";
|
52
|
+
import cs from "./index95.js";
|
53
|
+
import ms from "./index96.js";
|
54
|
+
import gs from "./index97.js";
|
55
|
+
import vs from "./index98.js";
|
56
|
+
import ls from "./index99.js";
|
57
|
+
import as from "./index100.js";
|
58
|
+
import ns from "./index101.js";
|
58
59
|
import r from "react";
|
59
|
-
import { ReactSVG as
|
60
|
-
const
|
60
|
+
import { ReactSVG as bs } from "./index102.js";
|
61
|
+
const fs = /* @__PURE__ */ Object.assign({
|
61
62
|
"/src/assets/icons/attachment.svg": v,
|
62
63
|
"/src/assets/icons/back.svg": l,
|
63
64
|
"/src/assets/icons/banner-demo-img.svg": a,
|
@@ -102,35 +103,36 @@ const bs = /* @__PURE__ */ Object.assign({
|
|
102
103
|
"/src/assets/icons/photo.svg": X,
|
103
104
|
"/src/assets/icons/radio-field.svg": Y,
|
104
105
|
"/src/assets/icons/rightSide.svg": Z,
|
105
|
-
"/src/assets/icons/
|
106
|
-
"/src/assets/icons/
|
107
|
-
"/src/assets/icons/
|
108
|
-
"/src/assets/icons/
|
109
|
-
"/src/assets/icons/
|
110
|
-
"/src/assets/icons/
|
111
|
-
"/src/assets/icons/
|
112
|
-
"/src/assets/icons/
|
113
|
-
"/src/assets/icons/
|
114
|
-
"/src/assets/icons/
|
115
|
-
"/src/assets/icons/
|
116
|
-
"/src/assets/icons/
|
117
|
-
"/src/assets/icons/
|
106
|
+
"/src/assets/icons/rounded-plus.svg": ss,
|
107
|
+
"/src/assets/icons/search.svg": os,
|
108
|
+
"/src/assets/icons/signature-field.svg": _s,
|
109
|
+
"/src/assets/icons/slideout.svg": is,
|
110
|
+
"/src/assets/icons/sms.svg": ts,
|
111
|
+
"/src/assets/icons/sort.svg": rs,
|
112
|
+
"/src/assets/icons/space.svg": es,
|
113
|
+
"/src/assets/icons/stamp-field.svg": cs,
|
114
|
+
"/src/assets/icons/text-field.svg": ms,
|
115
|
+
"/src/assets/icons/tick.svg": gs,
|
116
|
+
"/src/assets/icons/title-field.svg": vs,
|
117
|
+
"/src/assets/icons/webinar-widget.svg": ls,
|
118
|
+
"/src/assets/icons/white-close.svg": as,
|
119
|
+
"/src/assets/icons/widget-demo-image.svg": ns
|
118
120
|
}), e = (s, o, _) => {
|
119
121
|
o && s.hasAttribute("fill") && s.getAttribute("fill") !== "none" && s.setAttribute("fill", o), _ && s.hasAttribute("stroke") && s.setAttribute("stroke", _), Array.from(s.children).forEach((i) => {
|
120
122
|
e(i, o, _);
|
121
123
|
});
|
122
|
-
},
|
124
|
+
}, Ao = (s) => {
|
123
125
|
const {
|
124
126
|
name: o = "",
|
125
127
|
className: _ = "",
|
126
128
|
onClick: i,
|
127
129
|
fill: c,
|
128
130
|
stroke: m
|
129
|
-
} = s, t =
|
131
|
+
} = s, t = fs[`/src/assets/icons/${o}.svg`];
|
130
132
|
return t ? /* @__PURE__ */ r.createElement("div", {
|
131
|
-
className: `se-design-svg-wrapper ${_}`,
|
133
|
+
className: `se-design-svg-wrapper transition-transform duration-250 ease-linear ${_}`,
|
132
134
|
onClick: i
|
133
|
-
}, /* @__PURE__ */ r.createElement(
|
135
|
+
}, /* @__PURE__ */ r.createElement(bs, {
|
134
136
|
src: t,
|
135
137
|
wrapper: "span",
|
136
138
|
beforeInjection: (g) => {
|
@@ -139,6 +141,6 @@ const bs = /* @__PURE__ */ Object.assign({
|
|
139
141
|
})) : (console.error(`Icon "${o}" not found in ICON_MAP.`), null);
|
140
142
|
};
|
141
143
|
export {
|
142
|
-
|
144
|
+
Ao as Icon
|
143
145
|
};
|
144
146
|
//# sourceMappingURL=index4.js.map
|
package/dist/index4.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index4.js","sources":["../src/components/Icon/index.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { ReactSVG } from 'react-svg';\n\n// Dynamically import icons using Vite's asset handling\nconst ICON_MAP: Record<string, string> = (import.meta as any).glob('/src/assets/icons/*.svg', { eager: true, query: '?url', import: 'default' });\n\nexport type IconProps = {\n name: string;\n className?: string;\n onClick?: () => void;\n fill?: string;\n stroke?: string;\n}\n\nconst applyAttributesToElement = (element: Element, fill?: string, stroke?: string) => {\n // Only modify existing attributes\n if (fill && element.hasAttribute('fill')) {\n const currentFill = element.getAttribute('fill');\n // Only update if the current fill is not \"none\"\n if (currentFill !== 'none') {\n element.setAttribute('fill', fill);\n }\n }\n \n if (stroke && element.hasAttribute('stroke')) {\n element.setAttribute('stroke', stroke);\n }\n \n // Recursively apply to all child elements\n Array.from(element.children).forEach(child => {\n applyAttributesToElement(child, fill, stroke);\n });\n};\n\nexport const Icon: FC<IconProps> = (props) => {\n const { name = '', className = '', onClick, fill, stroke } = props;\n\n const src = ICON_MAP[`/src/assets/icons/${name}.svg`];\n\n if (!src) {\n console.error(`Icon \"${name}\" not found in ICON_MAP.`);\n return null;\n }\n\n return (\n <div className={`se-design-svg-wrapper ${className}`} onClick={onClick}>\n <ReactSVG \n src={src} \n wrapper=\"span\" \n beforeInjection={(svg) => {\n applyAttributesToElement(svg, fill, stroke);\n }}\n />\n </div>\n );\n};\n"],"names":["ICON_MAP","import","applyAttributesToElement","element","fill","stroke","hasAttribute","getAttribute","setAttribute","Array","from","children","forEach","child","Icon","props","name","className","onClick","src","React","createElement","ReactSVG","wrapper","beforeInjection","svg","error"],"mappings":"
|
1
|
+
{"version":3,"file":"index4.js","sources":["../src/components/Icon/index.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { ReactSVG } from 'react-svg';\n\n// Dynamically import icons using Vite's asset handling\nconst ICON_MAP: Record<string, string> = (import.meta as any).glob('/src/assets/icons/*.svg', { eager: true, query: '?url', import: 'default' });\n\nexport type IconProps = {\n name: string;\n className?: string;\n onClick?: () => void;\n fill?: string;\n stroke?: string;\n}\n\nconst applyAttributesToElement = (element: Element, fill?: string, stroke?: string) => {\n // Only modify existing attributes\n if (fill && element.hasAttribute('fill')) {\n const currentFill = element.getAttribute('fill');\n // Only update if the current fill is not \"none\"\n if (currentFill !== 'none') {\n element.setAttribute('fill', fill);\n }\n }\n \n if (stroke && element.hasAttribute('stroke')) {\n element.setAttribute('stroke', stroke);\n }\n \n // Recursively apply to all child elements\n Array.from(element.children).forEach(child => {\n applyAttributesToElement(child, fill, stroke);\n });\n};\n\nexport const Icon: FC<IconProps> = (props) => {\n const { name = '', className = '', onClick, fill, stroke } = props;\n\n const src = ICON_MAP[`/src/assets/icons/${name}.svg`];\n\n if (!src) {\n console.error(`Icon \"${name}\" not found in ICON_MAP.`);\n return null;\n }\n\n return (\n <div className={`se-design-svg-wrapper transition-transform duration-250 ease-linear ${className}`} onClick={onClick}>\n <ReactSVG \n src={src} \n wrapper=\"span\" \n beforeInjection={(svg) => {\n applyAttributesToElement(svg, fill, stroke);\n }}\n />\n </div>\n );\n};\n"],"names":["ICON_MAP","import","applyAttributesToElement","element","fill","stroke","hasAttribute","getAttribute","setAttribute","Array","from","children","forEach","child","Icon","props","name","className","onClick","src","React","createElement","ReactSVG","wrapper","beforeInjection","svg","error"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAMA,KAAoCC,uBAAAA,OAAAA;AAAAA,EAAAA,oCAAAA;AAAAA,EAAAA,8BAAAA;AAAAA,EAAAA,yCAAAA;AAAAA,EAAAA,iDAAAA;AAAAA,EAAAA,gDAAAA;AAAAA,EAAAA,2CAAAA;AAAAA,EAAAA,wCAAAA;AAAAA,EAAAA,uCAAAA;AAAAA,EAAAA,6CAAAA;AAAAA,EAAAA,8CAAAA;AAAAA,EAAAA,6CAAAA;AAAAA,EAAAA,wCAAAA;AAAAA,EAAAA,uCAAAA;AAAAA,EAAAA,iDAAAA;AAAAA,EAAAA,8CAAAA;AAAAA,EAAAA,8CAAAA;AAAAA,EAAAA,mCAAAA;AAAAA,EAAAA,+BAAAA;AAAAA,EAAAA,+BAAAA;AAAAA,EAAAA,oCAAAA;AAAAA,EAAAA,gCAAAA;AAAAA,EAA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