@open-mercato/core 0.6.7-develop.6785.1.1dd7cfac55 → 0.6.7-develop.6795.1.8a3f27921c
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/.turbo/turbo-build.log +1 -1
- package/dist/generated/entities.ids.generated.js +1 -0
- package/dist/generated/entities.ids.generated.js.map +2 -2
- package/dist/modules/auth/backend/settings/page.js +14 -9
- package/dist/modules/auth/backend/settings/page.js.map +2 -2
- package/dist/modules/customers/cli.js +17 -7
- package/dist/modules/customers/cli.js.map +2 -2
- package/dist/modules/customers/components/detail/ScheduleActivityDialog.js +229 -216
- package/dist/modules/customers/components/detail/ScheduleActivityDialog.js.map +2 -2
- package/dist/modules/customers/search.js +50 -29
- package/dist/modules/customers/search.js.map +2 -2
- package/dist/modules/data_sync/api/mappings/[id]/route.js +22 -9
- package/dist/modules/data_sync/api/mappings/[id]/route.js.map +2 -2
- package/dist/modules/data_sync/api/mappings/route.js +13 -4
- package/dist/modules/data_sync/api/mappings/route.js.map +2 -2
- package/dist/modules/data_sync/api/options.js +7 -2
- package/dist/modules/data_sync/api/options.js.map +2 -2
- package/dist/modules/data_sync/api/run.js +7 -2
- package/dist/modules/data_sync/api/run.js.map +2 -2
- package/dist/modules/data_sync/api/runs/[id]/cancel.js +8 -3
- package/dist/modules/data_sync/api/runs/[id]/cancel.js.map +2 -2
- package/dist/modules/data_sync/api/runs/[id]/retry.js +7 -2
- package/dist/modules/data_sync/api/runs/[id]/retry.js.map +2 -2
- package/dist/modules/data_sync/api/runs/[id]/route.js +8 -3
- package/dist/modules/data_sync/api/runs/[id]/route.js.map +2 -2
- package/dist/modules/data_sync/api/runs.js +7 -2
- package/dist/modules/data_sync/api/runs.js.map +2 -2
- package/dist/modules/data_sync/api/schedules/[id]/route.js +19 -6
- package/dist/modules/data_sync/api/schedules/[id]/route.js.map +2 -2
- package/dist/modules/data_sync/api/schedules/route.js +13 -4
- package/dist/modules/data_sync/api/schedules/route.js.map +2 -2
- package/dist/modules/data_sync/api/validate.js +9 -4
- package/dist/modules/data_sync/api/validate.js.map +2 -2
- package/dist/modules/design_system/acl.js +9 -0
- package/dist/modules/design_system/acl.js.map +7 -0
- package/dist/modules/design_system/backend/design-system/page.js +11 -0
- package/dist/modules/design_system/backend/design-system/page.js.map +7 -0
- package/dist/modules/design_system/backend/design-system/page.meta.js +15 -0
- package/dist/modules/design_system/backend/design-system/page.meta.js.map +7 -0
- package/dist/modules/design_system/gallery/components/CodeSnippet.js +52 -0
- package/dist/modules/design_system/gallery/components/CodeSnippet.js.map +7 -0
- package/dist/modules/design_system/gallery/components/EntryCard.js +63 -0
- package/dist/modules/design_system/gallery/components/EntryCard.js.map +7 -0
- package/dist/modules/design_system/gallery/components/GalleryShell.js +163 -0
- package/dist/modules/design_system/gallery/components/GalleryShell.js.map +7 -0
- package/dist/modules/design_system/gallery/components/VariantPreview.js +9 -0
- package/dist/modules/design_system/gallery/components/VariantPreview.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/banners.js +186 -0
- package/dist/modules/design_system/gallery/entries/banners.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/buttons.js +361 -0
- package/dist/modules/design_system/gallery/entries/buttons.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/charts.js +457 -0
- package/dist/modules/design_system/gallery/entries/charts.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/dates.js +306 -0
- package/dist/modules/design_system/gallery/entries/dates.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/detail.js +358 -0
- package/dist/modules/design_system/gallery/entries/detail.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/display.js +785 -0
- package/dist/modules/design_system/gallery/entries/display.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/feedback.js +658 -0
- package/dist/modules/design_system/gallery/entries/feedback.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/filters.js +505 -0
- package/dist/modules/design_system/gallery/entries/filters.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/foundations.js +453 -0
- package/dist/modules/design_system/gallery/entries/foundations.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/icons.js +140 -0
- package/dist/modules/design_system/gallery/entries/icons.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/inputs.js +1217 -0
- package/dist/modules/design_system/gallery/entries/inputs.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/messages.js +334 -0
- package/dist/modules/design_system/gallery/entries/messages.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/navigation.js +475 -0
- package/dist/modules/design_system/gallery/entries/navigation.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/notifications.js +257 -0
- package/dist/modules/design_system/gallery/entries/notifications.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/overlays.js +576 -0
- package/dist/modules/design_system/gallery/entries/overlays.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/scaffolding.js +378 -0
- package/dist/modules/design_system/gallery/entries/scaffolding.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/schedule.js +297 -0
- package/dist/modules/design_system/gallery/entries/schedule.js.map +7 -0
- package/dist/modules/design_system/gallery/registry.js +139 -0
- package/dist/modules/design_system/gallery/registry.js.map +7 -0
- package/dist/modules/design_system/gallery/types.js +1 -0
- package/dist/modules/design_system/gallery/types.js.map +7 -0
- package/dist/modules/design_system/index.js +9 -0
- package/dist/modules/design_system/index.js.map +7 -0
- package/dist/modules/design_system/setup.js +14 -0
- package/dist/modules/design_system/setup.js.map +7 -0
- package/dist/modules/inbox_ops/search.js +15 -4
- package/dist/modules/inbox_ops/search.js.map +2 -2
- package/dist/modules/integrations/api/[id]/credentials/route.js +11 -5
- package/dist/modules/integrations/api/[id]/credentials/route.js.map +2 -2
- package/dist/modules/integrations/api/[id]/health/route.js +6 -3
- package/dist/modules/integrations/api/[id]/health/route.js.map +2 -2
- package/dist/modules/integrations/api/[id]/route.js +6 -3
- package/dist/modules/integrations/api/[id]/route.js.map +2 -2
- package/dist/modules/integrations/api/[id]/state/route.js +6 -3
- package/dist/modules/integrations/api/[id]/state/route.js.map +2 -2
- package/dist/modules/integrations/api/[id]/version/route.js +6 -3
- package/dist/modules/integrations/api/[id]/version/route.js.map +2 -2
- package/dist/modules/integrations/api/logs/route.js +6 -3
- package/dist/modules/integrations/api/logs/route.js.map +2 -2
- package/dist/modules/integrations/api/route.js +6 -3
- package/dist/modules/integrations/api/route.js.map +2 -2
- package/dist/modules/integrations/api/umes-read.js +2 -2
- package/dist/modules/integrations/api/umes-read.js.map +2 -2
- package/dist/modules/integrations/lib/organization-scope.js +2 -9
- package/dist/modules/integrations/lib/organization-scope.js.map +2 -2
- package/dist/modules/messages/search.js +10 -5
- package/dist/modules/messages/search.js.map +2 -2
- package/dist/modules/query_index/data/entities.js +2 -1
- package/dist/modules/query_index/data/entities.js.map +2 -2
- package/dist/modules/query_index/lib/engine.js +32 -50
- package/dist/modules/query_index/lib/engine.js.map +2 -2
- package/dist/modules/query_index/migrations/Migration20260731105052_query_index.js +17 -0
- package/dist/modules/query_index/migrations/Migration20260731105052_query_index.js.map +7 -0
- package/generated/entities.ids.generated.ts +1 -0
- package/package.json +16 -16
- package/src/modules/auth/backend/settings/page.tsx +17 -8
- package/src/modules/customers/cli.ts +17 -7
- package/src/modules/customers/components/detail/ScheduleActivityDialog.tsx +24 -13
- package/src/modules/customers/i18n/de.json +17 -0
- package/src/modules/customers/i18n/en.json +17 -0
- package/src/modules/customers/i18n/es.json +17 -0
- package/src/modules/customers/i18n/pl.json +17 -0
- package/src/modules/customers/search.ts +59 -27
- package/src/modules/data_sync/AGENTS.md +1 -0
- package/src/modules/data_sync/api/mappings/[id]/route.ts +22 -9
- package/src/modules/data_sync/api/mappings/route.ts +13 -4
- package/src/modules/data_sync/api/options.ts +7 -2
- package/src/modules/data_sync/api/run.ts +7 -2
- package/src/modules/data_sync/api/runs/[id]/cancel.ts +8 -3
- package/src/modules/data_sync/api/runs/[id]/retry.ts +7 -2
- package/src/modules/data_sync/api/runs/[id]/route.ts +8 -3
- package/src/modules/data_sync/api/runs.ts +7 -2
- package/src/modules/data_sync/api/schedules/[id]/route.ts +19 -6
- package/src/modules/data_sync/api/schedules/route.ts +13 -4
- package/src/modules/data_sync/api/validate.ts +9 -4
- package/src/modules/design_system/AGENTS.md +34 -0
- package/src/modules/design_system/acl.ts +5 -0
- package/src/modules/design_system/backend/design-system/page.meta.ts +11 -0
- package/src/modules/design_system/backend/design-system/page.tsx +14 -0
- package/src/modules/design_system/gallery/components/CodeSnippet.tsx +55 -0
- package/src/modules/design_system/gallery/components/EntryCard.tsx +95 -0
- package/src/modules/design_system/gallery/components/GalleryShell.tsx +206 -0
- package/src/modules/design_system/gallery/components/VariantPreview.tsx +15 -0
- package/src/modules/design_system/gallery/entries/banners.tsx +226 -0
- package/src/modules/design_system/gallery/entries/buttons.tsx +422 -0
- package/src/modules/design_system/gallery/entries/charts.tsx +518 -0
- package/src/modules/design_system/gallery/entries/dates.tsx +325 -0
- package/src/modules/design_system/gallery/entries/detail.tsx +403 -0
- package/src/modules/design_system/gallery/entries/display.tsx +893 -0
- package/src/modules/design_system/gallery/entries/feedback.tsx +746 -0
- package/src/modules/design_system/gallery/entries/filters.tsx +570 -0
- package/src/modules/design_system/gallery/entries/foundations.tsx +529 -0
- package/src/modules/design_system/gallery/entries/icons.tsx +168 -0
- package/src/modules/design_system/gallery/entries/inputs.tsx +1516 -0
- package/src/modules/design_system/gallery/entries/messages.tsx +339 -0
- package/src/modules/design_system/gallery/entries/navigation.tsx +573 -0
- package/src/modules/design_system/gallery/entries/notifications.tsx +285 -0
- package/src/modules/design_system/gallery/entries/overlays.tsx +677 -0
- package/src/modules/design_system/gallery/entries/scaffolding.tsx +430 -0
- package/src/modules/design_system/gallery/entries/schedule.tsx +307 -0
- package/src/modules/design_system/gallery/registry.ts +152 -0
- package/src/modules/design_system/gallery/types.ts +32 -0
- package/src/modules/design_system/i18n/.hardcoded-allowlist.json +71 -0
- package/src/modules/design_system/i18n/de.json +46 -0
- package/src/modules/design_system/i18n/en.json +46 -0
- package/src/modules/design_system/i18n/es.json +46 -0
- package/src/modules/design_system/i18n/pl.json +46 -0
- package/src/modules/design_system/index.ts +7 -0
- package/src/modules/design_system/setup.ts +12 -0
- package/src/modules/inbox_ops/i18n/de.json +3 -0
- package/src/modules/inbox_ops/i18n/en.json +3 -0
- package/src/modules/inbox_ops/i18n/es.json +3 -0
- package/src/modules/inbox_ops/i18n/pl.json +3 -0
- package/src/modules/inbox_ops/search.ts +20 -4
- package/src/modules/integrations/api/[id]/credentials/route.ts +11 -5
- package/src/modules/integrations/api/[id]/health/route.ts +6 -3
- package/src/modules/integrations/api/[id]/route.ts +6 -3
- package/src/modules/integrations/api/[id]/state/route.ts +6 -3
- package/src/modules/integrations/api/[id]/version/route.ts +6 -3
- package/src/modules/integrations/api/logs/route.ts +6 -3
- package/src/modules/integrations/api/route.ts +6 -3
- package/src/modules/integrations/api/umes-read.ts +2 -2
- package/src/modules/integrations/lib/organization-scope.ts +5 -25
- package/src/modules/messages/i18n/de.json +2 -0
- package/src/modules/messages/i18n/en.json +2 -0
- package/src/modules/messages/i18n/es.json +2 -0
- package/src/modules/messages/i18n/pl.json +2 -0
- package/src/modules/messages/search.ts +11 -5
- package/src/modules/query_index/data/entities.ts +7 -0
- package/src/modules/query_index/lib/engine.ts +40 -63
- package/src/modules/query_index/migrations/.snapshot-open-mercato.json +12 -0
- package/src/modules/query_index/migrations/Migration20260731105052_query_index.ts +35 -0
|
@@ -0,0 +1,785 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Building2, MoreHorizontal } from "lucide-react";
|
|
3
|
+
import { Badge } from "@open-mercato/ui/primitives/badge";
|
|
4
|
+
import { StatusBadge } from "@open-mercato/ui/primitives/status-badge";
|
|
5
|
+
import { Tag } from "@open-mercato/ui/primitives/tag";
|
|
6
|
+
import { Avatar, AvatarStack } from "@open-mercato/ui/primitives/avatar";
|
|
7
|
+
import { Kbd, KbdShortcut } from "@open-mercato/ui/primitives/kbd";
|
|
8
|
+
import {
|
|
9
|
+
Table,
|
|
10
|
+
TableBody,
|
|
11
|
+
TableCell,
|
|
12
|
+
TableFooter,
|
|
13
|
+
TableHead,
|
|
14
|
+
TableHeader,
|
|
15
|
+
TableRow
|
|
16
|
+
} from "@open-mercato/ui/primitives/table";
|
|
17
|
+
import {
|
|
18
|
+
Card,
|
|
19
|
+
CardAction,
|
|
20
|
+
CardContent,
|
|
21
|
+
CardDescription,
|
|
22
|
+
CardFooter,
|
|
23
|
+
CardHeader,
|
|
24
|
+
CardTitle
|
|
25
|
+
} from "@open-mercato/ui/primitives/card";
|
|
26
|
+
import { Separator } from "@open-mercato/ui/primitives/separator";
|
|
27
|
+
import { ScrollArea } from "@open-mercato/ui/primitives/scroll-area";
|
|
28
|
+
import {
|
|
29
|
+
ActivityFeed,
|
|
30
|
+
ActivityFeedComment,
|
|
31
|
+
ActivityFeedFileChip,
|
|
32
|
+
ActivityFeedItem,
|
|
33
|
+
ActivityFeedStatusChip
|
|
34
|
+
} from "@open-mercato/ui/primitives/activity-feed";
|
|
35
|
+
import { IconButton } from "@open-mercato/ui/primitives/icon-button";
|
|
36
|
+
const badgeEntry = {
|
|
37
|
+
id: "badge",
|
|
38
|
+
title: "Badge",
|
|
39
|
+
importPath: "@open-mercato/ui/primitives/badge",
|
|
40
|
+
usage: {
|
|
41
|
+
do: [
|
|
42
|
+
"Counts and short semantic labels; the brand variant for custom-view and renewal pills.",
|
|
43
|
+
"Semantic variants (success/warning/info/neutral/error) come from status tokens \u2014 no custom colors."
|
|
44
|
+
],
|
|
45
|
+
dont: ["Not for system statuses (use StatusBadge) or user-applied labels (use Tag)."]
|
|
46
|
+
},
|
|
47
|
+
variants: [
|
|
48
|
+
{
|
|
49
|
+
id: "semantic",
|
|
50
|
+
title: "Semantic variants",
|
|
51
|
+
render: () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
52
|
+
/* @__PURE__ */ jsx(Badge, { variant: "success", children: "Success" }),
|
|
53
|
+
/* @__PURE__ */ jsx(Badge, { variant: "warning", children: "Warning" }),
|
|
54
|
+
/* @__PURE__ */ jsx(Badge, { variant: "info", children: "Info" }),
|
|
55
|
+
/* @__PURE__ */ jsx(Badge, { variant: "neutral", children: "Neutral" }),
|
|
56
|
+
/* @__PURE__ */ jsx(Badge, { variant: "error", children: "Error" }),
|
|
57
|
+
/* @__PURE__ */ jsx(Badge, { variant: "brand", children: "Brand" })
|
|
58
|
+
] }),
|
|
59
|
+
code: `import { Badge } from '@open-mercato/ui/primitives/badge'
|
|
60
|
+
|
|
61
|
+
<Badge variant="success">Success</Badge>
|
|
62
|
+
<Badge variant="warning">Warning</Badge>
|
|
63
|
+
<Badge variant="info">Info</Badge>
|
|
64
|
+
<Badge variant="neutral">Neutral</Badge>
|
|
65
|
+
<Badge variant="error">Error</Badge>
|
|
66
|
+
<Badge variant="brand">Brand</Badge>`
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
id: "sizes",
|
|
70
|
+
title: "Sizes",
|
|
71
|
+
render: () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
72
|
+
/* @__PURE__ */ jsx(Badge, { variant: "info", size: "lg", children: "Large" }),
|
|
73
|
+
/* @__PURE__ */ jsx(Badge, { variant: "info", size: "default", children: "Default" }),
|
|
74
|
+
/* @__PURE__ */ jsx(Badge, { variant: "info", size: "sm", children: "Small" })
|
|
75
|
+
] }),
|
|
76
|
+
code: `import { Badge } from '@open-mercato/ui/primitives/badge'
|
|
77
|
+
|
|
78
|
+
<Badge variant="info" size="lg">Large</Badge>
|
|
79
|
+
<Badge variant="info" size="default">Default</Badge>
|
|
80
|
+
<Badge variant="info" size="sm">Small</Badge>`
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
id: "dot",
|
|
84
|
+
title: "With dot",
|
|
85
|
+
render: () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
86
|
+
/* @__PURE__ */ jsx(Badge, { variant: "success", dot: true, children: "Active" }),
|
|
87
|
+
/* @__PURE__ */ jsx(Badge, { variant: "neutral", dot: true, children: "Draft" }),
|
|
88
|
+
/* @__PURE__ */ jsx(Badge, { variant: "brand", dot: true, children: "Custom view" })
|
|
89
|
+
] }),
|
|
90
|
+
code: `import { Badge } from '@open-mercato/ui/primitives/badge'
|
|
91
|
+
|
|
92
|
+
<Badge variant="success" dot>Active</Badge>
|
|
93
|
+
<Badge variant="neutral" dot>Draft</Badge>
|
|
94
|
+
<Badge variant="brand" dot>Custom view</Badge>`
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
id: "removable",
|
|
98
|
+
title: "Removable",
|
|
99
|
+
render: () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
100
|
+
/* @__PURE__ */ jsx(Badge, { variant: "neutral", removable: true, onRemove: () => {
|
|
101
|
+
}, children: "Filter: Region" }),
|
|
102
|
+
/* @__PURE__ */ jsx(Badge, { variant: "brand", removable: true, onRemove: () => {
|
|
103
|
+
}, children: "Renewal" })
|
|
104
|
+
] }),
|
|
105
|
+
code: `import { Badge } from '@open-mercato/ui/primitives/badge'
|
|
106
|
+
|
|
107
|
+
<Badge variant="neutral" removable onRemove={() => setRegion(null)}>Filter: Region</Badge>
|
|
108
|
+
<Badge variant="brand" removable onRemove={() => clearTag()}>Renewal</Badge>`
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
};
|
|
112
|
+
const statusBadgeEntry = {
|
|
113
|
+
id: "status-badge",
|
|
114
|
+
title: "StatusBadge",
|
|
115
|
+
importPath: "@open-mercato/ui/primitives/status-badge",
|
|
116
|
+
usage: {
|
|
117
|
+
do: [
|
|
118
|
+
"System-computed statuses (active, pending, failed) \u2014 drive variants through a shared StatusMap.",
|
|
119
|
+
"The dot makes state scannable in dense tables."
|
|
120
|
+
],
|
|
121
|
+
dont: ["Not for user-applied labels or categories \u2014 that is Tag."]
|
|
122
|
+
},
|
|
123
|
+
variants: [
|
|
124
|
+
{
|
|
125
|
+
id: "with-dot",
|
|
126
|
+
title: "Variants with dot",
|
|
127
|
+
render: () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
128
|
+
/* @__PURE__ */ jsx(StatusBadge, { variant: "success", dot: true, children: "Active" }),
|
|
129
|
+
/* @__PURE__ */ jsx(StatusBadge, { variant: "warning", dot: true, children: "Pending" }),
|
|
130
|
+
/* @__PURE__ */ jsx(StatusBadge, { variant: "error", dot: true, children: "Failed" }),
|
|
131
|
+
/* @__PURE__ */ jsx(StatusBadge, { variant: "info", dot: true, children: "Syncing" }),
|
|
132
|
+
/* @__PURE__ */ jsx(StatusBadge, { variant: "neutral", dot: true, children: "Archived" })
|
|
133
|
+
] }),
|
|
134
|
+
code: `import { StatusBadge } from '@open-mercato/ui/primitives/status-badge'
|
|
135
|
+
|
|
136
|
+
<StatusBadge variant="success" dot>Active</StatusBadge>
|
|
137
|
+
<StatusBadge variant="warning" dot>Pending</StatusBadge>
|
|
138
|
+
<StatusBadge variant="error" dot>Failed</StatusBadge>
|
|
139
|
+
<StatusBadge variant="info" dot>Syncing</StatusBadge>
|
|
140
|
+
<StatusBadge variant="neutral" dot>Archived</StatusBadge>`
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
id: "without-dot",
|
|
144
|
+
title: "Without dot",
|
|
145
|
+
render: () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
146
|
+
/* @__PURE__ */ jsx(StatusBadge, { variant: "success", children: "Paid" }),
|
|
147
|
+
/* @__PURE__ */ jsx(StatusBadge, { variant: "neutral", children: "Draft" })
|
|
148
|
+
] }),
|
|
149
|
+
code: `import { StatusBadge } from '@open-mercato/ui/primitives/status-badge'
|
|
150
|
+
|
|
151
|
+
<StatusBadge variant="success">Paid</StatusBadge>
|
|
152
|
+
<StatusBadge variant="neutral">Draft</StatusBadge>`
|
|
153
|
+
}
|
|
154
|
+
]
|
|
155
|
+
};
|
|
156
|
+
const tagEntry = {
|
|
157
|
+
id: "tag",
|
|
158
|
+
title: "Tag",
|
|
159
|
+
importPath: "@open-mercato/ui/primitives/tag",
|
|
160
|
+
usage: {
|
|
161
|
+
do: ["User-applied labels and categories; map domain types via TagMap for consistency."],
|
|
162
|
+
dont: ["Not for system status \u2014 that is StatusBadge."]
|
|
163
|
+
},
|
|
164
|
+
variants: [
|
|
165
|
+
{
|
|
166
|
+
id: "variants",
|
|
167
|
+
title: "Variants",
|
|
168
|
+
render: () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
169
|
+
/* @__PURE__ */ jsx(Tag, { children: "default" }),
|
|
170
|
+
/* @__PURE__ */ jsx(Tag, { variant: "success", children: "success" }),
|
|
171
|
+
/* @__PURE__ */ jsx(Tag, { variant: "warning", children: "warning" }),
|
|
172
|
+
/* @__PURE__ */ jsx(Tag, { variant: "error", children: "error" }),
|
|
173
|
+
/* @__PURE__ */ jsx(Tag, { variant: "info", children: "info" }),
|
|
174
|
+
/* @__PURE__ */ jsx(Tag, { variant: "neutral", children: "neutral" }),
|
|
175
|
+
/* @__PURE__ */ jsx(Tag, { variant: "brand", children: "brand" }),
|
|
176
|
+
/* @__PURE__ */ jsx(Tag, { variant: "pink", children: "pink" })
|
|
177
|
+
] }),
|
|
178
|
+
code: `import { Tag } from '@open-mercato/ui/primitives/tag'
|
|
179
|
+
|
|
180
|
+
<Tag>default</Tag>
|
|
181
|
+
<Tag variant="success">success</Tag>
|
|
182
|
+
<Tag variant="warning">warning</Tag>
|
|
183
|
+
<Tag variant="error">error</Tag>
|
|
184
|
+
<Tag variant="info">info</Tag>
|
|
185
|
+
<Tag variant="neutral">neutral</Tag>
|
|
186
|
+
<Tag variant="brand">brand</Tag>
|
|
187
|
+
<Tag variant="pink">pink</Tag>`
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
id: "dot",
|
|
191
|
+
title: "With dot",
|
|
192
|
+
render: () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
193
|
+
/* @__PURE__ */ jsx(Tag, { variant: "success", dot: true, children: "Customer" }),
|
|
194
|
+
/* @__PURE__ */ jsx(Tag, { variant: "brand", dot: true, children: "Renewal" }),
|
|
195
|
+
/* @__PURE__ */ jsx(Tag, { variant: "pink", dot: true, children: "Campaign" })
|
|
196
|
+
] }),
|
|
197
|
+
code: `import { Tag } from '@open-mercato/ui/primitives/tag'
|
|
198
|
+
|
|
199
|
+
<Tag variant="success" dot>Customer</Tag>
|
|
200
|
+
<Tag variant="brand" dot>Renewal</Tag>
|
|
201
|
+
<Tag variant="pink" dot>Campaign</Tag>`
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
id: "square",
|
|
205
|
+
title: "Square shape",
|
|
206
|
+
render: () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
207
|
+
/* @__PURE__ */ jsx(Tag, { shape: "square", children: "default" }),
|
|
208
|
+
/* @__PURE__ */ jsx(Tag, { variant: "info", shape: "square", dot: true, children: "info" })
|
|
209
|
+
] }),
|
|
210
|
+
code: `import { Tag } from '@open-mercato/ui/primitives/tag'
|
|
211
|
+
|
|
212
|
+
<Tag shape="square">default</Tag>
|
|
213
|
+
<Tag variant="info" shape="square" dot>info</Tag>`
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
id: "removable",
|
|
217
|
+
title: "Removable",
|
|
218
|
+
render: () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
219
|
+
/* @__PURE__ */ jsx(Tag, { variant: "neutral", onRemove: () => {
|
|
220
|
+
}, children: "Wholesale" }),
|
|
221
|
+
/* @__PURE__ */ jsx(Tag, { variant: "neutral", onRemove: () => {
|
|
222
|
+
}, disabled: true, children: "Locked" })
|
|
223
|
+
] }),
|
|
224
|
+
code: `import { Tag } from '@open-mercato/ui/primitives/tag'
|
|
225
|
+
|
|
226
|
+
<Tag variant="neutral" onRemove={() => removeTag('wholesale')}>Wholesale</Tag>
|
|
227
|
+
<Tag variant="neutral" onRemove={() => {}} disabled>Locked</Tag>`
|
|
228
|
+
}
|
|
229
|
+
]
|
|
230
|
+
};
|
|
231
|
+
const avatarEntry = {
|
|
232
|
+
id: "avatar",
|
|
233
|
+
title: "Avatar",
|
|
234
|
+
importPath: "@open-mercato/ui/primitives/avatar",
|
|
235
|
+
variants: [
|
|
236
|
+
{
|
|
237
|
+
id: "sizes",
|
|
238
|
+
title: "Sizes (auto-initials)",
|
|
239
|
+
render: () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
240
|
+
/* @__PURE__ */ jsx(Avatar, { label: "Wei Chen", size: "xl" }),
|
|
241
|
+
/* @__PURE__ */ jsx(Avatar, { label: "Wei Chen", size: "lg" }),
|
|
242
|
+
/* @__PURE__ */ jsx(Avatar, { label: "Wei Chen", size: "md" }),
|
|
243
|
+
/* @__PURE__ */ jsx(Avatar, { label: "Wei Chen", size: "sm" }),
|
|
244
|
+
/* @__PURE__ */ jsx(Avatar, { label: "Wei Chen", size: "xs" })
|
|
245
|
+
] }),
|
|
246
|
+
code: `import { Avatar } from '@open-mercato/ui/primitives/avatar'
|
|
247
|
+
|
|
248
|
+
// Initials are derived automatically from the label at every size.
|
|
249
|
+
<Avatar label="Wei Chen" size="xl" />
|
|
250
|
+
<Avatar label="Wei Chen" size="lg" />
|
|
251
|
+
<Avatar label="Wei Chen" size="md" />
|
|
252
|
+
<Avatar label="Wei Chen" size="sm" />
|
|
253
|
+
<Avatar label="Wei Chen" size="xs" />`
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
id: "variants",
|
|
257
|
+
title: "Variants and icon",
|
|
258
|
+
render: () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
259
|
+
/* @__PURE__ */ jsx(Avatar, { label: "Laura Perez" }),
|
|
260
|
+
/* @__PURE__ */ jsx(Avatar, { label: "Laura Perez", variant: "monochrome" }),
|
|
261
|
+
/* @__PURE__ */ jsx(Avatar, { label: "Acme Corp", icon: /* @__PURE__ */ jsx(Building2, {}), variant: "monochrome" })
|
|
262
|
+
] }),
|
|
263
|
+
code: `import { Building2 } from 'lucide-react'
|
|
264
|
+
import { Avatar } from '@open-mercato/ui/primitives/avatar'
|
|
265
|
+
|
|
266
|
+
<Avatar label="Laura Perez" />
|
|
267
|
+
<Avatar label="Laura Perez" variant="monochrome" />
|
|
268
|
+
<Avatar label="Acme Corp" icon={<Building2 />} variant="monochrome" />`
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
id: "status",
|
|
272
|
+
title: "Status dot",
|
|
273
|
+
render: () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
274
|
+
/* @__PURE__ */ jsx(Avatar, { label: "Wei Chen", status: "online" }),
|
|
275
|
+
/* @__PURE__ */ jsx(Avatar, { label: "Laura Perez", status: "busy" }),
|
|
276
|
+
/* @__PURE__ */ jsx(Avatar, { label: "Omar Haddad", status: "away" }),
|
|
277
|
+
/* @__PURE__ */ jsx(Avatar, { label: "Ines Kowalska", status: "offline" })
|
|
278
|
+
] }),
|
|
279
|
+
code: `import { Avatar } from '@open-mercato/ui/primitives/avatar'
|
|
280
|
+
|
|
281
|
+
<Avatar label="Wei Chen" status="online" />
|
|
282
|
+
<Avatar label="Laura Perez" status="busy" />
|
|
283
|
+
<Avatar label="Omar Haddad" status="away" />
|
|
284
|
+
<Avatar label="Ines Kowalska" status="offline" />`
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
id: "stack",
|
|
288
|
+
title: "AvatarStack",
|
|
289
|
+
render: () => /* @__PURE__ */ jsxs(AvatarStack, { max: 3, children: [
|
|
290
|
+
/* @__PURE__ */ jsx(Avatar, { label: "Wei Chen" }),
|
|
291
|
+
/* @__PURE__ */ jsx(Avatar, { label: "Laura Perez" }),
|
|
292
|
+
/* @__PURE__ */ jsx(Avatar, { label: "Omar Haddad" }),
|
|
293
|
+
/* @__PURE__ */ jsx(Avatar, { label: "Ines Kowalska" }),
|
|
294
|
+
/* @__PURE__ */ jsx(Avatar, { label: "Ravi Patel" })
|
|
295
|
+
] }),
|
|
296
|
+
code: `import { Avatar, AvatarStack } from '@open-mercato/ui/primitives/avatar'
|
|
297
|
+
|
|
298
|
+
<AvatarStack max={3}>
|
|
299
|
+
<Avatar label="Wei Chen" />
|
|
300
|
+
<Avatar label="Laura Perez" />
|
|
301
|
+
<Avatar label="Omar Haddad" />
|
|
302
|
+
<Avatar label="Ines Kowalska" />
|
|
303
|
+
<Avatar label="Ravi Patel" />
|
|
304
|
+
</AvatarStack>`
|
|
305
|
+
}
|
|
306
|
+
]
|
|
307
|
+
};
|
|
308
|
+
const kbdEntry = {
|
|
309
|
+
id: "kbd",
|
|
310
|
+
title: "Kbd",
|
|
311
|
+
importPath: "@open-mercato/ui/primitives/kbd",
|
|
312
|
+
variants: [
|
|
313
|
+
{
|
|
314
|
+
id: "default",
|
|
315
|
+
title: "default",
|
|
316
|
+
render: () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
317
|
+
/* @__PURE__ */ jsx(Kbd, { children: "\u2318" }),
|
|
318
|
+
/* @__PURE__ */ jsx(Kbd, { children: "Shift" }),
|
|
319
|
+
/* @__PURE__ */ jsx(Kbd, { children: "Enter" })
|
|
320
|
+
] }),
|
|
321
|
+
code: `import { Kbd } from '@open-mercato/ui/primitives/kbd'
|
|
322
|
+
|
|
323
|
+
<Kbd>\u2318</Kbd>
|
|
324
|
+
<Kbd>Shift</Kbd>
|
|
325
|
+
<Kbd>Enter</Kbd>`
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
id: "shortcut",
|
|
329
|
+
title: "KbdShortcut",
|
|
330
|
+
render: () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
331
|
+
/* @__PURE__ */ jsx(KbdShortcut, { keys: ["\u2318", "K"] }),
|
|
332
|
+
/* @__PURE__ */ jsx(KbdShortcut, { keys: ["Ctrl", "Shift", "P"] })
|
|
333
|
+
] }),
|
|
334
|
+
code: `import { KbdShortcut } from '@open-mercato/ui/primitives/kbd'
|
|
335
|
+
|
|
336
|
+
<KbdShortcut keys={['\u2318', 'K']} />
|
|
337
|
+
<KbdShortcut keys={['Ctrl', 'Shift', 'P']} />`
|
|
338
|
+
}
|
|
339
|
+
]
|
|
340
|
+
};
|
|
341
|
+
const tableEntry = {
|
|
342
|
+
id: "table",
|
|
343
|
+
title: "Table",
|
|
344
|
+
importPath: "@open-mercato/ui/primitives/table",
|
|
345
|
+
figmaNodeId: "167144:147544",
|
|
346
|
+
variants: [
|
|
347
|
+
{
|
|
348
|
+
id: "default",
|
|
349
|
+
title: "default",
|
|
350
|
+
render: () => /* @__PURE__ */ jsxs(Table, { children: [
|
|
351
|
+
/* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
352
|
+
/* @__PURE__ */ jsx(TableHead, { children: "Order" }),
|
|
353
|
+
/* @__PURE__ */ jsx(TableHead, { children: "Customer" }),
|
|
354
|
+
/* @__PURE__ */ jsx(TableHead, { children: "Status" }),
|
|
355
|
+
/* @__PURE__ */ jsx(TableHead, { className: "text-right", children: "Total" })
|
|
356
|
+
] }) }),
|
|
357
|
+
/* @__PURE__ */ jsxs(TableBody, { children: [
|
|
358
|
+
/* @__PURE__ */ jsxs(TableRow, { children: [
|
|
359
|
+
/* @__PURE__ */ jsx(TableCell, { children: "#1042" }),
|
|
360
|
+
/* @__PURE__ */ jsx(TableCell, { children: "Wei Chen" }),
|
|
361
|
+
/* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(StatusBadge, { variant: "success", dot: true, children: "Paid" }) }),
|
|
362
|
+
/* @__PURE__ */ jsx(TableCell, { className: "text-right", children: "$1,250.00" })
|
|
363
|
+
] }),
|
|
364
|
+
/* @__PURE__ */ jsxs(TableRow, { children: [
|
|
365
|
+
/* @__PURE__ */ jsx(TableCell, { children: "#1041" }),
|
|
366
|
+
/* @__PURE__ */ jsx(TableCell, { children: "Laura Perez" }),
|
|
367
|
+
/* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(StatusBadge, { variant: "warning", dot: true, children: "Pending" }) }),
|
|
368
|
+
/* @__PURE__ */ jsx(TableCell, { className: "text-right", children: "$310.50" })
|
|
369
|
+
] }),
|
|
370
|
+
/* @__PURE__ */ jsxs(TableRow, { children: [
|
|
371
|
+
/* @__PURE__ */ jsx(TableCell, { children: "#1040" }),
|
|
372
|
+
/* @__PURE__ */ jsx(TableCell, { children: "Omar Haddad" }),
|
|
373
|
+
/* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(StatusBadge, { variant: "neutral", dot: true, children: "Draft" }) }),
|
|
374
|
+
/* @__PURE__ */ jsx(TableCell, { className: "text-right", children: "$89.00" })
|
|
375
|
+
] })
|
|
376
|
+
] })
|
|
377
|
+
] }),
|
|
378
|
+
code: `import { Table, TableHeader, TableBody, TableRow, TableHead, TableCell } from '@open-mercato/ui/primitives/table'
|
|
379
|
+
import { StatusBadge } from '@open-mercato/ui/primitives/status-badge'
|
|
380
|
+
|
|
381
|
+
<Table>
|
|
382
|
+
<TableHeader>
|
|
383
|
+
<TableRow>
|
|
384
|
+
<TableHead>Order</TableHead>
|
|
385
|
+
<TableHead>Customer</TableHead>
|
|
386
|
+
<TableHead>Status</TableHead>
|
|
387
|
+
<TableHead className="text-right">Total</TableHead>
|
|
388
|
+
</TableRow>
|
|
389
|
+
</TableHeader>
|
|
390
|
+
<TableBody>
|
|
391
|
+
<TableRow>
|
|
392
|
+
<TableCell>#1042</TableCell>
|
|
393
|
+
<TableCell>Wei Chen</TableCell>
|
|
394
|
+
<TableCell><StatusBadge variant="success" dot>Paid</StatusBadge></TableCell>
|
|
395
|
+
<TableCell className="text-right">$1,250.00</TableCell>
|
|
396
|
+
</TableRow>
|
|
397
|
+
</TableBody>
|
|
398
|
+
</Table>`
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
id: "striped",
|
|
402
|
+
title: "striped",
|
|
403
|
+
render: () => /* @__PURE__ */ jsxs(Table, { variant: "striped", children: [
|
|
404
|
+
/* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
405
|
+
/* @__PURE__ */ jsx(TableHead, { children: "SKU" }),
|
|
406
|
+
/* @__PURE__ */ jsx(TableHead, { children: "Product" }),
|
|
407
|
+
/* @__PURE__ */ jsx(TableHead, { className: "text-right", children: "Stock" })
|
|
408
|
+
] }) }),
|
|
409
|
+
/* @__PURE__ */ jsxs(TableBody, { children: [
|
|
410
|
+
/* @__PURE__ */ jsxs(TableRow, { children: [
|
|
411
|
+
/* @__PURE__ */ jsx(TableCell, { children: "AP-100" }),
|
|
412
|
+
/* @__PURE__ */ jsx(TableCell, { children: "Apex Desk Lamp" }),
|
|
413
|
+
/* @__PURE__ */ jsx(TableCell, { className: "text-right", children: "120" })
|
|
414
|
+
] }),
|
|
415
|
+
/* @__PURE__ */ jsxs(TableRow, { children: [
|
|
416
|
+
/* @__PURE__ */ jsx(TableCell, { children: "AP-101" }),
|
|
417
|
+
/* @__PURE__ */ jsx(TableCell, { children: "Apex Monitor Stand" }),
|
|
418
|
+
/* @__PURE__ */ jsx(TableCell, { className: "text-right", children: "64" })
|
|
419
|
+
] }),
|
|
420
|
+
/* @__PURE__ */ jsxs(TableRow, { children: [
|
|
421
|
+
/* @__PURE__ */ jsx(TableCell, { children: "AP-102" }),
|
|
422
|
+
/* @__PURE__ */ jsx(TableCell, { children: "Apex Cable Kit" }),
|
|
423
|
+
/* @__PURE__ */ jsx(TableCell, { className: "text-right", children: "310" })
|
|
424
|
+
] }),
|
|
425
|
+
/* @__PURE__ */ jsxs(TableRow, { children: [
|
|
426
|
+
/* @__PURE__ */ jsx(TableCell, { children: "AP-103" }),
|
|
427
|
+
/* @__PURE__ */ jsx(TableCell, { children: "Apex Laptop Riser" }),
|
|
428
|
+
/* @__PURE__ */ jsx(TableCell, { className: "text-right", children: "18" })
|
|
429
|
+
] })
|
|
430
|
+
] })
|
|
431
|
+
] }),
|
|
432
|
+
code: `import { Table, TableHeader, TableBody, TableRow, TableHead, TableCell } from '@open-mercato/ui/primitives/table'
|
|
433
|
+
|
|
434
|
+
<Table variant="striped">
|
|
435
|
+
<TableHeader>
|
|
436
|
+
<TableRow>
|
|
437
|
+
<TableHead>SKU</TableHead>
|
|
438
|
+
<TableHead>Product</TableHead>
|
|
439
|
+
<TableHead className="text-right">Stock</TableHead>
|
|
440
|
+
</TableRow>
|
|
441
|
+
</TableHeader>
|
|
442
|
+
<TableBody>{/* rows */}</TableBody>
|
|
443
|
+
</Table>`
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
id: "with-footer",
|
|
447
|
+
title: "With footer",
|
|
448
|
+
render: () => /* @__PURE__ */ jsxs(Table, { children: [
|
|
449
|
+
/* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
450
|
+
/* @__PURE__ */ jsx(TableHead, { children: "Line" }),
|
|
451
|
+
/* @__PURE__ */ jsx(TableHead, { className: "text-right", children: "Amount" })
|
|
452
|
+
] }) }),
|
|
453
|
+
/* @__PURE__ */ jsxs(TableBody, { children: [
|
|
454
|
+
/* @__PURE__ */ jsxs(TableRow, { children: [
|
|
455
|
+
/* @__PURE__ */ jsx(TableCell, { children: "Subtotal" }),
|
|
456
|
+
/* @__PURE__ */ jsx(TableCell, { className: "text-right", children: "$1,560.50" })
|
|
457
|
+
] }),
|
|
458
|
+
/* @__PURE__ */ jsxs(TableRow, { children: [
|
|
459
|
+
/* @__PURE__ */ jsx(TableCell, { children: "Shipping" }),
|
|
460
|
+
/* @__PURE__ */ jsx(TableCell, { className: "text-right", children: "$24.00" })
|
|
461
|
+
] })
|
|
462
|
+
] }),
|
|
463
|
+
/* @__PURE__ */ jsx(TableFooter, { children: /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
464
|
+
/* @__PURE__ */ jsx(TableCell, { children: "Total" }),
|
|
465
|
+
/* @__PURE__ */ jsx(TableCell, { className: "text-right", children: "$1,584.50" })
|
|
466
|
+
] }) })
|
|
467
|
+
] }),
|
|
468
|
+
code: `import { Table, TableHeader, TableBody, TableFooter, TableRow, TableHead, TableCell } from '@open-mercato/ui/primitives/table'
|
|
469
|
+
|
|
470
|
+
<Table>
|
|
471
|
+
<TableHeader>{/* header row */}</TableHeader>
|
|
472
|
+
<TableBody>{/* body rows */}</TableBody>
|
|
473
|
+
<TableFooter>
|
|
474
|
+
<TableRow>
|
|
475
|
+
<TableCell>Total</TableCell>
|
|
476
|
+
<TableCell className="text-right">$1,584.50</TableCell>
|
|
477
|
+
</TableRow>
|
|
478
|
+
</TableFooter>
|
|
479
|
+
</Table>`
|
|
480
|
+
}
|
|
481
|
+
]
|
|
482
|
+
};
|
|
483
|
+
const cardEntry = {
|
|
484
|
+
id: "card",
|
|
485
|
+
title: "Card",
|
|
486
|
+
importPath: "@open-mercato/ui/primitives/card",
|
|
487
|
+
variants: [
|
|
488
|
+
{
|
|
489
|
+
id: "default",
|
|
490
|
+
title: "default",
|
|
491
|
+
render: () => /* @__PURE__ */ jsxs(Card, { className: "w-full max-w-sm", children: [
|
|
492
|
+
/* @__PURE__ */ jsxs(CardHeader, { children: [
|
|
493
|
+
/* @__PURE__ */ jsx(CardTitle, { children: "Monthly revenue" }),
|
|
494
|
+
/* @__PURE__ */ jsx(CardDescription, { children: "Net revenue across all channels." })
|
|
495
|
+
] }),
|
|
496
|
+
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx("p", { className: "text-2xl font-semibold", children: "$48,210" }) }),
|
|
497
|
+
/* @__PURE__ */ jsx(CardFooter, { children: /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Updated 5 minutes ago" }) })
|
|
498
|
+
] }),
|
|
499
|
+
code: `import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from '@open-mercato/ui/primitives/card'
|
|
500
|
+
|
|
501
|
+
<Card>
|
|
502
|
+
<CardHeader>
|
|
503
|
+
<CardTitle>Monthly revenue</CardTitle>
|
|
504
|
+
<CardDescription>Net revenue across all channels.</CardDescription>
|
|
505
|
+
</CardHeader>
|
|
506
|
+
<CardContent>
|
|
507
|
+
<p className="text-2xl font-semibold">$48,210</p>
|
|
508
|
+
</CardContent>
|
|
509
|
+
<CardFooter>
|
|
510
|
+
<p className="text-sm text-muted-foreground">Updated 5 minutes ago</p>
|
|
511
|
+
</CardFooter>
|
|
512
|
+
</Card>`
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
id: "with-action",
|
|
516
|
+
title: "With action slot",
|
|
517
|
+
render: () => /* @__PURE__ */ jsxs(Card, { className: "w-full max-w-sm", children: [
|
|
518
|
+
/* @__PURE__ */ jsxs(CardHeader, { children: [
|
|
519
|
+
/* @__PURE__ */ jsx(CardTitle, { children: "Team members" }),
|
|
520
|
+
/* @__PURE__ */ jsx(CardDescription, { children: "People with access to this workspace." }),
|
|
521
|
+
/* @__PURE__ */ jsx(CardAction, { children: /* @__PURE__ */ jsx(IconButton, { variant: "ghost", "aria-label": "More", children: /* @__PURE__ */ jsx(MoreHorizontal, {}) }) })
|
|
522
|
+
] }),
|
|
523
|
+
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs(AvatarStack, { max: 3, size: "sm", children: [
|
|
524
|
+
/* @__PURE__ */ jsx(Avatar, { label: "Wei Chen", size: "sm" }),
|
|
525
|
+
/* @__PURE__ */ jsx(Avatar, { label: "Laura Perez", size: "sm" }),
|
|
526
|
+
/* @__PURE__ */ jsx(Avatar, { label: "Omar Haddad", size: "sm" }),
|
|
527
|
+
/* @__PURE__ */ jsx(Avatar, { label: "Ines Kowalska", size: "sm" })
|
|
528
|
+
] }) })
|
|
529
|
+
] }),
|
|
530
|
+
code: `import { MoreHorizontal } from 'lucide-react'
|
|
531
|
+
import { Card, CardHeader, CardTitle, CardDescription, CardAction, CardContent } from '@open-mercato/ui/primitives/card'
|
|
532
|
+
import { IconButton } from '@open-mercato/ui/primitives/icon-button'
|
|
533
|
+
|
|
534
|
+
<Card>
|
|
535
|
+
<CardHeader>
|
|
536
|
+
<CardTitle>Team members</CardTitle>
|
|
537
|
+
<CardDescription>People with access to this workspace.</CardDescription>
|
|
538
|
+
<CardAction>
|
|
539
|
+
<IconButton variant="ghost" aria-label="More"><MoreHorizontal /></IconButton>
|
|
540
|
+
</CardAction>
|
|
541
|
+
</CardHeader>
|
|
542
|
+
<CardContent>{/* content */}</CardContent>
|
|
543
|
+
</Card>`
|
|
544
|
+
}
|
|
545
|
+
]
|
|
546
|
+
};
|
|
547
|
+
const separatorEntry = {
|
|
548
|
+
id: "separator",
|
|
549
|
+
title: "Separator",
|
|
550
|
+
importPath: "@open-mercato/ui/primitives/separator",
|
|
551
|
+
variants: [
|
|
552
|
+
{
|
|
553
|
+
id: "default",
|
|
554
|
+
title: "default",
|
|
555
|
+
render: () => /* @__PURE__ */ jsxs("div", { className: "w-full max-w-sm", children: [
|
|
556
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm", children: "Shipping details" }),
|
|
557
|
+
/* @__PURE__ */ jsx(Separator, { className: "my-3" }),
|
|
558
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Billing details" })
|
|
559
|
+
] }),
|
|
560
|
+
code: `import { Separator } from '@open-mercato/ui/primitives/separator'
|
|
561
|
+
|
|
562
|
+
<Separator className="my-3" />`
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
id: "labeled",
|
|
566
|
+
title: "Labeled",
|
|
567
|
+
render: () => /* @__PURE__ */ jsx("div", { className: "w-full max-w-sm", children: /* @__PURE__ */ jsx(Separator, { label: "OR" }) }),
|
|
568
|
+
code: `import { Separator } from '@open-mercato/ui/primitives/separator'
|
|
569
|
+
|
|
570
|
+
<Separator label="OR" />`
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
id: "section",
|
|
574
|
+
title: "Section header",
|
|
575
|
+
render: () => /* @__PURE__ */ jsx("div", { className: "w-full max-w-sm", children: /* @__PURE__ */ jsx(Separator, { section: true, label: "Amount & account" }) }),
|
|
576
|
+
code: `import { Separator } from '@open-mercato/ui/primitives/separator'
|
|
577
|
+
|
|
578
|
+
<Separator section label="Amount & account" />`
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
id: "dashed",
|
|
582
|
+
title: "Dashed",
|
|
583
|
+
render: () => /* @__PURE__ */ jsx("div", { className: "w-full max-w-sm", children: /* @__PURE__ */ jsx(Separator, { variant: "dashed" }) }),
|
|
584
|
+
code: `import { Separator } from '@open-mercato/ui/primitives/separator'
|
|
585
|
+
|
|
586
|
+
<Separator variant="dashed" />`
|
|
587
|
+
}
|
|
588
|
+
]
|
|
589
|
+
};
|
|
590
|
+
const scrollAreaEntry = {
|
|
591
|
+
id: "scroll-area",
|
|
592
|
+
title: "ScrollArea",
|
|
593
|
+
importPath: "@open-mercato/ui/primitives/scroll-area",
|
|
594
|
+
variants: [
|
|
595
|
+
{
|
|
596
|
+
id: "vertical",
|
|
597
|
+
title: "Vertical",
|
|
598
|
+
render: () => /* @__PURE__ */ jsx(ScrollArea, { className: "h-40 w-full max-w-xs rounded-md border", children: /* @__PURE__ */ jsx("div", { className: "p-3", children: Array.from({ length: 20 }, (_, i) => /* @__PURE__ */ jsxs("p", { className: "border-b py-1.5 text-sm last:border-b-0", children: [
|
|
599
|
+
"Warehouse zone ",
|
|
600
|
+
String.fromCharCode(65 + i % 6),
|
|
601
|
+
"-",
|
|
602
|
+
i + 1
|
|
603
|
+
] }, i)) }) }),
|
|
604
|
+
code: `import { ScrollArea } from '@open-mercato/ui/primitives/scroll-area'
|
|
605
|
+
|
|
606
|
+
<ScrollArea className="h-40 rounded-md border">
|
|
607
|
+
<div className="p-3">
|
|
608
|
+
{zones.map((zone) => (
|
|
609
|
+
<p key={zone.id} className="border-b py-1.5 text-sm last:border-b-0">{zone.name}</p>
|
|
610
|
+
))}
|
|
611
|
+
</div>
|
|
612
|
+
</ScrollArea>`
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
id: "horizontal",
|
|
616
|
+
title: "Horizontal",
|
|
617
|
+
render: () => /* @__PURE__ */ jsx(ScrollArea, { scrollbars: "horizontal", className: "w-full max-w-xs rounded-md border", children: /* @__PURE__ */ jsx("div", { className: "flex w-max gap-2 p-3", children: Array.from({ length: 12 }, (_, i) => /* @__PURE__ */ jsxs(Tag, { variant: "neutral", shape: "square", children: [
|
|
618
|
+
"Channel ",
|
|
619
|
+
i + 1
|
|
620
|
+
] }, i)) }) }),
|
|
621
|
+
code: `import { ScrollArea } from '@open-mercato/ui/primitives/scroll-area'
|
|
622
|
+
import { Tag } from '@open-mercato/ui/primitives/tag'
|
|
623
|
+
|
|
624
|
+
<ScrollArea scrollbars="horizontal" className="max-w-xs rounded-md border">
|
|
625
|
+
<div className="flex w-max gap-2 p-3">
|
|
626
|
+
{channels.map((channel) => (
|
|
627
|
+
<Tag key={channel.id} variant="neutral" shape="square">{channel.name}</Tag>
|
|
628
|
+
))}
|
|
629
|
+
</div>
|
|
630
|
+
</ScrollArea>`
|
|
631
|
+
}
|
|
632
|
+
]
|
|
633
|
+
};
|
|
634
|
+
const activityFeedEntry = {
|
|
635
|
+
id: "activity-feed",
|
|
636
|
+
title: "ActivityFeed",
|
|
637
|
+
importPath: "@open-mercato/ui/primitives/activity-feed",
|
|
638
|
+
variants: [
|
|
639
|
+
{
|
|
640
|
+
id: "basic",
|
|
641
|
+
title: "Basic entries",
|
|
642
|
+
render: () => /* @__PURE__ */ jsxs(ActivityFeed, { className: "w-full max-w-md", children: [
|
|
643
|
+
/* @__PURE__ */ jsx(
|
|
644
|
+
ActivityFeedItem,
|
|
645
|
+
{
|
|
646
|
+
avatar: /* @__PURE__ */ jsx(Avatar, { label: "Wei Chen", size: "sm" }),
|
|
647
|
+
title: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
648
|
+
"Wei Chen ",
|
|
649
|
+
/* @__PURE__ */ jsx("span", { className: "font-normal text-muted-foreground", children: "created" }),
|
|
650
|
+
" Order #1042"
|
|
651
|
+
] }),
|
|
652
|
+
timestamp: "4 min ago"
|
|
653
|
+
}
|
|
654
|
+
),
|
|
655
|
+
/* @__PURE__ */ jsx(
|
|
656
|
+
ActivityFeedItem,
|
|
657
|
+
{
|
|
658
|
+
avatar: /* @__PURE__ */ jsx(Avatar, { label: "Laura Perez", size: "sm" }),
|
|
659
|
+
title: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
660
|
+
"Laura Perez ",
|
|
661
|
+
/* @__PURE__ */ jsx("span", { className: "font-normal text-muted-foreground", children: "updated the shipping address" })
|
|
662
|
+
] }),
|
|
663
|
+
timestamp: "1 hour ago",
|
|
664
|
+
actions: /* @__PURE__ */ jsx(IconButton, { variant: "ghost", size: "sm", "aria-label": "More", children: /* @__PURE__ */ jsx(MoreHorizontal, {}) })
|
|
665
|
+
}
|
|
666
|
+
)
|
|
667
|
+
] }),
|
|
668
|
+
code: `import { ActivityFeed, ActivityFeedItem } from '@open-mercato/ui/primitives/activity-feed'
|
|
669
|
+
import { Avatar } from '@open-mercato/ui/primitives/avatar'
|
|
670
|
+
|
|
671
|
+
<ActivityFeed>
|
|
672
|
+
<ActivityFeedItem
|
|
673
|
+
avatar={<Avatar label="Wei Chen" size="sm" />}
|
|
674
|
+
title={<>Wei Chen <span className="font-normal text-muted-foreground">created</span> Order #1042</>}
|
|
675
|
+
timestamp="4 min ago"
|
|
676
|
+
/>
|
|
677
|
+
</ActivityFeed>`
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
id: "with-attachment",
|
|
681
|
+
title: "File attachment",
|
|
682
|
+
render: () => /* @__PURE__ */ jsx(ActivityFeed, { className: "w-full max-w-md", children: /* @__PURE__ */ jsx(
|
|
683
|
+
ActivityFeedItem,
|
|
684
|
+
{
|
|
685
|
+
avatar: /* @__PURE__ */ jsx(Avatar, { label: "Omar Haddad", size: "sm" }),
|
|
686
|
+
title: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
687
|
+
"Omar Haddad ",
|
|
688
|
+
/* @__PURE__ */ jsx("span", { className: "font-normal text-muted-foreground", children: "uploaded" }),
|
|
689
|
+
" Q2 financial report"
|
|
690
|
+
] }),
|
|
691
|
+
timestamp: "2 days ago",
|
|
692
|
+
children: /* @__PURE__ */ jsx(ActivityFeedFileChip, { name: "apex-report.pdf", size: "4mb", onDownload: () => {
|
|
693
|
+
} })
|
|
694
|
+
}
|
|
695
|
+
) }),
|
|
696
|
+
code: `import { ActivityFeed, ActivityFeedItem, ActivityFeedFileChip } from '@open-mercato/ui/primitives/activity-feed'
|
|
697
|
+
import { Avatar } from '@open-mercato/ui/primitives/avatar'
|
|
698
|
+
|
|
699
|
+
<ActivityFeedItem
|
|
700
|
+
avatar={<Avatar label="Omar Haddad" size="sm" />}
|
|
701
|
+
title={<>Omar Haddad <span className="font-normal text-muted-foreground">uploaded</span> Q2 financial report</>}
|
|
702
|
+
timestamp="2 days ago"
|
|
703
|
+
>
|
|
704
|
+
<ActivityFeedFileChip name="apex-report.pdf" size="4mb" onDownload={() => download()} />
|
|
705
|
+
</ActivityFeedItem>`
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
id: "with-comment",
|
|
709
|
+
title: "Comment",
|
|
710
|
+
render: () => /* @__PURE__ */ jsx(ActivityFeed, { className: "w-full max-w-md", children: /* @__PURE__ */ jsx(
|
|
711
|
+
ActivityFeedItem,
|
|
712
|
+
{
|
|
713
|
+
avatar: /* @__PURE__ */ jsx(Avatar, { label: "Ines Kowalska", size: "sm" }),
|
|
714
|
+
title: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
715
|
+
"Ines Kowalska ",
|
|
716
|
+
/* @__PURE__ */ jsx("span", { className: "font-normal text-muted-foreground", children: "commented" })
|
|
717
|
+
] }),
|
|
718
|
+
timestamp: "6 days ago",
|
|
719
|
+
children: /* @__PURE__ */ jsx(ActivityFeedComment, { onReply: () => {
|
|
720
|
+
}, children: "Please revise the risk metrics before Friday." })
|
|
721
|
+
}
|
|
722
|
+
) }),
|
|
723
|
+
code: `import { ActivityFeed, ActivityFeedItem, ActivityFeedComment } from '@open-mercato/ui/primitives/activity-feed'
|
|
724
|
+
import { Avatar } from '@open-mercato/ui/primitives/avatar'
|
|
725
|
+
|
|
726
|
+
<ActivityFeedItem
|
|
727
|
+
avatar={<Avatar label="Ines Kowalska" size="sm" />}
|
|
728
|
+
title={<>Ines Kowalska <span className="font-normal text-muted-foreground">commented</span></>}
|
|
729
|
+
timestamp="6 days ago"
|
|
730
|
+
>
|
|
731
|
+
<ActivityFeedComment onReply={() => reply()}>
|
|
732
|
+
Please revise the risk metrics before Friday.
|
|
733
|
+
</ActivityFeedComment>
|
|
734
|
+
</ActivityFeedItem>`
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
id: "status-chips",
|
|
738
|
+
title: "Status chips",
|
|
739
|
+
render: () => /* @__PURE__ */ jsx(ActivityFeed, { className: "w-full max-w-md", children: /* @__PURE__ */ jsxs(
|
|
740
|
+
ActivityFeedItem,
|
|
741
|
+
{
|
|
742
|
+
avatar: /* @__PURE__ */ jsx(Avatar, { label: "Ravi Patel", size: "sm" }),
|
|
743
|
+
title: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
744
|
+
"Ravi Patel ",
|
|
745
|
+
/* @__PURE__ */ jsx("span", { className: "font-normal text-muted-foreground", children: "moved 3 tasks" })
|
|
746
|
+
] }),
|
|
747
|
+
timestamp: "1 week ago",
|
|
748
|
+
children: [
|
|
749
|
+
/* @__PURE__ */ jsx(ActivityFeedStatusChip, { status: "success", children: "Approved" }),
|
|
750
|
+
/* @__PURE__ */ jsx(ActivityFeedStatusChip, { status: "warning", children: "Needs review" }),
|
|
751
|
+
/* @__PURE__ */ jsx(ActivityFeedStatusChip, { status: "error", children: "Blocked" })
|
|
752
|
+
]
|
|
753
|
+
}
|
|
754
|
+
) }),
|
|
755
|
+
code: `import { ActivityFeed, ActivityFeedItem, ActivityFeedStatusChip } from '@open-mercato/ui/primitives/activity-feed'
|
|
756
|
+
import { Avatar } from '@open-mercato/ui/primitives/avatar'
|
|
757
|
+
|
|
758
|
+
<ActivityFeedItem
|
|
759
|
+
avatar={<Avatar label="Ravi Patel" size="sm" />}
|
|
760
|
+
title={<>Ravi Patel <span className="font-normal text-muted-foreground">moved 3 tasks</span></>}
|
|
761
|
+
timestamp="1 week ago"
|
|
762
|
+
>
|
|
763
|
+
<ActivityFeedStatusChip status="success">Approved</ActivityFeedStatusChip>
|
|
764
|
+
<ActivityFeedStatusChip status="warning">Needs review</ActivityFeedStatusChip>
|
|
765
|
+
<ActivityFeedStatusChip status="error">Blocked</ActivityFeedStatusChip>
|
|
766
|
+
</ActivityFeedItem>`
|
|
767
|
+
}
|
|
768
|
+
]
|
|
769
|
+
};
|
|
770
|
+
const entries = [
|
|
771
|
+
badgeEntry,
|
|
772
|
+
statusBadgeEntry,
|
|
773
|
+
tagEntry,
|
|
774
|
+
avatarEntry,
|
|
775
|
+
kbdEntry,
|
|
776
|
+
tableEntry,
|
|
777
|
+
cardEntry,
|
|
778
|
+
separatorEntry,
|
|
779
|
+
scrollAreaEntry,
|
|
780
|
+
activityFeedEntry
|
|
781
|
+
];
|
|
782
|
+
export {
|
|
783
|
+
entries
|
|
784
|
+
};
|
|
785
|
+
//# sourceMappingURL=display.js.map
|