@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.
- package/README.md +20 -0
- package/bin/mise-theme.js +4 -1
- package/dist/tokens/cli.d.ts +1 -1
- package/dist/tokens/cli.js +23 -2
- package/dist/tokens/info.d.ts +10 -0
- package/dist/tokens/info.js +62 -0
- package/package.json +3 -1
- package/skills/mise/SKILL.md +159 -0
- package/skills/mise/components/actions.md +200 -0
- package/skills/mise/components/data-display.md +728 -0
- package/skills/mise/components/feedback.md +198 -0
- package/skills/mise/components/forms.md +712 -0
- package/skills/mise/components/layout.md +178 -0
- package/skills/mise/components/navigation.md +250 -0
- package/skills/mise/components/overlays.md +291 -0
- package/skills/mise/components/typography.md +36 -0
- package/skills/mise/recipes/dashboard-page.md +40 -0
- package/skills/mise/recipes/dashboard-page.svelte +132 -0
- package/skills/mise/recipes/data-table.md +39 -0
- package/skills/mise/recipes/data-table.svelte +130 -0
- package/skills/mise/recipes/form-sveltekit.svelte +79 -0
- package/skills/mise/recipes/form.md +82 -0
- package/skills/mise/recipes/form.svelte +158 -0
- package/skills/mise/setup.md +99 -0
- package/skills/mise/theming.md +82 -0
|
@@ -0,0 +1,728 @@
|
|
|
1
|
+
<!-- Generated by pnpm build:skill. Do not edit by hand. -->
|
|
2
|
+
|
|
3
|
+
# Data display
|
|
4
|
+
|
|
5
|
+
## Avatar
|
|
6
|
+
|
|
7
|
+
`import { Avatar, AvatarFallback, AvatarImage, AvatarStatus, PresenceDot } from '@jovertical/mise-design-system'`
|
|
8
|
+
|
|
9
|
+
`size-8` by default; a caller resizing it sets the initials' size too.
|
|
10
|
+
|
|
11
|
+
Also takes: bits-ui `Avatar.Root` props.
|
|
12
|
+
|
|
13
|
+
### `AvatarFallback`
|
|
14
|
+
|
|
15
|
+
Renders while the image loads, and stays if it fails.
|
|
16
|
+
|
|
17
|
+
Also takes: bits-ui `Avatar.Fallback` props.
|
|
18
|
+
|
|
19
|
+
### `AvatarImage`
|
|
20
|
+
|
|
21
|
+
Also takes: bits-ui `Avatar.Image` props.
|
|
22
|
+
|
|
23
|
+
### `AvatarStatus`
|
|
24
|
+
|
|
25
|
+
An avatar with a `PresenceDot` on its edge while someone is here. It wraps an `Avatar` rather than sitting inside it: `Avatar` clips its children to a circle, and the dot has to overhang the edge to read as a badge.
|
|
26
|
+
|
|
27
|
+
| Prop | Type | Default | Description |
|
|
28
|
+
| --- | --- | --- | --- |
|
|
29
|
+
| `isOnline` (required) | `boolean` | | Shows the dot: someone is here right now. |
|
|
30
|
+
| `label` | `string` | | Read to screen readers while online, e.g. "Has this ticket open". |
|
|
31
|
+
|
|
32
|
+
Also takes: every `<span>` attribute.
|
|
33
|
+
|
|
34
|
+
### `PresenceDot`
|
|
35
|
+
|
|
36
|
+
The live "here now" mark: an 8px success dot, ringed in the card colour so it separates from whatever it sits on, with a ping so it reads as live rather than as a status colour. On its own so it can sit on any edge.
|
|
37
|
+
|
|
38
|
+
| Prop | Type | Default | Description |
|
|
39
|
+
| --- | --- | --- | --- |
|
|
40
|
+
| `label` | `string` | | Read to screen readers, e.g. "Has this ticket open". |
|
|
41
|
+
|
|
42
|
+
Also takes: every `<span>` attribute.
|
|
43
|
+
|
|
44
|
+
## Badge
|
|
45
|
+
|
|
46
|
+
`import { Badge, badgeVariants } from '@jovertical/mise-design-system'`
|
|
47
|
+
|
|
48
|
+
A short label on a row: a status, a tag, a count. Colour and shape are two props because they are two decisions. Whether a badge is a state (`soft`), a thing done (`solid`) or a tag (`outline`) is the composition's call; what that state is (`success`, `critical`) is the data's.
|
|
49
|
+
|
|
50
|
+
| Prop | Type | Default | Description |
|
|
51
|
+
| --- | --- | --- | --- |
|
|
52
|
+
| `variant` | `'solid' \| 'soft' \| 'outline'` | `'soft'` | `soft` is a state something is in. `solid` is a thing that was done, and shouts. `outline` is a tag: metadata the reader may want, not a state to act on. |
|
|
53
|
+
| `tone` | `'neutral' \| 'primary' \| 'info' \| 'success' \| 'warning' \| 'critical'` | `'neutral'` | |
|
|
54
|
+
| `count` | `boolean` | `false` | A number on its own: one digit draws a circle and more stretch it into a pill of the same height, so a column of counts keeps one silhouette. |
|
|
55
|
+
| `children` | `Snippet` | | |
|
|
56
|
+
|
|
57
|
+
Also takes: every `<a>` attribute.
|
|
58
|
+
|
|
59
|
+
Also exports: `badgeVariants`.
|
|
60
|
+
|
|
61
|
+
Types: `BadgeVariant` (`'solid' | 'soft' | 'outline'`).
|
|
62
|
+
|
|
63
|
+
## ChartContainer
|
|
64
|
+
|
|
65
|
+
`import { ChartContainer, ChartStyle, ChartTooltip, chartAreaFillOpacity, chartComparisonSeriesClass, chartGrid, chartLineStrokeWidth, getPayloadConfigFromPayload, useChart } from '@jovertical/mise-design-system'`
|
|
66
|
+
|
|
67
|
+
| Prop | Type | Default | Description |
|
|
68
|
+
| --- | --- | --- | --- |
|
|
69
|
+
| `config` (required) | `ChartConfig` | | Each series' label and colour; colours are written as `--color-<key>`. |
|
|
70
|
+
|
|
71
|
+
Also takes: every HTML attribute.
|
|
72
|
+
|
|
73
|
+
### `ChartStyle`
|
|
74
|
+
|
|
75
|
+
The scoped `<style>` that writes a chart's colours for light and dark.
|
|
76
|
+
|
|
77
|
+
| Prop | Type | Default | Description |
|
|
78
|
+
| --- | --- | --- | --- |
|
|
79
|
+
| `id` (required) | `string` | | |
|
|
80
|
+
| `config` (required) | `ChartConfig` | | |
|
|
81
|
+
|
|
82
|
+
### `ChartTooltip`
|
|
83
|
+
|
|
84
|
+
The hover card a chart draws: the point's label, then a row per series with its indicator, its config label and its value.
|
|
85
|
+
|
|
86
|
+
| Prop | Type | Default | Description |
|
|
87
|
+
| --- | --- | --- | --- |
|
|
88
|
+
| `hideLabel` | `boolean` | `false` | |
|
|
89
|
+
| `label` | `string` | | |
|
|
90
|
+
| `indicator` | `'line' \| 'dot' \| 'dashed'` | `'dot'` | |
|
|
91
|
+
| `nameKey` | `string` | | |
|
|
92
|
+
| `labelKey` | `string` | | |
|
|
93
|
+
| `hideIndicator` | `boolean` | `false` | |
|
|
94
|
+
| `labelClassName` | `string` | | |
|
|
95
|
+
| `labelFormatter` | `\| ((value: unknown, payload: TooltipPayload[]) => string \| number \| Snippet) \| null` | `defaultFormatter` | |
|
|
96
|
+
| `formatter` | `Snippet< [ { value: unknown name: string item: TooltipPayload index: number payload: TooltipPayload[] }, ] >` | | |
|
|
97
|
+
|
|
98
|
+
Also takes: every `<div>` attribute except `children`.
|
|
99
|
+
|
|
100
|
+
Also exports: `chartAreaFillOpacity`, `chartComparisonSeriesClass`, `chartGrid`, `chartLineStrokeWidth`, `getPayloadConfigFromPayload`, `useChart`.
|
|
101
|
+
|
|
102
|
+
Types: `ChartConfig`.
|
|
103
|
+
|
|
104
|
+
## Checklist
|
|
105
|
+
|
|
106
|
+
`import { Checklist, ChecklistCard } from '@jovertical/mise-design-system'`
|
|
107
|
+
|
|
108
|
+
The full "Get started" list: setup steps grouped into cards, each row folding open to its description and whatever the caller hangs off it.
|
|
109
|
+
|
|
110
|
+
| Prop | Type | Default | Description |
|
|
111
|
+
| --- | --- | --- | --- |
|
|
112
|
+
| `groups` (required) | `ChecklistGroup[]` | | |
|
|
113
|
+
| `expandedId` | `string` | | The `id` of the one open row, or nothing open. Controlled, with no internal fallback, so it can follow a URL fragment without disagreeing with it. One row at a time by construction. |
|
|
114
|
+
| `onExpandedChange` | `(id: string \| null) => void` | | The id to move to, or `null` when the open row was closed. |
|
|
115
|
+
|
|
116
|
+
Also takes: every `<div>` attribute except `children`.
|
|
117
|
+
|
|
118
|
+
### `ChecklistCard`
|
|
119
|
+
|
|
120
|
+
A progress card small enough to live above a sidebar's nav: a ring, a heading, and the next few unmet rows.
|
|
121
|
+
|
|
122
|
+
| Prop | Type | Default | Description |
|
|
123
|
+
| --- | --- | --- | --- |
|
|
124
|
+
| `title` (required) | `string` | | |
|
|
125
|
+
| `percent` (required) | `number` | | 0–100, clamped, rounded for the figure only. Not derived from `items`: the card shows the next few rows and the ring counts all of them. |
|
|
126
|
+
| `items` (required) | `ChecklistCardItem[]` | | |
|
|
127
|
+
| `collapsed` | `boolean` | `false` | The sidebar's icon-rail mode: no card, just a solid icon button at a nav icon's width, with the share in its accessible name. |
|
|
128
|
+
| `collapsedControl` | `Snippet` | | Replaces the collapsed button, so it can match the caller's own nav buttons. |
|
|
129
|
+
| `size` | `'sm' \| 'md'` | `'md'` | `md` for a card on its own; `sm` for one pinned above a sidebar's nav. `sm` scales the ring, the title, the rows and the card's padding together. |
|
|
130
|
+
| `variant` | `'default' \| 'outline'` | `'default'` | `outline` drops the fill and the shadow for a visible ring: on a dark sidebar a dark fill barely reads as a card, and a border separates it. |
|
|
131
|
+
| `action` | `Snippet` | | The header's corner: a "Hide" button. |
|
|
132
|
+
| `footer` | `Snippet` | | The way to the full list: "See all steps". |
|
|
133
|
+
|
|
134
|
+
Also takes: everything `Card` takes except `title`, `children`, `variant`.
|
|
135
|
+
|
|
136
|
+
Types: `ChecklistCardItem`, `ChecklistGroup`, `ChecklistTask`, `ChecklistTaskState` (`'completed' | 'skipped' | 'pending'`).
|
|
137
|
+
|
|
138
|
+
## DataTable
|
|
139
|
+
|
|
140
|
+
`import { DataTable, DataTableColumnHeader, DataTableColumnToggle, DataTableExportMenu, DataTableFacetedFilter, DataTableRowActions, DataTableToolbar, DataTableViewToggle, dataTableColumns, dataTableFeatures } from '@jovertical/mise-design-system'`
|
|
141
|
+
|
|
142
|
+
A listing: a card holding an optional title, a toolbar, the table and a closing strip, or a grid of cards in `grid` view. Sorting and filtering are the server's; the table reports what the reader asked for and the caller refetches.
|
|
143
|
+
|
|
144
|
+
| Prop | Type | Default | Description |
|
|
145
|
+
| --- | --- | --- | --- |
|
|
146
|
+
| `columns` (required) | `DataTableColumn<TData>[]` | | |
|
|
147
|
+
| `data` (required) | `TData[]` | | |
|
|
148
|
+
| `isLoading` | `boolean` | `false` | |
|
|
149
|
+
| `isFetchingNextPage` | `boolean` | `false` | A next page is being fetched; the load-more control spins. |
|
|
150
|
+
| `hasNextPage` | `boolean` | `false` | There are more rows to load; the closing strip offers them. |
|
|
151
|
+
| `fetchNextPage` | `() => void` | | |
|
|
152
|
+
| `defaultSort` | `string` | | The first sort, a column id, prefixed with `-` for descending. |
|
|
153
|
+
| `filters` | `DataTableFilterState` | `{ globalFilter: '', columnFilters: [], sorting: sortingFromDefault(defaultSort), }` | The search, the column filters and the sort. Bind it to mirror it into a URL; a new value from outside is applied. |
|
|
154
|
+
| `onFiltersChange` | `(filters: DataTableFilterState) => void` | | Called when the reader changes the search, a filter or the sort. |
|
|
155
|
+
| `title` | `string \| Snippet` | | A heading inside the table's card, above the toolbar: what the rows are. Table view only. |
|
|
156
|
+
| `description` | `string \| Snippet` | | One muted line under `title`. |
|
|
157
|
+
| `toolbar` | `Snippet<[DataTableInstance<TData>, DataTableFilterState]>` | | The row above the table. Receives the table and the current filters. |
|
|
158
|
+
| `emptyState` | `Snippet` | | What an empty table shows. |
|
|
159
|
+
| `footer` | `Snippet` | | Replaces the closing strip's contents, for a summary card that wants one "View all" link rather than a count and a load-more. |
|
|
160
|
+
| `withPadding` | `boolean` | `true` | Page padding around the table, on by default. |
|
|
161
|
+
| `getRowId` | `(row: TData) => string` | | The row's id. Without it, rows are keyed by index, which breaks selection and expansion: supply it whenever either is on. |
|
|
162
|
+
| `viewMode` | `'table' \| 'grid'` | `'table'` | |
|
|
163
|
+
| `card` | `Snippet<[TData]>` | | One item in `grid` view. |
|
|
164
|
+
| `cardSkeleton` | `Snippet` | | One placeholder card while `grid` view loads. |
|
|
165
|
+
| `gridClass` | `string` | | Classes for the grid, replacing the responsive one-to-three columns. |
|
|
166
|
+
| `getItemKey` | `(item: TData) => string \| number` | | |
|
|
167
|
+
| `getRowClass` | `(item: TData) => string \| undefined` | | Classes for one row. |
|
|
168
|
+
| `initialColumnVisibility` | `ColumnVisibilityState` | | |
|
|
169
|
+
| `onRowClick` | `(item: TData) => void` | | Makes rows a click target, with a pointer and a hover. |
|
|
170
|
+
| `getSubRows` | `(row: TData) => TData[] \| undefined` | | A row's children, or undefined when it has none. Supplying it turns expansion on; the cells render the disclosure from `row.getCanExpand()`, `row.getIsExpanded()` and `row.depth`. |
|
|
171
|
+
| `enableRowSelection` | `boolean` | `false` | A leading checkbox column, for bulk actions. |
|
|
172
|
+
| `rowSelection` | `RowSelectionState` | `{}` | |
|
|
173
|
+
| `isRowSelectable` | `(item: TData) => boolean` | | Only these rows get an enabled checkbox: keep a user from selecting themselves. |
|
|
174
|
+
| `class` | `string` | | |
|
|
175
|
+
|
|
176
|
+
### `DataTableColumnHeader`
|
|
177
|
+
|
|
178
|
+
A column's heading, with a sort menu when the column sorts. A sortable header is a button and an unsortable one bare text, so the button is pinned to the type `TableHead` already sets (12px, medium, muted) and the two read as one kind of heading.
|
|
179
|
+
|
|
180
|
+
| Prop | Type | Default | Description |
|
|
181
|
+
| --- | --- | --- | --- |
|
|
182
|
+
| `column` (required) | `Column<DataTableFeatures, TData, TValue>` | | |
|
|
183
|
+
| `title` (required) | `string \| Snippet` | | |
|
|
184
|
+
| `class` | `string` | | |
|
|
185
|
+
|
|
186
|
+
### `DataTableColumnToggle`
|
|
187
|
+
|
|
188
|
+
The columns a reader can hide, as checkboxes in a menu. Icon-only: a label beside the glyph would wrap a toolbar that already holds several filters.
|
|
189
|
+
|
|
190
|
+
| Prop | Type | Default | Description |
|
|
191
|
+
| --- | --- | --- | --- |
|
|
192
|
+
| `table` (required) | `DataTableInstance<TData>` | | |
|
|
193
|
+
|
|
194
|
+
### `DataTableExportMenu`
|
|
195
|
+
|
|
196
|
+
Export actions behind one trigger. Each item shows only when the page wires it, so the menu never offers something that does nothing.
|
|
197
|
+
|
|
198
|
+
| Prop | Type | Default | Description |
|
|
199
|
+
| --- | --- | --- | --- |
|
|
200
|
+
| `onExportCsv` | `() => void` | | Opens the page's full export flow, usually a dialog queuing a server job. |
|
|
201
|
+
| `getCopyText` | `() => string` | | The loaded rows as tab-separated text, ready to paste into a spreadsheet. The page builds it, since only it knows which fields are worth copying. |
|
|
202
|
+
| `onPrint` | `() => void` | | Defaults to printing the window. |
|
|
203
|
+
|
|
204
|
+
### `DataTableFacetedFilter`
|
|
205
|
+
|
|
206
|
+
A multi-select facet, drawn as a select: a filled pill summarising the choice rather than a dashed "add filter" chip, since a row of five dashed outlines is noisier than the values it filters. One choice shows its name; more show a count.
|
|
207
|
+
|
|
208
|
+
| Prop | Type | Default | Description |
|
|
209
|
+
| --- | --- | --- | --- |
|
|
210
|
+
| `column` | `Column<DataTableFeatures, TData, TValue>` | | |
|
|
211
|
+
| `title` | `string` | | Singular noun for the facet: "Status". |
|
|
212
|
+
| `allLabel` | `string` | | Shown when nothing is chosen. Falls back to "All {title}"; pass it where the plural is irregular. |
|
|
213
|
+
| `selected` | `string[]` | | The chosen values, for a caller that holds them. Read off the column otherwise. |
|
|
214
|
+
| `options` (required) | `DataTableFacetedFilterOption[]` | | |
|
|
215
|
+
|
|
216
|
+
### `DataTableRowActions`
|
|
217
|
+
|
|
218
|
+
The ⋯ at the end of a table row, and the menu it opens: a round, soft, neutral button whose hover dims its own chip, never `--accent`, which means the active nav row. The menu opens leftward (`align="end"`) to stay inside the table.
|
|
219
|
+
|
|
220
|
+
| Prop | Type | Default | Description |
|
|
221
|
+
| --- | --- | --- | --- |
|
|
222
|
+
| `children` (required) | `Snippet` | | The menu's items: `DropdownMenuItem`s, separators, a destructive item last. |
|
|
223
|
+
| `label` | `string` | `'Open menu'` | Announced in place of the glyph. Name the row when you can ("Actions for Riverside") so a screen reader down the column hears which row it is. |
|
|
224
|
+
| `disabled` | `boolean` | `false` | For a row with no actions it may take. The trigger stays, so the column keeps its rhythm, and `label` says why it is off. |
|
|
225
|
+
| `class` | `string` | | |
|
|
226
|
+
|
|
227
|
+
### `DataTableToolbar`
|
|
228
|
+
|
|
229
|
+
The row above a table: what narrows it on the left, what acts on it on the right. Written once because it was written twenty-three times, and nineteen had drifted into putting export and the column toggle on the left, where they read as another filter. Strings are props: a package cannot reach the consumer's copy.
|
|
230
|
+
|
|
231
|
+
| Prop | Type | Default | Description |
|
|
232
|
+
| --- | --- | --- | --- |
|
|
233
|
+
| `table` (required) | `DataTableInstance<TData>` | | |
|
|
234
|
+
| `search` | `DataTableToolbarSearch` | | Omit for a table with nothing worth searching: a ledger, a feed. |
|
|
235
|
+
| `filters` | `DataTableToolbarFilter[]` | `[]` | |
|
|
236
|
+
| `leading` | `Snippet` | | On the left, beside the filters: scopes such as a location or a date range. |
|
|
237
|
+
| `actions` | `Snippet` | | On the right, ahead of clear: things you do, such as an import link or a bulk action. |
|
|
238
|
+
| `exports` | `DataTableExportMenuProps` | | Omit for a table with nothing to export. |
|
|
239
|
+
| `viewMode` | `'table' \| 'grid'` | | Bind it to show the table/grid toggle; the page owns the mode. |
|
|
240
|
+
| `columnToggle` | `boolean` | `true` | True by default. False for a table whose columns are all essential. |
|
|
241
|
+
| `clearLabel` | `string` | `'Clear filters'` | The clear button's accessible name. |
|
|
242
|
+
| `class` | `string` | | |
|
|
243
|
+
|
|
244
|
+
### `DataTableViewToggle`
|
|
245
|
+
|
|
246
|
+
Table or grid, as a segmented control of two glyphs. The cells are square rather than the segmented default's pill: a pill wider than its icon reads as a button missing its label.
|
|
247
|
+
|
|
248
|
+
| Prop | Type | Default | Description |
|
|
249
|
+
| --- | --- | --- | --- |
|
|
250
|
+
| `value` (required) | `'table' \| 'grid'` | `'table'` | |
|
|
251
|
+
|
|
252
|
+
Also exports: `dataTableColumns`, `dataTableFeatures`.
|
|
253
|
+
|
|
254
|
+
Types: `DataTableInstance`, `DataTableFacetedFilterOption`, `DataTableToolbarFilter`, `DataTableToolbarSearch`, `DataTableColumn`, `DataTableFeatures`, `DataTableFilterState`, `DataTableViewMode` (`'table' | 'grid'`).
|
|
255
|
+
|
|
256
|
+
## DeltaBadge
|
|
257
|
+
|
|
258
|
+
`import { DeltaBadge } from '@jovertical/mise-design-system'`
|
|
259
|
+
|
|
260
|
+
A period-over-period change, as a tinted pill.
|
|
261
|
+
|
|
262
|
+
| Prop | Type | Default | Description |
|
|
263
|
+
| --- | --- | --- | --- |
|
|
264
|
+
| `value` (required) | `number` | | The change, signed. `2.4` renders `+2.4%`, `-2.4` renders `-2.4%`. |
|
|
265
|
+
| `unit` | `string` | `'%'` | Appended to the number. `%` for a rate, `x` for a multiple. |
|
|
266
|
+
| `prefix` | `string` | `''` | Ahead of the number, after the sign: `$` renders `+$1.25`. Pass `unit=""` with it, or the `%` default trails the figure. |
|
|
267
|
+
| `precision` | `number` | `1` | Decimal places. A delta is a direction, not a measurement; one is usually right. |
|
|
268
|
+
| `invert` | `boolean` | `false` | Set when falling is the good outcome: failed payments, time to fulfil, stock at risk. The arrow still follows the sign; only the colour flips. |
|
|
269
|
+
| `variant` | `'pill' \| 'plain'` | `'pill'` | `pill`, the default, is a tinted, self-contained badge, for beside a bare figure. `plain` drops the fill and padding, for inline in a muted sentence where a pill would compete with the text sharing its line. |
|
|
270
|
+
|
|
271
|
+
Also takes: every `<span>` attribute.
|
|
272
|
+
|
|
273
|
+
## EntityLabel
|
|
274
|
+
|
|
275
|
+
`import { EntityLabel } from '@jovertical/mise-design-system'`
|
|
276
|
+
|
|
277
|
+
Names one thing (a person, a supplier, a document, a line item) with its mark and one qualifying line, wherever it appears: a table cell, a picker option, the head of a menu.
|
|
278
|
+
|
|
279
|
+
| Prop | Type | Default | Description |
|
|
280
|
+
| --- | --- | --- | --- |
|
|
281
|
+
| `title` (required) | `string \| Snippet` | | The name. |
|
|
282
|
+
| `description` | `string \| Snippet` | | One qualifying line: a size, a code, a role. |
|
|
283
|
+
| `icon` | `Snippet` | | A glyph, drawn in an `IconChip`. Takes precedence over `media`. |
|
|
284
|
+
| `media` | `Snippet` | | A mark given as is: an `Avatar` for a person or a supplier. |
|
|
285
|
+
| `iconShape` | `'square' \| 'circle'` | | |
|
|
286
|
+
| `iconTone` | `'neutral' \| 'primary' \| 'info' \| 'success' \| 'warning' \| 'critical'` | | When the entity itself is in a state worth a colour. The name stays in ink. |
|
|
287
|
+
|
|
288
|
+
Also takes: every `<div>` attribute except `title`.
|
|
289
|
+
|
|
290
|
+
## FactList
|
|
291
|
+
|
|
292
|
+
`import { FactList, FactListItem } from '@jovertical/mise-design-system'`
|
|
293
|
+
|
|
294
|
+
The `dl` a column of facts sits in. An item's `dt`/`dd` pair is only valid inside a `dl`; left to callers, the wrapper was typed thirty times, drifted into other gaps, and was left out altogether on five cards.
|
|
295
|
+
|
|
296
|
+
| Prop | Type | Default | Description |
|
|
297
|
+
| --- | --- | --- | --- |
|
|
298
|
+
| `compact` | `boolean` | `false` | `gap-1` instead of `gap-2`, for an aside where the list is a footnote to a preview above it rather than the card's content. |
|
|
299
|
+
|
|
300
|
+
Also takes: every `<dlist>` attribute.
|
|
301
|
+
|
|
302
|
+
### `FactListItem`
|
|
303
|
+
|
|
304
|
+
One labelled fact.
|
|
305
|
+
|
|
306
|
+
| Prop | Type | Default | Description |
|
|
307
|
+
| --- | --- | --- | --- |
|
|
308
|
+
| `label` (required) | `string \| Snippet` | | |
|
|
309
|
+
| `value` | `string \| number \| Snippet \| null` | | An em dash when missing: a blank cell reads as a bug, not as "none". |
|
|
310
|
+
| `orientation` | `'horizontal' \| 'vertical'` | `'horizontal'` | |
|
|
311
|
+
| `icon` | `Snippet` | | Vertical only. An `IconChip` ahead of the fact, for one that identifies (a location, a person, a category) rather than one field among several. |
|
|
312
|
+
| `iconShape` | `'square' \| 'circle'` | `'square'` | Vertical only. `square` by default, for a column of facts under a heading; `circle` for a strip of identity facts read across, where round chips keep several of them from reading as a form. |
|
|
313
|
+
| `multiline` | `boolean` | `false` | Vertical only. Lets the value wrap instead of truncating: a name is one line, but a description is worth reading past the card edge. |
|
|
314
|
+
| `valueClass` | `string` | | Classes for the value, such as a sign colour on a total. |
|
|
315
|
+
|
|
316
|
+
Also takes: every `<div>` attribute.
|
|
317
|
+
|
|
318
|
+
## IconChip
|
|
319
|
+
|
|
320
|
+
`import { IconChip, iconChipClassName, iconChipVariants } from '@jovertical/mise-design-system'`
|
|
321
|
+
|
|
322
|
+
A glyph on a tinted tile: the leading mark of a fact, a heading, a tile, a row. `sm` by default because most chips sit beside a line of text; `md` and `lg` stand in open space. Neutral is muted ink on `--muted`: a chip takes a colour only when the thing it marks is in a state worth one.
|
|
323
|
+
|
|
324
|
+
| Prop | Type | Default | Description |
|
|
325
|
+
| --- | --- | --- | --- |
|
|
326
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'sm'` | `sm` 32px, `md` 40px, `lg` 48px. |
|
|
327
|
+
| `shape` | `'square' \| 'circle'` | `'square'` | `square` is a squircle whose radius steps with the size; `circle` is for a composition that has chosen it. The slot owns the shape, not what sits in it. |
|
|
328
|
+
| `tone` | `'neutral' \| 'primary' \| 'info' \| 'success' \| 'warning' \| 'critical'` | `'neutral'` | |
|
|
329
|
+
|
|
330
|
+
Also takes: every `<span>` attribute.
|
|
331
|
+
|
|
332
|
+
Also exports: `iconChipClassName`, `iconChipVariants`.
|
|
333
|
+
|
|
334
|
+
Types: `IconChipShape` (`'square' | 'circle'`).
|
|
335
|
+
|
|
336
|
+
## Item
|
|
337
|
+
|
|
338
|
+
`import { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, itemMediaVariants, itemVariants } from '@jovertical/mise-design-system'`
|
|
339
|
+
|
|
340
|
+
A **list row**, not a menu row. `DropdownMenuItem` is a command: it lives in a `role="menu"`, moves with the arrow keys and closes on select. This carries media, a title, a description and its own actions, and `ItemGroup` is a `role="list"`. A notification feed or a device list is this; a set of commands is the other.
|
|
341
|
+
|
|
342
|
+
| Prop | Type | Default | Description |
|
|
343
|
+
| --- | --- | --- | --- |
|
|
344
|
+
| `variant` | `'default' \| 'outline' \| 'muted'` | `'default'` | |
|
|
345
|
+
| `size` | `'md' \| 'sm' \| 'flush'` | `'md'` | |
|
|
346
|
+
| `href` | `string` | | Renders the row as an `a` to this address. |
|
|
347
|
+
| `child` | `Snippet<[{ props: Record<string, unknown> }]>` | | |
|
|
348
|
+
|
|
349
|
+
Also takes: every HTML attribute.
|
|
350
|
+
|
|
351
|
+
### `ItemActions`
|
|
352
|
+
|
|
353
|
+
Also takes: every `<div>` attribute.
|
|
354
|
+
|
|
355
|
+
### `ItemContent`
|
|
356
|
+
|
|
357
|
+
Also takes: every `<div>` attribute.
|
|
358
|
+
|
|
359
|
+
### `ItemDescription`
|
|
360
|
+
|
|
361
|
+
Clamped to two lines for a list; pass `line-clamp-none` where the block is the point (an address).
|
|
362
|
+
|
|
363
|
+
Also takes: every `<p>` attribute.
|
|
364
|
+
|
|
365
|
+
### `ItemFooter`
|
|
366
|
+
|
|
367
|
+
Also takes: every `<div>` attribute.
|
|
368
|
+
|
|
369
|
+
### `ItemGroup`
|
|
370
|
+
|
|
371
|
+
A list of `Item` rows. `flex flex-col` with no gap: rows that share a field touch, and a group of outlined rows takes `gap-2` so two borders do not meet as an accidental 2px rule.
|
|
372
|
+
|
|
373
|
+
Also takes: every `<div>` attribute.
|
|
374
|
+
|
|
375
|
+
### `ItemHeader`
|
|
376
|
+
|
|
377
|
+
Also takes: every `<div>` attribute.
|
|
378
|
+
|
|
379
|
+
### `ItemMedia`
|
|
380
|
+
|
|
381
|
+
`variant="icon"` is `IconChip`'s chip, drawn on this element rather than nested inside it, so the slot's alignment (top-aligned beside a description) stays on the chip. Size it up to `md` for an entity standing alone under a card title; `sm` is tuned for a dense list.
|
|
382
|
+
|
|
383
|
+
| Prop | Type | Default | Description |
|
|
384
|
+
| --- | --- | --- | --- |
|
|
385
|
+
| `variant` | `'default' \| 'icon' \| 'image'` | `'default'` | |
|
|
386
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'sm'` | `variant="icon"` only: the chip's footprint, `sm` 32px, `md` 40px, `lg` 48px. |
|
|
387
|
+
| `shape` | `'square' \| 'circle'` | `'square'` | `variant="icon"` only. `circle` where the row stands for a person. |
|
|
388
|
+
| `tone` | `'neutral' \| 'primary' \| 'info' \| 'success' \| 'warning' \| 'critical'` | `'neutral'` | `variant="icon"` only. Neutral unless the row is in a state worth a colour. |
|
|
389
|
+
|
|
390
|
+
Also takes: every `<div>` attribute.
|
|
391
|
+
|
|
392
|
+
### `ItemSeparator`
|
|
393
|
+
|
|
394
|
+
Also takes: everything `Separator` takes.
|
|
395
|
+
|
|
396
|
+
### `ItemTitle`
|
|
397
|
+
|
|
398
|
+
Also takes: every `<div>` attribute.
|
|
399
|
+
|
|
400
|
+
Also exports: `itemMediaVariants`, `itemVariants`.
|
|
401
|
+
|
|
402
|
+
Types: `ItemMediaVariant` (`'default' | 'icon' | 'image'`), `ItemSize` (`'md' | 'sm' | 'flush'`), `ItemVariant` (`'default' | 'outline' | 'muted'`).
|
|
403
|
+
|
|
404
|
+
## MetricBar
|
|
405
|
+
|
|
406
|
+
`import { MetricBar, MetricRank } from '@jovertical/mise-design-system'`
|
|
407
|
+
|
|
408
|
+
One measure, stated and then drawn. The figure is the answer and the bar is the context: a reader who wants the value should not estimate it from a length, and a reader comparing rows scans the bars, not the digits. So the figure sits on the label's line.
|
|
409
|
+
|
|
410
|
+
| Prop | Type | Default | Description |
|
|
411
|
+
| --- | --- | --- | --- |
|
|
412
|
+
| `label` (required) | `string \| Snippet` | | |
|
|
413
|
+
| `percent` (required) | `number` | | How full the bar is, 0–100. Clamped: over 100 is a bug upstream. |
|
|
414
|
+
| `value` | `string \| number \| Snippet` | | The figure the bar shows, at the label's right edge. |
|
|
415
|
+
| `description` | `string \| Snippet` | | A muted line under the label. |
|
|
416
|
+
| `icon` | `Snippet` | | A glyph in a `md` `IconChip` before the label: what the row is about. |
|
|
417
|
+
| `rank` | `number` | | The row's place in a ranking, as a `MetricRank` before the label, for a list whose order is the point. Pass `icon` or `rank`, not both. |
|
|
418
|
+
| `trailing` | `string \| Snippet` | | Beside the bar, on its line: `398 / 500 units`. The bar shortens to make room; a figure that qualifies the bar belongs on the bar's line. |
|
|
419
|
+
| `tone` | `'neutral' \| 'primary' \| 'info' \| 'success' \| 'warning' \| 'critical'` | `'primary'` | The fill. `primary` by default; a status only where the reader should act. |
|
|
420
|
+
|
|
421
|
+
Also takes: every `<div>` attribute.
|
|
422
|
+
|
|
423
|
+
### `MetricRank`
|
|
424
|
+
|
|
425
|
+
A place in a ranking, `1`, `2`, `3`, in a small muted circle. Smaller than an `IconChip` on purpose: the number orders the rows, it is not what they are about.
|
|
426
|
+
|
|
427
|
+
| Prop | Type | Default | Description |
|
|
428
|
+
| --- | --- | --- | --- |
|
|
429
|
+
| `rank` (required) | `number` | | |
|
|
430
|
+
|
|
431
|
+
Also takes: every `<span>` attribute.
|
|
432
|
+
|
|
433
|
+
## MetricGrid
|
|
434
|
+
|
|
435
|
+
`import { MetricGrid } from '@jovertical/mise-design-system'`
|
|
436
|
+
|
|
437
|
+
A breakdown as a grid of bordered cells rather than a list of rows. A reader comparing sub-groups against each other wants them adjacent, not in order; `CardList` is the shape when the order means something.
|
|
438
|
+
|
|
439
|
+
| Prop | Type | Default | Description |
|
|
440
|
+
| --- | --- | --- | --- |
|
|
441
|
+
| `items` (required) | `MetricGridItem[]` | | |
|
|
442
|
+
| `columns` | `2 \| 3` | `3` | Columns at `md` and up; one below, where two cells side by side leave no room for a label and a bar. The caller picks it, knowing how many items there are: three columns and four items leaves an orphan. |
|
|
443
|
+
|
|
444
|
+
Also takes: every `<div>` attribute.
|
|
445
|
+
|
|
446
|
+
Types: `MetricGridItem`.
|
|
447
|
+
|
|
448
|
+
## MetricRow
|
|
449
|
+
|
|
450
|
+
`import { MetricRow } from '@jovertical/mise-design-system'`
|
|
451
|
+
|
|
452
|
+
A subject, the figures that describe it, and one bar beneath them all.
|
|
453
|
+
|
|
454
|
+
| Prop | Type | Default | Description |
|
|
455
|
+
| --- | --- | --- | --- |
|
|
456
|
+
| `icon` | `Snippet` | | A glyph in a `md` `IconChip` before the label. |
|
|
457
|
+
| `rank` | `number` | | A place in a ranking, as `MetricRank`. Pass `icon` or `rank`, not both. |
|
|
458
|
+
| `label` (required) | `string \| Snippet` | | |
|
|
459
|
+
| `description` | `string \| Snippet` | | A muted line under the title. |
|
|
460
|
+
| `stats` | `MetricRowStat[]` | | The figures along the top right, each under its own caption. |
|
|
461
|
+
| `percent` (required) | `number` | | How full the bar is, 0–100. Clamped: over 100 is a bug upstream. |
|
|
462
|
+
| `tone` | `'neutral' \| 'primary' \| 'info' \| 'success' \| 'warning' \| 'critical'` | `'primary'` | |
|
|
463
|
+
| `trailing` | `string \| Snippet \| null` | | Beside the bar: `398 / 500 units`. Inline, it takes a right-aligned slot with a floor width, so every row's bar starts and ends at the same x. `null` holds the slot empty; leave it out to give the slot up. |
|
|
464
|
+
| `barPlacement` | `'below' \| 'inline'` | `'below'` | `below`, the default, runs the bar the full width under the row, for a row whose bar belongs to no figure in particular. `inline` puts it before the figures at a fixed width, for one figure the bar is a picture of. |
|
|
465
|
+
| `hideBar` | `boolean` | `false` | Hides the bar, for a row with nothing to measure: an empty bar reads as a failure. |
|
|
466
|
+
|
|
467
|
+
Also takes: every `<div>` attribute.
|
|
468
|
+
|
|
469
|
+
Types: `MetricRowStat`.
|
|
470
|
+
|
|
471
|
+
## RadialStat
|
|
472
|
+
|
|
473
|
+
`import { RadialStat } from '@jovertical/mise-design-system'`
|
|
474
|
+
|
|
475
|
+
A share, drawn as an arc with the figure inside it. A circle has an obvious whole, so the ring says "roughly a quarter" without the reader converting a length. Right for a handful of parts side by side; wrong for a list, where twenty rings are a wall of dials.
|
|
476
|
+
|
|
477
|
+
| Prop | Type | Default | Description |
|
|
478
|
+
| --- | --- | --- | --- |
|
|
479
|
+
| `percent` (required) | `number` | | 0–100. Clamped: a share over 100 is a bug upstream, not a full ring plus. |
|
|
480
|
+
| `tone` | `'neutral' \| 'primary' \| 'info' \| 'success' \| 'warning' \| 'critical'` | `'primary'` | |
|
|
481
|
+
| `diameter` | `number` | `72` | Outer diameter in pixels; the stroke scales with it. `diameter`, not `size`, which across the package means `sm \| md \| lg`. |
|
|
482
|
+
| `thickness` | `'regular' \| 'thick'` | `'regular'` | Ring weight. `thick` for a ring that is the subject of its own card. |
|
|
483
|
+
| `children` | `Snippet` | | Replaces the printed percentage: a count, or a short word. |
|
|
484
|
+
| `'aria-label'` | `string` | | Read by assistive tech in place of the ring. |
|
|
485
|
+
|
|
486
|
+
Also takes: every `<div>` attribute.
|
|
487
|
+
|
|
488
|
+
Types: `RadialThickness` (`'regular' | 'thick'`).
|
|
489
|
+
|
|
490
|
+
## ReadinessChecklist
|
|
491
|
+
|
|
492
|
+
`import { ReadinessChecklist, ReadinessSummary, summariseReadiness } from '@jovertical/mise-design-system'`
|
|
493
|
+
|
|
494
|
+
One row per requirement, answering "what does this page still need from me". Deliberately not wrapped in a card: it goes in an AsideCard on one page and a page body on another, and a component that brought its own surface would make the second impossible.
|
|
495
|
+
|
|
496
|
+
| Prop | Type | Default | Description |
|
|
497
|
+
| --- | --- | --- | --- |
|
|
498
|
+
| `items` (required) | `ReadinessItem[]` | | |
|
|
499
|
+
| `emptyMessage` | `string` | `'Nothing to check yet.'` | Shown when nothing is applicable: a server returning no rows. |
|
|
500
|
+
| `showRequirement` | `boolean` | `true` | Drops the "Required" / "Optional" tag from unmet rows, for a progress list (what a server is doing), where a queued step tagged Required in warning colour reads as a problem when it simply has not started. |
|
|
501
|
+
|
|
502
|
+
Also takes: every `<ul>` attribute except `children`.
|
|
503
|
+
|
|
504
|
+
### `ReadinessSummary`
|
|
505
|
+
|
|
506
|
+
The count, the bar, and one line naming what is missing: naming it beats reporting that something is.
|
|
507
|
+
|
|
508
|
+
| Prop | Type | Default | Description |
|
|
509
|
+
| --- | --- | --- | --- |
|
|
510
|
+
| `items` (required) | `ReadinessItem[]` | | |
|
|
511
|
+
| `ready` | `boolean` | | Whether the thing is actually ready, when something other than this list decides. Omit it and readiness is "every required item met", the only authority a form has; pass it where a server owns the gate. |
|
|
512
|
+
| `readyMessage` | `string` | `'Everything required is done.'` | |
|
|
513
|
+
|
|
514
|
+
Also takes: every `<div>` attribute except `children`.
|
|
515
|
+
|
|
516
|
+
Also exports: `summariseReadiness`.
|
|
517
|
+
|
|
518
|
+
Types: `ReadinessItem`, `ReadinessStatus` (`'met' | 'unmet' | 'pending' | 'not-applicable'`), `ReadinessSummaryData`.
|
|
519
|
+
|
|
520
|
+
## SegmentedBar
|
|
521
|
+
|
|
522
|
+
`import { SegmentedBar } from '@jovertical/mise-design-system'`
|
|
523
|
+
|
|
524
|
+
A whole, divided into named parts. One bar rather than one per part, because the question is how the total splits.
|
|
525
|
+
|
|
526
|
+
| Prop | Type | Default | Description |
|
|
527
|
+
| --- | --- | --- | --- |
|
|
528
|
+
| `segments` (required) | `Segment[]` | | |
|
|
529
|
+
| `showShare` | `boolean` | `true` | Print each share inside its segment. Off when the bar heads a list below. |
|
|
530
|
+
| `showLabels` | `boolean` | `true` | Captions above the bar, each over the segment it names. |
|
|
531
|
+
| `size` | `'sm' \| 'md'` | `'md'` | |
|
|
532
|
+
|
|
533
|
+
Also takes: every `<div>` attribute.
|
|
534
|
+
|
|
535
|
+
Types: `Segment`, `SegmentedBarSize` (`'sm' | 'md'`).
|
|
536
|
+
|
|
537
|
+
## SegmentedCode
|
|
538
|
+
|
|
539
|
+
`import { SegmentedCode } from '@jovertical/mise-design-system'`
|
|
540
|
+
|
|
541
|
+
A code to read off a screen and type in somewhere else, in joined boxes of a few characters each, so a key reads here in the same groups the device asks for it in. The operator reads a box, types a box.
|
|
542
|
+
|
|
543
|
+
| Prop | Type | Default | Description |
|
|
544
|
+
| --- | --- | --- | --- |
|
|
545
|
+
| `value` (required) | `string` | | The code as issued (`66G6D-ME7021KJ6JBFN82MAWQA9VCV`). Hyphens and spaces are dropped before it is split, so the groups decide where it breaks. |
|
|
546
|
+
| `groups` (required) | `readonly number[]` | | How many characters each box holds, left to right: `[5, 4, 4, 4, 4, 4, 4]`. |
|
|
547
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | |
|
|
548
|
+
|
|
549
|
+
Also takes: every `<div>` attribute except `children`.
|
|
550
|
+
|
|
551
|
+
## Sparkline
|
|
552
|
+
|
|
553
|
+
`import { Sparkline } from '@jovertical/mise-design-system'`
|
|
554
|
+
|
|
555
|
+
A figure's recent shape, drawn small enough to sit beside it. No axes, no grid, no tooltip, no labels: it answers "is that number climbing or falling" in the space of a word. Anything that invites closer reading belongs in a chart on its own card.
|
|
556
|
+
|
|
557
|
+
| Prop | Type | Default | Description |
|
|
558
|
+
| --- | --- | --- | --- |
|
|
559
|
+
| `data` (required) | `number[]` | | The series, oldest first. Fewer than two points draws nothing. |
|
|
560
|
+
| `tone` | `'neutral' \| 'primary' \| 'info' \| 'success' \| 'warning' \| 'critical'` | `'primary'` | |
|
|
561
|
+
| `height` | `number` | `40` | Height in pixels. The width comes from whatever holds it. |
|
|
562
|
+
| `'aria-label'` | `string` | | Read by assistive tech: the shape says nothing without it. |
|
|
563
|
+
|
|
564
|
+
Also takes: every `<div>` attribute.
|
|
565
|
+
|
|
566
|
+
## StatTile
|
|
567
|
+
|
|
568
|
+
`import { StatTile } from '@jovertical/mise-design-system'`
|
|
569
|
+
|
|
570
|
+
The dashboard's headline number. One tile states one figure, and the rest qualifies it: a unit, a delta, a description, a sparkline, a few rows. The icon sits in a chip so the eye lands on the number, and colour is kept for tone; a tile merely reporting a total stays in ink.
|
|
571
|
+
|
|
572
|
+
| Prop | Type | Default | Description |
|
|
573
|
+
| --- | --- | --- | --- |
|
|
574
|
+
| `label` (required) | `string` | | A short caption above the figure. |
|
|
575
|
+
| `value` (required) | `string \| number \| Snippet \| null` | | The figure, already formatted: the package has no opinion about currencies or locales. `null` renders an em dash. |
|
|
576
|
+
| `unit` | `string \| Snippet` | | What the figure is counted in: `orders`, `per order`. Its own small line under the figure, since beside it a delta and a visual made every tile in a row wrap at a different point. |
|
|
577
|
+
| `exactValue` | `string` | | The unabbreviated figure, on hover: `$45,612.40` under `$45.6k`. |
|
|
578
|
+
| `icon` | `Snippet` | | |
|
|
579
|
+
| `hint` | `Snippet` | | An explanation trigger after the label; it belongs to the caption it explains. |
|
|
580
|
+
| `tone` | `'neutral' \| 'primary' \| 'info' \| 'success' \| 'warning' \| 'critical'` | `'neutral'` | Colours the figure only, never the chip or the card: "this figure has a direction", not "this is a problem". |
|
|
581
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | |
|
|
582
|
+
| `surface` | `'card' \| 'inset'` | `'card'` | |
|
|
583
|
+
| `iconShape` | `'square' \| 'circle'` | `'square'` | `square` by default. A chip holding a face or initials is a circle; for icon chips the screen picks, and every chip in the row takes the same one. |
|
|
584
|
+
| `description` | `string \| Snippet` | | A muted line under the figure. |
|
|
585
|
+
| `delta` | `Snippet` | | After the figure, on its line: a `DeltaBadge`, so `$45.6k ↗ +15.7%` reads as one statement. Dropped on error. |
|
|
586
|
+
| `action` | `Snippet` | | Top right, on the label's line: a link out to what the figure summarises. Keep it short; the label is the one that wraps. |
|
|
587
|
+
| `visual` | `Snippet` | | A shape beside the figure, a `Sparkline` usually. It takes half the row and yields: a long figure squeezes the shape, never the reverse. |
|
|
588
|
+
| `rows` | `StatRow[]` | | Supporting facts under the figure, ruled off from it and from each other. |
|
|
589
|
+
| `footer` | `Snippet` | | Below everything else: a bar, a total. |
|
|
590
|
+
| `iconPosition` | `'left' \| 'right'` | `'right'` | Right by default: the icon is ornament, so label, figure and description run straight down the left edge. Left for an icon that carries meaning. |
|
|
591
|
+
| `iconAlignment` | `'center' \| 'top'` | `'center'` | |
|
|
592
|
+
| `iconTone` | `'neutral' \| 'primary' \| 'info' \| 'success' \| 'warning' \| 'critical'` | `'neutral'` | |
|
|
593
|
+
| `iconSize` | `'sm' \| 'md' \| 'lg'` | | |
|
|
594
|
+
| `applyToneToIcon` | `boolean` | `false` | Lets the chip follow `tone`, so one threshold colours both and the two cannot drift into an ink figure in a red chip. Off by default: a tinted chip beside a tinted figure says the same thing twice. Supersedes `iconTone`. |
|
|
595
|
+
| `loading` | `boolean` | `false` | |
|
|
596
|
+
| `error` | `boolean` | `false` | |
|
|
597
|
+
|
|
598
|
+
Also takes: every `<div>` attribute.
|
|
599
|
+
|
|
600
|
+
Types: `StatIconAlignment` (`'center' | 'top'`), `StatIconSize` (`'sm' | 'md' | 'lg'`), `StatRow`, `StatSize` (`'sm' | 'md' | 'lg'`), `StatSurface` (`'card' | 'inset'`).
|
|
601
|
+
|
|
602
|
+
## Table
|
|
603
|
+
|
|
604
|
+
`import { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from '@jovertical/mise-design-system'`
|
|
605
|
+
|
|
606
|
+
| Prop | Type | Default | Description |
|
|
607
|
+
| --- | --- | --- | --- |
|
|
608
|
+
| `compact` | `boolean` | `false` | Tightens every row, the head included. The default suits a listing, where a row is a click target; `compact` is for a table being read (line items, totals, a mapping preview), where the extra height pushes the summary off the card. |
|
|
609
|
+
|
|
610
|
+
Also takes: every `<table>` attribute.
|
|
611
|
+
|
|
612
|
+
### `TableBody`
|
|
613
|
+
|
|
614
|
+
The rows. The last row drops its rule; the table edge is enough.
|
|
615
|
+
|
|
616
|
+
Also takes: every `<thead>` attribute.
|
|
617
|
+
|
|
618
|
+
### `TableCaption`
|
|
619
|
+
|
|
620
|
+
A caption under the table.
|
|
621
|
+
|
|
622
|
+
Also takes: every HTML attribute.
|
|
623
|
+
|
|
624
|
+
### `TableCell`
|
|
625
|
+
|
|
626
|
+
| Prop | Type | Default | Description |
|
|
627
|
+
| --- | --- | --- | --- |
|
|
628
|
+
| `numeric` | `boolean` | `false` | Right-aligned with tabular figures, so a column of numbers lines up. |
|
|
629
|
+
|
|
630
|
+
Also takes: every `<td>` attribute.
|
|
631
|
+
|
|
632
|
+
### `TableFooter`
|
|
633
|
+
|
|
634
|
+
Totals, on a muted band under the body.
|
|
635
|
+
|
|
636
|
+
Also takes: every `<thead>` attribute.
|
|
637
|
+
|
|
638
|
+
### `TableHead`
|
|
639
|
+
|
|
640
|
+
| Prop | Type | Default | Description |
|
|
641
|
+
| --- | --- | --- | --- |
|
|
642
|
+
| `numeric` | `boolean` | `false` | Right-aligns the column. Pair it with `numeric` on the column's cells. |
|
|
643
|
+
| `strong` | `boolean` | `false` | For a header that names the things compared rather than labelling a column of values (the roles across a permission matrix): ink at body size instead of the muted caption. |
|
|
644
|
+
|
|
645
|
+
Also takes: every `<th>` attribute.
|
|
646
|
+
|
|
647
|
+
### `TableHeader`
|
|
648
|
+
|
|
649
|
+
The column labels, muted, ruled off from the body.
|
|
650
|
+
|
|
651
|
+
Also takes: every `<thead>` attribute.
|
|
652
|
+
|
|
653
|
+
### `TableRow`
|
|
654
|
+
|
|
655
|
+
One row. `data-state="selected"` tints it as the active nav row is tinted.
|
|
656
|
+
|
|
657
|
+
Also takes: every `<tr>` attribute.
|
|
658
|
+
|
|
659
|
+
## Timeline
|
|
660
|
+
|
|
661
|
+
`import { Timeline, TimelineConnector, TimelineContent, TimelineDot, TimelineItem, TimelineSkeleton, TimelineTitle, timelineDotVariants } from '@jovertical/mise-design-system'`
|
|
662
|
+
|
|
663
|
+
A list of events, newest first by convention, each a badge, a title and a body joined by a vertical rule.
|
|
664
|
+
|
|
665
|
+
Also takes: every `<ol>` attribute.
|
|
666
|
+
|
|
667
|
+
### `TimelineConnector`
|
|
668
|
+
|
|
669
|
+
The rule under a badge. Rendered by every item except the last. `min-h-6` keeps a visible run of line under a one-line body, so a short entry does not collapse the badge spacing.
|
|
670
|
+
|
|
671
|
+
Also takes: every `<hr>` attribute.
|
|
672
|
+
|
|
673
|
+
### `TimelineContent`
|
|
674
|
+
|
|
675
|
+
The body. `pb-5` is the gap between entries; it sits here rather than on the item so the connector, which shares the row, runs the full distance.
|
|
676
|
+
|
|
677
|
+
Also takes: every `<div>` attribute.
|
|
678
|
+
|
|
679
|
+
### `TimelineDot`
|
|
680
|
+
|
|
681
|
+
The badge. Renders whatever icon it is given, and a small filled circle when given nothing: an empty 32px disc reads as a component that failed to load.
|
|
682
|
+
|
|
683
|
+
| Prop | Type | Default | Description |
|
|
684
|
+
| --- | --- | --- | --- |
|
|
685
|
+
| `tone` | `'primary' \| 'neutral' \| 'info' \| 'success' \| 'warning' \| 'critical'` | | |
|
|
686
|
+
| `indicator` | `Snippet` | | A mark on the badge's lower-right edge (a `PresenceDot` while that entry's author is here now), drawn over the badge so the columns do not move. |
|
|
687
|
+
|
|
688
|
+
Also takes: every `<div>` attribute.
|
|
689
|
+
|
|
690
|
+
### `TimelineItem`
|
|
691
|
+
|
|
692
|
+
Also takes: every `<li>` attribute.
|
|
693
|
+
|
|
694
|
+
### `TimelineSkeleton`
|
|
695
|
+
|
|
696
|
+
A timeline's loading state: neutral pulsing badges and bars in place of text.
|
|
697
|
+
|
|
698
|
+
| Prop | Type | Default | Description |
|
|
699
|
+
| --- | --- | --- | --- |
|
|
700
|
+
| `count` | `number` | `3` | How many placeholder entries. |
|
|
701
|
+
|
|
702
|
+
Also takes: everything `Timeline` takes except `children`.
|
|
703
|
+
|
|
704
|
+
### `TimelineTitle`
|
|
705
|
+
|
|
706
|
+
The row's heading. A `div`, not a `p`: the slot takes any children, a `Skeleton` among them, and a block inside a paragraph is invalid HTML.
|
|
707
|
+
|
|
708
|
+
Also takes: every `<div>` attribute.
|
|
709
|
+
|
|
710
|
+
Also exports: `timelineDotVariants`.
|
|
711
|
+
|
|
712
|
+
Types: `TimelineDotTone` (`'primary' | 'neutral' | 'info' | 'success' | 'warning' | 'critical'`).
|
|
713
|
+
|
|
714
|
+
## TreeLeaf
|
|
715
|
+
|
|
716
|
+
`import { TreeLeaf } from '@jovertical/mise-design-system'`
|
|
717
|
+
|
|
718
|
+
One row of a nested list: a stem down its left edge, an elbow into the row, a media chip, a label, and an optional trailing figure.
|
|
719
|
+
|
|
720
|
+
| Prop | Type | Default | Description |
|
|
721
|
+
| --- | --- | --- | --- |
|
|
722
|
+
| `position` | `keyof typeof STEM_CLASS` | `'middle'` | `last` shortens the stem to half height, so it does not run past the final row. |
|
|
723
|
+
| `icon` (required) | `Snippet` | | |
|
|
724
|
+
| `label` (required) | `string \| Snippet` | | |
|
|
725
|
+
| `trailing` | `string \| Snippet` | | |
|
|
726
|
+
| `mediaSize` | `keyof typeof MEDIA_SIZE_CLASS` | `'md'` | |
|
|
727
|
+
|
|
728
|
+
Also takes: every `<li>` attribute except `children`.
|