@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,746 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { Inbox, RefreshCw, Search, Settings, UserPlus } from 'lucide-react'
|
|
3
|
+
import { Alert, AlertDescription, AlertTitle } from '@open-mercato/ui/primitives/alert'
|
|
4
|
+
import { EmptyState } from '@open-mercato/ui/primitives/empty-state'
|
|
5
|
+
import { Skeleton } from '@open-mercato/ui/primitives/skeleton'
|
|
6
|
+
import { CircularProgress, Progress } from '@open-mercato/ui/primitives/progress'
|
|
7
|
+
import { Spinner } from '@open-mercato/ui/primitives/spinner'
|
|
8
|
+
import { Rating } from '@open-mercato/ui/primitives/rating'
|
|
9
|
+
import { StepIndicator, type StepIndicatorStep } from '@open-mercato/ui/primitives/step-indicator'
|
|
10
|
+
import { Notification } from '@open-mercato/ui/primitives/notification'
|
|
11
|
+
import {
|
|
12
|
+
NotificationFeed,
|
|
13
|
+
NotificationFeedFooter,
|
|
14
|
+
NotificationFeedHeader,
|
|
15
|
+
NotificationFeedIconBadge,
|
|
16
|
+
NotificationFeedItem,
|
|
17
|
+
NotificationFeedList,
|
|
18
|
+
} from '@open-mercato/ui/primitives/notification-feed'
|
|
19
|
+
import { Button } from '@open-mercato/ui/primitives/button'
|
|
20
|
+
import { IconButton } from '@open-mercato/ui/primitives/icon-button'
|
|
21
|
+
import { LinkButton } from '@open-mercato/ui/primitives/link-button'
|
|
22
|
+
import type { GalleryEntry } from '../types'
|
|
23
|
+
|
|
24
|
+
// Component titles and variant names are proper nouns from the codebase and
|
|
25
|
+
// are deliberately not translated. `code` MUST contain the entry's importPath
|
|
26
|
+
// (enforced by the registry-integrity test) and is always reviewed alongside
|
|
27
|
+
// its sibling `render`.
|
|
28
|
+
|
|
29
|
+
const alertEntry: GalleryEntry = {
|
|
30
|
+
id: 'alert',
|
|
31
|
+
title: 'Alert',
|
|
32
|
+
importPath: '@open-mercato/ui/primitives/alert',
|
|
33
|
+
usage: {
|
|
34
|
+
do: [
|
|
35
|
+
'Current API only: status (error/warning/success/information/feature) + style (filled/light/lighter/stroke) + size.',
|
|
36
|
+
'light/lighter for inline page notices; filled for high-emphasis moments.',
|
|
37
|
+
],
|
|
38
|
+
dont: ['The legacy variant prop is deprecated — lint flags it.', 'Never build ad-hoc colored notice boxes; this is the primitive for them.'],
|
|
39
|
+
},
|
|
40
|
+
variants: [
|
|
41
|
+
{
|
|
42
|
+
id: 'statuses-light',
|
|
43
|
+
title: 'Statuses (light)',
|
|
44
|
+
render: () => (
|
|
45
|
+
<div className="flex w-full max-w-md flex-col gap-2">
|
|
46
|
+
<Alert status="error" style="light">Payment failed — the card was declined.</Alert>
|
|
47
|
+
<Alert status="warning" style="light">Inventory sync is running behind schedule.</Alert>
|
|
48
|
+
<Alert status="success" style="light">Order #10231 was fulfilled.</Alert>
|
|
49
|
+
<Alert status="information" style="light">Prices include VAT for EU customers.</Alert>
|
|
50
|
+
<Alert status="feature" style="light">Bulk editing is now available in the catalog.</Alert>
|
|
51
|
+
</div>
|
|
52
|
+
),
|
|
53
|
+
code: `import { Alert } from '@open-mercato/ui/primitives/alert'
|
|
54
|
+
|
|
55
|
+
<Alert status="error" style="light">Payment failed — the card was declined.</Alert>
|
|
56
|
+
<Alert status="warning" style="light">Inventory sync is running behind schedule.</Alert>
|
|
57
|
+
<Alert status="success" style="light">Order #10231 was fulfilled.</Alert>
|
|
58
|
+
<Alert status="information" style="light">Prices include VAT for EU customers.</Alert>
|
|
59
|
+
<Alert status="feature" style="light">Bulk editing is now available in the catalog.</Alert>`,
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
id: 'filled',
|
|
63
|
+
title: 'filled',
|
|
64
|
+
render: () => (
|
|
65
|
+
<div className="w-full max-w-md">
|
|
66
|
+
<Alert status="error" style="filled" size="default">
|
|
67
|
+
<AlertTitle>Import failed</AlertTitle>
|
|
68
|
+
<AlertDescription>14 rows were rejected — download the error report to review them.</AlertDescription>
|
|
69
|
+
</Alert>
|
|
70
|
+
</div>
|
|
71
|
+
),
|
|
72
|
+
code: `import { Alert, AlertDescription, AlertTitle } from '@open-mercato/ui/primitives/alert'
|
|
73
|
+
|
|
74
|
+
<Alert status="error" style="filled" size="default">
|
|
75
|
+
<AlertTitle>Import failed</AlertTitle>
|
|
76
|
+
<AlertDescription>14 rows were rejected — download the error report to review them.</AlertDescription>
|
|
77
|
+
</Alert>`,
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: 'stroke',
|
|
81
|
+
title: 'stroke',
|
|
82
|
+
render: () => (
|
|
83
|
+
<div className="w-full max-w-md">
|
|
84
|
+
<Alert status="success" style="stroke" size="default">
|
|
85
|
+
<AlertTitle>Backup complete</AlertTitle>
|
|
86
|
+
<AlertDescription>The nightly snapshot finished without warnings.</AlertDescription>
|
|
87
|
+
</Alert>
|
|
88
|
+
</div>
|
|
89
|
+
),
|
|
90
|
+
code: `import { Alert, AlertDescription, AlertTitle } from '@open-mercato/ui/primitives/alert'
|
|
91
|
+
|
|
92
|
+
<Alert status="success" style="stroke" size="default">
|
|
93
|
+
<AlertTitle>Backup complete</AlertTitle>
|
|
94
|
+
<AlertDescription>The nightly snapshot finished without warnings.</AlertDescription>
|
|
95
|
+
</Alert>`,
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
id: 'sizes',
|
|
99
|
+
title: 'Sizes',
|
|
100
|
+
render: () => (
|
|
101
|
+
<div className="flex w-full max-w-md flex-col gap-2">
|
|
102
|
+
<Alert status="information" size="xs">X-Small — inline form hint.</Alert>
|
|
103
|
+
<Alert status="information" size="sm">Small — the default single-line alert.</Alert>
|
|
104
|
+
<Alert status="information" size="default">
|
|
105
|
+
<AlertTitle>Large</AlertTitle>
|
|
106
|
+
<AlertDescription>Multi-line alert with a title and a description body.</AlertDescription>
|
|
107
|
+
</Alert>
|
|
108
|
+
</div>
|
|
109
|
+
),
|
|
110
|
+
code: `import { Alert, AlertDescription, AlertTitle } from '@open-mercato/ui/primitives/alert'
|
|
111
|
+
|
|
112
|
+
<Alert status="information" size="xs">X-Small — inline form hint.</Alert>
|
|
113
|
+
<Alert status="information" size="sm">Small — the default single-line alert.</Alert>
|
|
114
|
+
<Alert status="information" size="default">
|
|
115
|
+
<AlertTitle>Large</AlertTitle>
|
|
116
|
+
<AlertDescription>Multi-line alert with a title and a description body.</AlertDescription>
|
|
117
|
+
</Alert>`,
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
id: 'dismissible-with-action',
|
|
121
|
+
title: 'Dismissible with action',
|
|
122
|
+
render: () => (
|
|
123
|
+
<div className="w-full max-w-md">
|
|
124
|
+
<Alert
|
|
125
|
+
status="warning"
|
|
126
|
+
style="lighter"
|
|
127
|
+
dismissible
|
|
128
|
+
action={<LinkButton variant="black" underline="always">Review</LinkButton>}
|
|
129
|
+
>
|
|
130
|
+
3 products are missing tax categories.
|
|
131
|
+
</Alert>
|
|
132
|
+
</div>
|
|
133
|
+
),
|
|
134
|
+
code: `import { Alert } from '@open-mercato/ui/primitives/alert'
|
|
135
|
+
import { LinkButton } from '@open-mercato/ui/primitives/link-button'
|
|
136
|
+
|
|
137
|
+
<Alert
|
|
138
|
+
status="warning"
|
|
139
|
+
style="lighter"
|
|
140
|
+
dismissible
|
|
141
|
+
onDismiss={() => setVisible(false)}
|
|
142
|
+
action={<LinkButton variant="black" underline="always">Review</LinkButton>}
|
|
143
|
+
>
|
|
144
|
+
3 products are missing tax categories.
|
|
145
|
+
</Alert>`,
|
|
146
|
+
},
|
|
147
|
+
],
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
const emptyStateEntry: GalleryEntry = {
|
|
151
|
+
id: 'empty-state',
|
|
152
|
+
title: 'EmptyState',
|
|
153
|
+
importPath: '@open-mercato/ui/primitives/empty-state',
|
|
154
|
+
variants: [
|
|
155
|
+
{
|
|
156
|
+
id: 'default',
|
|
157
|
+
title: 'default',
|
|
158
|
+
render: () => (
|
|
159
|
+
<div className="w-full max-w-md">
|
|
160
|
+
<EmptyState
|
|
161
|
+
title="No customers yet"
|
|
162
|
+
description="Create your first customer to start tracking opportunities."
|
|
163
|
+
/>
|
|
164
|
+
</div>
|
|
165
|
+
),
|
|
166
|
+
code: `import { EmptyState } from '@open-mercato/ui/primitives/empty-state'
|
|
167
|
+
|
|
168
|
+
<EmptyState
|
|
169
|
+
title="No customers yet"
|
|
170
|
+
description="Create your first customer to start tracking opportunities."
|
|
171
|
+
/>`,
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
id: 'with-actions',
|
|
175
|
+
title: 'With icon and actions',
|
|
176
|
+
render: () => (
|
|
177
|
+
<div className="w-full max-w-md">
|
|
178
|
+
<EmptyState
|
|
179
|
+
icon={<Inbox className="size-8" />}
|
|
180
|
+
title="No orders found"
|
|
181
|
+
description="Orders will appear here once your storefront starts selling."
|
|
182
|
+
actions={<Button size="sm">Create order</Button>}
|
|
183
|
+
/>
|
|
184
|
+
</div>
|
|
185
|
+
),
|
|
186
|
+
code: `import { Inbox } from 'lucide-react'
|
|
187
|
+
import { EmptyState } from '@open-mercato/ui/primitives/empty-state'
|
|
188
|
+
import { Button } from '@open-mercato/ui/primitives/button'
|
|
189
|
+
|
|
190
|
+
<EmptyState
|
|
191
|
+
icon={<Inbox className="size-8" />}
|
|
192
|
+
title="No orders found"
|
|
193
|
+
description="Orders will appear here once your storefront starts selling."
|
|
194
|
+
actions={<Button size="sm">Create order</Button>}
|
|
195
|
+
/>`,
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
id: 'subtle',
|
|
199
|
+
title: 'subtle',
|
|
200
|
+
render: () => (
|
|
201
|
+
<div className="w-full max-w-md">
|
|
202
|
+
<EmptyState
|
|
203
|
+
variant="subtle"
|
|
204
|
+
size="sm"
|
|
205
|
+
icon={<Search className="size-5" />}
|
|
206
|
+
title="No results"
|
|
207
|
+
description="Try a different search term or clear the filters."
|
|
208
|
+
/>
|
|
209
|
+
</div>
|
|
210
|
+
),
|
|
211
|
+
code: `import { Search } from 'lucide-react'
|
|
212
|
+
import { EmptyState } from '@open-mercato/ui/primitives/empty-state'
|
|
213
|
+
|
|
214
|
+
<EmptyState
|
|
215
|
+
variant="subtle"
|
|
216
|
+
size="sm"
|
|
217
|
+
icon={<Search className="size-5" />}
|
|
218
|
+
title="No results"
|
|
219
|
+
description="Try a different search term or clear the filters."
|
|
220
|
+
/>`,
|
|
221
|
+
},
|
|
222
|
+
],
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
const skeletonEntry: GalleryEntry = {
|
|
226
|
+
id: 'skeleton',
|
|
227
|
+
title: 'Skeleton',
|
|
228
|
+
importPath: '@open-mercato/ui/primitives/skeleton',
|
|
229
|
+
variants: [
|
|
230
|
+
{
|
|
231
|
+
id: 'shapes',
|
|
232
|
+
title: 'Shapes',
|
|
233
|
+
render: () => (
|
|
234
|
+
<div className="flex w-full max-w-md items-center gap-4">
|
|
235
|
+
<Skeleton shape="circle" className="size-10" />
|
|
236
|
+
<Skeleton className="h-8 w-24" />
|
|
237
|
+
<Skeleton className="h-8 flex-1" />
|
|
238
|
+
</div>
|
|
239
|
+
),
|
|
240
|
+
code: `import { Skeleton } from '@open-mercato/ui/primitives/skeleton'
|
|
241
|
+
|
|
242
|
+
<Skeleton shape="circle" className="size-10" />
|
|
243
|
+
<Skeleton className="h-8 w-24" />
|
|
244
|
+
<Skeleton className="h-8 flex-1" />`,
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
id: 'text-lines',
|
|
248
|
+
title: 'Text lines',
|
|
249
|
+
render: () => (
|
|
250
|
+
<div className="w-full max-w-md">
|
|
251
|
+
<Skeleton shape="text" lines={3} />
|
|
252
|
+
</div>
|
|
253
|
+
),
|
|
254
|
+
code: `import { Skeleton } from '@open-mercato/ui/primitives/skeleton'
|
|
255
|
+
|
|
256
|
+
<Skeleton shape="text" lines={3} />`,
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
id: 'card-placeholder',
|
|
260
|
+
title: 'Card placeholder',
|
|
261
|
+
render: () => (
|
|
262
|
+
<div className="flex w-full max-w-md items-start gap-3 rounded-lg border border-border p-4">
|
|
263
|
+
<Skeleton shape="circle" className="size-12" />
|
|
264
|
+
<div className="flex-1 space-y-2">
|
|
265
|
+
<Skeleton className="h-4 w-1/3" />
|
|
266
|
+
<Skeleton shape="text" lines={2} />
|
|
267
|
+
</div>
|
|
268
|
+
</div>
|
|
269
|
+
),
|
|
270
|
+
code: `import { Skeleton } from '@open-mercato/ui/primitives/skeleton'
|
|
271
|
+
|
|
272
|
+
<div className="flex items-start gap-3 rounded-lg border border-border p-4">
|
|
273
|
+
<Skeleton shape="circle" className="size-12" />
|
|
274
|
+
<div className="flex-1 space-y-2">
|
|
275
|
+
<Skeleton className="h-4 w-1/3" />
|
|
276
|
+
<Skeleton shape="text" lines={2} />
|
|
277
|
+
</div>
|
|
278
|
+
</div>`,
|
|
279
|
+
},
|
|
280
|
+
],
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
const progressEntry: GalleryEntry = {
|
|
284
|
+
id: 'progress',
|
|
285
|
+
title: 'Progress',
|
|
286
|
+
importPath: '@open-mercato/ui/primitives/progress',
|
|
287
|
+
variants: [
|
|
288
|
+
{
|
|
289
|
+
id: 'basic',
|
|
290
|
+
title: 'Basic',
|
|
291
|
+
render: () => (
|
|
292
|
+
<div className="w-full max-w-md">
|
|
293
|
+
<Progress value={50} />
|
|
294
|
+
</div>
|
|
295
|
+
),
|
|
296
|
+
code: `import { Progress } from '@open-mercato/ui/primitives/progress'
|
|
297
|
+
|
|
298
|
+
<Progress value={50} />`,
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
id: 'labelled',
|
|
302
|
+
title: 'Labelled',
|
|
303
|
+
render: () => (
|
|
304
|
+
<div className="w-full max-w-md">
|
|
305
|
+
<Progress
|
|
306
|
+
value={80}
|
|
307
|
+
label="Data storage"
|
|
308
|
+
showValue
|
|
309
|
+
description="Upgrade to unlock unlimited storage."
|
|
310
|
+
/>
|
|
311
|
+
</div>
|
|
312
|
+
),
|
|
313
|
+
code: `import { Progress } from '@open-mercato/ui/primitives/progress'
|
|
314
|
+
|
|
315
|
+
<Progress
|
|
316
|
+
value={80}
|
|
317
|
+
label="Data storage"
|
|
318
|
+
showValue
|
|
319
|
+
description="Upgrade to unlock unlimited storage."
|
|
320
|
+
/>`,
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
id: 'tones',
|
|
324
|
+
title: 'Tones',
|
|
325
|
+
render: () => (
|
|
326
|
+
<div className="flex w-full max-w-md flex-col gap-3">
|
|
327
|
+
<Progress value={42} tone="accent" />
|
|
328
|
+
<Progress value={42} tone="success" />
|
|
329
|
+
<Progress value={42} tone="warning" />
|
|
330
|
+
<Progress value={42} tone="destructive" />
|
|
331
|
+
<Progress value={42} tone="muted" />
|
|
332
|
+
</div>
|
|
333
|
+
),
|
|
334
|
+
code: `import { Progress } from '@open-mercato/ui/primitives/progress'
|
|
335
|
+
|
|
336
|
+
<Progress value={42} tone="accent" />
|
|
337
|
+
<Progress value={42} tone="success" />
|
|
338
|
+
<Progress value={42} tone="warning" />
|
|
339
|
+
<Progress value={42} tone="destructive" />
|
|
340
|
+
<Progress value={42} tone="muted" />`,
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
id: 'circular',
|
|
344
|
+
title: 'CircularProgress',
|
|
345
|
+
render: () => (
|
|
346
|
+
<>
|
|
347
|
+
<CircularProgress value={75} size="lg" showValue />
|
|
348
|
+
<CircularProgress value={75} size="default" showValue />
|
|
349
|
+
<CircularProgress value={75} size="sm" />
|
|
350
|
+
<CircularProgress value={75} size="xs" />
|
|
351
|
+
<CircularProgress value={100} tone="success" showValue />
|
|
352
|
+
</>
|
|
353
|
+
),
|
|
354
|
+
code: `import { CircularProgress } from '@open-mercato/ui/primitives/progress'
|
|
355
|
+
|
|
356
|
+
<CircularProgress value={75} size="lg" showValue />
|
|
357
|
+
<CircularProgress value={75} size="default" showValue />
|
|
358
|
+
<CircularProgress value={75} size="sm" />
|
|
359
|
+
<CircularProgress value={75} size="xs" />
|
|
360
|
+
<CircularProgress value={100} tone="success" showValue />`,
|
|
361
|
+
},
|
|
362
|
+
],
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
const spinnerEntry: GalleryEntry = {
|
|
366
|
+
id: 'spinner',
|
|
367
|
+
title: 'Spinner',
|
|
368
|
+
importPath: '@open-mercato/ui/primitives/spinner',
|
|
369
|
+
variants: [
|
|
370
|
+
{
|
|
371
|
+
id: 'sizes',
|
|
372
|
+
title: 'Sizes',
|
|
373
|
+
render: () => (
|
|
374
|
+
<>
|
|
375
|
+
<Spinner size="sm" />
|
|
376
|
+
<Spinner size="md" />
|
|
377
|
+
<Spinner size="lg" />
|
|
378
|
+
</>
|
|
379
|
+
),
|
|
380
|
+
code: `import { Spinner } from '@open-mercato/ui/primitives/spinner'
|
|
381
|
+
|
|
382
|
+
<Spinner size="sm" />
|
|
383
|
+
<Spinner size="md" />
|
|
384
|
+
<Spinner size="lg" />`,
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
id: 'inline-with-label',
|
|
388
|
+
title: 'Inline with label',
|
|
389
|
+
render: () => (
|
|
390
|
+
<span className="inline-flex items-center gap-2 text-sm text-muted-foreground">
|
|
391
|
+
<Spinner size="sm" />
|
|
392
|
+
Loading orders…
|
|
393
|
+
</span>
|
|
394
|
+
),
|
|
395
|
+
code: `import { Spinner } from '@open-mercato/ui/primitives/spinner'
|
|
396
|
+
|
|
397
|
+
<span className="inline-flex items-center gap-2 text-sm text-muted-foreground">
|
|
398
|
+
<Spinner size="sm" />
|
|
399
|
+
Loading orders…
|
|
400
|
+
</span>`,
|
|
401
|
+
},
|
|
402
|
+
],
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
function InteractiveRatingDemo() {
|
|
406
|
+
const [value, setValue] = React.useState(3)
|
|
407
|
+
return <Rating value={value} onChange={setValue} aria-label="Your rating" />
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
const ratingEntry: GalleryEntry = {
|
|
411
|
+
id: 'rating',
|
|
412
|
+
title: 'Rating',
|
|
413
|
+
importPath: '@open-mercato/ui/primitives/rating',
|
|
414
|
+
variants: [
|
|
415
|
+
{
|
|
416
|
+
id: 'read-only',
|
|
417
|
+
title: 'Read-only',
|
|
418
|
+
render: () => <Rating value={4} max={5} />,
|
|
419
|
+
code: `import { Rating } from '@open-mercato/ui/primitives/rating'
|
|
420
|
+
|
|
421
|
+
<Rating value={4} max={5} />`,
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
id: 'half-precision',
|
|
425
|
+
title: 'Half precision',
|
|
426
|
+
render: () => <Rating value={3.5} max={5} allowHalf />,
|
|
427
|
+
code: `import { Rating } from '@open-mercato/ui/primitives/rating'
|
|
428
|
+
|
|
429
|
+
<Rating value={3.5} max={5} allowHalf />`,
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
id: 'interactive',
|
|
433
|
+
title: 'Interactive',
|
|
434
|
+
render: () => <InteractiveRatingDemo />,
|
|
435
|
+
code: `import { Rating } from '@open-mercato/ui/primitives/rating'
|
|
436
|
+
|
|
437
|
+
const [value, setValue] = React.useState(3)
|
|
438
|
+
|
|
439
|
+
<Rating value={value} onChange={setValue} aria-label="Your rating" />`,
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
id: 'icons-and-sizes',
|
|
443
|
+
title: 'Icons and sizes',
|
|
444
|
+
render: () => (
|
|
445
|
+
<>
|
|
446
|
+
<Rating value={3} max={5} icon="heart" />
|
|
447
|
+
<Rating value={3} max={5} icon="circle" size="sm" />
|
|
448
|
+
<Rating value={3} max={5} size="lg" />
|
|
449
|
+
</>
|
|
450
|
+
),
|
|
451
|
+
code: `import { Rating } from '@open-mercato/ui/primitives/rating'
|
|
452
|
+
|
|
453
|
+
<Rating value={3} max={5} icon="heart" />
|
|
454
|
+
<Rating value={3} max={5} icon="circle" size="sm" />
|
|
455
|
+
<Rating value={3} max={5} size="lg" />`,
|
|
456
|
+
},
|
|
457
|
+
],
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
const wizardSteps: StepIndicatorStep[] = [
|
|
461
|
+
{ id: 'account', label: 'Account', status: 'complete' },
|
|
462
|
+
{ id: 'profile', label: 'Profile', status: 'current' },
|
|
463
|
+
{ id: 'review', label: 'Review', status: 'pending' },
|
|
464
|
+
]
|
|
465
|
+
|
|
466
|
+
const verticalSteps: StepIndicatorStep[] = [
|
|
467
|
+
{ id: 'details', label: 'Store details', description: 'Name, currency, region', status: 'complete' },
|
|
468
|
+
{ id: 'payments', label: 'Payments', description: 'Connect a payment provider', status: 'current' },
|
|
469
|
+
{ id: 'shipping', label: 'Shipping', description: 'Zones and carriers', status: 'pending' },
|
|
470
|
+
]
|
|
471
|
+
|
|
472
|
+
const errorSteps: StepIndicatorStep[] = [
|
|
473
|
+
{ id: 'upload', label: 'Upload file', status: 'complete' },
|
|
474
|
+
{ id: 'validate', label: 'Validation', status: 'error' },
|
|
475
|
+
{ id: 'import', label: 'Import', status: 'pending' },
|
|
476
|
+
]
|
|
477
|
+
|
|
478
|
+
const stepIndicatorEntry: GalleryEntry = {
|
|
479
|
+
id: 'step-indicator',
|
|
480
|
+
title: 'StepIndicator',
|
|
481
|
+
importPath: '@open-mercato/ui/primitives/step-indicator',
|
|
482
|
+
variants: [
|
|
483
|
+
{
|
|
484
|
+
id: 'horizontal',
|
|
485
|
+
title: 'Horizontal',
|
|
486
|
+
render: () => <StepIndicator steps={wizardSteps} />,
|
|
487
|
+
code: `import { StepIndicator, type StepIndicatorStep } from '@open-mercato/ui/primitives/step-indicator'
|
|
488
|
+
|
|
489
|
+
const steps: StepIndicatorStep[] = [
|
|
490
|
+
{ id: 'account', label: 'Account', status: 'complete' },
|
|
491
|
+
{ id: 'profile', label: 'Profile', status: 'current' },
|
|
492
|
+
{ id: 'review', label: 'Review', status: 'pending' },
|
|
493
|
+
]
|
|
494
|
+
|
|
495
|
+
<StepIndicator steps={steps} />`,
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
id: 'vertical',
|
|
499
|
+
title: 'Vertical with descriptions',
|
|
500
|
+
render: () => (
|
|
501
|
+
<div className="w-full max-w-xs">
|
|
502
|
+
<StepIndicator steps={verticalSteps} orientation="vertical" />
|
|
503
|
+
</div>
|
|
504
|
+
),
|
|
505
|
+
code: `import { StepIndicator, type StepIndicatorStep } from '@open-mercato/ui/primitives/step-indicator'
|
|
506
|
+
|
|
507
|
+
const steps: StepIndicatorStep[] = [
|
|
508
|
+
{ id: 'details', label: 'Store details', description: 'Name, currency, region', status: 'complete' },
|
|
509
|
+
{ id: 'payments', label: 'Payments', description: 'Connect a payment provider', status: 'current' },
|
|
510
|
+
{ id: 'shipping', label: 'Shipping', description: 'Zones and carriers', status: 'pending' },
|
|
511
|
+
]
|
|
512
|
+
|
|
513
|
+
<StepIndicator steps={steps} orientation="vertical" />`,
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
id: 'error-state',
|
|
517
|
+
title: 'Error state',
|
|
518
|
+
render: () => <StepIndicator steps={errorSteps} />,
|
|
519
|
+
code: `import { StepIndicator, type StepIndicatorStep } from '@open-mercato/ui/primitives/step-indicator'
|
|
520
|
+
|
|
521
|
+
const steps: StepIndicatorStep[] = [
|
|
522
|
+
{ id: 'upload', label: 'Upload file', status: 'complete' },
|
|
523
|
+
{ id: 'validate', label: 'Validation', status: 'error' },
|
|
524
|
+
{ id: 'import', label: 'Import', status: 'pending' },
|
|
525
|
+
]
|
|
526
|
+
|
|
527
|
+
<StepIndicator steps={steps} />`,
|
|
528
|
+
},
|
|
529
|
+
],
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
const notificationEntry: GalleryEntry = {
|
|
533
|
+
id: 'notification',
|
|
534
|
+
title: 'Notification',
|
|
535
|
+
importPath: '@open-mercato/ui/primitives/notification',
|
|
536
|
+
variants: [
|
|
537
|
+
{
|
|
538
|
+
id: 'information',
|
|
539
|
+
title: 'Information',
|
|
540
|
+
render: () => (
|
|
541
|
+
<div className="w-full max-w-md">
|
|
542
|
+
<Notification
|
|
543
|
+
title="Scheduled maintenance"
|
|
544
|
+
description="The admin panel will be read-only on Sunday between 02:00 and 04:00 UTC."
|
|
545
|
+
timestamp="2 min ago"
|
|
546
|
+
/>
|
|
547
|
+
</div>
|
|
548
|
+
),
|
|
549
|
+
code: `import { Notification } from '@open-mercato/ui/primitives/notification'
|
|
550
|
+
|
|
551
|
+
<Notification
|
|
552
|
+
title="Scheduled maintenance"
|
|
553
|
+
description="The admin panel will be read-only on Sunday between 02:00 and 04:00 UTC."
|
|
554
|
+
timestamp="2 min ago"
|
|
555
|
+
onDismiss={() => dismiss(id)}
|
|
556
|
+
/>`,
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
id: 'success-with-actions',
|
|
560
|
+
title: 'Success with actions',
|
|
561
|
+
render: () => (
|
|
562
|
+
<div className="w-full max-w-md">
|
|
563
|
+
<Notification
|
|
564
|
+
status="success"
|
|
565
|
+
title="Export ready"
|
|
566
|
+
description="Your product export (1,204 rows) finished successfully."
|
|
567
|
+
timestamp="just now"
|
|
568
|
+
actions={
|
|
569
|
+
<>
|
|
570
|
+
<LinkButton variant="black" underline="always">Download</LinkButton>
|
|
571
|
+
<LinkButton variant="gray" underline="always">View log</LinkButton>
|
|
572
|
+
</>
|
|
573
|
+
}
|
|
574
|
+
/>
|
|
575
|
+
</div>
|
|
576
|
+
),
|
|
577
|
+
code: `import { Notification } from '@open-mercato/ui/primitives/notification'
|
|
578
|
+
import { LinkButton } from '@open-mercato/ui/primitives/link-button'
|
|
579
|
+
|
|
580
|
+
<Notification
|
|
581
|
+
status="success"
|
|
582
|
+
title="Export ready"
|
|
583
|
+
description="Your product export (1,204 rows) finished successfully."
|
|
584
|
+
timestamp="just now"
|
|
585
|
+
actions={
|
|
586
|
+
<>
|
|
587
|
+
<LinkButton variant="black" underline="always">Download</LinkButton>
|
|
588
|
+
<LinkButton variant="gray" underline="always">View log</LinkButton>
|
|
589
|
+
</>
|
|
590
|
+
}
|
|
591
|
+
/>`,
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
id: 'error',
|
|
595
|
+
title: 'Error',
|
|
596
|
+
render: () => (
|
|
597
|
+
<div className="w-full max-w-md">
|
|
598
|
+
<Notification
|
|
599
|
+
status="error"
|
|
600
|
+
title="Webhook delivery failed"
|
|
601
|
+
description="The endpoint responded with 503 after 3 retries."
|
|
602
|
+
timestamp="5 min ago"
|
|
603
|
+
actions={<LinkButton variant="error" underline="always">Retry now</LinkButton>}
|
|
604
|
+
/>
|
|
605
|
+
</div>
|
|
606
|
+
),
|
|
607
|
+
code: `import { Notification } from '@open-mercato/ui/primitives/notification'
|
|
608
|
+
import { LinkButton } from '@open-mercato/ui/primitives/link-button'
|
|
609
|
+
|
|
610
|
+
<Notification
|
|
611
|
+
status="error"
|
|
612
|
+
title="Webhook delivery failed"
|
|
613
|
+
description="The endpoint responded with 503 after 3 retries."
|
|
614
|
+
timestamp="5 min ago"
|
|
615
|
+
actions={<LinkButton variant="error" underline="always">Retry now</LinkButton>}
|
|
616
|
+
/>`,
|
|
617
|
+
},
|
|
618
|
+
],
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
const notificationFeedEntry: GalleryEntry = {
|
|
622
|
+
id: 'notification-feed',
|
|
623
|
+
title: 'NotificationFeed',
|
|
624
|
+
importPath: '@open-mercato/ui/primitives/notification-feed',
|
|
625
|
+
variants: [
|
|
626
|
+
{
|
|
627
|
+
id: 'default',
|
|
628
|
+
title: 'default',
|
|
629
|
+
render: () => (
|
|
630
|
+
<div className="w-full max-w-sm">
|
|
631
|
+
<NotificationFeed>
|
|
632
|
+
<NotificationFeedHeader title="Notifications">
|
|
633
|
+
<IconButton size="sm" variant="ghost" aria-label="Notification settings">
|
|
634
|
+
<Settings />
|
|
635
|
+
</IconButton>
|
|
636
|
+
</NotificationFeedHeader>
|
|
637
|
+
<NotificationFeedList>
|
|
638
|
+
<NotificationFeedItem
|
|
639
|
+
icon={
|
|
640
|
+
<NotificationFeedIconBadge tone="indigo">
|
|
641
|
+
<UserPlus className="size-5" />
|
|
642
|
+
</NotificationFeedIconBadge>
|
|
643
|
+
}
|
|
644
|
+
title="New lead generated"
|
|
645
|
+
body="John Smith submitted the contact form."
|
|
646
|
+
timestamp="10 minutes ago"
|
|
647
|
+
unread
|
|
648
|
+
/>
|
|
649
|
+
<NotificationFeedItem
|
|
650
|
+
icon={
|
|
651
|
+
<NotificationFeedIconBadge tone="success">
|
|
652
|
+
<RefreshCw className="size-5" />
|
|
653
|
+
</NotificationFeedIconBadge>
|
|
654
|
+
}
|
|
655
|
+
title="Catalog sync completed"
|
|
656
|
+
body="312 products updated from the PIM."
|
|
657
|
+
timestamp="1 hour ago"
|
|
658
|
+
/>
|
|
659
|
+
</NotificationFeedList>
|
|
660
|
+
<NotificationFeedFooter>
|
|
661
|
+
<Button variant="outline" size="sm" className="w-full">Archive all</Button>
|
|
662
|
+
</NotificationFeedFooter>
|
|
663
|
+
</NotificationFeed>
|
|
664
|
+
</div>
|
|
665
|
+
),
|
|
666
|
+
code: `import { Settings, UserPlus } from 'lucide-react'
|
|
667
|
+
import {
|
|
668
|
+
NotificationFeed,
|
|
669
|
+
NotificationFeedFooter,
|
|
670
|
+
NotificationFeedHeader,
|
|
671
|
+
NotificationFeedIconBadge,
|
|
672
|
+
NotificationFeedItem,
|
|
673
|
+
NotificationFeedList,
|
|
674
|
+
} from '@open-mercato/ui/primitives/notification-feed'
|
|
675
|
+
import { Button } from '@open-mercato/ui/primitives/button'
|
|
676
|
+
import { IconButton } from '@open-mercato/ui/primitives/icon-button'
|
|
677
|
+
|
|
678
|
+
<NotificationFeed>
|
|
679
|
+
<NotificationFeedHeader title="Notifications">
|
|
680
|
+
<IconButton size="sm" variant="ghost" aria-label="Notification settings">
|
|
681
|
+
<Settings />
|
|
682
|
+
</IconButton>
|
|
683
|
+
</NotificationFeedHeader>
|
|
684
|
+
<NotificationFeedList>
|
|
685
|
+
<NotificationFeedItem
|
|
686
|
+
icon={
|
|
687
|
+
<NotificationFeedIconBadge tone="indigo">
|
|
688
|
+
<UserPlus className="size-5" />
|
|
689
|
+
</NotificationFeedIconBadge>
|
|
690
|
+
}
|
|
691
|
+
title="New lead generated"
|
|
692
|
+
body="John Smith submitted the contact form."
|
|
693
|
+
timestamp="10 minutes ago"
|
|
694
|
+
unread
|
|
695
|
+
/>
|
|
696
|
+
</NotificationFeedList>
|
|
697
|
+
<NotificationFeedFooter>
|
|
698
|
+
<Button variant="outline" size="sm" className="w-full">Archive all</Button>
|
|
699
|
+
</NotificationFeedFooter>
|
|
700
|
+
</NotificationFeed>`,
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
id: 'icon-badge-tones',
|
|
704
|
+
title: 'NotificationFeedIconBadge tones',
|
|
705
|
+
render: () => (
|
|
706
|
+
<>
|
|
707
|
+
<NotificationFeedIconBadge tone="indigo">
|
|
708
|
+
<UserPlus className="size-5" />
|
|
709
|
+
</NotificationFeedIconBadge>
|
|
710
|
+
<NotificationFeedIconBadge tone="success">
|
|
711
|
+
<RefreshCw className="size-5" />
|
|
712
|
+
</NotificationFeedIconBadge>
|
|
713
|
+
<NotificationFeedIconBadge tone="error">
|
|
714
|
+
<Inbox className="size-5" />
|
|
715
|
+
</NotificationFeedIconBadge>
|
|
716
|
+
<NotificationFeedIconBadge tone="info">
|
|
717
|
+
<Search className="size-5" />
|
|
718
|
+
</NotificationFeedIconBadge>
|
|
719
|
+
<NotificationFeedIconBadge tone="neutral">
|
|
720
|
+
<Settings className="size-5" />
|
|
721
|
+
</NotificationFeedIconBadge>
|
|
722
|
+
</>
|
|
723
|
+
),
|
|
724
|
+
code: `import { UserPlus } from 'lucide-react'
|
|
725
|
+
import { NotificationFeedIconBadge } from '@open-mercato/ui/primitives/notification-feed'
|
|
726
|
+
|
|
727
|
+
<NotificationFeedIconBadge tone="indigo"><UserPlus className="size-5" /></NotificationFeedIconBadge>
|
|
728
|
+
<NotificationFeedIconBadge tone="success"><RefreshCw className="size-5" /></NotificationFeedIconBadge>
|
|
729
|
+
<NotificationFeedIconBadge tone="error"><Inbox className="size-5" /></NotificationFeedIconBadge>
|
|
730
|
+
<NotificationFeedIconBadge tone="info"><Search className="size-5" /></NotificationFeedIconBadge>
|
|
731
|
+
<NotificationFeedIconBadge tone="neutral"><Settings className="size-5" /></NotificationFeedIconBadge>`,
|
|
732
|
+
},
|
|
733
|
+
],
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
export const entries: GalleryEntry[] = [
|
|
737
|
+
alertEntry,
|
|
738
|
+
emptyStateEntry,
|
|
739
|
+
skeletonEntry,
|
|
740
|
+
progressEntry,
|
|
741
|
+
spinnerEntry,
|
|
742
|
+
ratingEntry,
|
|
743
|
+
stepIndicatorEntry,
|
|
744
|
+
notificationEntry,
|
|
745
|
+
notificationFeedEntry,
|
|
746
|
+
]
|