@jovertical/mise-design-system 1.0.0 → 1.1.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.
@@ -0,0 +1,178 @@
1
+ <!-- Generated by pnpm build:skill. Do not edit by hand. -->
2
+
3
+ # Layout
4
+
5
+ ## AsideCard
6
+
7
+ `import { AsideCard } from '@jovertical/mise-design-system'`
8
+
9
+ A collapsible card for a page's right-hand column.
10
+
11
+ | Prop | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | `icon` (required) | `Snippet` | | |
14
+ | `title` (required) | `string` | | |
15
+ | `open` | `boolean` | `true` | Open to start. Collapsed suits a card that repeats on every step of a flow. |
16
+ | `children` (required) | `Snippet` | | |
17
+
18
+ Also takes: everything `Card` takes except `title`, `children`.
19
+
20
+ ## Card
21
+
22
+ `import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '@jovertical/mise-design-system'`
23
+
24
+ Padding is a `--card-spacing` variable on both axes, at 20px, so a full-bleed child can cancel it. The edge is a ring plus a shadow rather than a border. `ghost` drops the surface for a block that wants the card's rhythm but sits straight on the page.
25
+
26
+ | Prop | Type | Default | Description |
27
+ | --- | --- | --- | --- |
28
+ | `variant` | `'default' \| 'ghost'` | `'default'` | |
29
+
30
+ Also takes: every `<div>` attribute.
31
+
32
+ ### `CardAction`
33
+
34
+ The header's top-right slot, for something the reader can do: a menu, an Edit link, a view toggle. Not a place to park a figure. A count where every other card puts its action reads as one; if a heading needs qualifying, put a hint next to the title.
35
+
36
+ Also takes: every `<div>` attribute.
37
+
38
+ ### `CardContent`
39
+
40
+ `stack` turns on a vertical flex with a gap, for content that is several blocks rather than one. Off by default: `CardContent` stays a plain block, which is right for one child. `sm` / `md` / `lg` name the three gaps cards actually reach for, so the choice is made once, here.
41
+
42
+ | Prop | Type | Default | Description |
43
+ | --- | --- | --- | --- |
44
+ | `stack` | `keyof typeof CONTENT_STACK_CLASS` | | |
45
+
46
+ Also takes: every `<div>` attribute.
47
+
48
+ ### `CardDescription`
49
+
50
+ Also takes: every `<div>` attribute.
51
+
52
+ ### `CardFooter`
53
+
54
+ `bleed` runs the footer to the card's edges, for a footer that is one wide target ("View all orders") rather than content with actions in it. Three things happen together, which is why it is one prop: the card's bottom padding is cancelled, the horizontal padding goes (a Button inside gets the card's gutter back, so its label lines up with the title), and the bottom corners are rounded and clipped.
55
+
56
+ | Prop | Type | Default | Description |
57
+ | --- | --- | --- | --- |
58
+ | `bleed` | `boolean` | `false` | |
59
+ | `divided` | `boolean` | `false` | |
60
+ | `variant` | `'default' \| 'muted'` | `'default'` | |
61
+
62
+ Also takes: every `<div>` attribute.
63
+
64
+ ### `CardHeader`
65
+
66
+ The two explicit row tracks appear only when a `CardAction` is present. Upstream declares them unconditionally, so a title-only header carried an empty second track and its gutter. `auto-rows-min` already makes as many rows as there are children.
67
+
68
+ | Prop | Type | Default | Description |
69
+ | --- | --- | --- | --- |
70
+ | `divided` | `boolean` | `false` | |
71
+
72
+ Also takes: every `<div>` attribute.
73
+
74
+ ### `CardTitle`
75
+
76
+ A flex row, so a hint or a status badge sits on the title's baseline without the caller arranging it. `min-w-0` lets a long title truncate against its neighbour instead of pushing it out of the header.
77
+
78
+ | Prop | Type | Default | Description |
79
+ | --- | --- | --- | --- |
80
+ | `icon` | `Snippet` | | A leading glyph. Bare and muted at `size-4` unless `iconTone` is given. |
81
+ | `iconTone` | `'neutral' \| 'primary' \| 'info' \| 'success' \| 'warning' \| 'critical'` | | Draws `icon` in an `IconChip` of this tone. Omit it for a quiet heading. `primary` when the headings are the page's structure, as on a long form. Never a status tone: a heading is not a status. |
82
+
83
+ Also takes: every `<div>` attribute.
84
+
85
+ Types: `CardVariant` (`'default' | 'ghost'`).
86
+
87
+ ## CardGrid
88
+
89
+ `import { CardGrid, CardGridCell } from '@jovertical/mise-design-system'`
90
+
91
+ A responsive grid of bordered cells, with no opinion on what fills them. `MetricGrid` is this with a `MetricBar` in every cell; a caller whose cells are not a percent breakdown wants the grid on its own.
92
+
93
+ | Prop | Type | Default | Description |
94
+ | --- | --- | --- | --- |
95
+ | `columns` | `2 \| 3 \| 4` | `3` | Columns at `md` and up. Below that it is always one: two cells side by side on a phone leave no room for real content. |
96
+
97
+ Also takes: every `<div>` attribute.
98
+
99
+ ### `CardGridCell`
100
+
101
+ One cell. Bordered rather than filled or shadowed, deliberately lighter than `Card`: a wash or a ring on every cell of a dense grid competes with what the content needs to carry attention.
102
+
103
+ Also takes: every `<div>` attribute.
104
+
105
+ ## CardList
106
+
107
+ `import { CardList } from '@jovertical/mise-design-system'`
108
+
109
+ A list of rows inside a card, separated by full-width rules. The rules run to the card's edges: inset, they read as stripes drawn on the content; full-bleed, they read as the card divided into rows.
110
+
111
+ | Prop | Type | Default | Description |
112
+ | --- | --- | --- | --- |
113
+ | `compact` | `boolean` | `false` | Tighter rows, for rows of one line. The default `py-4` is sized for a leading chip and two lines. A prop rather than a class at the call site: a second arbitrary variant does not reliably win against this one. |
114
+
115
+ Also takes: every `<div>` attribute.
116
+
117
+ ## Collapsible
118
+
119
+ `import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@jovertical/mise-design-system'`
120
+
121
+ Unstyled: the primitive holds open state and nothing else. `AsideCard` builds a real card on top of it; reach for `Collapsible` directly when the surface around it is not a card.
122
+
123
+ Also takes: bits-ui `Collapsible.Root` props.
124
+
125
+ ### `CollapsibleContent`
126
+
127
+ Also takes: bits-ui `Collapsible.Content` props.
128
+
129
+ ### `CollapsibleTrigger`
130
+
131
+ Also takes: bits-ui `Collapsible.Trigger` props.
132
+
133
+ ## PageHeader
134
+
135
+ `import { PageHeader } from '@jovertical/mise-design-system'`
136
+
137
+ Which affordance a page carries, by what kind of page it is:
138
+
139
+ | Prop | Type | Default | Description |
140
+ | --- | --- | --- | --- |
141
+ | `title` | `string` | | Omit it when the trail carries the leaf and repeating it would add nothing. Without a title there is no `h1`, so the body owns the heading. |
142
+ | `description` | `string \| Snippet` | | |
143
+ | `breadcrumb` | `Snippet` | | The trail of ancestors, above the title. Pass this or `backLink`, not both. |
144
+ | `backLink` | `Snippet` | | A way back out, where the breadcrumb would be: the create-and-edit shape. |
145
+ | `eyebrow` | `string \| Snippet` | | A short uppercase label naming the kind of page when the title cannot. |
146
+ | `titleAccessory` | `Snippet` | | Inline with the title: a switcher, a status badge. |
147
+ | `truncateTitle` | `boolean` | `false` | One line, capped at `max-w-3xl`, with the whole title as a tooltip. For titles someone else wrote. |
148
+ | `actions` | `Snippet` | | The right-hand action cluster. |
149
+ | `class` | `string` | | |
150
+
151
+ ## PageLayout
152
+
153
+ `import { PageLayout } from '@jovertical/mise-design-system'`
154
+
155
+ The padded column every routed page sits in, so the gutter and the vertical rhythm are decided once rather than per route.
156
+
157
+ Also takes: every `<div>` attribute.
158
+
159
+ ## Separator
160
+
161
+ `import { Separator } from '@jovertical/mise-design-system'`
162
+
163
+ Also takes: bits-ui `Separator.Root` props.
164
+
165
+ ## SummaryCard
166
+
167
+ `import { SummaryCard } from '@jovertical/mise-design-system'`
168
+
169
+ A read-only account of what one step produced.
170
+
171
+ | Prop | Type | Default | Description |
172
+ | --- | --- | --- | --- |
173
+ | `icon` (required) | `Snippet` | | |
174
+ | `title` (required) | `string` | | |
175
+ | `action` | `Snippet` | | The way back to where these fields are edited, if there is one. |
176
+ | `children` (required) | `Snippet` | | |
177
+
178
+ Also takes: everything `Card` takes except `title`, `children`.
@@ -0,0 +1,250 @@
1
+ <!-- Generated by pnpm build:skill. Do not edit by hand. -->
2
+
3
+ # Navigation
4
+
5
+ ## Breadcrumb
6
+
7
+ `import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from '@jovertical/mise-design-system'`
8
+
9
+ Written against shadcn/ui's `breadcrumb` API, not ported from it: the names match so a reader arriving from shadcn finds what they expect. The separator is `/` and the leaf is not a disabled link.
10
+
11
+ Also takes: every HTML attribute.
12
+
13
+ ### `BreadcrumbEllipsis`
14
+
15
+ Stands in for crumbs dropped from the middle of a long trail.
16
+
17
+ Also takes: every `<span>` attribute.
18
+
19
+ ### `BreadcrumbItem`
20
+
21
+ `min-w-0` so a long crumb can truncate rather than push the trail past the edge. Crumbs that must never shrink (the root, the leaf) say so with `shrink-0`.
22
+
23
+ Also takes: every `<li>` attribute.
24
+
25
+ ### `BreadcrumbLink`
26
+
27
+ | Prop | Type | Default | Description |
28
+ | --- | --- | --- | --- |
29
+ | `child` | `Snippet<[{ props: Record<string, unknown> }]>` | | Renders your own link with these props instead of an anchor. |
30
+
31
+ Also takes: every `<a>` attribute.
32
+
33
+ ### `BreadcrumbList`
34
+
35
+ Also takes: every `<ol>` attribute.
36
+
37
+ ### `BreadcrumbPage`
38
+
39
+ The leaf. Not a link, because it points at where you already are: `aria-current="page"` on plain text, not a link that refuses to be followed.
40
+
41
+ Also takes: every `<span>` attribute.
42
+
43
+ ### `BreadcrumbSeparator`
44
+
45
+ `/` rather than a chevron; pass children for a different mark.
46
+
47
+ Also takes: every `<li>` attribute.
48
+
49
+ ## Sidebar
50
+
51
+ `import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SidebarState, useSidebar, sidebarMenuButtonVariants } from '@jovertical/mise-design-system'`
52
+
53
+ | Prop | Type | Default | Description |
54
+ | --- | --- | --- | --- |
55
+ | `side` | `'left' \| 'right'` | `'left'` | |
56
+ | `variant` | `'sidebar' \| 'floating' \| 'inset'` | `'sidebar'` | |
57
+ | `collapsible` | `'offcanvas' \| 'icon' \| 'none'` | `'offcanvas'` | |
58
+ | `sidetheme` | `'primary' \| 'light' \| 'panel'` | `'primary'` | |
59
+
60
+ Also takes: every `<div>` attribute.
61
+
62
+ ### `SidebarContent`
63
+
64
+ Scrolls vertically in icon mode too: a long rail must not lose its last icons off the viewport.
65
+
66
+ Also takes: every `<div>` attribute.
67
+
68
+ ### `SidebarFooter`
69
+
70
+ Also takes: every `<div>` attribute.
71
+
72
+ ### `SidebarGroup`
73
+
74
+ Also takes: every `<div>` attribute.
75
+
76
+ ### `SidebarGroupAction`
77
+
78
+ | Prop | Type | Default | Description |
79
+ | --- | --- | --- | --- |
80
+ | `child` | `Snippet<[{ props: Record<string, unknown> }]>` | | Renders your own element with these props instead of the default one. |
81
+
82
+ Also takes: every `<button>` attribute.
83
+
84
+ ### `SidebarGroupContent`
85
+
86
+ Also takes: every `<div>` attribute.
87
+
88
+ ### `SidebarGroupLabel`
89
+
90
+ | Prop | Type | Default | Description |
91
+ | --- | --- | --- | --- |
92
+ | `child` | `Snippet<[{ props: Record<string, unknown> }]>` | | Renders your own element with these props instead of the default one. |
93
+
94
+ Also takes: every `<div>` attribute.
95
+
96
+ ### `SidebarHeader`
97
+
98
+ Also takes: every `<div>` attribute.
99
+
100
+ ### `SidebarInput`
101
+
102
+ Also takes: everything `Input` takes.
103
+
104
+ ### `SidebarInset`
105
+
106
+ Also takes: every HTML attribute.
107
+
108
+ ### `SidebarMenu`
109
+
110
+ Also takes: every `<ul>` attribute.
111
+
112
+ ### `SidebarMenuAction`
113
+
114
+ | Prop | Type | Default | Description |
115
+ | --- | --- | --- | --- |
116
+ | `child` | `Snippet<[{ props: Record<string, unknown> }]>` | | Renders your own element with these props instead of the default one. |
117
+ | `showOnHover` | `boolean` | `false` | Shows the action only while its row is hovered or focused, from `md`. |
118
+
119
+ Also takes: every `<button>` attribute.
120
+
121
+ ### `SidebarMenuBadge`
122
+
123
+ Also takes: every `<div>` attribute.
124
+
125
+ ### `SidebarMenuButton`
126
+
127
+ | Prop | Type | Default | Description |
128
+ | --- | --- | --- | --- |
129
+ | `child` | `Snippet<[{ props: Record<string, unknown> }]>` | | |
130
+ | `isActive` | `boolean` | `false` | |
131
+ | `size` | `'default' \| 'sm' \| 'lg'` | `'default'` | |
132
+ | `noHover` | `boolean` | `false` | Keeps the button flat: no hover or active background, as for a logo. |
133
+ | `tooltip` | `string \| Snippet` | | Shown beside the button while the sidebar is collapsed to icons, on desktop. |
134
+ | `tooltipContentProps` | `Omit<TooltipContentProps, 'children'>` | | |
135
+
136
+ Also takes: every `<button>` attribute.
137
+
138
+ ### `SidebarMenuItem`
139
+
140
+ Also takes: every `<li>` attribute.
141
+
142
+ ### `SidebarMenuSkeleton`
143
+
144
+ | Prop | Type | Default | Description |
145
+ | --- | --- | --- | --- |
146
+ | `showIcon` | `boolean` | `false` | |
147
+
148
+ Also takes: every `<div>` attribute.
149
+
150
+ ### `SidebarMenuSub`
151
+
152
+ Also takes: every `<ul>` attribute.
153
+
154
+ ### `SidebarMenuSubButton`
155
+
156
+ | Prop | Type | Default | Description |
157
+ | --- | --- | --- | --- |
158
+ | `child` | `Snippet<[{ props: Record<string, unknown> }]>` | | Renders your own element with these props instead of the default one. |
159
+ | `size` | `'sm' \| 'md'` | `'md'` | |
160
+ | `isActive` | `boolean` | `false` | |
161
+
162
+ Also takes: every `<a>` attribute.
163
+
164
+ ### `SidebarMenuSubItem`
165
+
166
+ Also takes: every `<li>` attribute.
167
+
168
+ ### `SidebarProvider`
169
+
170
+ Owns the open and collapsed state and the CSS variables the whole family reads. It always wraps `Sidebar` and its page, never `Sidebar` alone.
171
+
172
+ | Prop | Type | Default | Description |
173
+ | --- | --- | --- | --- |
174
+ | `open` | `boolean` | `true` | |
175
+ | `onOpenChange` | `(open: boolean) => void` | | |
176
+ | `mobileBreakpoint` | `number` | | Viewport width, in pixels, below which the sidebar becomes a sheet. Raise it when the persistent rail costs the content more room than it is worth. |
177
+
178
+ Also takes: every `<div>` attribute.
179
+
180
+ ### `SidebarRail`
181
+
182
+ Also takes: every `<button>` attribute.
183
+
184
+ ### `SidebarSeparator`
185
+
186
+ Also takes: everything `Separator` takes.
187
+
188
+ ### `SidebarTrigger`
189
+
190
+ Also takes: everything `Button` takes.
191
+
192
+ Also exports: `SidebarState`, `useSidebar`, `sidebarMenuButtonVariants`.
193
+
194
+ Types: `SidebarSideTheme` (`'primary' | 'light' | 'panel'`), `SidebarMenuButtonSize` (`'default' | 'sm' | 'lg'`).
195
+
196
+ ## Stepper
197
+
198
+ `import { Stepper, StepperNavigation } from '@jovertical/mise-design-system'`
199
+
200
+ Where a reader is in a multi-step flow, and what is behind them.
201
+
202
+ | Prop | Type | Default | Description |
203
+ | --- | --- | --- | --- |
204
+ | `steps` (required) | `StepDefinition[]` | | |
205
+ | `currentStepId` (required) | `string` | | |
206
+ | `completedSteps` | `readonly string[]` | | Explicit completion. Any step id here is complete regardless of its position; when omitted, every step before `currentStepId` is. |
207
+ | `variant` | `'vertical' \| 'horizontal' \| 'condensed' \| 'compact'` | `'vertical'` | |
208
+ | `showProgress` | `boolean` | `true` | Drops the "Step 3 of 9" readout and the bar from `compact`, for a flow that no longer holds anyone to an order. A bar that never moves is a worse answer than none. |
209
+ | `showCurrentStep` | `boolean` | `true` | Drops the current step's name and description from `condensed`, for a page that heads its own step body and says it better. |
210
+ | `onStepSelect` | `(stepId: string) => void` | | Makes steps selectable. A stepper that reports progress and one that navigates look the same and are not; passing this turns the steps into buttons. |
211
+ | `selectableSteps` | `readonly string[]` | | Which step ids accept a click; omitted means all of them. A wizard can hold you to an order going forward while letting you back to anything already visited. |
212
+ | `class` | `string` | | |
213
+
214
+ ### `StepperNavigation`
215
+
216
+ A flow's controls, at the page's own level rather than inside its card.
217
+
218
+ | Prop | Type | Default | Description |
219
+ | --- | --- | --- | --- |
220
+ | `onBack` | `() => void` | | Omit for the first step. The next action stays right regardless. |
221
+ | `backLabel` | `string` | `'Back'` | |
222
+ | `backDisabled` | `boolean` | `false` | |
223
+ | `onNext` | `() => void` | | |
224
+ | `nextLabel` | `string` | `'Next'` | |
225
+ | `nextDisabled` | `boolean` | `false` | |
226
+ | `nextLoading` | `boolean` | `false` | Draws a spinner in the next action. Pair it with `nextDisabled`. |
227
+ | `leading` | `Snippet` | | At the left end, beside the back action if there is one: anything that leaves the flow rather than moving through it (Cancel, "finish later"). Leaving and advancing are opposite intentions and belong at opposite ends. |
228
+ | `trailing` | `Snippet` | | Immediately left of the next action: a skip, which does advance. |
229
+
230
+ Also takes: every `<div>` attribute except `children`.
231
+
232
+ Types: `StepDefinition`, `StepperVariant` (`'vertical' | 'horizontal' | 'condensed' | 'compact'`).
233
+
234
+ ## Tabs
235
+
236
+ `import { Tabs, TabsContent, TabsList, TabsTrigger } from '@jovertical/mise-design-system'`
237
+
238
+ Also takes: bits-ui `Tabs.Root` props.
239
+
240
+ ### `TabsContent`
241
+
242
+ Also takes: bits-ui `Tabs.Content` props.
243
+
244
+ ### `TabsList`
245
+
246
+ Also takes: bits-ui `Tabs.List` props.
247
+
248
+ ### `TabsTrigger`
249
+
250
+ Also takes: bits-ui `Tabs.Trigger` props.