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