@silverpoint/core 0.6.0 → 0.8.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.
Files changed (46) hide show
  1. package/README.md +14 -0
  2. package/dist/catalog.d.ts +2 -2
  3. package/dist/catalog.js +4 -2
  4. package/dist/catalog.js.map +1 -1
  5. package/dist/{chunk-OLYKR5PS.js → chunk-46QELMCG.js} +8 -213
  6. package/dist/chunk-46QELMCG.js.map +1 -0
  7. package/dist/chunk-5MP3BLZK.js +48 -0
  8. package/dist/chunk-5MP3BLZK.js.map +1 -0
  9. package/dist/chunk-6YFO7OP3.js +84 -0
  10. package/dist/chunk-6YFO7OP3.js.map +1 -0
  11. package/dist/chunk-ANJSW5JX.js +93 -0
  12. package/dist/chunk-ANJSW5JX.js.map +1 -0
  13. package/dist/{chunk-PD4MD7JU.js → chunk-E5CC2NNQ.js} +5 -3
  14. package/dist/chunk-E5CC2NNQ.js.map +1 -0
  15. package/dist/chunk-G7N4X5XD.js +12 -0
  16. package/dist/chunk-G7N4X5XD.js.map +1 -0
  17. package/dist/chunk-NI7B6UEO.js +24 -0
  18. package/dist/chunk-NI7B6UEO.js.map +1 -0
  19. package/dist/chunk-WYFRHI4S.js +179 -0
  20. package/dist/chunk-WYFRHI4S.js.map +1 -0
  21. package/dist/contrast-siWF_R5o.d.ts +30 -0
  22. package/dist/dashboard-demos.d.ts +2 -2
  23. package/dist/index.d.ts +13 -10
  24. package/dist/index.js +20 -9
  25. package/dist/index.js.map +1 -1
  26. package/dist/{model-CLhtoG75.d.ts → model-DVVt59AB.d.ts} +1 -1
  27. package/dist/palettes.d.ts +29 -0
  28. package/dist/palettes.js +79 -0
  29. package/dist/palettes.js.map +1 -0
  30. package/dist/{props-Dq8FC8GG.d.ts → props-BZ9CcrGv.d.ts} +53 -1
  31. package/dist/timeline.d.ts +90 -0
  32. package/dist/timeline.js +125 -0
  33. package/dist/timeline.js.map +1 -0
  34. package/dist/{types-B81k-s9_.d.ts → types-BT3Xm7fP.d.ts} +3 -1
  35. package/dist/types-D5ys35fF.d.ts +576 -0
  36. package/dist/types-DHBJ0PzV.d.ts +57 -0
  37. package/dist/ui-demos.d.ts +14 -3
  38. package/dist/ui-demos.js +163 -1
  39. package/dist/ui-demos.js.map +1 -1
  40. package/dist/ui.d.ts +346 -325
  41. package/dist/ui.js +932 -118
  42. package/dist/ui.js.map +1 -1
  43. package/dist/view-DteS9glE.d.ts +82 -0
  44. package/package.json +13 -1
  45. package/dist/chunk-OLYKR5PS.js.map +0 -1
  46. package/dist/chunk-PD4MD7JU.js.map +0 -1
