@hanzo/ui 8.29.42 → 8.29.44
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/plate.cjs +18 -0
- package/dist/backends/gui/plate.d.ts +5 -0
- package/dist/backends/gui/plate.d.ts.map +1 -0
- package/dist/backends/gui/plate.js +16 -0
- package/dist/backends/gui/plate.js.map +1 -0
- package/dist/framework/CollectionBuilder.cjs +2 -1
- package/dist/framework/CollectionBuilder.d.ts.map +1 -1
- package/dist/framework/CollectionBuilder.js +2 -1
- package/dist/framework/CollectionBuilder.js.map +1 -1
- package/dist/framework/DocTypeDetail.cjs +3 -2
- package/dist/framework/DocTypeDetail.d.ts.map +1 -1
- package/dist/framework/DocTypeDetail.js +2 -1
- package/dist/framework/DocTypeDetail.js.map +1 -1
- package/dist/framework/MediaGrid.d.ts.map +1 -1
- package/dist/framework/MediaGrid.js.map +1 -1
- package/dist/framework/RecordCards.cjs +3 -2
- package/dist/framework/RecordCards.d.ts.map +1 -1
- package/dist/framework/RecordCards.js +2 -1
- package/dist/framework/RecordCards.js.map +1 -1
- package/dist/framework/parts.cjs +3 -2
- package/dist/framework/parts.d.ts.map +1 -1
- package/dist/framework/parts.js +2 -1
- package/dist/framework/parts.js.map +1 -1
- package/dist/gallery.html +1 -1
- package/dist/product/BackendState.cjs +2 -1
- package/dist/product/BackendState.d.ts.map +1 -1
- package/dist/product/BackendState.js +3 -2
- package/dist/product/BackendState.js.map +1 -1
- package/dist/product/ChipSelect.cjs +1 -1
- package/dist/product/ChipSelect.d.ts.map +1 -1
- package/dist/product/ChipSelect.js +1 -1
- package/dist/product/ChipSelect.js.map +1 -1
- package/dist/product/EmptyState.cjs +2 -1
- package/dist/product/EmptyState.d.ts.map +1 -1
- package/dist/product/EmptyState.js +3 -2
- package/dist/product/EmptyState.js.map +1 -1
- package/dist/product/Metric.cjs +3 -2
- package/dist/product/Metric.d.ts.map +1 -1
- package/dist/product/Metric.js +2 -1
- package/dist/product/Metric.js.map +1 -1
- package/dist/product/RepoSelect.cjs +18 -7
- package/dist/product/RepoSelect.d.ts.map +1 -1
- package/dist/product/RepoSelect.js +18 -7
- package/dist/product/RepoSelect.js.map +1 -1
- package/dist/product/Toast.cjs +2 -1
- package/dist/product/Toast.d.ts.map +1 -1
- package/dist/product/Toast.js +3 -2
- package/dist/product/Toast.js.map +1 -1
- package/dist/product/chipSelect.logic.cjs +6 -3
- package/dist/product/chipSelect.logic.d.ts +9 -0
- package/dist/product/chipSelect.logic.d.ts.map +1 -1
- package/dist/product/chipSelect.logic.js +4 -2
- package/dist/product/chipSelect.logic.js.map +1 -1
- package/dist/product/social/CampaignCard.cjs +2 -1
- package/dist/product/social/CampaignCard.d.ts.map +1 -1
- package/dist/product/social/CampaignCard.js +2 -1
- package/dist/product/social/CampaignCard.js.map +1 -1
- package/dist/product/social/PostCard.cjs +2 -1
- package/dist/product/social/PostCard.d.ts.map +1 -1
- package/dist/product/social/PostCard.js +2 -1
- package/dist/product/social/PostCard.js.map +1 -1
- package/package.json +1 -1
|
@@ -9,9 +9,10 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
9
9
|
* pill (one status vocabulary). Extracted from Hanzo Social.
|
|
10
10
|
*/
|
|
11
11
|
const gui_1 = require("@hanzo/gui");
|
|
12
|
+
const plate_1 = require("../../backends/gui/plate.cjs");
|
|
12
13
|
const StatusTag_1 = require("../StatusTag.cjs");
|
|
13
14
|
const money = (cents) => `$${Math.round((cents || 0) / 100).toLocaleString()}`;
|
|
14
15
|
function CampaignCard({ campaign }) {
|
|
15
16
|
const pct = campaign.budget > 0 ? Math.min(100, (campaign.spend / campaign.budget) * 100) : 0;
|
|
16
|
-
return ((0, jsx_runtime_1.jsxs)(
|
|
17
|
+
return ((0, jsx_runtime_1.jsxs)(plate_1.Plate, { p: "$4", gap: "$3", borderWidth: 1, borderColor: "$borderColor", width: "100%", children: [(0, jsx_runtime_1.jsxs)(gui_1.XStack, { items: "flex-start", justify: "space-between", gap: "$2", children: [(0, jsx_runtime_1.jsxs)(gui_1.YStack, { gap: "$1", children: [(0, jsx_runtime_1.jsx)(gui_1.Text, { fontSize: "$4", fontWeight: "700", children: campaign.name }), (0, jsx_runtime_1.jsx)(gui_1.Text, { fontSize: "$2", color: "$quiet", children: campaign.channel })] }), (0, jsx_runtime_1.jsx)(StatusTag_1.StatusTag, { status: campaign.status })] }), campaign.objective ? ((0, jsx_runtime_1.jsx)(gui_1.Text, { fontSize: "$2", color: "$quiet", children: campaign.objective })) : null, (0, jsx_runtime_1.jsxs)(gui_1.YStack, { gap: "$1.5", children: [(0, jsx_runtime_1.jsxs)(gui_1.XStack, { justify: "space-between", children: [(0, jsx_runtime_1.jsxs)(gui_1.Text, { fontSize: "$1", color: "$quiet", children: [money(campaign.spend), " spent"] }), (0, jsx_runtime_1.jsxs)(gui_1.Text, { fontSize: "$1", color: "$quiet", children: [money(campaign.budget), " budget"] })] }), (0, jsx_runtime_1.jsx)(gui_1.YStack, { height: 6, rounded: "$2", bg: "$hover", overflow: "hidden", children: (0, jsx_runtime_1.jsx)(gui_1.YStack, { height: 6, rounded: "$2", bg: "$faint", width: `${pct}%` }) })] })] }));
|
|
17
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CampaignCard.d.ts","sourceRoot":"","sources":["../../../src/product/social/CampaignCard.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CampaignCard.d.ts","sourceRoot":"","sources":["../../../src/product/social/CampaignCard.tsx"],"names":[],"mappings":"AAWA,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,0BAA0B;IAC1B,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAID,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,QAAQ,CAAA;CAAE,+BAsChE"}
|
|
@@ -5,7 +5,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
* bar). Pure: all data via props. Reuses the shared StatusTag for the lifecycle
|
|
6
6
|
* pill (one status vocabulary). Extracted from Hanzo Social.
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
8
|
+
import { Text, XStack, YStack } from '@hanzo/gui';
|
|
9
|
+
import { Plate as Card } from '../../backends/gui/plate.js';
|
|
9
10
|
import { StatusTag } from '../StatusTag.js';
|
|
10
11
|
const money = (cents) => `$${Math.round((cents || 0) / 100).toLocaleString()}`;
|
|
11
12
|
export function CampaignCard({ campaign }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CampaignCard.js","sourceRoot":"","sources":["../../../src/product/social/CampaignCard.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;GAIG;AACH,OAAO,EAAE,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"CampaignCard.js","sourceRoot":"","sources":["../../../src/product/social/CampaignCard.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;GAIG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACjD,OAAO,EAAE,KAAK,IAAI,IAAI,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAaxC,MAAM,KAAK,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,cAAc,EAAE,EAAE,CAAA;AAEtF,MAAM,UAAU,YAAY,CAAC,EAAE,QAAQ,EAA0B;IAC/D,MAAM,GAAG,GACP,Q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IACA,EACT,KAAC,MAAM,IAAC,MAAM,EAAE,CAAC,EAAE,OAAO,EAAC,IAAI,EAAC,EAAE,EAAC,QAAQ,EAAC,QAAQ,EAAC,QAAQ,YAC3D,KAAC,MAAM,IAAC,MAAM,EAAE,CAAC,EAAE,OAAO,EAAC,IAAI,EAAC,EAAE,EAAC,QAAQ,EAAC,KAAK,EAAE,GAAG,GAAG,GAAY,GAAI,GAClE,IACF,IACJ,CACR,CAAA;AACH,CAAC"}
|
|
@@ -9,11 +9,12 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
9
9
|
* composes ChannelBadge + the shared StatusTag. Extracted from Hanzo Social.
|
|
10
10
|
*/
|
|
11
11
|
const gui_1 = require("@hanzo/gui");
|
|
12
|
+
const plate_1 = require("../../backends/gui/plate.cjs");
|
|
12
13
|
const lucide_icons_2_1 = require("@hanzogui/lucide-icons-2");
|
|
13
14
|
const StatusTag_1 = require("../StatusTag.cjs");
|
|
14
15
|
const ChannelBadge_1 = require("./ChannelBadge.cjs");
|
|
15
16
|
const format_1 = require("./format.cjs");
|
|
16
17
|
function PostCard({ post, onEdit, onDelete, }) {
|
|
17
18
|
const mediaCount = post.media?.length ?? 0;
|
|
18
|
-
return ((0, jsx_runtime_1.jsxs)(
|
|
19
|
+
return ((0, jsx_runtime_1.jsxs)(plate_1.Plate, { p: "$3", gap: "$2.5", borderWidth: 1, borderColor: "$borderColor", width: "100%", children: [(0, jsx_runtime_1.jsxs)(gui_1.XStack, { items: "center", justify: "space-between", gap: "$2", children: [(0, jsx_runtime_1.jsxs)(gui_1.XStack, { items: "center", gap: "$2", children: [(0, jsx_runtime_1.jsx)(ChannelBadge_1.ChannelBadge, { channel: post.channel }), (0, jsx_runtime_1.jsx)(StatusTag_1.StatusTag, { status: post.status })] }), (0, jsx_runtime_1.jsxs)(gui_1.XStack, { gap: "$1", children: [onEdit ? ((0, jsx_runtime_1.jsx)(gui_1.Button, { size: "$2", chromeless: true, icon: (0, jsx_runtime_1.jsx)(lucide_icons_2_1.Pencil, { size: 16 }), onPress: () => onEdit(post) })) : null, onDelete ? ((0, jsx_runtime_1.jsx)(gui_1.Button, { size: "$2", chromeless: true, icon: (0, jsx_runtime_1.jsx)(lucide_icons_2_1.Trash2, { size: 16 }), onPress: () => onDelete(post) })) : null] })] }), (0, jsx_runtime_1.jsx)(gui_1.Text, { fontSize: "$3", color: "$ink", children: post.content }), (0, jsx_runtime_1.jsxs)(gui_1.XStack, { items: "center", justify: "space-between", gap: "$2", children: [post.scheduleAt ? ((0, jsx_runtime_1.jsx)(gui_1.Text, { fontSize: "$1", color: "$quiet", children: (0, format_1.formatPostTime)(post.scheduleAt) })) : ((0, jsx_runtime_1.jsx)(gui_1.YStack, {})), mediaCount ? ((0, jsx_runtime_1.jsxs)(gui_1.Text, { fontSize: "$1", color: "$soft", children: [mediaCount, " media"] })) : null] })] }));
|
|
19
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostCard.d.ts","sourceRoot":"","sources":["../../../src/product/social/PostCard.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PostCard.d.ts","sourceRoot":"","sources":["../../../src/product/social/PostCard.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAEjC,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EACJ,MAAM,EACN,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,IAAI,CAAA;IACV,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,IAAI,CAAA;IAC1B,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,IAAI,CAAA;CAC7B,+BAuCA"}
|
|
@@ -5,7 +5,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
* count, and injected edit/delete affordances. Pure (data + handlers via props);
|
|
6
6
|
* composes ChannelBadge + the shared StatusTag. Extracted from Hanzo Social.
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
8
|
+
import { Text, XStack, YStack, Button } from '@hanzo/gui';
|
|
9
|
+
import { Plate as Card } from '../../backends/gui/plate.js';
|
|
9
10
|
import { Pencil, Trash2 } from '@hanzogui/lucide-icons-2';
|
|
10
11
|
import { StatusTag } from '../StatusTag.js';
|
|
11
12
|
import { ChannelBadge } from './ChannelBadge.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostCard.js","sourceRoot":"","sources":["../../../src/product/social/PostCard.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;GAIG;AACH,OAAO,EAAE,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"PostCard.js","sourceRoot":"","sources":["../../../src/product/social/PostCard.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;GAIG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACzD,OAAO,EAAE,KAAK,IAAI,IAAI,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAMzC,MAAM,UAAU,QAAQ,CAAC,EACvB,IAAI,EACJ,MAAM,EACN,QAAQ,GAKT;IACC,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,EAAE,MAAM,IAAI,CAAC,CAAA;IAC1C,OAAO,CACL,MAAC,IAAI,IAAC,CAAC,EAAC,IAAI,EAAC,GAAG,EAAC,MAAM,EAAC,WAAW,EAAE,CAAC,EAAE,WAAW,EAAC,cAAc,EAAC,KAAK,EAAC,MAAM,aAC7E,MAAC,MAAM,IAAC,KAAK,EAAC,QA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QAAQ,EAAC,IAAI,EAAC,KAAK,EAAC,OAAO,aAC9B,UAAU,cACN,CACR,CAAC,CAAC,CAAC,IAAI,IACD,IACJ,CACR,CAAA;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/ui",
|
|
3
|
-
"version": "8.29.
|
|
3
|
+
"version": "8.29.44",
|
|
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": {
|