@hanzo/ui 8.0.114 → 8.0.115
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.
|
@@ -26,9 +26,9 @@ const DialogClose = gui_1.Dialog.Close;
|
|
|
26
26
|
exports.DialogClose = DialogClose;
|
|
27
27
|
const DialogOverlay = (props) => ((0, jsx_runtime_1.jsx)(gui_1.Dialog.Overlay, { ...(0, slot_1.slot)('dialog-overlay'), bg: "rgba(0,0,0,0.5)", opacity: 0.5, ...props }));
|
|
28
28
|
exports.DialogOverlay = DialogOverlay;
|
|
29
|
-
const DialogContent = ({ showCloseButton = true, children, ...props }) => {
|
|
29
|
+
const DialogContent = ({ showCloseButton = true, overlay, children, ...props }) => {
|
|
30
30
|
const themeName = (0, portal_theme_1.useThemeName)();
|
|
31
|
-
return ((0, jsx_runtime_1.jsx)(gui_1.Dialog.Portal, { children: (0, jsx_runtime_1.jsxs)(portal_theme_1.PortalTheme, { name: themeName, children: [(0, jsx_runtime_1.jsx)(DialogOverlay, {}), (0, jsx_runtime_1.jsxs)(gui_1.Dialog.Content, { ...(0, slot_1.slot)('dialog-content'), bg: "$background", borderWidth: 1, borderColor: "$borderColor", rounded: "$5", p: PAD, gap: "$4", width: "100%", maxW: 512, ...props, children: [children, showCloseButton ? ((0, jsx_runtime_1.jsx)(gui_1.Dialog.Close, { asChild: true, children: (0, jsx_runtime_1.jsx)(gui_1.XStack, { ...(0, slot_1.slot)('dialog-close'), position: "absolute", t: 16, r: 16, cursor: "pointer", opacity: 0.7, hoverStyle: { opacity: 1 }, ...(0, gesture_1.touch)(16), "aria-label": "Close", children: (0, jsx_runtime_1.jsx)(lucide_icons_2_1.X, { size: 16 }) }) })) : null] })] }) }));
|
|
31
|
+
return ((0, jsx_runtime_1.jsx)(gui_1.Dialog.Portal, { children: (0, jsx_runtime_1.jsxs)(portal_theme_1.PortalTheme, { name: themeName, children: [(0, jsx_runtime_1.jsx)(DialogOverlay, { ...overlay }), (0, jsx_runtime_1.jsxs)(gui_1.Dialog.Content, { ...(0, slot_1.slot)('dialog-content'), bg: "$background", borderWidth: 1, borderColor: "$borderColor", rounded: "$5", p: PAD, gap: "$4", width: "100%", maxW: 512, ...props, children: [children, showCloseButton ? ((0, jsx_runtime_1.jsx)(gui_1.Dialog.Close, { asChild: true, children: (0, jsx_runtime_1.jsx)(gui_1.XStack, { ...(0, slot_1.slot)('dialog-close'), position: "absolute", t: 16, r: 16, cursor: "pointer", opacity: 0.7, hoverStyle: { opacity: 1 }, ...(0, gesture_1.touch)(16), "aria-label": "Close", children: (0, jsx_runtime_1.jsx)(lucide_icons_2_1.X, { size: 16 }) }) })) : null] })] }) }));
|
|
32
32
|
};
|
|
33
33
|
exports.DialogContent = DialogContent;
|
|
34
34
|
const DialogHeader = (props) => ((0, jsx_runtime_1.jsx)(gui_1.YStack, { ...(0, slot_1.slot)('dialog-header'), gap: "$2", ...props }));
|
|
@@ -15,8 +15,18 @@ export type DialogOverlayProps = ComponentProps<typeof GuiDialog.Overlay>;
|
|
|
15
15
|
declare const DialogOverlay: (props: DialogOverlayProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
export type DialogContentProps = ComponentProps<typeof GuiDialog.Content> & {
|
|
17
17
|
showCloseButton?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* The overlay's own props. Content owns the overlay — that is what lets a
|
|
20
|
+
* caller mount Content alone — but owning it is not the same as hiding it,
|
|
21
|
+
* and with no way through, the dim, the stacking and the click target were
|
|
22
|
+
* unreachable from outside. A consumer stacking dialogs (a preview opened
|
|
23
|
+
* from a dialog) has no way to say which one dims which.
|
|
24
|
+
*
|
|
25
|
+
* Absent, nothing changes: the default overlay renders exactly as before.
|
|
26
|
+
*/
|
|
27
|
+
overlay?: DialogOverlayProps;
|
|
18
28
|
};
|
|
19
|
-
declare const DialogContent: ({ showCloseButton, children, ...props }: DialogContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
declare const DialogContent: ({ showCloseButton, overlay, children, ...props }: DialogContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
30
|
export type DialogSectionProps = ComponentProps<typeof YStack> & {
|
|
21
31
|
children?: ReactNode;
|
|
22
32
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/dialog.tsx"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAEhE,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAOtD,QAAA,MAAM,MAAM,GAAI,GAAG,cAAc,CAAC,OAAO,SAAS,CAAC,4CAA+B,CAAA;AAClF,QAAA,MAAM,aAAa,EAAE,OAAO,SAAS,CAAC,OAA2B,CAAA;AACjE,QAAA,MAAM,YAAY,EAAE,OAAO,SAAS,CAAC,MAAyB,CAAA;AAC9D,QAAA,MAAM,WAAW,EAAE,OAAO,SAAS,CAAC,KAAuB,CAAA;AAE3D,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,OAAO,SAAS,CAAC,OAAO,CAAC,CAAA;AAEzE,QAAA,MAAM,aAAa,GAAI,OAAO,kBAAkB,4CAO/C,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,OAAO,SAAS,CAAC,OAAO,CAAC,GAAG;IAC1E,eAAe,CAAC,EAAE,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/dialog.tsx"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAEhE,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAOtD,QAAA,MAAM,MAAM,GAAI,G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DialogTrigger = GuiDialog.Trigger;
|
|
|
18
18
|
const DialogPortal = GuiDialog.Portal;
|
|
19
19
|
const DialogClose = GuiDialog.Close;
|
|
20
20
|
const DialogOverlay = (props) => (_jsx(GuiDialog.Overlay, { ...slot('dialog-overlay'), bg: "rgba(0,0,0,0.5)", opacity: 0.5, ...props }));
|
|
21
|
-
const DialogContent = ({ showCloseButton = true, children, ...props }) => {
|
|
21
|
+
const DialogContent = ({ showCloseButton = true, overlay, children, ...props }) => {
|
|
22
22
|
const themeName = useThemeName();
|
|
23
|
-
return (_jsx(GuiDialog.Portal, { children: _jsxs(PortalTheme, { name: themeName, children: [_jsx(DialogOverlay, {}), _jsxs(GuiDialog.Content, { ...slot('dialog-content'), bg: "$background", borderWidth: 1, borderColor: "$borderColor", rounded: "$5", p: PAD, gap: "$4", width: "100%", maxW: 512, ...props, children: [children, showCloseButton ? (_jsx(GuiDialog.Close, { asChild: true, children: _jsx(XStack, { ...slot('dialog-close'), position: "absolute", t: 16, r: 16, cursor: "pointer", opacity: 0.7, hoverStyle: { opacity: 1 }, ...touch(16), "aria-label": "Close", children: _jsx(X, { size: 16 }) }) })) : null] })] }) }));
|
|
23
|
+
return (_jsx(GuiDialog.Portal, { children: _jsxs(PortalTheme, { name: themeName, children: [_jsx(DialogOverlay, { ...overlay }), _jsxs(GuiDialog.Content, { ...slot('dialog-content'), bg: "$background", borderWidth: 1, borderColor: "$borderColor", rounded: "$5", p: PAD, gap: "$4", width: "100%", maxW: 512, ...props, children: [children, showCloseButton ? (_jsx(GuiDialog.Close, { asChild: true, children: _jsx(XStack, { ...slot('dialog-close'), position: "absolute", t: 16, r: 16, cursor: "pointer", opacity: 0.7, hoverStyle: { opacity: 1 }, ...touch(16), "aria-label": "Close", children: _jsx(X, { size: 16 }) }) })) : null] })] }) }));
|
|
24
24
|
};
|
|
25
25
|
const DialogHeader = (props) => (_jsx(YStack, { ...slot('dialog-header'), gap: "$2", ...props }));
|
|
26
26
|
const DialogFooter = (props) => (_jsx(XStack, { ...slot('dialog-footer'), gap: "$2", justify: "flex-end", items: "center", ...props }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../../src/backends/gui/dialog.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;GAMG;AACH,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAChE,OAAO,EAAE,CAAC,EAAE,MAAM,0BAA0B,CAAA;AAE5C,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAC3E,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AAEjC,MAAM,GAAG,GAAG,EAAE,CAAA;AAEd,MAAM,MAAM,GAAG,CAAC,CAAmC,EAAE,EAAE,CAAC,KAAC,SAAS,IAAC,KAAK,WAAK,CAAC,GAAI,CAAA;AAClF,MAAM,aAAa,GAA6B,SAAS,CAAC,OAAO,CAAA;AACjE,MAAM,YAAY,GAA4B,SAAS,CAAC,MAAM,CAAA;AAC9D,MAAM,WAAW,GAA2B,SAAS,CAAC,KAAK,CAAA;AAI3D,MAAM,aAAa,GAAG,CAAC,KAAyB,EAAE,EAAE,CAAC,CACnD,KAAC,SAAS,CAAC,OAAO,OACZ,IAAI,CAAC,gBAAgB,CAAC,EAC1B,EAAE,EAAC,iBAAiB,EACpB,OAAO,EAAE,GAAG,KACR,KAAK,GACT,CACH,CAAA;
|
|
1
|
+
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../../src/backends/gui/dialog.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;GAMG;AACH,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAChE,OAAO,EAAE,CAAC,EAAE,MAAM,0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EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/ui",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.115",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Hanzo UI — the one canonical Hanzo component library, on @hanzo/gui + @hanzo/design. ONE substrate: every component renders through @hanzo/gui primitives, so the same import works on web, native (expo) and desktop (Tauri). Self-contained (theme.css), presentational, host-agnostic, clean-room.",
|
|
6
6
|
"exports": {
|