@hanzo/ui 8.0.43 → 8.0.45
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/aspect-ratio.cjs +14 -1
- package/dist/backends/gui/aspect-ratio.d.ts +13 -0
- package/dist/backends/gui/aspect-ratio.d.ts.map +1 -1
- package/dist/backends/gui/aspect-ratio.js +14 -1
- package/dist/backends/gui/aspect-ratio.js.map +1 -1
- package/dist/backends/gui/badge.cjs +1 -1
- package/dist/backends/gui/badge.d.ts.map +1 -1
- package/dist/backends/gui/badge.js +1 -1
- package/dist/backends/gui/badge.js.map +1 -1
- package/dist/backends/gui/button.cjs +35 -8
- package/dist/backends/gui/button.d.ts.map +1 -1
- package/dist/backends/gui/button.js +35 -8
- package/dist/backends/gui/button.js.map +1 -1
- package/dist/backends/gui/card.cjs +45 -5
- package/dist/backends/gui/card.d.ts +50 -5
- package/dist/backends/gui/card.d.ts.map +1 -1
- package/dist/backends/gui/card.js +44 -5
- package/dist/backends/gui/card.js.map +1 -1
- package/dist/backends/gui/collapsible.cjs +6 -1
- package/dist/backends/gui/collapsible.d.ts +1 -1
- package/dist/backends/gui/collapsible.d.ts.map +1 -1
- package/dist/backends/gui/collapsible.js +6 -1
- package/dist/backends/gui/collapsible.js.map +1 -1
- package/dist/backends/gui/grid.cjs +61 -0
- package/dist/backends/gui/grid.d.ts +16 -0
- package/dist/backends/gui/grid.d.ts.map +1 -0
- package/dist/backends/gui/grid.js +59 -0
- package/dist/backends/gui/grid.js.map +1 -0
- package/dist/backends/gui/index.cjs +7 -2
- package/dist/backends/gui/index.d.ts +3 -1
- package/dist/backends/gui/index.d.ts.map +1 -1
- package/dist/backends/gui/index.js +3 -1
- package/dist/backends/gui/index.js.map +1 -1
- package/dist/backends/gui/scroll-area.cjs +2 -1
- package/dist/backends/gui/scroll-area.d.ts.map +1 -1
- package/dist/backends/gui/scroll-area.js +2 -1
- package/dist/backends/gui/scroll-area.js.map +1 -1
- package/dist/backends/gui/section.cjs +39 -0
- package/dist/backends/gui/section.d.ts +29 -0
- package/dist/backends/gui/section.d.ts.map +1 -0
- package/dist/backends/gui/section.js +37 -0
- package/dist/backends/gui/section.js.map +1 -0
- package/dist/backends/gui/slider.cjs +8 -1
- package/dist/backends/gui/slider.d.ts.map +1 -1
- package/dist/backends/gui/slider.js +8 -1
- package/dist/backends/gui/slider.js.map +1 -1
- package/dist/backends/gui/switch.cjs +3 -1
- package/dist/backends/gui/switch.d.ts.map +1 -1
- package/dist/backends/gui/switch.js +3 -1
- package/dist/backends/gui/switch.js.map +1 -1
- package/dist/backends/gui/tabs.cjs +1 -1
- package/dist/backends/gui/tabs.d.ts +1 -1
- package/dist/backends/gui/tabs.d.ts.map +1 -1
- package/dist/backends/gui/tabs.js +1 -1
- package/dist/backends/gui/tabs.js.map +1 -1
- package/dist/core/cn.cjs +1 -1
- package/dist/core/cn.d.ts +1 -1
- package/dist/core/cn.js +1 -1
- package/dist/gallery.cjs +32 -0
- package/dist/gallery.d.ts +7 -0
- package/dist/gallery.d.ts.map +1 -0
- package/dist/gallery.js +29 -0
- package/dist/gallery.js.map +1 -0
- package/dist/gui-config.cjs +12 -1
- package/dist/gui-config.d.ts +182 -0
- package/dist/gui-config.d.ts.map +1 -1
- package/dist/gui-config.js +12 -1
- package/dist/gui-config.js.map +1 -1
- package/dist/index.cjs +6 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/primitives/CardMedia.cjs +8 -0
- package/dist/primitives/CardMedia.d.ts +2 -0
- package/dist/primitives/CardMedia.d.ts.map +1 -0
- package/dist/primitives/CardMedia.js +5 -0
- package/dist/primitives/CardMedia.js.map +1 -0
- package/dist/primitives/Grid.cjs +8 -0
- package/dist/primitives/Grid.d.ts +2 -0
- package/dist/primitives/Grid.d.ts.map +1 -0
- package/dist/primitives/Grid.js +5 -0
- package/dist/primitives/Grid.js.map +1 -0
- package/dist/primitives/Section.cjs +8 -0
- package/dist/primitives/Section.d.ts +2 -0
- package/dist/primitives/Section.d.ts.map +1 -0
- package/dist/primitives/Section.js +5 -0
- package/dist/primitives/Section.js.map +1 -0
- package/dist/product/DataTable.cjs +4 -4
- package/dist/product/DataTable.js +4 -4
- package/dist/product/DataTable.js.map +1 -1
- package/dist/product/FadeIn.cjs +1 -1
- package/dist/product/FadeIn.d.ts +1 -1
- package/dist/product/FadeIn.js +1 -1
- package/dist/product/FadeIn.js.map +1 -1
- package/dist/product/Metric.cjs +2 -2
- package/dist/product/Metric.js +2 -2
- package/dist/product/Metric.js.map +1 -1
- package/dist/product/Reorder.cjs +1 -1
- package/dist/product/Reorder.js +1 -1
- package/dist/product/Reorder.js.map +1 -1
- package/dist/product/SlideOver.cjs +3 -3
- package/dist/product/SlideOver.d.ts +1 -1
- package/dist/product/SlideOver.js +3 -3
- package/dist/product/SlideOver.js.map +1 -1
- package/dist/product/social/SocialResource.cjs +1 -1
- package/dist/product/social/SocialResource.js +1 -1
- package/dist/product/social/SocialResource.js.map +1 -1
- package/dist/product/social/SocialSummaryBar.cjs +1 -1
- package/dist/product/social/SocialSummaryBar.js +1 -1
- package/dist/product/social/SocialSummaryBar.js.map +1 -1
- package/dist/root.cjs +67 -0
- package/dist/root.d.ts +10 -0
- package/dist/root.d.ts.map +1 -0
- package/dist/root.js +64 -0
- package/dist/root.js.map +1 -0
- package/dist/styles/{hanzo-motion.css → motion.css} +61 -34
- package/dist/styles.css +1331 -0
- package/dist/theme.css +4 -4
- package/package.json +15 -5
|
@@ -9,7 +9,20 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
9
9
|
* `aspectRatio` is a first-class layout property of the gui/Yoga box model, so
|
|
10
10
|
* there is nothing to compute and no padding-bottom trick: the ratio is the
|
|
11
11
|
* style. That is why this is the whole component on web, native and desktop.
|
|
12
|
+
*
|
|
13
|
+
* The reason to reach for it is that the box has an intrinsic height BEFORE its
|
|
14
|
+
* content loads. An `<img>` with no ratio is 0px tall until the bytes arrive,
|
|
15
|
+
* which is both the "media box rendered at zero height" defect and the layout
|
|
16
|
+
* shift when it finally does. Ratio first, content second — the box is never
|
|
17
|
+
* zero-height, so nothing below it ever moves.
|
|
18
|
+
*
|
|
19
|
+
* `overflow: hidden` is not decoration: the child is sized to FILL this box (see
|
|
20
|
+
* the `[data-slot='aspect-ratio'] > img` rule in styles/motion.css), and a
|
|
21
|
+
* cover-fitted image is by definition larger than its frame on one axis.
|
|
22
|
+
* `position: relative` makes this the containing block, so an absolutely
|
|
23
|
+
* positioned overlay — a play button, a scrim, a badge — lands on the media
|
|
24
|
+
* instead of on the page.
|
|
12
25
|
*/
|
|
13
26
|
const gui_1 = require("@hanzo/gui");
|
|
14
|
-
const AspectRatio = ({ ratio = 1, ...props }) => ((0, jsx_runtime_1.jsx)(gui_1.YStack, { "data-slot": "aspect-ratio", width: "100%", aspectRatio: ratio, ...props }));
|
|
27
|
+
const AspectRatio = ({ ratio = 1, ...props }) => ((0, jsx_runtime_1.jsx)(gui_1.YStack, { "data-slot": "aspect-ratio", width: "100%", aspectRatio: ratio, overflow: "hidden", position: "relative", ...props, "data-ratio": "" }));
|
|
15
28
|
exports.AspectRatio = AspectRatio;
|
|
@@ -4,6 +4,19 @@
|
|
|
4
4
|
* `aspectRatio` is a first-class layout property of the gui/Yoga box model, so
|
|
5
5
|
* there is nothing to compute and no padding-bottom trick: the ratio is the
|
|
6
6
|
* style. That is why this is the whole component on web, native and desktop.
|
|
7
|
+
*
|
|
8
|
+
* The reason to reach for it is that the box has an intrinsic height BEFORE its
|
|
9
|
+
* content loads. An `<img>` with no ratio is 0px tall until the bytes arrive,
|
|
10
|
+
* which is both the "media box rendered at zero height" defect and the layout
|
|
11
|
+
* shift when it finally does. Ratio first, content second — the box is never
|
|
12
|
+
* zero-height, so nothing below it ever moves.
|
|
13
|
+
*
|
|
14
|
+
* `overflow: hidden` is not decoration: the child is sized to FILL this box (see
|
|
15
|
+
* the `[data-slot='aspect-ratio'] > img` rule in styles/motion.css), and a
|
|
16
|
+
* cover-fitted image is by definition larger than its frame on one axis.
|
|
17
|
+
* `position: relative` makes this the containing block, so an absolutely
|
|
18
|
+
* positioned overlay — a play button, a scrim, a badge — lands on the media
|
|
19
|
+
* instead of on the page.
|
|
7
20
|
*/
|
|
8
21
|
import { type YStackProps } from '@hanzo/gui';
|
|
9
22
|
export interface AspectRatioProps extends YStackProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aspect-ratio.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/aspect-ratio.tsx"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"aspect-ratio.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/aspect-ratio.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,YAAY,CAAA;AAErD,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,QAAA,MAAM,WAAW,GAAI,qBAAyB,gBAAgB,4CAe7D,CAAA;AAED,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -6,8 +6,21 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
6
6
|
* `aspectRatio` is a first-class layout property of the gui/Yoga box model, so
|
|
7
7
|
* there is nothing to compute and no padding-bottom trick: the ratio is the
|
|
8
8
|
* style. That is why this is the whole component on web, native and desktop.
|
|
9
|
+
*
|
|
10
|
+
* The reason to reach for it is that the box has an intrinsic height BEFORE its
|
|
11
|
+
* content loads. An `<img>` with no ratio is 0px tall until the bytes arrive,
|
|
12
|
+
* which is both the "media box rendered at zero height" defect and the layout
|
|
13
|
+
* shift when it finally does. Ratio first, content second — the box is never
|
|
14
|
+
* zero-height, so nothing below it ever moves.
|
|
15
|
+
*
|
|
16
|
+
* `overflow: hidden` is not decoration: the child is sized to FILL this box (see
|
|
17
|
+
* the `[data-slot='aspect-ratio'] > img` rule in styles/motion.css), and a
|
|
18
|
+
* cover-fitted image is by definition larger than its frame on one axis.
|
|
19
|
+
* `position: relative` makes this the containing block, so an absolutely
|
|
20
|
+
* positioned overlay — a play button, a scrim, a badge — lands on the media
|
|
21
|
+
* instead of on the page.
|
|
9
22
|
*/
|
|
10
23
|
import { YStack } from '@hanzo/gui';
|
|
11
|
-
const AspectRatio = ({ ratio = 1, ...props }) => (_jsx(YStack, { "data-slot": "aspect-ratio", width: "100%", aspectRatio: ratio, ...props }));
|
|
24
|
+
const AspectRatio = ({ ratio = 1, ...props }) => (_jsx(YStack, { "data-slot": "aspect-ratio", width: "100%", aspectRatio: ratio, overflow: "hidden", position: "relative", ...props, "data-ratio": "" }));
|
|
12
25
|
export { AspectRatio };
|
|
13
26
|
//# sourceMappingURL=aspect-ratio.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aspect-ratio.js","sourceRoot":"","sources":["../../../src/backends/gui/aspect-ratio.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ
|
|
1
|
+
{"version":3,"file":"aspect-ratio.js","sourceRoot":"","sources":["../../../src/backends/gui/aspect-ratio.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,MAAM,EAAoB,MAAM,YAAY,CAAA;AAOrD,MAAM,WAAW,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,GAAG,KAAK,EAAoB,EAAE,EAAE,CAAC,CACjE,KAAC,MAAM,iBACK,cAAc,EACxB,KAAK,EAAC,MAAM,EACZ,WAAW,EAAE,KAAK,EAClB,QAAQ,EAAC,QAAQ,EACjB,QAAQ,EAAC,UAAU,KACf,KAAK,gBAME,EAAE,GACb,CACH,CAAA;AAED,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -79,7 +79,7 @@ const BadgeText = (0, gui_1.styled)(gui_1.SizableText, {
|
|
|
79
79
|
* A stable class handle for hosts that hook badges from CSS. Styling lives in
|
|
80
80
|
* the tokens; this only names the variant.
|
|
81
81
|
*/
|
|
82
|
-
const badgeVariants = ({ variant } = {}) => `
|
|
82
|
+
const badgeVariants = ({ variant } = {}) => `badge badge-${variant ?? 'default'}`;
|
|
83
83
|
exports.badgeVariants = badgeVariants;
|
|
84
84
|
function Badge({ className, variant = 'default', asChild = false, children, ...props }) {
|
|
85
85
|
return ((0, jsx_runtime_1.jsx)(BadgeFrame, { "data-slot": "badge", "data-variant": variant, variant: variant ?? 'default', asChild: asChild, render: asChild ? undefined : 'span', ...(0, gesture_1.touch)(HEIGHT, MIN_TOUCH, 'y'), className: [(0, exports.badgeVariants)({ variant }), className].filter(Boolean).join(' '), ...props, children: asChild ? children : (0, ink_1.ink)(children, BadgeText) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/badge.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,WAAW,GACX,aAAa,GACb,SAAS,GACT,OAAO,GACP,MAAM,GACN,gBAAgB,GAChB,MAAM,CAAA;AAkEV;;;GAGG;AACH,eAAO,MAAM,aAAa,GAAI,cAAa;IAAE,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI,CAAA;CAAO,
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/badge.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,WAAW,GACX,aAAa,GACb,SAAS,GACT,OAAO,GACP,MAAM,GACN,gBAAgB,GAChB,MAAM,CAAA;AAkEV;;;GAGG;AACH,eAAO,MAAM,aAAa,GAAI,cAAa;IAAE,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI,CAAA;CAAO,WAC1C,CAAA;AAEvC;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,GAAG;IACtD,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI,CAAA;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,wBAAgB,KAAK,CAAC,EACpB,SAAS,EACT,OAAmB,EACnB,OAAe,EACf,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,UAAU,2CAeZ"}
|
|
@@ -75,7 +75,7 @@ const BadgeText = styled(SizableText, {
|
|
|
75
75
|
* A stable class handle for hosts that hook badges from CSS. Styling lives in
|
|
76
76
|
* the tokens; this only names the variant.
|
|
77
77
|
*/
|
|
78
|
-
export const badgeVariants = ({ variant } = {}) => `
|
|
78
|
+
export const badgeVariants = ({ variant } = {}) => `badge badge-${variant ?? 'default'}`;
|
|
79
79
|
export function Badge({ className, variant = 'default', asChild = false, children, ...props }) {
|
|
80
80
|
return (_jsx(BadgeFrame, { "data-slot": "badge", "data-variant": variant, variant: variant ?? 'default', asChild: asChild, render: asChild ? undefined : 'span', ...touch(HEIGHT, MIN_TOUCH, 'y'), className: [badgeVariants({ variant }), className].filter(Boolean).join(' '), ...props, children: asChild ? children : ink(children, BadgeText) }));
|
|
81
81
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.js","sourceRoot":"","sources":["../../../src/backends/gui/badge.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;GAUG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAE7E,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3B,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AAYjC,iFAAiF;AACjF,MAAM,SAAS,G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CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,KACvE,KAAiD,YAErD,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,SAAS,CAAC,GACnC,CACd,CAAA;AACH,CAAC"}
|
|
@@ -96,12 +96,36 @@ const Frame = (0, gui_1.styled)(gui_1.Button.Frame, {
|
|
|
96
96
|
},
|
|
97
97
|
},
|
|
98
98
|
size: {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
99
|
+
// minHeight, NOT height. A control has to be a predictable size, and it
|
|
100
|
+
// still is: text at this type scale is shorter than the box, so every
|
|
101
|
+
// ordinary Button renders at exactly these numbers. What changes is the
|
|
102
|
+
// failure: a pinned `height` CLIPS anything taller, which is how a 119px
|
|
103
|
+
// thumbnail shipped rendered as a 30px sliver with a green build. A floor
|
|
104
|
+
// cannot clip — the button grows and the mistake is visible immediately
|
|
105
|
+
// instead of silently cropping content.
|
|
106
|
+
//
|
|
107
|
+
// Same for the icon sizes' width: a floor keeps them square without
|
|
108
|
+
// truncating a child that is wider than the box.
|
|
109
|
+
// `height: 'auto'` + `minHeight`, and BOTH halves are load-bearing.
|
|
110
|
+
//
|
|
111
|
+
// minHeight alone is not enough: dropping `height` lets GuiButton.Frame's
|
|
112
|
+
// own size variant supply one (measured: 44px), which re-pins the box and
|
|
113
|
+
// ALSO makes every ordinary button 8px taller. `height: 'auto'` is what
|
|
114
|
+
// turns that off, and minHeight is what keeps the control its designed
|
|
115
|
+
// size once it is off.
|
|
116
|
+
//
|
|
117
|
+
// Together: text is shorter than the floor, so an ordinary Button still
|
|
118
|
+
// measures exactly these numbers. Anything taller GROWS instead of being
|
|
119
|
+
// cropped — a pinned height is how a 119px thumbnail shipped rendered as
|
|
120
|
+
// a 36px sliver with a green build. Both directions are asserted in
|
|
121
|
+
// consumer.spec.ts, because getting one right and the other wrong is
|
|
122
|
+
// exactly what happened on the first attempt.
|
|
123
|
+
default: { height: 'auto', minHeight: HEIGHT.default, px: '$4' },
|
|
124
|
+
sm: { height: 'auto', minHeight: HEIGHT.sm, px: '$3', gap: '$1.5' },
|
|
125
|
+
lg: { height: 'auto', minHeight: HEIGHT.lg, px: '$6' },
|
|
126
|
+
icon: { height: 'auto', minHeight: HEIGHT.icon, width: 'auto', minWidth: HEIGHT.icon, px: 0 },
|
|
127
|
+
'icon-sm': { height: 'auto', minHeight: HEIGHT['icon-sm'], width: 'auto', minWidth: HEIGHT['icon-sm'], px: 0 },
|
|
128
|
+
'icon-lg': { height: 'auto', minHeight: HEIGHT['icon-lg'], width: 'auto', minWidth: HEIGHT['icon-lg'], px: 0 },
|
|
105
129
|
},
|
|
106
130
|
disabled: {
|
|
107
131
|
true: { opacity: 0.5, pointerEvents: 'none', cursor: 'default' },
|
|
@@ -113,8 +137,11 @@ const Frame = (0, gui_1.styled)(gui_1.Button.Frame, {
|
|
|
113
137
|
* A stable class handle for hosts that hook buttons from CSS. Styling lives in
|
|
114
138
|
* the tokens; this only names the variant and size.
|
|
115
139
|
*/
|
|
116
|
-
const buttonVariants = ({ variant, size, className, } = {}) =>
|
|
117
|
-
|
|
140
|
+
const buttonVariants = ({ variant, size, className, } = {}) =>
|
|
141
|
+
// Variant and size share the `btn-` namespace, so the two defaults collide on
|
|
142
|
+
// `btn-default`. A Set emits it once; no name is used by both a variant and a
|
|
143
|
+
// size, so nothing else can merge.
|
|
144
|
+
[...new Set([`btn`, `btn-${variant ?? 'default'}`, `btn-${size ?? 'default'}`, className].filter(Boolean))]
|
|
118
145
|
.join(' ');
|
|
119
146
|
exports.buttonVariants = buttonVariants;
|
|
120
147
|
function Button({ className, variant = 'default', size = 'default', asChild = false, isLoading = false, disabled, children, ...props }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/button.tsx"],"names":[],"mappings":"AAyBA,OAAO,EAAiC,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAK1F,MAAM,MAAM,aAAa,GACrB,SAAS,GACT,aAAa,GACb,SAAS,GACT,WAAW,GACX,OAAO,GACP,MAAM,GACN,SAAS,GACT,QAAQ,GACR,WAAW,CAAA;AAEf,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAA;AAqBjF,QAAA,MAAM,KAAK;;;;;;;;
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/button.tsx"],"names":[],"mappings":"AAyBA,OAAO,EAAiC,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAK1F,MAAM,MAAM,aAAa,GACrB,SAAS,GACT,aAAa,GACb,SAAS,GACT,WAAW,GACX,OAAO,GACP,MAAM,GACN,SAAS,GACT,QAAQ,GACR,WAAW,CAAA;AAEf,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAA;AAqBjF,QAAA,MAAM,KAAK;;;;;;;;8CAuFT,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAI,gCAI5B;IAAE,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAAC,IAAI,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAO,WAK1E,CAAA;AAEd,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,UAAU,CAAC,GAAG;IAC9F,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,CAAA;IAC9B,IAAI,CAAC,EAAE,UAAU,GAAG,IAAI,CAAA;IACxB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB;;;;;;;;;;OAUG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;;OAKG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAA;CACrC,CAAA;AAED,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAmB,EACnB,IAAgB,EAChB,OAAe,EACf,SAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,WAAW,2CA2Bb;AAED,OAAO,EAAE,MAAM,EAAE,CAAA"}
|
|
@@ -92,12 +92,36 @@ const Frame = styled(GuiButton.Frame, {
|
|
|
92
92
|
},
|
|
93
93
|
},
|
|
94
94
|
size: {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
95
|
+
// minHeight, NOT height. A control has to be a predictable size, and it
|
|
96
|
+
// still is: text at this type scale is shorter than the box, so every
|
|
97
|
+
// ordinary Button renders at exactly these numbers. What changes is the
|
|
98
|
+
// failure: a pinned `height` CLIPS anything taller, which is how a 119px
|
|
99
|
+
// thumbnail shipped rendered as a 30px sliver with a green build. A floor
|
|
100
|
+
// cannot clip — the button grows and the mistake is visible immediately
|
|
101
|
+
// instead of silently cropping content.
|
|
102
|
+
//
|
|
103
|
+
// Same for the icon sizes' width: a floor keeps them square without
|
|
104
|
+
// truncating a child that is wider than the box.
|
|
105
|
+
// `height: 'auto'` + `minHeight`, and BOTH halves are load-bearing.
|
|
106
|
+
//
|
|
107
|
+
// minHeight alone is not enough: dropping `height` lets GuiButton.Frame's
|
|
108
|
+
// own size variant supply one (measured: 44px), which re-pins the box and
|
|
109
|
+
// ALSO makes every ordinary button 8px taller. `height: 'auto'` is what
|
|
110
|
+
// turns that off, and minHeight is what keeps the control its designed
|
|
111
|
+
// size once it is off.
|
|
112
|
+
//
|
|
113
|
+
// Together: text is shorter than the floor, so an ordinary Button still
|
|
114
|
+
// measures exactly these numbers. Anything taller GROWS instead of being
|
|
115
|
+
// cropped — a pinned height is how a 119px thumbnail shipped rendered as
|
|
116
|
+
// a 36px sliver with a green build. Both directions are asserted in
|
|
117
|
+
// consumer.spec.ts, because getting one right and the other wrong is
|
|
118
|
+
// exactly what happened on the first attempt.
|
|
119
|
+
default: { height: 'auto', minHeight: HEIGHT.default, px: '$4' },
|
|
120
|
+
sm: { height: 'auto', minHeight: HEIGHT.sm, px: '$3', gap: '$1.5' },
|
|
121
|
+
lg: { height: 'auto', minHeight: HEIGHT.lg, px: '$6' },
|
|
122
|
+
icon: { height: 'auto', minHeight: HEIGHT.icon, width: 'auto', minWidth: HEIGHT.icon, px: 0 },
|
|
123
|
+
'icon-sm': { height: 'auto', minHeight: HEIGHT['icon-sm'], width: 'auto', minWidth: HEIGHT['icon-sm'], px: 0 },
|
|
124
|
+
'icon-lg': { height: 'auto', minHeight: HEIGHT['icon-lg'], width: 'auto', minWidth: HEIGHT['icon-lg'], px: 0 },
|
|
101
125
|
},
|
|
102
126
|
disabled: {
|
|
103
127
|
true: { opacity: 0.5, pointerEvents: 'none', cursor: 'default' },
|
|
@@ -109,8 +133,11 @@ const Frame = styled(GuiButton.Frame, {
|
|
|
109
133
|
* A stable class handle for hosts that hook buttons from CSS. Styling lives in
|
|
110
134
|
* the tokens; this only names the variant and size.
|
|
111
135
|
*/
|
|
112
|
-
export const buttonVariants = ({ variant, size, className, } = {}) =>
|
|
113
|
-
|
|
136
|
+
export const buttonVariants = ({ variant, size, className, } = {}) =>
|
|
137
|
+
// Variant and size share the `btn-` namespace, so the two defaults collide on
|
|
138
|
+
// `btn-default`. A Set emits it once; no name is used by both a variant and a
|
|
139
|
+
// size, so nothing else can merge.
|
|
140
|
+
[...new Set([`btn`, `btn-${variant ?? 'default'}`, `btn-${size ?? 'default'}`, className].filter(Boolean))]
|
|
114
141
|
.join(' ');
|
|
115
142
|
function Button({ className, variant = 'default', size = 'default', asChild = false, isLoading = false, disabled, children, ...props }) {
|
|
116
143
|
const resolved = size ?? 'default';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../src/backends/gui/button.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACjE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAuC,MAAM,OAAO,CAAA;AAE1F,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3B,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AAejC,MAAM,MAAM,GAA+B;IACzC,OAAO,EAAE,EAAE;IACX,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,IAAI,EAAE,EAAE;IACR,SAAS,EAAE,EAAE;IACb,SAAS,EAAE,EAAE;CACd,CAAA;AAED,gFAAgF;AAChF,MAAM,IAAI,GAA+B;IACvC,OAAO,EAAE,IAAI;IACb,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;CAChB,CAAA;AAED,MAAM,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE;IACpC,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,QAAQ;IACf,OAAO,EAAE,QAAQ;IACjB,GAAG,EAAE,IAAI;IACT,MAAM,EAAE,CAAC;IACT,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,CAAC;IACd,WAAW,EAAE,aAAa;IAC1B,MAAM,EAAE,SAAS;IAEjB,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,wEAAwE;YACxE,0EAA0E;YAC1E,wEAAwE;YACxE,uEAAuE;YAC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CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAA;IAChF,OAAO,CACL,MAAC,KAAK,iBACM,QAAQ,kBACJ,OAAO,IAAI,SAAS,eACvB,QAAQ,EACnB,OAAO,EAAE,OAAO,IAAI,SAAS,EAC7B,IAAI,EAAE,QAAQ,EACd,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,GAAI,IAAI,CAAC,KAAgB,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,EACvG,QAAQ,EAAE,QAAQ,IAAI,SAAS,KAC3B,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,GAAG,CAAC,EACpC,SAAS,EAAE,cAAc,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,KACnD,KAAK,aAER,SAAS,IAAI,KAAC,OAAO,IAAC,IAAI,EAAC,OAAO,GAAG,EACrC,GAAG,CAAC,IAAI,EAAE,SAAS,CAAC,IAAa,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,IAC3D,CACT,CAAA;AACH,CAAC;AAED,OAAO,EAAE,MAAM,EAAE,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';"use strict";
|
|
2
2
|
'use client';
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.CardContent = exports.CardDescription = exports.CardAction = exports.CardTitle = exports.CardFooter = exports.CardHeader = exports.Card = void 0;
|
|
4
|
+
exports.CardMedia = exports.CardContent = exports.CardDescription = exports.CardAction = exports.CardTitle = exports.CardFooter = exports.CardHeader = exports.Card = void 0;
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
/**
|
|
7
7
|
* Card — surface, header, title, description, action, content, footer.
|
|
@@ -10,6 +10,8 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
10
10
|
* and a row is the one box model that also exists on native.
|
|
11
11
|
*/
|
|
12
12
|
const gui_1 = require("@hanzo/gui");
|
|
13
|
+
const aspect_ratio_1 = require("./aspect-ratio.cjs");
|
|
14
|
+
const ink_1 = require("./ink.cjs");
|
|
13
15
|
const slot_1 = require("./slot.cjs");
|
|
14
16
|
const PAD = 24;
|
|
15
17
|
const CardFrame = (0, gui_1.styled)(gui_1.YStack, {
|
|
@@ -39,8 +41,24 @@ const DescriptionFrame = (0, gui_1.styled)(gui_1.SizableText, { name: 'CardDescr
|
|
|
39
41
|
const ActionFrame = (0, gui_1.styled)(gui_1.XStack, { name: 'CardAction', self: 'flex-end', shrink: 0 });
|
|
40
42
|
const ContentFrame = (0, gui_1.styled)(gui_1.YStack, { name: 'CardContent', px: PAD });
|
|
41
43
|
const FooterFrame = (0, gui_1.styled)(gui_1.XStack, { name: 'CardFooter', px: PAD, items: 'center' });
|
|
42
|
-
const Card = (p) => (0, jsx_runtime_1.jsx)(CardFrame, { ...(0, slot_1.slot)('card'), ...
|
|
43
|
-
|
|
44
|
+
const Card = ({ interactive, onPress, ...p }) => ((0, jsx_runtime_1.jsx)(CardFrame, { ...(0, slot_1.slot)('card'), ...(interactive
|
|
45
|
+
? {
|
|
46
|
+
role: 'button',
|
|
47
|
+
tabIndex: 0,
|
|
48
|
+
cursor: 'pointer',
|
|
49
|
+
hoverStyle: { borderColor: '$color8' },
|
|
50
|
+
focusStyle: { borderColor: '$color8', outlineWidth: 2, outlineStyle: 'solid', outlineColor: '$color8' },
|
|
51
|
+
// A div with role="button" is not a button: the browser gives it no
|
|
52
|
+
// keyboard activation, so it has to be spelled out or the card is
|
|
53
|
+
// mouse-only. Space must also preventDefault or the page scrolls.
|
|
54
|
+
onKeyDown: (e) => {
|
|
55
|
+
if (e.key !== 'Enter' && e.key !== ' ')
|
|
56
|
+
return;
|
|
57
|
+
e.preventDefault();
|
|
58
|
+
onPress?.(e);
|
|
59
|
+
},
|
|
60
|
+
}
|
|
61
|
+
: null), onPress: onPress, ...p }));
|
|
44
62
|
const CardHeader = (p) => (0, jsx_runtime_1.jsx)(HeaderFrame, { ...(0, slot_1.slot)('card-header'), ...p });
|
|
45
63
|
exports.CardHeader = CardHeader;
|
|
46
64
|
const CardTitle = (p) => (0, jsx_runtime_1.jsx)(TitleFrame, { ...(0, slot_1.slot)('card-title'), ...p });
|
|
@@ -49,7 +67,29 @@ const CardDescription = (p) => (0, jsx_runtime_1.jsx)(DescriptionFrame, { ...(0,
|
|
|
49
67
|
exports.CardDescription = CardDescription;
|
|
50
68
|
const CardAction = (p) => (0, jsx_runtime_1.jsx)(ActionFrame, { ...(0, slot_1.slot)('card-action'), ...p });
|
|
51
69
|
exports.CardAction = CardAction;
|
|
52
|
-
const CardContent = (p) => (0, jsx_runtime_1.jsx)(ContentFrame, { ...(0, slot_1.slot)('card-content'), ...p });
|
|
70
|
+
const CardContent = ({ children, ...p }) => ((0, jsx_runtime_1.jsx)(ContentFrame, { ...(0, slot_1.slot)('card-content'), ...p, children: (0, ink_1.ink)(children) }));
|
|
53
71
|
exports.CardContent = CardContent;
|
|
54
|
-
const CardFooter = (p) => (0, jsx_runtime_1.jsx)(FooterFrame, { ...(0, slot_1.slot)('card-footer'), ...p });
|
|
72
|
+
const CardFooter = ({ children, ...p }) => ((0, jsx_runtime_1.jsx)(FooterFrame, { ...(0, slot_1.slot)('card-footer'), ...p, children: (0, ink_1.ink)(children) }));
|
|
55
73
|
exports.CardFooter = CardFooter;
|
|
74
|
+
const CardMedia = ({ ratio = 16 / 10, ...p }) => ((0, jsx_runtime_1.jsx)(aspect_ratio_1.AspectRatio, { ...(0, slot_1.slot)('card-media'), ratio: ratio, mt: -PAD, ...p }));
|
|
75
|
+
exports.CardMedia = CardMedia;
|
|
76
|
+
/**
|
|
77
|
+
* The dot-namespace. `Card.Media`, `Card.Body`, `Card.Title`, `Card.Meta` are
|
|
78
|
+
* the SAME components as the named exports beside them, not second copies —
|
|
79
|
+
* `withStaticProperties` hangs the existing implementations off `Card`. Nothing
|
|
80
|
+
* here can drift from the named export, because there is nothing here to drift.
|
|
81
|
+
*
|
|
82
|
+
* The named exports keep their shadcn-lineage spelling because 79 call sites in
|
|
83
|
+
* hanzo.app are written against it; renaming them would be a breaking change
|
|
84
|
+
* bought for nothing.
|
|
85
|
+
*/
|
|
86
|
+
const CardNamespace = (0, gui_1.withStaticProperties)(Card, {
|
|
87
|
+
Media: CardMedia,
|
|
88
|
+
Header: CardHeader,
|
|
89
|
+
Title: CardTitle,
|
|
90
|
+
Meta: CardDescription,
|
|
91
|
+
Body: CardContent,
|
|
92
|
+
Action: CardAction,
|
|
93
|
+
Footer: CardFooter,
|
|
94
|
+
});
|
|
95
|
+
exports.Card = CardNamespace;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ComponentProps } from 'react';
|
|
2
|
+
import { type AspectRatioProps } from './aspect-ratio.js';
|
|
2
3
|
declare const CardFrame: import("@hanzogui/web").GuiComponent<import("@hanzogui/web").TamaDefer, import("@hanzogui/web").GuiElement, import("@hanzogui/core").RNGuiViewNonStyleProps, import("@hanzogui/web").StackStyleBase, {
|
|
3
4
|
elevation?: number | import("@hanzogui/web").SizeTokens | undefined;
|
|
4
5
|
fullscreen?: boolean | undefined;
|
|
@@ -27,19 +28,63 @@ declare const FooterFrame: import("@hanzogui/web").GuiComponent<import("@hanzogu
|
|
|
27
28
|
elevation?: number | import("@hanzogui/web").SizeTokens | undefined;
|
|
28
29
|
fullscreen?: boolean | undefined;
|
|
29
30
|
}, import("@hanzogui/web").StaticConfigPublic>;
|
|
30
|
-
export type CardProps = ComponentProps<typeof CardFrame
|
|
31
|
+
export type CardProps = ComponentProps<typeof CardFrame> & {
|
|
32
|
+
/**
|
|
33
|
+
* The whole card is the control. Makes it focusable, gives it the button role
|
|
34
|
+
* and the Enter/Space keys, and lights it on hover and focus.
|
|
35
|
+
*
|
|
36
|
+
* This exists so nobody wraps a Card in a <Button> again. A Button pins its
|
|
37
|
+
* own height — correctly, it is a control — and a card put inside one gets
|
|
38
|
+
* clipped to a 30px sliver. The affordance belongs on the surface, not around
|
|
39
|
+
* it.
|
|
40
|
+
*/
|
|
41
|
+
interactive?: boolean;
|
|
42
|
+
};
|
|
31
43
|
export type CardHeaderProps = ComponentProps<typeof HeaderFrame>;
|
|
32
44
|
export type CardTitleProps = ComponentProps<typeof TitleFrame>;
|
|
33
45
|
export type CardDescriptionProps = ComponentProps<typeof DescriptionFrame>;
|
|
34
46
|
export type CardActionProps = ComponentProps<typeof ActionFrame>;
|
|
35
47
|
export type CardContentProps = ComponentProps<typeof ContentFrame>;
|
|
36
48
|
export type CardFooterProps = ComponentProps<typeof FooterFrame>;
|
|
37
|
-
declare const Card: (p: CardProps) => import("react/jsx-runtime").JSX.Element;
|
|
38
49
|
declare const CardHeader: (p: CardHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
39
50
|
declare const CardTitle: (p: CardTitleProps) => import("react/jsx-runtime").JSX.Element;
|
|
40
51
|
declare const CardDescription: (p: CardDescriptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
41
52
|
declare const CardAction: (p: CardActionProps) => import("react/jsx-runtime").JSX.Element;
|
|
42
|
-
declare const CardContent: (p: CardContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
43
|
-
declare const CardFooter: (p: CardFooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
44
|
-
|
|
53
|
+
declare const CardContent: ({ children, ...p }: CardContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
declare const CardFooter: ({ children, ...p }: CardFooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
/**
|
|
56
|
+
* CardMedia — the picture at the top of a card, edge to edge.
|
|
57
|
+
*
|
|
58
|
+
* Full-bleed needs one correction and only one: the Card frame has vertical
|
|
59
|
+
* padding and no horizontal padding (the header/content/footer carry their own
|
|
60
|
+
* `px`), so the media is already the full width and only has to climb back over
|
|
61
|
+
* the frame's top padding. Hence `mt: -PAD` and nothing else — no negative
|
|
62
|
+
* horizontal margin, which is the version that leaks past a rounded corner.
|
|
63
|
+
*
|
|
64
|
+
* It is an AspectRatio, so it has a height before the image loads. That is the
|
|
65
|
+
* whole point: a card whose media is a bare <img> is a card that is 0px tall
|
|
66
|
+
* until the network answers, and then jumps.
|
|
67
|
+
*/
|
|
68
|
+
export type CardMediaProps = AspectRatioProps;
|
|
69
|
+
declare const CardMedia: ({ ratio, ...p }: CardMediaProps) => import("react/jsx-runtime").JSX.Element;
|
|
70
|
+
/**
|
|
71
|
+
* The dot-namespace. `Card.Media`, `Card.Body`, `Card.Title`, `Card.Meta` are
|
|
72
|
+
* the SAME components as the named exports beside them, not second copies —
|
|
73
|
+
* `withStaticProperties` hangs the existing implementations off `Card`. Nothing
|
|
74
|
+
* here can drift from the named export, because there is nothing here to drift.
|
|
75
|
+
*
|
|
76
|
+
* The named exports keep their shadcn-lineage spelling because 79 call sites in
|
|
77
|
+
* hanzo.app are written against it; renaming them would be a breaking change
|
|
78
|
+
* bought for nothing.
|
|
79
|
+
*/
|
|
80
|
+
declare const CardNamespace: (({ interactive, onPress, ...p }: CardProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
81
|
+
Media: ({ ratio, ...p }: CardMediaProps) => import("react/jsx-runtime").JSX.Element;
|
|
82
|
+
Header: (p: CardHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
83
|
+
Title: (p: CardTitleProps) => import("react/jsx-runtime").JSX.Element;
|
|
84
|
+
Meta: (p: CardDescriptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
85
|
+
Body: ({ children, ...p }: CardContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
86
|
+
Action: (p: CardActionProps) => import("react/jsx-runtime").JSX.Element;
|
|
87
|
+
Footer: ({ children, ...p }: CardFooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
88
|
+
};
|
|
89
|
+
export { CardNamespace as Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, CardMedia, };
|
|
45
90
|
//# sourceMappingURL=card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/card.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/card.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,cAAc,EAAiB,MAAM,OAAO,CAAA;AAC1D,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAMnE,QAAA,MAAM,SAAS;;;8CAQb,CAAA;AASF,QAAA,MAAM,WAAW;;;8CAKf,CAAA;AAEF,QAAA,MAAM,UAAU;;;8CAA4E,CAAA;AAC5F,QAAA,MAAM,gBAAgB;;;8CAAkF,CAAA;AACxG,QAAA,MAAM,WAAW;;;8CAAsE,CAAA;AACvF,QAAA,MAAM,YAAY;;;8CAAmD,CAAA;AACrE,QAAA,MAAM,WAAW;;;8CAAmE,CAAA;AAEpF,MAAM,MAAM,SAAS,GAAG,cAAc,CAAC,OAAO,SAAS,CAAC,GAAG;IACzD;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAA;AACD,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO,WAAW,CAAC,CAAA;AAChE,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC,OAAO,UAAU,CAAC,CAAA;AAC9D,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAC1E,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO,WAAW,CAAC,CAAA;AAChE,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,OAAO,YAAY,CAAC,CAAA;AAClE,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO,WAAW,CAAC,CAAA;AA0BhE,QAAA,MAAM,UAAU,GAAI,GAAG,eAAe,4CAAoD,CAAA;AAC1F,QAAA,MAAM,SAAS,GAAI,GAAG,cAAc,4CAAkD,CAAA;AACtF,QAAA,MAAM,eAAe,GAAI,GAAG,oBAAoB,4CAA8D,CAAA;AAC9G,QAAA,MAAM,UAAU,GAAI,GAAG,eAAe,4CAAoD,CAAA;AAC1F,QAAA,MAAM,WAAW,GAAI,oBAAoB,gBAAgB,4CAExD,CAAA;AACD,QAAA,MAAM,UAAU,GAAI,oBAAoB,eAAe,4CAEtD,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,cAAc,GAAG,gBAAgB,CAAA;AAC7C,QAAA,MAAM,SAAS,GAAI,iBAA2B,cAAc,4CAE3D,CAAA;AAED;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,oCA/D2B,SAAS;6BAiDT,cAAc;gBAzBrC,eAAe;eAChB,cAAc;cACR,oBAAoB;+BAEP,gBAAgB;gBADlC,eAAe;iCAIE,eAAe;CAwCrD,CAAA;AAEF,OAAO,EACL,aAAa,IAAI,IAAI,EACrB,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,WAAW,EACX,SAAS,GACV,CAAA"}
|
|
@@ -6,7 +6,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
6
6
|
* The header is a row whose action sits at its end: gui/Yoga has no CSS grid,
|
|
7
7
|
* and a row is the one box model that also exists on native.
|
|
8
8
|
*/
|
|
9
|
-
import { SizableText, XStack, YStack, styled } from '@hanzo/gui';
|
|
9
|
+
import { SizableText, XStack, YStack, styled, withStaticProperties } from '@hanzo/gui';
|
|
10
|
+
import { AspectRatio } from './aspect-ratio.js';
|
|
11
|
+
import { ink } from './ink.js';
|
|
10
12
|
import { slot } from './slot.js';
|
|
11
13
|
const PAD = 24;
|
|
12
14
|
const CardFrame = styled(YStack, {
|
|
@@ -36,12 +38,49 @@ const DescriptionFrame = styled(SizableText, { name: 'CardDescription', size: '$
|
|
|
36
38
|
const ActionFrame = styled(XStack, { name: 'CardAction', self: 'flex-end', shrink: 0 });
|
|
37
39
|
const ContentFrame = styled(YStack, { name: 'CardContent', px: PAD });
|
|
38
40
|
const FooterFrame = styled(XStack, { name: 'CardFooter', px: PAD, items: 'center' });
|
|
39
|
-
const Card = (p) => _jsx(CardFrame, { ...slot('card'), ...
|
|
41
|
+
const Card = ({ interactive, onPress, ...p }) => (_jsx(CardFrame, { ...slot('card'), ...(interactive
|
|
42
|
+
? {
|
|
43
|
+
role: 'button',
|
|
44
|
+
tabIndex: 0,
|
|
45
|
+
cursor: 'pointer',
|
|
46
|
+
hoverStyle: { borderColor: '$color8' },
|
|
47
|
+
focusStyle: { borderColor: '$color8', outlineWidth: 2, outlineStyle: 'solid', outlineColor: '$color8' },
|
|
48
|
+
// A div with role="button" is not a button: the browser gives it no
|
|
49
|
+
// keyboard activation, so it has to be spelled out or the card is
|
|
50
|
+
// mouse-only. Space must also preventDefault or the page scrolls.
|
|
51
|
+
onKeyDown: (e) => {
|
|
52
|
+
if (e.key !== 'Enter' && e.key !== ' ')
|
|
53
|
+
return;
|
|
54
|
+
e.preventDefault();
|
|
55
|
+
onPress?.(e);
|
|
56
|
+
},
|
|
57
|
+
}
|
|
58
|
+
: null), onPress: onPress, ...p }));
|
|
40
59
|
const CardHeader = (p) => _jsx(HeaderFrame, { ...slot('card-header'), ...p });
|
|
41
60
|
const CardTitle = (p) => _jsx(TitleFrame, { ...slot('card-title'), ...p });
|
|
42
61
|
const CardDescription = (p) => _jsx(DescriptionFrame, { ...slot('card-description'), ...p });
|
|
43
62
|
const CardAction = (p) => _jsx(ActionFrame, { ...slot('card-action'), ...p });
|
|
44
|
-
const CardContent = (p) => _jsx(ContentFrame, { ...slot('card-content'), ...p });
|
|
45
|
-
const CardFooter = (p) => _jsx(FooterFrame, { ...slot('card-footer'), ...p });
|
|
46
|
-
|
|
63
|
+
const CardContent = ({ children, ...p }) => (_jsx(ContentFrame, { ...slot('card-content'), ...p, children: ink(children) }));
|
|
64
|
+
const CardFooter = ({ children, ...p }) => (_jsx(FooterFrame, { ...slot('card-footer'), ...p, children: ink(children) }));
|
|
65
|
+
const CardMedia = ({ ratio = 16 / 10, ...p }) => (_jsx(AspectRatio, { ...slot('card-media'), ratio: ratio, mt: -PAD, ...p }));
|
|
66
|
+
/**
|
|
67
|
+
* The dot-namespace. `Card.Media`, `Card.Body`, `Card.Title`, `Card.Meta` are
|
|
68
|
+
* the SAME components as the named exports beside them, not second copies —
|
|
69
|
+
* `withStaticProperties` hangs the existing implementations off `Card`. Nothing
|
|
70
|
+
* here can drift from the named export, because there is nothing here to drift.
|
|
71
|
+
*
|
|
72
|
+
* The named exports keep their shadcn-lineage spelling because 79 call sites in
|
|
73
|
+
* hanzo.app are written against it; renaming them would be a breaking change
|
|
74
|
+
* bought for nothing.
|
|
75
|
+
*/
|
|
76
|
+
const CardNamespace = withStaticProperties(Card, {
|
|
77
|
+
Media: CardMedia,
|
|
78
|
+
Header: CardHeader,
|
|
79
|
+
Title: CardTitle,
|
|
80
|
+
Meta: CardDescription,
|
|
81
|
+
Body: CardContent,
|
|
82
|
+
Action: CardAction,
|
|
83
|
+
Footer: CardFooter,
|
|
84
|
+
});
|
|
85
|
+
export { CardNamespace as Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, CardMedia, };
|
|
47
86
|
//# sourceMappingURL=card.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.js","sourceRoot":"","sources":["../../../src/backends/gui/card.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;GAKG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"card.js","sourceRoot":"","sources":["../../../src/backends/gui/card.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;GAKG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM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AW,EACX,SAAS,GACV,CAAA"}
|
|
@@ -5,11 +5,16 @@ exports.CollapsibleContent = exports.CollapsibleTrigger = exports.Collapsible =
|
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
/** Collapsible — @hanzogui/collapsible's three parts under the flat names. */
|
|
7
7
|
const gui_1 = require("@hanzo/gui");
|
|
8
|
+
const ink_1 = require("./ink.cjs");
|
|
8
9
|
const slot_1 = require("./slot.cjs");
|
|
9
10
|
const gesture_1 = require("./gesture.cjs");
|
|
10
11
|
const Collapsible = (p) => (0, jsx_runtime_1.jsx)(gui_1.Collapsible, { ...(0, slot_1.slot)('collapsible'), ...p });
|
|
11
12
|
exports.Collapsible = Collapsible;
|
|
12
|
-
const CollapsibleTrigger = (p) => ((0, jsx_runtime_1.jsx)(gui_1.Collapsible.Trigger, { ...(0, slot_1.slot)('collapsible-trigger'), unstyled: true,
|
|
13
|
+
const CollapsibleTrigger = ({ children, ...p }) => ((0, jsx_runtime_1.jsx)(gui_1.Collapsible.Trigger, { ...(0, slot_1.slot)('collapsible-trigger'), unstyled: true,
|
|
14
|
+
// `unstyled` means gui applies nothing — which on web leaves the UA's own
|
|
15
|
+
// button chrome, and a native <button> is #efefef with a 2px outset black
|
|
16
|
+
// border. Unstyled must mean "no chrome", not "the browser's chrome".
|
|
17
|
+
bg: "transparent", borderWidth: 0, cursor: "pointer", ...(0, gesture_1.touch)(28), ...p, children: (0, ink_1.ink)(children, undefined, { color: '$color12' }) }));
|
|
13
18
|
exports.CollapsibleTrigger = CollapsibleTrigger;
|
|
14
19
|
const CollapsibleContent = (p) => ((0, jsx_runtime_1.jsx)(gui_1.Collapsible.Content, { ...(0, slot_1.slot)('collapsible-content'), ...p }));
|
|
15
20
|
exports.CollapsibleContent = CollapsibleContent;
|
|
@@ -5,7 +5,7 @@ export type CollapsibleProps = ComponentProps<typeof GuiCollapsible>;
|
|
|
5
5
|
export type CollapsibleTriggerProps = ComponentProps<typeof GuiCollapsible.Trigger>;
|
|
6
6
|
export type CollapsibleContentProps = ComponentProps<typeof GuiCollapsible.Content>;
|
|
7
7
|
declare const Collapsible: (p: CollapsibleProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
declare const CollapsibleTrigger: (p: CollapsibleTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare const CollapsibleTrigger: ({ children, ...p }: CollapsibleTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
declare const CollapsibleContent: (p: CollapsibleContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
11
11
|
//# sourceMappingURL=collapsible.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapsible.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/collapsible.tsx"],"names":[],"mappings":"AAEA,8EAA8E;AAC9E,OAAO,EAAE,WAAW,IAAI,cAAc,EAAE,MAAM,YAAY,CAAA;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"collapsible.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/collapsible.tsx"],"names":[],"mappings":"AAEA,8EAA8E;AAC9E,OAAO,EAAE,WAAW,IAAI,cAAc,EAAE,MAAM,YAAY,CAAA;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAK3C,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,OAAO,cAAc,CAAC,CAAA;AACpE,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,OAAO,cAAc,CAAC,OAAO,CAAC,CAAA;AACnF,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,OAAO,cAAc,CAAC,OAAO,CAAC,CAAA;AAEnF,QAAA,MAAM,WAAW,GAAI,GAAG,gBAAgB,4CAAuD,CAAA;AAC/F,QAAA,MAAM,kBAAkB,GAAI,oBAAoB,uBAAuB,4CAetE,CAAA;AACD,QAAA,MAAM,kBAAkB,GAAI,GAAG,uBAAuB,4CAErD,CAAA;AAED,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAA"}
|
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
/** Collapsible — @hanzogui/collapsible's three parts under the flat names. */
|
|
4
4
|
import { Collapsible as GuiCollapsible } from '@hanzo/gui';
|
|
5
|
+
import { ink } from './ink.js';
|
|
5
6
|
import { slot } from './slot.js';
|
|
6
7
|
import { touch } from './gesture.js';
|
|
7
8
|
const Collapsible = (p) => _jsx(GuiCollapsible, { ...slot('collapsible'), ...p });
|
|
8
|
-
const CollapsibleTrigger = (p) => (_jsx(GuiCollapsible.Trigger, { ...slot('collapsible-trigger'), unstyled: true,
|
|
9
|
+
const CollapsibleTrigger = ({ children, ...p }) => (_jsx(GuiCollapsible.Trigger, { ...slot('collapsible-trigger'), unstyled: true,
|
|
10
|
+
// `unstyled` means gui applies nothing — which on web leaves the UA's own
|
|
11
|
+
// button chrome, and a native <button> is #efefef with a 2px outset black
|
|
12
|
+
// border. Unstyled must mean "no chrome", not "the browser's chrome".
|
|
13
|
+
bg: "transparent", borderWidth: 0, cursor: "pointer", ...touch(28), ...p, children: ink(children, undefined, { color: '$color12' }) }));
|
|
9
14
|
const CollapsibleContent = (p) => (_jsx(GuiCollapsible.Content, { ...slot('collapsible-content'), ...p }));
|
|
10
15
|
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
11
16
|
//# sourceMappingURL=collapsible.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapsible.js","sourceRoot":"","sources":["../../../src/backends/gui/collapsible.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,8EAA8E;AAC9E,OAAO,EAAE,WAAW,IAAI,cAAc,EAAE,MAAM,YAAY,CAAA;AAE1D,OAAO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