@loworbitstudio/visor 1.30.0 → 1.34.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/CHANGELOG.json +19 -1
- package/dist/index.js +298 -5
- package/dist/registry.json +116 -39
- package/dist/visor-manifest.json +625 -20
- package/package.json +2 -2
package/dist/CHANGELOG.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "0.4.0",
|
|
3
|
-
"generated_at": "2026-10-
|
|
3
|
+
"generated_at": "2026-10-04T04:36:38.223Z",
|
|
4
4
|
"components": {
|
|
5
5
|
"accessibility-specimen": {
|
|
6
6
|
"changeType": "current",
|
|
@@ -14,6 +14,12 @@
|
|
|
14
14
|
"breakingChange": false,
|
|
15
15
|
"migrationNote": null
|
|
16
16
|
},
|
|
17
|
+
"action-row": {
|
|
18
|
+
"changeType": "current",
|
|
19
|
+
"files": [],
|
|
20
|
+
"breakingChange": false,
|
|
21
|
+
"migrationNote": null
|
|
22
|
+
},
|
|
17
23
|
"activity-feed": {
|
|
18
24
|
"changeType": "current",
|
|
19
25
|
"files": [],
|
|
@@ -554,6 +560,12 @@
|
|
|
554
560
|
"breakingChange": false,
|
|
555
561
|
"migrationNote": null
|
|
556
562
|
},
|
|
563
|
+
"segmented-control": {
|
|
564
|
+
"changeType": "current",
|
|
565
|
+
"files": [],
|
|
566
|
+
"breakingChange": false,
|
|
567
|
+
"migrationNote": null
|
|
568
|
+
},
|
|
557
569
|
"segmented-progress": {
|
|
558
570
|
"changeType": "current",
|
|
559
571
|
"files": [],
|
|
@@ -746,6 +758,12 @@
|
|
|
746
758
|
"breakingChange": false,
|
|
747
759
|
"migrationNote": null
|
|
748
760
|
},
|
|
761
|
+
"time-picker": {
|
|
762
|
+
"changeType": "current",
|
|
763
|
+
"files": [],
|
|
764
|
+
"breakingChange": false,
|
|
765
|
+
"migrationNote": null
|
|
766
|
+
},
|
|
749
767
|
"timeline": {
|
|
750
768
|
"changeType": "current",
|
|
751
769
|
"files": [],
|
package/dist/index.js
CHANGED
|
@@ -8802,6 +8802,50 @@ var FIXTURES = {
|
|
|
8802
8802
|
])],
|
|
8803
8803
|
};
|
|
8804
8804
|
})()`
|
|
8805
|
+
},
|
|
8806
|
+
// VI-667: bottom-sheet presentation, with the drag handle and a leading back action.
|
|
8807
|
+
sheet: {
|
|
8808
|
+
export: "Dialog",
|
|
8809
|
+
props: `(function () {
|
|
8810
|
+
var h = React.createElement;
|
|
8811
|
+
return {
|
|
8812
|
+
open: true,
|
|
8813
|
+
presentation: "sheet",
|
|
8814
|
+
children: [h(__mod.DialogTrigger, { key: "tr", asChild: true }, h("button", { type: "button" }, "Open")), h(__mod.DialogContent, { key: "c", showHandle: true }, [
|
|
8815
|
+
h(__mod.DialogHeader, { key: "h", back: h(__mod.DialogBack, null) }, [
|
|
8816
|
+
h(__mod.DialogTitle, { key: "t" }, "Set start time"),
|
|
8817
|
+
h(__mod.DialogDescription, { key: "d" }, "Doors open one hour earlier."),
|
|
8818
|
+
]),
|
|
8819
|
+
h("input", { key: "i", "aria-label": "Start", defaultValue: "21:00", style: { width: "100%", boxSizing: "border-box", padding: "8px" } }),
|
|
8820
|
+
h(__mod.DialogFooter, { key: "f" }, h("button", { type: "button" }, "Save")),
|
|
8821
|
+
])],
|
|
8822
|
+
};
|
|
8823
|
+
})()`
|
|
8824
|
+
},
|
|
8825
|
+
// VI-667: dialog scoped to one pane (#root) under a scrim; the page outside it is untouched.
|
|
8826
|
+
scoped: {
|
|
8827
|
+
export: "Dialog",
|
|
8828
|
+
props: `(function () {
|
|
8829
|
+
var h = React.createElement;
|
|
8830
|
+
var pane = document.getElementById("root");
|
|
8831
|
+
pane.style.minHeight = "420px";
|
|
8832
|
+
pane.style.position = "relative";
|
|
8833
|
+
pane.style.background = "var(--surface-card, #f3f4f6)";
|
|
8834
|
+
return {
|
|
8835
|
+
open: true,
|
|
8836
|
+
container: pane,
|
|
8837
|
+
children: [
|
|
8838
|
+
h("p", { key: "p", style: { margin: 0, padding: "16px" } }, "Editor pane: stays visible behind the scrim."),
|
|
8839
|
+
h(__mod.DialogContent, { key: "c" }, [
|
|
8840
|
+
h(__mod.DialogHeader, { key: "h", back: h(__mod.DialogBack, null) }, [
|
|
8841
|
+
h(__mod.DialogTitle, { key: "t" }, "Sign back in"),
|
|
8842
|
+
h(__mod.DialogDescription, { key: "d" }, "Your session timed out."),
|
|
8843
|
+
]),
|
|
8844
|
+
h(__mod.DialogFooter, { key: "f" }, h("button", { type: "button" }, "Continue")),
|
|
8845
|
+
]),
|
|
8846
|
+
],
|
|
8847
|
+
};
|
|
8848
|
+
})()`
|
|
8805
8849
|
}
|
|
8806
8850
|
},
|
|
8807
8851
|
popover: {
|
|
@@ -8838,6 +8882,49 @@ var FIXTURES = {
|
|
|
8838
8882
|
})()`
|
|
8839
8883
|
}
|
|
8840
8884
|
},
|
|
8885
|
+
// VI-669: a block, resolved from blocks/. July 2026 with a stay crossing a week
|
|
8886
|
+
// edge, three overlapping spans plus a fourth ("+1"), a colour-token event, a
|
|
8887
|
+
// day mark, and the week detail slot open under the selected day.
|
|
8888
|
+
"month-calendar": {
|
|
8889
|
+
default: {
|
|
8890
|
+
export: "MonthCalendar",
|
|
8891
|
+
props: `(function () {
|
|
8892
|
+
var h = React.createElement;
|
|
8893
|
+
return {
|
|
8894
|
+
month: "2026-07-01",
|
|
8895
|
+
today: "2026-07-09",
|
|
8896
|
+
selectedDate: "2026-07-15",
|
|
8897
|
+
weekStartsOn: 1,
|
|
8898
|
+
onSelectDate: function () {},
|
|
8899
|
+
events: [
|
|
8900
|
+
{ id: "berlin", start: "2026-07-02", end: "2026-07-05", title: "Berlin stay", series: 1 },
|
|
8901
|
+
{ id: "lisbon", start: "2026-07-13", end: "2026-07-19", title: "Lisbon run", color: "--chart-3" },
|
|
8902
|
+
{ id: "paris", start: "2026-07-20", end: "2026-07-22", title: "Paris", series: 4 },
|
|
8903
|
+
{ id: "a", start: "2026-07-20", end: "2026-07-21", title: "Studio hold", series: 2 },
|
|
8904
|
+
{ id: "b", start: "2026-07-20", end: "2026-07-24", title: "Press week", series: 5 },
|
|
8905
|
+
{ id: "c", start: "2026-07-21", end: "2026-07-22", title: "Fourth lane", series: 3 },
|
|
8906
|
+
{ id: "gig", date: "2026-07-09", title: "Soundcheck", status: "success", series: 2 },
|
|
8907
|
+
],
|
|
8908
|
+
renderDayMark: function (day) { return day.date === "2026-07-17" ? "3" : null; },
|
|
8909
|
+
renderWeekDetail: function (week) {
|
|
8910
|
+
return h("div", null, h("strong", null, "Week of " + week.start), h("p", { style: { margin: 0 } }, "Day sheet content sits here."));
|
|
8911
|
+
},
|
|
8912
|
+
};
|
|
8913
|
+
})()`
|
|
8914
|
+
},
|
|
8915
|
+
overlap: {
|
|
8916
|
+
export: "MonthCalendar",
|
|
8917
|
+
props: `{
|
|
8918
|
+
month: "2026-07-01",
|
|
8919
|
+
events: [
|
|
8920
|
+
{ id: "a", start: "2026-07-07", end: "2026-07-11", title: "Stay A", series: 1 },
|
|
8921
|
+
{ id: "b", start: "2026-07-08", end: "2026-07-12", title: "Stay B", series: 2 },
|
|
8922
|
+
{ id: "c", start: "2026-07-09", end: "2026-07-10", title: "Stay C", series: 3 },
|
|
8923
|
+
{ id: "d", start: "2026-07-09", end: "2026-07-10", title: "Stay D", series: 4 },
|
|
8924
|
+
],
|
|
8925
|
+
}`
|
|
8926
|
+
}
|
|
8927
|
+
},
|
|
8841
8928
|
"stat-card": {
|
|
8842
8929
|
default: {
|
|
8843
8930
|
export: "StatCard",
|
|
@@ -9027,7 +9114,44 @@ var FIXTURES = {
|
|
|
9027
9114
|
// the edge tokens leave a default theme unchanged.
|
|
9028
9115
|
input: {
|
|
9029
9116
|
default: { export: "Input", interactiveTarget: "input", props: `{ placeholder: "Email address" }` },
|
|
9030
|
-
invalid: { export: "Input", interactiveTarget: "input", props: `{ defaultValue: "not-an-email", "aria-invalid": true }` }
|
|
9117
|
+
invalid: { export: "Input", interactiveTarget: "input", props: `{ defaultValue: "not-an-email", "aria-invalid": true }` },
|
|
9118
|
+
// VI-662: fixed text inside the well, beside the value.
|
|
9119
|
+
suffix: { export: "Input", interactiveTarget: "input", props: `{ "aria-label": "Address", defaultValue: "lowtide", suffix: ".epk.pro" }` },
|
|
9120
|
+
prefix: { export: "Input", interactiveTarget: "input", props: `{ "aria-label": "Amount", inputMode: "decimal", defaultValue: "1,250.00", prefix: "\u20AC" }` },
|
|
9121
|
+
// Descenders and accents: a native input must never clip them (text-box trim does).
|
|
9122
|
+
descenders: { export: "Input", interactiveTarget: "input", props: `{ "aria-label": "Amount", defaultValue: "Typography jpq \xC9\xC5\xD1", prefix: "\u20AC", suffix: "jpy" }` },
|
|
9123
|
+
both: { export: "Input", interactiveTarget: "input", props: `{ "aria-label": "Rate", inputMode: "decimal", defaultValue: "85", prefix: "$", suffix: "/ hr" }` }
|
|
9124
|
+
},
|
|
9125
|
+
// VI-671: a rule, a word and a rule.
|
|
9126
|
+
separator: {
|
|
9127
|
+
default: { export: "Separator", props: `{ style: { width: 360 } }` },
|
|
9128
|
+
labelled: { export: "Separator", props: `{ label: "or", style: { width: 360 } }` }
|
|
9129
|
+
},
|
|
9130
|
+
"number-input": {
|
|
9131
|
+
default: { export: "NumberInput", interactiveTarget: "input", props: `{ "aria-label": "Quantity", defaultValue: 4, min: 0, max: 99 }` },
|
|
9132
|
+
prefix: { export: "NumberInput", interactiveTarget: "input", props: `{ "aria-label": "Fee", defaultValue: 150, prefix: "$" }` },
|
|
9133
|
+
descenders: { export: "NumberInput", interactiveTarget: "input", props: `{ "aria-label": "Fee", defaultValue: 1299, prefix: "\u20AC", suffix: "jpy" }` },
|
|
9134
|
+
suffix: { export: "NumberInput", interactiveTarget: "input", props: `{ "aria-label": "Hours", defaultValue: 2, suffix: "h" }` }
|
|
9135
|
+
},
|
|
9136
|
+
// VI-654: the calendar renders open on the month of `value` (November), not the
|
|
9137
|
+
// device's month; `align-end` shows the popover right-aligned to the trigger.
|
|
9138
|
+
"date-picker": {
|
|
9139
|
+
default: { export: "DatePicker", interactiveTarget: "button", props: `{ value: new Date(2026, 10, 14), defaultOpen: true }` },
|
|
9140
|
+
"align-end": { export: "DatePicker", interactiveTarget: "button", props: `{ value: new Date(2026, 10, 14), defaultOpen: true, align: "end", className: "w-full" }` }
|
|
9141
|
+
},
|
|
9142
|
+
// VI-670: invalid keeps the digits; trailing holds a working indicator or Resend.
|
|
9143
|
+
"otp-input": {
|
|
9144
|
+
default: { export: "OTPInput", interactiveTarget: "input", props: `{ value: "428" }` },
|
|
9145
|
+
invalid: { export: "OTPInput", interactiveTarget: "input", props: `{ value: "428519", invalid: true, errorMessage: "That code didn't work. Check it and try again." }` },
|
|
9146
|
+
trailing: { export: "OTPInput", interactiveTarget: "input", props: `{ value: "428519", trailing: React.createElement("button", { type: "button" }, "Resend") }` }
|
|
9147
|
+
},
|
|
9148
|
+
// VI-624: `default` is the closed field; the popover fixtures render open so the
|
|
9149
|
+
// two-column (24-hour) and three-column (12-hour) anatomy can be inspected.
|
|
9150
|
+
"time-picker": {
|
|
9151
|
+
default: { export: "TimePicker", interactiveTarget: "input", props: `{ "aria-label": "Doors open", hourCycle: 12, minuteStep: 15, defaultValue: "16:00" }` },
|
|
9152
|
+
"popover-24h": { export: "TimePicker", interactiveTarget: "input", props: `{ "aria-label": "Set start", hourCycle: 24, minuteStep: 15, defaultValue: "16:15", open: true }` },
|
|
9153
|
+
"popover-12h": { export: "TimePicker", interactiveTarget: "input", props: `{ "aria-label": "Doors open", hourCycle: 12, minuteStep: 15, defaultValue: "16:15", open: true }` },
|
|
9154
|
+
invalid: { export: "TimePicker", interactiveTarget: "input", props: `{ "aria-label": "Doors open", hourCycle: 12, defaultValue: "16:00", "aria-invalid": true }` }
|
|
9031
9155
|
},
|
|
9032
9156
|
textarea: {
|
|
9033
9157
|
default: { export: "Textarea", interactiveTarget: "textarea", props: `{ placeholder: "Tell us more" }` },
|
|
@@ -9055,6 +9179,51 @@ var FIXTURES = {
|
|
|
9055
9179
|
checked: { export: "Checkbox", interactiveTarget: "button", props: `{ "aria-label": "Accept", defaultChecked: true }` },
|
|
9056
9180
|
invalid: { export: "Checkbox", interactiveTarget: "button", props: `{ "aria-label": "Accept", "aria-invalid": true }` }
|
|
9057
9181
|
},
|
|
9182
|
+
// VI-668: the card variant — icon, title, line; the third level is drawn disabled.
|
|
9183
|
+
"radio-group": {
|
|
9184
|
+
default: {
|
|
9185
|
+
export: "RadioGroup",
|
|
9186
|
+
interactiveTarget: '[role="radio"]',
|
|
9187
|
+
props: `(function () {
|
|
9188
|
+
var h = React.createElement;
|
|
9189
|
+
return {
|
|
9190
|
+
"aria-label": "Size",
|
|
9191
|
+
defaultValue: "medium",
|
|
9192
|
+
style: { width: 320 },
|
|
9193
|
+
children: ["small", "medium", "large"].map(function (v) {
|
|
9194
|
+
return h(__mod.RadioGroupItem, { key: v, value: v, "aria-label": v });
|
|
9195
|
+
}),
|
|
9196
|
+
};
|
|
9197
|
+
})()`
|
|
9198
|
+
},
|
|
9199
|
+
card: {
|
|
9200
|
+
export: "RadioGroup",
|
|
9201
|
+
interactiveTarget: '[role="radio"]',
|
|
9202
|
+
props: `(function () {
|
|
9203
|
+
var h = React.createElement;
|
|
9204
|
+
var icon = function (shapes) {
|
|
9205
|
+
return h("svg", { width: "1em", height: "1em", viewBox: "0 0 24 24", fill: "currentColor" }, shapes);
|
|
9206
|
+
};
|
|
9207
|
+
var levels = [
|
|
9208
|
+
["just-you", "Just You", "Only you can see this booking.", icon([h("circle", { key: 1, cx: 12, cy: 8, r: 4 }), h("path", { key: 2, d: "M4 21a8 8 0 0 1 16 0Z" })])],
|
|
9209
|
+
["team", "Your Team", "Everyone on your team can see it.", icon([h("circle", { key: 1, cx: 8, cy: 9, r: 3.5 }), h("circle", { key: 2, cx: 16, cy: 9, r: 3.5 }), h("path", { key: 3, d: "M1 20a7 7 0 0 1 14 0ZM9 20a7 7 0 0 1 14 0Z" })])],
|
|
9210
|
+
["public", "Public", "Verified bookers only for now.", icon([h("path", { key: 1, d: "M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm0 3a7 7 0 0 1 0 14 7 7 0 0 1 0-14Z", fillRule: "evenodd" })])],
|
|
9211
|
+
];
|
|
9212
|
+
return {
|
|
9213
|
+
variant: "card",
|
|
9214
|
+
"aria-label": "Visibility",
|
|
9215
|
+
defaultValue: "team",
|
|
9216
|
+
style: { width: 360 },
|
|
9217
|
+
children: levels.map(function (l, i) {
|
|
9218
|
+
return h(__mod.RadioGroupItem, {
|
|
9219
|
+
key: l[0], value: l[0], icon: l[3], title: l[1], description: l[2],
|
|
9220
|
+
disabled: i === 2, "aria-describedby": i === 2 ? "radio-reason" : undefined,
|
|
9221
|
+
});
|
|
9222
|
+
}).concat([h("p", { key: "r", id: "radio-reason", style: { margin: 0, fontSize: 12 } }, "Public needs a verified booking.")]),
|
|
9223
|
+
};
|
|
9224
|
+
})()`
|
|
9225
|
+
}
|
|
9226
|
+
},
|
|
9058
9227
|
switch: {
|
|
9059
9228
|
default: { export: "Switch", interactiveTarget: "button", props: `{ "aria-label": "Notifications" }` },
|
|
9060
9229
|
checked: { export: "Switch", interactiveTarget: "button", props: `{ "aria-label": "Notifications", defaultChecked: true }` },
|
|
@@ -9093,21 +9262,95 @@ var FIXTURES = {
|
|
|
9093
9262
|
export: "InlineEdit",
|
|
9094
9263
|
interactiveTarget: "input",
|
|
9095
9264
|
props: `{ as: "h2", style: { margin: 0, fontSize: "21px", lineHeight: 1.25, fontWeight: 600 }, label: "Section title", value: "Track record", defaultValue: "Untitled section", onCommit: function () {}, defaultEditing: true }`
|
|
9265
|
+
},
|
|
9266
|
+
// VI-677: pencil={false}. The text is the button, so hover/focus drive it.
|
|
9267
|
+
"no-pencil": {
|
|
9268
|
+
export: "InlineEdit",
|
|
9269
|
+
interactiveTarget: "button",
|
|
9270
|
+
props: `{ label: "Rider title", value: "Technical rider", defaultValue: "Rider", onCommit: function () {}, pencil: false }`
|
|
9271
|
+
},
|
|
9272
|
+
"no-pencil-default-value": {
|
|
9273
|
+
export: "InlineEdit",
|
|
9274
|
+
interactiveTarget: "button",
|
|
9275
|
+
props: `{ label: "Rider title", value: "", defaultValue: "Rider", onCommit: function () {}, pencil: false }`
|
|
9276
|
+
},
|
|
9277
|
+
// Descenders and accents must survive the cap-band trim.
|
|
9278
|
+
"no-pencil-glyphs": {
|
|
9279
|
+
export: "InlineEdit",
|
|
9280
|
+
interactiveTarget: "button",
|
|
9281
|
+
props: `{ label: "Rider title", value: "Typography jpq \xC9\xC5\xD1", defaultValue: "Rider", onCommit: function () {}, pencil: false }`
|
|
9282
|
+
},
|
|
9283
|
+
"no-pencil-heading": {
|
|
9284
|
+
export: "InlineEdit",
|
|
9285
|
+
interactiveTarget: "button",
|
|
9286
|
+
props: `{ as: "h2", style: { margin: 0, fontSize: "21px", lineHeight: 1.25, fontWeight: 600 }, label: "Section title", value: "Track record", defaultValue: "Untitled section", onCommit: function () {}, pencil: false }`
|
|
9096
9287
|
}
|
|
9097
9288
|
},
|
|
9098
|
-
// VI-657: the autosave readout in each state. It draws no edge in any of them.
|
|
9289
|
+
// VI-657/VI-665: the autosave readout in each state, Unsaved as a dot too. It draws no edge in any of them.
|
|
9099
9290
|
"save-status": {
|
|
9100
9291
|
default: { export: "SaveStatus", props: `{ status: "saved" }` },
|
|
9101
9292
|
saving: { export: "SaveStatus", props: `{ status: "saving" }` },
|
|
9293
|
+
syncing: { export: "SaveStatus", props: `{ status: "syncing" }` },
|
|
9102
9294
|
unsaved: { export: "SaveStatus", props: `{ status: "unsaved" }` },
|
|
9295
|
+
"unsaved-dot": { export: "SaveStatus", props: `{ status: "unsaved", unsavedAs: "dot" }` },
|
|
9103
9296
|
refused: { export: "SaveStatus", props: `{ status: "refused" }` },
|
|
9104
|
-
"refused-retry": { export: "SaveStatus", interactiveTarget: "button", props: `{ status: "refused", onRetry: function () {} }` }
|
|
9297
|
+
"refused-retry": { export: "SaveStatus", interactiveTarget: "button", props: `{ status: "refused", onRetry: function () {} }` },
|
|
9298
|
+
dot: { export: "SaveStatus", props: `{ status: "saved", dot: true }` },
|
|
9299
|
+
"dot-unsaved": { export: "SaveStatus", props: `{ status: "unsaved", dot: true }` }
|
|
9300
|
+
},
|
|
9301
|
+
// VI-615: the single-select pill group. `fullwidth` fills the render frame.
|
|
9302
|
+
"segmented-control": {
|
|
9303
|
+
default: {
|
|
9304
|
+
export: "SegmentedControl",
|
|
9305
|
+
interactiveTarget: "[data-slot=toggle-group-item]",
|
|
9306
|
+
props: `{ "aria-label": "Payment status", defaultValue: "paid", options: [{ value: "unpaid", label: "Unpaid" }, { value: "paid", label: "Paid" }, { value: "any", label: "Any" }] }`
|
|
9307
|
+
},
|
|
9308
|
+
fullwidth: {
|
|
9309
|
+
export: "SegmentedControl",
|
|
9310
|
+
props: `{ "aria-label": "Artist scope", fullWidth: true, defaultValue: "active", options: [{ value: "active", label: "Active" }, { value: "archived", label: "Archived" }, { value: "dnb", label: "Do-not-book" }] }`
|
|
9311
|
+
},
|
|
9312
|
+
"disabled-option": {
|
|
9313
|
+
export: "SegmentedControl",
|
|
9314
|
+
props: `{ "aria-label": "View", defaultValue: "day", options: [{ value: "day", label: "Day" }, { value: "week", label: "Week" }, { value: "month", label: "Month", disabled: true }] }`
|
|
9315
|
+
}
|
|
9316
|
+
},
|
|
9317
|
+
// VI-690: the single-select toggle group in both variants; `--state focus` drives the first item.
|
|
9318
|
+
"toggle-group": {
|
|
9319
|
+
default: {
|
|
9320
|
+
export: "ToggleGroup",
|
|
9321
|
+
interactiveTarget: "[data-slot=toggle-group-item]",
|
|
9322
|
+
props: `(function () {
|
|
9323
|
+
var h = React.createElement;
|
|
9324
|
+
return { type: "single", "aria-label": "Text alignment", defaultValue: "center", children: [
|
|
9325
|
+
h(__mod.ToggleGroupItem, { key: "l", value: "left" }, "Left"),
|
|
9326
|
+
h(__mod.ToggleGroupItem, { key: "c", value: "center" }, "Center"),
|
|
9327
|
+
h(__mod.ToggleGroupItem, { key: "r", value: "right" }, "Right"),
|
|
9328
|
+
] };
|
|
9329
|
+
})()`
|
|
9330
|
+
},
|
|
9331
|
+
outline: {
|
|
9332
|
+
export: "ToggleGroup",
|
|
9333
|
+
interactiveTarget: "[data-slot=toggle-group-item]",
|
|
9334
|
+
props: `(function () {
|
|
9335
|
+
var h = React.createElement;
|
|
9336
|
+
return { type: "single", variant: "outline", "aria-label": "View", defaultValue: "week", children: [
|
|
9337
|
+
h(__mod.ToggleGroupItem, { key: "d", value: "day" }, "Day"),
|
|
9338
|
+
h(__mod.ToggleGroupItem, { key: "w", value: "week" }, "Week"),
|
|
9339
|
+
h(__mod.ToggleGroupItem, { key: "m", value: "month" }, "Month"),
|
|
9340
|
+
] };
|
|
9341
|
+
})()`
|
|
9342
|
+
}
|
|
9105
9343
|
},
|
|
9106
9344
|
"tag-input": {
|
|
9107
9345
|
default: {
|
|
9108
9346
|
export: "TagInput",
|
|
9109
9347
|
interactiveTarget: "input",
|
|
9110
9348
|
props: `{ defaultValue: ["design", "tokens"], placeholder: "Add a tag" }`
|
|
9349
|
+
},
|
|
9350
|
+
slot: {
|
|
9351
|
+
export: "TagInput",
|
|
9352
|
+
interactiveTarget: "input",
|
|
9353
|
+
props: `{ defaultValue: ["design", "tokens"], placeholder: "Add a tag", entryAs: "slot" }`
|
|
9111
9354
|
}
|
|
9112
9355
|
},
|
|
9113
9356
|
chip: {
|
|
@@ -9123,6 +9366,55 @@ var FIXTURES = {
|
|
|
9123
9366
|
default: {
|
|
9124
9367
|
export: "EmptyState",
|
|
9125
9368
|
props: `{ heading: "No projects yet", description: "Create a project to get started." }`
|
|
9369
|
+
},
|
|
9370
|
+
error: {
|
|
9371
|
+
export: "EmptyState",
|
|
9372
|
+
props: `{ intent: "error", tone: "subtle", icon: ${ICON_X}, heading: "Could not load the inbox", description: "The request timed out. Check your connection and try again." }`
|
|
9373
|
+
}
|
|
9374
|
+
},
|
|
9375
|
+
// VI-666: ActionRow. Every row is captioned (title = state, line = what it
|
|
9376
|
+
// reads); `edges-off` binds both switches on the list: the resting edge and
|
|
9377
|
+
// the hairline go, the selected state edge and focus stay. `--state hover|focus` drives the
|
|
9378
|
+
// first row.
|
|
9379
|
+
"action-row": {
|
|
9380
|
+
default: {
|
|
9381
|
+
export: "ActionRowList",
|
|
9382
|
+
props: `(function () {
|
|
9383
|
+
var h = React.createElement;
|
|
9384
|
+
var row = function (key, props) {
|
|
9385
|
+
return h(__mod.ActionRow, Object.assign({ key: key, leading: ${ICON_X}, trailing: h("span", null, "Value") }, props), props.title);
|
|
9386
|
+
};
|
|
9387
|
+
return { "aria-label": "States", style: { maxWidth: "420px" }, children: [
|
|
9388
|
+
row("rest", { title: "Rest", line: "no fill, 44px floor" }),
|
|
9389
|
+
row("selected", { title: "Selected", line: "lifted fill + inset edge", selected: true }),
|
|
9390
|
+
row("open", { title: "Open", line: "open fill, aria-expanded", open: true }),
|
|
9391
|
+
row("disabled", { title: "Disabled", line: "disabled opacity", disabled: true }),
|
|
9392
|
+
h(__mod.ActionRow, { key: "bare", trailing: h("span", null, "Review") }, "Title only, trailing value"),
|
|
9393
|
+
h(__mod.ActionRow, { key: "long", leading: ${ICON_X}, line: "A second line that is long enough that it has to wrap onto another line", trailing: h("span", null, "3 suggested") }, "A title long enough that it wraps to a second line at this width"),
|
|
9394
|
+
h(__mod.ActionRow, { key: "glyphs", leading: ${ICON_X}, line: "Descenders jpqgy and accents \xC9\xC5\xD1", trailing: h("span", null, "jpq \xC9\xC5\xD1") }, "Typography jpq \xC9\xC5\xD1"),
|
|
9395
|
+
h(__mod.ActionRow, { key: "link", asChild: true, leading: ${ICON_X}, trailing: h("span", null, "Open") }, h("a", { href: "#billing" }, "Row as a link (asChild)")),
|
|
9396
|
+
] };
|
|
9397
|
+
})()`
|
|
9398
|
+
},
|
|
9399
|
+
interactive: {
|
|
9400
|
+
export: "ActionRowList",
|
|
9401
|
+
props: `(function () {
|
|
9402
|
+
var h = React.createElement;
|
|
9403
|
+
return { "aria-label": "Interactive", style: { maxWidth: "420px" }, children: [
|
|
9404
|
+
h(__mod.ActionRow, { key: "a", leading: ${ICON_X}, line: "driven by --state", trailing: h("span", null, "Value") }, "First row"),
|
|
9405
|
+
h(__mod.ActionRow, { key: "b", leading: ${ICON_X}, line: "left at rest", trailing: h("span", null, "Value") }, "Second row"),
|
|
9406
|
+
] };
|
|
9407
|
+
})()`
|
|
9408
|
+
},
|
|
9409
|
+
"edges-off": {
|
|
9410
|
+
export: "ActionRowList",
|
|
9411
|
+
props: `(function () {
|
|
9412
|
+
var h = React.createElement;
|
|
9413
|
+
return { "aria-label": "Edges off", style: { maxWidth: "420px", "--control-edge-width": "0", "--hairline-width": "0" }, children: [
|
|
9414
|
+
h(__mod.ActionRow, { key: "a", leading: ${ICON_X}, line: "edge kept, resting edge off", trailing: h("span", null, "Value"), selected: true }, "Selected"),
|
|
9415
|
+
h(__mod.ActionRow, { key: "b", leading: ${ICON_X}, line: "hairline off", trailing: h("span", null, "Value") }, "Rest"),
|
|
9416
|
+
] };
|
|
9417
|
+
})()`
|
|
9126
9418
|
}
|
|
9127
9419
|
},
|
|
9128
9420
|
badge: {
|
|
@@ -9173,7 +9465,8 @@ function resolveComponentFile(cwd, name) {
|
|
|
9173
9465
|
return firstExisting([
|
|
9174
9466
|
resolve21(cwd, "components", "ui", name, `${name}.tsx`),
|
|
9175
9467
|
resolve21(cwd, "components", "devtools", name, `${name}.tsx`),
|
|
9176
|
-
resolve21(cwd, "components", "ui", name, "index.tsx")
|
|
9468
|
+
resolve21(cwd, "components", "ui", name, "index.tsx"),
|
|
9469
|
+
resolve21(cwd, "blocks", name, `${name}.tsx`)
|
|
9177
9470
|
]);
|
|
9178
9471
|
}
|
|
9179
9472
|
function resolveThemeCssFile(cwd, slug2) {
|
|
@@ -9301,7 +9594,7 @@ async function renderCommand(component, cwd, options) {
|
|
|
9301
9594
|
if (!componentFile) {
|
|
9302
9595
|
fail3(
|
|
9303
9596
|
"COMPONENT_NOT_FOUND",
|
|
9304
|
-
`Component "${component}" not found under components/ui/. Expected components/ui/${component}/${component}.tsx.`
|
|
9597
|
+
`Component "${component}" not found under components/ui/ or blocks/. Expected components/ui/${component}/${component}.tsx or blocks/${component}/${component}.tsx.`
|
|
9305
9598
|
);
|
|
9306
9599
|
}
|
|
9307
9600
|
const themeCssFile = resolveThemeCssFile(cwd, options.theme);
|