@tomny-dev/uzi 0.5.0 → 0.6.0-pr.60.173.1.802e4f7
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/README.md +5 -2
- package/dist/components/card/Card.d.ts +7 -5
- package/dist/components/card/Card.d.ts.map +1 -1
- package/dist/components/page-container/PageContainer.d.ts +2 -1
- package/dist/components/page-container/PageContainer.d.ts.map +1 -1
- package/dist/components/surface/Surface.d.ts +16 -0
- package/dist/components/surface/Surface.d.ts.map +1 -0
- package/dist/components/toolbar/Toolbar.d.ts +13 -0
- package/dist/components/toolbar/Toolbar.d.ts.map +1 -0
- package/dist/index.cjs +36 -31
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +34 -32
- package/dist/index10.cjs.map +1 -1
- package/dist/index10.js +19 -15
- package/dist/index10.js.map +1 -1
- package/dist/index11.cjs +21 -18
- package/dist/index11.cjs.map +1 -1
- package/dist/index11.js +8 -15
- package/dist/index11.js.map +1 -1
- package/dist/index12.cjs +7 -14
- package/dist/index12.cjs.map +1 -1
- package/dist/index12.js +15 -37
- package/dist/index12.js.map +1 -1
- package/dist/index13.cjs +18 -52
- package/dist/index13.cjs.map +1 -1
- package/dist/index13.js +15 -77
- package/dist/index13.js.map +1 -1
- package/dist/index14.cjs +15 -80
- package/dist/index14.cjs.map +1 -1
- package/dist/index14.js +37 -13
- package/dist/index14.js.map +1 -1
- package/dist/index15.cjs +52 -18
- package/dist/index15.cjs.map +1 -1
- package/dist/index15.js +77 -9
- package/dist/index15.js.map +1 -1
- package/dist/index16.cjs +79 -8
- package/dist/index16.cjs.map +1 -1
- package/dist/index16.js +13 -41
- package/dist/index16.js.map +1 -1
- package/dist/index17.cjs +18 -60
- package/dist/index17.cjs.map +1 -1
- package/dist/index17.js +9 -428
- package/dist/index17.js.map +1 -1
- package/dist/index18.cjs +8 -430
- package/dist/index18.cjs.map +1 -1
- package/dist/index18.js +42 -4
- package/dist/index18.js.map +1 -1
- package/dist/index19.cjs +61 -5
- package/dist/index19.cjs.map +1 -1
- package/dist/index19.js +430 -13
- package/dist/index19.js.map +1 -1
- package/dist/index20.cjs +430 -12
- package/dist/index20.cjs.map +1 -1
- package/dist/index20.js +4 -4
- package/dist/index20.js.map +1 -1
- package/dist/index21.cjs +5 -5
- package/dist/index21.cjs.map +1 -1
- package/dist/index21.js +12 -9
- package/dist/index21.js.map +1 -1
- package/dist/index22.cjs +12 -9
- package/dist/index22.cjs.map +1 -1
- package/dist/index22.js +4 -4
- package/dist/index22.js.map +1 -1
- package/dist/index23.cjs +5 -5
- package/dist/index23.cjs.map +1 -1
- package/dist/index23.js +9 -12
- package/dist/index23.js.map +1 -1
- package/dist/index24.cjs +9 -12
- package/dist/index24.cjs.map +1 -1
- package/dist/index24.js +4 -38
- package/dist/index24.js.map +1 -1
- package/dist/index25.cjs +5 -55
- package/dist/index25.cjs.map +1 -1
- package/dist/index25.js +11 -116
- package/dist/index25.js.map +1 -1
- package/dist/index26.cjs +10 -116
- package/dist/index26.cjs.map +1 -1
- package/dist/index26.js +31 -19
- package/dist/index26.js.map +1 -1
- package/dist/index27.cjs +42 -24
- package/dist/index27.cjs.map +1 -1
- package/dist/index27.js +106 -93
- package/dist/index27.js.map +1 -1
- package/dist/index28.cjs +106 -93
- package/dist/index28.cjs.map +1 -1
- package/dist/index28.js +26 -23
- package/dist/index28.js.map +1 -1
- package/dist/index29.cjs +37 -25
- package/dist/index29.cjs.map +1 -1
- package/dist/index29.js +107 -26
- package/dist/index29.js.map +1 -1
- package/dist/index30.cjs +110 -37
- package/dist/index30.cjs.map +1 -1
- package/dist/index30.js +21 -113
- package/dist/index30.js.map +1 -1
- package/dist/index31.cjs +19 -125
- package/dist/index31.cjs.map +1 -1
- package/dist/index31.js +26 -17
- package/dist/index31.js.map +1 -1
- package/dist/index32.cjs +37 -20
- package/dist/index32.cjs.map +1 -1
- package/dist/index32.js +108 -104
- package/dist/index32.js.map +1 -1
- package/dist/index33.cjs +122 -103
- package/dist/index33.cjs.map +1 -1
- package/dist/index33.js +17 -4
- package/dist/index33.js.map +1 -1
- package/dist/index34.cjs +20 -5
- package/dist/index34.cjs.map +1 -1
- package/dist/index34.js +106 -58
- package/dist/index34.js.map +1 -1
- package/dist/index35.cjs +106 -57
- package/dist/index35.cjs.map +1 -1
- package/dist/index35.js +4 -22
- package/dist/index35.js.map +1 -1
- package/dist/index36.cjs +5 -31
- package/dist/index36.cjs.map +1 -1
- package/dist/index36.js +55 -44
- package/dist/index36.js.map +1 -1
- package/dist/index37.cjs +55 -44
- package/dist/index37.cjs.map +1 -1
- package/dist/index37.js +21 -31
- package/dist/index37.js.map +1 -1
- package/dist/index38.cjs +30 -45
- package/dist/index38.cjs.map +1 -1
- package/dist/index38.js +46 -141
- package/dist/index38.js.map +1 -1
- package/dist/index39.cjs +46 -141
- package/dist/index39.cjs.map +1 -1
- package/dist/index39.js +31 -41
- package/dist/index39.js.map +1 -1
- package/dist/index40.cjs +45 -60
- package/dist/index40.cjs.map +1 -1
- package/dist/index40.js +139 -163
- package/dist/index40.js.map +1 -1
- package/dist/index41.cjs +137 -161
- package/dist/index41.cjs.map +1 -1
- package/dist/index41.js +41 -12
- package/dist/index41.js.map +1 -1
- package/dist/index42.cjs +60 -14
- package/dist/index42.cjs.map +1 -1
- package/dist/index42.js +167 -15
- package/dist/index42.js.map +1 -1
- package/dist/index43.cjs +166 -14
- package/dist/index43.cjs.map +1 -1
- package/dist/index43.js +12 -15
- package/dist/index43.js.map +1 -1
- package/dist/index44.cjs +14 -21
- package/dist/index44.cjs.map +1 -1
- package/dist/index44.js +15 -28
- package/dist/index44.js.map +1 -1
- package/dist/index45.cjs +14 -27
- package/dist/index45.cjs.map +1 -1
- package/dist/index45.js +10 -8
- package/dist/index45.js.map +1 -1
- package/dist/index46.cjs +11 -8
- package/dist/index46.cjs.map +1 -1
- package/dist/index46.js +22 -15
- package/dist/index46.js.map +1 -1
- package/dist/index47.cjs +22 -15
- package/dist/index47.cjs.map +1 -1
- package/dist/index47.js +9 -13
- package/dist/index47.js.map +1 -1
- package/dist/index48.cjs +10 -16
- package/dist/index48.cjs.map +1 -1
- package/dist/index48.js +18 -25
- package/dist/index48.js.map +1 -1
- package/dist/index49.cjs +18 -25
- package/dist/index49.cjs.map +1 -1
- package/dist/index49.js +17 -14
- package/dist/index49.js.map +1 -1
- package/dist/index50.cjs +24 -17
- package/dist/index50.cjs.map +1 -1
- package/dist/index50.js +28 -28
- package/dist/index50.js.map +1 -1
- package/dist/index51.cjs +27 -28
- package/dist/index51.cjs.map +1 -1
- package/dist/index51.js +14 -17
- package/dist/index51.js.map +1 -1
- package/dist/index52.cjs +17 -22
- package/dist/index52.cjs.map +1 -1
- package/dist/index52.js +23 -23
- package/dist/index52.js.map +1 -1
- package/dist/index53.cjs +23 -23
- package/dist/index53.cjs.map +1 -1
- package/dist/index53.js +17 -10
- package/dist/index53.js.map +1 -1
- package/dist/index54.cjs +22 -11
- package/dist/index54.cjs.map +1 -1
- package/dist/index54.js +28 -14
- package/dist/index54.js.map +1 -1
- package/dist/index55.cjs +28 -13
- package/dist/index55.cjs.map +1 -1
- package/dist/index55.js +17 -11
- package/dist/index55.js.map +1 -1
- package/dist/index56.cjs +23 -13
- package/dist/index56.cjs.map +1 -1
- package/dist/index56.js +24 -16
- package/dist/index56.js.map +1 -1
- package/dist/index57.cjs +24 -15
- package/dist/index57.cjs.map +1 -1
- package/dist/index57.js +10 -9
- package/dist/index57.js.map +1 -1
- package/dist/index58.cjs +11 -12
- package/dist/index58.cjs.map +1 -1
- package/dist/index58.js +12 -87
- package/dist/index58.js.map +1 -1
- package/dist/index59.cjs +12 -89
- package/dist/index59.cjs.map +1 -1
- package/dist/index59.js +11 -21
- package/dist/index59.js.map +1 -1
- package/dist/index60.cjs +13 -30
- package/dist/index60.cjs.map +1 -1
- package/dist/index60.js +17 -43
- package/dist/index60.js.map +1 -1
- package/dist/index61.cjs +16 -44
- package/dist/index61.cjs.map +1 -1
- package/dist/index61.js +9 -57
- package/dist/index61.js.map +1 -1
- package/dist/index62.cjs +11 -83
- package/dist/index62.cjs.map +1 -1
- package/dist/index62.js +83 -426
- package/dist/index62.js.map +1 -1
- package/dist/index63.cjs +82 -427
- package/dist/index63.cjs.map +1 -1
- package/dist/index63.js +21 -59
- package/dist/index63.js.map +1 -1
- package/dist/index64.cjs +30 -87
- package/dist/index64.cjs.map +1 -1
- package/dist/index64.js +44 -240
- package/dist/index64.js.map +1 -1
- package/dist/index65.cjs +43 -239
- package/dist/index65.cjs.map +1 -1
- package/dist/index65.js +57 -43
- package/dist/index65.js.map +1 -1
- package/dist/index66.cjs +84 -63
- package/dist/index66.cjs.map +1 -1
- package/dist/index66.js +426 -73
- package/dist/index66.js.map +1 -1
- package/dist/index67.cjs +426 -71
- package/dist/index67.cjs.map +1 -1
- package/dist/index67.js +59 -21
- package/dist/index67.js.map +1 -1
- package/dist/index68.cjs +87 -30
- package/dist/index68.cjs.map +1 -1
- package/dist/index68.js +233 -88
- package/dist/index68.js.map +1 -1
- package/dist/index69.cjs +232 -89
- package/dist/index69.cjs.map +1 -1
- package/dist/index69.js +40 -16
- package/dist/index69.js.map +1 -1
- package/dist/index70.cjs +56 -20
- package/dist/index70.cjs.map +1 -1
- package/dist/index70.js +72 -145
- package/dist/index70.js.map +1 -1
- package/dist/index71.cjs +72 -145
- package/dist/index71.cjs.map +1 -1
- package/dist/index71.js +25 -0
- package/dist/index71.js.map +1 -0
- package/dist/index72.cjs +34 -0
- package/dist/index72.cjs.map +1 -0
- package/dist/index72.js +101 -0
- package/dist/index72.js.map +1 -0
- package/dist/index73.cjs +105 -0
- package/dist/index73.cjs.map +1 -0
- package/dist/index73.js +23 -0
- package/dist/index73.js.map +1 -0
- package/dist/index74.cjs +31 -0
- package/dist/index74.cjs.map +1 -0
- package/dist/index74.js +159 -0
- package/dist/index74.js.map +1 -0
- package/dist/index75.cjs +161 -0
- package/dist/index75.cjs.map +1 -0
- package/dist/index8.js.map +1 -1
- package/dist/index9.cjs.map +1 -1
- package/dist/index9.js.map +1 -1
- package/dist/style.css +216 -45
- package/package.json +2 -2
package/dist/index15.js
CHANGED
|
@@ -1,16 +1,84 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cx } from "./index3.js";
|
|
3
|
-
import
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
import modal_module_default from "./index14.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
6
|
+
//#region src/components/modal/Modal.tsx
|
|
7
|
+
function ModalOverlay({ open, onClose, className, children }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Root, {
|
|
9
|
+
open,
|
|
10
|
+
onOpenChange: (nextOpen) => {
|
|
11
|
+
if (!nextOpen) onClose();
|
|
12
|
+
},
|
|
13
|
+
children: /* @__PURE__ */ jsx(DialogPrimitive.Portal, { children: /* @__PURE__ */ jsxs("div", {
|
|
14
|
+
className: modal_module_default.portalLayer,
|
|
15
|
+
children: [/* @__PURE__ */ jsx(DialogPrimitive.Overlay, { className: cx(modal_module_default.backdrop, className) }), /* @__PURE__ */ jsx(DialogPrimitive.Content, {
|
|
16
|
+
className: modal_module_default.overlayContent,
|
|
17
|
+
children
|
|
18
|
+
})]
|
|
19
|
+
}) })
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function Modal({ open, onClose, title, subtitle, size = "md", children, footer }) {
|
|
23
|
+
return /* @__PURE__ */ jsx(ModalOverlay, {
|
|
24
|
+
open,
|
|
25
|
+
onClose,
|
|
26
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
27
|
+
className: cx(modal_module_default.modal, modal_module_default[`size-${size}`]),
|
|
28
|
+
children: [
|
|
29
|
+
/* @__PURE__ */ jsxs("div", {
|
|
30
|
+
className: modal_module_default.header,
|
|
31
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
32
|
+
className: modal_module_default.titles,
|
|
33
|
+
children: [/* @__PURE__ */ jsx(DialogPrimitive.Title, {
|
|
34
|
+
className: modal_module_default.title,
|
|
35
|
+
children: title
|
|
36
|
+
}), subtitle ? /* @__PURE__ */ jsx(DialogPrimitive.Description, {
|
|
37
|
+
className: modal_module_default.subtitle,
|
|
38
|
+
children: subtitle
|
|
39
|
+
}) : null]
|
|
40
|
+
}), /* @__PURE__ */ jsx(DialogPrimitive.Close, {
|
|
41
|
+
asChild: true,
|
|
42
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
43
|
+
className: modal_module_default.closeButton,
|
|
44
|
+
"aria-label": "Close",
|
|
45
|
+
children: /* @__PURE__ */ jsxs("svg", {
|
|
46
|
+
width: "14",
|
|
47
|
+
height: "14",
|
|
48
|
+
viewBox: "0 0 24 24",
|
|
49
|
+
fill: "none",
|
|
50
|
+
stroke: "currentColor",
|
|
51
|
+
strokeWidth: "2.5",
|
|
52
|
+
strokeLinecap: "round",
|
|
53
|
+
strokeLinejoin: "round",
|
|
54
|
+
children: [/* @__PURE__ */ jsx("line", {
|
|
55
|
+
x1: "18",
|
|
56
|
+
y1: "6",
|
|
57
|
+
x2: "6",
|
|
58
|
+
y2: "18"
|
|
59
|
+
}), /* @__PURE__ */ jsx("line", {
|
|
60
|
+
x1: "6",
|
|
61
|
+
y1: "6",
|
|
62
|
+
x2: "18",
|
|
63
|
+
y2: "18"
|
|
64
|
+
})]
|
|
65
|
+
})
|
|
66
|
+
})
|
|
67
|
+
})]
|
|
68
|
+
}),
|
|
69
|
+
/* @__PURE__ */ jsx("div", {
|
|
70
|
+
className: modal_module_default.body,
|
|
71
|
+
children
|
|
72
|
+
}),
|
|
73
|
+
footer && /* @__PURE__ */ jsx("div", {
|
|
74
|
+
className: modal_module_default.footer,
|
|
75
|
+
children: footer
|
|
76
|
+
})
|
|
77
|
+
]
|
|
78
|
+
})
|
|
11
79
|
});
|
|
12
80
|
}
|
|
13
81
|
//#endregion
|
|
14
|
-
export {
|
|
82
|
+
export { Modal, ModalOverlay };
|
|
15
83
|
|
|
16
84
|
//# sourceMappingURL=index15.js.map
|
package/dist/index15.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index15.js","names":[],"sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index15.js","names":[],"sources":["../src/components/modal/Modal.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { cx } from \"../../utils/cx\";\nimport styles from \"./modal.module.css\";\n\n// ── ModalOverlay ─────────────────────────────────────────────────────────────\n// Bare backdrop + container. No opinions on layout inside.\n// Use this when you need a full-custom layout (e.g. wide media modals).\n\nexport type ModalOverlayProps = {\n open: boolean;\n onClose: () => void;\n /** Extra class applied to the backdrop */\n className?: string;\n children: ReactNode;\n};\n\nexport function ModalOverlay({ open, onClose, className, children }: ModalOverlayProps) {\n return (\n <DialogPrimitive.Root\n open={open}\n onOpenChange={(nextOpen: boolean) => {\n if (!nextOpen) onClose();\n }}\n >\n <DialogPrimitive.Portal>\n <div className={styles.portalLayer}>\n <DialogPrimitive.Overlay className={cx(styles.backdrop, className)} />\n <DialogPrimitive.Content className={styles.overlayContent}>\n {children}\n </DialogPrimitive.Content>\n </div>\n </DialogPrimitive.Portal>\n </DialogPrimitive.Root>\n );\n}\n\n// ── Modal ─────────────────────────────────────────────────────────────────────\n// Opinionated dialog: header (title + close button), scrollable body, footer.\n\nexport type ModalSize = \"sm\" | \"md\" | \"lg\" | \"xl\";\n\nexport type ModalProps = {\n open: boolean;\n onClose: () => void;\n title: string;\n subtitle?: string;\n size?: ModalSize;\n children: ReactNode;\n footer?: ReactNode;\n};\n\nexport function Modal({ open, onClose, title, subtitle, size = \"md\", children, footer }: ModalProps) {\n return (\n <ModalOverlay open={open} onClose={onClose}>\n <div className={cx(styles.modal, styles[`size-${size}`])}>\n <div className={styles.header}>\n <div className={styles.titles}>\n <DialogPrimitive.Title className={styles.title}>{title}</DialogPrimitive.Title>\n {subtitle ? (\n <DialogPrimitive.Description className={styles.subtitle}>\n {subtitle}\n </DialogPrimitive.Description>\n ) : null}\n </div>\n <DialogPrimitive.Close asChild>\n <button className={styles.closeButton} aria-label=\"Close\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n </button>\n </DialogPrimitive.Close>\n </div>\n\n <div className={styles.body}>{children}</div>\n\n {footer && <div className={styles.footer}>{footer}</div>}\n </div>\n </ModalOverlay>\n );\n}\n"],"mappings":";;;;;;AAmBA,SAAgB,aAAa,EAAE,MAAM,SAAS,WAAW,YAA+B;CACtF,OACE,oBAAC,gBAAgB,MAAjB;EACQ;EACN,eAAe,aAAsB;GACnC,IAAI,CAAC,UAAU,QAAQ;EACzB;YAEA,oBAAC,gBAAgB,QAAjB,EAAA,UACE,qBAAC,OAAD;GAAK,WAAW,qBAAO;aAAvB,CACE,oBAAC,gBAAgB,SAAjB,EAAyB,WAAW,GAAG,qBAAO,UAAU,SAAS,EAAI,CAAA,GACrE,oBAAC,gBAAgB,SAAjB;IAAyB,WAAW,qBAAO;IACxC;GACsB,CAAA,CACtB;KACiB,CAAA;CACJ,CAAA;AAE1B;AAiBA,SAAgB,MAAM,EAAE,MAAM,SAAS,OAAO,UAAU,OAAO,MAAM,UAAU,UAAsB;CACnG,OACE,oBAAC,cAAD;EAAoB;EAAe;YACjC,qBAAC,OAAD;GAAK,WAAW,GAAG,qBAAO,OAAO,qBAAO,QAAQ,OAAO;aAAvD;IACE,qBAAC,OAAD;KAAK,WAAW,qBAAO;eAAvB,CACE,qBAAC,OAAD;MAAK,WAAW,qBAAO;gBAAvB,CACE,oBAAC,gBAAgB,OAAjB;OAAuB,WAAW,qBAAO;iBAAQ;MAA6B,CAAA,GAC7E,WACC,oBAAC,gBAAgB,aAAjB;OAA6B,WAAW,qBAAO;iBAC5C;MAC0B,CAAA,IAC3B,IACD;SACL,oBAAC,gBAAgB,OAAjB;MAAuB,SAAA;gBACrB,oBAAC,UAAD;OAAQ,WAAW,qBAAO;OAAa,cAAW;iBAChD,qBAAC,OAAD;QAAK,OAAM;QAAK,QAAO;QAAK,SAAQ;QAAY,MAAK;QAAO,QAAO;QAAe,aAAY;QAAM,eAAc;QAAQ,gBAAe;kBAAzI,CACE,oBAAC,QAAD;SAAM,IAAG;SAAK,IAAG;SAAI,IAAG;SAAI,IAAG;QAAM,CAAA,GACrC,oBAAC,QAAD;SAAM,IAAG;SAAI,IAAG;SAAI,IAAG;SAAK,IAAG;QAAM,CAAA,CAClC;;MACC,CAAA;KACa,CAAA,CACpB;;IAEL,oBAAC,OAAD;KAAK,WAAW,qBAAO;KAAO;IAAc,CAAA;IAE3C,UAAU,oBAAC,OAAD;KAAK,WAAW,qBAAO;eAAS;IAAY,CAAA;GACpD;;CACO,CAAA;AAElB"}
|
package/dist/index16.cjs
CHANGED
|
@@ -1,16 +1,87 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
const require_runtime = require("./index2.cjs");
|
|
2
3
|
const require_cx = require("./index4.cjs");
|
|
3
|
-
const
|
|
4
|
+
const require_modal_module = require("./index15.cjs");
|
|
4
5
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
let _radix_ui_react_dialog = require("@radix-ui/react-dialog");
|
|
7
|
+
_radix_ui_react_dialog = require_runtime.__toESM(_radix_ui_react_dialog, 1);
|
|
8
|
+
//#region src/components/modal/Modal.tsx
|
|
9
|
+
function ModalOverlay({ open, onClose, className, children }) {
|
|
10
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Root, {
|
|
11
|
+
open,
|
|
12
|
+
onOpenChange: (nextOpen) => {
|
|
13
|
+
if (!nextOpen) onClose();
|
|
14
|
+
},
|
|
15
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Portal, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
16
|
+
className: require_modal_module.default.portalLayer,
|
|
17
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Overlay, { className: require_cx.cx(require_modal_module.default.backdrop, className) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Content, {
|
|
18
|
+
className: require_modal_module.default.overlayContent,
|
|
19
|
+
children
|
|
20
|
+
})]
|
|
21
|
+
}) })
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function Modal({ open, onClose, title, subtitle, size = "md", children, footer }) {
|
|
25
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ModalOverlay, {
|
|
26
|
+
open,
|
|
27
|
+
onClose,
|
|
28
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
29
|
+
className: require_cx.cx(require_modal_module.default.modal, require_modal_module.default[`size-${size}`]),
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
32
|
+
className: require_modal_module.default.header,
|
|
33
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
34
|
+
className: require_modal_module.default.titles,
|
|
35
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Title, {
|
|
36
|
+
className: require_modal_module.default.title,
|
|
37
|
+
children: title
|
|
38
|
+
}), subtitle ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Description, {
|
|
39
|
+
className: require_modal_module.default.subtitle,
|
|
40
|
+
children: subtitle
|
|
41
|
+
}) : null]
|
|
42
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Close, {
|
|
43
|
+
asChild: true,
|
|
44
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
45
|
+
className: require_modal_module.default.closeButton,
|
|
46
|
+
"aria-label": "Close",
|
|
47
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
48
|
+
width: "14",
|
|
49
|
+
height: "14",
|
|
50
|
+
viewBox: "0 0 24 24",
|
|
51
|
+
fill: "none",
|
|
52
|
+
stroke: "currentColor",
|
|
53
|
+
strokeWidth: "2.5",
|
|
54
|
+
strokeLinecap: "round",
|
|
55
|
+
strokeLinejoin: "round",
|
|
56
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("line", {
|
|
57
|
+
x1: "18",
|
|
58
|
+
y1: "6",
|
|
59
|
+
x2: "6",
|
|
60
|
+
y2: "18"
|
|
61
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("line", {
|
|
62
|
+
x1: "6",
|
|
63
|
+
y1: "6",
|
|
64
|
+
x2: "18",
|
|
65
|
+
y2: "18"
|
|
66
|
+
})]
|
|
67
|
+
})
|
|
68
|
+
})
|
|
69
|
+
})]
|
|
70
|
+
}),
|
|
71
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
72
|
+
className: require_modal_module.default.body,
|
|
73
|
+
children
|
|
74
|
+
}),
|
|
75
|
+
footer && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
76
|
+
className: require_modal_module.default.footer,
|
|
77
|
+
children: footer
|
|
78
|
+
})
|
|
79
|
+
]
|
|
80
|
+
})
|
|
11
81
|
});
|
|
12
82
|
}
|
|
13
83
|
//#endregion
|
|
14
|
-
exports.
|
|
84
|
+
exports.Modal = Modal;
|
|
85
|
+
exports.ModalOverlay = ModalOverlay;
|
|
15
86
|
|
|
16
87
|
//# sourceMappingURL=index16.cjs.map
|
package/dist/index16.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index16.cjs","names":[],"sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index16.cjs","names":[],"sources":["../src/components/modal/Modal.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { cx } from \"../../utils/cx\";\nimport styles from \"./modal.module.css\";\n\n// ── ModalOverlay ─────────────────────────────────────────────────────────────\n// Bare backdrop + container. No opinions on layout inside.\n// Use this when you need a full-custom layout (e.g. wide media modals).\n\nexport type ModalOverlayProps = {\n open: boolean;\n onClose: () => void;\n /** Extra class applied to the backdrop */\n className?: string;\n children: ReactNode;\n};\n\nexport function ModalOverlay({ open, onClose, className, children }: ModalOverlayProps) {\n return (\n <DialogPrimitive.Root\n open={open}\n onOpenChange={(nextOpen: boolean) => {\n if (!nextOpen) onClose();\n }}\n >\n <DialogPrimitive.Portal>\n <div className={styles.portalLayer}>\n <DialogPrimitive.Overlay className={cx(styles.backdrop, className)} />\n <DialogPrimitive.Content className={styles.overlayContent}>\n {children}\n </DialogPrimitive.Content>\n </div>\n </DialogPrimitive.Portal>\n </DialogPrimitive.Root>\n );\n}\n\n// ── Modal ─────────────────────────────────────────────────────────────────────\n// Opinionated dialog: header (title + close button), scrollable body, footer.\n\nexport type ModalSize = \"sm\" | \"md\" | \"lg\" | \"xl\";\n\nexport type ModalProps = {\n open: boolean;\n onClose: () => void;\n title: string;\n subtitle?: string;\n size?: ModalSize;\n children: ReactNode;\n footer?: ReactNode;\n};\n\nexport function Modal({ open, onClose, title, subtitle, size = \"md\", children, footer }: ModalProps) {\n return (\n <ModalOverlay open={open} onClose={onClose}>\n <div className={cx(styles.modal, styles[`size-${size}`])}>\n <div className={styles.header}>\n <div className={styles.titles}>\n <DialogPrimitive.Title className={styles.title}>{title}</DialogPrimitive.Title>\n {subtitle ? (\n <DialogPrimitive.Description className={styles.subtitle}>\n {subtitle}\n </DialogPrimitive.Description>\n ) : null}\n </div>\n <DialogPrimitive.Close asChild>\n <button className={styles.closeButton} aria-label=\"Close\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n </button>\n </DialogPrimitive.Close>\n </div>\n\n <div className={styles.body}>{children}</div>\n\n {footer && <div className={styles.footer}>{footer}</div>}\n </div>\n </ModalOverlay>\n );\n}\n"],"mappings":";;;;;;;;AAmBA,SAAgB,aAAa,EAAE,MAAM,SAAS,WAAW,YAA+B;CACtF,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,uBAAgB,MAAjB;EACQ;EACN,eAAe,aAAsB;GACnC,IAAI,CAAC,UAAU,QAAQ;EACzB;YAEA,iBAAA,GAAA,kBAAA,IAAA,CAAC,uBAAgB,QAAjB,EAAA,UACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;GAAK,WAAW,qBAAA,QAAO;aAAvB,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,uBAAgB,SAAjB,EAAyB,WAAW,WAAA,GAAG,qBAAA,QAAO,UAAU,SAAS,EAAI,CAAA,GACrE,iBAAA,GAAA,kBAAA,IAAA,CAAC,uBAAgB,SAAjB;IAAyB,WAAW,qBAAA,QAAO;IACxC;GACsB,CAAA,CACtB;KACiB,CAAA;CACJ,CAAA;AAE1B;AAiBA,SAAgB,MAAM,EAAE,MAAM,SAAS,OAAO,UAAU,OAAO,MAAM,UAAU,UAAsB;CACnG,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,cAAD;EAAoB;EAAe;YACjC,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;GAAK,WAAW,WAAA,GAAG,qBAAA,QAAO,OAAO,qBAAA,QAAO,QAAQ,OAAO;aAAvD;IACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;KAAK,WAAW,qBAAA,QAAO;eAAvB,CACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;MAAK,WAAW,qBAAA,QAAO;gBAAvB,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,uBAAgB,OAAjB;OAAuB,WAAW,qBAAA,QAAO;iBAAQ;MAA6B,CAAA,GAC7E,WACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,uBAAgB,aAAjB;OAA6B,WAAW,qBAAA,QAAO;iBAC5C;MAC0B,CAAA,IAC3B,IACD;SACL,iBAAA,GAAA,kBAAA,IAAA,CAAC,uBAAgB,OAAjB;MAAuB,SAAA;gBACrB,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;OAAQ,WAAW,qBAAA,QAAO;OAAa,cAAW;iBAChD,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;QAAK,OAAM;QAAK,QAAO;QAAK,SAAQ;QAAY,MAAK;QAAO,QAAO;QAAe,aAAY;QAAM,eAAc;QAAQ,gBAAe;kBAAzI,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;SAAM,IAAG;SAAK,IAAG;SAAI,IAAG;SAAI,IAAG;QAAM,CAAA,GACrC,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;SAAM,IAAG;SAAI,IAAG;SAAI,IAAG;SAAK,IAAG;QAAM,CAAA,CAClC;;MACC,CAAA;KACa,CAAA,CACpB;;IAEL,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;KAAK,WAAW,qBAAA,QAAO;KAAO;IAAc,CAAA;IAE3C,UAAU,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;KAAK,WAAW,qBAAA,QAAO;eAAS;IAAY,CAAA;GACpD;;CACO,CAAA;AAElB"}
|
package/dist/index16.js
CHANGED
|
@@ -1,45 +1,17 @@
|
|
|
1
|
-
//#region src/components/
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var icon = "uzi-toast-module__icon__LIAqr";
|
|
14
|
-
var body = "uzi-toast-module__body__9vzs7";
|
|
15
|
-
var message = "uzi-toast-module__message__TBY65";
|
|
16
|
-
var actions = "uzi-toast-module__actions__Iykd9";
|
|
17
|
-
var actionButton = "uzi-toast-module__actionButton__cvUr0";
|
|
18
|
-
var controls = "uzi-toast-module__controls__LqA4Q";
|
|
19
|
-
var iconButton = "uzi-toast-module__iconButton__FOsOp";
|
|
20
|
-
var iconButtonError = "uzi-toast-module__iconButtonError__NJsLX";
|
|
21
|
-
var toast_module_default = {
|
|
22
|
-
stack,
|
|
23
|
-
topRight,
|
|
24
|
-
topLeft,
|
|
25
|
-
topCenter,
|
|
26
|
-
bottomRight,
|
|
27
|
-
bottomLeft,
|
|
28
|
-
bottomCenter,
|
|
29
|
-
toast,
|
|
30
|
-
toastSlideIn,
|
|
31
|
-
toastSlideOut,
|
|
32
|
-
toastSwipeOut,
|
|
33
|
-
icon,
|
|
34
|
-
body,
|
|
35
|
-
message,
|
|
36
|
-
actions,
|
|
37
|
-
actionButton,
|
|
38
|
-
controls,
|
|
39
|
-
iconButton,
|
|
40
|
-
iconButtonError
|
|
1
|
+
//#region src/components/alert/alert.module.css
|
|
2
|
+
var alert = "uzi-alert-module__alert__7Bt6c";
|
|
3
|
+
var success = "uzi-alert-module__success__apdFG";
|
|
4
|
+
var error = "uzi-alert-module__error__KLgi1";
|
|
5
|
+
var warning = "uzi-alert-module__warning__F4fpk";
|
|
6
|
+
var info = "uzi-alert-module__info__1IKHt";
|
|
7
|
+
var alert_module_default = {
|
|
8
|
+
alert,
|
|
9
|
+
success,
|
|
10
|
+
error,
|
|
11
|
+
warning,
|
|
12
|
+
info
|
|
41
13
|
};
|
|
42
14
|
//#endregion
|
|
43
|
-
export {
|
|
15
|
+
export { alert, alert_module_default as default, error, info, success, warning };
|
|
44
16
|
|
|
45
17
|
//# sourceMappingURL=index16.js.map
|
package/dist/index16.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index16.js","names":[],"sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index16.js","names":[],"sources":["../src/components/alert/alert.module.css"],"sourcesContent":[".alert {\n display: flex;\n align-items: flex-start;\n gap: 0.5rem;\n border-radius: 0.375rem;\n border: 1px solid;\n padding: 0.625rem 0.875rem;\n font-size: 0.875rem;\n line-height: 1.5;\n}\n\n.success {\n border-color: color-mix(in srgb, var(--success) 35%, transparent);\n background: color-mix(in srgb, var(--success) 10%, transparent);\n color: color-mix(in srgb, var(--success) 90%, var(--foreground));\n}\n\n.error {\n border-color: color-mix(in srgb, var(--destructive) 35%, transparent);\n background: color-mix(in srgb, var(--destructive) 10%, transparent);\n color: color-mix(in srgb, var(--destructive) 90%, var(--foreground));\n}\n\n.warning {\n border-color: color-mix(in srgb, var(--warning) 35%, transparent);\n background: color-mix(in srgb, var(--warning) 10%, transparent);\n color: color-mix(in srgb, var(--warning) 90%, var(--foreground));\n}\n\n.info {\n border-color: color-mix(in srgb, var(--primary) 35%, transparent);\n background: color-mix(in srgb, var(--primary) 10%, transparent);\n color: color-mix(in srgb, var(--primary) 90%, var(--foreground));\n}\n"],"mappings":""}
|
package/dist/index17.cjs
CHANGED
|
@@ -1,64 +1,22 @@
|
|
|
1
|
-
//#region src/components/
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var icon = "uzi-toast-module__icon__LIAqr";
|
|
14
|
-
var body = "uzi-toast-module__body__9vzs7";
|
|
15
|
-
var message = "uzi-toast-module__message__TBY65";
|
|
16
|
-
var actions = "uzi-toast-module__actions__Iykd9";
|
|
17
|
-
var actionButton = "uzi-toast-module__actionButton__cvUr0";
|
|
18
|
-
var controls = "uzi-toast-module__controls__LqA4Q";
|
|
19
|
-
var iconButton = "uzi-toast-module__iconButton__FOsOp";
|
|
20
|
-
var iconButtonError = "uzi-toast-module__iconButtonError__NJsLX";
|
|
21
|
-
var toast_module_default = {
|
|
22
|
-
stack,
|
|
23
|
-
topRight,
|
|
24
|
-
topLeft,
|
|
25
|
-
topCenter,
|
|
26
|
-
bottomRight,
|
|
27
|
-
bottomLeft,
|
|
28
|
-
bottomCenter,
|
|
29
|
-
toast,
|
|
30
|
-
toastSlideIn,
|
|
31
|
-
toastSlideOut,
|
|
32
|
-
toastSwipeOut,
|
|
33
|
-
icon,
|
|
34
|
-
body,
|
|
35
|
-
message,
|
|
36
|
-
actions,
|
|
37
|
-
actionButton,
|
|
38
|
-
controls,
|
|
39
|
-
iconButton,
|
|
40
|
-
iconButtonError
|
|
1
|
+
//#region src/components/alert/alert.module.css
|
|
2
|
+
var alert = "uzi-alert-module__alert__7Bt6c";
|
|
3
|
+
var success = "uzi-alert-module__success__apdFG";
|
|
4
|
+
var error = "uzi-alert-module__error__KLgi1";
|
|
5
|
+
var warning = "uzi-alert-module__warning__F4fpk";
|
|
6
|
+
var info = "uzi-alert-module__info__1IKHt";
|
|
7
|
+
var alert_module_default = {
|
|
8
|
+
alert,
|
|
9
|
+
success,
|
|
10
|
+
error,
|
|
11
|
+
warning,
|
|
12
|
+
info
|
|
41
13
|
};
|
|
42
14
|
//#endregion
|
|
43
|
-
exports.
|
|
44
|
-
exports.
|
|
45
|
-
exports.
|
|
46
|
-
exports.
|
|
47
|
-
exports.
|
|
48
|
-
exports.
|
|
49
|
-
exports.controls = controls;
|
|
50
|
-
exports.default = toast_module_default;
|
|
51
|
-
exports.icon = icon;
|
|
52
|
-
exports.iconButton = iconButton;
|
|
53
|
-
exports.iconButtonError = iconButtonError;
|
|
54
|
-
exports.message = message;
|
|
55
|
-
exports.stack = stack;
|
|
56
|
-
exports.toast = toast;
|
|
57
|
-
exports.toastSlideIn = toastSlideIn;
|
|
58
|
-
exports.toastSlideOut = toastSlideOut;
|
|
59
|
-
exports.toastSwipeOut = toastSwipeOut;
|
|
60
|
-
exports.topCenter = topCenter;
|
|
61
|
-
exports.topLeft = topLeft;
|
|
62
|
-
exports.topRight = topRight;
|
|
15
|
+
exports.alert = alert;
|
|
16
|
+
exports.default = alert_module_default;
|
|
17
|
+
exports.error = error;
|
|
18
|
+
exports.info = info;
|
|
19
|
+
exports.success = success;
|
|
20
|
+
exports.warning = warning;
|
|
63
21
|
|
|
64
22
|
//# sourceMappingURL=index17.cjs.map
|
package/dist/index17.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index17.cjs","names":[],"sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index17.cjs","names":[],"sources":["../src/components/alert/alert.module.css"],"sourcesContent":[".alert {\n display: flex;\n align-items: flex-start;\n gap: 0.5rem;\n border-radius: 0.375rem;\n border: 1px solid;\n padding: 0.625rem 0.875rem;\n font-size: 0.875rem;\n line-height: 1.5;\n}\n\n.success {\n border-color: color-mix(in srgb, var(--success) 35%, transparent);\n background: color-mix(in srgb, var(--success) 10%, transparent);\n color: color-mix(in srgb, var(--success) 90%, var(--foreground));\n}\n\n.error {\n border-color: color-mix(in srgb, var(--destructive) 35%, transparent);\n background: color-mix(in srgb, var(--destructive) 10%, transparent);\n color: color-mix(in srgb, var(--destructive) 90%, var(--foreground));\n}\n\n.warning {\n border-color: color-mix(in srgb, var(--warning) 35%, transparent);\n background: color-mix(in srgb, var(--warning) 10%, transparent);\n color: color-mix(in srgb, var(--warning) 90%, var(--foreground));\n}\n\n.info {\n border-color: color-mix(in srgb, var(--primary) 35%, transparent);\n background: color-mix(in srgb, var(--primary) 10%, transparent);\n color: color-mix(in srgb, var(--primary) 90%, var(--foreground));\n}\n"],"mappings":""}
|