@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,198 @@
1
+ <!-- Generated by pnpm build:skill. Do not edit by hand. -->
2
+
3
+ # Feedback
4
+
5
+ ## Alert
6
+
7
+ `import { Alert, AlertAction, AlertDescription, AlertTitle, alertVariants } from '@jovertical/mise-design-system'`
8
+
9
+ Status is the surface and the icon; the words stay in ink. Red body text reads as the message being an error rather than being about one. The layout has an icon column only when there is an icon, and a third column for `AlertAction` from `sm`.
10
+
11
+ | Prop | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | `variant` | `'default' \| 'info' \| 'success' \| 'warning' \| 'destructive'` | | |
14
+
15
+ Also takes: every `<div>` attribute.
16
+
17
+ ### `AlertAction`
18
+
19
+ What the alert asks the reader to do: one button or a short row of them. On the right, centred across the title and description, from `sm`; below the text on a phone, where a third column would squeeze the sentence.
20
+
21
+ Also takes: every `<div>` attribute.
22
+
23
+ ### `AlertDescription`
24
+
25
+ A block rather than a grid: as a grid, an inline `<strong>` became its own row.
26
+
27
+ Also takes: every `<div>` attribute.
28
+
29
+ ### `AlertTitle`
30
+
31
+ One clamped line: anything that needs a second line belongs in the description.
32
+
33
+ Also takes: every `<div>` attribute.
34
+
35
+ Also exports: `alertVariants`.
36
+
37
+ Types: `AlertVariant` (`'default' | 'info' | 'success' | 'warning' | 'destructive'`).
38
+
39
+ ## Empty
40
+
41
+ `import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, emptyMediaVariants } from '@jovertical/mise-design-system'`
42
+
43
+ A dashed panel for nothing-here-yet. `border` as well as `border-dashed`: Tailwind's `border-dashed` sets only the style, so without a width the panel drew no edge at all.
44
+
45
+ Also takes: every `<div>` attribute.
46
+
47
+ ### `EmptyContent`
48
+
49
+ Also takes: every `<div>` attribute.
50
+
51
+ ### `EmptyDescription`
52
+
53
+ Also takes: every `<div>` attribute.
54
+
55
+ ### `EmptyHeader`
56
+
57
+ Also takes: every `<div>` attribute.
58
+
59
+ ### `EmptyMedia`
60
+
61
+ `icon` is a ringed circle on the page's own surface rather than a filled square: a frame around the glyph, which keeps a large empty panel from looking like a broken card.
62
+
63
+ | Prop | Type | Default | Description |
64
+ | --- | --- | --- | --- |
65
+ | `variant` | `'default' \| 'icon'` | `'default'` | |
66
+
67
+ Also takes: every `<div>` attribute.
68
+
69
+ ### `EmptyTitle`
70
+
71
+ Also takes: every `<div>` attribute.
72
+
73
+ Also exports: `emptyMediaVariants`.
74
+
75
+ Types: `EmptyMediaVariant` (`'default' | 'icon'`).
76
+
77
+ ## EmptyState
78
+
79
+ `import { EmptyState } from '@jovertical/mise-design-system'`
80
+
81
+ The default "nothing here yet" panel, for a list that came back empty when the screen has nothing more specific to say. `Empty` and its parts stay exported for the cases that do. The fallback wording is honest anywhere, which is also the signal that a screen has not been given its own.
82
+
83
+ | Prop | Type | Default | Description |
84
+ | --- | --- | --- | --- |
85
+ | `icon` (required) | `Snippet` | | Rendered in `EmptyMedia`'s icon chip. |
86
+ | `title` | `string` | | |
87
+ | `description` | `string` | | |
88
+ | `actions` | `Snippet` | | Buttons offering a way out of the empty state, laid out in a row. |
89
+ | `class` | `string` | | |
90
+
91
+ ## ErrorState
92
+
93
+ `import { ErrorState } from '@jovertical/mise-design-system'`
94
+
95
+ The full-page stop: not found, forbidden, or something that threw.
96
+
97
+ | Prop | Type | Default | Description |
98
+ | --- | --- | --- | --- |
99
+ | `status` | `number` | | HTTP status, above the title. Omit it and nothing is shown. |
100
+ | `title` (required) | `string` | | |
101
+ | `description` (required) | `string` | | |
102
+ | `icon` | `Snippet` | | A glyph above the title. Most error pages read better without one: the sentence already says what happened. |
103
+ | `homeLink` | `Snippet` | | The way home: a `Button` with `href`, or the router's link styled as one. |
104
+ | `showBackButton` | `boolean` | `false` | A `history.back()` button ahead of `homeLink`. Off by default: one obvious way forward is easier to act on, and Back is right only when the reader arrived by navigating rather than by URL. |
105
+ | `actions` | `Snippet` | | Extra buttons, ahead of Back and Home: Try again, for a thrown error. |
106
+
107
+ Also takes: every `<div>` attribute except `title`, `children`.
108
+
109
+ ## FeaturePreview
110
+
111
+ `import { FeaturePreview } from '@jovertical/mise-design-system'`
112
+
113
+ The page a reader lands on when a feature is not open to them yet, in place of an error, so a locked page still says what it would do and how to get it.
114
+
115
+ | Prop | Type | Default | Description |
116
+ | --- | --- | --- | --- |
117
+ | `title` (required) | `string` | | The feature's name, as the page would title it: "Purchase orders". |
118
+ | `headline` (required) | `string` | | What the feature does, in one line. |
119
+ | `benefits` (required) | `readonly string[]` | | Two or three concrete benefits. More turns the pitch into a manual. |
120
+ | `preview` (required) | `Snippet` | | A static sample of the real screen, from made-up data, laid out as the page would be. Blurred, inert and hidden from assistive technology: a picture of the feature, never a working copy. |
121
+ | `primaryAction` (required) | `Snippet` | | The way in: "Turn on purchase orders". |
122
+ | `secondaryAction` | `Snippet` | | Usually "Learn more". |
123
+
124
+ Also takes: every HTML attribute except `title`, `children`.
125
+
126
+ ## LoadingState
127
+
128
+ `import { LoadingState } from '@jovertical/mise-design-system'`
129
+
130
+ The panel that says work is under way, when the shape of what is coming is not known yet. The mirror of `EmptyState`, on the same `Empty` parts, so a list that flips from loading to empty does not move; the border is solid because something is coming. Reach for it last: where the layout is known, a `Skeleton` holds it.
131
+
132
+ | Prop | Type | Default | Description |
133
+ | --- | --- | --- | --- |
134
+ | `title` | `string` | | |
135
+ | `description` | `string` | | |
136
+ | `actions` | `Snippet` | | Something to do instead of waiting, usually "Continue in background". |
137
+ | `class` | `string` | | |
138
+
139
+ ## LockedOverlay
140
+
141
+ `import { LockedOverlay } from '@jovertical/mise-design-system'`
142
+
143
+ A lock over one card's body, for a widget the reader cannot open while the rest of the page works. The card keeps its frame and header; only the body is swapped for a blurred sample with the pitch on top.
144
+
145
+ | Prop | Type | Default | Description |
146
+ | --- | --- | --- | --- |
147
+ | `title` (required) | `string` | | What is locked, as the pitch's heading. |
148
+ | `message` (required) | `string` | | One line saying what the locked content would show. |
149
+ | `action` (required) | `Snippet` | | The way in: "Ask for access", "Finish setup". |
150
+ | `children` (required) | `Snippet` | | Sample content in the shape of the real thing. Blurred, inert and hidden from assistive technology, so its made-up figures are never read as the reader's own. |
151
+
152
+ Also takes: every `<div>` attribute except `title`, `children`.
153
+
154
+ ## NavigationProgress
155
+
156
+ `import { NavigationProgress } from '@jovertical/mise-design-system'`
157
+
158
+ The navigation progress bar across the top of the viewport.
159
+
160
+ | Prop | Type | Default | Description |
161
+ | --- | --- | --- | --- |
162
+ | `pending` (required) | `boolean` | | Whether a navigation is in flight. Rising shows the bar and runs it to the peak; falling runs it to full width and hides it. The router stays in the app: Inertia's start and finish events, or SvelteKit's `navigating`. |
163
+
164
+ ## Progress
165
+
166
+ `import { Progress } from '@jovertical/mise-design-system'`
167
+
168
+ The bare bar. `MetricBar` and `MetricRow` colour it through `TONE_INDICATOR_CLASS`; reach for `Progress` directly when there is no label or figure beside it. An unknown `value` draws an empty bar, not an animated indeterminate one: the copy beside it carries "this is running".
169
+
170
+ Also takes: bits-ui `Progress.Root` props except `children`, `child`.
171
+
172
+ ## Skeleton
173
+
174
+ `import { Skeleton } from '@jovertical/mise-design-system'`
175
+
176
+ Shaped to what it stands in for: there is no default size. Reach for it where a component has not already drawn its own loading shape.
177
+
178
+ Also takes: every `<div>` attribute.
179
+
180
+ ## Toaster
181
+
182
+ `import { Toaster, toast } from '@jovertical/mise-design-system'`
183
+
184
+ Also takes: `svelte-sonner` `ToasterProps`.
185
+
186
+ Also exports: `toast`.
187
+
188
+ ## Spinner
189
+
190
+ `import { Spinner } from '@jovertical/mise-design-system'`
191
+
192
+ `role="status"` and an `aria-label`, unlike a hand-spun icon: reach for this rather than a spinning loader glyph, which is silent to a screen reader.
193
+
194
+ | Prop | Type | Default | Description |
195
+ | --- | --- | --- | --- |
196
+ | `children` | `Snippet` | | A short sentence naming what is being waited on. |
197
+
198
+ Also takes: `svelte` `ComponentProps`.