asterui 0.12.12 → 0.12.14
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/components/Button.d.ts +4 -0
- package/dist/components/Drawer.d.ts +47 -6
- package/dist/components/Dropdown.d.ts +65 -9
- package/dist/components/Input.d.ts +15 -1
- package/dist/components/Menu.d.ts +1 -1
- package/dist/components/Modal.d.ts +5 -1
- package/dist/components/Navbar.d.ts +15 -1
- package/dist/components/SidebarDrawer.d.ts +21 -0
- package/dist/components/Steps.d.ts +42 -6
- package/dist/components/Tabs.d.ts +30 -4
- package/dist/index.d.ts +7 -5
- package/dist/index.js +169 -167
- package/dist/index.js.map +1 -1
- package/dist/index100.js +44 -11
- package/dist/index100.js.map +1 -1
- package/dist/index101.js +10 -12
- package/dist/index101.js.map +1 -1
- package/dist/index102.js +14 -7
- package/dist/index102.js.map +1 -1
- package/dist/index103.js +7 -12
- package/dist/index103.js.map +1 -1
- package/dist/index104.js +11 -29
- package/dist/index104.js.map +1 -1
- package/dist/index105.js +29 -16
- package/dist/index105.js.map +1 -1
- package/dist/index106.js +21 -0
- package/dist/index106.js.map +1 -0
- package/dist/index21.js +1 -1
- package/dist/index26.js +171 -40
- package/dist/index26.js.map +1 -1
- package/dist/index27.js +41 -17
- package/dist/index27.js.map +1 -1
- package/dist/index28.js +17 -33
- package/dist/index28.js.map +1 -1
- package/dist/index29.js +33 -52
- package/dist/index29.js.map +1 -1
- package/dist/index30.js +50 -61
- package/dist/index30.js.map +1 -1
- package/dist/index31.js +60 -181
- package/dist/index31.js.map +1 -1
- package/dist/index32.js +184 -18
- package/dist/index32.js.map +1 -1
- package/dist/index33.js +15 -217
- package/dist/index33.js.map +1 -1
- package/dist/index34.js +216 -1083
- package/dist/index34.js.map +1 -1
- package/dist/index35.js +1086 -16
- package/dist/index35.js.map +1 -1
- package/dist/index36.js +16 -121
- package/dist/index36.js.map +1 -1
- package/dist/index37.js +119 -37
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +34 -208
- package/dist/index38.js.map +1 -1
- package/dist/index39.js +390 -89
- package/dist/index39.js.map +1 -1
- package/dist/index40.js +93 -158
- package/dist/index40.js.map +1 -1
- package/dist/index41.js +211 -135
- package/dist/index41.js.map +1 -1
- package/dist/index42.js +146 -15
- package/dist/index42.js.map +1 -1
- package/dist/index43.js +15 -17
- package/dist/index43.js.map +1 -1
- package/dist/index44.js +17 -21
- package/dist/index44.js.map +1 -1
- package/dist/index45.js +18 -134
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +134 -10
- package/dist/index46.js.map +1 -1
- package/dist/index47.js +13 -35
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +35 -34
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +34 -81
- package/dist/index49.js.map +1 -1
- package/dist/index50.js +71 -166
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +167 -144
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +152 -11
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +10 -20
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +22 -14
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +14 -7
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +6 -310
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +334 -17
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +47 -122
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +120 -108
- package/dist/index59.js.map +1 -1
- package/dist/index60.js +107 -167
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +167 -29
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +30 -120
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +116 -80
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +85 -19
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +19 -73
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +71 -54
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +56 -44
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +42 -49
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +52 -62
- package/dist/index69.js.map +1 -1
- package/dist/index70.js +56 -101
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +107 -41
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +41 -68
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +66 -19
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +18 -55
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +55 -251
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +254 -22
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +22 -31
- package/dist/index77.js.map +1 -1
- package/dist/index78.js +31 -22
- package/dist/index78.js.map +1 -1
- package/dist/index79.js +89 -324
- package/dist/index79.js.map +1 -1
- package/dist/index80.js +323 -50
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +79 -39
- package/dist/index81.js.map +1 -1
- package/dist/index82.js +40 -23
- package/dist/index82.js.map +1 -1
- package/dist/index83.js +21 -93
- package/dist/index83.js.map +1 -1
- package/dist/index84.js +87 -148
- package/dist/index84.js.map +1 -1
- package/dist/index85.js +147 -152
- package/dist/index85.js.map +1 -1
- package/dist/index86.js +159 -63
- package/dist/index86.js.map +1 -1
- package/dist/index87.js +65 -35
- package/dist/index87.js.map +1 -1
- package/dist/index88.js +35 -234
- package/dist/index88.js.map +1 -1
- package/dist/index89.js +231 -31
- package/dist/index89.js.map +1 -1
- package/dist/index9.js +69 -44
- package/dist/index9.js.map +1 -1
- package/dist/index90.js +34 -210
- package/dist/index90.js.map +1 -1
- package/dist/index91.js +195 -198
- package/dist/index91.js.map +1 -1
- package/dist/index92.js +159 -241
- package/dist/index92.js.map +1 -1
- package/dist/index93.js +283 -166
- package/dist/index93.js.map +1 -1
- package/dist/index94.js +173 -253
- package/dist/index94.js.map +1 -1
- package/dist/index95.js +258 -14
- package/dist/index95.js.map +1 -1
- package/dist/index96.js +12 -31
- package/dist/index96.js.map +1 -1
- package/dist/index97.js +32 -5
- package/dist/index97.js.map +1 -1
- package/dist/index98.js +5 -13
- package/dist/index98.js.map +1 -1
- package/dist/index99.js +11 -43
- package/dist/index99.js.map +1 -1
- package/package.json +1 -1
package/dist/index53.js
CHANGED
|
@@ -1,25 +1,15 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
const
|
|
1
|
+
import { jsxs as d, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
const b = ({
|
|
3
3
|
children: e,
|
|
4
|
-
|
|
5
|
-
highlight: r = !1,
|
|
4
|
+
url: s = "https://example.com",
|
|
6
5
|
className: o = "",
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
{
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
...a,
|
|
14
|
-
children: /* @__PURE__ */ t("code", { children: e })
|
|
15
|
-
}
|
|
16
|
-
), i = ({
|
|
17
|
-
children: e,
|
|
18
|
-
className: n = "",
|
|
19
|
-
...r
|
|
20
|
-
}) => /* @__PURE__ */ t("div", { className: `mockup-code ${n}`, ...r, children: e });
|
|
21
|
-
i.Line = c;
|
|
6
|
+
contentClassName: a = "",
|
|
7
|
+
...c
|
|
8
|
+
}) => /* @__PURE__ */ d("div", { className: `mockup-browser border border-base-300 ${o}`, ...c, children: [
|
|
9
|
+
/* @__PURE__ */ r("div", { className: "mockup-browser-toolbar", children: /* @__PURE__ */ r("div", { className: "input", children: s }) }),
|
|
10
|
+
/* @__PURE__ */ r("div", { className: `border-t border-base-300 ${a}`, children: e })
|
|
11
|
+
] });
|
|
22
12
|
export {
|
|
23
|
-
|
|
13
|
+
b as Browser
|
|
24
14
|
};
|
|
25
15
|
//# sourceMappingURL=index53.js.map
|
package/dist/index53.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index53.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index53.js","sources":["../src/components/Browser.tsx"],"sourcesContent":["import React from 'react'\n\nexport interface BrowserProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode\n url?: string\n contentClassName?: string\n}\n\nexport const Browser: React.FC<BrowserProps> = ({\n children,\n url = 'https://example.com',\n className = '',\n contentClassName = '',\n ...rest\n}) => {\n return (\n <div className={`mockup-browser border border-base-300 ${className}`} {...rest}>\n <div className=\"mockup-browser-toolbar\">\n <div className=\"input\">{url}</div>\n </div>\n <div className={`border-t border-base-300 ${contentClassName}`}>\n {children}\n </div>\n </div>\n )\n}\n"],"names":["Browser","children","url","className","contentClassName","rest","jsx"],"mappings":";AAQO,MAAMA,IAAkC,CAAC;AAAA,EAC9C,UAAAC;AAAA,EACA,KAAAC,IAAM;AAAA,EACN,WAAAC,IAAY;AAAA,EACZ,kBAAAC,IAAmB;AAAA,EACnB,GAAGC;AACL,wBAEK,OAAA,EAAI,WAAW,yCAAyCF,CAAS,IAAK,GAAGE,GACxE,UAAA;AAAA,EAAA,gBAAAC,EAAC,OAAA,EAAI,WAAU,0BACb,UAAA,gBAAAA,EAAC,SAAI,WAAU,SAAS,aAAI,EAAA,CAC9B;AAAA,oBACC,OAAA,EAAI,WAAW,4BAA4BF,CAAgB,IACzD,UAAAH,EAAA,CACH;AAAA,GACF;"}
|
package/dist/index54.js
CHANGED
|
@@ -1,17 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
3
|
-
children:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
const c = ({
|
|
3
|
+
children: e,
|
|
4
|
+
prefix: n = "$",
|
|
5
|
+
highlight: r = !1,
|
|
6
|
+
className: o = "",
|
|
7
|
+
...a
|
|
8
|
+
}) => /* @__PURE__ */ t(
|
|
9
|
+
"pre",
|
|
10
|
+
{
|
|
11
|
+
"data-prefix": n,
|
|
12
|
+
className: `${r ? "bg-warning text-warning-content" : ""} ${o}`,
|
|
13
|
+
...a,
|
|
14
|
+
children: /* @__PURE__ */ t("code", { children: e })
|
|
15
|
+
}
|
|
16
|
+
), i = ({
|
|
17
|
+
children: e,
|
|
18
|
+
className: n = "",
|
|
19
|
+
...r
|
|
20
|
+
}) => /* @__PURE__ */ t("div", { className: `mockup-code ${n}`, ...r, children: e });
|
|
21
|
+
i.Line = c;
|
|
14
22
|
export {
|
|
15
|
-
|
|
23
|
+
i as Code
|
|
16
24
|
};
|
|
17
25
|
//# sourceMappingURL=index54.js.map
|
package/dist/index54.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index54.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index54.js","sources":["../src/components/Code.tsx"],"sourcesContent":["import React from 'react'\n\nexport interface CodeLineProps extends React.HTMLAttributes<HTMLPreElement> {\n children: React.ReactNode\n prefix?: string\n highlight?: boolean\n}\n\nconst Line: React.FC<CodeLineProps> = ({\n children,\n prefix = '$',\n highlight = false,\n className = '',\n ...rest\n}) => {\n return (\n <pre\n data-prefix={prefix}\n className={`${highlight ? 'bg-warning text-warning-content' : ''} ${className}`}\n {...rest}\n >\n <code>{children}</code>\n </pre>\n )\n}\n\nexport interface CodeProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode\n}\n\nexport const Code: React.FC<CodeProps> & { Line: typeof Line } = ({\n children,\n className = '',\n ...rest\n}) => {\n return (\n <div className={`mockup-code ${className}`} {...rest}>\n {children}\n </div>\n )\n}\n\nCode.Line = Line\n"],"names":["Line","children","prefix","highlight","className","rest","jsx","Code"],"mappings":";AAQA,MAAMA,IAAgC,CAAC;AAAA,EACrC,UAAAC;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,WAAAC,IAAY;AAAA,EACZ,WAAAC,IAAY;AAAA,EACZ,GAAGC;AACL,MAEI,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,eAAaJ;AAAA,IACb,WAAW,GAAGC,IAAY,oCAAoC,EAAE,IAAIC,CAAS;AAAA,IAC5E,GAAGC;AAAA,IAEJ,UAAA,gBAAAC,EAAC,UAAM,UAAAL,EAAA,CAAS;AAAA,EAAA;AAAA,GASTM,IAAoD,CAAC;AAAA,EAChE,UAAAN;AAAA,EACA,WAAAG,IAAY;AAAA,EACZ,GAAGC;AACL,MAEI,gBAAAC,EAAC,SAAI,WAAW,eAAeF,CAAS,IAAK,GAAGC,GAC7C,UAAAJ,GACH;AAIJM,EAAK,OAAOP;"}
|
package/dist/index55.js
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
const
|
|
3
|
-
children:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { jsxs as p, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
const n = ({
|
|
3
|
+
children: s,
|
|
4
|
+
color: e,
|
|
5
|
+
className: a = "",
|
|
6
|
+
displayClassName: c = ""
|
|
7
|
+
}) => {
|
|
8
|
+
const m = e ? { borderColor: e } : {};
|
|
9
|
+
return /* @__PURE__ */ p("div", { className: `mockup-phone ${a}`, style: m, children: [
|
|
10
|
+
/* @__PURE__ */ o("div", { className: "mockup-phone-camera" }),
|
|
11
|
+
/* @__PURE__ */ o("div", { className: `mockup-phone-display ${c}`, children: s })
|
|
12
|
+
] });
|
|
13
|
+
};
|
|
7
14
|
export {
|
|
8
|
-
|
|
15
|
+
n as Phone
|
|
9
16
|
};
|
|
10
17
|
//# sourceMappingURL=index55.js.map
|
package/dist/index55.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index55.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index55.js","sources":["../src/components/Phone.tsx"],"sourcesContent":["import React from 'react'\n\nexport interface PhoneProps {\n children: React.ReactNode\n color?: string\n className?: string\n displayClassName?: string\n}\n\nexport const Phone: React.FC<PhoneProps> = ({\n children,\n color,\n className = '',\n displayClassName = '',\n}) => {\n const style: React.CSSProperties = color ? { borderColor: color } : {}\n\n return (\n <div className={`mockup-phone ${className}`} style={style}>\n <div className=\"mockup-phone-camera\"></div>\n <div className={`mockup-phone-display ${displayClassName}`}>\n {children}\n </div>\n </div>\n )\n}\n"],"names":["Phone","children","color","className","displayClassName","style","jsx"],"mappings":";AASO,MAAMA,IAA8B,CAAC;AAAA,EAC1C,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,kBAAAC,IAAmB;AACrB,MAAM;AACJ,QAAMC,IAA6BH,IAAQ,EAAE,aAAaA,EAAA,IAAU,CAAA;AAEpE,2BACG,OAAA,EAAI,WAAW,gBAAgBC,CAAS,IAAI,OAAAE,GAC3C,UAAA;AAAA,IAAA,gBAAAC,EAAC,OAAA,EAAI,WAAU,sBAAA,CAAsB;AAAA,sBACpC,OAAA,EAAI,WAAW,wBAAwBF,CAAgB,IACrD,UAAAH,EAAA,CACH;AAAA,EAAA,GACF;AAEJ;"}
|
package/dist/index56.js
CHANGED
|
@@ -1,314 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { createRoot as G } from "react-dom/client";
|
|
4
|
-
function u({
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
const a = ({
|
|
5
3
|
children: e,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
onOk: a,
|
|
10
|
-
onCancel: d,
|
|
11
|
-
okText: v = "OK",
|
|
12
|
-
cancelText: c = "Cancel",
|
|
13
|
-
maskClosable: h = !0,
|
|
14
|
-
closable: p = !0,
|
|
15
|
-
position: s,
|
|
16
|
-
align: b,
|
|
17
|
-
width: i,
|
|
18
|
-
centered: x,
|
|
19
|
-
onClose: g,
|
|
20
|
-
className: W = "",
|
|
21
|
-
...z
|
|
22
|
-
}) {
|
|
23
|
-
const y = $(null), L = $(null), [M, C] = N.useState(!1), j = E(), T = E(), f = g || d;
|
|
24
|
-
R(() => {
|
|
25
|
-
const o = y.current;
|
|
26
|
-
o && (l ? o.open || (L.current = document.activeElement, o.showModal()) : o.open && (o.close(), L.current?.focus()));
|
|
27
|
-
}, [l]), R(() => {
|
|
28
|
-
const o = y.current;
|
|
29
|
-
if (!o) return;
|
|
30
|
-
const k = () => {
|
|
31
|
-
f?.();
|
|
32
|
-
};
|
|
33
|
-
return o.addEventListener("close", k), () => {
|
|
34
|
-
o.removeEventListener("close", k);
|
|
35
|
-
};
|
|
36
|
-
}, [f]);
|
|
37
|
-
const B = {
|
|
38
|
-
top: "modal-top",
|
|
39
|
-
middle: "modal-middle",
|
|
40
|
-
bottom: "modal-bottom"
|
|
41
|
-
}, I = {
|
|
42
|
-
base: {
|
|
43
|
-
top: "modal-top",
|
|
44
|
-
middle: "modal-middle",
|
|
45
|
-
bottom: "modal-bottom"
|
|
46
|
-
},
|
|
47
|
-
sm: {
|
|
48
|
-
top: "sm:modal-top",
|
|
49
|
-
middle: "sm:modal-middle",
|
|
50
|
-
bottom: "sm:modal-bottom"
|
|
51
|
-
},
|
|
52
|
-
md: {
|
|
53
|
-
top: "md:modal-top",
|
|
54
|
-
middle: "md:modal-middle",
|
|
55
|
-
bottom: "md:modal-bottom"
|
|
56
|
-
},
|
|
57
|
-
lg: {
|
|
58
|
-
top: "lg:modal-top",
|
|
59
|
-
middle: "lg:modal-middle",
|
|
60
|
-
bottom: "lg:modal-bottom"
|
|
61
|
-
},
|
|
62
|
-
xl: {
|
|
63
|
-
top: "xl:modal-top",
|
|
64
|
-
middle: "xl:modal-middle",
|
|
65
|
-
bottom: "xl:modal-bottom"
|
|
66
|
-
},
|
|
67
|
-
"2xl": {
|
|
68
|
-
top: "2xl:modal-top",
|
|
69
|
-
middle: "2xl:modal-middle",
|
|
70
|
-
bottom: "2xl:modal-bottom"
|
|
71
|
-
}
|
|
72
|
-
}, S = {
|
|
73
|
-
start: "modal-start",
|
|
74
|
-
end: "modal-end"
|
|
75
|
-
}, F = [
|
|
76
|
-
"modal",
|
|
77
|
-
...(() => {
|
|
78
|
-
if (x)
|
|
79
|
-
return [B.middle];
|
|
80
|
-
if (!s)
|
|
81
|
-
return [];
|
|
82
|
-
if (typeof s == "string")
|
|
83
|
-
return [B[s]];
|
|
84
|
-
const o = [];
|
|
85
|
-
for (const [k, O] of Object.entries(s))
|
|
86
|
-
O && o.push(I[k][O]);
|
|
87
|
-
return o;
|
|
88
|
-
})(),
|
|
89
|
-
b && S[b],
|
|
90
|
-
W
|
|
91
|
-
].filter(Boolean).join(" "), K = async () => {
|
|
92
|
-
if (a) {
|
|
93
|
-
C(!0);
|
|
94
|
-
try {
|
|
95
|
-
await a(), C(!1);
|
|
96
|
-
} catch (o) {
|
|
97
|
-
throw C(!1), o;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}, P = () => {
|
|
101
|
-
h && f && f();
|
|
102
|
-
}, A = i ? { width: typeof i == "number" ? `${i}px` : i, maxWidth: "90vw" } : {}, D = !r && (a || d), H = r != null;
|
|
103
|
-
return /* @__PURE__ */ m(
|
|
104
|
-
"dialog",
|
|
105
|
-
{
|
|
106
|
-
ref: y,
|
|
107
|
-
className: F,
|
|
108
|
-
"data-state": l ? "open" : "closed",
|
|
109
|
-
"aria-labelledby": n ? j : void 0,
|
|
110
|
-
"aria-describedby": T,
|
|
111
|
-
...z,
|
|
112
|
-
children: [
|
|
113
|
-
/* @__PURE__ */ m("div", { className: "modal-box", style: A, children: [
|
|
114
|
-
n && /* @__PURE__ */ t("h3", { id: j, className: "text-lg font-bold mb-4", children: n }),
|
|
115
|
-
/* @__PURE__ */ t("div", { id: T, className: "py-4", children: e }),
|
|
116
|
-
D && /* @__PURE__ */ m("div", { className: "modal-action", children: [
|
|
117
|
-
d && /* @__PURE__ */ t("button", { className: "btn", onClick: d, children: c }),
|
|
118
|
-
a && /* @__PURE__ */ t(
|
|
119
|
-
"button",
|
|
120
|
-
{
|
|
121
|
-
className: `btn btn-primary ${M ? "loading" : ""}`,
|
|
122
|
-
onClick: K,
|
|
123
|
-
disabled: M,
|
|
124
|
-
children: v
|
|
125
|
-
}
|
|
126
|
-
)
|
|
127
|
-
] }),
|
|
128
|
-
H && /* @__PURE__ */ t("div", { className: "modal-action", children: r })
|
|
129
|
-
] }),
|
|
130
|
-
p && h && /* @__PURE__ */ t("form", { method: "dialog", className: "modal-backdrop", children: /* @__PURE__ */ t("button", { onClick: P, children: "close" }) })
|
|
131
|
-
]
|
|
132
|
-
}
|
|
133
|
-
);
|
|
134
|
-
}
|
|
135
|
-
function w(e) {
|
|
136
|
-
const n = document.createElement("div");
|
|
137
|
-
document.body.appendChild(n);
|
|
138
|
-
const r = G(n), l = () => {
|
|
139
|
-
r.unmount(), n.parentNode && n.parentNode.removeChild(n);
|
|
140
|
-
}, a = () => {
|
|
141
|
-
const [d, v] = N.useState(!0), [c, h] = N.useState(!1), p = () => {
|
|
142
|
-
v(!1), setTimeout(l, 300);
|
|
143
|
-
}, s = async () => {
|
|
144
|
-
if (e.onOk) {
|
|
145
|
-
h(!0);
|
|
146
|
-
try {
|
|
147
|
-
await e.onOk(), p();
|
|
148
|
-
} catch {
|
|
149
|
-
h(!1);
|
|
150
|
-
}
|
|
151
|
-
} else
|
|
152
|
-
p();
|
|
153
|
-
}, b = () => {
|
|
154
|
-
e.onCancel?.(), p();
|
|
155
|
-
}, i = () => {
|
|
156
|
-
switch (e.type) {
|
|
157
|
-
case "success":
|
|
158
|
-
return "alert-success";
|
|
159
|
-
case "warning":
|
|
160
|
-
return "alert-warning";
|
|
161
|
-
case "error":
|
|
162
|
-
return "alert-error";
|
|
163
|
-
case "info":
|
|
164
|
-
default:
|
|
165
|
-
return "alert-info";
|
|
166
|
-
}
|
|
167
|
-
}, x = () => {
|
|
168
|
-
switch (e.type) {
|
|
169
|
-
case "success":
|
|
170
|
-
return /* @__PURE__ */ t(
|
|
171
|
-
"svg",
|
|
172
|
-
{
|
|
173
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
174
|
-
className: "stroke-current shrink-0 h-6 w-6",
|
|
175
|
-
fill: "none",
|
|
176
|
-
viewBox: "0 0 24 24",
|
|
177
|
-
children: /* @__PURE__ */ t(
|
|
178
|
-
"path",
|
|
179
|
-
{
|
|
180
|
-
strokeLinecap: "round",
|
|
181
|
-
strokeLinejoin: "round",
|
|
182
|
-
strokeWidth: "2",
|
|
183
|
-
d: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
184
|
-
}
|
|
185
|
-
)
|
|
186
|
-
}
|
|
187
|
-
);
|
|
188
|
-
case "warning":
|
|
189
|
-
return /* @__PURE__ */ t(
|
|
190
|
-
"svg",
|
|
191
|
-
{
|
|
192
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
193
|
-
className: "stroke-current shrink-0 h-6 w-6",
|
|
194
|
-
fill: "none",
|
|
195
|
-
viewBox: "0 0 24 24",
|
|
196
|
-
children: /* @__PURE__ */ t(
|
|
197
|
-
"path",
|
|
198
|
-
{
|
|
199
|
-
strokeLinecap: "round",
|
|
200
|
-
strokeLinejoin: "round",
|
|
201
|
-
strokeWidth: "2",
|
|
202
|
-
d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
|
|
203
|
-
}
|
|
204
|
-
)
|
|
205
|
-
}
|
|
206
|
-
);
|
|
207
|
-
case "error":
|
|
208
|
-
return /* @__PURE__ */ t(
|
|
209
|
-
"svg",
|
|
210
|
-
{
|
|
211
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
212
|
-
className: "stroke-current shrink-0 h-6 w-6",
|
|
213
|
-
fill: "none",
|
|
214
|
-
viewBox: "0 0 24 24",
|
|
215
|
-
children: /* @__PURE__ */ t(
|
|
216
|
-
"path",
|
|
217
|
-
{
|
|
218
|
-
strokeLinecap: "round",
|
|
219
|
-
strokeLinejoin: "round",
|
|
220
|
-
strokeWidth: "2",
|
|
221
|
-
d: "M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
222
|
-
}
|
|
223
|
-
)
|
|
224
|
-
}
|
|
225
|
-
);
|
|
226
|
-
case "info":
|
|
227
|
-
default:
|
|
228
|
-
return /* @__PURE__ */ t(
|
|
229
|
-
"svg",
|
|
230
|
-
{
|
|
231
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
232
|
-
fill: "none",
|
|
233
|
-
viewBox: "0 0 24 24",
|
|
234
|
-
className: "stroke-current shrink-0 w-6 h-6",
|
|
235
|
-
children: /* @__PURE__ */ t(
|
|
236
|
-
"path",
|
|
237
|
-
{
|
|
238
|
-
strokeLinecap: "round",
|
|
239
|
-
strokeLinejoin: "round",
|
|
240
|
-
strokeWidth: "2",
|
|
241
|
-
d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
242
|
-
}
|
|
243
|
-
)
|
|
244
|
-
}
|
|
245
|
-
);
|
|
246
|
-
}
|
|
247
|
-
};
|
|
248
|
-
return /* @__PURE__ */ m(
|
|
249
|
-
u,
|
|
250
|
-
{
|
|
251
|
-
open: d,
|
|
252
|
-
onOk: e.showCancel ? void 0 : s,
|
|
253
|
-
onCancel: b,
|
|
254
|
-
title: e.type ? /* @__PURE__ */ m("div", { className: `alert ${i()}`, children: [
|
|
255
|
-
x(),
|
|
256
|
-
/* @__PURE__ */ t("div", { children: e.title && /* @__PURE__ */ t("h3", { className: "font-bold", children: e.title }) })
|
|
257
|
-
] }) : e.title,
|
|
258
|
-
okText: e.okText,
|
|
259
|
-
cancelText: e.cancelText,
|
|
260
|
-
footer: e.showCancel ? /* @__PURE__ */ m(q, { children: [
|
|
261
|
-
/* @__PURE__ */ t("button", { className: "btn", onClick: b, children: e.cancelText || "Cancel" }),
|
|
262
|
-
/* @__PURE__ */ t(
|
|
263
|
-
"button",
|
|
264
|
-
{
|
|
265
|
-
className: `btn ${e.type === "error" ? "btn-error" : "btn-primary"} ${c ? "loading" : ""}`,
|
|
266
|
-
onClick: s,
|
|
267
|
-
disabled: c,
|
|
268
|
-
children: e.okText || "OK"
|
|
269
|
-
}
|
|
270
|
-
)
|
|
271
|
-
] }) : /* @__PURE__ */ t(
|
|
272
|
-
"button",
|
|
273
|
-
{
|
|
274
|
-
className: `btn ${e.type === "error" ? "btn-error" : "btn-primary"} ${c ? "loading" : ""}`,
|
|
275
|
-
onClick: s,
|
|
276
|
-
disabled: c,
|
|
277
|
-
children: e.okText || "OK"
|
|
278
|
-
}
|
|
279
|
-
),
|
|
280
|
-
children: [
|
|
281
|
-
e.type && e.content && /* @__PURE__ */ t("div", { className: "text-sm", children: e.content }),
|
|
282
|
-
!e.type && e.content
|
|
283
|
-
]
|
|
284
|
-
}
|
|
285
|
-
);
|
|
286
|
-
};
|
|
287
|
-
return r.render(/* @__PURE__ */ t(a, {})), {
|
|
288
|
-
destroy: l
|
|
289
|
-
};
|
|
290
|
-
}
|
|
291
|
-
function J(e) {
|
|
292
|
-
return w({ ...e, showCancel: !0 });
|
|
293
|
-
}
|
|
294
|
-
function Q(e) {
|
|
295
|
-
return w({ ...e, type: "info", showCancel: !1 });
|
|
296
|
-
}
|
|
297
|
-
function U(e) {
|
|
298
|
-
return w({ ...e, type: "success", showCancel: !1 });
|
|
299
|
-
}
|
|
300
|
-
function V(e) {
|
|
301
|
-
return w({ ...e, type: "warning", showCancel: !1 });
|
|
302
|
-
}
|
|
303
|
-
function X(e) {
|
|
304
|
-
return w({ ...e, type: "error", showCancel: !1 });
|
|
305
|
-
}
|
|
306
|
-
u.confirm = J;
|
|
307
|
-
u.info = Q;
|
|
308
|
-
u.success = U;
|
|
309
|
-
u.warning = V;
|
|
310
|
-
u.error = X;
|
|
4
|
+
className: o = "",
|
|
5
|
+
contentClassName: d = ""
|
|
6
|
+
}) => /* @__PURE__ */ r("div", { className: `mockup-window border border-base-300 ${o}`, children: /* @__PURE__ */ r("div", { className: `border-t border-base-300 ${d}`, children: e }) });
|
|
311
7
|
export {
|
|
312
|
-
|
|
8
|
+
a as Window
|
|
313
9
|
};
|
|
314
10
|
//# sourceMappingURL=index56.js.map
|
package/dist/index56.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index56.js","sources":["../src/components/Modal.tsx"],"sourcesContent":["import React, { useEffect, useRef, useId } from 'react'\nimport { createRoot } from 'react-dom/client'\n\nexport type ModalPosition = 'top' | 'middle' | 'bottom'\nexport type ModalAlign = 'start' | 'end'\nexport type Breakpoint = 'base' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'\n\nexport type ResponsivePosition = Partial<Record<Breakpoint, ModalPosition>>\n\nexport interface ModalProps extends Omit<React.HTMLAttributes<HTMLDialogElement>, 'title'> {\n children: React.ReactNode\n title?: React.ReactNode\n footer?: React.ReactNode\n open?: boolean\n onOk?: () => void | Promise<void>\n onCancel?: () => void\n okText?: string\n cancelText?: string\n maskClosable?: boolean\n closable?: boolean\n /** Modal position - can be a single value or responsive object */\n position?: ModalPosition | ResponsivePosition\n align?: ModalAlign\n /** Width of the modal box */\n width?: number | string\n /** Center the modal vertically */\n centered?: boolean\n /** Callback when modal is closed */\n onClose?: () => void\n}\n\nexport interface ModalFuncProps {\n title?: React.ReactNode\n content?: React.ReactNode\n onOk?: () => void | Promise<void>\n onCancel?: () => void\n okText?: string\n cancelText?: string\n type?: 'info' | 'success' | 'warning' | 'error'\n}\n\nexport function Modal({\n children,\n title,\n footer,\n open = false,\n onOk,\n onCancel,\n okText = 'OK',\n cancelText = 'Cancel',\n maskClosable = true,\n closable = true,\n position,\n align,\n width,\n centered,\n onClose,\n className = '',\n ...rest\n}: ModalProps) {\n const dialogRef = useRef<HTMLDialogElement>(null)\n const previousActiveElement = useRef<HTMLElement | null>(null)\n const [loading, setLoading] = React.useState(false)\n const titleId = useId()\n const contentId = useId()\n\n // Handle close - use onClose if provided, otherwise onCancel\n const closeHandler = onClose || onCancel\n\n useEffect(() => {\n const dialog = dialogRef.current\n if (!dialog) return\n\n if (open) {\n if (!dialog.open) {\n // Save currently focused element for restoration\n previousActiveElement.current = document.activeElement as HTMLElement\n dialog.showModal()\n }\n } else {\n if (dialog.open) {\n dialog.close()\n // Restore focus to previously focused element\n previousActiveElement.current?.focus()\n }\n }\n }, [open])\n\n useEffect(() => {\n const dialog = dialogRef.current\n if (!dialog) return\n\n const onDialogClose = () => {\n closeHandler?.()\n }\n\n dialog.addEventListener('close', onDialogClose)\n return () => {\n dialog.removeEventListener('close', onDialogClose)\n }\n }, [closeHandler])\n\n // Static class mappings for positions (no interpolation per qa.md)\n const positionClasses: Record<ModalPosition, string> = {\n top: 'modal-top',\n middle: 'modal-middle',\n bottom: 'modal-bottom',\n }\n\n // Responsive position class mappings for each breakpoint\n const responsivePositionClasses: Record<Breakpoint, Record<ModalPosition, string>> = {\n base: {\n top: 'modal-top',\n middle: 'modal-middle',\n bottom: 'modal-bottom',\n },\n sm: {\n top: 'sm:modal-top',\n middle: 'sm:modal-middle',\n bottom: 'sm:modal-bottom',\n },\n md: {\n top: 'md:modal-top',\n middle: 'md:modal-middle',\n bottom: 'md:modal-bottom',\n },\n lg: {\n top: 'lg:modal-top',\n middle: 'lg:modal-middle',\n bottom: 'lg:modal-bottom',\n },\n xl: {\n top: 'xl:modal-top',\n middle: 'xl:modal-middle',\n bottom: 'xl:modal-bottom',\n },\n '2xl': {\n top: '2xl:modal-top',\n middle: '2xl:modal-middle',\n bottom: '2xl:modal-bottom',\n },\n }\n\n const alignClasses: Record<ModalAlign, string> = {\n start: 'modal-start',\n end: 'modal-end',\n }\n\n // Build position classes - handle both simple and responsive values\n const getPositionClasses = (): string[] => {\n // centered is an alias for position=\"middle\"\n if (centered) {\n return [positionClasses.middle]\n }\n\n if (!position) {\n return []\n }\n\n // Simple string position\n if (typeof position === 'string') {\n return [positionClasses[position]]\n }\n\n // Responsive object position\n const classes: string[] = []\n for (const [breakpoint, pos] of Object.entries(position) as [Breakpoint, ModalPosition][]) {\n if (pos) {\n classes.push(responsivePositionClasses[breakpoint][pos])\n }\n }\n return classes\n }\n\n const classes = [\n 'modal',\n ...getPositionClasses(),\n align && alignClasses[align],\n className,\n ]\n .filter(Boolean)\n .join(' ')\n\n const handleOk = async () => {\n if (onOk) {\n setLoading(true)\n try {\n await onOk()\n setLoading(false)\n } catch (error) {\n setLoading(false)\n throw error\n }\n }\n }\n\n const handleBackdropClick = () => {\n if (maskClosable && closeHandler) {\n closeHandler()\n }\n }\n\n // Calculate modal-box style for custom width\n const modalBoxStyle: React.CSSProperties = width\n ? { width: typeof width === 'number' ? `${width}px` : width, maxWidth: '90vw' }\n : {}\n\n // Render default footer if no custom footer provided and either onOk or onCancel exists\n const shouldRenderDefaultFooter = !footer && (onOk || onCancel)\n const shouldRenderCustomFooter = footer !== null && footer !== undefined\n\n return (\n <dialog\n ref={dialogRef}\n className={classes}\n data-state={open ? 'open' : 'closed'}\n aria-labelledby={title ? titleId : undefined}\n aria-describedby={contentId}\n {...rest}\n >\n <div className=\"modal-box\" style={modalBoxStyle}>\n {title && (\n <h3 id={titleId} className=\"text-lg font-bold mb-4\">\n {title}\n </h3>\n )}\n <div id={contentId} className=\"py-4\">\n {children}\n </div>\n {shouldRenderDefaultFooter && (\n <div className=\"modal-action\">\n {onCancel && (\n <button className=\"btn\" onClick={onCancel}>\n {cancelText}\n </button>\n )}\n {onOk && (\n <button\n className={`btn btn-primary ${loading ? 'loading' : ''}`}\n onClick={handleOk}\n disabled={loading}\n >\n {okText}\n </button>\n )}\n </div>\n )}\n {shouldRenderCustomFooter && <div className=\"modal-action\">{footer}</div>}\n </div>\n {closable && maskClosable && (\n <form method=\"dialog\" className=\"modal-backdrop\">\n <button onClick={handleBackdropClick}>close</button>\n </form>\n )}\n </dialog>\n )\n}\n\nfunction createModal(config: ModalFuncProps & { showCancel?: boolean }) {\n const div = document.createElement('div')\n document.body.appendChild(div)\n const root = createRoot(div)\n\n const destroy = () => {\n root.unmount()\n if (div.parentNode) {\n div.parentNode.removeChild(div)\n }\n }\n\n const ModalContent = () => {\n const [open, setOpen] = React.useState(true)\n const [loading, setLoading] = React.useState(false)\n\n const handleClose = () => {\n setOpen(false)\n setTimeout(destroy, 300) // Wait for animation\n }\n\n const handleOk = async () => {\n if (config.onOk) {\n setLoading(true)\n try {\n await config.onOk()\n handleClose()\n } catch (error) {\n setLoading(false)\n }\n } else {\n handleClose()\n }\n }\n\n const handleCancel = () => {\n config.onCancel?.()\n handleClose()\n }\n\n const getAlertClass = () => {\n switch (config.type) {\n case 'success':\n return 'alert-success'\n case 'warning':\n return 'alert-warning'\n case 'error':\n return 'alert-error'\n case 'info':\n default:\n return 'alert-info'\n }\n }\n\n const getIcon = () => {\n switch (config.type) {\n case 'success':\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"stroke-current shrink-0 h-6 w-6\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"2\"\n d=\"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z\"\n />\n </svg>\n )\n case 'warning':\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"stroke-current shrink-0 h-6 w-6\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"2\"\n d=\"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z\"\n />\n </svg>\n )\n case 'error':\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"stroke-current shrink-0 h-6 w-6\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"2\"\n d=\"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z\"\n />\n </svg>\n )\n case 'info':\n default:\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n className=\"stroke-current shrink-0 w-6 h-6\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"2\"\n d=\"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"\n ></path>\n </svg>\n )\n }\n }\n\n return (\n <Modal\n open={open}\n onOk={config.showCancel ? undefined : handleOk}\n onCancel={handleCancel}\n title={\n config.type ? (\n <div className={`alert ${getAlertClass()}`}>\n {getIcon()}\n <div>\n {config.title && <h3 className=\"font-bold\">{config.title}</h3>}\n </div>\n </div>\n ) : (\n config.title\n )\n }\n okText={config.okText}\n cancelText={config.cancelText}\n footer={\n config.showCancel ? (\n <>\n <button className=\"btn\" onClick={handleCancel}>\n {config.cancelText || 'Cancel'}\n </button>\n <button\n className={`btn ${config.type === 'error' ? 'btn-error' : 'btn-primary'} ${loading ? 'loading' : ''}`}\n onClick={handleOk}\n disabled={loading}\n >\n {config.okText || 'OK'}\n </button>\n </>\n ) : (\n <button\n className={`btn ${config.type === 'error' ? 'btn-error' : 'btn-primary'} ${loading ? 'loading' : ''}`}\n onClick={handleOk}\n disabled={loading}\n >\n {config.okText || 'OK'}\n </button>\n )\n }\n >\n {config.type && config.content && <div className=\"text-sm\">{config.content}</div>}\n {!config.type && config.content}\n </Modal>\n )\n }\n\n root.render(<ModalContent />)\n\n return {\n destroy,\n }\n}\n\nfunction confirm(config: ModalFuncProps) {\n return createModal({ ...config, showCancel: true })\n}\n\nfunction info(config: ModalFuncProps) {\n return createModal({ ...config, type: 'info', showCancel: false })\n}\n\nfunction success(config: ModalFuncProps) {\n return createModal({ ...config, type: 'success', showCancel: false })\n}\n\nfunction warning(config: ModalFuncProps) {\n return createModal({ ...config, type: 'warning', showCancel: false })\n}\n\nfunction error(config: ModalFuncProps) {\n return createModal({ ...config, type: 'error', showCancel: false })\n}\n\nModal.confirm = confirm\nModal.info = info\nModal.success = success\nModal.warning = warning\nModal.error = error\n"],"names":["Modal","children","title","footer","open","onOk","onCancel","okText","cancelText","maskClosable","closable","position","align","width","centered","onClose","className","rest","dialogRef","useRef","previousActiveElement","loading","setLoading","React","titleId","useId","contentId","closeHandler","useEffect","dialog","onDialogClose","positionClasses","responsivePositionClasses","alignClasses","classes","breakpoint","pos","handleOk","error","handleBackdropClick","modalBoxStyle","shouldRenderDefaultFooter","shouldRenderCustomFooter","jsxs","jsx","createModal","config","div","root","createRoot","destroy","ModalContent","setOpen","handleClose","handleCancel","getAlertClass","getIcon","Fragment","confirm","info","success","warning"],"mappings":";;;AAyCO,SAASA,EAAM;AAAA,EACpB,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,YAAAC,IAAa;AAAA,EACb,cAAAC,IAAe;AAAA,EACf,UAAAC,IAAW;AAAA,EACX,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,GAAGC;AACL,GAAe;AACb,QAAMC,IAAYC,EAA0B,IAAI,GAC1CC,IAAwBD,EAA2B,IAAI,GACvD,CAACE,GAASC,CAAU,IAAIC,EAAM,SAAS,EAAK,GAC5CC,IAAUC,EAAA,GACVC,IAAYD,EAAA,GAGZE,IAAeZ,KAAWT;AAEhC,EAAAsB,EAAU,MAAM;AACd,UAAMC,IAASX,EAAU;AACzB,IAAKW,MAEDzB,IACGyB,EAAO,SAEVT,EAAsB,UAAU,SAAS,eACzCS,EAAO,UAAA,KAGLA,EAAO,SACTA,EAAO,MAAA,GAEPT,EAAsB,SAAS,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AAA,YAET,YAAO,UAAU;AAAA,UAAA;AAAA,QAAA;AAAA,QAKvB,UAAA;AAAA,UAAAyB,EAAO,QAAQA,EAAO,WAAW,gBAAAF,EAAC,SAAI,WAAU,WAAW,YAAO,QAAA,CAAQ;AAAA,UAC1E,CAACE,EAAO,QAAQA,EAAO;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAG9B;AAEA,SAAAE,EAAK,OAAO,gBAAAJ,EAACO,GAAA,CAAA,CAAa,CAAE,GAErB;AAAA,IACL,SAAAD;AAAA,EAAA;AAEJ;AAEA,SAASQ,EAAQZ,GAAwB;AACvC,SAAOD,EAAY,EAAE,GAAGC,GAAQ,YAAY,IAAM;AACpD;AAEA,SAASa,EAAKb,GAAwB;AACpC,SAAOD,EAAY,EAAE,GAAGC,GAAQ,MAAM,QAAQ,YAAY,IAAO;AACnE;AAEA,SAASc,EAAQd,GAAwB;AACvC,SAAOD,EAAY,EAAE,GAAGC,GAAQ,MAAM,WAAW,YAAY,IAAO;AACtE;AAEA,SAASe,EAAQf,GAAwB;AACvC,SAAOD,EAAY,EAAE,GAAGC,GAAQ,MAAM,WAAW,YAAY,IAAO;AACtE;AAEA,SAASR,EAAMQ,GAAwB;AACrC,SAAOD,EAAY,EAAE,GAAGC,GAAQ,MAAM,SAAS,YAAY,IAAO;AACpE;AAEA9C,EAAM,UAAU0D;AAChB1D,EAAM,OAAO2D;AACb3D,EAAM,UAAU4D;AAChB5D,EAAM,UAAU6D;AAChB7D,EAAM,QAAQsC;"}
|
|
1
|
+
{"version":3,"file":"index56.js","sources":["../src/components/Window.tsx"],"sourcesContent":["import React from 'react'\n\nexport interface WindowProps {\n children: React.ReactNode\n className?: string\n contentClassName?: string\n}\n\nexport const Window: React.FC<WindowProps> = ({\n children,\n className = '',\n contentClassName = '',\n}) => {\n return (\n <div className={`mockup-window border border-base-300 ${className}`}>\n <div className={`border-t border-base-300 ${contentClassName}`}>\n {children}\n </div>\n </div>\n )\n}\n"],"names":["Window","children","className","contentClassName","jsx"],"mappings":";AAQO,MAAMA,IAAgC,CAAC;AAAA,EAC5C,UAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,kBAAAC,IAAmB;AACrB,MAEI,gBAAAC,EAAC,OAAA,EAAI,WAAW,wCAAwCF,CAAS,IAC/D,UAAA,gBAAAE,EAAC,OAAA,EAAI,WAAW,4BAA4BD,CAAgB,IACzD,UAAAF,GACH,GACF;"}
|