@moldable-ai/ui 0.2.20 → 0.2.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/catalog/catalog-coverage.d.ts +15 -0
- package/dist/catalog/catalog-coverage.d.ts.map +1 -0
- package/dist/catalog/catalog-coverage.js +44 -0
- package/dist/catalog/catalog-manifest.d.ts.map +1 -1
- package/dist/catalog/catalog-manifest.js +35 -23
- package/dist/catalog/catalog-types.d.ts +17 -0
- package/dist/catalog/catalog-types.d.ts.map +1 -1
- package/dist/catalog/catalog-types.js +7 -0
- package/dist/catalog/component-catalog.d.ts.map +1 -1
- package/dist/catalog/component-catalog.js +16 -6
- package/dist/catalog/core-catalog-exclusions.d.ts +8 -0
- package/dist/catalog/core-catalog-exclusions.d.ts.map +1 -0
- package/dist/catalog/core-catalog-exclusions.js +155 -0
- package/dist/catalog/core-catalog.d.ts +0 -4
- package/dist/catalog/core-catalog.d.ts.map +1 -1
- package/dist/catalog/core-catalog.js +12 -98
- package/dist/catalog/core-collection-stories.d.ts +3 -0
- package/dist/catalog/core-collection-stories.d.ts.map +1 -0
- package/dist/catalog/core-collection-stories.js +42 -0
- package/dist/catalog/core-control-stories.d.ts +3 -0
- package/dist/catalog/core-control-stories.d.ts.map +1 -0
- package/dist/catalog/core-control-stories.js +97 -0
- package/dist/catalog/core-feedback-stories.d.ts +3 -0
- package/dist/catalog/core-feedback-stories.d.ts.map +1 -0
- package/dist/catalog/core-feedback-stories.js +50 -0
- package/dist/catalog/core-foundation-stories.d.ts +3 -0
- package/dist/catalog/core-foundation-stories.d.ts.map +1 -0
- package/dist/catalog/core-foundation-stories.js +53 -0
- package/dist/catalog/core-navigation-stories.d.ts +3 -0
- package/dist/catalog/core-navigation-stories.d.ts.map +1 -0
- package/dist/catalog/core-navigation-stories.js +25 -0
- package/dist/catalog/core-overlay-stories.d.ts +3 -0
- package/dist/catalog/core-overlay-stories.d.ts.map +1 -0
- package/dist/catalog/core-overlay-stories.js +20 -0
- package/dist/catalog/index.d.ts +3 -1
- package/dist/catalog/index.d.ts.map +1 -1
- package/dist/catalog/index.js +3 -1
- package/dist/components/app-error-boundary.d.ts.map +1 -1
- package/dist/components/app-error-boundary.js +3 -2
- package/dist/components/chat/chat-panel.d.ts +0 -1
- package/dist/components/chat/chat-panel.d.ts.map +1 -1
- package/dist/components/chat/chat-panel.js +7 -11
- package/dist/components/ui/alert-dialog.d.ts +10 -4
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog.js +14 -6
- package/dist/components/ui/alert.d.ts +19 -3
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/alert.js +25 -8
- package/dist/components/ui/app-frame.d.ts +9 -3
- package/dist/components/ui/app-frame.d.ts.map +1 -1
- package/dist/components/ui/app-frame.js +45 -6
- package/dist/components/ui/button.d.ts +6 -4
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.js +40 -8
- package/dist/components/ui/collapsible.d.ts +9 -1
- package/dist/components/ui/collapsible.d.ts.map +1 -1
- package/dist/components/ui/collapsible.js +13 -2
- package/dist/components/ui/collection-navigation.d.ts +8 -0
- package/dist/components/ui/collection-navigation.d.ts.map +1 -0
- package/dist/components/ui/collection-navigation.js +19 -0
- package/dist/components/ui/command.d.ts +5 -1
- package/dist/components/ui/command.d.ts.map +1 -1
- package/dist/components/ui/command.js +13 -1
- package/dist/components/ui/confirm-dialog.d.ts +19 -0
- package/dist/components/ui/confirm-dialog.d.ts.map +1 -0
- package/dist/components/ui/confirm-dialog.js +45 -0
- package/dist/components/ui/date-picker.d.ts +24 -0
- package/dist/components/ui/date-picker.d.ts.map +1 -0
- package/dist/components/ui/date-picker.js +92 -0
- package/dist/components/ui/dialog-primary-action.d.ts +4 -0
- package/dist/components/ui/dialog-primary-action.d.ts.map +1 -0
- package/dist/components/ui/dialog-primary-action.js +37 -0
- package/dist/components/ui/dialog.d.ts +8 -2
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog.js +15 -5
- package/dist/components/ui/empty.d.ts +7 -2
- package/dist/components/ui/empty.d.ts.map +1 -1
- package/dist/components/ui/empty.js +20 -7
- package/dist/components/ui/error-boundary-view.d.ts +12 -0
- package/dist/components/ui/error-boundary-view.d.ts.map +1 -0
- package/dist/components/ui/error-boundary-view.js +8 -0
- package/dist/components/ui/grid.d.ts.map +1 -1
- package/dist/components/ui/grid.js +70 -46
- package/dist/components/ui/icon-button.d.ts.map +1 -1
- package/dist/components/ui/icon-button.js +1 -2
- package/dist/components/ui/index.d.ts +5 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +5 -0
- package/dist/components/ui/input-group.d.ts +1 -1
- package/dist/components/ui/list.d.ts +5 -1
- package/dist/components/ui/list.d.ts.map +1 -1
- package/dist/components/ui/list.js +27 -16
- package/dist/components/ui/material.d.ts +34 -0
- package/dist/components/ui/material.d.ts.map +1 -0
- package/dist/components/ui/material.js +34 -0
- package/dist/components/ui/message-scroller-controller.d.ts +162 -0
- package/dist/components/ui/message-scroller-controller.d.ts.map +1 -0
- package/dist/components/ui/message-scroller-controller.js +888 -0
- package/dist/components/ui/message-scroller-policy.d.ts +74 -0
- package/dist/components/ui/message-scroller-policy.d.ts.map +1 -0
- package/dist/components/ui/message-scroller-policy.js +129 -0
- package/dist/components/ui/message-scroller-primitive.d.ts +55 -0
- package/dist/components/ui/message-scroller-primitive.d.ts.map +1 -0
- package/dist/components/ui/message-scroller-primitive.js +226 -0
- package/dist/components/ui/message-scroller.d.ts +2 -2
- package/dist/components/ui/message-scroller.d.ts.map +1 -1
- package/dist/components/ui/message-scroller.js +3 -15
- package/dist/components/ui/navigation-button-group.d.ts +16 -0
- package/dist/components/ui/navigation-button-group.d.ts.map +1 -0
- package/dist/components/ui/navigation-button-group.js +9 -0
- package/dist/components/ui/popover.d.ts +9 -2
- package/dist/components/ui/popover.d.ts.map +1 -1
- package/dist/components/ui/popover.js +13 -3
- package/dist/components/ui/scroll-area.d.ts +8 -2
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.js +6 -3
- package/dist/components/ui/search-field.d.ts.map +1 -1
- package/dist/components/ui/segmented-control.d.ts.map +1 -1
- package/dist/components/ui/segmented-control.js +6 -5
- package/dist/components/ui/sheet.d.ts +4 -2
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/sheet.js +12 -9
- package/dist/components/ui/sonner.d.ts +1 -1
- package/dist/components/ui/sonner.d.ts.map +1 -1
- package/dist/components/ui/spinner.d.ts.map +1 -1
- package/dist/components/ui/spinner.js +1 -1
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/table.js +7 -2
- package/dist/components/ui/toggle.d.ts +12 -4
- package/dist/components/ui/toggle.d.ts.map +1 -1
- package/dist/components/ui/toggle.js +13 -2
- package/dist/components/ui/toolbar.d.ts +9 -2
- package/dist/components/ui/toolbar.d.ts.map +1 -1
- package/dist/components/ui/toolbar.js +23 -4
- package/dist/components/ui/tooltip.d.ts +8 -3
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/components/ui/tooltip.js +11 -6
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -1
- package/dist/lib/frame-lifecycle.d.ts +23 -0
- package/dist/lib/frame-lifecycle.d.ts.map +1 -1
- package/dist/lib/frame-lifecycle.js +30 -3
- package/dist/lib/host-date-time-picker.d.ts +36 -0
- package/dist/lib/host-date-time-picker.d.ts.map +1 -0
- package/dist/lib/host-date-time-picker.js +162 -0
- package/dist/lib/host-file-dialog.d.ts +66 -0
- package/dist/lib/host-file-dialog.d.ts.map +1 -0
- package/dist/lib/host-file-dialog.js +221 -0
- package/dist/lib/host-native-menu.d.ts +75 -0
- package/dist/lib/host-native-menu.d.ts.map +1 -0
- package/dist/lib/host-native-menu.js +187 -0
- package/dist/lib/host-services.d.ts +13 -0
- package/dist/lib/host-services.d.ts.map +1 -0
- package/dist/lib/host-services.js +161 -0
- package/dist/lib/host-share.d.ts +39 -0
- package/dist/lib/host-share.d.ts.map +1 -0
- package/dist/lib/host-share.js +161 -0
- package/dist/lib/theme.d.ts.map +1 -1
- package/dist/lib/theme.js +2 -1
- package/docs/README.md +4 -1
- package/docs/adaptive-materials.md +79 -0
- package/docs/app-anatomy.md +3 -1
- package/docs/component-catalog.md +26 -3
- package/docs/design-tokens.md +17 -4
- package/docs/foundations.md +5 -3
- package/docs/standalone-app-windows.md +8 -0
- package/docs/visual-regression.md +78 -0
- package/package.json +12 -4
- package/src/components/ui/alert-dialog.md +58 -0
- package/src/components/ui/alert.md +28 -6
- package/src/components/ui/app-frame.md +5 -0
- package/src/components/ui/button.md +10 -3
- package/src/components/ui/collapsible.md +52 -0
- package/src/components/ui/combobox.md +0 -1
- package/src/components/ui/command.md +54 -0
- package/src/components/ui/date-field.md +1 -1
- package/src/components/ui/date-picker.md +55 -0
- package/src/components/ui/dialog.md +59 -0
- package/src/components/ui/empty.md +8 -3
- package/src/components/ui/error-boundary-view.md +98 -0
- package/src/components/ui/grid.md +8 -4
- package/src/components/ui/icon-button.md +2 -2
- package/src/components/ui/list.md +35 -2
- package/src/components/ui/material.md +51 -0
- package/src/components/ui/navigation-button-group.md +46 -0
- package/src/components/ui/popover.md +31 -0
- package/src/components/ui/scroll-area.md +11 -7
- package/src/components/ui/search-field.md +1 -1
- package/src/components/ui/segmented-control.md +2 -5
- package/src/components/ui/sheet.md +30 -0
- package/src/components/ui/table.md +4 -2
- package/src/components/ui/toggle-button.md +48 -0
- package/src/components/ui/toolbar.md +5 -0
- package/src/components/ui/tooltip.md +31 -0
- package/src/styles/index.css +213 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { CatalogManifest } from './catalog-types';
|
|
2
|
+
export interface CatalogCoverageExclusion {
|
|
3
|
+
component: string;
|
|
4
|
+
reason: string;
|
|
5
|
+
}
|
|
6
|
+
export interface CatalogCoverageReport {
|
|
7
|
+
covered: readonly string[];
|
|
8
|
+
excluded: readonly CatalogCoverageExclusion[];
|
|
9
|
+
missing: readonly string[];
|
|
10
|
+
unknownCovered: readonly string[];
|
|
11
|
+
unknownExcluded: readonly string[];
|
|
12
|
+
}
|
|
13
|
+
export declare function getCatalogCoverage(manifest: CatalogManifest, publicComponents: readonly string[], exclusions: readonly CatalogCoverageExclusion[]): CatalogCoverageReport;
|
|
14
|
+
export declare function assertCatalogCoverage(manifest: CatalogManifest, publicComponents: readonly string[], exclusions: readonly CatalogCoverageExclusion[]): CatalogCoverageReport;
|
|
15
|
+
//# sourceMappingURL=catalog-coverage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-coverage.d.ts","sourceRoot":"","sources":["../../src/catalog/catalog-coverage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtD,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;IAC1B,QAAQ,EAAE,SAAS,wBAAwB,EAAE,CAAA;IAC7C,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;IAC1B,cAAc,EAAE,SAAS,MAAM,EAAE,CAAA;IACjC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAA;CACnC;AAMD,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,gBAAgB,EAAE,SAAS,MAAM,EAAE,EACnC,UAAU,EAAE,SAAS,wBAAwB,EAAE,GAC9C,qBAAqB,CA+BvB;AAED,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,eAAe,EACzB,gBAAgB,EAAE,SAAS,MAAM,EAAE,EACnC,UAAU,EAAE,SAAS,wBAAwB,EAAE,yBAoChD"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
function sorted(values) {
|
|
2
|
+
return [...values].sort((left, right) => left.localeCompare(right));
|
|
3
|
+
}
|
|
4
|
+
export function getCatalogCoverage(manifest, publicComponents, exclusions) {
|
|
5
|
+
const publicSet = new Set(publicComponents);
|
|
6
|
+
const coveredSet = new Set(manifest.sections.flatMap((section) => section.stories.flatMap((story) => story.components ?? [])));
|
|
7
|
+
const exclusionMap = new Map(exclusions.map((exclusion) => [exclusion.component, exclusion]));
|
|
8
|
+
return {
|
|
9
|
+
covered: sorted([...coveredSet].filter((component) => publicSet.has(component))),
|
|
10
|
+
excluded: [...exclusions].sort((left, right) => left.component.localeCompare(right.component)),
|
|
11
|
+
missing: sorted([...publicSet].filter((component) => !coveredSet.has(component) && !exclusionMap.has(component))),
|
|
12
|
+
unknownCovered: sorted([...coveredSet].filter((component) => !publicSet.has(component))),
|
|
13
|
+
unknownExcluded: sorted([...exclusionMap.keys()].filter((component) => !publicSet.has(component))),
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export function assertCatalogCoverage(manifest, publicComponents, exclusions) {
|
|
17
|
+
const duplicateExclusions = exclusions
|
|
18
|
+
.map((exclusion) => exclusion.component)
|
|
19
|
+
.filter((component, index, components) => components.indexOf(component) !== index);
|
|
20
|
+
const emptyReasons = exclusions
|
|
21
|
+
.filter((exclusion) => exclusion.reason.trim().length === 0)
|
|
22
|
+
.map((exclusion) => exclusion.component);
|
|
23
|
+
const report = getCatalogCoverage(manifest, publicComponents, exclusions);
|
|
24
|
+
const errors = [];
|
|
25
|
+
if (report.missing.length > 0) {
|
|
26
|
+
errors.push(`missing: ${report.missing.join(', ')}`);
|
|
27
|
+
}
|
|
28
|
+
if (report.unknownCovered.length > 0) {
|
|
29
|
+
errors.push(`unknown covered: ${report.unknownCovered.join(', ')}`);
|
|
30
|
+
}
|
|
31
|
+
if (report.unknownExcluded.length > 0) {
|
|
32
|
+
errors.push(`unknown excluded: ${report.unknownExcluded.join(', ')}`);
|
|
33
|
+
}
|
|
34
|
+
if (duplicateExclusions.length > 0) {
|
|
35
|
+
errors.push(`duplicate exclusions: ${sorted(new Set(duplicateExclusions)).join(', ')}`);
|
|
36
|
+
}
|
|
37
|
+
if (emptyReasons.length > 0) {
|
|
38
|
+
errors.push(`empty exclusion reasons: ${sorted(emptyReasons).join(', ')}`);
|
|
39
|
+
}
|
|
40
|
+
if (errors.length > 0) {
|
|
41
|
+
throw new Error(`Catalog coverage is incomplete (${errors.join('; ')}).`);
|
|
42
|
+
}
|
|
43
|
+
return report;
|
|
44
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog-manifest.d.ts","sourceRoot":"","sources":["../../src/catalog/catalog-manifest.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"catalog-manifest.d.ts","sourceRoot":"","sources":["../../src/catalog/catalog-manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,WAAW,EAEhB,KAAK,iBAAiB,EAGtB,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAM5B,MAAM,iBAAiB,CAAA;AA8BxB,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,sBAAsB,GAC5B,sBAAsB,CAGxB;AAED,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,wBAAwB,GAChC,wBAAwB,CAG1B;AAED,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,eAAe,GACxB,eAAe,CA2BjB;AAmCD,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,eAAe,EACzB,MAAM,GAAE,iBAAsB,GAC7B,WAAW,EAAE,CAoEf"}
|
|
@@ -37,29 +37,37 @@ export function createCatalogManifest(manifest) {
|
|
|
37
37
|
throw new Error(`Duplicate story id "${story.id}" in section "${section.id}".`);
|
|
38
38
|
}
|
|
39
39
|
storyIds.add(story.id);
|
|
40
|
+
for (const component of story.components ?? []) {
|
|
41
|
+
assertCatalogId(component, 'story');
|
|
42
|
+
}
|
|
40
43
|
}
|
|
41
44
|
}
|
|
42
45
|
return manifest;
|
|
43
46
|
}
|
|
44
47
|
function createCaseId(context) {
|
|
45
|
-
|
|
48
|
+
const segments = [
|
|
46
49
|
context.sectionId,
|
|
47
50
|
context.storyId,
|
|
48
51
|
context.theme,
|
|
49
52
|
context.density,
|
|
50
53
|
context.viewport,
|
|
51
54
|
context.interaction,
|
|
52
|
-
]
|
|
55
|
+
];
|
|
56
|
+
if (context.accessibilityMode !== 'standard') {
|
|
57
|
+
segments.push(context.accessibilityMode);
|
|
58
|
+
}
|
|
59
|
+
return segments.join('/');
|
|
53
60
|
}
|
|
54
61
|
function matchesFilter(catalogCase, filter) {
|
|
55
62
|
return ((filter.sectionId === undefined ||
|
|
56
63
|
catalogCase.sectionId === filter.sectionId) &&
|
|
57
|
-
(filter.storyId === undefined ||
|
|
58
|
-
catalogCase.storyId === filter.storyId) &&
|
|
64
|
+
(filter.storyId === undefined || catalogCase.storyId === filter.storyId) &&
|
|
59
65
|
(filter.theme === undefined || catalogCase.theme === filter.theme) &&
|
|
60
66
|
(filter.density === undefined || catalogCase.density === filter.density) &&
|
|
61
67
|
(filter.viewport === undefined ||
|
|
62
68
|
catalogCase.viewport === filter.viewport) &&
|
|
69
|
+
(filter.accessibilityMode === undefined ||
|
|
70
|
+
catalogCase.accessibilityMode === filter.accessibilityMode) &&
|
|
63
71
|
(filter.interaction === undefined ||
|
|
64
72
|
catalogCase.interaction === filter.interaction));
|
|
65
73
|
}
|
|
@@ -72,28 +80,32 @@ export function buildCatalogCases(manifest, filter = {}) {
|
|
|
72
80
|
const densities = uniqueAxes(story.densities ?? catalogDensities, story.id, 'density');
|
|
73
81
|
const viewports = uniqueAxes(story.viewports ?? catalogViewports, story.id, 'viewport');
|
|
74
82
|
const interactions = uniqueAxes(story.interactions ?? ['rest'], story.id, 'interaction');
|
|
83
|
+
const accessibilityModes = uniqueAxes(story.accessibilityModes ?? ['standard'], story.id, 'accessibility mode');
|
|
75
84
|
for (const theme of themes) {
|
|
76
85
|
for (const density of densities) {
|
|
77
86
|
for (const viewport of viewports) {
|
|
78
|
-
for (const
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
87
|
+
for (const accessibilityMode of accessibilityModes) {
|
|
88
|
+
for (const interaction of interactions) {
|
|
89
|
+
const context = {
|
|
90
|
+
sectionId: section.id,
|
|
91
|
+
storyId: story.id,
|
|
92
|
+
theme,
|
|
93
|
+
density,
|
|
94
|
+
viewport,
|
|
95
|
+
accessibilityMode,
|
|
96
|
+
interaction,
|
|
97
|
+
};
|
|
98
|
+
const catalogCase = {
|
|
99
|
+
...context,
|
|
100
|
+
caseId: createCaseId(context),
|
|
101
|
+
sectionTitle: section.title,
|
|
102
|
+
storyTitle: story.title,
|
|
103
|
+
storyDescription: story.description,
|
|
104
|
+
render: story.render,
|
|
105
|
+
};
|
|
106
|
+
if (matchesFilter(catalogCase, filter)) {
|
|
107
|
+
cases.push(catalogCase);
|
|
108
|
+
}
|
|
97
109
|
}
|
|
98
110
|
}
|
|
99
111
|
}
|
|
@@ -2,11 +2,15 @@ import type * as React from 'react';
|
|
|
2
2
|
export declare const catalogThemes: readonly ["light", "dark"];
|
|
3
3
|
export declare const catalogDensities: readonly ["regular", "compact"];
|
|
4
4
|
export declare const catalogViewports: readonly ["wide", "narrow"];
|
|
5
|
+
export declare const catalogAccessibilityModes: readonly ["standard", "reduced-transparency", "increased-contrast", "reduced-motion"];
|
|
5
6
|
export declare const catalogInteractions: readonly ["rest", "hover", "focus-visible", "pressed", "selected", "disabled", "invalid", "loading", "empty"];
|
|
7
|
+
export declare const catalogLiveStates: readonly ["hover", "focus", "pressed"];
|
|
6
8
|
export type CatalogTheme = (typeof catalogThemes)[number];
|
|
7
9
|
export type CatalogDensity = (typeof catalogDensities)[number];
|
|
8
10
|
export type CatalogViewport = (typeof catalogViewports)[number];
|
|
11
|
+
export type CatalogAccessibilityMode = (typeof catalogAccessibilityModes)[number];
|
|
9
12
|
export type CatalogInteraction = (typeof catalogInteractions)[number];
|
|
13
|
+
export type CatalogLiveState = (typeof catalogLiveStates)[number];
|
|
10
14
|
export interface CatalogCaseContext {
|
|
11
15
|
caseId: string;
|
|
12
16
|
sectionId: string;
|
|
@@ -14,16 +18,28 @@ export interface CatalogCaseContext {
|
|
|
14
18
|
theme: CatalogTheme;
|
|
15
19
|
density: CatalogDensity;
|
|
16
20
|
viewport: CatalogViewport;
|
|
21
|
+
accessibilityMode: CatalogAccessibilityMode;
|
|
17
22
|
interaction: CatalogInteraction;
|
|
18
23
|
}
|
|
19
24
|
export interface CatalogStoryDefinition {
|
|
20
25
|
id: string;
|
|
21
26
|
title: string;
|
|
22
27
|
description?: React.ReactNode;
|
|
28
|
+
/**
|
|
29
|
+
* Public visual component module ids exercised by this story. These ids
|
|
30
|
+
* correspond to the kebab-case modules exported from components/ui/index.ts.
|
|
31
|
+
*/
|
|
32
|
+
components?: readonly string[];
|
|
23
33
|
themes?: readonly CatalogTheme[];
|
|
24
34
|
densities?: readonly CatalogDensity[];
|
|
25
35
|
viewports?: readonly CatalogViewport[];
|
|
36
|
+
accessibilityModes?: readonly CatalogAccessibilityMode[];
|
|
26
37
|
interactions?: readonly CatalogInteraction[];
|
|
38
|
+
/**
|
|
39
|
+
* Browser-driven states captured from the element marked with
|
|
40
|
+
* `data-state-target="<space-separated states>"`.
|
|
41
|
+
*/
|
|
42
|
+
liveStates?: readonly CatalogLiveState[];
|
|
27
43
|
render: (context: CatalogCaseContext) => React.ReactNode;
|
|
28
44
|
}
|
|
29
45
|
export interface CatalogSectionDefinition {
|
|
@@ -49,6 +65,7 @@ export interface CatalogCaseFilter {
|
|
|
49
65
|
theme?: CatalogTheme;
|
|
50
66
|
density?: CatalogDensity;
|
|
51
67
|
viewport?: CatalogViewport;
|
|
68
|
+
accessibilityMode?: CatalogAccessibilityMode;
|
|
52
69
|
interaction?: CatalogInteraction;
|
|
53
70
|
}
|
|
54
71
|
//# sourceMappingURL=catalog-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog-types.d.ts","sourceRoot":"","sources":["../../src/catalog/catalog-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAEnC,eAAO,MAAM,aAAa,4BAA6B,CAAA;AACvD,eAAO,MAAM,gBAAgB,iCAAkC,CAAA;AAC/D,eAAO,MAAM,gBAAgB,6BAA8B,CAAA;AAC3D,eAAO,MAAM,mBAAmB,+GAUtB,CAAA;
|
|
1
|
+
{"version":3,"file":"catalog-types.d.ts","sourceRoot":"","sources":["../../src/catalog/catalog-types.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
export const catalogThemes = ['light', 'dark'];
|
|
2
2
|
export const catalogDensities = ['regular', 'compact'];
|
|
3
3
|
export const catalogViewports = ['wide', 'narrow'];
|
|
4
|
+
export const catalogAccessibilityModes = [
|
|
5
|
+
'standard',
|
|
6
|
+
'reduced-transparency',
|
|
7
|
+
'increased-contrast',
|
|
8
|
+
'reduced-motion',
|
|
9
|
+
];
|
|
4
10
|
export const catalogInteractions = [
|
|
5
11
|
'rest',
|
|
6
12
|
'hover',
|
|
@@ -12,3 +18,4 @@ export const catalogInteractions = [
|
|
|
12
18
|
'loading',
|
|
13
19
|
'empty',
|
|
14
20
|
];
|
|
21
|
+
export const catalogLiveStates = ['hover', 'focus', 'pressed'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-catalog.d.ts","sourceRoot":"","sources":["../../src/catalog/component-catalog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,KAAK,EACV,WAAW,EACX,iBAAiB,EACjB,eAAe,EAChB,MAAM,iBAAiB,CAAA;AAExB,MAAM,WAAW,qBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC;IACtD,QAAQ,EAAE,eAAe,CAAA;IACzB,MAAM,CAAC,EAAE,iBAAiB,CAAA;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB;AAED,MAAM,WAAW,qBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC;IACzD,WAAW,EAAE,WAAW,CAAA;IACxB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;
|
|
1
|
+
{"version":3,"file":"component-catalog.d.ts","sourceRoot":"","sources":["../../src/catalog/component-catalog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,KAAK,EACV,WAAW,EACX,iBAAiB,EACjB,eAAe,EAChB,MAAM,iBAAiB,CAAA;AAExB,MAAM,WAAW,qBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC;IACtD,QAAQ,EAAE,eAAe,CAAA;IACzB,MAAM,CAAC,EAAE,iBAAiB,CAAA;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB;AAED,MAAM,WAAW,qBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC;IACzD,WAAW,EAAE,WAAW,CAAA;IACxB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAiBD,wBAAgB,gBAAgB,CAAC,EAC/B,WAAW,EACX,SAAgB,EAChB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,qBAAqB,2CAyDvB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,MAAM,EACN,cAAqB,EACrB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,qBAAqB,2CA0GvB"}
|
|
@@ -3,18 +3,28 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { cn } from '../lib/utils';
|
|
4
4
|
import { buildCatalogCases } from './catalog-manifest';
|
|
5
5
|
function caseLabel(catalogCase) {
|
|
6
|
-
|
|
6
|
+
const labels = [
|
|
7
7
|
catalogCase.theme,
|
|
8
8
|
catalogCase.density,
|
|
9
9
|
catalogCase.viewport,
|
|
10
10
|
catalogCase.interaction,
|
|
11
|
-
]
|
|
11
|
+
];
|
|
12
|
+
if (catalogCase.accessibilityMode !== 'standard') {
|
|
13
|
+
labels.push(catalogCase.accessibilityMode);
|
|
14
|
+
}
|
|
15
|
+
return labels.join(' · ');
|
|
12
16
|
}
|
|
13
17
|
export function CatalogCaseFrame({ catalogCase, showLabel = true, className, ...props }) {
|
|
14
18
|
const isDark = catalogCase.theme === 'dark';
|
|
15
|
-
return (_jsxs("article", { "data-slot": "catalog-case", "data-catalog-case": catalogCase.caseId, "data-theme": catalogCase.theme, "data-density": catalogCase.density, "data-viewport": catalogCase.viewport, "data-
|
|
19
|
+
return (_jsxs("article", { "data-slot": "catalog-case", "data-catalog-case": catalogCase.caseId, "data-theme": catalogCase.theme, "data-density": catalogCase.density, "data-viewport": catalogCase.viewport, "data-accessibility-mode": catalogCase.accessibilityMode, "data-transparency": catalogCase.accessibilityMode === 'reduced-transparency'
|
|
20
|
+
? 'reduced'
|
|
21
|
+
: undefined, "data-contrast": catalogCase.accessibilityMode === 'increased-contrast'
|
|
22
|
+
? 'increased'
|
|
23
|
+
: undefined, "data-motion": catalogCase.accessibilityMode === 'reduced-motion'
|
|
24
|
+
? 'reduced'
|
|
25
|
+
: undefined, "data-interaction": catalogCase.interaction, "aria-label": `${catalogCase.storyTitle}: ${caseLabel(catalogCase)}`, className: cn('bg-background text-foreground border-border isolate overflow-hidden rounded-lg border shadow-sm', catalogCase.viewport === 'narrow'
|
|
16
26
|
? 'w-full max-w-80'
|
|
17
|
-
: 'w-full max-w-3xl', isDark && 'dark', className), ...props, children: [showLabel ? (_jsx("header", { "data-slot": "catalog-case-label", className: "border-
|
|
27
|
+
: 'w-full max-w-3xl', isDark && 'dark', className), ...props, children: [showLabel ? (_jsx("header", { "data-slot": "catalog-case-label", className: "border-border bg-muted/40 text-muted-foreground border-b px-3 py-2 font-mono text-[11px] leading-4", children: caseLabel(catalogCase) })) : null, _jsx("div", { "data-slot": "catalog-case-stage", className: cn('bg-background text-foreground min-h-24', catalogCase.density === 'compact' ? 'p-2' : 'p-4'), children: catalogCase.render(catalogCase) })] }));
|
|
18
28
|
}
|
|
19
29
|
export function ComponentCatalog({ manifest, filter, showCaseLabels = true, className, ...props }) {
|
|
20
30
|
const cases = buildCatalogCases(manifest, filter);
|
|
@@ -25,7 +35,7 @@ export function ComponentCatalog({ manifest, filter, showCaseLabels = true, clas
|
|
|
25
35
|
storyCases.push(catalogCase);
|
|
26
36
|
groupedCases.set(key, storyCases);
|
|
27
37
|
}
|
|
28
|
-
return (_jsxs("main", { "data-slot": "component-catalog", className: cn('min-h-full
|
|
38
|
+
return (_jsxs("main", { "data-slot": "component-catalog", className: cn('bg-muted/20 text-foreground min-h-full p-4 sm:p-6', className), ...props, children: [_jsxs("header", { className: "mx-auto mb-8 max-w-7xl", children: [_jsx("h1", { className: "text-2xl font-semibold tracking-tight", children: manifest.title }), manifest.description ? (_jsx("div", { className: "text-muted-foreground mt-2 max-w-3xl text-sm", children: manifest.description })) : null] }), _jsx("div", { className: "mx-auto grid max-w-7xl gap-10", children: manifest.sections.map((section) => {
|
|
29
39
|
const storyGroups = section.stories
|
|
30
40
|
.map((story) => ({
|
|
31
41
|
story,
|
|
@@ -34,6 +44,6 @@ export function ComponentCatalog({ manifest, filter, showCaseLabels = true, clas
|
|
|
34
44
|
.filter((group) => group.cases.length > 0);
|
|
35
45
|
if (storyGroups.length === 0)
|
|
36
46
|
return null;
|
|
37
|
-
return (_jsxs("section", { "data-slot": "catalog-section", "data-catalog-section": section.id, "aria-labelledby": `catalog-section-${section.id}`, children: [_jsxs("div", { className: "mb-4", children: [_jsx("h2", { id: `catalog-section-${section.id}`, className: "text-lg font-semibold tracking-tight", children: section.title }), section.description ? (_jsx("div", { className: "mt-1 max-w-3xl text-sm
|
|
47
|
+
return (_jsxs("section", { "data-slot": "catalog-section", "data-catalog-section": section.id, "aria-labelledby": `catalog-section-${section.id}`, children: [_jsxs("div", { className: "mb-4", children: [_jsx("h2", { id: `catalog-section-${section.id}`, className: "text-lg font-semibold tracking-tight", children: section.title }), section.description ? (_jsx("div", { className: "text-muted-foreground mt-1 max-w-3xl text-sm", children: section.description })) : null] }), _jsx("div", { className: "grid gap-8", children: storyGroups.map(({ story, cases: storyCases }) => (_jsxs("section", { "data-slot": "catalog-story", "data-catalog-story": story.id, "aria-labelledby": `catalog-story-${section.id}-${story.id}`, children: [_jsxs("div", { className: "mb-3", children: [_jsx("h3", { id: `catalog-story-${section.id}-${story.id}`, className: "text-sm font-medium", children: story.title }), story.description ? (_jsx("div", { className: "text-muted-foreground mt-1 text-xs", children: story.description })) : null] }), _jsx("div", { "data-slot": "catalog-case-grid", className: "grid items-start gap-4 xl:grid-cols-2", children: storyCases.map((catalogCase) => (_jsx(CatalogCaseFrame, { catalogCase: catalogCase, showLabel: showCaseLabels }, catalogCase.caseId))) })] }, story.id))) })] }, section.id));
|
|
38
48
|
}) })] }));
|
|
39
49
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CatalogCoverageExclusion } from './catalog-coverage';
|
|
2
|
+
/**
|
|
3
|
+
* Intentional gaps in the deterministic core catalog. Keeping this list
|
|
4
|
+
* explicit makes every new public visual module choose between authored
|
|
5
|
+
* coverage and a reviewable, temporary reason for deferral.
|
|
6
|
+
*/
|
|
7
|
+
export declare const coreCatalogExclusions: readonly CatalogCoverageExclusion[];
|
|
8
|
+
//# sourceMappingURL=core-catalog-exclusions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-catalog-exclusions.d.ts","sourceRoot":"","sources":["../../src/catalog/core-catalog-exclusions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAA;AAElE;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,SAAS,wBAAwB,EAsJ3D,CAAA"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Intentional gaps in the deterministic core catalog. Keeping this list
|
|
3
|
+
* explicit makes every new public visual module choose between authored
|
|
4
|
+
* coverage and a reviewable, temporary reason for deferral.
|
|
5
|
+
*/
|
|
6
|
+
export const coreCatalogExclusions = [
|
|
7
|
+
{
|
|
8
|
+
component: 'accordion',
|
|
9
|
+
reason: 'Needs an authored expanded and collapsed keyboard matrix.',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
component: 'alert-dialog',
|
|
13
|
+
reason: 'Requires isolated portal rendering before open states are stable.',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
component: 'aspect-ratio',
|
|
17
|
+
reason: 'Layout utility is exercised by consumer media compositions.',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
component: 'calendar',
|
|
21
|
+
reason: 'Needs a dedicated date-grid interaction matrix.',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
component: 'carousel',
|
|
25
|
+
reason: 'Needs stable geometry and navigation fixtures.',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
component: 'chart',
|
|
29
|
+
reason: 'Needs deterministic chart data and resize fixtures.',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
component: 'collapsible',
|
|
33
|
+
reason: 'Needs an authored disclosure-state matrix.',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
component: 'combobox',
|
|
37
|
+
reason: 'Requires isolated portal and filtering coverage.',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
component: 'command',
|
|
41
|
+
reason: 'Needs search, selection, empty, and keyboard fixtures.',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
component: 'confirm-dialog',
|
|
45
|
+
reason: 'Requires isolated async portal-state rendering.',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
component: 'context-menu',
|
|
49
|
+
reason: 'Requires isolated pointer-positioned portal rendering.',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
component: 'dialog',
|
|
53
|
+
reason: 'Requires isolated portal rendering before open states are stable.',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
component: 'drawer',
|
|
57
|
+
reason: 'Requires isolated viewport and gesture fixtures.',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
component: 'dropdown-menu',
|
|
61
|
+
reason: 'Requires isolated portal and keyboard coverage.',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
component: 'error-boundary-view',
|
|
65
|
+
reason: 'Needs the separately planned pane and full-window catalog test host.',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
component: 'date-picker',
|
|
69
|
+
reason: 'Requires isolated calendar portal rendering.',
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
component: 'edge-fade',
|
|
73
|
+
reason: 'Needs deterministic overflow geometry.',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
component: 'form',
|
|
77
|
+
reason: 'Behavioral adapter is covered through authored field stories.',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
component: 'hover-card',
|
|
81
|
+
reason: 'Requires isolated delayed-hover portal rendering.',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
component: 'input-group',
|
|
85
|
+
reason: 'Needs addon, button, and validation compositions.',
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
component: 'input-otp',
|
|
89
|
+
reason: 'Needs input-sequence and paste fixtures.',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
component: 'inspector',
|
|
93
|
+
reason: 'Needs a representative property-editing composition.',
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
component: 'label',
|
|
97
|
+
reason: 'Covered indirectly by labeled control compositions.',
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
component: 'menubar',
|
|
101
|
+
reason: 'Requires isolated multi-menu portal coverage.',
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
component: 'message-scroller',
|
|
105
|
+
reason: 'Needs deterministic overflow and anchoring geometry.',
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
component: 'navigation-menu',
|
|
109
|
+
reason: 'Requires isolated viewport and portal coverage.',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
component: 'pagination',
|
|
113
|
+
reason: 'Needs compact and large-page-count compositions.',
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
component: 'resizable',
|
|
117
|
+
reason: 'Needs stable browser geometry and drag fixtures.',
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
component: 'scroll-area',
|
|
121
|
+
reason: 'Needs deterministic overflow geometry.',
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
component: 'select',
|
|
125
|
+
reason: 'Requires isolated portal and keyboard coverage.',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
component: 'separator',
|
|
129
|
+
reason: 'Covered indirectly by toolbar, item, and panel compositions.',
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
component: 'sheet',
|
|
133
|
+
reason: 'Requires isolated portal and viewport-edge coverage.',
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
component: 'sidebar',
|
|
137
|
+
reason: 'Needs a complete app-shell viewport fixture.',
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
component: 'slider',
|
|
141
|
+
reason: 'Needs pointer and keyboard value fixtures.',
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
component: 'split-view',
|
|
145
|
+
reason: 'Needs stable browser geometry and drag fixtures.',
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
component: 'sonner',
|
|
149
|
+
reason: 'Requires an isolated live toaster host.',
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
component: 'tooltip',
|
|
153
|
+
reason: 'Requires isolated delayed portal rendering.',
|
|
154
|
+
},
|
|
155
|
+
];
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A small smoke catalog that proves the renderer and semantic token surface.
|
|
3
|
-
* Product teams should compose a broader manifest from their own public API.
|
|
4
|
-
*/
|
|
5
1
|
export declare const coreComponentCatalog: import("./catalog-types").CatalogManifest;
|
|
6
2
|
//# sourceMappingURL=core-catalog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-catalog.d.ts","sourceRoot":"","sources":["../../src/catalog/core-catalog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"core-catalog.d.ts","sourceRoot":"","sources":["../../src/catalog/core-catalog.tsx"],"names":[],"mappings":"AAQA,eAAO,MAAM,oBAAoB,2CAY/B,CAAA"}
|
|
@@ -1,105 +1,19 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { AppFrame, AppFrameContent, AppFrameTitlebar, AppFrameToolbar, } from '../components/ui/app-frame';
|
|
3
|
-
import { Badge } from '../components/ui/badge';
|
|
4
|
-
import { Button } from '../components/ui/button';
|
|
5
|
-
import { DateField } from '../components/ui/date-field';
|
|
6
|
-
import { Grid, GridItem, GridItemContent, GridItemDescription, GridItemTitle, } from '../components/ui/grid';
|
|
7
|
-
import { IconButton } from '../components/ui/icon-button';
|
|
8
|
-
import { Input } from '../components/ui/input';
|
|
9
|
-
import { List, ListItem, ListItemContent, ListItemDescription, ListItemTitle, } from '../components/ui/list';
|
|
10
|
-
import { SearchField } from '../components/ui/search-field';
|
|
11
|
-
import { SegmentedControl, SegmentedControlItem, } from '../components/ui/segmented-control';
|
|
12
|
-
import { Status } from '../components/ui/status';
|
|
13
1
|
import { createCatalogManifest } from './catalog-manifest';
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
2
|
+
import { coreCollectionsSection } from './core-collection-stories';
|
|
3
|
+
import { coreControlsSection } from './core-control-stories';
|
|
4
|
+
import { coreFeedbackSection } from './core-feedback-stories';
|
|
5
|
+
import { coreFoundationSection } from './core-foundation-stories';
|
|
6
|
+
import { coreNavigationSection } from './core-navigation-stories';
|
|
7
|
+
import { coreOverlaysSection } from './core-overlay-stories';
|
|
19
8
|
export const coreComponentCatalog = createCatalogManifest({
|
|
20
9
|
title: 'Moldable UI component catalog',
|
|
21
10
|
description: 'Deterministic component cases for review and visual regression coverage.',
|
|
22
11
|
sections: [
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
title: 'App frame',
|
|
30
|
-
interactions: ['rest', 'empty'],
|
|
31
|
-
render: ({ interaction }) => (_jsxs(AppFrame, { mode: "window", className: "h-56 rounded-container border", children: [_jsx(AppFrameTitlebar, { children: _jsx(AppFrameToolbar, { children: _jsx("strong", { className: "text-sm", children: "Calendar" }) }) }), _jsx(AppFrameContent, { className: "grid place-items-center p-4", children: _jsx("span", { className: "text-sm text-muted-foreground", children: interaction === 'empty'
|
|
32
|
-
? 'No events yet'
|
|
33
|
-
: 'App-owned canvas' }) })] })),
|
|
34
|
-
},
|
|
35
|
-
],
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
id: 'controls',
|
|
39
|
-
title: 'Controls',
|
|
40
|
-
stories: [
|
|
41
|
-
{
|
|
42
|
-
id: 'button',
|
|
43
|
-
title: 'Button',
|
|
44
|
-
interactions: ['rest', 'focus-visible', 'disabled'],
|
|
45
|
-
render: ({ interaction }) => (_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx(Button, { autoFocus: interaction === 'focus-visible', disabled: interaction === 'disabled', children: "Continue" }), _jsx(Button, { variant: "outline", disabled: interaction === 'disabled', children: "Cancel" })] })),
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
id: 'icon-button',
|
|
49
|
-
title: 'Icon button',
|
|
50
|
-
interactions: ['rest', 'focus-visible', 'disabled', 'loading'],
|
|
51
|
-
render: ({ interaction }) => (_jsx(IconButton, { label: "New item", autoFocus: interaction === 'focus-visible', disabled: interaction === 'disabled', loading: interaction === 'loading', variant: "ghost", children: _jsx(PlusIcon, {}) })),
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
id: 'segmented-control',
|
|
55
|
-
title: 'Segmented control',
|
|
56
|
-
interactions: ['rest', 'focus-visible', 'disabled'],
|
|
57
|
-
render: ({ interaction }) => (_jsxs(SegmentedControl, { "aria-label": "Calendar view", defaultValue: "month", disabled: interaction === 'disabled', children: [_jsx(SegmentedControlItem, { value: "week", autoFocus: interaction === 'focus-visible', children: "Week" }), _jsx(SegmentedControlItem, { value: "month", children: "Month" })] })),
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
id: 'text-field',
|
|
61
|
-
title: 'Text field',
|
|
62
|
-
interactions: ['rest', 'focus-visible', 'disabled', 'invalid'],
|
|
63
|
-
render: ({ interaction }) => (_jsxs("div", { className: "grid max-w-sm gap-1.5", children: [_jsx("label", { htmlFor: `catalog-input-${interaction}`, className: "text-sm", children: "Project name" }), _jsx(Input, { id: `catalog-input-${interaction}`, defaultValue: "Personal dashboard", autoFocus: interaction === 'focus-visible', disabled: interaction === 'disabled', "aria-invalid": interaction === 'invalid' || undefined })] })),
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
id: 'search-and-date-fields',
|
|
67
|
-
title: 'Search and date fields',
|
|
68
|
-
interactions: ['rest', 'focus-visible', 'disabled', 'invalid'],
|
|
69
|
-
render: ({ interaction }) => (_jsxs("div", { className: "grid max-w-sm gap-2", children: [_jsx(SearchField, { "aria-label": "Search events", placeholder: "Search", defaultValue: interaction === 'rest' ? 'Planning' : '', autoFocus: interaction === 'focus-visible', disabled: interaction === 'disabled', "aria-invalid": interaction === 'invalid' || undefined }), _jsx(DateField, { "aria-label": "Due date", defaultValue: "2026-07-26", disabled: interaction === 'disabled', "aria-invalid": interaction === 'invalid' || undefined })] })),
|
|
70
|
-
},
|
|
71
|
-
],
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
id: 'collections',
|
|
75
|
-
title: 'Collections',
|
|
76
|
-
stories: [
|
|
77
|
-
{
|
|
78
|
-
id: 'selectable-list',
|
|
79
|
-
title: 'Selectable list',
|
|
80
|
-
viewports: ['narrow'],
|
|
81
|
-
interactions: ['rest', 'focus-visible', 'selected', 'disabled'],
|
|
82
|
-
render: ({ interaction }) => (_jsxs(List, { "aria-label": "Documents", selectionMode: "single", defaultSelectedValues: interaction === 'selected' ? ['brief'] : undefined, children: [_jsx(ListItem, { value: "brief", autoFocus: interaction === 'focus-visible', children: _jsxs(ListItemContent, { children: [_jsx(ListItemTitle, { children: "Project brief" }), _jsx(ListItemDescription, { children: "Edited recently" })] }) }), _jsx(ListItem, { value: "archive", disabled: interaction === 'disabled', children: _jsxs(ListItemContent, { children: [_jsx(ListItemTitle, { children: "Archive" }), _jsx(ListItemDescription, { children: "Local documents" })] }) })] })),
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
id: 'selectable-grid',
|
|
86
|
-
title: 'Selectable grid',
|
|
87
|
-
interactions: ['rest', 'focus-visible', 'selected', 'disabled'],
|
|
88
|
-
render: ({ interaction, viewport }) => (_jsxs(Grid, { "aria-label": "Projects", columns: viewport === 'narrow' ? 1 : 2, selectionMode: "single", defaultSelectedValues: interaction === 'selected' ? ['personal'] : undefined, children: [_jsx(GridItem, { value: "personal", autoFocus: interaction === 'focus-visible', children: _jsxs(GridItemContent, { children: [_jsx(GridItemTitle, { children: "Personal" }), _jsx(GridItemDescription, { children: "8 items" })] }) }), _jsx(GridItem, { value: "work", disabled: interaction === 'disabled', children: _jsxs(GridItemContent, { children: [_jsx(GridItemTitle, { children: "Work" }), _jsx(GridItemDescription, { children: "12 items" })] }) })] })),
|
|
89
|
-
},
|
|
90
|
-
],
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
id: 'feedback',
|
|
94
|
-
title: 'Feedback',
|
|
95
|
-
stories: [
|
|
96
|
-
{
|
|
97
|
-
id: 'status-and-badges',
|
|
98
|
-
title: 'Status and badges',
|
|
99
|
-
viewports: ['narrow'],
|
|
100
|
-
render: () => (_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx(Status, { variant: "running", children: "Running" }), _jsx(Badge, { variant: "secondary", children: "Draft" }), _jsx(Badge, { variant: "outline", children: "Local" })] })),
|
|
101
|
-
},
|
|
102
|
-
],
|
|
103
|
-
},
|
|
12
|
+
coreFoundationSection,
|
|
13
|
+
coreControlsSection,
|
|
14
|
+
coreCollectionsSection,
|
|
15
|
+
coreNavigationSection,
|
|
16
|
+
coreOverlaysSection,
|
|
17
|
+
coreFeedbackSection,
|
|
104
18
|
],
|
|
105
19
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-collection-stories.d.ts","sourceRoot":"","sources":["../../src/catalog/core-collection-stories.tsx"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAA;AAE/D,eAAO,MAAM,sBAAsB,EAAE,wBAwIpC,CAAA"}
|