@wizeworks/silicaui-mcp 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/data/behaviors.json +77 -1
- package/dist/data/classes.json +105 -1
- package/dist/data/components.json +7821 -2630
- package/dist/server.js +24 -11
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
package/dist/data/behaviors.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"type": "menu",
|
|
16
|
-
"description": "`menu` — a
|
|
16
|
+
"description": "`menu` — a triggered popup (dropdown/mega-menu/context-menu) of `item` parts: `params.trigger` (default `\"click\"`) can be `\"context\"` (right-click — ContextMenu; positions the panel at the pointer instead of the trigger rect). Escape and outside-click dismiss; Up/Down/Home/End rove focus across items while open. This is the vanilla counterpart to @wizeworks/silicaui-react's Base-UI-backed `DropdownMenu`/`ContextMenu` — same authored markers, same `.dropdown*` classes, no React required."
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
"type": "marquee",
|
|
@@ -35,6 +35,10 @@
|
|
|
35
35
|
"type": "toc",
|
|
36
36
|
"description": "Shared implementation behind `scrollspy` and `toc`: `spy` parts are links (`href=\"#id\"`) tracked against the section they point to; the in-view one gets `aria-current=\"true\"` for a nav/TOC to style. `toc` differs only in its default intersection threshold (a smaller sliver of a heading counts as \"current\" for a table of contents than a full scrollspy section does)."
|
|
37
37
|
},
|
|
38
|
+
{
|
|
39
|
+
"type": "form",
|
|
40
|
+
"description": "`form` — makes an authored `<form>` genuinely functional on publish (architecture §8, the action primitive). On submit it: 1. VALIDATES natively (`checkValidity()` — required, type=email, pattern, min/max/step, maxlength come for free) and, if invalid, blocks the submit, marks each failing control `aria-invalid`, and surfaces the browser's own messages via `reportValidity()`. 2. If valid and a host `onAction` was provided, DISPATCHES a structured `{ kind: \"submit\", values }` payload (values gathered with native FormData semantics — checkboxes/radios/multi-selects handled) to the action `ref` read from the form's `data-sui-action`. The default is prevented; while the dispatch promise is pending the form is `aria-busy`, its submit control is disabled, and `data-sui-state` walks idle → submitting → success | error. 3. If valid with NO `onAction` (and not preview), it does nothing and lets the browser submit natively — progressive enhancement, so a plain server-posted form still works. In `preview` mode (the builder canvas) a valid submit is prevented and never dispatched, so editing a form never fires a real host action. Field PREFILL: at hydrate, any control carrying `data-sui-bind` is seeded from `opts.resolve(ref)` when a resolver is supplied."
|
|
41
|
+
},
|
|
38
42
|
{
|
|
39
43
|
"type": "sidebar",
|
|
40
44
|
"description": "`sidebar` — a persistent nav panel that collapses IN PLACE to an icon rail (unlike `disclosure`, the root is never hidden — only its `data-collapsed` state changes, and CSS alone handles the width/label transition). Any number of `trigger` parts nested inside the root toggle it; `params.defaultCollapsed` seeds the initial state."
|
|
@@ -42,5 +46,77 @@
|
|
|
42
46
|
{
|
|
43
47
|
"type": "selection-list",
|
|
44
48
|
"description": "`selection-list` — a listbox of `item` parts (single- or multi-select, via `params.multiple`). Click (or Enter/Space on the focused item) toggles selection; the vanilla counterpart to @wizeworks/silicaui-react's `SelectionList`. Roving tabindex + ↑/↓/Home/End mirror the React component's keyboard behavior."
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"type": "modal",
|
|
52
|
+
"description": "`modal` — a portal-free dialog: `trigger`(s) open a `panel` behind an optional `backdrop`; `close` parts and Escape always close it; `params.dismissible` (default `true`) also lets a backdrop click close it (AlertDialog sets this `false` — its backdrop is inert, per the ARIA alert-dialog pattern, Escape still cancels). Covers Dialog/Drawer/AlertDialog directly; Lightbox and CommandPalette layer optional extra parts on the same root rather than getting their own type (see below)."
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"type": "popover",
|
|
56
|
+
"description": "`popover` — one or more `trigger`/`panel` pairs (positional, like `disclosure`), anchored via runtime-computed position (same precedent as `carousel`'s `track.style.transform` — this is live-DOM positioning, not an authored inline style). `params.trigger`: `\"click\"` (default) | `\"hover\"` | `\"context\"` (right-click, positions at the pointer instead of the trigger rect). `params.single`: closes other pairs under the same root when one opens (Menubar/NavigationMenu's \"only one menu open\"). Covers Popover, Tooltip, PreviewCard, ContextMenu, Menubar, NavigationMenu — each is this one behavior with different params, not a broken reuse: the real differences (trigger event, anchor point, single-open grouping) are all genuine parameters, not papered-over mismatches."
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"type": "combobox",
|
|
60
|
+
"description": "`combobox` — a text `input` + a `panel` of `item` options, filtered live. `params.mode`: `\"select\"` (default — commits an item's value into the input, like Combobox), `\"freetext\"` (Autocomplete — Enter with nothing highlighted commits the raw typed text), `\"multiple\"` (MultiSelect — commits remove the item from the remaining list; Backspace on an empty input pops the last commit). One handler, mode branches, mirroring how `selection-list` handles `params.multiple` in one file rather than three."
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"type": "date-segment",
|
|
64
|
+
"description": "`date-segment` — `role=spinbutton` `segment` divs (non-form-associated — value lives only in `aria-valuenow`), each configured via `data-role` (`month`/`day`/`year`/`hour`/`minute`/`second`/`period`), `data-min`, `data-max`, `data-digits`, and an optional `data-cycle` JSON array (AM/PM). Ports `lib/date-time-segment.tsx`'s digit-buffer commit rule verbatim: a typed digit commits once the buffer hits `digits` length OR one more digit could no longer stay ≤ max. The day segment's max is recomputed live from sibling month/year segments (real calendar-aware clamping, not a static 31). Covers DateInput/DateTimeInput/TimeInput; DateRangeInput is two of these roots side by side (a shared `-` separator needs no behavior of its own)."
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"type": "pin-input",
|
|
68
|
+
"description": "`pin-input` — real single-char `<input>` `cell`s (index-based, native value/maxlength do the work), unlike `date-segment`'s buffer-accumulate model on non-form-associated divs. Each keystroke is a whole commit with immediate auto-advance; Backspace-on-empty steps back; paste distributes characters starting at the focused cell."
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"type": "calendar",
|
|
72
|
+
"description": "Parses a `YYYY-MM-DD` string as a LOCAL date, not `new Date(iso)`'s UTC-midnight parse — the latter shifts a day backward in any timezone behind UTC once `.getDate()` reads it back in local time (a real bug caught by the jsdom interaction test, not the structural one)."
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"type": "tree",
|
|
76
|
+
"description": "`tree` — an ARIA tree (`role=treeitem` `node`s, nested `role=group` containers). No `ownParts`-style single-root scoping here: nodes at any depth belong to the SAME tree, unlike a carousel's slides, so this walks `querySelectorAll` directly. Roving tabindex is recomputed against the currently-VISIBLE set (collapsed branches are skipped) on every move, since children only exist in the accessibility tree while expanded."
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"type": "wizard",
|
|
80
|
+
"description": "`wizard` — `step`/`panel` pairs like `tabs`, but with real state-machine rules `tabs` doesn't have: `params.linear` (default `true`) only allows clicking BACK to a completed step, never ahead; a `next`/`prev` footer pair drives forward/back, and `next` relabels to \"Finish\" on the last step. Host-driven validation gates progress via `aria-disabled` on the `next` part (the author/host toggles it — this behavior only reads it, it doesn't invent its own validation)."
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"type": "number-field",
|
|
84
|
+
"description": "`number-field` — a native `<input type=\"number\">` plus `increment`/ `decrement` step buttons. The CSS here has no Base-UI-only selectors (just `:disabled`/`:hover`), so the input itself is the real source of truth; the buttons just call `stepUp()`/`stepDown()` and fire the events a plain keyboard-driven change would."
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"type": "toggle-group",
|
|
88
|
+
"description": "`toggle-group` — a toolbar of toggle buttons (`item` parts), not a listbox (distinct ARIA pattern from `selection-list`: `aria-pressed`/`data-pressed` on real buttons, not `aria-selected` on listbox options). `params.multiple` allows several pressed at once (default: single, pressing one un-presses the rest); `params.orientation` (`\"horizontal\"` default | `\"vertical\"`) picks which arrow keys rove focus, matching `tabs`' convention."
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"type": "scroll-area",
|
|
92
|
+
"description": "`scroll-area` — a real `overflow:auto` `track` (the CSS hides its native scrollbar) with a custom `thumb` whose size/position is computed from the viewport/content ratio on `scroll` + `ResizeObserver`. This can't be a pure-CSS `scrollbar-gutter` trick — the CSS expects an addressable thumb element to size/position, which only JS can drive."
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"type": "overflow-list",
|
|
96
|
+
"description": "`overflow-list` — real `item`s reparent into a hidden `panel` (behind a `trigger` showing \"+N\") once they no longer fit their row, then reparent back once they do — the SAME elements move, so their event listeners and content survive (no clone-and-lose-interactivity). `params.maxVisible` forces a fixed count instead of measuring (used when real layout isn't available — e.g. under jsdom, or a host that wants deterministic wrapping)."
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"type": "dropzone",
|
|
100
|
+
"description": "`dropzone` — a drag-counted drop target (dragleave fires on every child hover, so a depth counter is required, not optional) plus a hidden file `input`. `params.accept`/`params.maxSize` filter; matched files are announced via a `sui:file` CustomEvent per file. When a `list` part is present (FileUpload, not bare Dropzone), each accepted file also gets a managed row appended there (thumbnail for images, name, remove button) — this is the ONE place a behavior owns real create-your-own-markup state, same precedent as `carousel` building its own track/dots."
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"type": "slider",
|
|
104
|
+
"description": "`slider` — one or two `thumb`s on a `track`. Base UI's `.slider-track`/ `.slider-indicator`/`.slider-thumb` are three addressable nodes whose position Base UI sets via inline styles from pointer math — a bare `<input type=range>` has no such nodes, so this rebuilds that geometry directly (pointer drag + full keyboard), same runtime-`.style` precedent as `carousel`. Two thumbs = a range slider (`--slider-range-start/-end` custom props for the fill bar CSS to read)."
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"type": "switch",
|
|
108
|
+
"description": "`switch` — the root itself is a `role=switch` element (no parts). Silica's `.switch` CSS keys off `[data-checked]` (Base UI's synthetic attribute in React, ported verbatim here) rather than `:checked`, since the visual pill needs a real element to key selectors off, unlike `.toggle` which stays a plain native checkbox. A hidden `<input type=\"checkbox\">` inside carries the value for form submission, matching Base UI's own hidden-input pattern."
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"type": "rating",
|
|
112
|
+
"description": "`rating` — a `role=radio` row of `item` stars. Not Base UI-backed in React either (plain JSX-set `data-filled`), so this ports near 1:1: click sets the value, hover previews it, and a hidden `<input>` (if present) carries the value for form submission."
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"type": "theme-toggle",
|
|
116
|
+
"description": "`theme-toggle` — the root itself is the trigger (a button): each click cycles through `params.themes` (default `[\"light\", \"dark\"]`), wrapping around. Thin wiring over the existing `setTheme`/`getTheme` primitives — there was no new state-machine to build here, just a registration."
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"type": "phone-input",
|
|
120
|
+
"description": "`phone-input` — a `country` `<select>` (options carry `data-dial`) joined with a digits `input`; a hidden input carries the combined `+{dial}{digits}` value for form submission. No React-only mechanism was involved in the original — the country list is plain static data, ported verbatim into the `PhoneInput` macro's expansion (see `component.ts`)."
|
|
45
121
|
}
|
|
46
122
|
]
|
package/dist/data/classes.json
CHANGED
|
@@ -6,9 +6,13 @@
|
|
|
6
6
|
"alert",
|
|
7
7
|
"alert-accent",
|
|
8
8
|
"alert-actions",
|
|
9
|
+
"alert-banner",
|
|
10
|
+
"alert-close",
|
|
9
11
|
"alert-content",
|
|
10
12
|
"alert-dash",
|
|
11
13
|
"alert-description",
|
|
14
|
+
"alert-dismiss",
|
|
15
|
+
"alert-dismiss-inner",
|
|
12
16
|
"alert-error",
|
|
13
17
|
"alert-info",
|
|
14
18
|
"alert-lg",
|
|
@@ -25,6 +29,9 @@
|
|
|
25
29
|
"alert-xl",
|
|
26
30
|
"alert-xs"
|
|
27
31
|
],
|
|
32
|
+
"app-shell": [
|
|
33
|
+
"primary"
|
|
34
|
+
],
|
|
28
35
|
"avatar": [
|
|
29
36
|
"avatar",
|
|
30
37
|
"avatar-accent",
|
|
@@ -128,6 +135,9 @@
|
|
|
128
135
|
"chart": [
|
|
129
136
|
"primary"
|
|
130
137
|
],
|
|
138
|
+
"chat-suite": [
|
|
139
|
+
"primary"
|
|
140
|
+
],
|
|
131
141
|
"chat": [
|
|
132
142
|
"chat",
|
|
133
143
|
"chat-bubble",
|
|
@@ -245,6 +255,9 @@
|
|
|
245
255
|
"file-input": [
|
|
246
256
|
"primary"
|
|
247
257
|
],
|
|
258
|
+
"file-upload": [
|
|
259
|
+
"primary"
|
|
260
|
+
],
|
|
248
261
|
"filter": [
|
|
249
262
|
"filter",
|
|
250
263
|
"filter-accent",
|
|
@@ -267,9 +280,14 @@
|
|
|
267
280
|
"indicator": [
|
|
268
281
|
"primary"
|
|
269
282
|
],
|
|
283
|
+
"input-group": [
|
|
284
|
+
"primary"
|
|
285
|
+
],
|
|
270
286
|
"input": [
|
|
271
287
|
"input",
|
|
272
288
|
"input-accent",
|
|
289
|
+
"input-affix-end",
|
|
290
|
+
"input-affix-start",
|
|
273
291
|
"input-error",
|
|
274
292
|
"input-info",
|
|
275
293
|
"input-lg",
|
|
@@ -292,6 +310,9 @@
|
|
|
292
310
|
"label": [
|
|
293
311
|
"primary"
|
|
294
312
|
],
|
|
313
|
+
"lightbox": [
|
|
314
|
+
"primary"
|
|
315
|
+
],
|
|
295
316
|
"link": [
|
|
296
317
|
"link",
|
|
297
318
|
"link-accent",
|
|
@@ -319,6 +340,9 @@
|
|
|
319
340
|
"menubar": [
|
|
320
341
|
"primary"
|
|
321
342
|
],
|
|
343
|
+
"metadata-list": [
|
|
344
|
+
"primary"
|
|
345
|
+
],
|
|
322
346
|
"meter": [
|
|
323
347
|
"meter",
|
|
324
348
|
"meter-accent",
|
|
@@ -342,6 +366,25 @@
|
|
|
342
366
|
"mockup": [
|
|
343
367
|
"primary"
|
|
344
368
|
],
|
|
369
|
+
"multi-select": [
|
|
370
|
+
"multi-select",
|
|
371
|
+
"multi-select-accent",
|
|
372
|
+
"multi-select-chip",
|
|
373
|
+
"multi-select-chip-remove",
|
|
374
|
+
"multi-select-chips",
|
|
375
|
+
"multi-select-clear",
|
|
376
|
+
"multi-select-error",
|
|
377
|
+
"multi-select-info",
|
|
378
|
+
"multi-select-input",
|
|
379
|
+
"multi-select-lg",
|
|
380
|
+
"multi-select-neutral",
|
|
381
|
+
"multi-select-primary",
|
|
382
|
+
"multi-select-secondary",
|
|
383
|
+
"multi-select-sm",
|
|
384
|
+
"multi-select-success",
|
|
385
|
+
"multi-select-trigger",
|
|
386
|
+
"multi-select-warning"
|
|
387
|
+
],
|
|
345
388
|
"navbar": [
|
|
346
389
|
"primary"
|
|
347
390
|
],
|
|
@@ -351,6 +394,15 @@
|
|
|
351
394
|
"number-field": [
|
|
352
395
|
"primary"
|
|
353
396
|
],
|
|
397
|
+
"outline": [
|
|
398
|
+
"primary"
|
|
399
|
+
],
|
|
400
|
+
"overflow-list": [
|
|
401
|
+
"primary"
|
|
402
|
+
],
|
|
403
|
+
"overlay": [
|
|
404
|
+
"primary"
|
|
405
|
+
],
|
|
354
406
|
"pagination": [
|
|
355
407
|
"pagination",
|
|
356
408
|
"pagination-accent",
|
|
@@ -369,9 +421,32 @@
|
|
|
369
421
|
"pagination-warning",
|
|
370
422
|
"pagination-xs"
|
|
371
423
|
],
|
|
424
|
+
"phone-input": [
|
|
425
|
+
"primary"
|
|
426
|
+
],
|
|
427
|
+
"pin-input": [
|
|
428
|
+
"pin-input",
|
|
429
|
+
"pin-input-cell",
|
|
430
|
+
"pin-input-cell-accent",
|
|
431
|
+
"pin-input-cell-error",
|
|
432
|
+
"pin-input-cell-info",
|
|
433
|
+
"pin-input-cell-lg",
|
|
434
|
+
"pin-input-cell-md",
|
|
435
|
+
"pin-input-cell-neutral",
|
|
436
|
+
"pin-input-cell-primary",
|
|
437
|
+
"pin-input-cell-secondary",
|
|
438
|
+
"pin-input-cell-sm",
|
|
439
|
+
"pin-input-cell-success",
|
|
440
|
+
"pin-input-cell-warning",
|
|
441
|
+
"pin-input-cell-xl",
|
|
442
|
+
"pin-input-cell-xs"
|
|
443
|
+
],
|
|
372
444
|
"popover": [
|
|
373
445
|
"primary"
|
|
374
446
|
],
|
|
447
|
+
"power-search": [
|
|
448
|
+
"primary"
|
|
449
|
+
],
|
|
375
450
|
"preview-card": [
|
|
376
451
|
"primary"
|
|
377
452
|
],
|
|
@@ -382,6 +457,8 @@
|
|
|
382
457
|
"progress-error",
|
|
383
458
|
"progress-indeterminate",
|
|
384
459
|
"progress-info",
|
|
460
|
+
"progress-label",
|
|
461
|
+
"progress-label-row",
|
|
385
462
|
"progress-lg",
|
|
386
463
|
"progress-md",
|
|
387
464
|
"progress-neutral",
|
|
@@ -389,7 +466,9 @@
|
|
|
389
466
|
"progress-secondary",
|
|
390
467
|
"progress-sm",
|
|
391
468
|
"progress-success",
|
|
469
|
+
"progress-value",
|
|
392
470
|
"progress-warning",
|
|
471
|
+
"progress-wrapper",
|
|
393
472
|
"progress-xl",
|
|
394
473
|
"progress-xs"
|
|
395
474
|
],
|
|
@@ -462,6 +541,23 @@
|
|
|
462
541
|
"scroll-area": [
|
|
463
542
|
"primary"
|
|
464
543
|
],
|
|
544
|
+
"segment-field": [
|
|
545
|
+
"date-range-input",
|
|
546
|
+
"date-range-input-sep",
|
|
547
|
+
"segment-field",
|
|
548
|
+
"segment-field-accent",
|
|
549
|
+
"segment-field-error",
|
|
550
|
+
"segment-field-info",
|
|
551
|
+
"segment-field-lg",
|
|
552
|
+
"segment-field-literal",
|
|
553
|
+
"segment-field-neutral",
|
|
554
|
+
"segment-field-primary",
|
|
555
|
+
"segment-field-secondary",
|
|
556
|
+
"segment-field-segment",
|
|
557
|
+
"segment-field-sm",
|
|
558
|
+
"segment-field-success",
|
|
559
|
+
"segment-field-warning"
|
|
560
|
+
],
|
|
465
561
|
"select-menu": [
|
|
466
562
|
"primary"
|
|
467
563
|
],
|
|
@@ -641,9 +737,17 @@
|
|
|
641
737
|
"timeline": [
|
|
642
738
|
"primary"
|
|
643
739
|
],
|
|
644
|
-
"
|
|
740
|
+
"timestamp": [
|
|
645
741
|
"primary"
|
|
646
742
|
],
|
|
743
|
+
"toast": [
|
|
744
|
+
"toast",
|
|
745
|
+
"toast-close",
|
|
746
|
+
"toast-content",
|
|
747
|
+
"toast-description",
|
|
748
|
+
"toast-title",
|
|
749
|
+
"toast-viewport"
|
|
750
|
+
],
|
|
647
751
|
"toggle-group": [
|
|
648
752
|
"primary"
|
|
649
753
|
],
|