@@ -0,0 +1,576 @@
1
+ import { G as Geometry, n as Seed, t as GroundRef, u as SubstrateName, q as InkMode, au as Palette, az as ToneLevel } from './props-BZ9CcrGv.js';
2
+
3
+ type UiFrameKind = 'control' | 'pill' | 'box' | 'card' | 'round';
4
+ /**
5
+ * Each frame kind is drawn once in a square box and cut into slices for the grounds build
6
+ * (DD-022): four corners of `slice` px, and four edges between them when `size > 2 * slice`.
7
+ * `round` and `box` have no edges; they frame fixed-size squares.
8
+ */
9
+ declare const UI_FRAME_KINDS: Readonly<Record<UiFrameKind, Readonly<{
10
+ size: number;
11
+ slice: number;
12
+ radius: number;
13
+ }>>>;
14
+ /**
15
+ * The frame variant of a component: from `seed`, else `id`, by the charts' seed rule; `0` with
16
+ * neither (REQ-307, I-21). Never from mount order, randomness or time (Art. 4). `variants` is read
17
+ * as an integer in 1..6.
18
+ */
19
+ declare function uiFrameVariant(seed: Seed | undefined, id: string | undefined, variants: number): number;
20
+ /**
21
+ * The exact outline of a frame kind: the input the grounds build inks, once per variant, into the
22
+ * pieces of `ui.css` (DD-022). It is an `ornament` stroke —a frame carries no value (Art. 1, as
23
+ * amended)— so the ground's inker may draw it by hand, with its vertices preserved. Build time only.
24
+ */
25
+ declare function uiFrameOutline(kind: UiFrameKind): Geometry;
26
+
27
+ /** Control size; heights come from the ground's `ui.controlHeight` (Data Model §3.8). */
28
+ type UiSize = 'sm' | 'md' | 'lg';
29
+ /** Props every UI component takes, as `CommonChartProps` does for charts (API Spec §3). */
30
+ interface CommonUiProps {
31
+ /** The frame variant and every related id derive from it (REQ-307, REQ-329). */
32
+ id?: string;
33
+ /** Overrides `id` for the frame variant only. */
34
+ seed?: Seed;
35
+ /** Style ground. Defaults to the dashboard's, then the app provider's, or `silverpoint` (REQ-311). */
36
+ ground?: GroundRef;
37
+ /** Prepared substrate within the ground (REQ-046). */
38
+ substrate?: SubstrateName;
39
+ /** `ink` by default; `precision` disables inking (REQ-021, REQ-306). */
40
+ mode?: InkMode;
41
+ /** Colours over the ground's, merged over the dashboard's and the provider's (REQ-461, REQ-462). */
42
+ palette?: Palette;
43
+ /** Default `'md'`. */
44
+ size?: UiSize;
45
+ /** Added to the component's root element, after its own classes. */
46
+ className?: string;
47
+ }
48
+ /** An item of Tabs, Segmented or RadioGroup; keys are unique (REQ-325). */
49
+ interface UiItem {
50
+ key: string;
51
+ label: string;
52
+ disabled?: boolean;
53
+ }
54
+ type StepStatus = 'wait' | 'process' | 'finish' | 'error';
55
+ interface StepItem {
56
+ key: string;
57
+ title: string;
58
+ description?: string;
59
+ /** Derived from `current` when omitted; `'error'` must be explicit. */
60
+ status?: StepStatus;
61
+ }
62
+ /** Button emphasis. Not a tone: `tone` names only a level 1-4 of the ground's ramp (A-07). */
63
+ type UiVariant = 'default' | 'primary' | 'danger';
64
+ type AlertKind = 'info' | 'success' | 'warning' | 'error';
65
+ type UiOrientation = 'horizontal' | 'vertical';
66
+ /** A tonal level a component may ask for; 0 (no fill) is not one. */
67
+ type UiToneLevel = Exclude<ToneLevel, 0>;
68
+ interface SpButtonProps extends CommonUiProps {
69
+ /** Default `'default'`; `danger` also draws the exact ✕ glyph (REQ-310). */
70
+ variant?: UiVariant;
71
+ /** Default `'button'`. */
72
+ type?: 'button' | 'submit' | 'reset';
73
+ /** Not focusable, not submitted; drawn with the disabled tone. */
74
+ disabled?: boolean;
75
+ /** Accessible name of an icon-only button (REQ-319). */
76
+ label?: string;
77
+ /** Fills the width of its container. */
78
+ block?: boolean;
79
+ /** Renders an `<a>`. */
80
+ href?: string;
81
+ }
82
+ interface SpInputProps extends CommonUiProps {
83
+ /** Native input type. Default `'text'`. */
84
+ type?: 'text' | 'search' | 'email' | 'url' | 'tel' | 'password' | 'number';
85
+ /** Hint shown while empty; not a substitute for the accessible name. */
86
+ placeholder?: string;
87
+ /** Form field name; the native input submits under it (REQ-323). */
88
+ name?: string;
89
+ /** Not focusable and not submitted. */
90
+ disabled?: boolean;
91
+ /** Focusable and submitted, but not editable. */
92
+ readOnly?: boolean;
93
+ /** Sets `aria-invalid` and draws the exact ⚠ glyph (REQ-334). */
94
+ invalid?: boolean;
95
+ /** Help or error text under the control, referenced by `aria-describedby` (REQ-334). */
96
+ message?: string;
97
+ /** Accessible name, when no `<label for>` names the control. */
98
+ label?: string;
99
+ }
100
+ interface SpCheckboxProps extends CommonUiProps {
101
+ /** The visible text and accessible name. */
102
+ label: string;
103
+ /** Form field name; submitted as `on` when checked. */
104
+ name?: string;
105
+ /** Not focusable and not submitted. */
106
+ disabled?: boolean;
107
+ /** Draws the exact dash and sets the native `indeterminate` state. */
108
+ indeterminate?: boolean;
109
+ }
110
+ interface SpRadioGroupProps extends CommonUiProps {
111
+ /** The choices; each a native radio. Keys are unique (REQ-325). */
112
+ items: readonly UiItem[];
113
+ /** Required: the native radios submit under it (REQ-323). */
114
+ name: string;
115
+ /** The group's name, its `<legend>`. */
116
+ label: string;
117
+ /** Default `'vertical'`. */
118
+ orientation?: UiOrientation;
119
+ }
120
+ interface SpSwitchProps extends CommonUiProps {
121
+ /** The visible text and accessible name. */
122
+ label: string;
123
+ /** Form field name; submitted as `on` when on. */
124
+ name?: string;
125
+ /** Not focusable and not submitted. */
126
+ disabled?: boolean;
127
+ }
128
+ interface SpSliderProps extends CommonUiProps {
129
+ /** Accessible name of the native range input. */
130
+ label: string;
131
+ /** Default `0`. */
132
+ min?: number;
133
+ /** Default `100`. */
134
+ max?: number;
135
+ /** Default `1`. */
136
+ step?: number;
137
+ /** Form field name; the native input submits under it. */
138
+ name?: string;
139
+ /** Not focusable and not submitted. */
140
+ disabled?: boolean;
141
+ /** Values on the rail that get a labelled mark. */
142
+ marks?: readonly number[];
143
+ }
144
+ interface SpRateProps extends CommonUiProps {
145
+ /** The group's name, its `<legend>`. */
146
+ label: string;
147
+ /** Default `5`, in 1..10; each mark an exact lozenge. */
148
+ count?: number;
149
+ /** Form field name; the native radios submit under it. */
150
+ name?: string;
151
+ /** Not focusable and not submitted. */
152
+ disabled?: boolean;
153
+ /** Shows the value; the keyboard and the pointer do not change it. */
154
+ readOnly?: boolean;
155
+ }
156
+ interface SpSegmentedProps extends CommonUiProps {
157
+ /** The options; each a native radio. Keys are unique (REQ-325). */
158
+ items: readonly UiItem[];
159
+ /** The control's name, its `<legend>`. */
160
+ label: string;
161
+ /** Form field name; the native radios submit under it. */
162
+ name?: string;
163
+ /** Fills the width of its container. */
164
+ block?: boolean;
165
+ }
166
+ interface SpTabsProps extends CommonUiProps {
167
+ /** The tabs; a disabled one is skipped by the arrows. Keys are unique (REQ-325). */
168
+ items: readonly UiItem[];
169
+ /** Accessible name of the tab list. */
170
+ label?: string;
171
+ /** Default `'horizontal'`. */
172
+ orientation?: UiOrientation;
173
+ /** Default `'automatic'`: a tab is selected as focus reaches it. */
174
+ activation?: 'automatic' | 'manual';
175
+ }
176
+ interface SpStepsProps extends CommonUiProps {
177
+ /** The steps, in order; a status is derived from `current` unless set. */
178
+ items: readonly StepItem[];
179
+ /** 0-based. */
180
+ current: number;
181
+ /** Default `'horizontal'`. */
182
+ orientation?: UiOrientation;
183
+ /** Accessible name of the list. */
184
+ label?: string;
185
+ }
186
+ interface SpCardProps extends CommonUiProps {
187
+ /** Heading of the card; without it the card is a plain container. */
188
+ title?: string;
189
+ /** Default `3`. */
190
+ headingLevel?: 2 | 3 | 4 | 5 | 6;
191
+ }
192
+ interface SpTagProps extends CommonUiProps {
193
+ /** Tonal level, default `1`. */
194
+ tone?: UiToneLevel;
195
+ /** Adds a native close button; each adapter raises its close event. */
196
+ closable?: boolean;
197
+ /** Accessible name of the close button. Default `Remove <text>`. */
198
+ closeLabel?: string;
199
+ }
200
+ interface SpBadgeProps extends CommonUiProps {
201
+ /** The number shown, up to `max`. */
202
+ count?: number;
203
+ /** Default `99`; above it the badge reads `99+`. */
204
+ max?: number;
205
+ /** A dot with no number. */
206
+ dot?: boolean;
207
+ /** Accessible text of the badge, e.g. `unread messages`. */
208
+ label?: string;
209
+ }
210
+ interface SpDividerProps extends CommonUiProps {
211
+ /** Default `'horizontal'`. */
212
+ orientation?: UiOrientation;
213
+ /** A caption set in the rule. */
214
+ text?: string;
215
+ /** Default `'center'`. */
216
+ align?: 'start' | 'center' | 'end';
217
+ }
218
+ interface SpProgressProps extends CommonUiProps {
219
+ /** 0..100; omitted, the progress is indeterminate. */
220
+ value?: number;
221
+ /** Default `'line'`. */
222
+ shape?: 'line' | 'circle';
223
+ /** Accessible name (REQ-318). */
224
+ label: string;
225
+ /** Default `true`. */
226
+ showValue?: boolean;
227
+ }
228
+ interface SpAlertProps extends CommonUiProps {
229
+ /** Default `'info'`. */
230
+ kind?: AlertKind;
231
+ /** Bold first line of the alert. */
232
+ title?: string;
233
+ /** Adds a native close button; each adapter raises its close event. */
234
+ closable?: boolean;
235
+ /** Accessible name of the close button. Default `'Close'`. */
236
+ closeLabel?: string;
237
+ }
238
+ interface SpSkeletonProps extends CommonUiProps {
239
+ /** Default `3`, in 1..8. */
240
+ lines?: number;
241
+ /** Draws an avatar placeholder before the lines. */
242
+ avatar?: boolean;
243
+ /** Default `'Loading'`. */
244
+ label?: string;
245
+ }
246
+ interface SpSurfaceProps extends CommonUiProps {
247
+ /** The element, a lowercase HTML tag name. Default `'div'`. */
248
+ as?: string;
249
+ /** Adds the class `sp-<name>`, a lowercase ident. */
250
+ name?: string;
251
+ /** Draws a frame of that kind. */
252
+ frame?: UiFrameKind;
253
+ /** Lays a tone: a level 1-4 of the ramp, or a state (`selected`, `primary`…). */
254
+ tone?: UiToneLevel | string;
255
+ }
256
+ interface SpGlyphProps extends CommonUiProps {
257
+ /** A key of `UI_GLYPHS`. */
258
+ glyph: string;
259
+ }
260
+ interface TableColumn {
261
+ readonly key: string;
262
+ /** The key when omitted. */
263
+ readonly title?: string;
264
+ readonly align?: 'start' | 'center' | 'end';
265
+ readonly sortable?: boolean;
266
+ /** CSS length; written as an inline width on the header cell. */
267
+ readonly width?: string;
268
+ }
269
+ interface SpTableProps extends CommonUiProps {
270
+ /** The columns, in order; each names the key it reads from a row. */
271
+ columns: readonly TableColumn[];
272
+ /** The rows, drawn as given: the consumer sorts them (DD-040). */
273
+ data: readonly Readonly<Record<string, unknown>>[];
274
+ /** The table's `<caption>`, its accessible name. */
275
+ caption?: string;
276
+ /** A sortable column's key; another key sorts nothing, silently. */
277
+ sortKey?: string;
278
+ /** Default `'asc'`. */
279
+ sortOrder?: 'asc' | 'desc';
280
+ /** Default `false`. */
281
+ striped?: boolean;
282
+ /** Default `true`. */
283
+ hoverable?: boolean;
284
+ /** Default `true`. */
285
+ bordered?: boolean;
286
+ /** Default `'No data'`. */
287
+ emptyText?: string;
288
+ /** The column whose value keys each row. */
289
+ rowKey?: string;
290
+ }
291
+ interface SpPaginationProps extends CommonUiProps {
292
+ /** The number of items paged over. */
293
+ total: number;
294
+ /** Default `10`. */
295
+ pageSize?: number;
296
+ /** Pages shown on each side of the current one. Default `1`. */
297
+ siblings?: number;
298
+ /** Default `false`. */
299
+ showTotal?: boolean;
300
+ /** Default `'{start}–{end} of {total}'`. */
301
+ totalTemplate?: string;
302
+ /** Default `'Pagination'`. */
303
+ label?: string;
304
+ /** Default `'Previous page'`. */
305
+ previousLabel?: string;
306
+ /** Default `'Next page'`. */
307
+ nextLabel?: string;
308
+ /** Default `'Page'`. */
309
+ pageLabel?: string;
310
+ /** Every page button disabled. */
311
+ disabled?: boolean;
312
+ }
313
+ interface BreadcrumbItem {
314
+ readonly key?: string;
315
+ readonly label: string;
316
+ readonly href?: string;
317
+ }
318
+ interface SpBreadcrumbProps extends CommonUiProps {
319
+ /** The last item is the current page. */
320
+ items: readonly BreadcrumbItem[];
321
+ /** Default `'Breadcrumb'`. */
322
+ label?: string;
323
+ }
324
+ interface SpAvatarProps extends CommonUiProps {
325
+ /** An image; the initials are drawn without one. */
326
+ src?: string;
327
+ /** The person's name: the accessible name and the source of the initials. */
328
+ name?: string;
329
+ /** Overrides the initials derived from `name`. */
330
+ initials?: string;
331
+ /** Overrides `name` as the accessible name. */
332
+ alt?: string;
333
+ /** Default `'circle'`. */
334
+ shape?: 'circle' | 'square';
335
+ /** Side length in px; the ground's control height when omitted. */
336
+ pixelSize?: number;
337
+ }
338
+ interface SpAvatarGroupProps extends CommonUiProps {
339
+ label?: string;
340
+ }
341
+ interface SpStatisticProps extends CommonUiProps {
342
+ /** The label above the value. */
343
+ title: string;
344
+ /** Printed as given. */
345
+ value: string | number;
346
+ /** Printed before the value (`$`). */
347
+ prefix?: string;
348
+ /** Printed after the value (`%`). */
349
+ suffix?: string;
350
+ /** Draws the exact ↑ or ↓ glyph beside the delta. */
351
+ trend?: 'up' | 'down';
352
+ /** The change, as text (`+4.2%`). */
353
+ delta?: string;
354
+ }
355
+ interface DescriptionItem {
356
+ readonly key?: string;
357
+ readonly label: string;
358
+ readonly value: string;
359
+ }
360
+ interface SpDescriptionsProps extends CommonUiProps {
361
+ /** The label–value pairs, a `<dl>`. Keys, when given, are unique (REQ-325). */
362
+ items: readonly DescriptionItem[];
363
+ /** A heading above the list, at `headingLevel`. */
364
+ title?: string;
365
+ /** Default `3`, in 1..6. */
366
+ columns?: number;
367
+ /** Default `true`. */
368
+ bordered?: boolean;
369
+ /** Default `3`. */
370
+ headingLevel?: 2 | 3 | 4 | 5 | 6;
371
+ }
372
+ interface TimelineListItem {
373
+ readonly key?: string;
374
+ readonly title: string;
375
+ readonly time?: string;
376
+ readonly description?: string;
377
+ /** Default `'done'`; at most one `current`. */
378
+ readonly status?: 'done' | 'current' | 'pending' | 'error';
379
+ }
380
+ interface SpTimelineListProps extends CommonUiProps {
381
+ /** The events, in reading order. */
382
+ items: readonly TimelineListItem[];
383
+ /** Accessible name of the list. */
384
+ label?: string;
385
+ }
386
+ interface SpCollapseProps extends CommonUiProps {
387
+ /** One item open at a time, natively (`<details name>`). Default `false`. */
388
+ accordion?: boolean;
389
+ /** Default `true`. */
390
+ bordered?: boolean;
391
+ }
392
+ interface SpCollapseItemProps extends CommonUiProps {
393
+ title: string;
394
+ disabled?: boolean;
395
+ }
396
+ interface SpEmptyProps extends CommonUiProps {
397
+ /** Default `'No data'`. */
398
+ description?: string;
399
+ }
400
+ interface SpResultProps extends CommonUiProps {
401
+ /** Default `'info'`. */
402
+ status?: AlertKind;
403
+ /** The heading, at `headingLevel`. */
404
+ title: string;
405
+ /** A paragraph under the title. */
406
+ subtitle?: string;
407
+ /** Default `3`. */
408
+ headingLevel?: 2 | 3 | 4 | 5 | 6;
409
+ }
410
+ interface SpTextareaProps extends CommonUiProps {
411
+ /** Default `3`. */
412
+ rows?: number;
413
+ /** Hint shown while empty; not a substitute for the accessible name. */
414
+ placeholder?: string;
415
+ /** Accessible name, when no `<label for>` names the control. */
416
+ label?: string;
417
+ /** Help or error text under the control, referenced by `aria-describedby` (REQ-334). */
418
+ message?: string;
419
+ /** Sets `aria-invalid` and draws the exact ⚠ glyph (REQ-334). */
420
+ invalid?: boolean;
421
+ /** Not focusable and not submitted. */
422
+ disabled?: boolean;
423
+ /** Focusable and submitted, but not editable. */
424
+ readOnly?: boolean;
425
+ /** The native limit; the counter shows it with `showCount`. */
426
+ maxLength?: number;
427
+ /** Default `false`. */
428
+ showCount?: boolean;
429
+ /** Form field name; the native textarea submits under it (REQ-323). */
430
+ name?: string;
431
+ }
432
+ interface SpInputNumberProps extends CommonUiProps {
433
+ /** The lowest value; the value is clamped to it (REQ-485). */
434
+ min?: number;
435
+ /** The highest value; the value is clamped to it (REQ-485). */
436
+ max?: number;
437
+ /** Default `1`. */
438
+ step?: number;
439
+ /** Decimals. */
440
+ precision?: number;
441
+ /** Hint shown while empty; not a substitute for the accessible name. */
442
+ placeholder?: string;
443
+ /** Accessible name, when no `<label for>` names the control. */
444
+ label?: string;
445
+ /** Help or error text under the control, referenced by `aria-describedby` (REQ-334). */
446
+ message?: string;
447
+ /** Sets `aria-invalid` and draws the exact ⚠ glyph (REQ-334). */
448
+ invalid?: boolean;
449
+ /** Not focusable and not submitted; the steppers are disabled too. */
450
+ disabled?: boolean;
451
+ /** Focusable and submitted, but not editable. */
452
+ readOnly?: boolean;
453
+ /** Form field name; the native input submits under it (REQ-323). */
454
+ name?: string;
455
+ /** Default `'Decrease'`. */
456
+ decrementLabel?: string;
457
+ /** Default `'Increase'`. */
458
+ incrementLabel?: string;
459
+ }
460
+ interface SpModalProps extends CommonUiProps {
461
+ /** The heading, `${id}--title`, that names the dialog. */
462
+ title?: string;
463
+ /** A paragraph, `${id}--description`, that describes the dialog. */
464
+ description?: string;
465
+ /** Accessible name without a title (REQ-501). */
466
+ label?: string;
467
+ /** Default `true`. */
468
+ closable?: boolean;
469
+ /** Default `'Close'`. */
470
+ closeLabel?: string;
471
+ /** CSS length. Default `'520px'` (from `ui.css`). */
472
+ width?: string;
473
+ /** Escape and a backdrop click close it. Default `true`. */
474
+ dismissible?: boolean;
475
+ }
476
+ interface SpDrawerProps extends Omit<SpModalProps, 'width'> {
477
+ /** Default `'end'`. */
478
+ side?: 'start' | 'end' | 'top' | 'bottom';
479
+ /** CSS length across the side. Default `'380px'` (start/end) or `'320px'` (top/bottom). */
480
+ extent?: string;
481
+ /** `false` opens with `show()`. Default `true`. */
482
+ modal?: boolean;
483
+ }
484
+ interface SpPopoverProps extends CommonUiProps {
485
+ /** A heading that names the popover. */
486
+ title?: string;
487
+ /** Accessible name without a title. */
488
+ label?: string;
489
+ /** Default `'bottom'`. */
490
+ side?: 'top' | 'end' | 'bottom' | 'start';
491
+ /** Default `'center'`. */
492
+ align?: 'start' | 'center' | 'end';
493
+ /** Default `6`. */
494
+ offset?: number;
495
+ /** Default `false`. */
496
+ closable?: boolean;
497
+ /** Default `'Close'`. */
498
+ closeLabel?: string;
499
+ /** CSS length. Default `'320px'` (from `ui.css`). */
500
+ width?: string;
501
+ }
502
+ interface SpTooltipProps extends CommonUiProps {
503
+ /** The tooltip, the trigger's accessible description. */
504
+ text: string;
505
+ /** Default `'top'`. */
506
+ side?: 'top' | 'end' | 'bottom' | 'start';
507
+ /** Default `'center'`. */
508
+ align?: 'start' | 'center' | 'end';
509
+ /** Default `6`. */
510
+ offset?: number;
511
+ /** Default `300` ms. */
512
+ delay?: number;
513
+ }
514
+ interface SpSelectProps extends CommonUiProps {
515
+ /** A string is its own key and label. */
516
+ items: readonly (string | UiItem)[];
517
+ /** Default `'Select…'`. */
518
+ placeholder?: string;
519
+ /** Accessible name of the combobox. */
520
+ label: string;
521
+ /** Not focusable and not submitted. */
522
+ disabled?: boolean;
523
+ /** Sets `aria-required` on the combobox. */
524
+ required?: boolean;
525
+ /** Submits the key under this name, from a hidden input (REQ-323). */
526
+ name?: string;
527
+ /** CSS length. Default `'180px'` (from `ui.css`). */
528
+ width?: string;
529
+ }
530
+ type MenuEntry = {
531
+ readonly key: string;
532
+ readonly label: string;
533
+ readonly shortcut?: string;
534
+ readonly disabled?: boolean;
535
+ readonly danger?: boolean;
536
+ readonly type?: 'item';
537
+ } | {
538
+ readonly type: 'separator';
539
+ readonly key: string;
540
+ } | {
541
+ readonly type: 'label';
542
+ readonly key: string;
543
+ readonly label: string;
544
+ };
545
+ interface SpDropdownMenuProps extends CommonUiProps {
546
+ /** Items, separators and labels, in order. Keys are unique (REQ-325). */
547
+ items: readonly MenuEntry[];
548
+ /** The menu's accessible name and the trigger's text when no trigger slot. */
549
+ label: string;
550
+ /** Default `'bottom'`. */
551
+ side?: 'top' | 'end' | 'bottom' | 'start';
552
+ /** Default `'start'`. */
553
+ align?: 'start' | 'center' | 'end';
554
+ }
555
+ interface SpToastProps extends CommonUiProps {
556
+ /** The toast's first line. */
557
+ title: string;
558
+ /** A line under the title. */
559
+ description?: string;
560
+ /** Default `'info'`. */
561
+ kind?: AlertKind;
562
+ /** ms, at least 1000, or `Infinity`; the toaster's when omitted. */
563
+ duration?: number;
564
+ /** Default `'Dismiss'`. */
565
+ closeLabel?: string;
566
+ }
567
+ interface SpToasterProps extends CommonUiProps {
568
+ /** Default `'bottom-end'`. */
569
+ position?: 'bottom-end' | 'bottom-start' | 'top-end' | 'top-start';
570
+ /** Default `5000` ms. */
571
+ duration?: number;
572
+ /** Default `'Notifications'`. */
573
+ label?: string;
574
+ }
575
+
576
+ export { type UiFrameKind as $, type SpTableProps as A, type SpTextareaProps as B, type CommonUiProps as C, type SpTimelineListProps as D, type SpDrawerProps as E, type SpDropdownMenuProps as F, type SpModalProps as G, type SpPopoverProps as H, type SpSelectProps as I, type SpToastProps as J, type SpToasterProps as K, type SpTooltipProps as L, type MenuEntry as M, type AlertKind as N, type BreadcrumbItem as O, type DescriptionItem as P, type SpButtonProps as Q, type SpCardProps as R, type StepStatus as S, type SpCheckboxProps as T, type UiOrientation as U, type SpDividerProps as V, type SpInputProps as W, type SpSwitchProps as X, type TableColumn as Y, type TimelineListItem as Z, UI_FRAME_KINDS as _, type StepItem as a, type UiSize as a0, type UiToneLevel as a1, type UiVariant as a2, uiFrameOutline as a3, uiFrameVariant as a4, type UiItem as b, type SpRadioGroupProps as c, type SpRateProps as d, type SpSegmentedProps as e, type SpSliderProps as f, type SpTabsProps as g, type SpAlertProps as h, type SpBadgeProps as i, type SpProgressProps as j, type SpSkeletonProps as k, type SpStepsProps as l, type SpTagProps as m, type SpAvatarGroupProps as n, type SpAvatarProps as o, type SpBreadcrumbProps as p, type SpCollapseProps as q, type SpCollapseItemProps as r, type SpDescriptionsProps as s, type SpEmptyProps as t, type SpGlyphProps as u, type SpInputNumberProps as v, type SpPaginationProps as w, type SpResultProps as x, type SpStatisticProps as y, type SpSurfaceProps as z };
@@ -0,0 +1,57 @@
1
+ import { C as CommonUiProps } from './types-D5ys35fF.js';
2
+
3
+ /** A TimelineJS date: only `year` is required. */
4
+ interface TimelineDate {
5
+ readonly year: number;
6
+ readonly month?: number;
7
+ readonly day?: number;
8
+ readonly hour?: number;
9
+ readonly minute?: number;
10
+ readonly second?: number;
11
+ readonly display_date?: string;
12
+ }
13
+ /** A slide's text: `text` is HTML, as TimelineJS reads it. */
14
+ interface TimelineText {
15
+ readonly headline?: string;
16
+ readonly text?: string;
17
+ }
18
+ interface TimelineSlide {
19
+ readonly start_date: TimelineDate;
20
+ readonly end_date?: TimelineDate;
21
+ readonly text?: TimelineText;
22
+ readonly unique_id?: string;
23
+ readonly group?: string;
24
+ readonly display_date?: string;
25
+ readonly media?: Readonly<Record<string, unknown>>;
26
+ readonly background?: Readonly<Record<string, unknown>>;
27
+ }
28
+ interface TimelineEra {
29
+ readonly start_date: TimelineDate;
30
+ readonly end_date: TimelineDate;
31
+ readonly text?: TimelineText;
32
+ }
33
+ /** TimelineJS's JSON (API delta §2, the timeline). */
34
+ interface TimelineData {
35
+ readonly title?: Omit<TimelineSlide, 'start_date'> & {
36
+ readonly start_date?: TimelineDate;
37
+ };
38
+ readonly events: readonly TimelineSlide[];
39
+ readonly eras?: readonly TimelineEra[];
40
+ readonly scale?: 'human' | 'cosmological';
41
+ }
42
+ interface SpTimelineProps extends CommonUiProps {
43
+ /** TimelineJS's JSON: a `title` slide, the `events`, optional `eras` and `scale`. */
44
+ data: TimelineData;
45
+ /** TimelineJS options; `font` and `theme` are ignored, the skin sets both. */
46
+ options?: Readonly<Record<string, unknown>>;
47
+ /** A plain CSS length. Default `'600px'`. */
48
+ height?: string;
49
+ /** Lays the ground's frames and tones on TimelineJS's pieces (REQ-512). Default `true`. */
50
+ inkedFrames?: boolean;
51
+ /** Frames the whole timeline as a card. Default `true`. */
52
+ card?: boolean;
53
+ /** The region's accessible name; the title's headline when omitted. */
54
+ label?: string;
55
+ }
56
+
57
+ export type { SpTimelineProps as S, TimelineData as T, TimelineDate as a, TimelineEra as b, TimelineSlide as c, TimelineText as d };
@@ -1,3 +1,7 @@
1
+ import { T as TimelineData } from './types-DHBJ0PzV.js';
2
+ import './types-D5ys35fF.js';
3
+ import './props-BZ9CcrGv.js';
4
+
1
5
  /**
2
6
  * The props of one demo state: the component's own props (`Sp<Name>Props`), plus `value` for a
3
7
  * value component and `content` for the text it holds. Plain data; each adapter binds it.
@@ -9,9 +13,16 @@ type UiDemoProps = Readonly<Record<string, unknown> & {
9
13
  type UiDemos = Readonly<Record<string, Readonly<Record<string, UiDemoProps>>>>;
10
14
  /**
11
15
  * The reference states of the 17 components, drawn from the concept for `0.3.0` (feature-002
12
- * `concept.png`): one per declared state of `UI_COMPONENTS` (45), shared by the fixtures, the
13
- * example apps' UI page and the documentation. Frozen (I-9). Cards hold text only (C-5).
16
+ * `concept.png`), then of the 21 of feature-004: one per declared state of `UI_COMPONENTS` (45 +
17
+ * 35), shared by the fixtures, the example apps' pages and the documentation. Frozen (I-9). Cards
18
+ * hold text only (C-5). Overlays are demoed open, with `trigger` the text of their trigger button.
14
19
  */
15
20
  declare const UI_DEMOS: UiDemos;
16
21
 
17
- export { UI_DEMOS, type UiDemoProps, type UiDemos };
22
+ /**
23
+ * The timeline page's data (Data Model delta §4): the life of a silverpoint drawing in TimelineJS
24
+ * JSON, eight events and two eras, no external media. Deep-frozen (I-9).
25
+ */
26
+ declare const TIMELINE_DEMO: TimelineData;
27
+
28
+ export { TIMELINE_DEMO, UI_DEMOS, type UiDemoProps, type UiDemos };