@hanzo/ui 8.27.4 → 8.27.7
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/backends/gui/select.cjs +38 -27
- package/dist/backends/gui/select.d.ts +14 -5
- package/dist/backends/gui/select.d.ts.map +1 -1
- package/dist/backends/gui/select.js +42 -31
- package/dist/backends/gui/select.js.map +1 -1
- package/dist/backends/gui/tooltip.cjs +22 -3
- package/dist/backends/gui/tooltip.d.ts +12 -4
- package/dist/backends/gui/tooltip.d.ts.map +1 -1
- package/dist/backends/gui/tooltip.js +22 -3
- package/dist/backends/gui/tooltip.js.map +1 -1
- package/dist/box.cjs +16 -1
- package/dist/box.d.ts.map +1 -1
- package/dist/box.js +16 -1
- package/dist/box.js.map +1 -1
- package/dist/core/fonts.cjs +0 -1
- package/dist/core/fonts.d.ts +0 -1
- package/dist/core/fonts.d.ts.map +1 -1
- package/dist/core/fonts.js +0 -1
- package/dist/core/fonts.js.map +1 -1
- package/dist/gallery.html +1 -1
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';"use strict";
|
|
2
|
-
|
|
2
|
+
"use client";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.SelectScrollDownButton = exports.SelectScrollUpButton = exports.SelectSeparator = exports.SelectItem = exports.SelectLabel = exports.SelectContent = exports.SelectTrigger = exports.SelectValue = exports.SelectGroup = exports.Select = void 0;
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
@@ -12,38 +12,47 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
12
12
|
* `SelectGroup`. An item is written `<SelectItem value="x">Label</SelectItem>`
|
|
13
13
|
* and the numbering always matches render order.
|
|
14
14
|
*/
|
|
15
|
+
const react_1 = require("react");
|
|
15
16
|
const gui_1 = require("@hanzo/gui");
|
|
16
17
|
const lucide_icons_2_1 = require("@hanzogui/lucide-icons-2");
|
|
17
|
-
const
|
|
18
|
+
const control_1 = require("./control.cjs");
|
|
19
|
+
const gesture_1 = require("./gesture.cjs");
|
|
18
20
|
const ink_1 = require("./ink.cjs");
|
|
19
21
|
const slot_1 = require("./slot.cjs");
|
|
20
|
-
const gesture_1 = require("./gesture.cjs");
|
|
21
|
-
const control_1 = require("./control.cjs");
|
|
22
22
|
const ROW_H = 32;
|
|
23
23
|
const TRIGGER_H = control_1.CONTROL_H;
|
|
24
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Disabling the control is one fact with two spellings: gui puts `disabled` on
|
|
26
|
+
* the Trigger, the compound API puts it on the root. The root declares it and
|
|
27
|
+
* the trigger honours it, so a call site can say either and mean the same thing.
|
|
28
|
+
*/
|
|
29
|
+
const Disabled = /* @__PURE__ */ (0, react_1.createContext)(false);
|
|
30
|
+
const Select = /* @__PURE__ */ Object.assign(({ disabled = false, ...props }) => ((0, jsx_runtime_1.jsx)(Disabled.Provider, { value: disabled, children: (0, jsx_runtime_1.jsx)(gui_1.Select, { ...props }) })), gui_1.Select);
|
|
25
31
|
exports.Select = Select;
|
|
26
32
|
const SelectGroup = gui_1.Select.Group;
|
|
27
33
|
exports.SelectGroup = SelectGroup;
|
|
28
34
|
const SelectValue = gui_1.Select.Value;
|
|
29
35
|
exports.SelectValue = SelectValue;
|
|
30
|
-
const SelectTrigger = ({ children, ...props }) =>
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
36
|
+
const SelectTrigger = ({ children, disabled, ...props }) => {
|
|
37
|
+
const inherited = (0, react_1.useContext)(Disabled);
|
|
38
|
+
return ((0, jsx_runtime_1.jsxs)(gui_1.Select.Trigger, { ...(0, slot_1.slot)("select-trigger"), unstyled: true, disabled: disabled ?? inherited, ...control_1.FIELD, items: "center", justify: "space-between", gap: "$2",
|
|
39
|
+
// A FLOOR, not a pin. `height` alone clips a child taller than the box, and
|
|
40
|
+
// the build stays green while it does — that is why 01ac46dce moved Button
|
|
41
|
+
// off a pinned height. Select and Input kept theirs, so the same trap was
|
|
42
|
+
// still armed in the two controls that sit in every form.
|
|
43
|
+
height: "auto", minHeight: TRIGGER_H,
|
|
44
|
+
// The trigger states its own vertical padding because otherwise something
|
|
45
|
+
// else states it. `unstyled` does not survive gui's ListItem (it is
|
|
46
|
+
// destructured into a local and never reaches the frame), so the frame
|
|
47
|
+
// styles itself at `size: '$true'` and writes `paddingVertical: $3.5` — and
|
|
48
|
+
// under `height: auto` that padding, not the floor, is what decides the box:
|
|
49
|
+
// 14 + a 20px line + 14 + 2px of border rendered a 50px Select beside a 36px
|
|
50
|
+
// Input. At 0 the floor decides again and `items="center"` does the
|
|
51
|
+
// centring, which is exactly how the Input already behaves.
|
|
52
|
+
py: 0, cursor: "pointer", ...(0, gesture_1.touch)(TRIGGER_H, 44, "y"), ...props, children: [(0, ink_1.ink)(children, undefined, { size: "$3" }), (0, jsx_runtime_1.jsx)(gui_1.Select.Icon, { children: (0, jsx_runtime_1.jsx)(lucide_icons_2_1.ChevronDown, { size: 16, opacity: 0.5 }) })] }));
|
|
53
|
+
};
|
|
45
54
|
exports.SelectTrigger = SelectTrigger;
|
|
46
|
-
const SelectItem = ({ children, ...props }) => ((0, jsx_runtime_1.jsxs)(gui_1.Select.Item, { ...(0, slot_1.slot)(
|
|
55
|
+
const SelectItem = ({ children, ...props }) => ((0, jsx_runtime_1.jsxs)(gui_1.Select.Item, { ...(0, slot_1.slot)("select-item"), unstyled: true, index: props.index ?? 0, items: "center", gap: "$2", minH: ROW_H, pl: "$2", pr: "$7", rounded: "$2", cursor: "pointer", ...(0, gesture_1.touch)(ROW_H, 44, "y"), hoverStyle: { bg: "$raised" }, focusStyle: { bg: "$raised" }, ...props, children: [(0, jsx_runtime_1.jsx)(gui_1.Select.ItemText, { children: children }), (0, jsx_runtime_1.jsx)(gui_1.XStack, { position: "absolute", r: "$2", items: "center", justify: "center", pointerEvents: "none", children: (0, jsx_runtime_1.jsx)(gui_1.Select.ItemIndicator, { children: (0, jsx_runtime_1.jsx)(lucide_icons_2_1.Check, { size: 16 }) }) })] }));
|
|
47
56
|
exports.SelectItem = SelectItem;
|
|
48
57
|
/** Depth-first stamp of `index` onto every `SelectItem` in render order. */
|
|
49
58
|
const stampIndices = (children, next) => react_1.Children.map(children, (child) => {
|
|
@@ -52,18 +61,20 @@ const stampIndices = (children, next) => react_1.Children.map(children, (child)
|
|
|
52
61
|
if (child.type === SelectItem)
|
|
53
62
|
return (0, react_1.cloneElement)(child, { index: next() });
|
|
54
63
|
const kids = child.props.children;
|
|
55
|
-
return kids === undefined
|
|
64
|
+
return kids === undefined
|
|
65
|
+
? child
|
|
66
|
+
: (0, react_1.cloneElement)(child, undefined, stampIndices(kids, next));
|
|
56
67
|
});
|
|
57
|
-
const SelectScrollUpButton = (props) => ((0, jsx_runtime_1.jsx)(gui_1.Select.ScrollUpButton, { ...(0, slot_1.slot)(
|
|
68
|
+
const SelectScrollUpButton = (props) => ((0, jsx_runtime_1.jsx)(gui_1.Select.ScrollUpButton, { ...(0, slot_1.slot)("select-scroll-up-button"), items: "center", justify: "center", py: "$1", ...props, children: (0, jsx_runtime_1.jsx)(lucide_icons_2_1.ChevronUp, { size: 16 }) }));
|
|
58
69
|
exports.SelectScrollUpButton = SelectScrollUpButton;
|
|
59
|
-
const SelectScrollDownButton = (props) => ((0, jsx_runtime_1.jsx)(gui_1.Select.ScrollDownButton, { ...(0, slot_1.slot)(
|
|
70
|
+
const SelectScrollDownButton = (props) => ((0, jsx_runtime_1.jsx)(gui_1.Select.ScrollDownButton, { ...(0, slot_1.slot)("select-scroll-down-button"), items: "center", justify: "center", py: "$1", ...props, children: (0, jsx_runtime_1.jsx)(lucide_icons_2_1.ChevronDown, { size: 16 }) }));
|
|
60
71
|
exports.SelectScrollDownButton = SelectScrollDownButton;
|
|
61
72
|
const SelectContent = ({ children, ...props }) => {
|
|
62
73
|
let n = 0;
|
|
63
|
-
return ((0, jsx_runtime_1.jsxs)(gui_1.Select.Content, { ...(0, slot_1.slot)(
|
|
74
|
+
return ((0, jsx_runtime_1.jsxs)(gui_1.Select.Content, { ...(0, slot_1.slot)("select-content"), ...props, children: [(0, jsx_runtime_1.jsx)(SelectScrollUpButton, {}), (0, jsx_runtime_1.jsx)(gui_1.Select.Viewport, { minW: 128, p: "$1", bg: "$panel", borderWidth: 1, borderColor: "$borderColor", rounded: "$4", children: stampIndices(children, () => n++) }), (0, jsx_runtime_1.jsx)(SelectScrollDownButton, {})] }));
|
|
64
75
|
};
|
|
65
76
|
exports.SelectContent = SelectContent;
|
|
66
|
-
const SelectLabel = (props) => ((0, jsx_runtime_1.jsx)(gui_1.Select.Label, { ...(0, slot_1.slot)(
|
|
77
|
+
const SelectLabel = (props) => ((0, jsx_runtime_1.jsx)(gui_1.Select.Label, { ...(0, slot_1.slot)("select-label"), px: "$2", py: "$1.5", fontSize: "$1", color: "$quiet", ...props }));
|
|
67
78
|
exports.SelectLabel = SelectLabel;
|
|
68
|
-
const SelectSeparator = (props) => ((0, jsx_runtime_1.jsx)(gui_1.SelectSeparator, { ...(0, slot_1.slot)(
|
|
79
|
+
const SelectSeparator = (props) => ((0, jsx_runtime_1.jsx)(gui_1.SelectSeparator, { ...(0, slot_1.slot)("select-separator"), my: "$1", borderColor: "$borderColor", ...props }));
|
|
69
80
|
exports.SelectSeparator = SelectSeparator;
|
|
@@ -7,20 +7,29 @@
|
|
|
7
7
|
* `SelectGroup`. An item is written `<SelectItem value="x">Label</SelectItem>`
|
|
8
8
|
* and the numbering always matches render order.
|
|
9
9
|
*/
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
10
|
+
import { type ComponentProps, type ReactNode } from "react";
|
|
11
|
+
import { Select as GuiSelect, SelectSeparator as GuiSelectSeparator } from "@hanzo/gui";
|
|
12
|
+
export type SelectProps = ComponentProps<typeof GuiSelect> & {
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* The root's own signature, then the compound statics gui hangs off it. Written
|
|
17
|
+
* out because the inferred type of an `Object.assign` cannot be named in a
|
|
18
|
+
* declaration file, and this package emits one.
|
|
19
|
+
*/
|
|
20
|
+
type SelectRoot = ((props: SelectProps) => ReactNode) & typeof GuiSelect;
|
|
21
|
+
declare const Select: SelectRoot;
|
|
13
22
|
declare const SelectGroup: typeof GuiSelect.Group;
|
|
14
23
|
declare const SelectValue: typeof GuiSelect.Value;
|
|
15
24
|
export type SelectTriggerProps = ComponentProps<typeof GuiSelect.Trigger>;
|
|
16
25
|
export type SelectContentProps = ComponentProps<typeof GuiSelect.Content>;
|
|
17
|
-
export type SelectItemProps = Omit<ComponentProps<typeof GuiSelect.Item>,
|
|
26
|
+
export type SelectItemProps = Omit<ComponentProps<typeof GuiSelect.Item>, "index"> & {
|
|
18
27
|
index?: number;
|
|
19
28
|
};
|
|
20
29
|
export type SelectLabelProps = ComponentProps<typeof GuiSelect.Label>;
|
|
21
30
|
export type SelectSeparatorProps = ComponentProps<typeof GuiSelectSeparator>;
|
|
22
31
|
export type SelectScrollButtonProps = ComponentProps<typeof GuiSelect.ScrollUpButton>;
|
|
23
|
-
declare const SelectTrigger: ({ children, ...props }: SelectTriggerProps) => import("react").JSX.Element;
|
|
32
|
+
declare const SelectTrigger: ({ children, disabled, ...props }: SelectTriggerProps) => import("react").JSX.Element;
|
|
24
33
|
declare const SelectItem: ({ children, ...props }: SelectItemProps) => import("react").JSX.Element;
|
|
25
34
|
declare const SelectScrollUpButton: (props: SelectScrollButtonProps) => import("react").JSX.Element;
|
|
26
35
|
declare const SelectScrollDownButton: (props: SelectScrollButtonProps) => import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/select.tsx"],"names":[],"mappings":"AAEA;;;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,MAAM,aAAa,qCAIhB,kBAAkB,gCAwCpB,CAAA;AAED,QAAA,MAAM,UAAU,2BAA4B,eAAe,gCA8B1D,CAAA;AAcD,QAAA,MAAM,oBAAoB,UAAW,uBAAuB,gCAU3D,CAAA;AAED,QAAA,MAAM,sBAAsB,UAAW,uBAAuB,gCAU7D,CAAA;AAED,QAAA,MAAM,aAAa,2BAA4B,kBAAkB,gCAkBhE,CAAA;AAED,QAAA,MAAM,WAAW,UAAW,gBAAgB,gCAS3C,CAAA;AAED,QAAA,MAAM,eAAe,UAAW,oBAAoB,gCAOnD,CAAA;AAED,OAAO,EACL,MAAM,EACN,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,WAAW,EACX,UAAU,EACV,eAAe,EACf,oBAAoB,EACpB,sBAAsB,GACvB,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
/**
|
|
4
4
|
* Select — the compound picker on @hanzogui/select.
|
|
@@ -9,34 +9,43 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
9
9
|
* `SelectGroup`. An item is written `<SelectItem value="x">Label</SelectItem>`
|
|
10
10
|
* and the numbering always matches render order.
|
|
11
11
|
*/
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
12
|
+
import { Children, cloneElement, createContext, isValidElement, useContext, } from "react";
|
|
13
|
+
import { Select as GuiSelect, SelectSeparator as GuiSelectSeparator, XStack, } from "@hanzo/gui";
|
|
14
|
+
import { Check, ChevronDown, ChevronUp } from "@hanzogui/lucide-icons-2";
|
|
15
|
+
import { CONTROL_H, FIELD } from "./control.js";
|
|
16
|
+
import { touch } from "./gesture.js";
|
|
17
|
+
import { ink } from "./ink.js";
|
|
18
|
+
import { slot } from "./slot.js";
|
|
19
19
|
const ROW_H = 32;
|
|
20
20
|
const TRIGGER_H = CONTROL_H;
|
|
21
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Disabling the control is one fact with two spellings: gui puts `disabled` on
|
|
23
|
+
* the Trigger, the compound API puts it on the root. The root declares it and
|
|
24
|
+
* the trigger honours it, so a call site can say either and mean the same thing.
|
|
25
|
+
*/
|
|
26
|
+
const Disabled = /* @__PURE__ */ createContext(false);
|
|
27
|
+
const Select = /* @__PURE__ */ Object.assign(({ disabled = false, ...props }) => (_jsx(Disabled.Provider, { value: disabled, children: _jsx(GuiSelect, { ...props }) })), GuiSelect);
|
|
22
28
|
const SelectGroup = GuiSelect.Group;
|
|
23
29
|
const SelectValue = GuiSelect.Value;
|
|
24
|
-
const SelectTrigger = ({ children, ...props }) =>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
30
|
+
const SelectTrigger = ({ children, disabled, ...props }) => {
|
|
31
|
+
const inherited = useContext(Disabled);
|
|
32
|
+
return (_jsxs(GuiSelect.Trigger, { ...slot("select-trigger"), unstyled: true, disabled: disabled ?? inherited, ...FIELD, items: "center", justify: "space-between", gap: "$2",
|
|
33
|
+
// A FLOOR, not a pin. `height` alone clips a child taller than the box, and
|
|
34
|
+
// the build stays green while it does — that is why 01ac46dce moved Button
|
|
35
|
+
// off a pinned height. Select and Input kept theirs, so the same trap was
|
|
36
|
+
// still armed in the two controls that sit in every form.
|
|
37
|
+
height: "auto", minHeight: TRIGGER_H,
|
|
38
|
+
// The trigger states its own vertical padding because otherwise something
|
|
39
|
+
// else states it. `unstyled` does not survive gui's ListItem (it is
|
|
40
|
+
// destructured into a local and never reaches the frame), so the frame
|
|
41
|
+
// styles itself at `size: '$true'` and writes `paddingVertical: $3.5` — and
|
|
42
|
+
// under `height: auto` that padding, not the floor, is what decides the box:
|
|
43
|
+
// 14 + a 20px line + 14 + 2px of border rendered a 50px Select beside a 36px
|
|
44
|
+
// Input. At 0 the floor decides again and `items="center"` does the
|
|
45
|
+
// centring, which is exactly how the Input already behaves.
|
|
46
|
+
py: 0, cursor: "pointer", ...touch(TRIGGER_H, 44, "y"), ...props, children: [ink(children, undefined, { size: "$3" }), _jsx(GuiSelect.Icon, { children: _jsx(ChevronDown, { size: 16, opacity: 0.5 }) })] }));
|
|
47
|
+
};
|
|
48
|
+
const SelectItem = ({ children, ...props }) => (_jsxs(GuiSelect.Item, { ...slot("select-item"), unstyled: true, index: props.index ?? 0, items: "center", gap: "$2", minH: ROW_H, pl: "$2", pr: "$7", rounded: "$2", cursor: "pointer", ...touch(ROW_H, 44, "y"), hoverStyle: { bg: "$raised" }, focusStyle: { bg: "$raised" }, ...props, children: [_jsx(GuiSelect.ItemText, { children: children }), _jsx(XStack, { position: "absolute", r: "$2", items: "center", justify: "center", pointerEvents: "none", children: _jsx(GuiSelect.ItemIndicator, { children: _jsx(Check, { size: 16 }) }) })] }));
|
|
40
49
|
/** Depth-first stamp of `index` onto every `SelectItem` in render order. */
|
|
41
50
|
const stampIndices = (children, next) => Children.map(children, (child) => {
|
|
42
51
|
if (!isValidElement(child))
|
|
@@ -44,15 +53,17 @@ const stampIndices = (children, next) => Children.map(children, (child) => {
|
|
|
44
53
|
if (child.type === SelectItem)
|
|
45
54
|
return cloneElement(child, { index: next() });
|
|
46
55
|
const kids = child.props.children;
|
|
47
|
-
return kids === undefined
|
|
56
|
+
return kids === undefined
|
|
57
|
+
? child
|
|
58
|
+
: cloneElement(child, undefined, stampIndices(kids, next));
|
|
48
59
|
});
|
|
49
|
-
const SelectScrollUpButton = (props) => (_jsx(GuiSelect.ScrollUpButton, { ...slot(
|
|
50
|
-
const SelectScrollDownButton = (props) => (_jsx(GuiSelect.ScrollDownButton, { ...slot(
|
|
60
|
+
const SelectScrollUpButton = (props) => (_jsx(GuiSelect.ScrollUpButton, { ...slot("select-scroll-up-button"), items: "center", justify: "center", py: "$1", ...props, children: _jsx(ChevronUp, { size: 16 }) }));
|
|
61
|
+
const SelectScrollDownButton = (props) => (_jsx(GuiSelect.ScrollDownButton, { ...slot("select-scroll-down-button"), items: "center", justify: "center", py: "$1", ...props, children: _jsx(ChevronDown, { size: 16 }) }));
|
|
51
62
|
const SelectContent = ({ children, ...props }) => {
|
|
52
63
|
let n = 0;
|
|
53
|
-
return (_jsxs(GuiSelect.Content, { ...slot(
|
|
64
|
+
return (_jsxs(GuiSelect.Content, { ...slot("select-content"), ...props, children: [_jsx(SelectScrollUpButton, {}), _jsx(GuiSelect.Viewport, { minW: 128, p: "$1", bg: "$panel", borderWidth: 1, borderColor: "$borderColor", rounded: "$4", children: stampIndices(children, () => n++) }), _jsx(SelectScrollDownButton, {})] }));
|
|
54
65
|
};
|
|
55
|
-
const SelectLabel = (props) => (_jsx(GuiSelect.Label, { ...slot(
|
|
56
|
-
const SelectSeparator = (props) => (_jsx(GuiSelectSeparator, { ...slot(
|
|
66
|
+
const SelectLabel = (props) => (_jsx(GuiSelect.Label, { ...slot("select-label"), px: "$2", py: "$1.5", fontSize: "$1", color: "$quiet", ...props }));
|
|
67
|
+
const SelectSeparator = (props) => (_jsx(GuiSelectSeparator, { ...slot("select-separator"), my: "$1", borderColor: "$borderColor", ...props }));
|
|
57
68
|
export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, };
|
|
58
69
|
//# sourceMappingURL=select.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.js","sourceRoot":"","sources":["../../../src/backends/gui/select.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;GAQG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"select.js","sourceRoot":"","sources":["../../../src/backends/g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a,EACb,aAAa,EACb,WAAW,EACX,UAAU,EACV,eAAe,EACf,oBAAoB,EACpB,sBAAsB,GACvB,CAAA"}
|
|
@@ -3,20 +3,39 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.TooltipProvider = exports.TooltipContent = exports.TooltipTrigger = exports.Tooltip = void 0;
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* Tooltip — hover/focus hint. `TooltipProvider` is gui's `TooltipGroup`.
|
|
8
|
+
*
|
|
9
|
+
* gui keeps the offset on the tooltip ROOT while the compound API spells it on
|
|
10
|
+
* Content, as `sideOffset`. One value, one owner: the root holds it, Content
|
|
11
|
+
* publishes into it — the same split `popover` resolves, for the same reason.
|
|
12
|
+
*/
|
|
7
13
|
const gui_1 = require("@hanzo/gui");
|
|
14
|
+
const react_1 = require("react");
|
|
8
15
|
const portal_theme_1 = require("../../product/menu/portal-theme.cjs");
|
|
9
16
|
const ink_1 = require("./ink.cjs");
|
|
10
17
|
const slot_1 = require("./slot.cjs");
|
|
11
18
|
const DEFAULT_OFFSET = 4;
|
|
12
|
-
const
|
|
19
|
+
const Publish = /* @__PURE__ */ (0, react_1.createContext)(null);
|
|
20
|
+
const Tooltip = ({ offset = DEFAULT_OFFSET, ...props }) => {
|
|
21
|
+
const [placed, setPlaced] = (0, react_1.useState)({});
|
|
22
|
+
const publish = (0, react_1.useCallback)((p) => setPlaced((prev) => ({ ...prev, ...p })), []);
|
|
23
|
+
return ((0, jsx_runtime_1.jsx)(Publish.Provider, { value: publish, children: (0, jsx_runtime_1.jsx)(gui_1.Tooltip, { offset: placed.offset ?? offset, ...props }) }));
|
|
24
|
+
};
|
|
13
25
|
exports.Tooltip = Tooltip;
|
|
14
26
|
const TooltipTrigger = gui_1.Tooltip.Trigger;
|
|
15
27
|
exports.TooltipTrigger = TooltipTrigger;
|
|
16
28
|
const TooltipProvider = gui_1.TooltipGroup;
|
|
17
29
|
exports.TooltipProvider = TooltipProvider;
|
|
18
|
-
const TooltipContent = ({ sideOffset
|
|
30
|
+
const TooltipContent = ({ sideOffset, children, ...props }) => {
|
|
19
31
|
const themeName = (0, portal_theme_1.useThemeName)();
|
|
32
|
+
const publish = (0, react_1.useContext)(Publish);
|
|
33
|
+
// Only a Content that names an offset has anything to say about it; an absent
|
|
34
|
+
// one leaves whatever the root was given standing.
|
|
35
|
+
(0, react_1.useEffect)(() => {
|
|
36
|
+
if (sideOffset !== undefined)
|
|
37
|
+
publish?.({ offset: sideOffset });
|
|
38
|
+
}, [publish, sideOffset]);
|
|
20
39
|
return ((0, jsx_runtime_1.jsx)(portal_theme_1.PortalTheme, { name: themeName, children: (0, jsx_runtime_1.jsx)(gui_1.Tooltip.Content, { ...(0, slot_1.slot)('tooltip-content'), bg: "$panel", borderWidth: 1, borderColor: "$borderColor", rounded: "$3", px: "$3", py: "$1.5", ...props, children: (0, ink_1.ink)(children, undefined, { size: '$1' }) }) }));
|
|
21
40
|
};
|
|
22
41
|
exports.TooltipContent = TooltipContent;
|
|
@@ -1,13 +1,21 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* Tooltip — hover/focus hint. `TooltipProvider` is gui's `TooltipGroup`.
|
|
3
|
+
*
|
|
4
|
+
* gui keeps the offset on the tooltip ROOT while the compound API spells it on
|
|
5
|
+
* Content, as `sideOffset`. One value, one owner: the root holds it, Content
|
|
6
|
+
* publishes into it — the same split `popover` resolves, for the same reason.
|
|
7
|
+
*/
|
|
2
8
|
import { Tooltip as GuiTooltip, TooltipGroup } from '@hanzo/gui';
|
|
3
9
|
import { type ComponentProps } from 'react';
|
|
4
|
-
export type TooltipProps = ComponentProps<typeof GuiTooltip
|
|
10
|
+
export type TooltipProps = Omit<ComponentProps<typeof GuiTooltip>, 'offset'> & {
|
|
11
|
+
offset?: number;
|
|
12
|
+
};
|
|
5
13
|
export type TooltipContentProps = ComponentProps<typeof GuiTooltip.Content> & {
|
|
6
14
|
sideOffset?: number;
|
|
7
15
|
};
|
|
8
|
-
declare const Tooltip: (props: TooltipProps) => import("react").JSX.Element;
|
|
16
|
+
declare const Tooltip: ({ offset, ...props }: TooltipProps) => import("react").JSX.Element;
|
|
9
17
|
declare const TooltipTrigger: typeof GuiTooltip.Trigger;
|
|
10
18
|
declare const TooltipProvider: typeof TooltipGroup;
|
|
11
|
-
declare const TooltipContent: ({ sideOffset
|
|
19
|
+
declare const TooltipContent: ({ sideOffset, children, ...props }: TooltipContentProps) => import("react").JSX.Element;
|
|
12
20
|
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
13
21
|
//# sourceMappingURL=tooltip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/tooltip.tsx"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/tooltip.tsx"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAChE,OAAO,EAML,KAAK,cAAc,EACpB,MAAM,OAAO,CAAA;AAYd,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,UAAU,CAAC,EAAE,QAAQ,CAAC,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAClG,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,OAAO,UAAU,CAAC,OAAO,CAAC,GAAG;IAAE,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAErG,QAAA,MAAM,OAAO,yBAA2C,YAAY,gCAQnE,CAAA;AACD,QAAA,MAAM,cAAc,EAAE,OAAO,UAAU,CAAC,OAA4B,CAAA;AACpE,QAAA,MAAM,eAAe,EAAE,OAAO,YAA2B,CAAA;AAEzD,QAAA,MAAM,cAAc,uCAAwC,mBAAmB,gCAwB9E,CAAA;AAED,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,CAAA"}
|
|
@@ -1,16 +1,35 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Tooltip — hover/focus hint. `TooltipProvider` is gui's `TooltipGroup`.
|
|
5
|
+
*
|
|
6
|
+
* gui keeps the offset on the tooltip ROOT while the compound API spells it on
|
|
7
|
+
* Content, as `sideOffset`. One value, one owner: the root holds it, Content
|
|
8
|
+
* publishes into it — the same split `popover` resolves, for the same reason.
|
|
9
|
+
*/
|
|
4
10
|
import { Tooltip as GuiTooltip, TooltipGroup } from '@hanzo/gui';
|
|
11
|
+
import { createContext, useCallback, useContext, useEffect, useState, } from 'react';
|
|
5
12
|
import { PortalTheme, useThemeName } from '../../product/menu/portal-theme.js';
|
|
6
13
|
import { ink } from './ink.js';
|
|
7
14
|
import { slot } from './slot.js';
|
|
8
15
|
const DEFAULT_OFFSET = 4;
|
|
9
|
-
const
|
|
16
|
+
const Publish = /* @__PURE__ */ createContext(null);
|
|
17
|
+
const Tooltip = ({ offset = DEFAULT_OFFSET, ...props }) => {
|
|
18
|
+
const [placed, setPlaced] = useState({});
|
|
19
|
+
const publish = useCallback((p) => setPlaced((prev) => ({ ...prev, ...p })), []);
|
|
20
|
+
return (_jsx(Publish.Provider, { value: publish, children: _jsx(GuiTooltip, { offset: placed.offset ?? offset, ...props }) }));
|
|
21
|
+
};
|
|
10
22
|
const TooltipTrigger = GuiTooltip.Trigger;
|
|
11
23
|
const TooltipProvider = TooltipGroup;
|
|
12
|
-
const TooltipContent = ({ sideOffset
|
|
24
|
+
const TooltipContent = ({ sideOffset, children, ...props }) => {
|
|
13
25
|
const themeName = useThemeName();
|
|
26
|
+
const publish = useContext(Publish);
|
|
27
|
+
// Only a Content that names an offset has anything to say about it; an absent
|
|
28
|
+
// one leaves whatever the root was given standing.
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
if (sideOffset !== undefined)
|
|
31
|
+
publish?.({ offset: sideOffset });
|
|
32
|
+
}, [publish, sideOffset]);
|
|
14
33
|
return (_jsx(PortalTheme, { name: themeName, children: _jsx(GuiTooltip.Content, { ...slot('tooltip-content'), bg: "$panel", borderWidth: 1, borderColor: "$borderColor", rounded: "$3", px: "$3", py: "$1.5", ...props, children: ink(children, undefined, { size: '$1' }) }) }));
|
|
15
34
|
};
|
|
16
35
|
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../../src/backends/gui/tooltip.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ
|
|
1
|
+
{"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../../src/backends/gui/tooltip.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;GAMG;AACH,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAChE,OAAO,EACL,aAAa,EACb,WAAW,EACX,UAAU,EACV,SAAS,EACT,QAAQ,GAET,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAC3E,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,MAAM,cAAc,GAAG,CAAC,CAAA;AAKxB,MAAM,OAAO,GAAG,eAAe,CAAC,aAAa,CAA+B,IAAI,CAAC,CAAA;AAKjF,MAAM,OAAO,GAAG,CAAC,EAAE,MAAM,GAAG,cAAc,EAAE,GAAG,KAAK,EAAgB,EAAE,EAAE;IACtE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,G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AAE,IAAI,EAAE,CAAC,GACtB,GACT,CACf,CAAA;AACH,CAAC,CAAA;AAED,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,CAAA"}
|
package/dist/box.cjs
CHANGED
|
@@ -98,8 +98,19 @@ const TEXT_PROPS = ['fontSize', 'lineHeight', 'fontWeight', 'letterSpacing',
|
|
|
98
98
|
* not carry the `-webkit-` half of the pair, which is the one Safari reads for
|
|
99
99
|
* clipping a gradient to text.
|
|
100
100
|
*/
|
|
101
|
+
const TABLE = {
|
|
102
|
+
table: 'table', thead: 'table-header-group', tbody: 'table-row-group',
|
|
103
|
+
tfoot: 'table-footer-group', tr: 'table-row', td: 'table-cell', th: 'table-cell',
|
|
104
|
+
caption: 'table-caption', colgroup: 'table-column-group', col: 'table-column',
|
|
105
|
+
};
|
|
101
106
|
const CSS_PROPS = ['scrollSnapType', 'scrollSnapAlign', 'scrollSnapStop',
|
|
102
|
-
'WebkitBackgroundClip'
|
|
107
|
+
'WebkitBackgroundClip',
|
|
108
|
+
// `transition` and `truncate` land here too: gui has no transition props and
|
|
109
|
+
// no `textOverflow`, so on the `tag` path they were forwarded as attributes —
|
|
110
|
+
// `transitionProperty="color, …"` in the markup, a React warning per element,
|
|
111
|
+
// and a link whose hover colour snapped instead of easing.
|
|
112
|
+
'transitionProperty', 'transitionDuration', 'transitionDelay',
|
|
113
|
+
'transitionTimingFunction', 'textOverflow'];
|
|
103
114
|
const BoxInner = (0, react_1.forwardRef)(function Box({ className, children, 'aria-hidden': hidden, tag, ...rest }, ref) {
|
|
104
115
|
const { props, rest: unread } = (0, tw_1.tw)(className);
|
|
105
116
|
// A View pins `min-height: 0`; a div's is `auto`, and auto is what gives a
|
|
@@ -139,6 +150,10 @@ const BoxInner = (0, react_1.forwardRef)(function Box({ className, children, 'ar
|
|
|
139
150
|
// So it rides as a plain style, where it also outranks the class gui emits.
|
|
140
151
|
if (tag === 'li' && !('display' in props))
|
|
141
152
|
text.display = 'list-item';
|
|
153
|
+
// A table is a table only while its parts keep their display values; the
|
|
154
|
+
// block gui stamps on a `td` stacks every cell into one column.
|
|
155
|
+
if (tag && tag in TABLE && !('display' in props))
|
|
156
|
+
text.display = TABLE[tag];
|
|
142
157
|
const style = Object.keys(text).length
|
|
143
158
|
? { ...text, ...rest.style }
|
|
144
159
|
: rest.style;
|
package/dist/box.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"box.d.ts","sourceRoot":"","sources":["../src/box.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACnC,OAAO,EAAM,KAAK,UAAU,EAAE,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"box.d.ts","sourceRoot":"","sources":["../src/box.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACnC,OAAO,EAAM,KAAK,UAAU,EAAE,MAAM,MAAM,CAAA;AA8E1C;;;;;;;;;GASG;AACH;;;;;;;;;;;;;;;;;GAiBG;AACH,KAAK,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAA;AAEhC,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,MAAM,KAAK,CAAC,GAAG,CAAC,iBAAiB,GAAG,KAAK,IAuBtE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EACtC,OAAO,CAAC,MAAM,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,GAAG,KAAK,GAAG,UAAU,CAAC,GAC7E,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC,GAAG;IAC3F,SAAS,CAAC,EAAE,UAAU,CAAA;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IACpB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAC3B;;OAEG;IACH,GAAG,CAAC,EAAE,CAAC,CAAA;IACP;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAA;CAC3C,CAAA;AA8EH;;;;;;;GAOG;AACH,eAAO,MAAM,GAAG,EAAe,CAAC,CAAC,SAAS,MAAM,KAAK,CAAC,GAAG,CAAC,iBAAiB,GAAG,KAAK,EACjF,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;CAAE,KAC1C,KAAK,CAAC,YAAY,GAAG,IAAI,CAAA;eAEf,GAAG"}
|
package/dist/box.js
CHANGED
|
@@ -95,8 +95,19 @@ const TEXT_PROPS = ['fontSize', 'lineHeight', 'fontWeight', 'letterSpacing',
|
|
|
95
95
|
* not carry the `-webkit-` half of the pair, which is the one Safari reads for
|
|
96
96
|
* clipping a gradient to text.
|
|
97
97
|
*/
|
|
98
|
+
const TABLE = {
|
|
99
|
+
table: 'table', thead: 'table-header-group', tbody: 'table-row-group',
|
|
100
|
+
tfoot: 'table-footer-group', tr: 'table-row', td: 'table-cell', th: 'table-cell',
|
|
101
|
+
caption: 'table-caption', colgroup: 'table-column-group', col: 'table-column',
|
|
102
|
+
};
|
|
98
103
|
const CSS_PROPS = ['scrollSnapType', 'scrollSnapAlign', 'scrollSnapStop',
|
|
99
|
-
'WebkitBackgroundClip'
|
|
104
|
+
'WebkitBackgroundClip',
|
|
105
|
+
// `transition` and `truncate` land here too: gui has no transition props and
|
|
106
|
+
// no `textOverflow`, so on the `tag` path they were forwarded as attributes —
|
|
107
|
+
// `transitionProperty="color, …"` in the markup, a React warning per element,
|
|
108
|
+
// and a link whose hover colour snapped instead of easing.
|
|
109
|
+
'transitionProperty', 'transitionDuration', 'transitionDelay',
|
|
110
|
+
'transitionTimingFunction', 'textOverflow'];
|
|
100
111
|
const BoxInner = forwardRef(function Box({ className, children, 'aria-hidden': hidden, tag, ...rest }, ref) {
|
|
101
112
|
const { props, rest: unread } = tw(className);
|
|
102
113
|
// A View pins `min-height: 0`; a div's is `auto`, and auto is what gives a
|
|
@@ -136,6 +147,10 @@ const BoxInner = forwardRef(function Box({ className, children, 'aria-hidden': h
|
|
|
136
147
|
// So it rides as a plain style, where it also outranks the class gui emits.
|
|
137
148
|
if (tag === 'li' && !('display' in props))
|
|
138
149
|
text.display = 'list-item';
|
|
150
|
+
// A table is a table only while its parts keep their display values; the
|
|
151
|
+
// block gui stamps on a `td` stacks every cell into one column.
|
|
152
|
+
if (tag && tag in TABLE && !('display' in props))
|
|
153
|
+
text.display = TABLE[tag];
|
|
139
154
|
const style = Object.keys(text).length
|
|
140
155
|
? { ...text, ...rest.style }
|
|
141
156
|
: rest.style;
|
package/dist/box.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"box.js","sourceRoot":"","sources":["../src/box.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,EAAE,aAAa,EAAE,UAAU,EAAkB,MAAM,OAAO,CAAA;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,EAAE,EAAmB,MAAM,MAAM,CAAA;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAErC;;;;;;;;;;;;;;;GAeG;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AAK,EAAE,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,YAK7B,GAAG;YACF,CAAC,CAAC,aAAa,CACX,GAAG,EACH,EAAE,GAAI,IAAe,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,IAAI,SAAS,EAAE,KAAK,EAAE,EACnE,QAAQ,CACT;YACH,CAAC,CAAC,QAAQ,GACL,CACV,CAAA;IAED,OAAO,KAAK,CAAA;AACd,CAAC,CAAC,CAAA;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,QAEW,CAAA;AAE9B,eAAe,GAAG,CAAA"}
|
package/dist/core/fonts.cjs
CHANGED
|
@@ -17,7 +17,6 @@ exports.FONT_SANS_VAR = '--font-sans';
|
|
|
17
17
|
exports.FONT_MONO_VAR = '--font-mono';
|
|
18
18
|
/**
|
|
19
19
|
* UI / body / display / heading stack — Zen, then the CSS generic only.
|
|
20
|
-
* No Inter, no named system fonts: the host always binds `--font-sans`
|
|
21
20
|
* (next/font, @fontsource, CDN), so the generic is a last-resort generic, never
|
|
22
21
|
* a system-UI look.
|
|
23
22
|
*/
|
package/dist/core/fonts.d.ts
CHANGED
|
@@ -14,7 +14,6 @@ export declare const FONT_SANS_VAR: '--font-sans';
|
|
|
14
14
|
export declare const FONT_MONO_VAR: '--font-mono';
|
|
15
15
|
/**
|
|
16
16
|
* UI / body / display / heading stack — Zen, then the CSS generic only.
|
|
17
|
-
* No Inter, no named system fonts: the host always binds `--font-sans`
|
|
18
17
|
* (next/font, @fontsource, CDN), so the generic is a last-resort generic, never
|
|
19
18
|
* a system-UI look.
|
|
20
19
|
*/
|
package/dist/core/fonts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../src/core/fonts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,oEAAoE;AACpE,eAAO,MAAM,aAAa,EAAG,aAAsB,CAAA;AACnD,oEAAoE;AACpE,eAAO,MAAM,aAAa,EAAG,aAAsB,CAAA;AAEnD
|
|
1
|
+
{"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../src/core/fonts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,oEAAoE;AACpE,eAAO,MAAM,aAAa,EAAG,aAAsB,CAAA;AACnD,oEAAoE;AACpE,eAAO,MAAM,aAAa,EAAG,aAAsB,CAAA;AAEnD;;;;GAIG;AACH,eAAO,MAAM,QAAQ,gCAA+C,CAAA;AAEpE,yEAAyE;AACzE,eAAO,MAAM,QAAQ,+BAA8C,CAAA;AAEnE,eAAO,MAAM,KAAK;aAAK,IAAI;aAAY,IAAI;CAAqB,CAAA"}
|
package/dist/core/fonts.js
CHANGED
|
@@ -14,7 +14,6 @@ export const FONT_SANS_VAR = '--font-sans';
|
|
|
14
14
|
export const FONT_MONO_VAR = '--font-mono';
|
|
15
15
|
/**
|
|
16
16
|
* UI / body / display / heading stack — Zen, then the CSS generic only.
|
|
17
|
-
* No Inter, no named system fonts: the host always binds `--font-sans`
|
|
18
17
|
* (next/font, @fontsource, CDN), so the generic is a last-resort generic, never
|
|
19
18
|
* a system-UI look.
|
|
20
19
|
*/
|
package/dist/core/fonts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fonts.js","sourceRoot":"","sources":["../../src/core/fonts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,oEAAoE;AACpE,MAAM,CAAC,MAAM,aAAa,GAAG,aAAsB,CAAA;AACnD,oEAAoE;AACpE,MAAM,CAAC,MAAM,aAAa,GAAG,aAAsB,CAAA;AAEnD
|
|
1
|
+
{"version":3,"file":"fonts.js","sourceRoot":"","sources":["../../src/core/fonts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,oEAAoE;AACpE,MAAM,CAAC,MAAM,aAAa,GAAG,aAAsB,CAAA;AACnD,oEAAoE;AACpE,MAAM,CAAC,MAAM,aAAa,GAAG,aAAsB,CAAA;AAEnD;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,OAAO,aAAa,eAAwB,CAAA;AAEpE,yEAAyE;AACzE,MAAM,CAAC,MAAM,QAAQ,GAAG,OAAO,aAAa,cAAuB,CAAA;AAEnE,MAAM,CAAC,MAAM,KAAK,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAW,CAAA"}
|
package/dist/gallery.html
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!doctype html><html lang="en" class="t_dark"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>@hanzo/ui 8.27.
|
|
1
|
+
<!doctype html><html lang="en" class="t_dark"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>@hanzo/ui 8.27.7</title><style>/* @hanzo/ui — generated by scripts/gen-css.mjs. Do not edit. */
|
|
2
2
|
:root { --hanzo-ui-styles: 1; }
|
|
3
3
|
/* Hanzo Design System — the entry point. Import THIS one file.
|
|
4
4
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/ui",
|
|
3
|
-
"version": "8.27.
|
|
3
|
+
"version": "8.27.7",
|
|
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": {
|
|
@@ -259,8 +259,8 @@
|
|
|
259
259
|
"@hanzo/cd": ">=0.1.2",
|
|
260
260
|
"@hanzo/dashboard": ">=0.2.0",
|
|
261
261
|
"@hanzo/data": ">=1.2.4",
|
|
262
|
-
"@hanzo/gui": ">=8.3.
|
|
263
|
-
"@hanzo/usage": ">=0.1.
|
|
262
|
+
"@hanzo/gui": ">=8.3.1",
|
|
263
|
+
"@hanzo/usage": ">=0.1.13",
|
|
264
264
|
"@hanzogui/animations-css": "8.3.1",
|
|
265
265
|
"@hanzogui/config": "8.3.1",
|
|
266
266
|
"@hanzogui/lucide-icons-2": "8.3.1",
|