@slipstream-ui/core 0.3.0 → 0.5.0
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/index.d.mts +957 -56
- package/dist/index.d.ts +957 -56
- package/dist/index.js +2554 -777
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2524 -777
- package/dist/index.mjs.map +1 -1
- package/dist/manifests/app-shell.manifest.json +206 -0
- package/dist/manifests/auth-layout.manifest.json +99 -0
- package/dist/manifests/autocomplete.manifest.json +53 -5
- package/dist/manifests/badge.manifest.json +20 -3
- package/dist/manifests/breadcrumb.manifest.json +6 -0
- package/dist/manifests/button.manifest.json +20 -2
- package/dist/manifests/card.manifest.json +53 -6
- package/dist/manifests/confirm-dialog.manifest.json +132 -0
- package/dist/manifests/data-table.manifest.json +50 -0
- package/dist/manifests/date-picker.manifest.json +87 -0
- package/dist/manifests/dialog.manifest.json +56 -4
- package/dist/manifests/drawer.manifest.json +25 -4
- package/dist/manifests/empty-state.manifest.json +108 -0
- package/dist/manifests/file-upload.manifest.json +103 -0
- package/dist/manifests/filter-bar.manifest.json +100 -0
- package/dist/manifests/link.manifest.json +106 -0
- package/dist/manifests/menu.manifest.json +13 -1
- package/dist/manifests/metric-card.manifest.json +105 -0
- package/dist/manifests/page-header.manifest.json +124 -0
- package/dist/manifests/pagination.manifest.json +68 -34
- package/dist/manifests/password-input.manifest.json +75 -0
- package/dist/manifests/prose.manifest.json +75 -0
- package/dist/manifests/search.manifest.json +41 -9
- package/dist/manifests/section-heading.manifest.json +108 -0
- package/dist/manifests/select-menu.manifest.json +142 -0
- package/dist/manifests/select.manifest.json +55 -12
- package/dist/manifests/site-footer.manifest.json +94 -0
- package/dist/manifests/site-header.manifest.json +130 -0
- package/dist/manifests/stepper.manifest.json +95 -0
- package/dist/manifests/table-card.manifest.json +123 -0
- package/dist/manifests/table-of-contents.manifest.json +87 -0
- package/dist/manifests/time-picker.manifest.json +86 -0
- package/dist/manifests/timeline.manifest.json +69 -0
- package/dist/manifests/toast.manifest.json +101 -25
- package/package.json +2 -2
- package/src/components/alert/Alert.tsx +2 -2
- package/src/components/app-shell/AppShell.test.tsx +148 -0
- package/src/components/app-shell/AppShell.tsx +266 -0
- package/src/components/app-shell/index.ts +1 -0
- package/src/components/auth-layout/AuthLayout.test.tsx +34 -0
- package/src/components/auth-layout/AuthLayout.tsx +47 -0
- package/src/components/auth-layout/index.ts +1 -0
- package/src/components/autocomplete/Autocomplete.test.tsx +53 -0
- package/src/components/autocomplete/Autocomplete.tsx +160 -41
- package/src/components/badge/Badge.test.tsx +35 -0
- package/src/components/badge/Badge.tsx +16 -4
- package/src/components/breadcrumb/Breadcrumb.test.tsx +16 -0
- package/src/components/breadcrumb/Breadcrumb.tsx +10 -5
- package/src/components/button/Button.test.tsx +67 -0
- package/src/components/button/Button.tsx +37 -3
- package/src/components/button-group/ButtonGroup.test.tsx +6 -8
- package/src/components/button-group/ButtonGroup.tsx +17 -9
- package/src/components/card/Card.test.tsx +14 -0
- package/src/components/card/Card.tsx +15 -8
- package/src/components/confirm-dialog/ConfirmDialog.test.tsx +46 -0
- package/src/components/confirm-dialog/ConfirmDialog.tsx +86 -0
- package/src/components/confirm-dialog/index.ts +1 -0
- package/src/components/data-table/DataTable.test.tsx +92 -0
- package/src/components/data-table/DataTable.tsx +98 -7
- package/src/components/date-picker/DatePicker.test.tsx +30 -0
- package/src/components/date-picker/DatePicker.tsx +57 -0
- package/src/components/date-picker/index.ts +1 -0
- package/src/components/dialog/Dialog.test.tsx +71 -1
- package/src/components/dialog/Dialog.tsx +116 -23
- package/src/components/dialog/index.ts +1 -2
- package/src/components/drawer/Drawer.test.tsx +59 -0
- package/src/components/drawer/Drawer.tsx +49 -8
- package/src/components/empty-state/EmptyState.test.tsx +30 -0
- package/src/components/empty-state/EmptyState.tsx +48 -0
- package/src/components/empty-state/index.ts +1 -0
- package/src/components/file-upload/FileUpload.test.tsx +43 -0
- package/src/components/file-upload/FileUpload.tsx +143 -0
- package/src/components/file-upload/index.ts +1 -0
- package/src/components/filter-bar/FilterBar.test.tsx +32 -0
- package/src/components/filter-bar/FilterBar.tsx +71 -0
- package/src/components/filter-bar/index.ts +1 -0
- package/src/components/input/Input.tsx +1 -0
- package/src/components/input-group/InputGroup.test.tsx +6 -3
- package/src/components/input-group/InputGroup.tsx +9 -6
- package/src/components/link/Link.test.tsx +60 -0
- package/src/components/link/Link.tsx +85 -0
- package/src/components/link/index.ts +1 -0
- package/src/components/menu/Menu.test.tsx +21 -0
- package/src/components/menu/Menu.tsx +8 -3
- package/src/components/metric-card/MetricCard.test.tsx +28 -0
- package/src/components/metric-card/MetricCard.tsx +54 -0
- package/src/components/metric-card/index.ts +1 -0
- package/src/components/page-header/PageHeader.test.tsx +48 -0
- package/src/components/page-header/PageHeader.tsx +53 -0
- package/src/components/page-header/index.ts +1 -0
- package/src/components/pagination/Pagination.test.tsx +33 -0
- package/src/components/pagination/Pagination.tsx +69 -18
- package/src/components/password-input/PasswordInput.test.tsx +29 -0
- package/src/components/password-input/PasswordInput.tsx +41 -0
- package/src/components/password-input/index.ts +1 -0
- package/src/components/prose/Prose.test.tsx +35 -0
- package/src/components/prose/Prose.tsx +61 -0
- package/src/components/prose/index.ts +1 -0
- package/src/components/search/Search.test.tsx +16 -0
- package/src/components/search/Search.tsx +11 -2
- package/src/components/section-heading/SectionHeading.test.tsx +32 -0
- package/src/components/section-heading/SectionHeading.tsx +54 -0
- package/src/components/section-heading/index.ts +1 -0
- package/src/components/select/Select.test.tsx +40 -1
- package/src/components/select/Select.tsx +54 -14
- package/src/components/select/index.ts +1 -1
- package/src/components/select-menu/SelectMenu.test.tsx +105 -0
- package/src/components/select-menu/SelectMenu.tsx +368 -0
- package/src/components/select-menu/index.ts +1 -0
- package/src/components/site-footer/SiteFooter.test.tsx +30 -0
- package/src/components/site-footer/SiteFooter.tsx +79 -0
- package/src/components/site-footer/index.ts +1 -0
- package/src/components/site-header/SiteHeader.test.tsx +53 -0
- package/src/components/site-header/SiteHeader.tsx +124 -0
- package/src/components/site-header/index.ts +1 -0
- package/src/components/stepper/Stepper.test.tsx +35 -0
- package/src/components/stepper/Stepper.tsx +91 -0
- package/src/components/stepper/index.ts +1 -0
- package/src/components/switch/Switch.test.tsx +10 -0
- package/src/components/switch/Switch.tsx +8 -3
- package/src/components/table-card/TableCard.test.tsx +59 -0
- package/src/components/table-card/TableCard.tsx +48 -0
- package/src/components/table-card/index.ts +1 -0
- package/src/components/table-of-contents/TableOfContents.test.tsx +31 -0
- package/src/components/table-of-contents/TableOfContents.tsx +100 -0
- package/src/components/table-of-contents/index.ts +1 -0
- package/src/components/textarea/Textarea.tsx +1 -0
- package/src/components/time-picker/TimePicker.test.tsx +30 -0
- package/src/components/time-picker/TimePicker.tsx +56 -0
- package/src/components/time-picker/index.ts +1 -0
- package/src/components/timeline/Timeline.test.tsx +26 -0
- package/src/components/timeline/Timeline.tsx +53 -0
- package/src/components/timeline/index.ts +1 -0
- package/src/components/toast/Toast.test.tsx +5 -0
- package/src/components/toast/Toast.tsx +2 -16
- package/src/components/toast/Toaster.test.tsx +84 -0
- package/src/components/toast/Toaster.tsx +116 -0
- package/src/components/toast/index.ts +4 -0
- package/src/components/toast/toast-store.ts +117 -0
- package/src/index.ts +21 -0
- package/src/manifests/app-shell.manifest.json +206 -0
- package/src/manifests/auth-layout.manifest.json +99 -0
- package/src/manifests/autocomplete.manifest.json +53 -5
- package/src/manifests/badge.manifest.json +20 -3
- package/src/manifests/breadcrumb.manifest.json +6 -0
- package/src/manifests/button.manifest.json +20 -2
- package/src/manifests/card.manifest.json +53 -6
- package/src/manifests/confirm-dialog.manifest.json +132 -0
- package/src/manifests/data-table.manifest.json +50 -0
- package/src/manifests/date-picker.manifest.json +87 -0
- package/src/manifests/dialog.manifest.json +56 -4
- package/src/manifests/drawer.manifest.json +25 -4
- package/src/manifests/empty-state.manifest.json +108 -0
- package/src/manifests/file-upload.manifest.json +103 -0
- package/src/manifests/filter-bar.manifest.json +100 -0
- package/src/manifests/link.manifest.json +106 -0
- package/src/manifests/menu.manifest.json +13 -1
- package/src/manifests/metric-card.manifest.json +105 -0
- package/src/manifests/page-header.manifest.json +124 -0
- package/src/manifests/pagination.manifest.json +68 -34
- package/src/manifests/password-input.manifest.json +75 -0
- package/src/manifests/prose.manifest.json +75 -0
- package/src/manifests/search.manifest.json +41 -9
- package/src/manifests/section-heading.manifest.json +108 -0
- package/src/manifests/select-menu.manifest.json +142 -0
- package/src/manifests/select.manifest.json +55 -12
- package/src/manifests/site-footer.manifest.json +94 -0
- package/src/manifests/site-header.manifest.json +130 -0
- package/src/manifests/stepper.manifest.json +95 -0
- package/src/manifests/table-card.manifest.json +123 -0
- package/src/manifests/table-of-contents.manifest.json +87 -0
- package/src/manifests/time-picker.manifest.json +86 -0
- package/src/manifests/timeline.manifest.json +69 -0
- package/src/manifests/toast.manifest.json +101 -25
- package/src/test/tailwind-v4.test.ts +103 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "site-footer",
|
|
3
|
+
"name": "SiteFooter",
|
|
4
|
+
"tier": "organism",
|
|
5
|
+
"package": "@slipstream-ui/core",
|
|
6
|
+
"importPath": "@slipstream-ui/core",
|
|
7
|
+
"version": "0.1.0",
|
|
8
|
+
"sourceDir": "site-footer",
|
|
9
|
+
"exportName": "SiteFooter",
|
|
10
|
+
"description": "Marketing footer: brand + tagline column, link columns and a legal bar; router-agnostic via linkComponent.",
|
|
11
|
+
"designIntent": "Footers are copied between projects with inconsistent link handling. SiteFooter provides the standard multi-column layout, safe external links and a legal row.",
|
|
12
|
+
"props": [
|
|
13
|
+
{
|
|
14
|
+
"name": "brand",
|
|
15
|
+
"type": "ReactNode",
|
|
16
|
+
"required": false,
|
|
17
|
+
"description": "Brand slot."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "tagline",
|
|
21
|
+
"type": "string",
|
|
22
|
+
"required": false,
|
|
23
|
+
"description": "Short line under the brand."
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "columns",
|
|
27
|
+
"type": "SiteFooterColumn[]",
|
|
28
|
+
"required": true,
|
|
29
|
+
"description": "Link columns: { title, links: { label, href, external? }[] }."
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "legal",
|
|
33
|
+
"type": "ReactNode",
|
|
34
|
+
"required": false,
|
|
35
|
+
"description": "Bottom bar (copyright, legal links)."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "linkComponent",
|
|
39
|
+
"type": "React.ElementType",
|
|
40
|
+
"required": false,
|
|
41
|
+
"description": "Router link element."
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"examples": [
|
|
45
|
+
{
|
|
46
|
+
"title": "Standard footer",
|
|
47
|
+
"code": "<SiteFooter\n brand={<img src=\"/logo.svg\" alt=\"Acme\" className=\"h-10\" />}\n tagline=\"Ship UI your AI understands.\"\n columns={[{ title: 'Docs', links: [{ label: 'Intro', href: '/docs' }] }]}\n legal={<span>© 2026 Acme</span>}\n/>",
|
|
48
|
+
"description": "Brand, columns and legal row."
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"antiPatterns": [
|
|
52
|
+
{
|
|
53
|
+
"title": "Don't duplicate the same links in two columns",
|
|
54
|
+
"explanation": "Keep each destination in exactly one column for predictable scanning.",
|
|
55
|
+
"example": "// Avoid: Docs in Product and Resources"
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"accessibility": [
|
|
59
|
+
{
|
|
60
|
+
"feature": "Landmark semantics",
|
|
61
|
+
"implementation": "Renders <footer> with headed link groups",
|
|
62
|
+
"userRequirements": "Give columns short, unique titles"
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"contentGuidelines": [
|
|
66
|
+
{
|
|
67
|
+
"contentType": "Column titles",
|
|
68
|
+
"guidelines": [
|
|
69
|
+
"Nouns",
|
|
70
|
+
"3-8 items per column"
|
|
71
|
+
],
|
|
72
|
+
"goodExamples": [
|
|
73
|
+
"Product",
|
|
74
|
+
"Legal",
|
|
75
|
+
"Community"
|
|
76
|
+
],
|
|
77
|
+
"badExamples": [
|
|
78
|
+
"Links"
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"compositionRules": [
|
|
83
|
+
{
|
|
84
|
+
"component": "SiteHeader",
|
|
85
|
+
"relationship": "Pair for a complete marketing shell",
|
|
86
|
+
"example": "<SiteHeader … />…<SiteFooter … />"
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"relatedComponents": [
|
|
90
|
+
"SiteHeader",
|
|
91
|
+
"Link",
|
|
92
|
+
"Separator"
|
|
93
|
+
]
|
|
94
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "site-header",
|
|
3
|
+
"name": "SiteHeader",
|
|
4
|
+
"tier": "organism",
|
|
5
|
+
"package": "@slipstream-ui/core",
|
|
6
|
+
"importPath": "@slipstream-ui/core",
|
|
7
|
+
"version": "0.1.0",
|
|
8
|
+
"sourceDir": "site-header",
|
|
9
|
+
"exportName": "SiteHeader",
|
|
10
|
+
"description": "Marketing/site header: sticky bar with brand, horizontal navigation with prefix-aware active states, right-aligned actions and a mobile drawer.",
|
|
11
|
+
"designIntent": "Marketing sites repeat brand/nav/actions/mobile-menu wiring with custom active matching. SiteHeader standardizes the bar, handles /docs matching /docs/components, and stays router-agnostic via linkComponent.",
|
|
12
|
+
"props": [
|
|
13
|
+
{
|
|
14
|
+
"name": "brand",
|
|
15
|
+
"type": "ReactNode",
|
|
16
|
+
"required": true,
|
|
17
|
+
"description": "Brand slot (logo/lockup), wrapped in a link to /."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "items",
|
|
21
|
+
"type": "SiteNavItem[]",
|
|
22
|
+
"required": true,
|
|
23
|
+
"description": "Primary nav: { href, label, external? }."
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "activeHref",
|
|
27
|
+
"type": "string",
|
|
28
|
+
"required": false,
|
|
29
|
+
"description": "Current route for active styling (aria-current=page)."
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "match",
|
|
33
|
+
"type": "'prefix' | 'exact'",
|
|
34
|
+
"required": false,
|
|
35
|
+
"defaultValue": "prefix",
|
|
36
|
+
"description": "Prefix highlights parents of the current route; exact only identical hrefs.",
|
|
37
|
+
"enum": [
|
|
38
|
+
"prefix",
|
|
39
|
+
"exact"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "actions",
|
|
44
|
+
"type": "ReactNode",
|
|
45
|
+
"required": false,
|
|
46
|
+
"description": "Right-aligned actions (theme toggle, GitHub, CTA)."
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "linkComponent",
|
|
50
|
+
"type": "React.ElementType",
|
|
51
|
+
"required": false,
|
|
52
|
+
"description": "Router link element."
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"name": "sticky",
|
|
56
|
+
"type": "boolean",
|
|
57
|
+
"required": false,
|
|
58
|
+
"defaultValue": "true",
|
|
59
|
+
"description": "Pin the bar to the top."
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"name": "mobileLabel",
|
|
63
|
+
"type": "string",
|
|
64
|
+
"required": false,
|
|
65
|
+
"defaultValue": "Menu",
|
|
66
|
+
"description": "Title of the mobile navigation drawer."
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"examples": [
|
|
70
|
+
{
|
|
71
|
+
"title": "Marketing header",
|
|
72
|
+
"code": "<SiteHeader\n brand={<img src=\"/logo.svg\" alt=\"Acme\" className=\"h-8\" />}\n items={[{ href: '/docs', label: 'Docs' }, { href: '/pricing', label: 'Pricing' }]}\n activeHref={pathname}\n linkComponent={RouterLink}\n actions={<ThemeToggle />}\n/>",
|
|
73
|
+
"description": "Prefix-active nav with a mobile drawer."
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"antiPatterns": [
|
|
77
|
+
{
|
|
78
|
+
"title": "Don't use it for admin rails",
|
|
79
|
+
"explanation": "Vertical app navigation belongs in Sidebar + AppShell.",
|
|
80
|
+
"example": "// Avoid\n<SiteHeader items={adminNav} />\n\n// Prefer\n<AppShell sidebar={<Sidebar sections={sections} />}>…</AppShell>"
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"accessibility": [
|
|
84
|
+
{
|
|
85
|
+
"feature": "Current page",
|
|
86
|
+
"implementation": "aria-current=page on the active link (prefix or exact matching)",
|
|
87
|
+
"userRequirements": "Pass activeHref on every route"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"feature": "Mobile navigation",
|
|
91
|
+
"implementation": "Burger opens a focus-trapped Drawer with the same items",
|
|
92
|
+
"userRequirements": "Keep the same item list for both breakpoints"
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"contentGuidelines": [
|
|
96
|
+
{
|
|
97
|
+
"contentType": "Nav labels",
|
|
98
|
+
"guidelines": [
|
|
99
|
+
"1-2 nouns",
|
|
100
|
+
"Parallel phrasing"
|
|
101
|
+
],
|
|
102
|
+
"goodExamples": [
|
|
103
|
+
"Docs",
|
|
104
|
+
"Pricing",
|
|
105
|
+
"Changelog"
|
|
106
|
+
],
|
|
107
|
+
"badExamples": [
|
|
108
|
+
"Click here for docs"
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
"compositionRules": [
|
|
113
|
+
{
|
|
114
|
+
"component": "SiteFooter",
|
|
115
|
+
"relationship": "Pair header and footer for a complete marketing shell",
|
|
116
|
+
"example": "<SiteHeader … /><main /><SiteFooter … />"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"component": "Drawer",
|
|
120
|
+
"relationship": "The mobile menu is a Drawer automatically",
|
|
121
|
+
"example": "<SiteHeader … />"
|
|
122
|
+
}
|
|
123
|
+
],
|
|
124
|
+
"relatedComponents": [
|
|
125
|
+
"SiteFooter",
|
|
126
|
+
"AppShell",
|
|
127
|
+
"Sidebar",
|
|
128
|
+
"Link"
|
|
129
|
+
]
|
|
130
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "stepper",
|
|
3
|
+
"name": "Stepper",
|
|
4
|
+
"tier": "molecule",
|
|
5
|
+
"description": "Multi-step flow indicator: ordered list, aria-current step, text state for complete/current/upcoming.",
|
|
6
|
+
"designIntent": "Wizards need orientation: where am I, what is done, what is next. A stepper built on an ordered list keeps the sequence structural and announces state in text, not just color.",
|
|
7
|
+
"props": [
|
|
8
|
+
{
|
|
9
|
+
"name": "steps",
|
|
10
|
+
"type": "{ label: string; description?: string }[]",
|
|
11
|
+
"required": true,
|
|
12
|
+
"description": "Ordered step definitions."
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "current",
|
|
16
|
+
"type": "number",
|
|
17
|
+
"required": true,
|
|
18
|
+
"description": "Zero-based index of the active step."
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "orientation",
|
|
22
|
+
"type": "'horizontal' | 'vertical'",
|
|
23
|
+
"required": false,
|
|
24
|
+
"defaultValue": "horizontal",
|
|
25
|
+
"description": "Layout direction.",
|
|
26
|
+
"enum": [
|
|
27
|
+
"horizontal",
|
|
28
|
+
"vertical"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "onStepClick",
|
|
33
|
+
"type": "(index: number) => void",
|
|
34
|
+
"required": false,
|
|
35
|
+
"description": "Makes steps clickable (for revisit flows)."
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"examples": [
|
|
39
|
+
{
|
|
40
|
+
"title": "Onboarding wizard",
|
|
41
|
+
"code": "<Stepper\n current={step}\n steps={[{ label: 'Account' }, { label: 'Studio details' }, { label: 'Invite team' }, { label: 'Review' }]}\n/>",
|
|
42
|
+
"description": "Current step is announced; completed steps show a check."
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"antiPatterns": [
|
|
46
|
+
{
|
|
47
|
+
"title": "Don't use it for progress percentage",
|
|
48
|
+
"explanation": "Use Progress for measurable 0-100 progress; Stepper is discrete stages.",
|
|
49
|
+
"example": "// Avoid: 7 steps for an upload\n// Prefer: <Progress value={42} />"
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"accessibility": [
|
|
53
|
+
{
|
|
54
|
+
"feature": "Sequence + state",
|
|
55
|
+
"implementation": "Ordered list with aria-current=step and sr-only state text",
|
|
56
|
+
"userRequirements": "Keep step labels short and parallel"
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"contentGuidelines": [
|
|
60
|
+
{
|
|
61
|
+
"contentType": "Step labels",
|
|
62
|
+
"guidelines": [
|
|
63
|
+
"Verb or noun phrase",
|
|
64
|
+
"Parallel grammar",
|
|
65
|
+
"3-5 steps max"
|
|
66
|
+
],
|
|
67
|
+
"goodExamples": [
|
|
68
|
+
"Account",
|
|
69
|
+
"Studio details",
|
|
70
|
+
"Review"
|
|
71
|
+
],
|
|
72
|
+
"badExamples": [
|
|
73
|
+
"Step 1",
|
|
74
|
+
"Now do this"
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"compositionRules": [
|
|
79
|
+
{
|
|
80
|
+
"component": "Form",
|
|
81
|
+
"relationship": "One Form (or Form step) per Stepper stage",
|
|
82
|
+
"example": "<Stepper current={1} steps={steps} />"
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"relatedComponents": [
|
|
86
|
+
"Progress",
|
|
87
|
+
"Tabs",
|
|
88
|
+
"Form"
|
|
89
|
+
],
|
|
90
|
+
"package": "@slipstream-ui/core",
|
|
91
|
+
"importPath": "@slipstream-ui/core",
|
|
92
|
+
"version": "0.1.0",
|
|
93
|
+
"sourceDir": "stepper",
|
|
94
|
+
"exportName": "Stepper"
|
|
95
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "table-card",
|
|
3
|
+
"name": "TableCard",
|
|
4
|
+
"tier": "molecule",
|
|
5
|
+
"package": "@slipstream-ui/core",
|
|
6
|
+
"importPath": "@slipstream-ui/core",
|
|
7
|
+
"version": "0.1.0",
|
|
8
|
+
"sourceDir": "table-card",
|
|
9
|
+
"exportName": "TableCard",
|
|
10
|
+
"description": "Table shell with title/description, header actions, optional toolbar, edge-to-edge body and a footer row.",
|
|
11
|
+
"designIntent": "Every list page rebuilds the same chrome around Table/DataTable: heading, count, actions, filter row, pagination. TableCard standardizes that shell so pages only supply the table.",
|
|
12
|
+
"props": [
|
|
13
|
+
{
|
|
14
|
+
"name": "title",
|
|
15
|
+
"type": "string",
|
|
16
|
+
"required": false,
|
|
17
|
+
"description": "Card heading."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "description",
|
|
21
|
+
"type": "string",
|
|
22
|
+
"required": false,
|
|
23
|
+
"description": "Supporting line under the heading."
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "actions",
|
|
27
|
+
"type": "ReactNode",
|
|
28
|
+
"required": false,
|
|
29
|
+
"description": "Right-aligned header actions."
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "toolbar",
|
|
33
|
+
"type": "ReactNode",
|
|
34
|
+
"required": false,
|
|
35
|
+
"description": "Row between header and table (filters, bulk actions)."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "children",
|
|
39
|
+
"type": "ReactNode",
|
|
40
|
+
"required": true,
|
|
41
|
+
"description": "Table or DataTable content."
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "footer",
|
|
45
|
+
"type": "ReactNode",
|
|
46
|
+
"required": false,
|
|
47
|
+
"description": "Footer row (pagination, summary)."
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"name": "flush",
|
|
51
|
+
"type": "boolean",
|
|
52
|
+
"required": false,
|
|
53
|
+
"defaultValue": "true",
|
|
54
|
+
"description": "Remove inner padding so the table reaches the card edges."
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"examples": [
|
|
58
|
+
{
|
|
59
|
+
"title": "List page table",
|
|
60
|
+
"code": "<TableCard\n title=\"Classes\"\n description=\"12 active\"\n actions={<Button>New class</Button>}\n toolbar={<FilterBar … />}\n footer={<Pagination … />}\n>\n <DataTable columns={columns} data={rows} />\n</TableCard>",
|
|
61
|
+
"description": "Header, toolbar, table and pagination in one surface."
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"antiPatterns": [
|
|
65
|
+
{
|
|
66
|
+
"title": "Don't nest another bordered card",
|
|
67
|
+
"explanation": "TableCard is the surface; wrapping it in Card double-borders the content.",
|
|
68
|
+
"example": "// Avoid\n<Card><TableCard>…</TableCard></Card>"
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"accessibility": [
|
|
72
|
+
{
|
|
73
|
+
"feature": "Heading semantics",
|
|
74
|
+
"implementation": "Title renders an h2 (page owns the h1 via PageHeader)",
|
|
75
|
+
"userRequirements": "Don't skip heading levels"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"feature": "Table labelling",
|
|
79
|
+
"implementation": "The table keeps its own caption/aria-label",
|
|
80
|
+
"userRequirements": "Always label the table inside"
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"contentGuidelines": [
|
|
84
|
+
{
|
|
85
|
+
"contentType": "Titles",
|
|
86
|
+
"guidelines": [
|
|
87
|
+
"Plural noun",
|
|
88
|
+
"Sentence case",
|
|
89
|
+
"Pair with a count in description"
|
|
90
|
+
],
|
|
91
|
+
"goodExamples": [
|
|
92
|
+
"Classes · 12 active"
|
|
93
|
+
],
|
|
94
|
+
"badExamples": [
|
|
95
|
+
"Data"
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
"compositionRules": [
|
|
100
|
+
{
|
|
101
|
+
"component": "DataTable",
|
|
102
|
+
"relationship": "Body content; use flush for edge-to-edge rows",
|
|
103
|
+
"example": "<TableCard flush><DataTable … /></TableCard>"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"component": "FilterBar",
|
|
107
|
+
"relationship": "Pass as toolbar for list filtering",
|
|
108
|
+
"example": "<TableCard toolbar={<FilterBar … />}>…</TableCard>"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"component": "Pagination",
|
|
112
|
+
"relationship": "Pass as footer",
|
|
113
|
+
"example": "<TableCard footer={<Pagination … />}>…</TableCard>"
|
|
114
|
+
}
|
|
115
|
+
],
|
|
116
|
+
"relatedComponents": [
|
|
117
|
+
"DataTable",
|
|
118
|
+
"Table",
|
|
119
|
+
"FilterBar",
|
|
120
|
+
"Pagination",
|
|
121
|
+
"Card"
|
|
122
|
+
]
|
|
123
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "table-of-contents",
|
|
3
|
+
"name": "TableOfContents",
|
|
4
|
+
"tier": "molecule",
|
|
5
|
+
"package": "@slipstream-ui/core",
|
|
6
|
+
"importPath": "@slipstream-ui/core",
|
|
7
|
+
"version": "0.1.0",
|
|
8
|
+
"sourceDir": "table-of-contents",
|
|
9
|
+
"exportName": "TableOfContents",
|
|
10
|
+
"description": "Sticky 'On this page' navigation with nested levels and aria-current, plus a useScrollSpy hook for the active heading.",
|
|
11
|
+
"designIntent": "Long-form pages drift into bespoke TOC implementations. TableOfContents fixes the nested list, active styling and landmark name; useScrollSpy supplies the active id from real scroll position.",
|
|
12
|
+
"props": [
|
|
13
|
+
{
|
|
14
|
+
"name": "headings",
|
|
15
|
+
"type": "TocHeading[]",
|
|
16
|
+
"required": true,
|
|
17
|
+
"description": "Headings: { id, text, level: 2 | 3 | 4 }."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "activeId",
|
|
21
|
+
"type": "string",
|
|
22
|
+
"required": false,
|
|
23
|
+
"description": "Controlled active heading (pair with useScrollSpy)."
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "label",
|
|
27
|
+
"type": "string",
|
|
28
|
+
"required": false,
|
|
29
|
+
"defaultValue": "On this page",
|
|
30
|
+
"description": "Accessible name of the nav landmark."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "sticky",
|
|
34
|
+
"type": "boolean",
|
|
35
|
+
"required": false,
|
|
36
|
+
"defaultValue": "true",
|
|
37
|
+
"description": "Stick while the article scrolls."
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"examples": [
|
|
41
|
+
{
|
|
42
|
+
"title": "Article TOC",
|
|
43
|
+
"code": "const activeId = useScrollSpy(headings.map((h) => h.id));\n\n<TableOfContents headings={headings} activeId={activeId} />",
|
|
44
|
+
"description": "Scroll-spy driven active state."
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"antiPatterns": [
|
|
48
|
+
{
|
|
49
|
+
"title": "Don't hardcode the active id",
|
|
50
|
+
"explanation": "Compute it from scroll position so the highlight follows the reader.",
|
|
51
|
+
"example": "// Avoid\n<TableOfContents headings={h} activeId=\"intro\" />"
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"accessibility": [
|
|
55
|
+
{
|
|
56
|
+
"feature": "Landmark + current item",
|
|
57
|
+
"implementation": "nav aria-label plus aria-current=location on the active link",
|
|
58
|
+
"userRequirements": "Keep heading levels sequential"
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"contentGuidelines": [
|
|
62
|
+
{
|
|
63
|
+
"contentType": "Heading text",
|
|
64
|
+
"guidelines": [
|
|
65
|
+
"Match the on-page heading text exactly"
|
|
66
|
+
],
|
|
67
|
+
"goodExamples": [
|
|
68
|
+
"Installation"
|
|
69
|
+
],
|
|
70
|
+
"badExamples": [
|
|
71
|
+
"Section 1"
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
"compositionRules": [
|
|
76
|
+
{
|
|
77
|
+
"component": "Prose",
|
|
78
|
+
"relationship": "Pairs with article bodies",
|
|
79
|
+
"example": "<TableOfContents headings={headings} activeId={active} />"
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"relatedComponents": [
|
|
83
|
+
"Prose",
|
|
84
|
+
"Breadcrumb",
|
|
85
|
+
"List"
|
|
86
|
+
]
|
|
87
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "time-picker",
|
|
3
|
+
"name": "TimePicker",
|
|
4
|
+
"tier": "molecule",
|
|
5
|
+
"description": "Native time field with an HH:MM contract and an optional clear button.",
|
|
6
|
+
"designIntent": "Like DatePicker: the platform time control is already accessible and locale-aware. TimePicker standardizes the HH:MM contract and clear affordance.",
|
|
7
|
+
"props": [
|
|
8
|
+
{
|
|
9
|
+
"name": "value",
|
|
10
|
+
"type": "string",
|
|
11
|
+
"required": false,
|
|
12
|
+
"description": "\"HH:MM\" (24h), controlled."
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "defaultValue",
|
|
16
|
+
"type": "string",
|
|
17
|
+
"required": false,
|
|
18
|
+
"description": "\"HH:MM\", initial value."
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "onValueChange",
|
|
22
|
+
"type": "(value: string) => void",
|
|
23
|
+
"required": false,
|
|
24
|
+
"description": "Fired with the time string; '' when cleared."
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "clearable",
|
|
28
|
+
"type": "boolean",
|
|
29
|
+
"required": false,
|
|
30
|
+
"defaultValue": "false",
|
|
31
|
+
"description": "Shows a clear button once a value exists."
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"examples": [
|
|
35
|
+
{
|
|
36
|
+
"title": "Time field",
|
|
37
|
+
"code": "<TimePicker aria-label=\"Starts at\" value={start} onValueChange={setStart} clearable />",
|
|
38
|
+
"description": "Controlled HH:MM value."
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"antiPatterns": [
|
|
42
|
+
{
|
|
43
|
+
"title": "Don't mix 12h display with 24h state",
|
|
44
|
+
"explanation": "State stays HH:MM; format for display with Intl.",
|
|
45
|
+
"example": "// Avoid: '9:30 PM' in state\n// Prefer: '21:30'"
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"accessibility": [
|
|
49
|
+
{
|
|
50
|
+
"feature": "Platform input",
|
|
51
|
+
"implementation": "Renders input[type=time]",
|
|
52
|
+
"userRequirements": "Provide a label describing the moment"
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"contentGuidelines": [
|
|
56
|
+
{
|
|
57
|
+
"contentType": "Labels",
|
|
58
|
+
"guidelines": [
|
|
59
|
+
"Describe the moment (Starts at / Ends by)"
|
|
60
|
+
],
|
|
61
|
+
"goodExamples": [
|
|
62
|
+
"Starts at"
|
|
63
|
+
],
|
|
64
|
+
"badExamples": [
|
|
65
|
+
"Time"
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"compositionRules": [
|
|
70
|
+
{
|
|
71
|
+
"component": "DatePicker",
|
|
72
|
+
"relationship": "Pair for date+time scheduling",
|
|
73
|
+
"example": "<DatePicker aria-label=\"Date\" /><TimePicker aria-label=\"Time\" />"
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"relatedComponents": [
|
|
77
|
+
"DatePicker",
|
|
78
|
+
"FormField",
|
|
79
|
+
"Input"
|
|
80
|
+
],
|
|
81
|
+
"package": "@slipstream-ui/core",
|
|
82
|
+
"importPath": "@slipstream-ui/core",
|
|
83
|
+
"version": "0.1.0",
|
|
84
|
+
"sourceDir": "time-picker",
|
|
85
|
+
"exportName": "TimePicker"
|
|
86
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "timeline",
|
|
3
|
+
"name": "Timeline",
|
|
4
|
+
"tier": "molecule",
|
|
5
|
+
"description": "Vertical chronology for experience, activity and audit trails, built on an ordered list.",
|
|
6
|
+
"designIntent": "Chronologies communicate order. Rendering them as an ordered list keeps the sequence structural for assistive tech, while the connector rule and dots provide the visual rhythm.",
|
|
7
|
+
"props": [
|
|
8
|
+
{
|
|
9
|
+
"name": "items",
|
|
10
|
+
"type": "{ title: string; period?: string; description?: string; icon?: ReactNode; muted?: boolean }[]",
|
|
11
|
+
"required": true,
|
|
12
|
+
"description": "Ordered timeline entries."
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"examples": [
|
|
16
|
+
{
|
|
17
|
+
"title": "Experience",
|
|
18
|
+
"code": "<Timeline\n items={[\n { title: 'Senior Engineer', period: '2023 — Present', description: 'Platform team' },\n { title: 'Engineer', period: '2020 — 2023' },\n ]}\n/>",
|
|
19
|
+
"description": "Period label, title and supporting line per entry."
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"antiPatterns": [
|
|
23
|
+
{
|
|
24
|
+
"title": "Don't reverse the DOM order for newest-first",
|
|
25
|
+
"explanation": "Reverse the array instead so reading order matches visual order.",
|
|
26
|
+
"example": "// Avoid: flex-col-reverse\n// Prefer: items={items.slice().reverse()}"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"accessibility": [
|
|
30
|
+
{
|
|
31
|
+
"feature": "Sequence",
|
|
32
|
+
"implementation": "Ordered list semantics",
|
|
33
|
+
"userRequirements": "Keep entries in chronological order in the array"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"contentGuidelines": [
|
|
37
|
+
{
|
|
38
|
+
"contentType": "Periods",
|
|
39
|
+
"guidelines": [
|
|
40
|
+
"Use a consistent format",
|
|
41
|
+
"State Present for ongoing"
|
|
42
|
+
],
|
|
43
|
+
"goodExamples": [
|
|
44
|
+
"2023 — Present",
|
|
45
|
+
"Jan 2024"
|
|
46
|
+
],
|
|
47
|
+
"badExamples": [
|
|
48
|
+
"Some time ago"
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"compositionRules": [
|
|
53
|
+
{
|
|
54
|
+
"component": "Card",
|
|
55
|
+
"relationship": "Often embedded in profile/about cards",
|
|
56
|
+
"example": "<Card><CardContent><Timeline items={roles} /></CardContent></Card>"
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"relatedComponents": [
|
|
60
|
+
"List",
|
|
61
|
+
"Card",
|
|
62
|
+
"Separator"
|
|
63
|
+
],
|
|
64
|
+
"package": "@slipstream-ui/core",
|
|
65
|
+
"importPath": "@slipstream-ui/core",
|
|
66
|
+
"version": "0.1.0",
|
|
67
|
+
"sourceDir": "timeline",
|
|
68
|
+
"exportName": "Timeline"
|
|
69
|
+
}
|