@open-mercato/core 0.6.7-develop.6828.1.ab1620a63e → 0.6.7-develop.6834.1.e76f4b8cbc
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/modules/attachments/fields/attachment.js +1 -1
- package/dist/modules/attachments/fields/attachment.js.map +2 -2
- package/dist/modules/auth/components/UserConsentsPanel.js +9 -9
- package/dist/modules/auth/components/UserConsentsPanel.js.map +2 -2
- package/dist/modules/auth/frontend/reset.js +2 -2
- package/dist/modules/auth/frontend/reset.js.map +2 -2
- package/dist/modules/business_rules/components/ActionRow.js +1 -1
- package/dist/modules/business_rules/components/ActionRow.js.map +1 -1
- package/dist/modules/business_rules/components/ConditionRow.js +8 -4
- package/dist/modules/business_rules/components/ConditionRow.js.map +2 -2
- package/dist/modules/catalog/backend/catalog/products/[id]/page.js +4 -4
- package/dist/modules/catalog/backend/catalog/products/[id]/page.js.map +2 -2
- package/dist/modules/catalog/backend/catalog/products/create/page.js +5 -5
- package/dist/modules/catalog/backend/catalog/products/create/page.js.map +2 -2
- package/dist/modules/catalog/components/PriceKindSettings.js +3 -3
- package/dist/modules/catalog/components/PriceKindSettings.js.map +2 -2
- package/dist/modules/catalog/components/products/ProductCategorizeSection.js +3 -3
- package/dist/modules/catalog/components/products/ProductCategorizeSection.js.map +2 -2
- package/dist/modules/catalog/components/products/ProductMediaManager.js +1 -1
- package/dist/modules/catalog/components/products/ProductMediaManager.js.map +2 -2
- package/dist/modules/catalog/components/products/VariantBuilder.js +5 -5
- package/dist/modules/catalog/components/products/VariantBuilder.js.map +2 -2
- package/dist/modules/communication_channels/backend/profile/communication-channels/page.js +1 -1
- package/dist/modules/communication_channels/backend/profile/communication-channels/page.js.map +2 -2
- package/dist/modules/customers/components/detail/ConfirmDealLostDialog.js +1 -1
- package/dist/modules/customers/components/detail/ConfirmDealLostDialog.js.map +1 -1
- package/dist/modules/dashboards/api/widgets/data/schema.js +26 -17
- package/dist/modules/dashboards/api/widgets/data/schema.js.map +2 -2
- package/dist/modules/design_system/gallery/entries/detail.js +8 -8
- package/dist/modules/design_system/gallery/entries/detail.js.map +1 -1
- package/dist/modules/design_system/gallery/entries/overlays.js +2 -2
- package/dist/modules/design_system/gallery/entries/overlays.js.map +2 -2
- package/dist/modules/design_system/gallery/entries/scaffolding.js +8 -8
- package/dist/modules/design_system/gallery/entries/scaffolding.js.map +1 -1
- package/dist/modules/dictionaries/components/DictionaryEntrySelect.js +1 -1
- package/dist/modules/dictionaries/components/DictionaryEntrySelect.js.map +2 -2
- package/dist/modules/inbox_ops/backend/inbox-ops/log/page.js +6 -6
- package/dist/modules/inbox_ops/backend/inbox-ops/log/page.js.map +2 -2
- package/dist/modules/inbox_ops/components/proposals/EditActionDialog.js +3 -3
- package/dist/modules/inbox_ops/components/proposals/EditActionDialog.js.map +2 -2
- package/dist/modules/messages/components/message-detail/panels/dialogs.js +1 -1
- package/dist/modules/messages/components/message-detail/panels/dialogs.js.map +1 -1
- package/dist/modules/planner/components/AvailabilityRulesEditor.js +4 -4
- package/dist/modules/planner/components/AvailabilityRulesEditor.js.map +2 -2
- package/dist/modules/shipping_carriers/lib/shipment-wizard/components/PackageEditor.js +1 -1
- package/dist/modules/shipping_carriers/lib/shipment-wizard/components/PackageEditor.js.map +1 -1
- package/dist/modules/wms/components/backend/ReleaseReservationDialog.js +1 -1
- package/dist/modules/wms/components/backend/ReleaseReservationDialog.js.map +1 -1
- package/dist/modules/workflows/backend/definitions/page.js +1 -1
- package/dist/modules/workflows/backend/definitions/page.js.map +2 -2
- package/dist/modules/workflows/backend/definitions/visual-editor/page.js +1 -1
- package/dist/modules/workflows/backend/definitions/visual-editor/page.js.map +2 -2
- package/dist/modules/workflows/backend/instances/page.js +8 -8
- package/dist/modules/workflows/backend/instances/page.js.map +2 -2
- package/dist/modules/workflows/backend/tasks/page.js +6 -6
- package/dist/modules/workflows/backend/tasks/page.js.map +2 -2
- package/dist/modules/workflows/components/ActivitiesEditor.js +2 -2
- package/dist/modules/workflows/components/ActivitiesEditor.js.map +2 -2
- package/dist/modules/workflows/components/BusinessRulesSelector.js +1 -1
- package/dist/modules/workflows/components/BusinessRulesSelector.js.map +2 -2
- package/dist/modules/workflows/components/DefinitionTriggersEditor.js +2 -2
- package/dist/modules/workflows/components/DefinitionTriggersEditor.js.map +2 -2
- package/dist/modules/workflows/components/EdgeEditDialogCrudForm.js +1 -2
- package/dist/modules/workflows/components/EdgeEditDialogCrudForm.js.map +2 -2
- package/dist/modules/workflows/components/NodeEditDialogCrudForm.js +1 -2
- package/dist/modules/workflows/components/NodeEditDialogCrudForm.js.map +2 -2
- package/dist/modules/workflows/components/StepsEditor.js +2 -2
- package/dist/modules/workflows/components/StepsEditor.js.map +2 -2
- package/dist/modules/workflows/components/TransitionsEditor.js +3 -3
- package/dist/modules/workflows/components/TransitionsEditor.js.map +2 -2
- package/dist/modules/workflows/components/WorkflowLegend.js +1 -1
- package/dist/modules/workflows/components/WorkflowLegend.js.map +2 -2
- package/dist/modules/workflows/components/WorkflowSelector.js +1 -1
- package/dist/modules/workflows/components/WorkflowSelector.js.map +2 -2
- package/dist/modules/workflows/components/fields/BusinessRuleConditionsEditor.js +1 -1
- package/dist/modules/workflows/components/fields/BusinessRuleConditionsEditor.js.map +2 -2
- package/dist/modules/workflows/components/fields/FormFieldArrayEditor.js +1 -1
- package/dist/modules/workflows/components/fields/FormFieldArrayEditor.js.map +2 -2
- package/dist/modules/workflows/components/fields/MappingArrayEditor.js +1 -1
- package/dist/modules/workflows/components/fields/MappingArrayEditor.js.map +2 -2
- package/dist/modules/workflows/components/fields/StartPreConditionsEditor.js +1 -1
- package/dist/modules/workflows/components/fields/StartPreConditionsEditor.js.map +2 -2
- package/dist/modules/workflows/components/fields/WorkflowSelectorField.js +4 -4
- package/dist/modules/workflows/components/fields/WorkflowSelectorField.js.map +2 -2
- package/package.json +7 -7
- package/src/modules/attachments/fields/attachment.tsx +1 -1
- package/src/modules/auth/components/UserConsentsPanel.tsx +9 -9
- package/src/modules/auth/frontend/reset.tsx +2 -2
- package/src/modules/business_rules/components/ActionRow.tsx +1 -1
- package/src/modules/business_rules/components/ConditionRow.tsx +9 -6
- package/src/modules/catalog/backend/catalog/products/[id]/page.tsx +4 -4
- package/src/modules/catalog/backend/catalog/products/create/page.tsx +5 -5
- package/src/modules/catalog/components/PriceKindSettings.tsx +3 -3
- package/src/modules/catalog/components/products/ProductCategorizeSection.tsx +3 -3
- package/src/modules/catalog/components/products/ProductMediaManager.tsx +1 -1
- package/src/modules/catalog/components/products/VariantBuilder.tsx +5 -5
- package/src/modules/communication_channels/backend/profile/communication-channels/page.tsx +1 -1
- package/src/modules/customers/components/detail/ConfirmDealLostDialog.tsx +1 -1
- package/src/modules/dashboards/api/widgets/data/schema.ts +48 -19
- package/src/modules/design_system/gallery/entries/detail.tsx +8 -8
- package/src/modules/design_system/gallery/entries/overlays.tsx +2 -2
- package/src/modules/design_system/gallery/entries/scaffolding.tsx +8 -8
- package/src/modules/design_system/i18n/de.json +12 -0
- package/src/modules/design_system/i18n/en.json +12 -0
- package/src/modules/design_system/i18n/es.json +12 -0
- package/src/modules/design_system/i18n/pl.json +12 -0
- package/src/modules/dictionaries/components/DictionaryEntrySelect.tsx +1 -1
- package/src/modules/inbox_ops/backend/inbox-ops/log/page.tsx +6 -6
- package/src/modules/inbox_ops/components/proposals/EditActionDialog.tsx +3 -3
- package/src/modules/messages/components/message-detail/panels/dialogs.tsx +1 -1
- package/src/modules/planner/components/AvailabilityRulesEditor.tsx +4 -4
- package/src/modules/shipping_carriers/lib/shipment-wizard/components/PackageEditor.tsx +1 -1
- package/src/modules/wms/components/backend/ReleaseReservationDialog.tsx +1 -1
- package/src/modules/workflows/backend/definitions/page.tsx +1 -1
- package/src/modules/workflows/backend/definitions/visual-editor/page.tsx +1 -1
- package/src/modules/workflows/backend/instances/page.tsx +8 -8
- package/src/modules/workflows/backend/tasks/page.tsx +6 -6
- package/src/modules/workflows/components/ActivitiesEditor.tsx +2 -2
- package/src/modules/workflows/components/BusinessRulesSelector.tsx +1 -1
- package/src/modules/workflows/components/DefinitionTriggersEditor.tsx +2 -2
- package/src/modules/workflows/components/EdgeEditDialogCrudForm.tsx +1 -2
- package/src/modules/workflows/components/NodeEditDialogCrudForm.tsx +1 -2
- package/src/modules/workflows/components/StepsEditor.tsx +2 -2
- package/src/modules/workflows/components/TransitionsEditor.tsx +3 -3
- package/src/modules/workflows/components/WorkflowLegend.tsx +1 -1
- package/src/modules/workflows/components/WorkflowSelector.tsx +1 -1
- package/src/modules/workflows/components/fields/BusinessRuleConditionsEditor.tsx +1 -1
- package/src/modules/workflows/components/fields/FormFieldArrayEditor.tsx +1 -1
- package/src/modules/workflows/components/fields/MappingArrayEditor.tsx +1 -1
- package/src/modules/workflows/components/fields/StartPreConditionsEditor.tsx +1 -1
- package/src/modules/workflows/components/fields/WorkflowSelectorField.tsx +4 -4
|
@@ -16,17 +16,31 @@ const dateRangePresetSchema = z.enum([
|
|
|
16
16
|
"last_30_days",
|
|
17
17
|
"last_90_days"
|
|
18
18
|
]);
|
|
19
|
+
const comparisonFilterOperators = ["eq", "neq", "gt", "gte", "lt", "lte"];
|
|
20
|
+
const setFilterOperators = ["in", "not_in"];
|
|
21
|
+
const nullFilterOperators = ["is_null", "is_not_null"];
|
|
22
|
+
const scalarFilterOperators = [...comparisonFilterOperators, ...nullFilterOperators];
|
|
23
|
+
const scalarFilterOperatorSchema = z.enum(scalarFilterOperators);
|
|
24
|
+
const setFilterOperatorSchema = z.enum(setFilterOperators);
|
|
19
25
|
const filterOperatorSchema = z.enum([
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
...comparisonFilterOperators,
|
|
27
|
+
...setFilterOperators,
|
|
28
|
+
...nullFilterOperators
|
|
29
|
+
]);
|
|
30
|
+
const MAX_SET_FILTER_VALUES = 200;
|
|
31
|
+
const setFilterMemberSchema = z.union([z.string(), z.number(), z.boolean()]);
|
|
32
|
+
const setFilterValueSchema = z.array(setFilterMemberSchema).max(MAX_SET_FILTER_VALUES);
|
|
33
|
+
const widgetDataFilterSchema = z.discriminatedUnion("operator", [
|
|
34
|
+
z.object({
|
|
35
|
+
field: z.string().min(1),
|
|
36
|
+
operator: setFilterOperatorSchema,
|
|
37
|
+
value: setFilterValueSchema
|
|
38
|
+
}),
|
|
39
|
+
z.object({
|
|
40
|
+
field: z.string().min(1),
|
|
41
|
+
operator: scalarFilterOperatorSchema,
|
|
42
|
+
value: z.unknown().optional()
|
|
43
|
+
})
|
|
30
44
|
]);
|
|
31
45
|
const widgetDataRequestSchema = z.object({
|
|
32
46
|
entityType: z.string().min(1),
|
|
@@ -40,13 +54,7 @@ const widgetDataRequestSchema = z.object({
|
|
|
40
54
|
limit: z.number().int().min(1).max(100).optional(),
|
|
41
55
|
resolveLabels: z.boolean().optional()
|
|
42
56
|
}).optional(),
|
|
43
|
-
filters: z.array(
|
|
44
|
-
z.object({
|
|
45
|
-
field: z.string().min(1),
|
|
46
|
-
operator: filterOperatorSchema,
|
|
47
|
-
value: z.unknown().optional()
|
|
48
|
-
})
|
|
49
|
-
).optional(),
|
|
57
|
+
filters: z.array(widgetDataFilterSchema).optional(),
|
|
50
58
|
dateRange: z.object({
|
|
51
59
|
field: z.string().min(1),
|
|
52
60
|
preset: dateRangePresetSchema
|
|
@@ -75,6 +83,7 @@ const widgetDataResponseSchema = z.object({
|
|
|
75
83
|
})
|
|
76
84
|
});
|
|
77
85
|
export {
|
|
86
|
+
MAX_SET_FILTER_VALUES,
|
|
78
87
|
aggregateFunctionSchema,
|
|
79
88
|
dateGranularitySchema,
|
|
80
89
|
dateRangePresetSchema,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../src/modules/dashboards/api/widgets/data/schema.ts"],
|
|
4
|
-
"sourcesContent": ["import { z } from 'zod'\n\nexport const aggregateFunctionSchema = z.enum(['count', 'sum', 'avg', 'min', 'max'])\nexport const dateGranularitySchema = z.enum(['day', 'week', 'month', 'quarter', 'year'])\nexport const dateRangePresetSchema = z.enum([\n 'today',\n 'yesterday',\n 'this_week',\n 'last_week',\n 'this_month',\n 'last_month',\n 'this_quarter',\n 'last_quarter',\n 'this_year',\n 'last_year',\n 'last_7_days',\n 'last_30_days',\n 'last_90_days',\n])\n\nexport const filterOperatorSchema = z.enum([\n
|
|
5
|
-
"mappings": "AAAA,SAAS,SAAS;AAEX,MAAM,0BAA0B,EAAE,KAAK,CAAC,SAAS,OAAO,OAAO,OAAO,KAAK,CAAC;AAC5E,MAAM,wBAAwB,EAAE,KAAK,CAAC,OAAO,QAAQ,SAAS,WAAW,MAAM,CAAC;AAChF,MAAM,wBAAwB,EAAE,KAAK;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;
|
|
4
|
+
"sourcesContent": ["import { z } from 'zod'\n\nexport const aggregateFunctionSchema = z.enum(['count', 'sum', 'avg', 'min', 'max'])\nexport const dateGranularitySchema = z.enum(['day', 'week', 'month', 'quarter', 'year'])\nexport const dateRangePresetSchema = z.enum([\n 'today',\n 'yesterday',\n 'this_week',\n 'last_week',\n 'this_month',\n 'last_month',\n 'this_quarter',\n 'last_quarter',\n 'this_year',\n 'last_year',\n 'last_7_days',\n 'last_30_days',\n 'last_90_days',\n])\n\nconst comparisonFilterOperators = ['eq', 'neq', 'gt', 'gte', 'lt', 'lte'] as const\nconst setFilterOperators = ['in', 'not_in'] as const\nconst nullFilterOperators = ['is_null', 'is_not_null'] as const\nconst scalarFilterOperators = [...comparisonFilterOperators, ...nullFilterOperators] as const\n\nconst scalarFilterOperatorSchema = z.enum(scalarFilterOperators)\nconst setFilterOperatorSchema = z.enum(setFilterOperators)\n\nexport const filterOperatorSchema = z.enum([\n ...comparisonFilterOperators,\n ...setFilterOperators,\n ...nullFilterOperators,\n])\n\n/**\n * Upper bound on how many members an `in` / `not_in` widget-data filter may carry (#4852).\n *\n * Every member becomes one placeholder plus one bound parameter in the aggregation's WHERE\n * clause, so the cost of a set filter is proportional to its length. The bound lives here\n * rather than in the SQL builder because `buildWhereClause` can only truncate the list \u2014\n * silently returning an answer to a different question than the caller asked \u2014 or throw from\n * deep inside query construction; validating here yields a 400 that names the offending\n * filter and is published in the route's OpenAPI schema.\n *\n * 200 is deliberately generous for a dashboard filter: the widest grouping a widget can render\n * is capped at 100 buckets (`groupBy.limit`), and a batch carries at most 50 requests, so even\n * a fully saturated batch stays an order of magnitude below PostgreSQL's per-statement limit\n * of 65535 bound parameters. Raising it later is a one-line change to this constant.\n */\nexport const MAX_SET_FILTER_VALUES = 200\n\n// `IN` / `NOT IN` compare against literals; a null member never matches either way, which is\n// what the dedicated `is_null` / `is_not_null` operators are for.\nconst setFilterMemberSchema = z.union([z.string(), z.number(), z.boolean()])\n\nconst setFilterValueSchema = z.array(setFilterMemberSchema).max(MAX_SET_FILTER_VALUES)\n\nconst widgetDataFilterSchema = z.discriminatedUnion('operator', [\n z.object({\n field: z.string().min(1),\n operator: setFilterOperatorSchema,\n value: setFilterValueSchema,\n }),\n z.object({\n field: z.string().min(1),\n operator: scalarFilterOperatorSchema,\n value: z.unknown().optional(),\n }),\n])\n\nexport const widgetDataRequestSchema = z.object({\n entityType: z.string().min(1),\n metric: z.object({\n field: z.string().min(1),\n aggregate: aggregateFunctionSchema,\n }),\n groupBy: z\n .object({\n field: z.string().min(1),\n granularity: dateGranularitySchema.optional(),\n limit: z.number().int().min(1).max(100).optional(),\n resolveLabels: z.boolean().optional(),\n })\n .optional(),\n filters: z.array(widgetDataFilterSchema).optional(),\n dateRange: z\n .object({\n field: z.string().min(1),\n preset: dateRangePresetSchema,\n })\n .optional(),\n comparison: z\n .object({\n type: z.enum(['previous_period', 'previous_year']),\n })\n .optional(),\n})\n\nexport const widgetDataItemSchema = z.object({\n groupKey: z.unknown(),\n groupLabel: z.string().optional(),\n value: z.number().nullable(),\n})\n\nexport const widgetDataResponseSchema = z.object({\n value: z.number().nullable(),\n data: z.array(widgetDataItemSchema),\n comparison: z\n .object({\n value: z.number().nullable(),\n change: z.number(),\n direction: z.enum(['up', 'down', 'unchanged']),\n })\n .optional(),\n metadata: z.object({\n fetchedAt: z.string(),\n recordCount: z.number(),\n currency: z.string().nullable().optional(),\n }),\n})\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,SAAS;AAEX,MAAM,0BAA0B,EAAE,KAAK,CAAC,SAAS,OAAO,OAAO,OAAO,KAAK,CAAC;AAC5E,MAAM,wBAAwB,EAAE,KAAK,CAAC,OAAO,QAAQ,SAAS,WAAW,MAAM,CAAC;AAChF,MAAM,wBAAwB,EAAE,KAAK;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAED,MAAM,4BAA4B,CAAC,MAAM,OAAO,MAAM,OAAO,MAAM,KAAK;AACxE,MAAM,qBAAqB,CAAC,MAAM,QAAQ;AAC1C,MAAM,sBAAsB,CAAC,WAAW,aAAa;AACrD,MAAM,wBAAwB,CAAC,GAAG,2BAA2B,GAAG,mBAAmB;AAEnF,MAAM,6BAA6B,EAAE,KAAK,qBAAqB;AAC/D,MAAM,0BAA0B,EAAE,KAAK,kBAAkB;AAElD,MAAM,uBAAuB,EAAE,KAAK;AAAA,EACzC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL,CAAC;AAiBM,MAAM,wBAAwB;AAIrC,MAAM,wBAAwB,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,OAAO,GAAG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AE,QAAQ;AAAA,EACpB,YAAY,EAAE,OAAO,EAAE,SAAS;AAAA,EAChC,OAAO,EAAE,OAAO,EAAE,SAAS;AAC7B,CAAC;AAEM,MAAM,2BAA2B,EAAE,OAAO;AAAA,EAC/C,OAAO,EAAE,OAAO,EAAE,SAAS;AAAA,EAC3B,MAAM,EAAE,MAAM,oBAAoB;AAAA,EAClC,YAAY,EACT,OAAO;AAAA,IACN,OAAO,EAAE,OAAO,EAAE,SAAS;AAAA,IAC3B,QAAQ,EAAE,OAAO;AAAA,IACjB,WAAW,EAAE,KAAK,CAAC,MAAM,QAAQ,WAAW,CAAC;AAAA,EAC/C,CAAC,EACA,SAAS;AAAA,EACZ,UAAU,EAAE,OAAO;AAAA,IACjB,WAAW,EAAE,OAAO;AAAA,IACpB,aAAa,EAAE,OAAO;AAAA,IACtB,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;AAAA,EAC3C,CAAC;AACH,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -260,11 +260,11 @@ const notesAdapter: NotesDataAdapter = {
|
|
|
260
260
|
entityId={personId}
|
|
261
261
|
viewerUserId={viewer.id}
|
|
262
262
|
viewerName={viewer.name}
|
|
263
|
-
emptyLabel={t('
|
|
264
|
-
addActionLabel={t('
|
|
263
|
+
emptyLabel={t('design_system.gallery.samples.notes.empty')}
|
|
264
|
+
addActionLabel={t('design_system.gallery.samples.notes.add')}
|
|
265
265
|
emptyState={{
|
|
266
|
-
title: t('
|
|
267
|
-
actionLabel: t('
|
|
266
|
+
title: t('design_system.gallery.samples.notes.emptyTitle'),
|
|
267
|
+
actionLabel: t('design_system.gallery.samples.notes.add'),
|
|
268
268
|
}}
|
|
269
269
|
translator={t}
|
|
270
270
|
dataAdapter={notesAdapter}
|
|
@@ -302,10 +302,10 @@ const addressesAdapter: AddressDataAdapter = {
|
|
|
302
302
|
|
|
303
303
|
<AddressesSection
|
|
304
304
|
entityId={personId}
|
|
305
|
-
emptyLabel={t('
|
|
305
|
+
emptyLabel={t('design_system.gallery.samples.addresses.empty')}
|
|
306
306
|
addActionLabel={t('customers.people.detail.addresses.add')}
|
|
307
307
|
emptyState={{
|
|
308
|
-
title: t('
|
|
308
|
+
title: t('design_system.gallery.samples.addresses.emptyTitle'),
|
|
309
309
|
actionLabel: t('customers.people.detail.addresses.add'),
|
|
310
310
|
}}
|
|
311
311
|
translator={t}
|
|
@@ -338,8 +338,8 @@ const attachmentsSectionEntry = {
|
|
|
338
338
|
<AttachmentsSection
|
|
339
339
|
entityId="customers:person"
|
|
340
340
|
recordId={person?.id ?? null}
|
|
341
|
-
title={t('
|
|
342
|
-
description={t('
|
|
341
|
+
title={t('design_system.gallery.samples.attachments.title')}
|
|
342
|
+
description={t('design_system.gallery.samples.attachments.description')}
|
|
343
343
|
/>`
|
|
344
344
|
}
|
|
345
345
|
]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/modules/design_system/gallery/entries/detail.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react'\nimport { Badge } from '@open-mercato/ui/primitives/badge'\nimport { Button } from '@open-mercato/ui/primitives/button'\nimport {\n AddressesSection,\n AttachmentsSection,\n DetailFieldsSection,\n ErrorMessage,\n LoadingMessage,\n NotesSection,\n type AddressDataAdapter,\n type DetailFieldConfig,\n type NotesSectionProps,\n} from '@open-mercato/ui/backend/detail'\nimport type { GalleryEntry } from '../types'\n\n// Component titles and variant names are proper nouns from the codebase and\n// are deliberately not translated. `code` MUST contain the entry's importPath\n// (enforced by the registry-integrity test) and is always reviewed alongside\n// its sibling `render`.\n\n// Data-backed sections (Notes/Addresses) take adapter objects \u2014 the demos pass\n// inline in-memory adapters, so previews never touch an API. AttachmentsSection\n// fetches through `apiCall` internally and cannot take an adapter; it is shown\n// in its `recordId={null}` state, where fetching is disabled by design.\n\nconst saveNoop = async () => {}\n\nconst fieldGrid: DetailFieldConfig[] = [\n {\n key: 'first-name',\n kind: 'text',\n label: 'First name',\n value: 'Anna',\n emptyLabel: 'Add first name',\n onSave: saveNoop,\n },\n {\n key: 'phone',\n kind: 'text',\n label: 'Phone',\n value: null,\n emptyLabel: 'Add phone',\n onSave: saveNoop,\n },\n {\n key: 'status',\n kind: 'select',\n label: 'Status',\n value: 'active',\n emptyLabel: 'Set status',\n options: [\n { value: 'active', label: 'Active' },\n { value: 'inactive', label: 'Inactive' },\n ],\n onSave: saveNoop,\n },\n {\n key: 'notes',\n kind: 'multiline',\n label: 'Notes',\n value: 'Prefers email contact.',\n emptyLabel: 'Add notes',\n onSave: saveNoop,\n gridClassName: 'sm:col-span-2 md:col-span-3',\n },\n]\n\nconst fieldGridWithCustom: DetailFieldConfig[] = [\n {\n key: 'email',\n kind: 'text',\n label: 'Email',\n value: 'anna@example.com',\n emptyLabel: 'Add email',\n onSave: saveNoop,\n },\n {\n key: 'owner',\n kind: 'custom',\n label: 'Owner',\n emptyLabel: 'Unassigned',\n render: () => (\n <div className=\"space-y-1\">\n <div className=\"text-xs text-muted-foreground\">Owner</div>\n <Badge variant=\"muted\">Unassigned</Badge>\n </div>\n ),\n },\n]\n\n// Sections resolve their labels through an app translator in real pages; the\n// gallery translator just surfaces each key's fallback (or last segment).\nconst galleryTranslator = (key: string, fallback?: string) =>\n fallback ?? key.split('.').pop() ?? key\n\nconst notesAdapter: NotesSectionProps['dataAdapter'] = {\n list: async () => [\n {\n id: 'note-1',\n body: 'Asked for a revised quote \u2014 follow up on Friday.',\n createdAt: '2026-07-15T09:30:00.000Z',\n authorName: 'Anna Nowak',\n },\n {\n id: 'note-2',\n body: 'Prefers email contact over phone.',\n createdAt: '2026-07-10T14:05:00.000Z',\n authorName: 'Jan Kowalski',\n },\n ],\n create: async () => {},\n update: async () => {},\n delete: async () => {},\n}\n\nconst addressesAdapter: AddressDataAdapter = {\n list: async () => [\n {\n id: 'address-1',\n name: 'Headquarters',\n addressLine1: 'Prosta 51',\n city: 'Warszawa',\n postalCode: '00-838',\n country: 'PL',\n isPrimary: true,\n },\n {\n id: 'address-2',\n name: 'Warehouse',\n addressLine1: 'Magazynowa 7',\n city: 'Pruszk\u00F3w',\n postalCode: '05-800',\n country: 'PL',\n },\n ],\n create: async () => {},\n update: async () => {},\n delete: async () => {},\n}\n\nconst detailFieldsSectionEntry: GalleryEntry = {\n id: 'detail-fields-section',\n title: 'DetailFieldsSection',\n importPath: '@open-mercato/ui/backend/detail',\n variants: [\n {\n id: 'field-grid',\n title: 'Inline-editable field grid',\n render: () => (\n <div className=\"w-full\">\n <DetailFieldsSection fields={fieldGrid} />\n </div>\n ),\n code: `import { DetailFieldsSection, type DetailFieldConfig } from '@open-mercato/ui/backend/detail'\n\nconst fields: DetailFieldConfig[] = [\n { key: 'first-name', kind: 'text', label: 'First name', value: person.firstName, emptyLabel: 'Add first name', onSave: saveFirstName },\n { key: 'phone', kind: 'text', label: 'Phone', value: person.phone, emptyLabel: 'Add phone', onSave: savePhone },\n {\n key: 'status', kind: 'select', label: 'Status', value: person.status, emptyLabel: 'Set status',\n options: [{ value: 'active', label: 'Active' }, { value: 'inactive', label: 'Inactive' }],\n onSave: saveStatus,\n },\n {\n key: 'notes', kind: 'multiline', label: 'Notes', value: person.notes, emptyLabel: 'Add notes',\n onSave: saveNotes, gridClassName: 'sm:col-span-2 md:col-span-3',\n },\n]\n\n<DetailFieldsSection fields={fields} />`,\n },\n {\n id: 'custom-field',\n title: 'With a custom field cell',\n render: () => (\n <div className=\"w-full\">\n <DetailFieldsSection fields={fieldGridWithCustom} />\n </div>\n ),\n code: `import { DetailFieldsSection, type DetailFieldConfig } from '@open-mercato/ui/backend/detail'\nimport { Badge } from '@open-mercato/ui/primitives/badge'\n\nconst fields: DetailFieldConfig[] = [\n { key: 'email', kind: 'text', label: 'Email', value: person.email, emptyLabel: 'Add email', onSave: saveEmail },\n {\n key: 'owner', kind: 'custom', label: 'Owner', emptyLabel: 'Unassigned',\n render: () => (\n <div className=\"space-y-1\">\n <div className=\"text-xs text-muted-foreground\">Owner</div>\n <Badge variant=\"muted\">Unassigned</Badge>\n </div>\n ),\n },\n]\n\n<DetailFieldsSection fields={fields} />`,\n },\n ],\n}\n\nconst loadingMessageEntry: GalleryEntry = {\n id: 'loading-message',\n title: 'LoadingMessage',\n importPath: '@open-mercato/ui/backend/detail',\n variants: [\n {\n id: 'default',\n title: 'default',\n render: () => (\n <div className=\"w-full max-w-md\">\n <LoadingMessage label=\"Loading customer\u2026\" />\n </div>\n ),\n code: `import { LoadingMessage } from '@open-mercato/ui/backend/detail'\n\nif (isLoading) return <LoadingMessage label={t('customers.people.detail.loading')} />`,\n },\n ],\n}\n\nconst errorMessageEntry: GalleryEntry = {\n id: 'error-message',\n title: 'ErrorMessage',\n importPath: '@open-mercato/ui/backend/detail',\n variants: [\n {\n id: 'basic',\n title: 'Label only',\n render: () => (\n <div className=\"w-full max-w-md\">\n <ErrorMessage label=\"Failed to load customer.\" />\n </div>\n ),\n code: `import { ErrorMessage } from '@open-mercato/ui/backend/detail'\n\nif (error) return <ErrorMessage label={error} />`,\n },\n {\n id: 'with-description-action',\n title: 'With description and action',\n render: () => (\n <div className=\"w-full max-w-md\">\n <ErrorMessage\n label=\"Failed to load attachments.\"\n description=\"The storage service did not respond in time.\"\n action={\n <Button variant=\"outline\" size=\"sm\">\n Retry\n </Button>\n }\n />\n </div>\n ),\n code: `import { ErrorMessage } from '@open-mercato/ui/backend/detail'\nimport { Button } from '@open-mercato/ui/primitives/button'\n\n<ErrorMessage\n label=\"Failed to load attachments.\"\n description=\"The storage service did not respond in time.\"\n action={<Button variant=\"outline\" size=\"sm\" onClick={retry}>Retry</Button>}\n/>`,\n },\n ],\n}\n\nconst notesSectionEntry: GalleryEntry = {\n id: 'notes-section',\n title: 'NotesSection',\n importPath: '@open-mercato/ui/backend/detail',\n variants: [\n {\n id: 'mock-adapter',\n title: 'Timeline (inline mock adapter \u2014 no API)',\n render: () => (\n <div className=\"w-full max-w-2xl\">\n <NotesSection\n entityId=\"person-1\"\n viewerUserId=\"user-1\"\n viewerName=\"Anna Nowak\"\n emptyLabel=\"No notes yet\"\n addActionLabel=\"Add note\"\n emptyState={{\n title: 'No notes yet',\n actionLabel: 'Add note',\n description: 'Notes added here are visible to the whole team.',\n }}\n translator={galleryTranslator}\n dataAdapter={notesAdapter}\n />\n </div>\n ),\n code: `import { NotesSection, type NotesDataAdapter } from '@open-mercato/ui/backend/detail'\n\n// Implement the adapter against your module's API (apiCall) \u2014 never fork the section.\nconst notesAdapter: NotesDataAdapter = {\n list: async ({ entityId }) => fetchNotes(entityId),\n create: async ({ entityId, body }) => createNote(entityId, body),\n update: async ({ id, patch }) => updateNote(id, patch),\n delete: async ({ id }) => deleteNote(id),\n}\n\n<NotesSection\n entityId={personId}\n viewerUserId={viewer.id}\n viewerName={viewer.name}\n emptyLabel={t('customers.people.detail.notes.empty')}\n addActionLabel={t('customers.people.detail.notes.add')}\n emptyState={{\n title: t('customers.people.detail.notes.emptyTitle'),\n actionLabel: t('customers.people.detail.notes.add'),\n }}\n translator={t}\n dataAdapter={notesAdapter}\n/>`,\n },\n ],\n}\n\nconst addressesSectionEntry: GalleryEntry = {\n id: 'addresses-section',\n title: 'AddressesSection',\n importPath: '@open-mercato/ui/backend/detail',\n variants: [\n {\n id: 'mock-adapter',\n title: 'Address tiles (inline mock adapter \u2014 no API)',\n render: () => (\n <div className=\"w-full max-w-2xl\">\n <AddressesSection\n entityId=\"person-1\"\n emptyLabel=\"No addresses yet\"\n addActionLabel=\"Add address\"\n emptyState={{ title: 'No addresses yet', actionLabel: 'Add address' }}\n translator={galleryTranslator}\n dataAdapter={addressesAdapter}\n />\n </div>\n ),\n code: `import { AddressesSection, type AddressDataAdapter } from '@open-mercato/ui/backend/detail'\n\nconst addressesAdapter: AddressDataAdapter = {\n list: async ({ entityId }) => fetchAddresses(entityId),\n create: async ({ entityId, payload }) => createAddress(entityId, payload),\n update: async ({ id, payload }) => updateAddress(id, payload),\n delete: async ({ id }) => deleteAddress(id),\n}\n\n<AddressesSection\n entityId={personId}\n emptyLabel={t('customers.people.detail.addresses.empty')}\n addActionLabel={t('customers.people.detail.addresses.add')}\n emptyState={{\n title: t('customers.people.detail.addresses.emptyTitle'),\n actionLabel: t('customers.people.detail.addresses.add'),\n }}\n translator={t}\n dataAdapter={addressesAdapter}\n/>`,\n },\n ],\n}\n\nconst attachmentsSectionEntry: GalleryEntry = {\n id: 'attachments-section',\n title: 'AttachmentsSection',\n importPath: '@open-mercato/ui/backend/detail',\n variants: [\n {\n id: 'unsaved-record',\n title: 'Unsaved record (recordId null \u2014 API fetch disabled)',\n render: () => (\n <div className=\"w-full max-w-2xl\">\n <AttachmentsSection\n entityId=\"customers:person\"\n recordId={null}\n title=\"Attachments\"\n description=\"Files linked to this record.\"\n />\n </div>\n ),\n code: `import { AttachmentsSection } from '@open-mercato/ui/backend/detail'\n\n// Fetches /api/attachments internally once recordId is set;\n// with recordId={null} it renders the save-first placeholder.\n<AttachmentsSection\n entityId=\"customers:person\"\n recordId={person?.id ?? null}\n title={t('customers.people.detail.attachments.title')}\n description={t('customers.people.detail.attachments.description')}\n/>`,\n },\n ],\n}\n\nexport const entries: GalleryEntry[] = [\n detailFieldsSectionEntry,\n loadingMessageEntry,\n errorMessageEntry,\n notesSectionEntry,\n addressesSectionEntry,\n attachmentsSectionEntry,\n]\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react'\nimport { Badge } from '@open-mercato/ui/primitives/badge'\nimport { Button } from '@open-mercato/ui/primitives/button'\nimport {\n AddressesSection,\n AttachmentsSection,\n DetailFieldsSection,\n ErrorMessage,\n LoadingMessage,\n NotesSection,\n type AddressDataAdapter,\n type DetailFieldConfig,\n type NotesSectionProps,\n} from '@open-mercato/ui/backend/detail'\nimport type { GalleryEntry } from '../types'\n\n// Component titles and variant names are proper nouns from the codebase and\n// are deliberately not translated. `code` MUST contain the entry's importPath\n// (enforced by the registry-integrity test) and is always reviewed alongside\n// its sibling `render`.\n\n// Data-backed sections (Notes/Addresses) take adapter objects \u2014 the demos pass\n// inline in-memory adapters, so previews never touch an API. AttachmentsSection\n// fetches through `apiCall` internally and cannot take an adapter; it is shown\n// in its `recordId={null}` state, where fetching is disabled by design.\n\nconst saveNoop = async () => {}\n\nconst fieldGrid: DetailFieldConfig[] = [\n {\n key: 'first-name',\n kind: 'text',\n label: 'First name',\n value: 'Anna',\n emptyLabel: 'Add first name',\n onSave: saveNoop,\n },\n {\n key: 'phone',\n kind: 'text',\n label: 'Phone',\n value: null,\n emptyLabel: 'Add phone',\n onSave: saveNoop,\n },\n {\n key: 'status',\n kind: 'select',\n label: 'Status',\n value: 'active',\n emptyLabel: 'Set status',\n options: [\n { value: 'active', label: 'Active' },\n { value: 'inactive', label: 'Inactive' },\n ],\n onSave: saveNoop,\n },\n {\n key: 'notes',\n kind: 'multiline',\n label: 'Notes',\n value: 'Prefers email contact.',\n emptyLabel: 'Add notes',\n onSave: saveNoop,\n gridClassName: 'sm:col-span-2 md:col-span-3',\n },\n]\n\nconst fieldGridWithCustom: DetailFieldConfig[] = [\n {\n key: 'email',\n kind: 'text',\n label: 'Email',\n value: 'anna@example.com',\n emptyLabel: 'Add email',\n onSave: saveNoop,\n },\n {\n key: 'owner',\n kind: 'custom',\n label: 'Owner',\n emptyLabel: 'Unassigned',\n render: () => (\n <div className=\"space-y-1\">\n <div className=\"text-xs text-muted-foreground\">Owner</div>\n <Badge variant=\"muted\">Unassigned</Badge>\n </div>\n ),\n },\n]\n\n// Sections resolve their labels through an app translator in real pages; the\n// gallery translator just surfaces each key's fallback (or last segment).\nconst galleryTranslator = (key: string, fallback?: string) =>\n fallback ?? key.split('.').pop() ?? key\n\nconst notesAdapter: NotesSectionProps['dataAdapter'] = {\n list: async () => [\n {\n id: 'note-1',\n body: 'Asked for a revised quote \u2014 follow up on Friday.',\n createdAt: '2026-07-15T09:30:00.000Z',\n authorName: 'Anna Nowak',\n },\n {\n id: 'note-2',\n body: 'Prefers email contact over phone.',\n createdAt: '2026-07-10T14:05:00.000Z',\n authorName: 'Jan Kowalski',\n },\n ],\n create: async () => {},\n update: async () => {},\n delete: async () => {},\n}\n\nconst addressesAdapter: AddressDataAdapter = {\n list: async () => [\n {\n id: 'address-1',\n name: 'Headquarters',\n addressLine1: 'Prosta 51',\n city: 'Warszawa',\n postalCode: '00-838',\n country: 'PL',\n isPrimary: true,\n },\n {\n id: 'address-2',\n name: 'Warehouse',\n addressLine1: 'Magazynowa 7',\n city: 'Pruszk\u00F3w',\n postalCode: '05-800',\n country: 'PL',\n },\n ],\n create: async () => {},\n update: async () => {},\n delete: async () => {},\n}\n\nconst detailFieldsSectionEntry: GalleryEntry = {\n id: 'detail-fields-section',\n title: 'DetailFieldsSection',\n importPath: '@open-mercato/ui/backend/detail',\n variants: [\n {\n id: 'field-grid',\n title: 'Inline-editable field grid',\n render: () => (\n <div className=\"w-full\">\n <DetailFieldsSection fields={fieldGrid} />\n </div>\n ),\n code: `import { DetailFieldsSection, type DetailFieldConfig } from '@open-mercato/ui/backend/detail'\n\nconst fields: DetailFieldConfig[] = [\n { key: 'first-name', kind: 'text', label: 'First name', value: person.firstName, emptyLabel: 'Add first name', onSave: saveFirstName },\n { key: 'phone', kind: 'text', label: 'Phone', value: person.phone, emptyLabel: 'Add phone', onSave: savePhone },\n {\n key: 'status', kind: 'select', label: 'Status', value: person.status, emptyLabel: 'Set status',\n options: [{ value: 'active', label: 'Active' }, { value: 'inactive', label: 'Inactive' }],\n onSave: saveStatus,\n },\n {\n key: 'notes', kind: 'multiline', label: 'Notes', value: person.notes, emptyLabel: 'Add notes',\n onSave: saveNotes, gridClassName: 'sm:col-span-2 md:col-span-3',\n },\n]\n\n<DetailFieldsSection fields={fields} />`,\n },\n {\n id: 'custom-field',\n title: 'With a custom field cell',\n render: () => (\n <div className=\"w-full\">\n <DetailFieldsSection fields={fieldGridWithCustom} />\n </div>\n ),\n code: `import { DetailFieldsSection, type DetailFieldConfig } from '@open-mercato/ui/backend/detail'\nimport { Badge } from '@open-mercato/ui/primitives/badge'\n\nconst fields: DetailFieldConfig[] = [\n { key: 'email', kind: 'text', label: 'Email', value: person.email, emptyLabel: 'Add email', onSave: saveEmail },\n {\n key: 'owner', kind: 'custom', label: 'Owner', emptyLabel: 'Unassigned',\n render: () => (\n <div className=\"space-y-1\">\n <div className=\"text-xs text-muted-foreground\">Owner</div>\n <Badge variant=\"muted\">Unassigned</Badge>\n </div>\n ),\n },\n]\n\n<DetailFieldsSection fields={fields} />`,\n },\n ],\n}\n\nconst loadingMessageEntry: GalleryEntry = {\n id: 'loading-message',\n title: 'LoadingMessage',\n importPath: '@open-mercato/ui/backend/detail',\n variants: [\n {\n id: 'default',\n title: 'default',\n render: () => (\n <div className=\"w-full max-w-md\">\n <LoadingMessage label=\"Loading customer\u2026\" />\n </div>\n ),\n code: `import { LoadingMessage } from '@open-mercato/ui/backend/detail'\n\nif (isLoading) return <LoadingMessage label={t('customers.people.detail.loading')} />`,\n },\n ],\n}\n\nconst errorMessageEntry: GalleryEntry = {\n id: 'error-message',\n title: 'ErrorMessage',\n importPath: '@open-mercato/ui/backend/detail',\n variants: [\n {\n id: 'basic',\n title: 'Label only',\n render: () => (\n <div className=\"w-full max-w-md\">\n <ErrorMessage label=\"Failed to load customer.\" />\n </div>\n ),\n code: `import { ErrorMessage } from '@open-mercato/ui/backend/detail'\n\nif (error) return <ErrorMessage label={error} />`,\n },\n {\n id: 'with-description-action',\n title: 'With description and action',\n render: () => (\n <div className=\"w-full max-w-md\">\n <ErrorMessage\n label=\"Failed to load attachments.\"\n description=\"The storage service did not respond in time.\"\n action={\n <Button variant=\"outline\" size=\"sm\">\n Retry\n </Button>\n }\n />\n </div>\n ),\n code: `import { ErrorMessage } from '@open-mercato/ui/backend/detail'\nimport { Button } from '@open-mercato/ui/primitives/button'\n\n<ErrorMessage\n label=\"Failed to load attachments.\"\n description=\"The storage service did not respond in time.\"\n action={<Button variant=\"outline\" size=\"sm\" onClick={retry}>Retry</Button>}\n/>`,\n },\n ],\n}\n\nconst notesSectionEntry: GalleryEntry = {\n id: 'notes-section',\n title: 'NotesSection',\n importPath: '@open-mercato/ui/backend/detail',\n variants: [\n {\n id: 'mock-adapter',\n title: 'Timeline (inline mock adapter \u2014 no API)',\n render: () => (\n <div className=\"w-full max-w-2xl\">\n <NotesSection\n entityId=\"person-1\"\n viewerUserId=\"user-1\"\n viewerName=\"Anna Nowak\"\n emptyLabel=\"No notes yet\"\n addActionLabel=\"Add note\"\n emptyState={{\n title: 'No notes yet',\n actionLabel: 'Add note',\n description: 'Notes added here are visible to the whole team.',\n }}\n translator={galleryTranslator}\n dataAdapter={notesAdapter}\n />\n </div>\n ),\n code: `import { NotesSection, type NotesDataAdapter } from '@open-mercato/ui/backend/detail'\n\n// Implement the adapter against your module's API (apiCall) \u2014 never fork the section.\nconst notesAdapter: NotesDataAdapter = {\n list: async ({ entityId }) => fetchNotes(entityId),\n create: async ({ entityId, body }) => createNote(entityId, body),\n update: async ({ id, patch }) => updateNote(id, patch),\n delete: async ({ id }) => deleteNote(id),\n}\n\n<NotesSection\n entityId={personId}\n viewerUserId={viewer.id}\n viewerName={viewer.name}\n emptyLabel={t('design_system.gallery.samples.notes.empty')}\n addActionLabel={t('design_system.gallery.samples.notes.add')}\n emptyState={{\n title: t('design_system.gallery.samples.notes.emptyTitle'),\n actionLabel: t('design_system.gallery.samples.notes.add'),\n }}\n translator={t}\n dataAdapter={notesAdapter}\n/>`,\n },\n ],\n}\n\nconst addressesSectionEntry: GalleryEntry = {\n id: 'addresses-section',\n title: 'AddressesSection',\n importPath: '@open-mercato/ui/backend/detail',\n variants: [\n {\n id: 'mock-adapter',\n title: 'Address tiles (inline mock adapter \u2014 no API)',\n render: () => (\n <div className=\"w-full max-w-2xl\">\n <AddressesSection\n entityId=\"person-1\"\n emptyLabel=\"No addresses yet\"\n addActionLabel=\"Add address\"\n emptyState={{ title: 'No addresses yet', actionLabel: 'Add address' }}\n translator={galleryTranslator}\n dataAdapter={addressesAdapter}\n />\n </div>\n ),\n code: `import { AddressesSection, type AddressDataAdapter } from '@open-mercato/ui/backend/detail'\n\nconst addressesAdapter: AddressDataAdapter = {\n list: async ({ entityId }) => fetchAddresses(entityId),\n create: async ({ entityId, payload }) => createAddress(entityId, payload),\n update: async ({ id, payload }) => updateAddress(id, payload),\n delete: async ({ id }) => deleteAddress(id),\n}\n\n<AddressesSection\n entityId={personId}\n emptyLabel={t('design_system.gallery.samples.addresses.empty')}\n addActionLabel={t('customers.people.detail.addresses.add')}\n emptyState={{\n title: t('design_system.gallery.samples.addresses.emptyTitle'),\n actionLabel: t('customers.people.detail.addresses.add'),\n }}\n translator={t}\n dataAdapter={addressesAdapter}\n/>`,\n },\n ],\n}\n\nconst attachmentsSectionEntry: GalleryEntry = {\n id: 'attachments-section',\n title: 'AttachmentsSection',\n importPath: '@open-mercato/ui/backend/detail',\n variants: [\n {\n id: 'unsaved-record',\n title: 'Unsaved record (recordId null \u2014 API fetch disabled)',\n render: () => (\n <div className=\"w-full max-w-2xl\">\n <AttachmentsSection\n entityId=\"customers:person\"\n recordId={null}\n title=\"Attachments\"\n description=\"Files linked to this record.\"\n />\n </div>\n ),\n code: `import { AttachmentsSection } from '@open-mercato/ui/backend/detail'\n\n// Fetches /api/attachments internally once recordId is set;\n// with recordId={null} it renders the save-first placeholder.\n<AttachmentsSection\n entityId=\"customers:person\"\n recordId={person?.id ?? null}\n title={t('design_system.gallery.samples.attachments.title')}\n description={t('design_system.gallery.samples.attachments.description')}\n/>`,\n },\n ],\n}\n\nexport const entries: GalleryEntry[] = [\n detailFieldsSectionEntry,\n loadingMessageEntry,\n errorMessageEntry,\n notesSectionEntry,\n addressesSectionEntry,\n attachmentsSectionEntry,\n]\n"],
|
|
5
5
|
"mappings": "AAmFM,SACE,KADF;AAlFN,SAAS,aAAa;AACtB,SAAS,cAAc;AACvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AAaP,MAAM,WAAW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AAAA,EACF;AACF;AAEO,MAAM,UAA0B;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -124,7 +124,7 @@ import {
|
|
|
124
124
|
] }),
|
|
125
125
|
/* @__PURE__ */ jsxs(DialogFooter, { layout: "equal", children: [
|
|
126
126
|
/* @__PURE__ */ jsx(DialogClose, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "outline", children: "Cancel" }) }),
|
|
127
|
-
/* @__PURE__ */ jsx(Button, { variant: "destructive", children: "Delete" })
|
|
127
|
+
/* @__PURE__ */ jsx(Button, { variant: "destructive-solid", children: "Delete" })
|
|
128
128
|
] })
|
|
129
129
|
] })
|
|
130
130
|
] }),
|
|
@@ -156,7 +156,7 @@ import {
|
|
|
156
156
|
<DialogClose asChild>
|
|
157
157
|
<Button variant="outline">Cancel</Button>
|
|
158
158
|
</DialogClose>
|
|
159
|
-
<Button variant="destructive">Delete</Button>
|
|
159
|
+
<Button variant="destructive-solid">Delete</Button>
|
|
160
160
|
</DialogFooter>
|
|
161
161
|
</DialogContent>
|
|
162
162
|
</Dialog>`
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/modules/design_system/gallery/entries/overlays.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react'\nimport {\n FilePlus2,\n Info,\n LayoutDashboard,\n Settings,\n TriangleAlert,\n UserRound,\n Users,\n} from 'lucide-react'\nimport { Button } from '@open-mercato/ui/primitives/button'\nimport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from '@open-mercato/ui/primitives/dialog'\nimport {\n Drawer,\n DrawerBody,\n DrawerClose,\n DrawerContent,\n DrawerDescription,\n DrawerFooter,\n DrawerHeader,\n DrawerTitle,\n DrawerTrigger,\n} from '@open-mercato/ui/primitives/drawer'\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetFooter,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from '@open-mercato/ui/primitives/sheet'\nimport {\n Popover,\n PopoverContent,\n PopoverTrigger,\n} from '@open-mercato/ui/primitives/popover'\nimport { SimpleTooltip } from '@open-mercato/ui/primitives/tooltip'\nimport {\n CommandMenu,\n CommandMenuContent,\n CommandMenuEmpty,\n CommandMenuFooter,\n CommandMenuGroup,\n CommandMenuInput,\n CommandMenuItem,\n CommandMenuList,\n CommandMenuSeparator,\n CommandMenuTrigger,\n} from '@open-mercato/ui/primitives/command-menu'\nimport type { GalleryEntry } from '../types'\n\n// Component titles and variant names are proper nouns from the codebase and\n// are deliberately not translated. `code` MUST contain the entry's importPath\n// (enforced by the registry-integrity test) and is always reviewed alongside\n// its sibling `render`.\n//\n// Every stateful overlay renders a REAL trigger in the preview stage and opens\n// uncontrolled \u2014 the actual Radix focus trap, Escape-to-close, and\n// outside-click behavior are exercised live, never imitated.\n\nconst dialogEntry: GalleryEntry = {\n id: 'dialog',\n title: 'Dialog',\n importPath: '@open-mercato/ui/primitives/dialog',\n docsAnchor: '#dialog',\n variants: [\n {\n id: 'default',\n title: 'default',\n render: () => (\n <Dialog>\n <DialogTrigger asChild>\n <Button variant=\"outline\">Open dialog</Button>\n </DialogTrigger>\n <DialogContent>\n <DialogHeader>\n <DialogTitle>Rename view</DialogTitle>\n <DialogDescription>\n The new name is visible to everyone in this workspace.\n </DialogDescription>\n </DialogHeader>\n <p className=\"text-sm text-muted-foreground\">\n Press Escape or click outside to dismiss.\n </p>\n <DialogFooter>\n <DialogClose asChild>\n <Button variant=\"outline\">Cancel</Button>\n </DialogClose>\n <Button>Save changes</Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n ),\n code: `import { Button } from '@open-mercato/ui/primitives/button'\nimport {\n Dialog,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogTitle,\n DialogDescription,\n DialogFooter,\n DialogClose,\n} from '@open-mercato/ui/primitives/dialog'\n\n<Dialog>\n <DialogTrigger asChild>\n <Button variant=\"outline\">Open dialog</Button>\n </DialogTrigger>\n <DialogContent>\n <DialogHeader>\n <DialogTitle>Rename view</DialogTitle>\n <DialogDescription>\n The new name is visible to everyone in this workspace.\n </DialogDescription>\n </DialogHeader>\n <DialogFooter>\n <DialogClose asChild>\n <Button variant=\"outline\">Cancel</Button>\n </DialogClose>\n <Button>Save changes</Button>\n </DialogFooter>\n </DialogContent>\n</Dialog>`,\n },\n {\n id: 'status-leading',\n title: 'Status leading badge',\n render: () => (\n <Dialog>\n <DialogTrigger asChild>\n <Button variant=\"destructive-outline\">Delete record</Button>\n </DialogTrigger>\n <DialogContent size=\"sm\">\n <DialogHeader leading={<TriangleAlert className=\"size-4\" />} leadingTone=\"error\">\n <DialogTitle>Delete this record?</DialogTitle>\n <DialogDescription>\n This removes the record from every linked view.\n </DialogDescription>\n </DialogHeader>\n <DialogFooter layout=\"equal\">\n <DialogClose asChild>\n <Button variant=\"outline\">Cancel</Button>\n </DialogClose>\n <Button variant=\"destructive\">Delete</Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n ),\n code: `import { TriangleAlert } from 'lucide-react'\nimport { Button } from '@open-mercato/ui/primitives/button'\nimport {\n Dialog,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogTitle,\n DialogDescription,\n DialogFooter,\n DialogClose,\n} from '@open-mercato/ui/primitives/dialog'\n\n<Dialog>\n <DialogTrigger asChild>\n <Button variant=\"destructive-outline\">Delete record</Button>\n </DialogTrigger>\n <DialogContent size=\"sm\">\n <DialogHeader leading={<TriangleAlert className=\"size-4\" />} leadingTone=\"error\">\n <DialogTitle>Delete this record?</DialogTitle>\n <DialogDescription>\n This removes the record from every linked view.\n </DialogDescription>\n </DialogHeader>\n <DialogFooter layout=\"equal\">\n <DialogClose asChild>\n <Button variant=\"outline\">Cancel</Button>\n </DialogClose>\n <Button variant=\"destructive\">Delete</Button>\n </DialogFooter>\n </DialogContent>\n</Dialog>`,\n },\n ],\n}\n\nconst drawerEntry: GalleryEntry = {\n id: 'drawer',\n title: 'Drawer',\n importPath: '@open-mercato/ui/primitives/drawer',\n docsAnchor: '#drawer',\n figmaNodeId: '486:7366',\n variants: [\n {\n id: 'default',\n title: 'default',\n render: () => (\n <Drawer>\n <DrawerTrigger asChild>\n <Button variant=\"outline\">Open drawer</Button>\n </DrawerTrigger>\n <DrawerContent>\n <DrawerHeader>\n <DrawerTitle>Edit person</DrawerTitle>\n <DrawerDescription>Update the contact details below.</DrawerDescription>\n </DrawerHeader>\n <DrawerBody>\n <div className=\"divide-y divide-input text-sm\">\n <div className=\"flex items-center justify-between py-3\">\n <span className=\"text-muted-foreground\">Name</span>\n <span className=\"text-foreground\">Anna Kowalska</span>\n </div>\n <div className=\"flex items-center justify-between py-3\">\n <span className=\"text-muted-foreground\">Role</span>\n <span className=\"text-foreground\">Account manager</span>\n </div>\n <div className=\"flex items-center justify-between py-3\">\n <span className=\"text-muted-foreground\">Team</span>\n <span className=\"text-foreground\">Sales EU</span>\n </div>\n </div>\n </DrawerBody>\n <DrawerFooter layout=\"equal\">\n <DrawerClose asChild>\n <Button variant=\"outline\">Cancel</Button>\n </DrawerClose>\n <Button>Save changes</Button>\n </DrawerFooter>\n </DrawerContent>\n </Drawer>\n ),\n code: `import { Button } from '@open-mercato/ui/primitives/button'\nimport {\n Drawer,\n DrawerTrigger,\n DrawerContent,\n DrawerHeader,\n DrawerTitle,\n DrawerDescription,\n DrawerBody,\n DrawerFooter,\n DrawerClose,\n} from '@open-mercato/ui/primitives/drawer'\n\n<Drawer>\n <DrawerTrigger asChild>\n <Button variant=\"outline\">Open drawer</Button>\n </DrawerTrigger>\n <DrawerContent>\n <DrawerHeader>\n <DrawerTitle>Edit person</DrawerTitle>\n <DrawerDescription>Update the contact details below.</DrawerDescription>\n </DrawerHeader>\n <DrawerBody>{/* content */}</DrawerBody>\n <DrawerFooter layout=\"equal\">\n <DrawerClose asChild>\n <Button variant=\"outline\">Cancel</Button>\n </DrawerClose>\n <Button>Save changes</Button>\n </DrawerFooter>\n </DrawerContent>\n</Drawer>`,\n },\n {\n id: 'leading-icon',\n title: 'Header leading icon',\n render: () => (\n <Drawer>\n <DrawerTrigger asChild>\n <Button variant=\"outline\">Open profile drawer</Button>\n </DrawerTrigger>\n <DrawerContent>\n <DrawerHeader leading={<UserRound className=\"size-4\" />}>\n <DrawerTitle>Profile details</DrawerTitle>\n <DrawerDescription>Read-only summary of this account.</DrawerDescription>\n </DrawerHeader>\n <DrawerBody>\n <p className=\"text-sm text-muted-foreground\">\n The header badge takes any Lucide icon via the <code>leading</code> prop.\n </p>\n </DrawerBody>\n <DrawerFooter layout=\"equal\">\n <DrawerClose asChild>\n <Button variant=\"outline\">Cancel</Button>\n </DrawerClose>\n <Button>Continue</Button>\n </DrawerFooter>\n </DrawerContent>\n </Drawer>\n ),\n code: `import { UserRound } from 'lucide-react'\nimport { Button } from '@open-mercato/ui/primitives/button'\nimport {\n Drawer,\n DrawerTrigger,\n DrawerContent,\n DrawerHeader,\n DrawerTitle,\n DrawerDescription,\n DrawerBody,\n DrawerFooter,\n DrawerClose,\n} from '@open-mercato/ui/primitives/drawer'\n\n<Drawer>\n <DrawerTrigger asChild>\n <Button variant=\"outline\">Open profile drawer</Button>\n </DrawerTrigger>\n <DrawerContent>\n <DrawerHeader leading={<UserRound className=\"size-4\" />}>\n <DrawerTitle>Profile details</DrawerTitle>\n <DrawerDescription>Read-only summary of this account.</DrawerDescription>\n </DrawerHeader>\n <DrawerBody>{/* content */}</DrawerBody>\n <DrawerFooter layout=\"equal\">\n <DrawerClose asChild>\n <Button variant=\"outline\">Cancel</Button>\n </DrawerClose>\n <Button>Continue</Button>\n </DrawerFooter>\n </DrawerContent>\n</Drawer>`,\n },\n ],\n}\n\nconst sheetEntry: GalleryEntry = {\n id: 'sheet',\n title: 'Sheet',\n importPath: '@open-mercato/ui/primitives/sheet',\n variants: [\n {\n id: 'right',\n title: 'right (default)',\n render: () => (\n <Sheet>\n <SheetTrigger asChild>\n <Button variant=\"outline\">Open sheet</Button>\n </SheetTrigger>\n <SheetContent>\n <SheetHeader>\n <SheetTitle>Filters</SheetTitle>\n <SheetDescription>Narrow down the current list.</SheetDescription>\n </SheetHeader>\n <div className=\"flex-1 px-4 text-sm text-muted-foreground\">\n Sheet body content scrolls independently of the header and footer.\n </div>\n <SheetFooter>\n <Button variant=\"outline\">Reset</Button>\n <Button>Apply</Button>\n </SheetFooter>\n </SheetContent>\n </Sheet>\n ),\n code: `import { Button } from '@open-mercato/ui/primitives/button'\nimport {\n Sheet,\n SheetTrigger,\n SheetContent,\n SheetHeader,\n SheetTitle,\n SheetDescription,\n SheetFooter,\n} from '@open-mercato/ui/primitives/sheet'\n\n<Sheet>\n <SheetTrigger asChild>\n <Button variant=\"outline\">Open sheet</Button>\n </SheetTrigger>\n <SheetContent>\n <SheetHeader>\n <SheetTitle>Filters</SheetTitle>\n <SheetDescription>Narrow down the current list.</SheetDescription>\n </SheetHeader>\n {/* body */}\n <SheetFooter>\n <Button variant=\"outline\">Reset</Button>\n <Button>Apply</Button>\n </SheetFooter>\n </SheetContent>\n</Sheet>`,\n },\n {\n id: 'left',\n title: 'side=\"left\"',\n render: () => (\n <Sheet>\n <SheetTrigger asChild>\n <Button variant=\"outline\">Open left sheet</Button>\n </SheetTrigger>\n <SheetContent side=\"left\">\n <SheetHeader>\n <SheetTitle>Navigation</SheetTitle>\n <SheetDescription>Slides in from the left edge.</SheetDescription>\n </SheetHeader>\n <div className=\"flex-1 px-4 text-sm text-muted-foreground\">\n Use the left side for mobile menus and secondary navigation.\n </div>\n </SheetContent>\n </Sheet>\n ),\n code: `import { Button } from '@open-mercato/ui/primitives/button'\nimport {\n Sheet,\n SheetTrigger,\n SheetContent,\n SheetHeader,\n SheetTitle,\n SheetDescription,\n} from '@open-mercato/ui/primitives/sheet'\n\n<Sheet>\n <SheetTrigger asChild>\n <Button variant=\"outline\">Open left sheet</Button>\n </SheetTrigger>\n <SheetContent side=\"left\">\n <SheetHeader>\n <SheetTitle>Navigation</SheetTitle>\n <SheetDescription>Slides in from the left edge.</SheetDescription>\n </SheetHeader>\n {/* body */}\n </SheetContent>\n</Sheet>`,\n },\n ],\n}\n\nconst popoverEntry: GalleryEntry = {\n id: 'popover',\n title: 'Popover',\n importPath: '@open-mercato/ui/primitives/popover',\n variants: [\n {\n id: 'default',\n title: 'default',\n render: () => (\n <Popover>\n <PopoverTrigger asChild>\n <Button variant=\"outline\">Open popover</Button>\n </PopoverTrigger>\n <PopoverContent className=\"p-4\">\n <div className=\"flex flex-col gap-1\">\n <span className=\"text-sm font-medium text-foreground\">Display density</span>\n <span className=\"text-sm text-muted-foreground\">\n Anchored to its trigger; Escape and outside-click dismiss it.\n </span>\n </div>\n </PopoverContent>\n </Popover>\n ),\n code: `import { Button } from '@open-mercato/ui/primitives/button'\nimport {\n Popover,\n PopoverTrigger,\n PopoverContent,\n} from '@open-mercato/ui/primitives/popover'\n\n<Popover>\n <PopoverTrigger asChild>\n <Button variant=\"outline\">Open popover</Button>\n </PopoverTrigger>\n <PopoverContent className=\"p-4\">\n {/* content */}\n </PopoverContent>\n</Popover>`,\n },\n {\n id: 'align-end',\n title: 'align=\"end\" + side=\"top\"',\n render: () => (\n <Popover>\n <PopoverTrigger asChild>\n <Button variant=\"outline\">Open above</Button>\n </PopoverTrigger>\n <PopoverContent side=\"top\" align=\"end\" className=\"p-4\">\n <span className=\"text-sm text-muted-foreground\">\n Placement follows Radix side/align props and flips when space runs out.\n </span>\n </PopoverContent>\n </Popover>\n ),\n code: `import { Button } from '@open-mercato/ui/primitives/button'\nimport {\n Popover,\n PopoverTrigger,\n PopoverContent,\n} from '@open-mercato/ui/primitives/popover'\n\n<Popover>\n <PopoverTrigger asChild>\n <Button variant=\"outline\">Open above</Button>\n </PopoverTrigger>\n <PopoverContent side=\"top\" align=\"end\" className=\"p-4\">\n {/* content */}\n </PopoverContent>\n</Popover>`,\n },\n ],\n}\n\nconst tooltipEntry: GalleryEntry = {\n id: 'tooltip',\n title: 'Tooltip',\n importPath: '@open-mercato/ui/primitives/tooltip',\n docsAnchor: '#tooltip--simpletooltip',\n variants: [\n {\n id: 'default',\n title: 'default (dark)',\n render: () => (\n <SimpleTooltip content=\"Duplicates this view with all filters\">\n <Button variant=\"outline\">Hover me</Button>\n </SimpleTooltip>\n ),\n code: `import { SimpleTooltip } from '@open-mercato/ui/primitives/tooltip'\nimport { Button } from '@open-mercato/ui/primitives/button'\n\n<SimpleTooltip content=\"Duplicates this view with all filters\">\n <Button variant=\"outline\">Hover me</Button>\n</SimpleTooltip>`,\n },\n {\n id: 'light',\n title: 'light',\n render: () => (\n <SimpleTooltip content=\"Help text on a light surface\" variant=\"light\">\n <Button variant=\"outline\">\n <Info />\n Light variant\n </Button>\n </SimpleTooltip>\n ),\n code: `import { Info } from 'lucide-react'\nimport { SimpleTooltip } from '@open-mercato/ui/primitives/tooltip'\nimport { Button } from '@open-mercato/ui/primitives/button'\n\n<SimpleTooltip content=\"Help text on a light surface\" variant=\"light\">\n <Button variant=\"outline\"><Info />Light variant</Button>\n</SimpleTooltip>`,\n },\n {\n id: 'sizes',\n title: 'Sizes',\n render: () => (\n <>\n <SimpleTooltip content=\"Small\" size=\"sm\">\n <Button variant=\"outline\" size=\"sm\">sm</Button>\n </SimpleTooltip>\n <SimpleTooltip content=\"Default\">\n <Button variant=\"outline\" size=\"sm\">default</Button>\n </SimpleTooltip>\n <SimpleTooltip content=\"Large tooltip for longer helper copy\" size=\"lg\">\n <Button variant=\"outline\" size=\"sm\">lg</Button>\n </SimpleTooltip>\n </>\n ),\n code: `import { SimpleTooltip } from '@open-mercato/ui/primitives/tooltip'\nimport { Button } from '@open-mercato/ui/primitives/button'\n\n<SimpleTooltip content=\"Small\" size=\"sm\">\n <Button variant=\"outline\" size=\"sm\">sm</Button>\n</SimpleTooltip>\n<SimpleTooltip content=\"Default\">\n <Button variant=\"outline\" size=\"sm\">default</Button>\n</SimpleTooltip>\n<SimpleTooltip content=\"Large tooltip for longer helper copy\" size=\"lg\">\n <Button variant=\"outline\" size=\"sm\">lg</Button>\n</SimpleTooltip>`,\n },\n ],\n}\n\nconst commandMenuEntry: GalleryEntry = {\n id: 'command-menu',\n title: 'CommandMenu',\n importPath: '@open-mercato/ui/primitives/command-menu',\n docsAnchor: '#commandmenu',\n variants: [\n {\n id: 'default',\n title: 'default',\n render: () => (\n <CommandMenu>\n <CommandMenuTrigger asChild>\n <Button variant=\"outline\">Open command menu</Button>\n </CommandMenuTrigger>\n <CommandMenuContent>\n <CommandMenuInput placeholder=\"Search actions...\" />\n <CommandMenuList>\n <CommandMenuEmpty>No results.</CommandMenuEmpty>\n <CommandMenuGroup heading=\"Actions\">\n <CommandMenuItem leading={<FilePlus2 className=\"size-4 text-muted-foreground\" />}>\n Create record\n </CommandMenuItem>\n <CommandMenuItem leading={<Users className=\"size-4 text-muted-foreground\" />} description=\"Invite teammates to this workspace\">\n Manage members\n </CommandMenuItem>\n </CommandMenuGroup>\n <CommandMenuSeparator />\n <CommandMenuGroup heading=\"Navigate\">\n <CommandMenuItem leading={<LayoutDashboard className=\"size-4 text-muted-foreground\" />}>\n Go to dashboard\n </CommandMenuItem>\n <CommandMenuItem leading={<Settings className=\"size-4 text-muted-foreground\" />}>\n Open settings\n </CommandMenuItem>\n </CommandMenuGroup>\n </CommandMenuList>\n <CommandMenuFooter />\n </CommandMenuContent>\n </CommandMenu>\n ),\n code: `import { FilePlus2, LayoutDashboard, Settings, Users } from 'lucide-react'\nimport { Button } from '@open-mercato/ui/primitives/button'\nimport {\n CommandMenu,\n CommandMenuTrigger,\n CommandMenuContent,\n CommandMenuInput,\n CommandMenuList,\n CommandMenuEmpty,\n CommandMenuGroup,\n CommandMenuItem,\n CommandMenuSeparator,\n CommandMenuFooter,\n} from '@open-mercato/ui/primitives/command-menu'\n\n<CommandMenu>\n <CommandMenuTrigger asChild>\n <Button variant=\"outline\">Open command menu</Button>\n </CommandMenuTrigger>\n <CommandMenuContent>\n <CommandMenuInput placeholder=\"Search actions...\" />\n <CommandMenuList>\n <CommandMenuEmpty>No results.</CommandMenuEmpty>\n <CommandMenuGroup heading=\"Actions\">\n <CommandMenuItem leading={<FilePlus2 className=\"size-4\" />}>\n Create record\n </CommandMenuItem>\n <CommandMenuItem leading={<Users className=\"size-4\" />} description=\"Invite teammates to this workspace\">\n Manage members\n </CommandMenuItem>\n </CommandMenuGroup>\n <CommandMenuSeparator />\n <CommandMenuGroup heading=\"Navigate\">\n <CommandMenuItem leading={<LayoutDashboard className=\"size-4\" />}>\n Go to dashboard\n </CommandMenuItem>\n <CommandMenuItem leading={<Settings className=\"size-4\" />}>\n Open settings\n </CommandMenuItem>\n </CommandMenuGroup>\n </CommandMenuList>\n <CommandMenuFooter />\n </CommandMenuContent>\n</CommandMenu>`,\n },\n ],\n}\n\nexport const entries: GalleryEntry[] = [\n dialogEntry,\n drawerEntry,\n sheetEntry,\n popoverEntry,\n tooltipEntry,\n commandMenuEntry,\n]\n"],
|
|
5
|
-
"mappings": "AAkFY,SAudJ,UAvdI,KAGA,YAHA;AAjFZ;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,cAAc;AACvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,qBAAqB;AAC9B;AAAA,EACE;AAAA,E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ACF;AAAA,UACA,qBAAC,gBAAa,QAAO,SACnB;AAAA,gCAAC,eAAY,SAAO,MAClB,8BAAC,UAAO,SAAQ,WAAU,oBAAM,GAClC;AAAA,YACA,oBAAC,UAAO,SAAQ,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react'\nimport {\n FilePlus2,\n Info,\n LayoutDashboard,\n Settings,\n TriangleAlert,\n UserRound,\n Users,\n} from 'lucide-react'\nimport { Button } from '@open-mercato/ui/primitives/button'\nimport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from '@open-mercato/ui/primitives/dialog'\nimport {\n Drawer,\n DrawerBody,\n DrawerClose,\n DrawerContent,\n DrawerDescription,\n DrawerFooter,\n DrawerHeader,\n DrawerTitle,\n DrawerTrigger,\n} from '@open-mercato/ui/primitives/drawer'\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetFooter,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from '@open-mercato/ui/primitives/sheet'\nimport {\n Popover,\n PopoverContent,\n PopoverTrigger,\n} from '@open-mercato/ui/primitives/popover'\nimport { SimpleTooltip } from '@open-mercato/ui/primitives/tooltip'\nimport {\n CommandMenu,\n CommandMenuContent,\n CommandMenuEmpty,\n CommandMenuFooter,\n CommandMenuGroup,\n CommandMenuInput,\n CommandMenuItem,\n CommandMenuList,\n CommandMenuSeparator,\n CommandMenuTrigger,\n} from '@open-mercato/ui/primitives/command-menu'\nimport type { GalleryEntry } from '../types'\n\n// Component titles and variant names are proper nouns from the codebase and\n// are deliberately not translated. `code` MUST contain the entry's importPath\n// (enforced by the registry-integrity test) and is always reviewed alongside\n// its sibling `render`.\n//\n// Every stateful overlay renders a REAL trigger in the preview stage and opens\n// uncontrolled \u2014 the actual Radix focus trap, Escape-to-close, and\n// outside-click behavior are exercised live, never imitated.\n\nconst dialogEntry: GalleryEntry = {\n id: 'dialog',\n title: 'Dialog',\n importPath: '@open-mercato/ui/primitives/dialog',\n docsAnchor: '#dialog',\n variants: [\n {\n id: 'default',\n title: 'default',\n render: () => (\n <Dialog>\n <DialogTrigger asChild>\n <Button variant=\"outline\">Open dialog</Button>\n </DialogTrigger>\n <DialogContent>\n <DialogHeader>\n <DialogTitle>Rename view</DialogTitle>\n <DialogDescription>\n The new name is visible to everyone in this workspace.\n </DialogDescription>\n </DialogHeader>\n <p className=\"text-sm text-muted-foreground\">\n Press Escape or click outside to dismiss.\n </p>\n <DialogFooter>\n <DialogClose asChild>\n <Button variant=\"outline\">Cancel</Button>\n </DialogClose>\n <Button>Save changes</Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n ),\n code: `import { Button } from '@open-mercato/ui/primitives/button'\nimport {\n Dialog,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogTitle,\n DialogDescription,\n DialogFooter,\n DialogClose,\n} from '@open-mercato/ui/primitives/dialog'\n\n<Dialog>\n <DialogTrigger asChild>\n <Button variant=\"outline\">Open dialog</Button>\n </DialogTrigger>\n <DialogContent>\n <DialogHeader>\n <DialogTitle>Rename view</DialogTitle>\n <DialogDescription>\n The new name is visible to everyone in this workspace.\n </DialogDescription>\n </DialogHeader>\n <DialogFooter>\n <DialogClose asChild>\n <Button variant=\"outline\">Cancel</Button>\n </DialogClose>\n <Button>Save changes</Button>\n </DialogFooter>\n </DialogContent>\n</Dialog>`,\n },\n {\n id: 'status-leading',\n title: 'Status leading badge',\n render: () => (\n <Dialog>\n <DialogTrigger asChild>\n <Button variant=\"destructive-outline\">Delete record</Button>\n </DialogTrigger>\n <DialogContent size=\"sm\">\n <DialogHeader leading={<TriangleAlert className=\"size-4\" />} leadingTone=\"error\">\n <DialogTitle>Delete this record?</DialogTitle>\n <DialogDescription>\n This removes the record from every linked view.\n </DialogDescription>\n </DialogHeader>\n <DialogFooter layout=\"equal\">\n <DialogClose asChild>\n <Button variant=\"outline\">Cancel</Button>\n </DialogClose>\n <Button variant=\"destructive-solid\">Delete</Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n ),\n code: `import { TriangleAlert } from 'lucide-react'\nimport { Button } from '@open-mercato/ui/primitives/button'\nimport {\n Dialog,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogTitle,\n DialogDescription,\n DialogFooter,\n DialogClose,\n} from '@open-mercato/ui/primitives/dialog'\n\n<Dialog>\n <DialogTrigger asChild>\n <Button variant=\"destructive-outline\">Delete record</Button>\n </DialogTrigger>\n <DialogContent size=\"sm\">\n <DialogHeader leading={<TriangleAlert className=\"size-4\" />} leadingTone=\"error\">\n <DialogTitle>Delete this record?</DialogTitle>\n <DialogDescription>\n This removes the record from every linked view.\n </DialogDescription>\n </DialogHeader>\n <DialogFooter layout=\"equal\">\n <DialogClose asChild>\n <Button variant=\"outline\">Cancel</Button>\n </DialogClose>\n <Button variant=\"destructive-solid\">Delete</Button>\n </DialogFooter>\n </DialogContent>\n</Dialog>`,\n },\n ],\n}\n\nconst drawerEntry: GalleryEntry = {\n id: 'drawer',\n title: 'Drawer',\n importPath: '@open-mercato/ui/primitives/drawer',\n docsAnchor: '#drawer',\n figmaNodeId: '486:7366',\n variants: [\n {\n id: 'default',\n title: 'default',\n render: () => (\n <Drawer>\n <DrawerTrigger asChild>\n <Button variant=\"outline\">Open drawer</Button>\n </DrawerTrigger>\n <DrawerContent>\n <DrawerHeader>\n <DrawerTitle>Edit person</DrawerTitle>\n <DrawerDescription>Update the contact details below.</DrawerDescription>\n </DrawerHeader>\n <DrawerBody>\n <div className=\"divide-y divide-input text-sm\">\n <div className=\"flex items-center justify-between py-3\">\n <span className=\"text-muted-foreground\">Name</span>\n <span className=\"text-foreground\">Anna Kowalska</span>\n </div>\n <div className=\"flex items-center justify-between py-3\">\n <span className=\"text-muted-foreground\">Role</span>\n <span className=\"text-foreground\">Account manager</span>\n </div>\n <div className=\"flex items-center justify-between py-3\">\n <span className=\"text-muted-foreground\">Team</span>\n <span className=\"text-foreground\">Sales EU</span>\n </div>\n </div>\n </DrawerBody>\n <DrawerFooter layout=\"equal\">\n <DrawerClose asChild>\n <Button variant=\"outline\">Cancel</Button>\n </DrawerClose>\n <Button>Save changes</Button>\n </DrawerFooter>\n </DrawerContent>\n </Drawer>\n ),\n code: `import { Button } from '@open-mercato/ui/primitives/button'\nimport {\n Drawer,\n DrawerTrigger,\n DrawerContent,\n DrawerHeader,\n DrawerTitle,\n DrawerDescription,\n DrawerBody,\n DrawerFooter,\n DrawerClose,\n} from '@open-mercato/ui/primitives/drawer'\n\n<Drawer>\n <DrawerTrigger asChild>\n <Button variant=\"outline\">Open drawer</Button>\n </DrawerTrigger>\n <DrawerContent>\n <DrawerHeader>\n <DrawerTitle>Edit person</DrawerTitle>\n <DrawerDescription>Update the contact details below.</DrawerDescription>\n </DrawerHeader>\n <DrawerBody>{/* content */}</DrawerBody>\n <DrawerFooter layout=\"equal\">\n <DrawerClose asChild>\n <Button variant=\"outline\">Cancel</Button>\n </DrawerClose>\n <Button>Save changes</Button>\n </DrawerFooter>\n </DrawerContent>\n</Drawer>`,\n },\n {\n id: 'leading-icon',\n title: 'Header leading icon',\n render: () => (\n <Drawer>\n <DrawerTrigger asChild>\n <Button variant=\"outline\">Open profile drawer</Button>\n </DrawerTrigger>\n <DrawerContent>\n <DrawerHeader leading={<UserRound className=\"size-4\" />}>\n <DrawerTitle>Profile details</DrawerTitle>\n <DrawerDescription>Read-only summary of this account.</DrawerDescription>\n </DrawerHeader>\n <DrawerBody>\n <p className=\"text-sm text-muted-foreground\">\n The header badge takes any Lucide icon via the <code>leading</code> prop.\n </p>\n </DrawerBody>\n <DrawerFooter layout=\"equal\">\n <DrawerClose asChild>\n <Button variant=\"outline\">Cancel</Button>\n </DrawerClose>\n <Button>Continue</Button>\n </DrawerFooter>\n </DrawerContent>\n </Drawer>\n ),\n code: `import { UserRound } from 'lucide-react'\nimport { Button } from '@open-mercato/ui/primitives/button'\nimport {\n Drawer,\n DrawerTrigger,\n DrawerContent,\n DrawerHeader,\n DrawerTitle,\n DrawerDescription,\n DrawerBody,\n DrawerFooter,\n DrawerClose,\n} from '@open-mercato/ui/primitives/drawer'\n\n<Drawer>\n <DrawerTrigger asChild>\n <Button variant=\"outline\">Open profile drawer</Button>\n </DrawerTrigger>\n <DrawerContent>\n <DrawerHeader leading={<UserRound className=\"size-4\" />}>\n <DrawerTitle>Profile details</DrawerTitle>\n <DrawerDescription>Read-only summary of this account.</DrawerDescription>\n </DrawerHeader>\n <DrawerBody>{/* content */}</DrawerBody>\n <DrawerFooter layout=\"equal\">\n <DrawerClose asChild>\n <Button variant=\"outline\">Cancel</Button>\n </DrawerClose>\n <Button>Continue</Button>\n </DrawerFooter>\n </DrawerContent>\n</Drawer>`,\n },\n ],\n}\n\nconst sheetEntry: GalleryEntry = {\n id: 'sheet',\n title: 'Sheet',\n importPath: '@open-mercato/ui/primitives/sheet',\n variants: [\n {\n id: 'right',\n title: 'right (default)',\n render: () => (\n <Sheet>\n <SheetTrigger asChild>\n <Button variant=\"outline\">Open sheet</Button>\n </SheetTrigger>\n <SheetContent>\n <SheetHeader>\n <SheetTitle>Filters</SheetTitle>\n <SheetDescription>Narrow down the current list.</SheetDescription>\n </SheetHeader>\n <div className=\"flex-1 px-4 text-sm text-muted-foreground\">\n Sheet body content scrolls independently of the header and footer.\n </div>\n <SheetFooter>\n <Button variant=\"outline\">Reset</Button>\n <Button>Apply</Button>\n </SheetFooter>\n </SheetContent>\n </Sheet>\n ),\n code: `import { Button } from '@open-mercato/ui/primitives/button'\nimport {\n Sheet,\n SheetTrigger,\n SheetContent,\n SheetHeader,\n SheetTitle,\n SheetDescription,\n SheetFooter,\n} from '@open-mercato/ui/primitives/sheet'\n\n<Sheet>\n <SheetTrigger asChild>\n <Button variant=\"outline\">Open sheet</Button>\n </SheetTrigger>\n <SheetContent>\n <SheetHeader>\n <SheetTitle>Filters</SheetTitle>\n <SheetDescription>Narrow down the current list.</SheetDescription>\n </SheetHeader>\n {/* body */}\n <SheetFooter>\n <Button variant=\"outline\">Reset</Button>\n <Button>Apply</Button>\n </SheetFooter>\n </SheetContent>\n</Sheet>`,\n },\n {\n id: 'left',\n title: 'side=\"left\"',\n render: () => (\n <Sheet>\n <SheetTrigger asChild>\n <Button variant=\"outline\">Open left sheet</Button>\n </SheetTrigger>\n <SheetContent side=\"left\">\n <SheetHeader>\n <SheetTitle>Navigation</SheetTitle>\n <SheetDescription>Slides in from the left edge.</SheetDescription>\n </SheetHeader>\n <div className=\"flex-1 px-4 text-sm text-muted-foreground\">\n Use the left side for mobile menus and secondary navigation.\n </div>\n </SheetContent>\n </Sheet>\n ),\n code: `import { Button } from '@open-mercato/ui/primitives/button'\nimport {\n Sheet,\n SheetTrigger,\n SheetContent,\n SheetHeader,\n SheetTitle,\n SheetDescription,\n} from '@open-mercato/ui/primitives/sheet'\n\n<Sheet>\n <SheetTrigger asChild>\n <Button variant=\"outline\">Open left sheet</Button>\n </SheetTrigger>\n <SheetContent side=\"left\">\n <SheetHeader>\n <SheetTitle>Navigation</SheetTitle>\n <SheetDescription>Slides in from the left edge.</SheetDescription>\n </SheetHeader>\n {/* body */}\n </SheetContent>\n</Sheet>`,\n },\n ],\n}\n\nconst popoverEntry: GalleryEntry = {\n id: 'popover',\n title: 'Popover',\n importPath: '@open-mercato/ui/primitives/popover',\n variants: [\n {\n id: 'default',\n title: 'default',\n render: () => (\n <Popover>\n <PopoverTrigger asChild>\n <Button variant=\"outline\">Open popover</Button>\n </PopoverTrigger>\n <PopoverContent className=\"p-4\">\n <div className=\"flex flex-col gap-1\">\n <span className=\"text-sm font-medium text-foreground\">Display density</span>\n <span className=\"text-sm text-muted-foreground\">\n Anchored to its trigger; Escape and outside-click dismiss it.\n </span>\n </div>\n </PopoverContent>\n </Popover>\n ),\n code: `import { Button } from '@open-mercato/ui/primitives/button'\nimport {\n Popover,\n PopoverTrigger,\n PopoverContent,\n} from '@open-mercato/ui/primitives/popover'\n\n<Popover>\n <PopoverTrigger asChild>\n <Button variant=\"outline\">Open popover</Button>\n </PopoverTrigger>\n <PopoverContent className=\"p-4\">\n {/* content */}\n </PopoverContent>\n</Popover>`,\n },\n {\n id: 'align-end',\n title: 'align=\"end\" + side=\"top\"',\n render: () => (\n <Popover>\n <PopoverTrigger asChild>\n <Button variant=\"outline\">Open above</Button>\n </PopoverTrigger>\n <PopoverContent side=\"top\" align=\"end\" className=\"p-4\">\n <span className=\"text-sm text-muted-foreground\">\n Placement follows Radix side/align props and flips when space runs out.\n </span>\n </PopoverContent>\n </Popover>\n ),\n code: `import { Button } from '@open-mercato/ui/primitives/button'\nimport {\n Popover,\n PopoverTrigger,\n PopoverContent,\n} from '@open-mercato/ui/primitives/popover'\n\n<Popover>\n <PopoverTrigger asChild>\n <Button variant=\"outline\">Open above</Button>\n </PopoverTrigger>\n <PopoverContent side=\"top\" align=\"end\" className=\"p-4\">\n {/* content */}\n </PopoverContent>\n</Popover>`,\n },\n ],\n}\n\nconst tooltipEntry: GalleryEntry = {\n id: 'tooltip',\n title: 'Tooltip',\n importPath: '@open-mercato/ui/primitives/tooltip',\n docsAnchor: '#tooltip--simpletooltip',\n variants: [\n {\n id: 'default',\n title: 'default (dark)',\n render: () => (\n <SimpleTooltip content=\"Duplicates this view with all filters\">\n <Button variant=\"outline\">Hover me</Button>\n </SimpleTooltip>\n ),\n code: `import { SimpleTooltip } from '@open-mercato/ui/primitives/tooltip'\nimport { Button } from '@open-mercato/ui/primitives/button'\n\n<SimpleTooltip content=\"Duplicates this view with all filters\">\n <Button variant=\"outline\">Hover me</Button>\n</SimpleTooltip>`,\n },\n {\n id: 'light',\n title: 'light',\n render: () => (\n <SimpleTooltip content=\"Help text on a light surface\" variant=\"light\">\n <Button variant=\"outline\">\n <Info />\n Light variant\n </Button>\n </SimpleTooltip>\n ),\n code: `import { Info } from 'lucide-react'\nimport { SimpleTooltip } from '@open-mercato/ui/primitives/tooltip'\nimport { Button } from '@open-mercato/ui/primitives/button'\n\n<SimpleTooltip content=\"Help text on a light surface\" variant=\"light\">\n <Button variant=\"outline\"><Info />Light variant</Button>\n</SimpleTooltip>`,\n },\n {\n id: 'sizes',\n title: 'Sizes',\n render: () => (\n <>\n <SimpleTooltip content=\"Small\" size=\"sm\">\n <Button variant=\"outline\" size=\"sm\">sm</Button>\n </SimpleTooltip>\n <SimpleTooltip content=\"Default\">\n <Button variant=\"outline\" size=\"sm\">default</Button>\n </SimpleTooltip>\n <SimpleTooltip content=\"Large tooltip for longer helper copy\" size=\"lg\">\n <Button variant=\"outline\" size=\"sm\">lg</Button>\n </SimpleTooltip>\n </>\n ),\n code: `import { SimpleTooltip } from '@open-mercato/ui/primitives/tooltip'\nimport { Button } from '@open-mercato/ui/primitives/button'\n\n<SimpleTooltip content=\"Small\" size=\"sm\">\n <Button variant=\"outline\" size=\"sm\">sm</Button>\n</SimpleTooltip>\n<SimpleTooltip content=\"Default\">\n <Button variant=\"outline\" size=\"sm\">default</Button>\n</SimpleTooltip>\n<SimpleTooltip content=\"Large tooltip for longer helper copy\" size=\"lg\">\n <Button variant=\"outline\" size=\"sm\">lg</Button>\n</SimpleTooltip>`,\n },\n ],\n}\n\nconst commandMenuEntry: GalleryEntry = {\n id: 'command-menu',\n title: 'CommandMenu',\n importPath: '@open-mercato/ui/primitives/command-menu',\n docsAnchor: '#commandmenu',\n variants: [\n {\n id: 'default',\n title: 'default',\n render: () => (\n <CommandMenu>\n <CommandMenuTrigger asChild>\n <Button variant=\"outline\">Open command menu</Button>\n </CommandMenuTrigger>\n <CommandMenuContent>\n <CommandMenuInput placeholder=\"Search actions...\" />\n <CommandMenuList>\n <CommandMenuEmpty>No results.</CommandMenuEmpty>\n <CommandMenuGroup heading=\"Actions\">\n <CommandMenuItem leading={<FilePlus2 className=\"size-4 text-muted-foreground\" />}>\n Create record\n </CommandMenuItem>\n <CommandMenuItem leading={<Users className=\"size-4 text-muted-foreground\" />} description=\"Invite teammates to this workspace\">\n Manage members\n </CommandMenuItem>\n </CommandMenuGroup>\n <CommandMenuSeparator />\n <CommandMenuGroup heading=\"Navigate\">\n <CommandMenuItem leading={<LayoutDashboard className=\"size-4 text-muted-foreground\" />}>\n Go to dashboard\n </CommandMenuItem>\n <CommandMenuItem leading={<Settings className=\"size-4 text-muted-foreground\" />}>\n Open settings\n </CommandMenuItem>\n </CommandMenuGroup>\n </CommandMenuList>\n <CommandMenuFooter />\n </CommandMenuContent>\n </CommandMenu>\n ),\n code: `import { FilePlus2, LayoutDashboard, Settings, Users } from 'lucide-react'\nimport { Button } from '@open-mercato/ui/primitives/button'\nimport {\n CommandMenu,\n CommandMenuTrigger,\n CommandMenuContent,\n CommandMenuInput,\n CommandMenuList,\n CommandMenuEmpty,\n CommandMenuGroup,\n CommandMenuItem,\n CommandMenuSeparator,\n CommandMenuFooter,\n} from '@open-mercato/ui/primitives/command-menu'\n\n<CommandMenu>\n <CommandMenuTrigger asChild>\n <Button variant=\"outline\">Open command menu</Button>\n </CommandMenuTrigger>\n <CommandMenuContent>\n <CommandMenuInput placeholder=\"Search actions...\" />\n <CommandMenuList>\n <CommandMenuEmpty>No results.</CommandMenuEmpty>\n <CommandMenuGroup heading=\"Actions\">\n <CommandMenuItem leading={<FilePlus2 className=\"size-4\" />}>\n Create record\n </CommandMenuItem>\n <CommandMenuItem leading={<Users className=\"size-4\" />} description=\"Invite teammates to this workspace\">\n Manage members\n </CommandMenuItem>\n </CommandMenuGroup>\n <CommandMenuSeparator />\n <CommandMenuGroup heading=\"Navigate\">\n <CommandMenuItem leading={<LayoutDashboard className=\"size-4\" />}>\n Go to dashboard\n </CommandMenuItem>\n <CommandMenuItem leading={<Settings className=\"size-4\" />}>\n Open settings\n </CommandMenuItem>\n </CommandMenuGroup>\n </CommandMenuList>\n <CommandMenuFooter />\n </CommandMenuContent>\n</CommandMenu>`,\n },\n ],\n}\n\nexport const entries: GalleryEntry[] = [\n dialogEntry,\n drawerEntry,\n sheetEntry,\n popoverEntry,\n tooltipEntry,\n commandMenuEntry,\n]\n"],
|
|
5
|
+
"mappings": "AAkFY,SAudJ,UAvdI,KAGA,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AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IA4CR;AAAA,EACF;AACF;AAEO,MAAM,UAA0B;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -66,7 +66,7 @@ const pageEntry = {
|
|
|
66
66
|
code: `import { Page, PageBody, PageHeader } from '@open-mercato/ui/backend/Page'
|
|
67
67
|
|
|
68
68
|
<Page>
|
|
69
|
-
<PageHeader title={t('currencies.list.title')} description={t('
|
|
69
|
+
<PageHeader title={t('currencies.list.title')} description={t('design_system.gallery.samples.listDescription')} />
|
|
70
70
|
<PageBody>{/* DataTable, sections\u2026 */}</PageBody>
|
|
71
71
|
</Page>`
|
|
72
72
|
},
|
|
@@ -133,7 +133,7 @@ import { SectionHeader } from '@open-mercato/ui/backend/SectionHeader'
|
|
|
133
133
|
import { Button } from '@open-mercato/ui/primitives/button'
|
|
134
134
|
|
|
135
135
|
<SectionHeader
|
|
136
|
-
title={t('
|
|
136
|
+
title={t('design_system.gallery.samples.addresses.title')}
|
|
137
137
|
count={addresses.length}
|
|
138
138
|
action={<Button variant="ghost" size="sm"><Plus className="size-4" /> {t('common.add')}</Button>}
|
|
139
139
|
/>`
|
|
@@ -144,7 +144,7 @@ import { Button } from '@open-mercato/ui/primitives/button'
|
|
|
144
144
|
render: () => /* @__PURE__ */ jsx("div", { className: "w-full max-w-md", children: /* @__PURE__ */ jsx(CollapsibleSection, { title: "Billing details", count: 2, children: /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-dashed p-4 text-sm text-muted-foreground", children: "Section content" }) }) }),
|
|
145
145
|
code: `import { CollapsibleSection } from '@open-mercato/ui/backend/SectionHeader'
|
|
146
146
|
|
|
147
|
-
<CollapsibleSection title={t('
|
|
147
|
+
<CollapsibleSection title={t('design_system.gallery.samples.billingDetails')} count={2}>
|
|
148
148
|
{/* section content */}
|
|
149
149
|
</CollapsibleSection>`
|
|
150
150
|
}
|
|
@@ -173,7 +173,7 @@ const sections: SectionNavGroup[] = [
|
|
|
173
173
|
},
|
|
174
174
|
]
|
|
175
175
|
|
|
176
|
-
<SectionPage title={t('profile.title')} sections={sections} activePath={pathname}>
|
|
176
|
+
<SectionPage title={t('profile.page.title')} sections={sections} activePath={pathname}>
|
|
177
177
|
{children}
|
|
178
178
|
</SectionPage>`
|
|
179
179
|
},
|
|
@@ -186,7 +186,7 @@ const sections: SectionNavGroup[] = [
|
|
|
186
186
|
const [collapsed, setCollapsed] = React.useState(false)
|
|
187
187
|
|
|
188
188
|
<SectionNav
|
|
189
|
-
title={t('profile.title')}
|
|
189
|
+
title={t('profile.page.title')}
|
|
190
190
|
sections={sections}
|
|
191
191
|
activePath={pathname}
|
|
192
192
|
collapsed={collapsed}
|
|
@@ -221,7 +221,7 @@ const formHeaderEntry = {
|
|
|
221
221
|
<FormHeader
|
|
222
222
|
backHref="/backend/products"
|
|
223
223
|
backLabel={t('ui.navigation.back')}
|
|
224
|
-
title={t('products.edit.title')}
|
|
224
|
+
title={t('catalog.products.edit.title')}
|
|
225
225
|
actions={{
|
|
226
226
|
cancelHref: '/backend/products',
|
|
227
227
|
cancelLabel: t('ui.forms.actions.cancel'),
|
|
@@ -258,9 +258,9 @@ import { FormHeader } from '@open-mercato/ui/backend/forms'
|
|
|
258
258
|
<FormHeader
|
|
259
259
|
mode="detail"
|
|
260
260
|
backHref="/backend/customers/companies"
|
|
261
|
-
entityTypeLabel={t('
|
|
261
|
+
entityTypeLabel={t('design_system.gallery.samples.entityType')}
|
|
262
262
|
title={company.name}
|
|
263
|
-
subtitle={t('
|
|
263
|
+
subtitle={t('design_system.gallery.samples.createdAt', { date: createdAt })}
|
|
264
264
|
statusBadge={<Badge variant="muted">{statusLabel}</Badge>}
|
|
265
265
|
menuActions={[
|
|
266
266
|
{ id: 'duplicate', label: t('ui.actions.duplicate'), icon: Copy, onSelect: duplicate },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/modules/design_system/gallery/entries/scaffolding.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react'\nimport { Archive, Copy, Download, Lock, Plus, Trash2, UserRound } from 'lucide-react'\nimport { Badge } from '@open-mercato/ui/primitives/badge'\nimport { Button } from '@open-mercato/ui/primitives/button'\nimport { Page, PageBody, PageHeader } from '@open-mercato/ui/backend/Page'\nimport { CollapsibleSection, SectionHeader } from '@open-mercato/ui/backend/SectionHeader'\nimport {\n SectionNav,\n SectionPage,\n type SectionNavGroup,\n} from '@open-mercato/ui/backend/section-page'\nimport {\n ActionsDropdown,\n FormFooter,\n FormHeader,\n type ActionItem,\n} from '@open-mercato/ui/backend/forms'\nimport type { GalleryEntry } from '../types'\n\n// Component titles and variant names are proper nouns from the codebase and\n// are deliberately not translated. `code` MUST contain the entry's importPath\n// (enforced by the registry-integrity test) and is always reviewed alongside\n// its sibling `render`.\n\n// The demos use `#`-anchors as hrefs so clicking inside the gallery never\n// navigates away, and every callback is a no-op.\n\nconst demoSections: SectionNavGroup[] = [\n {\n id: 'account',\n label: 'Account',\n items: [\n { id: 'profile', label: 'Profile', href: '#profile', icon: <UserRound className=\"size-4\" /> },\n { id: 'security', label: 'Security', href: '#security', icon: <Lock className=\"size-4\" /> },\n ],\n },\n]\n\n// SectionPage stretches to the viewport by design \u2014 the miniature demo clips\n// it inside a fixed-height frame so the two-item nav plus content stay small.\nfunction SectionPageMiniDemo() {\n return (\n <div className=\"h-80 w-full overflow-hidden rounded-lg border bg-background\">\n <SectionPage title=\"Settings\" sections={demoSections} activePath=\"#profile\">\n <div className=\"space-y-2\">\n <h2 className=\"text-sm font-semibold\">Profile</h2>\n <p className=\"text-sm text-muted-foreground\">Section content renders here.</p>\n </div>\n </SectionPage>\n </div>\n )\n}\n\n// SectionNav is controlled \u2014 the demo owns the collapsed state.\nfunction SectionNavDemo() {\n const [collapsed, setCollapsed] = React.useState(false)\n return (\n <div className=\"w-64 rounded-lg border bg-background px-3 py-4\">\n <SectionNav\n title=\"Settings\"\n sections={demoSections}\n activePath=\"#profile\"\n collapsed={collapsed}\n onToggleCollapse={() => setCollapsed((value) => !value)}\n />\n </div>\n )\n}\n\nconst demoActions: ActionItem[] = [\n { id: 'duplicate', label: 'Duplicate record', icon: Copy, onSelect: () => {} },\n { id: 'export', label: 'Export as CSV', icon: Download, onSelect: () => {} },\n { id: 'delete', label: 'Delete record', icon: Trash2, onSelect: () => {} },\n]\n\nconst pageEntry: GalleryEntry = {\n id: 'page',\n title: 'Page',\n importPath: '@open-mercato/ui/backend/Page',\n variants: [\n {\n id: 'basic',\n title: 'Page + PageHeader + PageBody',\n render: () => (\n <div className=\"w-full\">\n <Page>\n <PageHeader title=\"Currencies\" description=\"Exchange rates refresh nightly.\" />\n <PageBody>\n <div className=\"rounded-lg border border-dashed p-6 text-sm text-muted-foreground\">\n Page content\n </div>\n </PageBody>\n </Page>\n </div>\n ),\n code: `import { Page, PageBody, PageHeader } from '@open-mercato/ui/backend/Page'\n\n<Page>\n <PageHeader title={t('currencies.list.title')} description={t('currencies.list.description')} />\n <PageBody>{/* DataTable, sections\u2026 */}</PageBody>\n</Page>`,\n },\n {\n id: 'with-actions',\n title: 'Header actions',\n render: () => (\n <div className=\"w-full\">\n <Page>\n <PageHeader\n title=\"Currencies\"\n description=\"Exchange rates refresh nightly.\"\n actions={\n <>\n <Button variant=\"outline\" size=\"sm\">\n Import\n </Button>\n <Button size=\"sm\">\n <Plus className=\"size-4\" /> Add currency\n </Button>\n </>\n }\n />\n <PageBody>\n <div className=\"rounded-lg border border-dashed p-6 text-sm text-muted-foreground\">\n Page content\n </div>\n </PageBody>\n </Page>\n </div>\n ),\n code: `import { Plus } from 'lucide-react'\nimport { Page, PageBody, PageHeader } from '@open-mercato/ui/backend/Page'\nimport { Button } from '@open-mercato/ui/primitives/button'\n\n<Page>\n <PageHeader\n title={t('currencies.list.title')}\n actions={\n <>\n <Button variant=\"outline\" size=\"sm\">Import</Button>\n <Button size=\"sm\"><Plus className=\"size-4\" /> Add currency</Button>\n </>\n }\n />\n <PageBody>{/* \u2026 */}</PageBody>\n</Page>`,\n },\n ],\n}\n\nconst sectionHeaderEntry: GalleryEntry = {\n id: 'section-header',\n title: 'SectionHeader',\n importPath: '@open-mercato/ui/backend/SectionHeader',\n variants: [\n {\n id: 'count-and-action',\n title: 'With count and action',\n render: () => (\n <div className=\"w-full max-w-md\">\n <SectionHeader\n title=\"Addresses\"\n count={3}\n action={\n <Button variant=\"ghost\" size=\"sm\">\n <Plus className=\"size-4\" /> Add\n </Button>\n }\n />\n </div>\n ),\n code: `import { Plus } from 'lucide-react'\nimport { SectionHeader } from '@open-mercato/ui/backend/SectionHeader'\nimport { Button } from '@open-mercato/ui/primitives/button'\n\n<SectionHeader\n title={t('customers.people.detail.addresses.title')}\n count={addresses.length}\n action={<Button variant=\"ghost\" size=\"sm\"><Plus className=\"size-4\" /> {t('common.add')}</Button>}\n/>`,\n },\n {\n id: 'collapsible',\n title: 'CollapsibleSection',\n render: () => (\n <div className=\"w-full max-w-md\">\n <CollapsibleSection title=\"Billing details\" count={2}>\n <div className=\"rounded-lg border border-dashed p-4 text-sm text-muted-foreground\">\n Section content\n </div>\n </CollapsibleSection>\n </div>\n ),\n code: `import { CollapsibleSection } from '@open-mercato/ui/backend/SectionHeader'\n\n<CollapsibleSection title={t('billing.details.title')} count={2}>\n {/* section content */}\n</CollapsibleSection>`,\n },\n ],\n}\n\nconst sectionPageEntry: GalleryEntry = {\n id: 'section-page',\n title: 'SectionPage',\n importPath: '@open-mercato/ui/backend/section-page',\n variants: [\n {\n id: 'miniature',\n title: 'Two-item miniature (clipped frame)',\n render: () => <SectionPageMiniDemo />,\n code: `import { UserRound, Lock } from 'lucide-react'\nimport { SectionPage, type SectionNavGroup } from '@open-mercato/ui/backend/section-page'\n\nconst sections: SectionNavGroup[] = [\n {\n id: 'account',\n label: 'Account',\n items: [\n { id: 'profile', label: 'Profile', href: '/backend/profile', icon: <UserRound className=\"size-4\" /> },\n { id: 'security', label: 'Security', href: '/backend/profile/security', icon: <Lock className=\"size-4\" /> },\n ],\n },\n]\n\n<SectionPage title={t('profile.title')} sections={sections} activePath={pathname}>\n {children}\n</SectionPage>`,\n },\n {\n id: 'section-nav',\n title: 'SectionNav (standalone, controlled collapse)',\n render: () => <SectionNavDemo />,\n code: `import { SectionNav, type SectionNavGroup } from '@open-mercato/ui/backend/section-page'\n\nconst [collapsed, setCollapsed] = React.useState(false)\n\n<SectionNav\n title={t('profile.title')}\n sections={sections}\n activePath={pathname}\n collapsed={collapsed}\n onToggleCollapse={() => setCollapsed((value) => !value)}\n/>`,\n },\n ],\n}\n\nconst formHeaderEntry: GalleryEntry = {\n id: 'form-header',\n title: 'FormHeader',\n importPath: '@open-mercato/ui/backend/forms',\n variants: [\n {\n id: 'edit-mode',\n title: 'Edit mode',\n render: () => (\n <div className=\"w-full\">\n <FormHeader\n backHref=\"#form-header\"\n backLabel=\"Back\"\n title=\"Edit product\"\n actions={{\n cancelHref: '#form-header',\n cancelLabel: 'Cancel',\n submit: { label: 'Save', pendingLabel: 'Saving\u2026' },\n }}\n />\n </div>\n ),\n code: `import { FormHeader } from '@open-mercato/ui/backend/forms'\n\n<FormHeader\n backHref=\"/backend/products\"\n backLabel={t('ui.navigation.back')}\n title={t('products.edit.title')}\n actions={{\n cancelHref: '/backend/products',\n cancelLabel: t('ui.forms.actions.cancel'),\n submit: { formId: 'product-form', label: t('ui.forms.actions.save'), pendingLabel: t('ui.forms.actions.saving') },\n }}\n/>`,\n },\n {\n id: 'detail-mode',\n title: 'Detail mode',\n render: () => (\n <div className=\"w-full\">\n <FormHeader\n mode=\"detail\"\n backHref=\"#form-header\"\n entityTypeLabel=\"Company\"\n title=\"Acme Logistics\"\n subtitle=\"Created 12 Mar 2026\"\n statusBadge={<Badge variant=\"muted\">Active</Badge>}\n menuActions={[\n { id: 'duplicate', label: 'Duplicate', icon: Copy, onSelect: () => {} },\n { id: 'archive', label: 'Archive', icon: Archive, onSelect: () => {} },\n ]}\n onDelete={() => {}}\n deleteLabel=\"Delete\"\n />\n </div>\n ),\n code: `import { Archive, Copy } from 'lucide-react'\nimport { FormHeader } from '@open-mercato/ui/backend/forms'\n\n<FormHeader\n mode=\"detail\"\n backHref=\"/backend/customers/companies\"\n entityTypeLabel={t('customers.companies.detail.entityType')}\n title={company.name}\n subtitle={t('customers.companies.detail.createdAt', { date: createdAt })}\n statusBadge={<Badge variant=\"muted\">{statusLabel}</Badge>}\n menuActions={[\n { id: 'duplicate', label: t('ui.actions.duplicate'), icon: Copy, onSelect: duplicate },\n { id: 'archive', label: t('ui.actions.archive'), icon: Archive, onSelect: archive },\n ]}\n onDelete={confirmDelete}\n deleteLabel={t('ui.forms.actions.delete')}\n/>`,\n },\n ],\n}\n\nconst formFooterEntry: GalleryEntry = {\n id: 'form-footer',\n title: 'FormFooter',\n importPath: '@open-mercato/ui/backend/forms',\n variants: [\n {\n id: 'default',\n title: 'default',\n render: () => (\n <div className=\"w-full\">\n <FormFooter\n actions={{\n cancelHref: '#form-footer',\n cancelLabel: 'Cancel',\n submit: { label: 'Save changes', pendingLabel: 'Saving\u2026' },\n }}\n />\n </div>\n ),\n code: `import { FormFooter } from '@open-mercato/ui/backend/forms'\n\n<FormFooter\n actions={{\n cancelHref: '/backend/products',\n cancelLabel: t('ui.forms.actions.cancel'),\n submit: { formId: 'product-form', label: t('ui.forms.actions.save'), pendingLabel: t('ui.forms.actions.saving') },\n }}\n/>`,\n },\n {\n id: 'embedded-with-delete',\n title: 'embedded, with delete',\n render: () => (\n <div className=\"w-full\">\n <FormFooter\n embedded\n actions={{\n showDelete: true,\n onDelete: () => {},\n deleteLabel: 'Delete',\n cancelHref: '#form-footer',\n cancelLabel: 'Cancel',\n submit: { label: 'Save' },\n }}\n />\n </div>\n ),\n code: `import { FormFooter } from '@open-mercato/ui/backend/forms'\n\n<FormFooter\n embedded\n actions={{\n showDelete: true,\n onDelete: confirmDelete,\n deleteLabel: t('ui.forms.actions.delete'),\n cancelHref: '/backend/products',\n cancelLabel: t('ui.forms.actions.cancel'),\n submit: { label: t('ui.forms.actions.save') },\n }}\n/>`,\n },\n ],\n}\n\nconst actionsDropdownEntry: GalleryEntry = {\n id: 'actions-dropdown',\n title: 'ActionsDropdown',\n importPath: '@open-mercato/ui/backend/forms',\n variants: [\n {\n id: 'label-trigger',\n title: 'Label trigger',\n render: () => <ActionsDropdown items={demoActions} />,\n code: `import { Copy, Download, Trash2 } from 'lucide-react'\nimport { ActionsDropdown, type ActionItem } from '@open-mercato/ui/backend/forms'\n\nconst items: ActionItem[] = [\n { id: 'duplicate', label: t('ui.actions.duplicate'), icon: Copy, onSelect: duplicate },\n { id: 'export', label: t('ui.actions.export'), icon: Download, onSelect: exportCsv },\n { id: 'delete', label: t('ui.actions.delete'), icon: Trash2, onSelect: confirmDelete },\n]\n\n<ActionsDropdown items={items} />`,\n },\n {\n id: 'icon-trigger',\n title: 'Icon trigger',\n render: () => (\n <ActionsDropdown items={demoActions} triggerMode=\"icon\" ariaLabel=\"More actions\" />\n ),\n code: `import { ActionsDropdown } from '@open-mercato/ui/backend/forms'\n\n<ActionsDropdown items={items} triggerMode=\"icon\" ariaLabel={t('ui.actions.more')} />`,\n },\n ],\n}\n\nexport const entries: GalleryEntry[] = [\n pageEntry,\n sectionHeaderEntry,\n sectionPageEntry,\n formHeaderEntry,\n formFooterEntry,\n actionsDropdownEntry,\n]\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react'\nimport { Archive, Copy, Download, Lock, Plus, Trash2, UserRound } from 'lucide-react'\nimport { Badge } from '@open-mercato/ui/primitives/badge'\nimport { Button } from '@open-mercato/ui/primitives/button'\nimport { Page, PageBody, PageHeader } from '@open-mercato/ui/backend/Page'\nimport { CollapsibleSection, SectionHeader } from '@open-mercato/ui/backend/SectionHeader'\nimport {\n SectionNav,\n SectionPage,\n type SectionNavGroup,\n} from '@open-mercato/ui/backend/section-page'\nimport {\n ActionsDropdown,\n FormFooter,\n FormHeader,\n type ActionItem,\n} from '@open-mercato/ui/backend/forms'\nimport type { GalleryEntry } from '../types'\n\n// Component titles and variant names are proper nouns from the codebase and\n// are deliberately not translated. `code` MUST contain the entry's importPath\n// (enforced by the registry-integrity test) and is always reviewed alongside\n// its sibling `render`.\n\n// The demos use `#`-anchors as hrefs so clicking inside the gallery never\n// navigates away, and every callback is a no-op.\n\nconst demoSections: SectionNavGroup[] = [\n {\n id: 'account',\n label: 'Account',\n items: [\n { id: 'profile', label: 'Profile', href: '#profile', icon: <UserRound className=\"size-4\" /> },\n { id: 'security', label: 'Security', href: '#security', icon: <Lock className=\"size-4\" /> },\n ],\n },\n]\n\n// SectionPage stretches to the viewport by design \u2014 the miniature demo clips\n// it inside a fixed-height frame so the two-item nav plus content stay small.\nfunction SectionPageMiniDemo() {\n return (\n <div className=\"h-80 w-full overflow-hidden rounded-lg border bg-background\">\n <SectionPage title=\"Settings\" sections={demoSections} activePath=\"#profile\">\n <div className=\"space-y-2\">\n <h2 className=\"text-sm font-semibold\">Profile</h2>\n <p className=\"text-sm text-muted-foreground\">Section content renders here.</p>\n </div>\n </SectionPage>\n </div>\n )\n}\n\n// SectionNav is controlled \u2014 the demo owns the collapsed state.\nfunction SectionNavDemo() {\n const [collapsed, setCollapsed] = React.useState(false)\n return (\n <div className=\"w-64 rounded-lg border bg-background px-3 py-4\">\n <SectionNav\n title=\"Settings\"\n sections={demoSections}\n activePath=\"#profile\"\n collapsed={collapsed}\n onToggleCollapse={() => setCollapsed((value) => !value)}\n />\n </div>\n )\n}\n\nconst demoActions: ActionItem[] = [\n { id: 'duplicate', label: 'Duplicate record', icon: Copy, onSelect: () => {} },\n { id: 'export', label: 'Export as CSV', icon: Download, onSelect: () => {} },\n { id: 'delete', label: 'Delete record', icon: Trash2, onSelect: () => {} },\n]\n\nconst pageEntry: GalleryEntry = {\n id: 'page',\n title: 'Page',\n importPath: '@open-mercato/ui/backend/Page',\n variants: [\n {\n id: 'basic',\n title: 'Page + PageHeader + PageBody',\n render: () => (\n <div className=\"w-full\">\n <Page>\n <PageHeader title=\"Currencies\" description=\"Exchange rates refresh nightly.\" />\n <PageBody>\n <div className=\"rounded-lg border border-dashed p-6 text-sm text-muted-foreground\">\n Page content\n </div>\n </PageBody>\n </Page>\n </div>\n ),\n code: `import { Page, PageBody, PageHeader } from '@open-mercato/ui/backend/Page'\n\n<Page>\n <PageHeader title={t('currencies.list.title')} description={t('design_system.gallery.samples.listDescription')} />\n <PageBody>{/* DataTable, sections\u2026 */}</PageBody>\n</Page>`,\n },\n {\n id: 'with-actions',\n title: 'Header actions',\n render: () => (\n <div className=\"w-full\">\n <Page>\n <PageHeader\n title=\"Currencies\"\n description=\"Exchange rates refresh nightly.\"\n actions={\n <>\n <Button variant=\"outline\" size=\"sm\">\n Import\n </Button>\n <Button size=\"sm\">\n <Plus className=\"size-4\" /> Add currency\n </Button>\n </>\n }\n />\n <PageBody>\n <div className=\"rounded-lg border border-dashed p-6 text-sm text-muted-foreground\">\n Page content\n </div>\n </PageBody>\n </Page>\n </div>\n ),\n code: `import { Plus } from 'lucide-react'\nimport { Page, PageBody, PageHeader } from '@open-mercato/ui/backend/Page'\nimport { Button } from '@open-mercato/ui/primitives/button'\n\n<Page>\n <PageHeader\n title={t('currencies.list.title')}\n actions={\n <>\n <Button variant=\"outline\" size=\"sm\">Import</Button>\n <Button size=\"sm\"><Plus className=\"size-4\" /> Add currency</Button>\n </>\n }\n />\n <PageBody>{/* \u2026 */}</PageBody>\n</Page>`,\n },\n ],\n}\n\nconst sectionHeaderEntry: GalleryEntry = {\n id: 'section-header',\n title: 'SectionHeader',\n importPath: '@open-mercato/ui/backend/SectionHeader',\n variants: [\n {\n id: 'count-and-action',\n title: 'With count and action',\n render: () => (\n <div className=\"w-full max-w-md\">\n <SectionHeader\n title=\"Addresses\"\n count={3}\n action={\n <Button variant=\"ghost\" size=\"sm\">\n <Plus className=\"size-4\" /> Add\n </Button>\n }\n />\n </div>\n ),\n code: `import { Plus } from 'lucide-react'\nimport { SectionHeader } from '@open-mercato/ui/backend/SectionHeader'\nimport { Button } from '@open-mercato/ui/primitives/button'\n\n<SectionHeader\n title={t('design_system.gallery.samples.addresses.title')}\n count={addresses.length}\n action={<Button variant=\"ghost\" size=\"sm\"><Plus className=\"size-4\" /> {t('common.add')}</Button>}\n/>`,\n },\n {\n id: 'collapsible',\n title: 'CollapsibleSection',\n render: () => (\n <div className=\"w-full max-w-md\">\n <CollapsibleSection title=\"Billing details\" count={2}>\n <div className=\"rounded-lg border border-dashed p-4 text-sm text-muted-foreground\">\n Section content\n </div>\n </CollapsibleSection>\n </div>\n ),\n code: `import { CollapsibleSection } from '@open-mercato/ui/backend/SectionHeader'\n\n<CollapsibleSection title={t('design_system.gallery.samples.billingDetails')} count={2}>\n {/* section content */}\n</CollapsibleSection>`,\n },\n ],\n}\n\nconst sectionPageEntry: GalleryEntry = {\n id: 'section-page',\n title: 'SectionPage',\n importPath: '@open-mercato/ui/backend/section-page',\n variants: [\n {\n id: 'miniature',\n title: 'Two-item miniature (clipped frame)',\n render: () => <SectionPageMiniDemo />,\n code: `import { UserRound, Lock } from 'lucide-react'\nimport { SectionPage, type SectionNavGroup } from '@open-mercato/ui/backend/section-page'\n\nconst sections: SectionNavGroup[] = [\n {\n id: 'account',\n label: 'Account',\n items: [\n { id: 'profile', label: 'Profile', href: '/backend/profile', icon: <UserRound className=\"size-4\" /> },\n { id: 'security', label: 'Security', href: '/backend/profile/security', icon: <Lock className=\"size-4\" /> },\n ],\n },\n]\n\n<SectionPage title={t('profile.page.title')} sections={sections} activePath={pathname}>\n {children}\n</SectionPage>`,\n },\n {\n id: 'section-nav',\n title: 'SectionNav (standalone, controlled collapse)',\n render: () => <SectionNavDemo />,\n code: `import { SectionNav, type SectionNavGroup } from '@open-mercato/ui/backend/section-page'\n\nconst [collapsed, setCollapsed] = React.useState(false)\n\n<SectionNav\n title={t('profile.page.title')}\n sections={sections}\n activePath={pathname}\n collapsed={collapsed}\n onToggleCollapse={() => setCollapsed((value) => !value)}\n/>`,\n },\n ],\n}\n\nconst formHeaderEntry: GalleryEntry = {\n id: 'form-header',\n title: 'FormHeader',\n importPath: '@open-mercato/ui/backend/forms',\n variants: [\n {\n id: 'edit-mode',\n title: 'Edit mode',\n render: () => (\n <div className=\"w-full\">\n <FormHeader\n backHref=\"#form-header\"\n backLabel=\"Back\"\n title=\"Edit product\"\n actions={{\n cancelHref: '#form-header',\n cancelLabel: 'Cancel',\n submit: { label: 'Save', pendingLabel: 'Saving\u2026' },\n }}\n />\n </div>\n ),\n code: `import { FormHeader } from '@open-mercato/ui/backend/forms'\n\n<FormHeader\n backHref=\"/backend/products\"\n backLabel={t('ui.navigation.back')}\n title={t('catalog.products.edit.title')}\n actions={{\n cancelHref: '/backend/products',\n cancelLabel: t('ui.forms.actions.cancel'),\n submit: { formId: 'product-form', label: t('ui.forms.actions.save'), pendingLabel: t('ui.forms.actions.saving') },\n }}\n/>`,\n },\n {\n id: 'detail-mode',\n title: 'Detail mode',\n render: () => (\n <div className=\"w-full\">\n <FormHeader\n mode=\"detail\"\n backHref=\"#form-header\"\n entityTypeLabel=\"Company\"\n title=\"Acme Logistics\"\n subtitle=\"Created 12 Mar 2026\"\n statusBadge={<Badge variant=\"muted\">Active</Badge>}\n menuActions={[\n { id: 'duplicate', label: 'Duplicate', icon: Copy, onSelect: () => {} },\n { id: 'archive', label: 'Archive', icon: Archive, onSelect: () => {} },\n ]}\n onDelete={() => {}}\n deleteLabel=\"Delete\"\n />\n </div>\n ),\n code: `import { Archive, Copy } from 'lucide-react'\nimport { FormHeader } from '@open-mercato/ui/backend/forms'\n\n<FormHeader\n mode=\"detail\"\n backHref=\"/backend/customers/companies\"\n entityTypeLabel={t('design_system.gallery.samples.entityType')}\n title={company.name}\n subtitle={t('design_system.gallery.samples.createdAt', { date: createdAt })}\n statusBadge={<Badge variant=\"muted\">{statusLabel}</Badge>}\n menuActions={[\n { id: 'duplicate', label: t('ui.actions.duplicate'), icon: Copy, onSelect: duplicate },\n { id: 'archive', label: t('ui.actions.archive'), icon: Archive, onSelect: archive },\n ]}\n onDelete={confirmDelete}\n deleteLabel={t('ui.forms.actions.delete')}\n/>`,\n },\n ],\n}\n\nconst formFooterEntry: GalleryEntry = {\n id: 'form-footer',\n title: 'FormFooter',\n importPath: '@open-mercato/ui/backend/forms',\n variants: [\n {\n id: 'default',\n title: 'default',\n render: () => (\n <div className=\"w-full\">\n <FormFooter\n actions={{\n cancelHref: '#form-footer',\n cancelLabel: 'Cancel',\n submit: { label: 'Save changes', pendingLabel: 'Saving\u2026' },\n }}\n />\n </div>\n ),\n code: `import { FormFooter } from '@open-mercato/ui/backend/forms'\n\n<FormFooter\n actions={{\n cancelHref: '/backend/products',\n cancelLabel: t('ui.forms.actions.cancel'),\n submit: { formId: 'product-form', label: t('ui.forms.actions.save'), pendingLabel: t('ui.forms.actions.saving') },\n }}\n/>`,\n },\n {\n id: 'embedded-with-delete',\n title: 'embedded, with delete',\n render: () => (\n <div className=\"w-full\">\n <FormFooter\n embedded\n actions={{\n showDelete: true,\n onDelete: () => {},\n deleteLabel: 'Delete',\n cancelHref: '#form-footer',\n cancelLabel: 'Cancel',\n submit: { label: 'Save' },\n }}\n />\n </div>\n ),\n code: `import { FormFooter } from '@open-mercato/ui/backend/forms'\n\n<FormFooter\n embedded\n actions={{\n showDelete: true,\n onDelete: confirmDelete,\n deleteLabel: t('ui.forms.actions.delete'),\n cancelHref: '/backend/products',\n cancelLabel: t('ui.forms.actions.cancel'),\n submit: { label: t('ui.forms.actions.save') },\n }}\n/>`,\n },\n ],\n}\n\nconst actionsDropdownEntry: GalleryEntry = {\n id: 'actions-dropdown',\n title: 'ActionsDropdown',\n importPath: '@open-mercato/ui/backend/forms',\n variants: [\n {\n id: 'label-trigger',\n title: 'Label trigger',\n render: () => <ActionsDropdown items={demoActions} />,\n code: `import { Copy, Download, Trash2 } from 'lucide-react'\nimport { ActionsDropdown, type ActionItem } from '@open-mercato/ui/backend/forms'\n\nconst items: ActionItem[] = [\n { id: 'duplicate', label: t('ui.actions.duplicate'), icon: Copy, onSelect: duplicate },\n { id: 'export', label: t('ui.actions.export'), icon: Download, onSelect: exportCsv },\n { id: 'delete', label: t('ui.actions.delete'), icon: Trash2, onSelect: confirmDelete },\n]\n\n<ActionsDropdown items={items} />`,\n },\n {\n id: 'icon-trigger',\n title: 'Icon trigger',\n render: () => (\n <ActionsDropdown items={demoActions} triggerMode=\"icon\" ariaLabel=\"More actions\" />\n ),\n code: `import { ActionsDropdown } from '@open-mercato/ui/backend/forms'\n\n<ActionsDropdown items={items} triggerMode=\"icon\" ariaLabel={t('ui.actions.more')} />`,\n },\n ],\n}\n\nexport const entries: GalleryEntry[] = [\n pageEntry,\n sectionHeaderEntry,\n sectionPageEntry,\n formHeaderEntry,\n formFooterEntry,\n actionsDropdownEntry,\n]\n"],
|
|
5
5
|
"mappings": "AAgCiE,SAgFjD,UAhFiD,KAYzD,YAZyD;AAhCjE,YAAY,WAAW;AACvB,SAAS,SAAS,MAAM,UAAU,MAAM,MAAM,QAAQ,iBAAiB;AACvE,SAAS,aAAa;AACtB,SAAS,cAAc;AACvB,SAAS,MAAM,UAAU,kBAAkB;AAC3C,SAAS,oBAAoB,qBAAqB;AAClD;AAAA,EACE;AAAA,EACA;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AAWP,MAAM,eAAkC;AAAA,EACtC;AAAA,IACE,IAAI;AAAA,IACJ,OAAO;AAAA,IACP,OAAO;AAAA,MACL,EAAE,IAAI,WAAW,OAAO,WAAW,MAAM,YAAY,MAAM,oBAAC,aAAU,WAAU,UAAS,EAAG;AAAA,MAC5F,EAAE,IAAI,YAAY,OAAO,YAAY,MAAM,aAAa,MAAM,oBAAC,QAAK,WAAU,UAAS,EAAG;AAAA,IAC5F;AAAA,EACF;AACF;AAIA,SAAS,sBAAsB;AAC7B,SACE,oBAAC,SAAI,WAAU,+DACb,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AAEA,MAAM,uBAAqC;AAAA,EACzC,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,UAAU;AAAA,IACR;AAAA,MACE,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,QAAQ,MAAM,oBAAC,mBAAgB,OAAO,aAAa;AAAA,MACnD,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUR;AAAA,IACA;AAAA,MACE,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,QAAQ,MACN,oBAAC,mBAAgB,OAAO,aAAa,aAAY,QAAO,WAAU,gBAAe;AAAA,MAEnF,MAAM;AAAA;AAAA;AAAA,IAGR;AAAA,EACF;AACF;AAEO,MAAM,UAA0B;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -327,7 +327,7 @@ function DictionaryEntrySelect({
|
|
|
327
327
|
labels: appearanceLabels ?? DEFAULT_APPEARANCE_LABELS
|
|
328
328
|
}
|
|
329
329
|
) : null,
|
|
330
|
-
formError ? /* @__PURE__ */ jsx("p", { className: "text-sm text-
|
|
330
|
+
formError ? /* @__PURE__ */ jsx("p", { className: "text-sm text-status-error-text", children: formError }) : null
|
|
331
331
|
] }),
|
|
332
332
|
/* @__PURE__ */ jsxs(DialogFooter, { children: [
|
|
333
333
|
/* @__PURE__ */ jsx(Button, { type: "button", variant: "outline", onClick: () => setDialogOpen(false), disabled: saving, children: labels.cancelLabel }),
|