@mono-lit/helper 0.0.1 → 0.0.2
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/LICENSE.md +55 -55
- package/README.md +35 -35
- package/dist/data-source-controller-B_rgHCjw.js +241 -0
- package/dist/{data-source-controller-C50Qyfzh.js → data-source-controller-Dbb4fd8I.js} +69 -6
- package/dist/{data-source-options-BTpfrOZ_.js → data-source-options-CP-X62Pa.js} +2 -2
- package/dist/{data-source-options-CQSTZHPE.js → data-source-options-Jqj7LU3Z.js} +1 -1
- package/dist/{data-source-read-CUX-lgrQ.js → data-source-read-B4DGp6UQ.js} +1 -1
- package/dist/{export-BvlBx_GZ.js → export-BiGVyxt6.js} +2 -2
- package/dist/{field-icons-BoOG6KrL.js → field-icons-DELrSdqJ.js} +36 -1
- package/dist/index.js +7 -7
- package/dist/{index.node-DjvYOL-J.js → index.node-BIqEGehH.js} +5 -4
- package/dist/index.node.js +7 -7
- package/dist/{mono-button-CoVnBLav.js → mono-button-simcTQdW.js} +2 -2
- package/dist/{mono-button.shadow-FfP_hMH4.js → mono-button.shadow-B_rKOY9N.js} +2 -2
- package/dist/{mono-data-chart-ChU4Ii3p.js → mono-data-chart-CEv29_NS.js} +53 -12
- package/dist/{mono-data-dropdown-BAUl58kW.js → mono-data-dropdown-Wnoke6zO.js} +1 -1
- package/dist/{mono-data-grid-CLBK8clE.js → mono-data-grid-CjkEqxgE.js} +5 -232
- package/dist/{mono-data-grid-Db80FzdZ.js → mono-data-grid-YjR3n9Ar.js} +3 -230
- package/dist/{data-search-Bwo5bg8K.js → normalize-error-Gcgmgh5i.js} +299 -1
- package/dist/{reactive-BHsqVjRh.js → reactive-Di3mTMnV.js} +299 -1
- package/dist/src/components/card/card-core.d.ts +1 -0
- package/dist/src/components/chart/chart-types.d.ts +19 -0
- package/dist/src/components/select/select-types.d.ts +26 -0
- package/dist/src/components/tag-input/tag-input-types.d.ts +26 -0
- package/dist/src/composables/data-source-controller.d.ts +29 -0
- package/dist/src/composables/field-icons.d.ts +8 -0
- package/dist/src/utils/normalize-error.d.ts +30 -0
- package/dist/{tooltip-CysgRgBi.js → tooltip-DQqNpqk2.js} +62 -27
- package/dist/tooltip.js +1 -1
- package/dist/ui/alert.js +1 -1
- package/dist/ui/button-dropdown.js +1 -1
- package/dist/ui/button.js +1 -1
- package/dist/ui/card.js +15 -2
- package/dist/ui/chart.js +81 -4
- package/dist/ui/dropdown-table.js +2 -2
- package/dist/ui/index.css +181 -18
- package/dist/ui/modal.js +3 -2
- package/dist/ui/select.js +153 -19
- package/dist/ui/shadow/alert.js +1 -1
- package/dist/ui/shadow/button-dropdown.js +1 -1
- package/dist/ui/shadow/button.js +1 -1
- package/dist/ui/shadow/card.js +16 -2
- package/dist/ui/shadow/chart.js +133 -17
- package/dist/ui/shadow/dropdown-table.js +2 -2
- package/dist/ui/shadow/modal.js +3 -2
- package/dist/ui/shadow/select.js +153 -19
- package/dist/ui/shadow/table.js +4 -4
- package/dist/ui/shadow/tag-input.js +154 -26
- package/dist/ui/table.js +3 -3
- package/dist/ui/tag-input.js +153 -25
- package/package.json +1 -1
|
@@ -3,14 +3,14 @@ import { t as dispatchMonoEvent } from "../../mono-event-Bi1qP9uN.js";
|
|
|
3
3
|
import { n as toCssSize, t as buildSizeStyle } from "../../css-size-DhHSVZJK.js";
|
|
4
4
|
import { t as MonoFormControlCore } from "../../form-control-core-B8d7k6vk.js";
|
|
5
5
|
import { t as PopupPortalController } from "../../popup-portal-BziRX1yG.js";
|
|
6
|
-
import { a as
|
|
6
|
+
import { _ as searchRowPredicate, a as describeError, c as errorTitle, g as resolveSearchFields, m as MonoSourceSearch, n as unwrapReactive, r as unwrapReactiveDeep, s as errorText } from "../../reactive-Di3mTMnV.js";
|
|
7
7
|
import { t as LateSlotWatcher } from "../../light-slots-BVJwyg_2.js";
|
|
8
8
|
import { t as checkbox_default } from "../../checkbox-Cqpie9Ap.js";
|
|
9
|
-
import { r as readAllRows } from "../../data-source-read-
|
|
9
|
+
import { r as readAllRows } from "../../data-source-read-B4DGp6UQ.js";
|
|
10
10
|
import { n as resolveChipLimit, r as visibleChipCap, t as ChipStripController } from "../../chip-strip-Cw3gyz0q.js";
|
|
11
|
-
import { n as chevronIcon, t as caretIcon } from "../../field-icons-
|
|
11
|
+
import { a as spinnerIcon, i as refreshIcon, n as chevronIcon, t as caretIcon } from "../../field-icons-DELrSdqJ.js";
|
|
12
12
|
import { t as chip_default } from "../../chip-DBUUa2eB.js";
|
|
13
|
-
import { t as DataSourceController } from "../../data-source-controller-
|
|
13
|
+
import { t as DataSourceController } from "../../data-source-controller-Dbb4fd8I.js";
|
|
14
14
|
import { LitElement, html, isServer, nothing, unsafeCSS } from "lit";
|
|
15
15
|
import { property, query, state } from "lit/decorators.js";
|
|
16
16
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
@@ -49,6 +49,10 @@ var MonoTagInputCore = (superClass) => {
|
|
|
49
49
|
this.name = "";
|
|
50
50
|
this.label = "";
|
|
51
51
|
this.placeholder = "Add tag...";
|
|
52
|
+
this.loadingText = "Loading…";
|
|
53
|
+
this.retryLabel = "Retry";
|
|
54
|
+
this.loading = false;
|
|
55
|
+
this.loadingError = null;
|
|
52
56
|
this.helperText = "";
|
|
53
57
|
this.validationState = "default";
|
|
54
58
|
this.validationMessage = "";
|
|
@@ -126,6 +130,22 @@ var MonoTagInputCore = (superClass) => {
|
|
|
126
130
|
this._lateListSlot = new LateSlotWatcher(this, "list", () => this._onLateListSlot());
|
|
127
131
|
this._sourceSearch = new MonoSourceSearch();
|
|
128
132
|
this._searchVersion = 0;
|
|
133
|
+
this._appliedQuery = "";
|
|
134
|
+
this._appFailure = null;
|
|
135
|
+
this._retry = (event) => {
|
|
136
|
+
event.preventDefault();
|
|
137
|
+
event.stopPropagation();
|
|
138
|
+
const error = this._failure;
|
|
139
|
+
if (this.disabled || this._busy || !error) return;
|
|
140
|
+
const fromApp = !!this._appFailure;
|
|
141
|
+
dispatchMonoEvent(this, "retry", {
|
|
142
|
+
error,
|
|
143
|
+
source: fromApp ? "app" : "dataSource"
|
|
144
|
+
});
|
|
145
|
+
if (fromApp || !this.dataSource || !this._ds.error) return;
|
|
146
|
+
const clearSearch = !!this._appliedQuery && this._serverSearch();
|
|
147
|
+
this._ds.retry(clearSearch ? () => this._pushSearch("") : void 0);
|
|
148
|
+
};
|
|
129
149
|
this._selectedItemCache = /* @__PURE__ */ new Map();
|
|
130
150
|
this._handleDocumentClick = (event) => {
|
|
131
151
|
if (this.stayOpen) return;
|
|
@@ -163,7 +183,7 @@ var MonoTagInputCore = (superClass) => {
|
|
|
163
183
|
this._hasListSlotState = false;
|
|
164
184
|
this._publishedEntries = [];
|
|
165
185
|
this._onListSlotClick = (event) => {
|
|
166
|
-
if (this.
|
|
186
|
+
if (this._inert) return;
|
|
167
187
|
const target = event.target;
|
|
168
188
|
const entry = target ? this._entryFromNode(target) : void 0;
|
|
169
189
|
if (!entry) return;
|
|
@@ -182,6 +202,8 @@ var MonoTagInputCore = (superClass) => {
|
|
|
182
202
|
};
|
|
183
203
|
defineHybridPropAliases(this, [
|
|
184
204
|
"modelValue",
|
|
205
|
+
"loadingText",
|
|
206
|
+
"loadingError",
|
|
185
207
|
"helperText",
|
|
186
208
|
"validationState",
|
|
187
209
|
"validationMessage",
|
|
@@ -280,6 +302,8 @@ var MonoTagInputCore = (superClass) => {
|
|
|
280
302
|
return [
|
|
281
303
|
...super.observedAttributes ?? [],
|
|
282
304
|
"modelvalue",
|
|
305
|
+
"loadingtext",
|
|
306
|
+
"loadingerror",
|
|
283
307
|
"helpertext",
|
|
284
308
|
"validationstate",
|
|
285
309
|
"validationmessage",
|
|
@@ -306,6 +330,14 @@ var MonoTagInputCore = (superClass) => {
|
|
|
306
330
|
this.modelValue = this._normalizeValue(newValue);
|
|
307
331
|
return;
|
|
308
332
|
}
|
|
333
|
+
if (name === "loadingtext") {
|
|
334
|
+
this.loadingText = newValue ?? "Loading…";
|
|
335
|
+
return;
|
|
336
|
+
}
|
|
337
|
+
if (name === "loadingerror") {
|
|
338
|
+
this.loadingError = newValue;
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
309
341
|
if (name === "helpertext") {
|
|
310
342
|
this.helperText = newValue ?? "";
|
|
311
343
|
return;
|
|
@@ -405,6 +437,7 @@ var MonoTagInputCore = (superClass) => {
|
|
|
405
437
|
willUpdate(changed) {
|
|
406
438
|
for (const key of [
|
|
407
439
|
"disabled",
|
|
440
|
+
"loading",
|
|
408
441
|
"readonly",
|
|
409
442
|
"required",
|
|
410
443
|
"clearable",
|
|
@@ -421,6 +454,14 @@ var MonoTagInputCore = (superClass) => {
|
|
|
421
454
|
const v = this[key];
|
|
422
455
|
if (typeof v !== "boolean") this[key] = this._toBoolean(v);
|
|
423
456
|
}
|
|
457
|
+
if (changed.has("loadingError")) {
|
|
458
|
+
const v = this.loadingError;
|
|
459
|
+
this._appFailure = v == null || v === false || v === "" ? null : describeError(v === true ? void 0 : v);
|
|
460
|
+
}
|
|
461
|
+
if (this._open && this._dsInert) {
|
|
462
|
+
this._open = false;
|
|
463
|
+
this._dropQuery();
|
|
464
|
+
}
|
|
424
465
|
if (changed.has("modelValue") && !this._arrayEqual(this.value, this.modelValue)) this.value = [...unwrapReactiveDeep(this.modelValue)];
|
|
425
466
|
if (changed.has("value") && !this._arrayEqual(this.modelValue, this.value)) this.modelValue = [...unwrapReactiveDeep(this.value)];
|
|
426
467
|
if (this.group && (changed.has("dataSource") || changed.has("displayGroup") || changed.has("group"))) {
|
|
@@ -735,10 +776,17 @@ var MonoTagInputCore = (superClass) => {
|
|
|
735
776
|
_serverSearch() {
|
|
736
777
|
return !!this.dataSource;
|
|
737
778
|
}
|
|
738
|
-
/** Run the server search, reset to page 0. */
|
|
779
|
+
/** Run the server search, reset to page 0. A failure becomes the field's error. */
|
|
739
780
|
async _applySearch(query) {
|
|
740
781
|
if (!this._serverSearch()) return;
|
|
741
|
-
await this.
|
|
782
|
+
await this._pushSearch(query).catch((err) => {
|
|
783
|
+
this._ds.setError(err);
|
|
784
|
+
});
|
|
785
|
+
}
|
|
786
|
+
/** Push `query` onto the source and reload it; rejects when the load fails. */
|
|
787
|
+
_pushSearch(query) {
|
|
788
|
+
this._appliedQuery = query;
|
|
789
|
+
return this._sourceSearch.apply(this.dataSource, {
|
|
742
790
|
query,
|
|
743
791
|
searchValue: this.searchValue,
|
|
744
792
|
fallbackFields: this._fallbackSearchFields(),
|
|
@@ -748,6 +796,39 @@ var MonoTagInputCore = (superClass) => {
|
|
|
748
796
|
operation: this.searchOperation || "contains"
|
|
749
797
|
});
|
|
750
798
|
}
|
|
799
|
+
/** Forget the typed query without touching the source. */
|
|
800
|
+
_dropQuery() {
|
|
801
|
+
if (this._searchTimer) {
|
|
802
|
+
clearTimeout(this._searchTimer);
|
|
803
|
+
this._searchTimer = void 0;
|
|
804
|
+
}
|
|
805
|
+
this._inputValue = "";
|
|
806
|
+
this._activeIndex = -1;
|
|
807
|
+
}
|
|
808
|
+
/** Loading: the app says so (`loading`), or the bound source's first load / retry. */
|
|
809
|
+
get _busy() {
|
|
810
|
+
return this.loading || !!this.dataSource && this._ds.busy;
|
|
811
|
+
}
|
|
812
|
+
/** The failure to paint: the app's `loading-error`, else the source's own; none while busy. */
|
|
813
|
+
get _failure() {
|
|
814
|
+
if (this._busy) return null;
|
|
815
|
+
return this._appFailure ?? (this.dataSource ? this._ds.error : null);
|
|
816
|
+
}
|
|
817
|
+
/** Enter / Space on the focused field retries a failure. */
|
|
818
|
+
_retryKey(event) {
|
|
819
|
+
if (event.key !== "Enter" && event.key !== " ") return false;
|
|
820
|
+
if (!this._failure || this.disabled) return false;
|
|
821
|
+
this._retry(event);
|
|
822
|
+
return true;
|
|
823
|
+
}
|
|
824
|
+
/** Loading, or failed: the field refuses every gesture but ↻. */
|
|
825
|
+
get _dsInert() {
|
|
826
|
+
return this._busy || !!this._failure;
|
|
827
|
+
}
|
|
828
|
+
/** Every interaction is off: disabled, read-only, or the source isn't usable. */
|
|
829
|
+
get _inert() {
|
|
830
|
+
return this.disabled || this.readonly || this._dsInert;
|
|
831
|
+
}
|
|
751
832
|
/**
|
|
752
833
|
* Clear the typed query — the visible one AND the one applied to the source.
|
|
753
834
|
*
|
|
@@ -1025,7 +1106,18 @@ var MonoTagInputCore = (superClass) => {
|
|
|
1025
1106
|
* `.has-clear` on the field.
|
|
1026
1107
|
*/
|
|
1027
1108
|
get _showClear() {
|
|
1028
|
-
return this.clearable && this._hasValue && !this.
|
|
1109
|
+
return this.clearable && this._hasValue && !this._inert && !((this._selectionLimits.min ?? 0) > 0);
|
|
1110
|
+
}
|
|
1111
|
+
/** The input's placeholder: the source's state while it isn't usable, else the prompt. */
|
|
1112
|
+
get _inputPlaceholder() {
|
|
1113
|
+
if (this._busy) return this.loadingText;
|
|
1114
|
+
if (this._failure) return errorText(this._failure);
|
|
1115
|
+
return this._hasValue ? void 0 : this.placeholder;
|
|
1116
|
+
}
|
|
1117
|
+
/** Full error text (detail first) on hover, since the placeholder may truncate. */
|
|
1118
|
+
get _dsErrorTitle() {
|
|
1119
|
+
const err = this._failure;
|
|
1120
|
+
return err ? errorTitle(err) : void 0;
|
|
1029
1121
|
}
|
|
1030
1122
|
get _fieldClasses() {
|
|
1031
1123
|
return [
|
|
@@ -1144,7 +1236,7 @@ var MonoTagInputCore = (superClass) => {
|
|
|
1144
1236
|
if (args.emitAdd && this._chipBehaviour === "inline") this.updateComplete.then(() => this._chipStrip.scrollToEnd());
|
|
1145
1237
|
}
|
|
1146
1238
|
_addValue(value, event) {
|
|
1147
|
-
if (this.
|
|
1239
|
+
if (this._inert) return;
|
|
1148
1240
|
if (!this._canAddMore) return this._resetSearch();
|
|
1149
1241
|
if (!this.allowCustom && !this._getItemByValue(value)) return;
|
|
1150
1242
|
if (!this._selectedValues.some((v) => this._isSameValue(v, value))) this._setValue([...this._selectedValues, value], {
|
|
@@ -1160,7 +1252,7 @@ var MonoTagInputCore = (superClass) => {
|
|
|
1160
1252
|
* (and the typed filter intact), so the user can check several rows in a row.
|
|
1161
1253
|
*/
|
|
1162
1254
|
_toggleValue(value, event) {
|
|
1163
|
-
if (this.
|
|
1255
|
+
if (this._inert) return;
|
|
1164
1256
|
if (this._selectedValues.some((v) => this._isSameValue(v, value))) {
|
|
1165
1257
|
if (!this._canRemoveMore) return;
|
|
1166
1258
|
this._setValue(this._selectedValues.filter((v) => !this._isSameValue(v, value)), {
|
|
@@ -1284,6 +1376,8 @@ var MonoTagInputCore = (superClass) => {
|
|
|
1284
1376
|
sourceEvent: event,
|
|
1285
1377
|
emitAdd: true
|
|
1286
1378
|
});
|
|
1379
|
+
} catch (err) {
|
|
1380
|
+
this._ds.setError(err);
|
|
1287
1381
|
} finally {
|
|
1288
1382
|
this._selectAllPending = false;
|
|
1289
1383
|
this._open = true;
|
|
@@ -1331,7 +1425,7 @@ var MonoTagInputCore = (superClass) => {
|
|
|
1331
1425
|
* `<mono-table-checkbox>` gives its own clear.
|
|
1332
1426
|
*/
|
|
1333
1427
|
_clearAllFromServer(event) {
|
|
1334
|
-
if (this.
|
|
1428
|
+
if (this._inert) return;
|
|
1335
1429
|
if (!this._selectedValues.length) return;
|
|
1336
1430
|
this._setValue([], {
|
|
1337
1431
|
sourceEvent: event,
|
|
@@ -1351,7 +1445,7 @@ var MonoTagInputCore = (superClass) => {
|
|
|
1351
1445
|
* saying nothing (`modelValue` and `oldValue` carry the full before/after).
|
|
1352
1446
|
*/
|
|
1353
1447
|
_toggleMany(items, event) {
|
|
1354
|
-
if (this.
|
|
1448
|
+
if (this._inert) return;
|
|
1355
1449
|
const usable = items.filter((item) => this._isSelectable(item));
|
|
1356
1450
|
if (!usable.length) return;
|
|
1357
1451
|
const values = usable.map((item) => this._resolveItemValue(item));
|
|
@@ -1375,7 +1469,7 @@ var MonoTagInputCore = (superClass) => {
|
|
|
1375
1469
|
}
|
|
1376
1470
|
_removeValue(value, event) {
|
|
1377
1471
|
event?.stopPropagation();
|
|
1378
|
-
if (this.
|
|
1472
|
+
if (this._inert) return;
|
|
1379
1473
|
if (!this._canRemoveMore) return;
|
|
1380
1474
|
this._setValue(this._selectedValues.filter((item) => !this._isSameValue(item, value)), {
|
|
1381
1475
|
removedValue: value,
|
|
@@ -1386,7 +1480,7 @@ var MonoTagInputCore = (superClass) => {
|
|
|
1386
1480
|
}
|
|
1387
1481
|
_clear(event) {
|
|
1388
1482
|
event.stopPropagation();
|
|
1389
|
-
if (this.
|
|
1483
|
+
if (this._inert) return;
|
|
1390
1484
|
this._setValue(this._keepFloor([]), {
|
|
1391
1485
|
sourceEvent: event,
|
|
1392
1486
|
emitClear: true
|
|
@@ -1395,7 +1489,7 @@ var MonoTagInputCore = (superClass) => {
|
|
|
1395
1489
|
this._inputEl?.focus();
|
|
1396
1490
|
}
|
|
1397
1491
|
_handleInput(event) {
|
|
1398
|
-
if (this.
|
|
1492
|
+
if (this._inert) return;
|
|
1399
1493
|
const input = event.currentTarget;
|
|
1400
1494
|
if (!this.searchable) {
|
|
1401
1495
|
input.value = "";
|
|
@@ -1422,7 +1516,7 @@ var MonoTagInputCore = (superClass) => {
|
|
|
1422
1516
|
* so there the click TOGGLES: a second click on the field closes the list.
|
|
1423
1517
|
*/
|
|
1424
1518
|
_handleFieldClick() {
|
|
1425
|
-
if (this.
|
|
1519
|
+
if (this._inert) return;
|
|
1426
1520
|
this._inputEl?.focus();
|
|
1427
1521
|
this._moreOpen = false;
|
|
1428
1522
|
if (this.searchable) this._open = true;
|
|
@@ -1432,7 +1526,7 @@ var MonoTagInputCore = (superClass) => {
|
|
|
1432
1526
|
/** The chevron: the one mouse gesture that both opens and closes. */
|
|
1433
1527
|
_toggleFromCaret(event) {
|
|
1434
1528
|
event.stopPropagation();
|
|
1435
|
-
if (this.
|
|
1529
|
+
if (this._inert) return;
|
|
1436
1530
|
this._moreOpen = false;
|
|
1437
1531
|
if (this._open) this._close();
|
|
1438
1532
|
else {
|
|
@@ -1441,7 +1535,8 @@ var MonoTagInputCore = (superClass) => {
|
|
|
1441
1535
|
}
|
|
1442
1536
|
}
|
|
1443
1537
|
_handleKeydown(event) {
|
|
1444
|
-
if (this.
|
|
1538
|
+
if (this._retryKey(event)) return;
|
|
1539
|
+
if (this._inert) return;
|
|
1445
1540
|
const items = this._filteredItems;
|
|
1446
1541
|
if (event.key === "ArrowDown") {
|
|
1447
1542
|
event.preventDefault();
|
|
@@ -1590,7 +1685,7 @@ var MonoTagInputCore = (superClass) => {
|
|
|
1590
1685
|
_renderChip(value, removable) {
|
|
1591
1686
|
const chip = this._chipProps;
|
|
1592
1687
|
const label = this._getLabelByValue(value);
|
|
1593
|
-
const canRemove = removable && !this.
|
|
1688
|
+
const canRemove = removable && !this._inert && this._canRemoveMore;
|
|
1594
1689
|
return html`
|
|
1595
1690
|
<div
|
|
1596
1691
|
class=${this._chipCls(`${this._chipBaseClasses}${canRemove ? " removable" : ""}`, "root", "chip")}
|
|
@@ -1716,9 +1811,27 @@ var MonoTagInputCore = (superClass) => {
|
|
|
1716
1811
|
</button>
|
|
1717
1812
|
`;
|
|
1718
1813
|
}
|
|
1814
|
+
/** Spinner while the source first loads, ↻ after it failed; else nothing. */
|
|
1815
|
+
_renderSourceState() {
|
|
1816
|
+
if (this._busy) return html`<span mono-ds-spinner role="status" aria-label=${this.loadingText}>${spinnerIcon()}</span>`;
|
|
1817
|
+
if (this._failure && !this.disabled) return html`
|
|
1818
|
+
<button
|
|
1819
|
+
type="button"
|
|
1820
|
+
tabindex="-1"
|
|
1821
|
+
mono-ds-retry
|
|
1822
|
+
aria-label=${this.retryLabel}
|
|
1823
|
+
title=${this.retryLabel}
|
|
1824
|
+
@mousedown=${(event) => event.preventDefault()}
|
|
1825
|
+
@click=${this._retry}
|
|
1826
|
+
>
|
|
1827
|
+
${refreshIcon()}
|
|
1828
|
+
</button>
|
|
1829
|
+
`;
|
|
1830
|
+
return nothing;
|
|
1831
|
+
}
|
|
1719
1832
|
_renderActions() {
|
|
1720
1833
|
const showScroll = this._chipBehaviour === "inline" && this._chipStrip.overflowing;
|
|
1721
|
-
const showArrow = !this._showClear && !this.
|
|
1834
|
+
const showArrow = !this._showClear && !this._inert;
|
|
1722
1835
|
return html`
|
|
1723
1836
|
<div class=${this._cls("mono-tag-input-actions", "actions")} mono-actions>
|
|
1724
1837
|
${showScroll ? html`
|
|
@@ -1750,6 +1863,7 @@ var MonoTagInputCore = (superClass) => {
|
|
|
1750
1863
|
${caretIcon()}
|
|
1751
1864
|
</span>
|
|
1752
1865
|
` : nothing}
|
|
1866
|
+
${this._renderSourceState()}
|
|
1753
1867
|
</div>
|
|
1754
1868
|
`;
|
|
1755
1869
|
}
|
|
@@ -2082,7 +2196,7 @@ var MonoTagInputCore = (superClass) => {
|
|
|
2082
2196
|
`;
|
|
2083
2197
|
}
|
|
2084
2198
|
_renderEmpty() {
|
|
2085
|
-
const text = this.dataSource && this._ds.loading ?
|
|
2199
|
+
const text = this.dataSource && this._ds.loading ? this.loadingText : "No items";
|
|
2086
2200
|
return html`<div class=${this._cls("mono-tag-input-empty", "empty")} mono-empty-row>${text}</div>`;
|
|
2087
2201
|
}
|
|
2088
2202
|
_renderItems() {
|
|
@@ -2320,6 +2434,9 @@ var MonoTagInputCore = (superClass) => {
|
|
|
2320
2434
|
?mono-clearable=${this.clearable}
|
|
2321
2435
|
?mono-checkable=${this.checkable}
|
|
2322
2436
|
?mono-searchable=${this.searchable}
|
|
2437
|
+
?mono-ds-loading=${this._busy}
|
|
2438
|
+
?mono-ds-error=${!!this._failure}
|
|
2439
|
+
aria-busy=${this._busy ? "true" : nothing}
|
|
2323
2440
|
>
|
|
2324
2441
|
${this._renderLabel()}
|
|
2325
2442
|
|
|
@@ -2339,9 +2456,10 @@ var MonoTagInputCore = (superClass) => {
|
|
|
2339
2456
|
type="text"
|
|
2340
2457
|
.value=${this._inputValue}
|
|
2341
2458
|
name=${ifDefined(this.name || void 0)}
|
|
2342
|
-
placeholder=${ifDefined(this.
|
|
2459
|
+
placeholder=${ifDefined(this._inputPlaceholder)}
|
|
2460
|
+
title=${ifDefined(this._dsErrorTitle)}
|
|
2343
2461
|
?disabled=${this.disabled}
|
|
2344
|
-
?readonly=${this.readonly || !this.searchable}
|
|
2462
|
+
?readonly=${this.readonly || !this.searchable || this._dsInert}
|
|
2345
2463
|
?required=${this.required && !this._hasValue}
|
|
2346
2464
|
aria-label=${ifDefined(ariaLabel)}
|
|
2347
2465
|
aria-invalid=${this._resolvedValidationState === "invalid" ? "true" : "false"}
|
|
@@ -2393,7 +2511,7 @@ var MonoTagInputCore = (superClass) => {
|
|
|
2393
2511
|
return this._open;
|
|
2394
2512
|
}
|
|
2395
2513
|
open() {
|
|
2396
|
-
if (this.
|
|
2514
|
+
if (this._inert) return;
|
|
2397
2515
|
this._open = true;
|
|
2398
2516
|
this._inputEl?.focus();
|
|
2399
2517
|
}
|
|
@@ -2405,7 +2523,7 @@ var MonoTagInputCore = (superClass) => {
|
|
|
2405
2523
|
else this.open();
|
|
2406
2524
|
}
|
|
2407
2525
|
clearTags() {
|
|
2408
|
-
if (this.
|
|
2526
|
+
if (this._inert) return;
|
|
2409
2527
|
this._setValue(this._keepFloor([]), { emitClear: true });
|
|
2410
2528
|
this._resetSearch();
|
|
2411
2529
|
}
|
|
@@ -2466,6 +2584,16 @@ var MonoTagInputCore = (superClass) => {
|
|
|
2466
2584
|
__decorate([property({ type: String })], MonoTagInputCoreClass.prototype, "name", void 0);
|
|
2467
2585
|
__decorate([property({ type: String })], MonoTagInputCoreClass.prototype, "label", void 0);
|
|
2468
2586
|
__decorate([property({ type: String })], MonoTagInputCoreClass.prototype, "placeholder", void 0);
|
|
2587
|
+
__decorate([property({
|
|
2588
|
+
type: String,
|
|
2589
|
+
attribute: "loading-text"
|
|
2590
|
+
})], MonoTagInputCoreClass.prototype, "loadingText", void 0);
|
|
2591
|
+
__decorate([property({
|
|
2592
|
+
type: String,
|
|
2593
|
+
attribute: "retry-label"
|
|
2594
|
+
})], MonoTagInputCoreClass.prototype, "retryLabel", void 0);
|
|
2595
|
+
__decorate([property({ converter: booleanStringConverter })], MonoTagInputCoreClass.prototype, "loading", void 0);
|
|
2596
|
+
__decorate([property({ attribute: "loading-error" })], MonoTagInputCoreClass.prototype, "loadingError", void 0);
|
|
2469
2597
|
__decorate([property({
|
|
2470
2598
|
type: String,
|
|
2471
2599
|
attribute: "helper-text"
|
|
@@ -2655,7 +2783,7 @@ var MonoTagInputCore = (superClass) => {
|
|
|
2655
2783
|
};
|
|
2656
2784
|
//#endregion
|
|
2657
2785
|
//#region src/components/tag-input/tag-input.css?raw
|
|
2658
|
-
var tag_input_default = "/* =========================================================================\r\n mono-tag-input — a port of Basecoat's multi-select combobox: `.combobox-chips`\r\n (the field), `.combobox-chip` (+ `-remove`) and the `.combobox [data-popover]`\r\n list (basecoat-css@1.0.2, vega style), on the `.field` / `.label` chrome the\r\n ported input already carries.\r\n\r\n Styled by ATTRIBUTE, like Basecoat — and the attributes mirror the element's\r\n props one for one, so hand-written markup reads like the Lit / Vue tag:\r\n\r\n <mono-tag-input size=\"sm\" color=\"danger\" variant=\"filled\" label=\"Tags\">\r\n <div mono-tag-input mono-size=\"sm\" mono-color=\"danger\" mono-variant=\"filled\">\r\n <label mono-label>Tags</label>\r\n <div mono-field>\r\n <div mono-chip mono-removable><span mono-chip-main><span mono-chip-content>\r\n <span mono-chip-label>Vue</span><button mono-chip-close>…</button></span></span></div>\r\n <input mono-native /> <div mono-actions><span mono-arrow>…</span></div>\r\n </div>\r\n </div>\r\n\r\n An absent attribute is the prop's default (`:not([mono-size])` = md,\r\n `:not([mono-color])` = primary, `:not([mono-variant])` = outlined). The element\r\n renders these attributes on its wrapper (both builds) plus the STATES\r\n `mono-open` / `mono-more-open`; the old classes (`.mono-tag-input.sm.open`) are\r\n still emitted as inert hooks until 2.0 but no rule here reads them. The tag\r\n chips are NOT `.mono-chip`s any more: they are Basecoat combobox chips, painted\r\n here (`[mono-tag-input] [mono-chip]`), and chip.css never sees them.\r\n\r\n Selector map (ours ≡ upstream):\r\n [mono-tag-input] ≡ .field (gap-3, as margins — see the root rule) + .combobox (position: relative)\r\n [mono-tag-input] > [mono-label] ≡ .field > label / .label\r\n [mono-tag-input] > [mono-field] ≡ .combobox-chips (min-h-9 gap-1.5 rounded-md border-input px-1.5 py-1.5 text-sm shadow-xs)\r\n [mono-field] > [mono-native] ≡ .combobox-chips > input[role='combobox'] (min-w-16 flex-1, borderless)\r\n [mono-field] [mono-chip] > [mono-chip-main] ≡ .combobox-chip (h-5.5 gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium)\r\n [mono-chip] [mono-chip-close] ≡ .combobox-chip-remove (-ms-1 opacity-50 hover:100, svg size-3.5)\r\n [mono-chip][mono-more] ≡ EXTENSION (the \"+N more\" counter chip, same box)\r\n [mono-actions] > [mono-arrow] > svg ≡ .combobox-trigger-icon (size-4 text-muted-foreground)\r\n [mono-actions] > [mono-clear] ≡ .combobox [data-clear] (size-6, painted as .btn[data-variant='ghost'])\r\n [mono-actions] > [mono-scroll] ≡ EXTENSION (the inline strip's ‹ › pager, same box)\r\n [mono-dropdown] ≡ .combobox [data-popover] + [role='listbox'] (bg-popover ring-1 rounded-md shadow-md, max-h-72 p-1 scroll)\r\n [mono-item] ≡ .combobox [role='option'] (gap-2 rounded-sm py-1.5 ps-2 text-sm)\r\n [mono-item][mono-active] / :hover ≡ [role='option'].active (bg-muted text-foreground)\r\n [mono-item][mono-selected] ≡ [role='option'][aria-selected='true'] — the --check-icon, unless the row has its own checkbox\r\n [mono-group] ≡ .combobox [role='heading'] (px-2 py-1.5 text-xs text-muted-foreground)\r\n [mono-select-all] ≡ EXTENSION (a sticky option row over the list)\r\n [mono-more-panel] ≡ [data-popover] holding the overflow chips\r\n [mono-empty-row] ≡ [role='listbox']::before (py-6 text-center text-sm)\r\n [mono-message-wrap] > [mono-message] ≡ .field > p / .field [role='alert']\r\n [mono-validation-state=\"invalid\"] ≡ .combobox-chips:has([aria-invalid=true]) + .field[data-invalid]\r\n [mono-validation-state=\"valid|warning\"] ≡ EXTENSION (the invalid pattern in --success / --warning)\r\n [mono-size=\"xs|sm|lg|xl|xxl\"] ≡ EXTENSION (the --mono-control-height-* ladder)\r\n [mono-variant=\"filled\"] ≡ EXTENSION (luma's .combobox-chips)\r\n [mono-variant=\"underlined\"] ≡ EXTENSION (sera's .combobox-chips: bottom edge only, no ring)\r\n\r\n Inner parts: [mono-label] (+ [mono-required-mark]), [mono-field] (+ [mono-inline],\r\n [mono-typing]), [mono-chip-strip], [mono-chip] (+ [mono-removable], [mono-more],\r\n [mono-chip-color=\"…\"]) > [mono-chip-main] > [mono-chip-content] > [mono-chip-dot] /\r\n [mono-chip-label] / [mono-chip-close] > [mono-icon], [mono-native], [mono-actions] >\r\n [mono-scroll=\"prev|next\"] (+ [mono-idle]) / [mono-clear] > [mono-icon] / [mono-arrow],\r\n [mono-dropdown], [mono-select-all] (+ [mono-loading]), [mono-item] (+ [mono-active],\r\n [mono-selected], [mono-disabled], [mono-check], [mono-level=\"n\"]) > [mono-check-box] /\r\n [mono-item-text] > [mono-item-title] / [mono-item-sub], [mono-group] (+ [mono-level],\r\n [mono-sticky], [mono-toggle], [mono-selected]) > [mono-group-label], [mono-empty-row],\r\n [mono-load-more] (+ [mono-loading]), [mono-list-slot], [mono-more-panel],\r\n [mono-message-wrap] > [mono-message=\"helper|valid|invalid|warning\"]. The shadow build\r\n marks an unassigned slot wrapper [mono-empty].\r\n\r\n THE PANELS ARE PORTALED (light build): [mono-dropdown] and [mono-more-panel] move\r\n into a `<div data-mono-popup-portal>` under <body> while open, and the portal\r\n mirrors the wrapper's class AND mono-* attributes, so every rule here is scoped\r\n under `[mono-tag-input]` and never relies on the panel being inside the field.\r\n\r\n FLAVORS set the same knobs as mono-input, renamed `--mono-tag-input-*`, plus the\r\n select's panel / option / group set (`--mono-tag-input-dropdown-*`,\r\n `--mono-tag-input-option-*`, `--mono-tag-input-group-*`) and the chip set\r\n (`--mono-tag-input-chip-{radius,bg,color,font-size,font-weight}`). Every fallback\r\n here is vega's value (`node scripts/basecoat-styles.mjs --varying \"^\\.combobox\"`).\r\n ========================================================================= */\r\n\r\nmono-tag-input {\r\n display: block;\r\n}\r\n\r\n[mono-tag-input] {\r\n /* ── palette: each slot is a public knob over a Basecoat token ─────────── */\r\n --_mono-tag-input-text: var(--mono-tag-input-color, var(--mono-tag-input-text, var(--foreground)));\r\n --_mono-tag-input-placeholder: var(--mono-tag-input-placeholder, var(--muted-foreground));\r\n --_mono-tag-input-muted: var(--mono-tag-input-muted, var(--muted-foreground));\r\n --_mono-tag-input-primary: var(--mono-tag-input-primary, var(--ring));\r\n --_mono-tag-input-secondary: var(--mono-tag-input-secondary, var(--muted-foreground));\r\n --_mono-tag-input-success: var(--mono-tag-input-success, var(--success));\r\n --_mono-tag-input-danger: var(--mono-tag-input-danger, var(--destructive));\r\n --_mono-tag-input-warning: var(--mono-tag-input-warning, var(--warning));\r\n --_mono-tag-input-info: var(--mono-tag-input-info, var(--info));\r\n --_mono-tag-input-teal: var(--mono-tag-input-teal, var(--teal));\r\n --_mono-tag-input-purple: var(--mono-tag-input-purple, var(--purple));\r\n --_mono-tag-input-neutral: var(--mono-tag-input-neutral, var(--neutral));\r\n --_mono-tag-input-dark: var(--mono-tag-input-dark, var(--dark));\r\n --_mono-tag-input-valid: var(--mono-tag-input-valid, var(--success));\r\n --_mono-tag-input-invalid: var(--mono-tag-input-invalid, var(--destructive));\r\n\r\n /* ── the painted result — three tiers, base = .combobox-chips (vega) ──── */\r\n --_mono-tag-input-ring-color: var(--mono-tag-input-ring-color, var(--mono-tag-input-focus-color, var(--_mono-tag-input-ring-color-preset, var(--_mono-tag-input-primary))));\r\n --_mono-tag-input-ring-width: var(--mono-tag-input-ring-width, var(--_mono-tag-input-ring-width-preset, var(--mono-ring-width)));\r\n --_mono-tag-input-ring-alpha: var(--mono-tag-input-ring-alpha, var(--mono-ring-alpha));\r\n --_mono-tag-input-border-color: var(--mono-tag-input-rest-border, var(--mono-tag-input-border-color, var(--mono-tag-input-border, var(--_mono-tag-input-border-color-preset, var(--input)))));\r\n --_mono-tag-input-bg: var(--mono-tag-input-bg, var(--mono-tag-input-surface, var(--_mono-tag-input-bg-preset, var(--mono-mode-surface))));\r\n --_mono-tag-input-shadow: var(--mono-tag-input-shadow, var(--_mono-tag-input-shadow-preset, 0 0 #0000));\r\n --_mono-tag-input-icon: var(--mono-tag-input-icon-size, calc(var(--mono-spacing) * 4));\r\n\r\n /* ── md metrics live on the unqualified root ON PURPOSE: hand-written\r\n `<div mono-tag-input>` that names no size renders exactly like size=\"md\".\r\n basecoat@1.0.2 styles/vega.css .combobox-chips — min-h-9 gap-1.5 rounded-md\r\n px-1.5 py-1.5 text-sm; .combobox-chip h-5.5 ── */\r\n --_mono-tag-input-height: var(--mono-tag-input-height-md, var(--mono-control-height-md));\r\n --_mono-tag-input-radius: var(--mono-tag-input-radius-md, var(--_mono-tag-input-radius-preset, var(--mono-tag-input-radius, var(--mono-radius-md))));\r\n --_mono-tag-input-padding-x: var(--mono-tag-input-padding-x-md, var(--mono-tag-input-padding-x, var(--_mono-tag-input-padding-x-preset, calc(var(--mono-spacing) * 1.5))));\r\n --_mono-tag-input-padding-y: var(--mono-tag-input-padding-y-md, var(--mono-tag-input-padding-y, calc(var(--mono-spacing) * 1.5)));\r\n --_mono-tag-input-gap: var(--mono-tag-input-chip-gap, calc(var(--mono-spacing) * 1.5));\r\n --_mono-tag-input-font-size: var(--mono-tag-input-font-md, var(--mono-text-sm));\r\n --_mono-tag-input-line-height: var(--mono-tag-input-line-height, var(--mono-tag-input-line-height-md, var(--mono-text-sm--lh)));\r\n --_mono-tag-input-chip-height: var(--mono-tag-input-chip-height-md, min(calc(var(--mono-spacing) * 5.5), var(--_mono-tag-input-chip-fit)));\r\n /* The room one row of chips has: the field's height minus its block padding and borders. Each\r\n size's DEFAULT chip height is capped by it, so the rule \"chip h + 2·py + 2px ≤ token\" holds\r\n under ANY control ladder — a dense flavor (mira: xs 20px) shrinks the chip instead of growing\r\n an empty field past the token. An explicit `--mono-tag-input-chip-height-*` is not capped. */\r\n --_mono-tag-input-chip-fit: calc(var(--_mono-tag-input-height) - 2 * var(--_mono-tag-input-padding-y) - 2 * var(--mono-border-width));\r\n --_mono-tag-input-chip-font-size: var(--mono-tag-input-chip-font-size, var(--mono-text-xs));\r\n --_mono-tag-input-chip-line-height: var(--mono-tag-input-chip-line-height, var(--mono-text-xs--lh));\r\n --_mono-tag-input-action: calc(var(--mono-spacing) * 6);\r\n --_mono-tag-input-clear-glyph: calc(var(--mono-spacing) * 3.5);\r\n\r\n /* basecoat@1.0.2 styles/vega.css .field — flex w-full flex-col gap-3; mono: BLOCK\r\n flow with the gap as margins, so a hand-written panel that no controller\r\n positions lands at its static position — right under the field, above the\r\n message — instead of a flex container's content-box top (see select.css) */\r\n --_mono-tag-input-gap-y: var(--mono-tag-input-gap, calc(var(--mono-spacing) * 3));\r\n position: relative;\r\n display: block;\r\n width: 100%;\r\n font-family: inherit;\r\n color: var(--_mono-tag-input-text);\r\n}\r\n\r\n[mono-tag-input],\r\n[mono-tag-input] *,\r\n[mono-tag-input] *::before,\r\n[mono-tag-input] *::after {\r\n box-sizing: border-box;\r\n}\r\n\r\n[mono-tag-input] :is([mono-label], [mono-message])[mono-empty] {\r\n display: none;\r\n}\r\n\r\n/* =========================================\r\n Sizes — an EMPTY field's painted height IS the token (tests/perf/field-heights);\r\n a second row of chips grows it. Each step keeps one row of chips + its block\r\n padding under the token: chip h + 2·py + 2px ≤ token.\r\n ========================================= */\r\n\r\n[mono-tag-input][mono-size=\"xs\"] {\r\n --_mono-tag-input-height: var(--mono-tag-input-height-xs, var(--mono-control-height-xs));\r\n --_mono-tag-input-radius: var(--mono-tag-input-radius-xs, var(--_mono-tag-input-radius-preset, var(--mono-tag-input-radius, var(--mono-radius-md))));\r\n --_mono-tag-input-padding-x: var(--mono-tag-input-padding-x-xs, var(--mono-tag-input-padding-x, var(--_mono-tag-input-padding-x-preset, var(--mono-spacing))));\r\n --_mono-tag-input-padding-y: var(--mono-tag-input-padding-y-xs, var(--mono-tag-input-padding-y, calc(var(--mono-spacing) * 0.5)));\r\n --_mono-tag-input-gap: var(--mono-tag-input-chip-gap, var(--mono-spacing));\r\n --_mono-tag-input-font-size: var(--mono-tag-input-font-xs, var(--mono-text-xs));\r\n --_mono-tag-input-line-height: var(--mono-tag-input-line-height, var(--mono-tag-input-line-height-xs, var(--mono-text-xs--lh)));\r\n --_mono-tag-input-chip-height: var(--mono-tag-input-chip-height-xs, min(calc(var(--mono-spacing) * 4.5), var(--_mono-tag-input-chip-fit)));\r\n --_mono-tag-input-icon: var(--mono-tag-input-icon-size, calc(var(--mono-spacing) * 3.5));\r\n --_mono-tag-input-action: calc(var(--mono-spacing) * 4);\r\n --_mono-tag-input-clear-glyph: calc(var(--mono-spacing) * 3);\r\n}\r\n\r\n[mono-tag-input][mono-size=\"sm\"] {\r\n --_mono-tag-input-height: var(--mono-tag-input-height-sm, var(--mono-control-height-sm));\r\n --_mono-tag-input-radius: var(--mono-tag-input-radius-sm, var(--_mono-tag-input-radius-preset, var(--mono-tag-input-radius, var(--mono-radius-md))));\r\n --_mono-tag-input-padding-x: var(--mono-tag-input-padding-x-sm, var(--mono-tag-input-padding-x, var(--_mono-tag-input-padding-x-preset, var(--mono-spacing))));\r\n --_mono-tag-input-padding-y: var(--mono-tag-input-padding-y-sm, var(--mono-tag-input-padding-y, var(--mono-spacing)));\r\n --_mono-tag-input-gap: var(--mono-tag-input-chip-gap, var(--mono-spacing));\r\n --_mono-tag-input-font-size: var(--mono-tag-input-font-sm, var(--mono-tag-input-font-md, var(--mono-text-sm)));\r\n --_mono-tag-input-line-height: var(--mono-tag-input-line-height, var(--mono-tag-input-line-height-sm, var(--mono-text-sm--lh)));\r\n --_mono-tag-input-chip-height: var(--mono-tag-input-chip-height-sm, min(calc(var(--mono-spacing) * 5), var(--_mono-tag-input-chip-fit)));\r\n --_mono-tag-input-action: calc(var(--mono-spacing) * 5);\r\n}\r\n\r\n[mono-tag-input][mono-size=\"lg\"] {\r\n --_mono-tag-input-height: var(--mono-tag-input-height-lg, var(--mono-control-height-lg));\r\n --_mono-tag-input-radius: var(--mono-tag-input-radius-lg, var(--_mono-tag-input-radius-preset, var(--mono-tag-input-radius, var(--mono-radius-md))));\r\n --_mono-tag-input-padding-x: var(--mono-tag-input-padding-x-lg, var(--mono-tag-input-padding-x, var(--_mono-tag-input-padding-x-preset, calc(var(--mono-spacing) * 1.5))));\r\n --_mono-tag-input-padding-y: var(--mono-tag-input-padding-y-lg, var(--mono-tag-input-padding-y, calc(var(--mono-spacing) * 1.5)));\r\n --_mono-tag-input-font-size: var(--mono-tag-input-font-lg, var(--mono-tag-input-font-md, var(--mono-text-sm)));\r\n --_mono-tag-input-line-height: var(--mono-tag-input-line-height, var(--mono-tag-input-line-height-lg, var(--mono-text-sm--lh)));\r\n --_mono-tag-input-chip-height: var(--mono-tag-input-chip-height-lg, min(calc(var(--mono-spacing) * 6), var(--_mono-tag-input-chip-fit)));\r\n}\r\n\r\n[mono-tag-input][mono-size=\"xl\"] {\r\n --_mono-tag-input-height: var(--mono-tag-input-height-xl, var(--mono-control-height-xl));\r\n --_mono-tag-input-radius: var(--mono-tag-input-radius-xl, var(--_mono-tag-input-radius-preset, var(--mono-tag-input-radius, var(--mono-radius-md))));\r\n --_mono-tag-input-padding-x: var(--mono-tag-input-padding-x-xl, var(--mono-tag-input-padding-x, var(--_mono-tag-input-padding-x-preset, calc(var(--mono-spacing) * 2))));\r\n --_mono-tag-input-padding-y: var(--mono-tag-input-padding-y-xl, var(--mono-tag-input-padding-y, calc(var(--mono-spacing) * 2)));\r\n --_mono-tag-input-gap: var(--mono-tag-input-chip-gap, calc(var(--mono-spacing) * 2));\r\n --_mono-tag-input-font-size: var(--mono-tag-input-font-xl, var(--mono-text-base));\r\n --_mono-tag-input-line-height: var(--mono-tag-input-line-height, var(--mono-tag-input-line-height-xl, var(--mono-text-base--lh)));\r\n --_mono-tag-input-chip-height: var(--mono-tag-input-chip-height-xl, min(calc(var(--mono-spacing) * 6.5), var(--_mono-tag-input-chip-fit)));\r\n --_mono-tag-input-chip-font-size: var(--mono-tag-input-chip-font-size, var(--mono-text-sm));\r\n --_mono-tag-input-chip-line-height: var(--mono-tag-input-chip-line-height, var(--mono-text-sm--lh));\r\n --_mono-tag-input-icon: var(--mono-tag-input-icon-size, calc(var(--mono-spacing) * 5));\r\n --_mono-tag-input-action: calc(var(--mono-spacing) * 7);\r\n --_mono-tag-input-clear-glyph: calc(var(--mono-spacing) * 4);\r\n}\r\n\r\n[mono-tag-input][mono-size=\"xxl\"] {\r\n --_mono-tag-input-height: var(--mono-tag-input-height-xxl, var(--mono-control-height-xxl));\r\n --_mono-tag-input-radius: var(--mono-tag-input-radius-xxl, var(--_mono-tag-input-radius-preset, var(--mono-tag-input-radius, var(--mono-radius-md))));\r\n --_mono-tag-input-padding-x: var(--mono-tag-input-padding-x-xxl, var(--mono-tag-input-padding-x, var(--_mono-tag-input-padding-x-preset, calc(var(--mono-spacing) * 2.5))));\r\n --_mono-tag-input-padding-y: var(--mono-tag-input-padding-y-xxl, var(--mono-tag-input-padding-y, calc(var(--mono-spacing) * 2)));\r\n --_mono-tag-input-gap: var(--mono-tag-input-chip-gap, calc(var(--mono-spacing) * 2));\r\n --_mono-tag-input-font-size: var(--mono-tag-input-font-xxl, var(--mono-text-lg));\r\n --_mono-tag-input-line-height: var(--mono-tag-input-line-height, var(--mono-tag-input-line-height-xxl, var(--mono-text-lg--lh)));\r\n --_mono-tag-input-chip-height: var(--mono-tag-input-chip-height-xxl, min(calc(var(--mono-spacing) * 7), var(--_mono-tag-input-chip-fit)));\r\n --_mono-tag-input-chip-font-size: var(--mono-tag-input-chip-font-size, var(--mono-text-sm));\r\n --_mono-tag-input-chip-line-height: var(--mono-tag-input-chip-line-height, var(--mono-text-sm--lh));\r\n --_mono-tag-input-icon: var(--mono-tag-input-icon-size, calc(var(--mono-spacing) * 5));\r\n --_mono-tag-input-action: calc(var(--mono-spacing) * 8);\r\n --_mono-tag-input-clear-glyph: calc(var(--mono-spacing) * 4);\r\n}\r\n\r\n/* =========================================\r\n Variants — each writes only `*-preset` slots\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 styles/vega.css .combobox-chips — rounded-md border border-input\r\n bg-transparent shadow-xs (dark:bg-input/30 via --mono-mode-surface) */\r\n[mono-tag-input]:is(:not([mono-variant]), [mono-variant=\"outlined\"]) {\r\n --_mono-tag-input-bg-preset: var(--mono-tag-input-outline-bg);\r\n --_mono-tag-input-border-color-preset: var(--mono-tag-input-outline-border-color);\r\n --_mono-tag-input-side-border-color-preset: var(--mono-tag-input-outline-side-border-color);\r\n --_mono-tag-input-shadow-preset: var(--mono-tag-input-outline-shadow, var(--mono-shadow-xs));\r\n --_mono-tag-input-ring-width-preset: var(--mono-tag-input-outline-ring-width);\r\n --_mono-tag-input-radius-preset: var(--mono-tag-input-outline-radius);\r\n --_mono-tag-input-padding-x-preset: var(--mono-tag-input-outline-padding-x);\r\n}\r\n\r\n/* EXTENSION — filled ≡ basecoat@1.0.2 styles/luma.css .combobox-chips */\r\n[mono-tag-input][mono-variant=\"filled\"] {\r\n --_mono-tag-input-bg-preset: var(--mono-tag-input-filled-bg, color-mix(in oklab, var(--input) 50%, transparent));\r\n --_mono-tag-input-border-color-preset: transparent;\r\n --_mono-tag-input-shadow-preset: 0 0 #0000;\r\n}\r\n\r\n/* EXTENSION — underlined ≡ basecoat@1.0.2 styles/sera.css .combobox-chips */\r\n[mono-tag-input][mono-variant=\"underlined\"] {\r\n --_mono-tag-input-bg-preset: transparent;\r\n --_mono-tag-input-side-border-color-preset: transparent;\r\n --_mono-tag-input-shadow-preset: 0 0 #0000;\r\n --_mono-tag-input-ring-width-preset: 0px;\r\n --_mono-tag-input-radius-preset: 0;\r\n --_mono-tag-input-padding-x-preset: 0;\r\n}\r\n\r\n/* =========================================\r\n Colours — the `color` prop is the FOCUS colour (ring + focused border)\r\n ========================================= */\r\n\r\n[mono-tag-input]:is(:not([mono-color]), [mono-color=\"primary\"]) {\r\n --_mono-tag-input-ring-color-preset: var(--_mono-tag-input-primary);\r\n}\r\n[mono-tag-input][mono-color=\"secondary\"] {\r\n --_mono-tag-input-ring-color-preset: var(--_mono-tag-input-secondary);\r\n}\r\n[mono-tag-input][mono-color=\"success\"] {\r\n --_mono-tag-input-ring-color-preset: var(--_mono-tag-input-success);\r\n}\r\n[mono-tag-input][mono-color=\"danger\"] {\r\n --_mono-tag-input-ring-color-preset: var(--_mono-tag-input-danger);\r\n}\r\n[mono-tag-input][mono-color=\"warning\"] {\r\n --_mono-tag-input-ring-color-preset: var(--_mono-tag-input-warning);\r\n}\r\n[mono-tag-input][mono-color=\"info\"] {\r\n --_mono-tag-input-ring-color-preset: var(--_mono-tag-input-info);\r\n}\r\n[mono-tag-input][mono-color=\"teal\"] {\r\n --_mono-tag-input-ring-color-preset: var(--_mono-tag-input-teal);\r\n}\r\n[mono-tag-input][mono-color=\"purple\"] {\r\n --_mono-tag-input-ring-color-preset: var(--_mono-tag-input-purple);\r\n}\r\n[mono-tag-input][mono-color=\"neutral\"] {\r\n --_mono-tag-input-ring-color-preset: var(--_mono-tag-input-neutral);\r\n}\r\n[mono-tag-input][mono-color=\"dark\"] {\r\n --_mono-tag-input-ring-color-preset: var(--_mono-tag-input-dark);\r\n}\r\n\r\n/* =========================================\r\n Label\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 styles/vega.css .field > label, .label — flex items-center\r\n gap-2 text-sm leading-none font-medium select-none w-fit */\r\n[mono-tag-input] > [mono-label] {\r\n display: flex;\r\n align-items: center;\r\n width: fit-content;\r\n margin: 0 0 var(--_mono-tag-input-gap-y);\r\n gap: var(--mono-tag-input-label-gap, calc(var(--mono-spacing) * 2));\r\n font-size: var(--mono-tag-input-label-font-size, var(--mono-text-sm));\r\n line-height: var(--mono-tag-input-label-line-height, 1);\r\n font-weight: var(--mono-tag-input-label-font-weight, var(--mono-label-font-weight, var(--mono-font-weight-medium)));\r\n text-transform: var(--mono-tag-input-label-text-transform, none);\r\n letter-spacing: var(--mono-tag-input-label-letter-spacing, normal);\r\n color: var(--_mono-tag-input-text);\r\n user-select: none;\r\n}\r\n\r\n[mono-tag-input][mono-disabled] > [mono-label] {\r\n opacity: 0.5;\r\n pointer-events: none;\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .field — data-invalid:text-destructive */\r\n[mono-tag-input][mono-validation-state=\"invalid\"] > [mono-label] {\r\n color: var(--_mono-tag-input-invalid);\r\n}\r\n\r\n[mono-tag-input] [mono-required-mark] {\r\n color: var(--_mono-tag-input-danger);\r\n}\r\n\r\n/* =========================================\r\n The field — the chip box\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 components/combobox.css .combobox-chips — flex w-full min-w-0\r\n flex-wrap items-center */\r\n/* basecoat@1.0.2 styles/vega.css .combobox-chips — min-h-9 gap-1.5 rounded-md\r\n border border-input bg-transparent bg-clip-padding px-1.5 py-1.5 text-sm\r\n shadow-xs transition-[color,box-shadow] focus-within:border-ring\r\n focus-within:ring-3 focus-within:ring-ring/50 has-[[aria-invalid=true]]:…;\r\n mono: `--tw-ring-*` flattened to the ring + shadow slots, the min-height is\r\n the control token, the side edges read their own slot */\r\n[mono-tag-input] > [mono-field] {\r\n --_mono-tag-input-bc: var(--_mono-tag-input-border-color);\r\n --_mono-tag-input-side-bc: var(--mono-tag-input-side-border-color, var(--_mono-tag-input-side-border-color-preset, var(--_mono-tag-input-bc)));\r\n --_mono-tag-input-ring: 0 0 #0000;\r\n\r\n position: relative;\r\n display: flex;\r\n flex-wrap: wrap;\r\n align-items: center;\r\n gap: var(--_mono-tag-input-gap);\r\n width: 100%;\r\n min-width: 0;\r\n min-height: var(--_mono-tag-input-height);\r\n padding-block: var(--_mono-tag-input-padding-y);\r\n padding-inline: var(--_mono-tag-input-padding-x);\r\n outline-style: none;\r\n border: var(--mono-border-width) solid var(--_mono-tag-input-bc);\r\n border-top-color: var(--_mono-tag-input-side-bc);\r\n border-inline-color: var(--_mono-tag-input-side-bc);\r\n border-radius: var(--_mono-tag-input-radius);\r\n background: var(--_mono-tag-input-bg);\r\n background-clip: padding-box;\r\n color: var(--_mono-tag-input-text);\r\n box-shadow: var(--_mono-tag-input-ring), var(--_mono-tag-input-shadow);\r\n font-size: var(--_mono-tag-input-font-size);\r\n line-height: var(--_mono-tag-input-line-height);\r\n cursor: text;\r\n transition-property: color, box-shadow, border-color, background-color;\r\n transition-timing-function: var(--mono-ease);\r\n transition-duration: var(--mono-duration);\r\n\r\n /* focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 */\r\n &:focus-within {\r\n --_mono-tag-input-bc: var(--_mono-tag-input-ring-color);\r\n --_mono-tag-input-ring: 0 0 0 var(--_mono-tag-input-ring-width) color-mix(in oklab, var(--_mono-tag-input-ring-color) var(--_mono-tag-input-ring-alpha), transparent);\r\n }\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .combobox-chips — has-[[aria-invalid=true]]:border-destructive\r\n has-[[aria-invalid=true]]:ring-3 has-[[aria-invalid=true]]:ring-destructive/20 */\r\n[mono-tag-input][mono-validation-state=\"invalid\"] > [mono-field],\r\n[mono-tag-input] > [mono-field]:has(> [mono-native][aria-invalid=\"true\"]) {\r\n --_mono-tag-input-bc: var(--mono-mode-invalid-border);\r\n --_mono-tag-input-ring: 0 0 0 var(--_mono-tag-input-ring-width) var(--mono-mode-invalid-ring);\r\n}\r\n\r\n/* EXTENSION — valid / warning are the invalid pattern in the role's colour */\r\n[mono-tag-input][mono-validation-state=\"valid\"] > [mono-field] {\r\n --_mono-tag-input-bc: color-mix(in oklab, var(--_mono-tag-input-valid) var(--mono-mode-state-border-alpha), transparent);\r\n --_mono-tag-input-ring: 0 0 0 var(--_mono-tag-input-ring-width) color-mix(in oklab, var(--_mono-tag-input-valid) var(--mono-mode-state-ring-alpha), transparent);\r\n}\r\n[mono-tag-input][mono-validation-state=\"warning\"] > [mono-field] {\r\n --_mono-tag-input-bc: color-mix(in oklab, var(--_mono-tag-input-warning) var(--mono-mode-state-border-alpha), transparent);\r\n --_mono-tag-input-ring: 0 0 0 var(--_mono-tag-input-ring-width) color-mix(in oklab, var(--_mono-tag-input-warning) var(--mono-mode-state-ring-alpha), transparent);\r\n}\r\n\r\n/* EXTENSION — readonly: a muted surface */\r\n[mono-tag-input][mono-readonly] > [mono-field] {\r\n background: var(--mono-tag-input-readonly-bg, var(--muted));\r\n cursor: default;\r\n}\r\n\r\n/* .combobox-chips > input:disabled — opacity-50 (on the box, so the chips fade\r\n with it). The strip's ‹ › pager opts back in so the chips can still be read. */\r\n[mono-tag-input][mono-disabled] > [mono-field] {\r\n opacity: 0.5;\r\n pointer-events: none;\r\n cursor: not-allowed;\r\n background: var(--mono-tag-input-disabled-bg, var(--_mono-tag-input-bg));\r\n}\r\n\r\n[mono-tag-input][mono-disabled] [mono-scroll]:not([mono-idle]) {\r\n pointer-events: auto;\r\n cursor: pointer;\r\n}\r\n\r\n/* ── the actions row stays on the FIRST row ──────────────────────────────\r\n The field wraps, and the row is its last child, so once the chips wrapped it\r\n rode down to the bottom-right. Pinned out of that flow instead; `top` centres\r\n it on the single-row height. Not in inline mode: an inline field never wraps,\r\n so the row sits in normal flow and the strip flexes against it. */\r\n[mono-tag-input] > [mono-field]:not([mono-inline]) {\r\n padding-inline-end: calc(var(--_mono-tag-input-padding-x) + var(--_mono-tag-input-action) + var(--mono-spacing));\r\n}\r\n\r\n[mono-tag-input] > [mono-field]:not([mono-inline]) > [mono-actions] {\r\n position: absolute;\r\n inset-inline-end: var(--_mono-tag-input-padding-x);\r\n top: calc((var(--_mono-tag-input-height) - var(--_mono-tag-input-action)) / 2);\r\n}\r\n\r\n/* =========================================\r\n The text box\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 components/combobox.css .combobox-chips > input[role='combobox']\r\n — min-w-16 flex-1 bg-transparent outline-none placeholder:text-muted-foreground */\r\n[mono-tag-input] [mono-native] {\r\n flex: 1 1 calc(var(--mono-spacing) * 16);\r\n min-width: calc(var(--mono-spacing) * 16);\r\n align-self: stretch;\r\n appearance: none;\r\n margin: 0;\r\n padding: 0;\r\n border: 0;\r\n border-radius: 0;\r\n outline: none;\r\n background: transparent;\r\n box-shadow: none;\r\n color: var(--_mono-tag-input-text);\r\n font-family: inherit;\r\n font-size: var(--_mono-tag-input-font-size);\r\n line-height: var(--_mono-tag-input-line-height);\r\n /* The chip row is the box's height; the text box never exceeds it. `height`, not only\r\n `min-height`: an input's own line box is its floor, so with a chip shorter than the line (a\r\n dense flavor's capped chip — mira xs: 14px chip, 16px line) the input set the row and an\r\n empty field came out 2px over the control token. The 12px glyphs still fit. */\r\n min-height: var(--_mono-tag-input-chip-height);\r\n height: var(--_mono-tag-input-chip-height);\r\n\r\n &:focus,\r\n &:focus-visible {\r\n outline: none !important;\r\n }\r\n\r\n &::placeholder {\r\n color: var(--_mono-tag-input-placeholder);\r\n }\r\n\r\n &:disabled,\r\n &:read-only {\r\n cursor: inherit;\r\n }\r\n}\r\n\r\n/* =========================================\r\n Chips\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 components/combobox.css .combobox-chip — inline-flex w-fit\r\n shrink-0 items-center whitespace-nowrap */\r\n[mono-tag-input] [mono-chip] {\r\n display: inline-flex;\r\n width: fit-content;\r\n max-width: 100%;\r\n flex-shrink: 0;\r\n align-items: center;\r\n white-space: nowrap;\r\n vertical-align: middle;\r\n line-height: 1;\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .combobox-chip — h-5.5 gap-1 rounded-sm bg-muted\r\n px-1.5 text-xs font-medium text-foreground, has-[>.combobox-chip-remove]:pe-0 */\r\n[mono-tag-input] [mono-chip] > [mono-chip-main] {\r\n display: inline-flex;\r\n align-items: center;\r\n height: var(--_mono-tag-input-chip-height);\r\n max-width: 100%;\r\n gap: var(--mono-tag-input-chip-content-gap, var(--mono-spacing));\r\n margin: 0;\r\n padding-inline: var(--mono-tag-input-chip-padding-x, calc(var(--mono-spacing) * 1.5));\r\n border: 0;\r\n border-radius: var(--mono-tag-input-chip-radius, var(--mono-radius-sm));\r\n background: var(--mono-tag-input-chip-bg, var(--muted));\r\n color: var(--mono-tag-input-chip-color, var(--_mono-tag-input-text));\r\n font-family: inherit;\r\n font-size: var(--_mono-tag-input-chip-font-size);\r\n line-height: var(--_mono-tag-input-chip-line-height);\r\n font-weight: var(--mono-tag-input-chip-font-weight, var(--mono-font-weight-medium));\r\n text-decoration: none;\r\n cursor: default;\r\n}\r\n\r\n[mono-tag-input] [mono-chip][mono-removable] > [mono-chip-main] {\r\n padding-inline-end: 0;\r\n}\r\n\r\n[mono-tag-input] [mono-chip] [mono-chip-content] {\r\n display: inline-flex;\r\n align-items: center;\r\n gap: inherit;\r\n min-width: 0;\r\n max-width: 100%;\r\n height: 100%;\r\n}\r\n\r\n[mono-tag-input] [mono-chip] [mono-chip-label] {\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n\r\n/* EXTENSION — `chip.dot`: a coloured dot before the label (the badge's dot idiom) */\r\n[mono-tag-input] [mono-chip] [mono-chip-dot] {\r\n flex: 0 0 auto;\r\n width: calc(var(--mono-spacing) * 1.5);\r\n height: calc(var(--mono-spacing) * 1.5);\r\n border-radius: var(--mono-radius-full);\r\n background: currentColor;\r\n}\r\n\r\n/* EXTENSION — `chip.color` pins a hue: the tonal pattern (bg-x/10 text-x, dark 20) */\r\n[mono-tag-input] [mono-chip][mono-chip-color=\"primary\"] > [mono-chip-main] { background: color-mix(in oklab, var(--primary) var(--mono-mode-tint), transparent); color: var(--primary); }\r\n[mono-tag-input] [mono-chip][mono-chip-color=\"secondary\"] > [mono-chip-main] { background: var(--secondary); color: var(--secondary-foreground); }\r\n[mono-tag-input] [mono-chip][mono-chip-color=\"success\"] > [mono-chip-main] { background: color-mix(in oklab, var(--success) var(--mono-mode-tint), transparent); color: var(--success); }\r\n[mono-tag-input] [mono-chip][mono-chip-color=\"danger\"] > [mono-chip-main] { background: color-mix(in oklab, var(--destructive) var(--mono-mode-tint), transparent); color: var(--destructive); }\r\n[mono-tag-input] [mono-chip][mono-chip-color=\"warning\"] > [mono-chip-main] { background: color-mix(in oklab, var(--warning) var(--mono-mode-tint), transparent); color: var(--warning); }\r\n[mono-tag-input] [mono-chip][mono-chip-color=\"info\"] > [mono-chip-main] { background: color-mix(in oklab, var(--info) var(--mono-mode-tint), transparent); color: var(--info); }\r\n[mono-tag-input] [mono-chip][mono-chip-color=\"teal\"] > [mono-chip-main] { background: color-mix(in oklab, var(--teal) var(--mono-mode-tint), transparent); color: var(--teal); }\r\n[mono-tag-input] [mono-chip][mono-chip-color=\"purple\"] > [mono-chip-main] { background: color-mix(in oklab, var(--purple) var(--mono-mode-tint), transparent); color: var(--purple); }\r\n[mono-tag-input] [mono-chip][mono-chip-color=\"neutral\"] > [mono-chip-main] { background: color-mix(in oklab, var(--neutral) var(--mono-mode-tint), transparent); color: var(--neutral); }\r\n[mono-tag-input] [mono-chip][mono-chip-color=\"dark\"] > [mono-chip-main] { background: var(--dark); color: var(--dark-foreground); }\r\n\r\n/* basecoat@1.0.2 components/combobox.css .combobox-chip-remove — inline-flex\r\n shrink-0 items-center justify-center */\r\n/* basecoat@1.0.2 styles/vega.css .combobox-chip-remove — -ms-1 opacity-50\r\n hover:opacity-100, svg size-3.5 */\r\n[mono-tag-input] [mono-chip] [mono-chip-close] {\r\n display: inline-flex;\r\n flex-shrink: 0;\r\n align-items: center;\r\n justify-content: center;\r\n /* explicit: the element still carries chip.css's `.chip-close` class as a hook,\r\n which pins a 1rem box — the raw markup has no such class */\r\n width: auto;\r\n height: 100%;\r\n min-width: 0;\r\n margin: 0;\r\n transform: none;\r\n margin-inline-start: calc(var(--mono-spacing) * -1);\r\n padding: 0 var(--mono-spacing);\r\n border: 0;\r\n border-radius: inherit;\r\n background: transparent;\r\n color: inherit;\r\n font: inherit;\r\n line-height: 1;\r\n opacity: 0.5;\r\n cursor: pointer;\r\n outline-style: none;\r\n transition-property: opacity;\r\n transition-timing-function: var(--mono-ease);\r\n transition-duration: var(--mono-duration);\r\n\r\n &:focus-visible {\r\n opacity: 1;\r\n }\r\n}\r\n\r\n@media (hover: hover) {\r\n [mono-tag-input] [mono-chip] [mono-chip-close]:hover {\r\n opacity: 1;\r\n }\r\n}\r\n\r\n[mono-tag-input] [mono-chip] [mono-chip-close] > :is(svg, .mono-icon, [mono-icon]) {\r\n display: block;\r\n width: calc(var(--mono-spacing) * 3.5);\r\n height: calc(var(--mono-spacing) * 3.5);\r\n pointer-events: none;\r\n}\r\n\r\n/* EXTENSION — the \"+N more\" counter chip is a control */\r\n[mono-tag-input] [mono-chip][mono-more] > [mono-chip-main] {\r\n cursor: pointer;\r\n outline-style: none;\r\n}\r\n\r\n[mono-tag-input] [mono-chip][mono-more] > [mono-chip-main]:focus-visible {\r\n box-shadow: 0 0 0 var(--_mono-tag-input-ring-width) color-mix(in oklab, var(--_mono-tag-input-ring-color) var(--_mono-tag-input-ring-alpha), transparent);\r\n}\r\n\r\n@media (hover: hover) {\r\n [mono-tag-input] [mono-chip][mono-more] > [mono-chip-main]:hover {\r\n background: var(--mono-mode-surface-hover);\r\n }\r\n}\r\n\r\n/* ── the inline chip strip (`chip.behaviour: 'inline'`) ──────────────────\r\n One line that never grows: the field stops wrapping, the chips live in their\r\n own strip, and the strip absorbs the overflow instead of the field.\r\n\r\n `overflow-x: hidden` — NOT `auto` — is the whole scroll contract. Hidden still\r\n honours a programmatic `scrollLeft`, so `ChipStripController` can page the\r\n strip while the browser paints no scrollbar. */\r\n[mono-tag-input] > [mono-field][mono-inline] {\r\n flex-wrap: nowrap;\r\n min-width: 0;\r\n}\r\n\r\n[mono-tag-input] [mono-chip-strip] {\r\n display: flex;\r\n flex-wrap: nowrap;\r\n align-items: center;\r\n gap: var(--_mono-tag-input-gap);\r\n flex: 0 1 auto;\r\n min-width: 0;\r\n overflow-x: hidden;\r\n overflow-y: hidden;\r\n /* NO `scroll-behavior: smooth` — see ChipStripController (one scroll event per\r\n frame would reposition every open popup). */\r\n}\r\n\r\n[mono-tag-input] [mono-chip-strip] > * {\r\n flex-shrink: 0;\r\n}\r\n\r\n/* The text box takes the SLACK: `flex-basis: 0` contributes nothing to the\r\n overflow calculation, so when the chips overflow it collapses and the strip\r\n runs up to the pager; focus earns a caret's room, typing earns a real box. */\r\n[mono-tag-input] > [mono-field][mono-inline] > [mono-native] {\r\n flex: 1 1 0;\r\n min-width: 0;\r\n}\r\n\r\n[mono-tag-input] > [mono-field][mono-inline] > [mono-native]:focus,\r\n[mono-tag-input] > [mono-field][mono-inline] > [mono-native]:focus-visible {\r\n min-width: calc(var(--mono-spacing) * 5);\r\n}\r\n\r\n[mono-tag-input] > [mono-field][mono-inline][mono-typing] > [mono-native] {\r\n min-width: calc(var(--mono-spacing) * 24);\r\n}\r\n\r\n/* =========================================\r\n Actions — ‹ › pager, clear, caret\r\n ========================================= */\r\n\r\n[mono-tag-input] [mono-actions] {\r\n display: flex;\r\n align-items: center;\r\n gap: var(--mono-spacing);\r\n flex: 0 0 auto;\r\n line-height: 1;\r\n}\r\n\r\n/* basecoat@1.0.2 components/combobox.css .combobox [data-clear] — size-6 border-0\r\n bg-transparent p-0 text-current; the caret ≡ .combobox-trigger-icon (size-4\r\n text-muted-foreground), the pager the same box. Painted as .btn[data-variant='ghost']. */\r\n[mono-tag-input] [mono-clear],\r\n[mono-tag-input] [mono-arrow],\r\n[mono-tag-input] [mono-scroll] {\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n flex: 0 0 auto;\r\n width: var(--_mono-tag-input-action);\r\n height: var(--_mono-tag-input-action);\r\n margin: 0;\r\n padding: 0;\r\n border: 0;\r\n border-radius: var(--mono-tag-input-clear-radius, calc(var(--radius) - 5px));\r\n background: transparent;\r\n color: var(--_mono-tag-input-muted);\r\n font: inherit;\r\n line-height: 1;\r\n cursor: pointer;\r\n outline-style: none;\r\n transition-property: color, background-color, transform;\r\n transition-timing-function: var(--mono-ease);\r\n transition-duration: var(--mono-duration);\r\n}\r\n\r\n[mono-tag-input] :is([mono-clear], [mono-arrow], [mono-scroll]) > :is(svg, .mono-icon, [mono-icon]) {\r\n display: block;\r\n width: var(--_mono-tag-input-icon);\r\n height: var(--_mono-tag-input-icon);\r\n pointer-events: none;\r\n}\r\n\r\n[mono-tag-input] [mono-clear] > :is(svg, .mono-icon, [mono-icon]) {\r\n width: var(--_mono-tag-input-clear-glyph);\r\n height: var(--_mono-tag-input-clear-glyph);\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .btn[data-variant='ghost'] — hover:bg-muted hover:text-foreground */\r\n@media (hover: hover) {\r\n [mono-tag-input] :is([mono-clear], [mono-arrow], [mono-scroll]):hover {\r\n background: var(--mono-mode-ghost-hover);\r\n color: var(--_mono-tag-input-text);\r\n }\r\n}\r\n\r\n/* EXTENSION — the caret turns while the panel is open */\r\n[mono-tag-input][mono-open] [mono-arrow] > :is(svg, .mono-icon, [mono-icon]) {\r\n transform: rotate(180deg);\r\n}\r\n\r\n/* At an end of the strip the pager keeps its box but disappears — hiding it with\r\n `display: none` would shrink the row and shove the strip sideways mid-click. */\r\n[mono-tag-input] [mono-scroll][mono-idle] {\r\n visibility: hidden;\r\n pointer-events: none;\r\n}\r\n\r\n/* =========================================\r\n The panel\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 components/popover.css [data-popover] — absolute z-50 overflow;\r\n mono: `display: none` while closed, `--mono-popup-z` from the shared stack,\r\n `--mono-popup-avail-h` from the portal controller */\r\n/* basecoat@1.0.2 styles/vega.css .combobox [data-popover] — bg-popover\r\n text-popover-foreground ring-foreground/10 max-h-72 rounded-md p-0 shadow-md ring-1 */\r\n/* basecoat@1.0.2 styles/vega.css .combobox [role='listbox'] — max-h-[min(18rem,\r\n var(--available-height,18rem))] scroll-py-1 overflow-y-auto p-1 (our panel IS\r\n the listbox: one scrolling box) */\r\n[mono-tag-input] > [mono-dropdown] {\r\n position: absolute;\r\n /* `top: auto` = the static position (under the field, before the message); the\r\n 6px offset is a transform the controller's inline `transform: none` cancels */\r\n top: auto;\r\n transform: translateY(calc(var(--mono-spacing) * 1.5));\r\n left: 0;\r\n right: 0;\r\n z-index: var(--mono-popup-z, 1000);\r\n display: none;\r\n min-width: var(--mono-tag-input-dropdown-min-width, 9rem);\r\n max-height: min(var(--_mono-tag-input-panel-max-h, 18rem), var(--mono-popup-avail-h, 100vh));\r\n padding: var(--mono-tag-input-dropdown-padding, var(--mono-spacing));\r\n overflow: auto;\r\n overscroll-behavior: contain;\r\n scroll-padding-block: var(--mono-tag-input-dropdown-padding, var(--mono-spacing));\r\n isolation: isolate;\r\n border-radius: var(--mono-tag-input-dropdown-radius, var(--mono-radius-md));\r\n background: var(--mono-tag-input-dropdown-bg, var(--popover));\r\n color: var(--mono-tag-input-dropdown-color, var(--popover-foreground));\r\n box-shadow: var(--mono-tag-input-dropdown-ring, 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent)), var(--mono-tag-input-dropdown-shadow, var(--mono-shadow-md));\r\n font-size: var(--mono-tag-input-option-font-size, var(--mono-text-sm));\r\n line-height: var(--mono-tag-input-option-line-height, var(--mono-text-sm--lh));\r\n outline-style: none;\r\n}\r\n\r\n[mono-tag-input][mono-open] > [mono-dropdown] {\r\n display: block;\r\n}\r\n\r\n/* =========================================\r\n Options\r\n -----------------------------------------\r\n Every rule that paints a native line lists its stamped twin (`slot=\"list\"`:\r\n `[data-mono-type='row']`, `[data-mono-active]`, `[data-mono-selected]`,\r\n `[data-mono-chrome]`) so the two can never drift. `:where()` wraps only the\r\n CONTAINER, keeping the twin at attribute weight.\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 components/select.css .select:not(select) [role='option'] — relative\r\n flex w-full cursor-default items-center outline-none select-none; disabled\r\n pointer-events-none opacity-50 */\r\n/* basecoat@1.0.2 styles/vega.css .combobox [role='option'] — gap-2 rounded-sm\r\n py-1.5 ps-2 pe-8 text-sm, svg size-4; EXTENSION: one indent step per level */\r\n[mono-tag-input] [mono-item],\r\n[mono-tag-input] :where([mono-list-slot]) [data-mono-type='row'] {\r\n --_ti-item-level: 0;\r\n position: relative;\r\n display: flex;\r\n width: 100%;\r\n align-items: center;\r\n gap: var(--mono-tag-input-option-gap, calc(var(--mono-spacing) * 2));\r\n margin: 0;\r\n padding-block: var(--mono-tag-input-option-padding-y, calc(var(--mono-spacing) * 1.5));\r\n padding-inline: var(--mono-tag-input-option-padding-x, calc(var(--mono-spacing) * 2)) var(--mono-tag-input-option-padding-end, calc(var(--mono-spacing) * 8));\r\n padding-inline-start: calc(var(--mono-tag-input-option-padding-x, calc(var(--mono-spacing) * 2)) + var(--_ti-item-level) * calc(var(--mono-spacing) * 3));\r\n min-height: var(--mono-tag-input-option-min-height, 0);\r\n border: 0;\r\n border-radius: var(--mono-tag-input-option-radius, var(--mono-radius-sm));\r\n /* longhands, so the selected row's check (a background-image) survives the\r\n active / hover background */\r\n background-color: transparent;\r\n background-image: none;\r\n color: var(--_mono-tag-input-text);\r\n font-family: inherit;\r\n font-size: var(--mono-tag-input-option-font-size, var(--mono-text-sm));\r\n line-height: var(--mono-tag-input-option-line-height, var(--mono-text-sm--lh));\r\n font-weight: var(--mono-tag-input-option-font-weight, var(--mono-font-weight-normal));\r\n text-align: start;\r\n outline-style: none;\r\n user-select: none;\r\n cursor: default;\r\n transition-property: color, background-color;\r\n transition-timing-function: var(--mono-ease);\r\n transition-duration: var(--mono-duration-fast);\r\n}\r\n\r\n/* EXTENSION: a hair of air between rows. Upstream stacks its options flush, so an\r\n active row directly under the selected one read as ONE tall highlight; a 2px\r\n seam keeps the two rounded-sm washes apart. `--mono-tag-input-option-spacing`. */\r\n[mono-tag-input] [mono-item] + [mono-item],\r\n[mono-tag-input] :where([mono-list-slot]) [data-mono-type='row'] + [data-mono-type='row'] {\r\n margin-top: var(--mono-tag-input-option-spacing, 2px);\r\n}\r\n\r\n[mono-tag-input] [mono-item][mono-level='1'] { --_ti-item-level: 1; }\r\n[mono-tag-input] [mono-item][mono-level='2'] { --_ti-item-level: 2; }\r\n[mono-tag-input] [mono-item][mono-level='3'] { --_ti-item-level: 3; }\r\n[mono-tag-input] [mono-item][mono-level='4'] { --_ti-item-level: 4; }\r\n\r\n/* basecoat@1.0.2 styles/vega.css .select:not(select) [role='option'].active, .select:not(select) [role='option']:focus-visible\r\n — bg-muted text-foreground. The keyboard cursor and the pointer share one look. */\r\n[mono-tag-input] [mono-item][mono-active]:not([mono-disabled]):not(:disabled),\r\n[mono-tag-input] [mono-item]:focus-visible,\r\n[mono-tag-input] :where([mono-list-slot]) [data-mono-active] {\r\n background-color: var(--mono-tag-input-option-active-bg, var(--muted));\r\n color: var(--mono-tag-input-option-active-color, var(--_mono-tag-input-text));\r\n}\r\n\r\n/* basecoat@1.0.2 components/select.css .select:not(select):not([data-select-initialized]) [role='option']:not([aria-disabled='true']):not(:disabled):hover, .select:not(select) [role='option'].active */\r\n[mono-tag-input] [mono-item]:hover:not([mono-disabled]):not(:disabled),\r\n[mono-tag-input] :where([mono-list-slot]) [data-mono-type='row']:hover {\r\n background-color: var(--mono-tag-input-option-active-bg, var(--muted));\r\n color: var(--mono-tag-input-option-active-color, var(--_mono-tag-input-text));\r\n}\r\n\r\n/* basecoat@1.0.2 components/select.css .select:not(select) [role='option'][aria-selected='true']\r\n — the --check-icon at the end. A row with its OWN checkbox says it there instead. */\r\n[mono-tag-input] [mono-item][mono-selected]:not([mono-check]),\r\n[mono-tag-input] :where([mono-list-slot]) [data-mono-type='row'][data-mono-selected] {\r\n background-image: var(--mono-tag-input-check-icon, var(--check-icon));\r\n background-size: var(--mono-tag-input-check-size, 0.875rem);\r\n background-position: center right calc(var(--mono-spacing) * 2);\r\n background-repeat: no-repeat;\r\n}\r\n\r\n[mono-tag-input] [mono-item][mono-selected]:not([mono-check]):dir(rtl),\r\n[mono-tag-input] :where([mono-list-slot]) [data-mono-type='row'][data-mono-selected]:dir(rtl) {\r\n background-position: center left calc(var(--mono-spacing) * 2);\r\n}\r\n\r\n[mono-tag-input] [mono-item][mono-disabled],\r\n[mono-tag-input] [mono-item]:disabled {\r\n opacity: 0.5;\r\n pointer-events: none;\r\n cursor: not-allowed;\r\n}\r\n\r\n/* the title IS the consumer's line — a custom row has no title element */\r\n[mono-tag-input] [mono-item-text] {\r\n flex: 1 1 auto;\r\n min-width: 0;\r\n}\r\n\r\n[mono-tag-input] [mono-item-title],\r\n[mono-tag-input] :where([mono-list-slot]) [data-mono-type='row'] {\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n\r\n/* EXTENSION — `item.description`: a muted second line */\r\n[mono-tag-input] [mono-item-sub] {\r\n margin-top: 0;\r\n font-size: var(--mono-text-xs);\r\n line-height: var(--mono-text-xs--lh);\r\n color: var(--_mono-tag-input-muted);\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n\r\n/* checkable rows: the box IS a mono-checkbox — the row emits the element's own\r\n markup ([mono-checkbox] > [mono-box], [mono-size=\"sm\"], the checked /\r\n indeterminate / loading states) and checkbox.css paints every pixel of it, in\r\n both builds; this sheet says only how it sits in the row: it must not shrink\r\n or take clicks (the row's button handles the toggle). A consumer's line lays\r\n out the same. */\r\n[mono-tag-input] [mono-check-box],\r\n[mono-tag-input] :where([mono-list-slot]) [data-mono-chrome] {\r\n flex: 0 0 auto;\r\n gap: 0;\r\n pointer-events: none;\r\n}\r\n\r\n[mono-tag-input] :where([mono-list-slot]) [data-mono-type='group'] {\r\n display: flex;\r\n align-items: center;\r\n gap: var(--mono-tag-input-option-gap, calc(var(--mono-spacing) * 2));\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .select:not(select) [role='listbox']:not(:has([data-value]:not([aria-hidden='true'])))::before\r\n — py-6 text-center text-sm */\r\n[mono-tag-input] [mono-empty-row] {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding-block: calc(var(--mono-spacing) * 6);\r\n padding-inline: calc(var(--mono-spacing) * 3);\r\n font-size: var(--mono-tag-input-option-font-size, var(--mono-text-sm));\r\n line-height: var(--mono-tag-input-option-line-height, var(--mono-text-sm--lh));\r\n color: var(--_mono-tag-input-muted);\r\n text-align: center;\r\n cursor: default;\r\n user-select: none;\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .combobox [role='heading'] — px-2 py-1.5 text-xs\r\n text-muted-foreground; EXTENSION: one indent step per level, a <button> when the\r\n header selects its group */\r\n[mono-tag-input] [mono-group],\r\n[mono-tag-input] :where([mono-list-slot]) [data-mono-type='group'] {\r\n --_ti-group-level: 0;\r\n width: 100%;\r\n margin: 0;\r\n padding-block: var(--mono-tag-input-group-padding-y, calc(var(--mono-spacing) * 1.5));\r\n padding-inline: var(--mono-tag-input-group-padding-x, calc(var(--mono-spacing) * 2));\r\n padding-inline-start: calc(var(--mono-tag-input-group-padding-x, calc(var(--mono-spacing) * 2)) + var(--_ti-group-level) * calc(var(--mono-spacing) * 3));\r\n border: 0;\r\n border-radius: var(--mono-tag-input-option-radius, var(--mono-radius-sm));\r\n background: transparent;\r\n font-family: inherit;\r\n font-size: var(--mono-tag-input-group-font-size, var(--mono-text-xs));\r\n line-height: var(--mono-tag-input-group-line-height, var(--mono-text-xs--lh));\r\n font-weight: var(--mono-tag-input-group-font-weight, var(--mono-font-weight-normal));\r\n text-transform: var(--mono-tag-input-group-text-transform, none);\r\n letter-spacing: var(--mono-tag-input-group-letter-spacing, normal);\r\n text-align: start;\r\n color: var(--_mono-tag-input-muted);\r\n cursor: default;\r\n user-select: none;\r\n}\r\n\r\n[mono-tag-input] [mono-group][mono-level='1'],\r\n[mono-tag-input] :where([mono-list-slot]) [data-mono-level='1'] { --_ti-group-level: 1; --_ti-item-level: 1; }\r\n[mono-tag-input] [mono-group][mono-level='2'],\r\n[mono-tag-input] :where([mono-list-slot]) [data-mono-level='2'] { --_ti-group-level: 2; --_ti-item-level: 2; }\r\n[mono-tag-input] [mono-group][mono-level='3'],\r\n[mono-tag-input] :where([mono-list-slot]) [data-mono-level='3'] { --_ti-group-level: 3; --_ti-item-level: 3; }\r\n[mono-tag-input] [mono-group][mono-level='4'],\r\n[mono-tag-input] :where([mono-list-slot]) [data-mono-level='4'] { --_ti-group-level: 4; --_ti-item-level: 4; }\r\n\r\n/* a header that selects its own group is a <button> laid out like the rows */\r\n[mono-tag-input] [mono-group][mono-toggle],\r\n[mono-tag-input] :where([mono-list-slot]) [data-mono-type='group']:has([data-mono-chrome]) {\r\n display: flex;\r\n align-items: center;\r\n gap: var(--mono-tag-input-option-gap, calc(var(--mono-spacing) * 2));\r\n cursor: pointer;\r\n}\r\n\r\n@media (hover: hover) {\r\n [mono-tag-input] [mono-group][mono-toggle]:hover {\r\n background-color: var(--mono-tag-input-option-active-bg, var(--muted));\r\n color: var(--_mono-tag-input-text);\r\n }\r\n}\r\n\r\n/* a group carrying a selection reads at a glance while scrolling */\r\n[mono-tag-input] [mono-group][mono-toggle][mono-selected] {\r\n color: var(--_mono-tag-input-text);\r\n}\r\n\r\n[mono-tag-input] [mono-group-label] {\r\n flex: 1 1 auto;\r\n min-width: 0;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n\r\n/* group-sticky: pin headers while their rows scroll, on the panel's own surface */\r\n[mono-tag-input] [mono-group][mono-sticky] {\r\n position: sticky;\r\n top: calc(var(--_ti-group-level) * 1.5rem);\r\n z-index: calc(5 - var(--_ti-group-level));\r\n background: var(--mono-tag-input-dropdown-bg, var(--popover));\r\n}\r\n\r\n/* EXTENSION — the \"All\" row: always first, always sticky, on the panel surface\r\n with a hairline under it; z above the group headers (which stack from 5 down) */\r\n[mono-tag-input] [mono-select-all] {\r\n position: sticky;\r\n top: 0;\r\n z-index: 6;\r\n background-color: var(--mono-tag-input-dropdown-bg, var(--popover));\r\n box-shadow: 0 1px 0 0 var(--border);\r\n font-weight: var(--mono-font-weight-medium);\r\n}\r\n\r\n@media (hover: hover) {\r\n [mono-tag-input] [mono-select-all]:hover:not(:disabled) {\r\n background-color: var(--mono-tag-input-option-active-bg, var(--muted));\r\n }\r\n}\r\n\r\n/* while it drains the server the row is `disabled` so a second click cannot start\r\n a second drain — but it is busy, not unavailable: undo the disabled look */\r\n[mono-tag-input] [mono-select-all][mono-loading],\r\n[mono-tag-input] [mono-select-all][mono-loading]:hover {\r\n opacity: 1;\r\n cursor: progress;\r\n pointer-events: none;\r\n background-color: var(--mono-tag-input-option-active-bg, var(--muted));\r\n}\r\n\r\n/* EXTENSION — the load-more affordance: an option-shaped ghost button */\r\n[mono-tag-input] [mono-load-more] {\r\n display: flex;\r\n width: 100%;\r\n align-items: center;\r\n justify-content: center;\r\n gap: var(--mono-tag-input-option-gap, calc(var(--mono-spacing) * 2));\r\n margin: 0;\r\n padding-block: var(--mono-tag-input-option-padding-y, calc(var(--mono-spacing) * 1.5));\r\n padding-inline: var(--mono-tag-input-option-padding-x, calc(var(--mono-spacing) * 2));\r\n border: 0;\r\n border-radius: var(--mono-tag-input-option-radius, var(--mono-radius-sm));\r\n background: transparent;\r\n color: var(--_mono-tag-input-muted);\r\n font-family: inherit;\r\n font-size: var(--mono-tag-input-option-font-size, var(--mono-text-sm));\r\n line-height: var(--mono-tag-input-option-line-height, var(--mono-text-sm--lh));\r\n font-weight: var(--mono-font-weight-medium);\r\n cursor: pointer;\r\n transition-property: color, background-color;\r\n transition-timing-function: var(--mono-ease);\r\n transition-duration: var(--mono-duration-fast);\r\n}\r\n\r\n@media (hover: hover) {\r\n [mono-tag-input] [mono-load-more]:hover:not([mono-loading]) {\r\n background: var(--mono-tag-input-option-active-bg, var(--muted));\r\n color: var(--_mono-tag-input-text);\r\n }\r\n}\r\n\r\n[mono-tag-input] [mono-load-more][mono-loading] {\r\n cursor: default;\r\n opacity: 0.7;\r\n}\r\n\r\n/* Consumer-rendered option rows (slot=\"list\"): `display: contents` so mono's own\r\n placement wrapper generates no box. */\r\n[mono-tag-input] [mono-list-slot] {\r\n display: contents;\r\n}\r\n\r\n/* =========================================\r\n The \"+N more\" overflow panel — a popover holding the overflow chips\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 styles/vega.css .combobox [data-popover] — bg-popover ring-1\r\n ring-foreground/10 rounded-md shadow-md; EXTENSION: p-1.5 gap-1.5 flex-wrap */\r\n[mono-tag-input] > [mono-more-panel] {\r\n position: absolute;\r\n left: 0;\r\n right: 0;\r\n top: auto;\r\n transform: translateY(calc(var(--mono-spacing) * 1.5));\r\n z-index: var(--mono-popup-z, 1000);\r\n display: none;\r\n flex-wrap: wrap;\r\n align-items: flex-start;\r\n gap: var(--_mono-tag-input-gap);\r\n padding: calc(var(--mono-spacing) * 1.5);\r\n max-height: min(14rem, var(--mono-popup-avail-h, 100vh));\r\n overflow: auto;\r\n overscroll-behavior: contain;\r\n border-radius: var(--mono-tag-input-dropdown-radius, var(--mono-radius-md));\r\n background: var(--mono-tag-input-dropdown-bg, var(--popover));\r\n color: var(--mono-tag-input-dropdown-color, var(--popover-foreground));\r\n box-shadow: var(--mono-tag-input-dropdown-ring, 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent)), var(--mono-tag-input-dropdown-shadow, var(--mono-shadow-md));\r\n}\r\n\r\n[mono-tag-input][mono-more-open] > [mono-more-panel] {\r\n display: flex;\r\n}\r\n\r\n/* =========================================\r\n Message\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 styles/vega.css .fieldset legend + p, .field > p, .field section > p */\r\n[mono-tag-input] > [mono-message-wrap] {\r\n display: block;\r\n margin-top: var(--_mono-tag-input-gap-y);\r\n}\r\n\r\n[mono-tag-input] > [mono-message-wrap]:not(:has([mono-message]:not([mono-empty]))) {\r\n display: none;\r\n}\r\n\r\n[mono-tag-input] [mono-message] {\r\n font-size: var(--mono-tag-input-message-font-size, var(--mono-text-sm));\r\n line-height: var(--mono-tag-input-message-line-height, var(--mono-leading-normal));\r\n font-weight: var(--mono-font-weight-normal);\r\n text-align: start;\r\n color: var(--_mono-tag-input-muted);\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .field [role=\"alert\"] — text-destructive text-sm */\r\n[mono-tag-input] [mono-message=\"invalid\"] {\r\n color: var(--_mono-tag-input-invalid);\r\n}\r\n\r\n[mono-tag-input] [mono-message=\"valid\"] {\r\n color: var(--_mono-tag-input-valid);\r\n}\r\n\r\n[mono-tag-input] [mono-message=\"warning\"] {\r\n color: var(--_mono-tag-input-warning);\r\n}\r\n\r\n@media (prefers-reduced-motion: reduce) {\r\n [mono-tag-input] > [mono-field],\r\n [mono-tag-input] [mono-clear],\r\n [mono-tag-input] [mono-arrow],\r\n [mono-tag-input] [mono-scroll],\r\n [mono-tag-input] [mono-item],\r\n [mono-tag-input] [mono-chip-close] {\r\n transition: none;\r\n }\r\n}\r\n";
|
|
2786
|
+
var tag_input_default = "/* =========================================================================\r\n mono-tag-input — a port of Basecoat's multi-select combobox: `.combobox-chips`\r\n (the field), `.combobox-chip` (+ `-remove`) and the `.combobox [data-popover]`\r\n list (basecoat-css@1.0.2, vega style), on the `.field` / `.label` chrome the\r\n ported input already carries.\r\n\r\n Styled by ATTRIBUTE, like Basecoat — and the attributes mirror the element's\r\n props one for one, so hand-written markup reads like the Lit / Vue tag:\r\n\r\n <mono-tag-input size=\"sm\" color=\"danger\" variant=\"filled\" label=\"Tags\">\r\n <div mono-tag-input mono-size=\"sm\" mono-color=\"danger\" mono-variant=\"filled\">\r\n <label mono-label>Tags</label>\r\n <div mono-field>\r\n <div mono-chip mono-removable><span mono-chip-main><span mono-chip-content>\r\n <span mono-chip-label>Vue</span><button mono-chip-close>…</button></span></span></div>\r\n <input mono-native /> <div mono-actions><span mono-arrow>…</span></div>\r\n </div>\r\n </div>\r\n\r\n An absent attribute is the prop's default (`:not([mono-size])` = md,\r\n `:not([mono-color])` = primary, `:not([mono-variant])` = outlined). The element\r\n renders these attributes on its wrapper (both builds) plus the STATES\r\n `mono-open` / `mono-more-open`; the old classes (`.mono-tag-input.sm.open`) are\r\n still emitted as inert hooks until 2.0 but no rule here reads them. The tag\r\n chips are NOT `.mono-chip`s any more: they are Basecoat combobox chips, painted\r\n here (`[mono-tag-input] [mono-chip]`), and chip.css never sees them.\r\n\r\n Selector map (ours ≡ upstream):\r\n [mono-tag-input] ≡ .field (gap-3, as margins — see the root rule) + .combobox (position: relative)\r\n [mono-tag-input] > [mono-label] ≡ .field > label / .label\r\n [mono-tag-input] > [mono-field] ≡ .combobox-chips (min-h-9 gap-1.5 rounded-md border-input px-1.5 py-1.5 text-sm shadow-xs)\r\n [mono-field] > [mono-native] ≡ .combobox-chips > input[role='combobox'] (min-w-16 flex-1, borderless)\r\n [mono-field] [mono-chip] > [mono-chip-main] ≡ .combobox-chip (h-5.5 gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium)\r\n [mono-chip] [mono-chip-close] ≡ .combobox-chip-remove (-ms-1 opacity-50 hover:100, svg size-3.5)\r\n [mono-chip][mono-more] ≡ EXTENSION (the \"+N more\" counter chip, same box)\r\n [mono-actions] > [mono-arrow] > svg ≡ .combobox-trigger-icon (size-4 text-muted-foreground)\r\n [mono-actions] > [mono-clear] ≡ .combobox [data-clear] (size-6, painted as .btn[data-variant='ghost'])\r\n [mono-actions] > [mono-scroll] ≡ EXTENSION (the inline strip's ‹ › pager, same box)\r\n [mono-dropdown] ≡ .combobox [data-popover] + [role='listbox'] (bg-popover ring-1 rounded-md shadow-md, max-h-72 p-1 scroll)\r\n [mono-item] ≡ .combobox [role='option'] (gap-2 rounded-sm py-1.5 ps-2 text-sm)\r\n [mono-item][mono-active] / :hover ≡ [role='option'].active (bg-muted text-foreground)\r\n [mono-item][mono-selected] ≡ [role='option'][aria-selected='true'] — the --check-icon, unless the row has its own checkbox\r\n [mono-group] ≡ .combobox [role='heading'] (px-2 py-1.5 text-xs text-muted-foreground)\r\n [mono-select-all] ≡ EXTENSION (a sticky option row over the list)\r\n [mono-more-panel] ≡ [data-popover] holding the overflow chips\r\n [mono-empty-row] ≡ [role='listbox']::before (py-6 text-center text-sm)\r\n [mono-message-wrap] > [mono-message] ≡ .field > p / .field [role='alert']\r\n [mono-validation-state=\"invalid\"] ≡ .combobox-chips:has([aria-invalid=true]) + .field[data-invalid]\r\n [mono-validation-state=\"valid|warning\"] ≡ EXTENSION (the invalid pattern in --success / --warning)\r\n [mono-size=\"xs|sm|lg|xl|xxl\"] ≡ EXTENSION (the --mono-control-height-* ladder)\r\n [mono-variant=\"filled\"] ≡ EXTENSION (luma's .combobox-chips)\r\n [mono-variant=\"underlined\"] ≡ EXTENSION (sera's .combobox-chips: bottom edge only, no ring)\r\n\r\n Inner parts: [mono-label] (+ [mono-required-mark]), [mono-field] (+ [mono-inline],\r\n [mono-typing]), [mono-chip-strip], [mono-chip] (+ [mono-removable], [mono-more],\r\n [mono-chip-color=\"…\"]) > [mono-chip-main] > [mono-chip-content] > [mono-chip-dot] /\r\n [mono-chip-label] / [mono-chip-close] > [mono-icon], [mono-native], [mono-actions] >\r\n [mono-scroll=\"prev|next\"] (+ [mono-idle]) / [mono-clear] > [mono-icon] / [mono-arrow],\r\n [mono-dropdown], [mono-select-all] (+ [mono-loading]), [mono-item] (+ [mono-active],\r\n [mono-selected], [mono-disabled], [mono-check], [mono-level=\"n\"]) > [mono-check-box] /\r\n [mono-item-text] > [mono-item-title] / [mono-item-sub], [mono-group] (+ [mono-level],\r\n [mono-sticky], [mono-toggle], [mono-selected]) > [mono-group-label], [mono-empty-row],\r\n [mono-load-more] (+ [mono-loading]), [mono-list-slot], [mono-more-panel],\r\n [mono-message-wrap] > [mono-message=\"helper|valid|invalid|warning\"]. The shadow build\r\n marks an unassigned slot wrapper [mono-empty].\r\n\r\n THE PANELS ARE PORTALED (light build): [mono-dropdown] and [mono-more-panel] move\r\n into a `<div data-mono-popup-portal>` under <body> while open, and the portal\r\n mirrors the wrapper's class AND mono-* attributes, so every rule here is scoped\r\n under `[mono-tag-input]` and never relies on the panel being inside the field.\r\n\r\n FLAVORS set the same knobs as mono-input, renamed `--mono-tag-input-*`, plus the\r\n select's panel / option / group set (`--mono-tag-input-dropdown-*`,\r\n `--mono-tag-input-option-*`, `--mono-tag-input-group-*`) and the chip set\r\n (`--mono-tag-input-chip-{radius,bg,color,font-size,font-weight}`). Every fallback\r\n here is vega's value (`node scripts/basecoat-styles.mjs --varying \"^\\.combobox\"`).\r\n ========================================================================= */\r\n\r\nmono-tag-input {\r\n display: block;\r\n}\r\n\r\n[mono-tag-input] {\r\n /* ── palette: each slot is a public knob over a Basecoat token ─────────── */\r\n --_mono-tag-input-text: var(--mono-tag-input-color, var(--mono-tag-input-text, var(--foreground)));\r\n --_mono-tag-input-placeholder: var(--mono-tag-input-placeholder, var(--muted-foreground));\r\n --_mono-tag-input-muted: var(--mono-tag-input-muted, var(--muted-foreground));\r\n --_mono-tag-input-primary: var(--mono-tag-input-primary, var(--ring));\r\n --_mono-tag-input-secondary: var(--mono-tag-input-secondary, var(--muted-foreground));\r\n --_mono-tag-input-success: var(--mono-tag-input-success, var(--success));\r\n --_mono-tag-input-danger: var(--mono-tag-input-danger, var(--destructive));\r\n --_mono-tag-input-warning: var(--mono-tag-input-warning, var(--warning));\r\n --_mono-tag-input-info: var(--mono-tag-input-info, var(--info));\r\n --_mono-tag-input-teal: var(--mono-tag-input-teal, var(--teal));\r\n --_mono-tag-input-purple: var(--mono-tag-input-purple, var(--purple));\r\n --_mono-tag-input-neutral: var(--mono-tag-input-neutral, var(--neutral));\r\n --_mono-tag-input-dark: var(--mono-tag-input-dark, var(--dark));\r\n --_mono-tag-input-valid: var(--mono-tag-input-valid, var(--success));\r\n --_mono-tag-input-invalid: var(--mono-tag-input-invalid, var(--destructive));\r\n\r\n /* ── the painted result — three tiers, base = .combobox-chips (vega) ──── */\r\n --_mono-tag-input-ring-color: var(--mono-tag-input-ring-color, var(--mono-tag-input-focus-color, var(--_mono-tag-input-ring-color-preset, var(--_mono-tag-input-primary))));\r\n --_mono-tag-input-ring-width: var(--mono-tag-input-ring-width, var(--_mono-tag-input-ring-width-preset, var(--mono-ring-width)));\r\n --_mono-tag-input-ring-alpha: var(--mono-tag-input-ring-alpha, var(--mono-ring-alpha));\r\n --_mono-tag-input-border-color: var(--mono-tag-input-rest-border, var(--mono-tag-input-border-color, var(--mono-tag-input-border, var(--_mono-tag-input-border-color-preset, var(--input)))));\r\n --_mono-tag-input-bg: var(--mono-tag-input-bg, var(--mono-tag-input-surface, var(--_mono-tag-input-bg-preset, var(--mono-mode-surface))));\r\n --_mono-tag-input-shadow: var(--mono-tag-input-shadow, var(--_mono-tag-input-shadow-preset, 0 0 #0000));\r\n --_mono-tag-input-icon: var(--mono-tag-input-icon-size, calc(var(--mono-spacing) * 4));\r\n\r\n /* ── md metrics live on the unqualified root ON PURPOSE: hand-written\r\n `<div mono-tag-input>` that names no size renders exactly like size=\"md\".\r\n basecoat@1.0.2 styles/vega.css .combobox-chips — min-h-9 gap-1.5 rounded-md\r\n px-1.5 py-1.5 text-sm; .combobox-chip h-5.5 ── */\r\n --_mono-tag-input-height: var(--mono-tag-input-height-md, var(--mono-control-height-md));\r\n --_mono-tag-input-radius: var(--mono-tag-input-radius-md, var(--_mono-tag-input-radius-preset, var(--mono-tag-input-radius, var(--mono-radius-md))));\r\n --_mono-tag-input-padding-x: var(--mono-tag-input-padding-x-md, var(--mono-tag-input-padding-x, var(--_mono-tag-input-padding-x-preset, calc(var(--mono-spacing) * 1.5))));\r\n --_mono-tag-input-padding-y: var(--mono-tag-input-padding-y-md, var(--mono-tag-input-padding-y, calc(var(--mono-spacing) * 1.5)));\r\n --_mono-tag-input-gap: var(--mono-tag-input-chip-gap, calc(var(--mono-spacing) * 1.5));\r\n --_mono-tag-input-font-size: var(--mono-tag-input-font-md, var(--mono-text-sm));\r\n --_mono-tag-input-line-height: var(--mono-tag-input-line-height, var(--mono-tag-input-line-height-md, var(--mono-text-sm--lh)));\r\n --_mono-tag-input-chip-height: var(--mono-tag-input-chip-height-md, min(calc(var(--mono-spacing) * 5.5), var(--_mono-tag-input-chip-fit)));\r\n /* The room one row of chips has: the field's height minus its block padding and borders. Each\r\n size's DEFAULT chip height is capped by it, so the rule \"chip h + 2·py + 2px ≤ token\" holds\r\n under ANY control ladder — a dense flavor (mira: xs 20px) shrinks the chip instead of growing\r\n an empty field past the token. An explicit `--mono-tag-input-chip-height-*` is not capped. */\r\n --_mono-tag-input-chip-fit: calc(var(--_mono-tag-input-height) - 2 * var(--_mono-tag-input-padding-y) - 2 * var(--mono-border-width));\r\n --_mono-tag-input-chip-font-size: var(--mono-tag-input-chip-font-size, var(--mono-text-xs));\r\n --_mono-tag-input-chip-line-height: var(--mono-tag-input-chip-line-height, var(--mono-text-xs--lh));\r\n --_mono-tag-input-action: calc(var(--mono-spacing) * 6);\r\n --_mono-tag-input-clear-glyph: calc(var(--mono-spacing) * 3.5);\r\n\r\n /* basecoat@1.0.2 styles/vega.css .field — flex w-full flex-col gap-3; mono: BLOCK\r\n flow with the gap as margins, so a hand-written panel that no controller\r\n positions lands at its static position — right under the field, above the\r\n message — instead of a flex container's content-box top (see select.css) */\r\n --_mono-tag-input-gap-y: var(--mono-tag-input-gap, calc(var(--mono-spacing) * 3));\r\n position: relative;\r\n display: block;\r\n width: 100%;\r\n font-family: inherit;\r\n color: var(--_mono-tag-input-text);\r\n}\r\n\r\n[mono-tag-input],\r\n[mono-tag-input] *,\r\n[mono-tag-input] *::before,\r\n[mono-tag-input] *::after {\r\n box-sizing: border-box;\r\n}\r\n\r\n[mono-tag-input] :is([mono-label], [mono-message])[mono-empty] {\r\n display: none;\r\n}\r\n\r\n/* =========================================\r\n Sizes — an EMPTY field's painted height IS the token (tests/perf/field-heights);\r\n a second row of chips grows it. Each step keeps one row of chips + its block\r\n padding under the token: chip h + 2·py + 2px ≤ token.\r\n ========================================= */\r\n\r\n[mono-tag-input][mono-size=\"xs\"] {\r\n --_mono-tag-input-height: var(--mono-tag-input-height-xs, var(--mono-control-height-xs));\r\n --_mono-tag-input-radius: var(--mono-tag-input-radius-xs, var(--_mono-tag-input-radius-preset, var(--mono-tag-input-radius, var(--mono-radius-md))));\r\n --_mono-tag-input-padding-x: var(--mono-tag-input-padding-x-xs, var(--mono-tag-input-padding-x, var(--_mono-tag-input-padding-x-preset, var(--mono-spacing))));\r\n --_mono-tag-input-padding-y: var(--mono-tag-input-padding-y-xs, var(--mono-tag-input-padding-y, calc(var(--mono-spacing) * 0.5)));\r\n --_mono-tag-input-gap: var(--mono-tag-input-chip-gap, var(--mono-spacing));\r\n --_mono-tag-input-font-size: var(--mono-tag-input-font-xs, var(--mono-text-xs));\r\n --_mono-tag-input-line-height: var(--mono-tag-input-line-height, var(--mono-tag-input-line-height-xs, var(--mono-text-xs--lh)));\r\n --_mono-tag-input-chip-height: var(--mono-tag-input-chip-height-xs, min(calc(var(--mono-spacing) * 4.5), var(--_mono-tag-input-chip-fit)));\r\n --_mono-tag-input-icon: var(--mono-tag-input-icon-size, calc(var(--mono-spacing) * 3.5));\r\n --_mono-tag-input-action: calc(var(--mono-spacing) * 4);\r\n --_mono-tag-input-clear-glyph: calc(var(--mono-spacing) * 3);\r\n}\r\n\r\n[mono-tag-input][mono-size=\"sm\"] {\r\n --_mono-tag-input-height: var(--mono-tag-input-height-sm, var(--mono-control-height-sm));\r\n --_mono-tag-input-radius: var(--mono-tag-input-radius-sm, var(--_mono-tag-input-radius-preset, var(--mono-tag-input-radius, var(--mono-radius-md))));\r\n --_mono-tag-input-padding-x: var(--mono-tag-input-padding-x-sm, var(--mono-tag-input-padding-x, var(--_mono-tag-input-padding-x-preset, var(--mono-spacing))));\r\n --_mono-tag-input-padding-y: var(--mono-tag-input-padding-y-sm, var(--mono-tag-input-padding-y, var(--mono-spacing)));\r\n --_mono-tag-input-gap: var(--mono-tag-input-chip-gap, var(--mono-spacing));\r\n --_mono-tag-input-font-size: var(--mono-tag-input-font-sm, var(--mono-tag-input-font-md, var(--mono-text-sm)));\r\n --_mono-tag-input-line-height: var(--mono-tag-input-line-height, var(--mono-tag-input-line-height-sm, var(--mono-text-sm--lh)));\r\n --_mono-tag-input-chip-height: var(--mono-tag-input-chip-height-sm, min(calc(var(--mono-spacing) * 5), var(--_mono-tag-input-chip-fit)));\r\n --_mono-tag-input-action: calc(var(--mono-spacing) * 5);\r\n}\r\n\r\n[mono-tag-input][mono-size=\"lg\"] {\r\n --_mono-tag-input-height: var(--mono-tag-input-height-lg, var(--mono-control-height-lg));\r\n --_mono-tag-input-radius: var(--mono-tag-input-radius-lg, var(--_mono-tag-input-radius-preset, var(--mono-tag-input-radius, var(--mono-radius-md))));\r\n --_mono-tag-input-padding-x: var(--mono-tag-input-padding-x-lg, var(--mono-tag-input-padding-x, var(--_mono-tag-input-padding-x-preset, calc(var(--mono-spacing) * 1.5))));\r\n --_mono-tag-input-padding-y: var(--mono-tag-input-padding-y-lg, var(--mono-tag-input-padding-y, calc(var(--mono-spacing) * 1.5)));\r\n --_mono-tag-input-font-size: var(--mono-tag-input-font-lg, var(--mono-tag-input-font-md, var(--mono-text-sm)));\r\n --_mono-tag-input-line-height: var(--mono-tag-input-line-height, var(--mono-tag-input-line-height-lg, var(--mono-text-sm--lh)));\r\n --_mono-tag-input-chip-height: var(--mono-tag-input-chip-height-lg, min(calc(var(--mono-spacing) * 6), var(--_mono-tag-input-chip-fit)));\r\n}\r\n\r\n[mono-tag-input][mono-size=\"xl\"] {\r\n --_mono-tag-input-height: var(--mono-tag-input-height-xl, var(--mono-control-height-xl));\r\n --_mono-tag-input-radius: var(--mono-tag-input-radius-xl, var(--_mono-tag-input-radius-preset, var(--mono-tag-input-radius, var(--mono-radius-md))));\r\n --_mono-tag-input-padding-x: var(--mono-tag-input-padding-x-xl, var(--mono-tag-input-padding-x, var(--_mono-tag-input-padding-x-preset, calc(var(--mono-spacing) * 2))));\r\n --_mono-tag-input-padding-y: var(--mono-tag-input-padding-y-xl, var(--mono-tag-input-padding-y, calc(var(--mono-spacing) * 2)));\r\n --_mono-tag-input-gap: var(--mono-tag-input-chip-gap, calc(var(--mono-spacing) * 2));\r\n --_mono-tag-input-font-size: var(--mono-tag-input-font-xl, var(--mono-text-base));\r\n --_mono-tag-input-line-height: var(--mono-tag-input-line-height, var(--mono-tag-input-line-height-xl, var(--mono-text-base--lh)));\r\n --_mono-tag-input-chip-height: var(--mono-tag-input-chip-height-xl, min(calc(var(--mono-spacing) * 6.5), var(--_mono-tag-input-chip-fit)));\r\n --_mono-tag-input-chip-font-size: var(--mono-tag-input-chip-font-size, var(--mono-text-sm));\r\n --_mono-tag-input-chip-line-height: var(--mono-tag-input-chip-line-height, var(--mono-text-sm--lh));\r\n --_mono-tag-input-icon: var(--mono-tag-input-icon-size, calc(var(--mono-spacing) * 5));\r\n --_mono-tag-input-action: calc(var(--mono-spacing) * 7);\r\n --_mono-tag-input-clear-glyph: calc(var(--mono-spacing) * 4);\r\n}\r\n\r\n[mono-tag-input][mono-size=\"xxl\"] {\r\n --_mono-tag-input-height: var(--mono-tag-input-height-xxl, var(--mono-control-height-xxl));\r\n --_mono-tag-input-radius: var(--mono-tag-input-radius-xxl, var(--_mono-tag-input-radius-preset, var(--mono-tag-input-radius, var(--mono-radius-md))));\r\n --_mono-tag-input-padding-x: var(--mono-tag-input-padding-x-xxl, var(--mono-tag-input-padding-x, var(--_mono-tag-input-padding-x-preset, calc(var(--mono-spacing) * 2.5))));\r\n --_mono-tag-input-padding-y: var(--mono-tag-input-padding-y-xxl, var(--mono-tag-input-padding-y, calc(var(--mono-spacing) * 2)));\r\n --_mono-tag-input-gap: var(--mono-tag-input-chip-gap, calc(var(--mono-spacing) * 2));\r\n --_mono-tag-input-font-size: var(--mono-tag-input-font-xxl, var(--mono-text-lg));\r\n --_mono-tag-input-line-height: var(--mono-tag-input-line-height, var(--mono-tag-input-line-height-xxl, var(--mono-text-lg--lh)));\r\n --_mono-tag-input-chip-height: var(--mono-tag-input-chip-height-xxl, min(calc(var(--mono-spacing) * 7), var(--_mono-tag-input-chip-fit)));\r\n --_mono-tag-input-chip-font-size: var(--mono-tag-input-chip-font-size, var(--mono-text-sm));\r\n --_mono-tag-input-chip-line-height: var(--mono-tag-input-chip-line-height, var(--mono-text-sm--lh));\r\n --_mono-tag-input-icon: var(--mono-tag-input-icon-size, calc(var(--mono-spacing) * 5));\r\n --_mono-tag-input-action: calc(var(--mono-spacing) * 8);\r\n --_mono-tag-input-clear-glyph: calc(var(--mono-spacing) * 4);\r\n}\r\n\r\n/* =========================================\r\n Variants — each writes only `*-preset` slots\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 styles/vega.css .combobox-chips — rounded-md border border-input\r\n bg-transparent shadow-xs (dark:bg-input/30 via --mono-mode-surface) */\r\n[mono-tag-input]:is(:not([mono-variant]), [mono-variant=\"outlined\"]) {\r\n --_mono-tag-input-bg-preset: var(--mono-tag-input-outline-bg);\r\n --_mono-tag-input-border-color-preset: var(--mono-tag-input-outline-border-color);\r\n --_mono-tag-input-side-border-color-preset: var(--mono-tag-input-outline-side-border-color);\r\n --_mono-tag-input-shadow-preset: var(--mono-tag-input-outline-shadow, var(--mono-shadow-xs));\r\n --_mono-tag-input-ring-width-preset: var(--mono-tag-input-outline-ring-width);\r\n --_mono-tag-input-radius-preset: var(--mono-tag-input-outline-radius);\r\n --_mono-tag-input-padding-x-preset: var(--mono-tag-input-outline-padding-x);\r\n}\r\n\r\n/* EXTENSION — filled ≡ basecoat@1.0.2 styles/luma.css .combobox-chips */\r\n[mono-tag-input][mono-variant=\"filled\"] {\r\n --_mono-tag-input-bg-preset: var(--mono-tag-input-filled-bg, color-mix(in oklab, var(--input) 50%, transparent));\r\n --_mono-tag-input-border-color-preset: transparent;\r\n --_mono-tag-input-shadow-preset: 0 0 #0000;\r\n}\r\n\r\n/* EXTENSION — underlined ≡ basecoat@1.0.2 styles/sera.css .combobox-chips */\r\n[mono-tag-input][mono-variant=\"underlined\"] {\r\n --_mono-tag-input-bg-preset: transparent;\r\n --_mono-tag-input-side-border-color-preset: transparent;\r\n --_mono-tag-input-shadow-preset: 0 0 #0000;\r\n --_mono-tag-input-ring-width-preset: 0px;\r\n --_mono-tag-input-radius-preset: 0;\r\n --_mono-tag-input-padding-x-preset: 0;\r\n}\r\n\r\n/* =========================================\r\n Colours — the `color` prop is the FOCUS colour (ring + focused border)\r\n ========================================= */\r\n\r\n[mono-tag-input]:is(:not([mono-color]), [mono-color=\"primary\"]) {\r\n --_mono-tag-input-ring-color-preset: var(--_mono-tag-input-primary);\r\n}\r\n[mono-tag-input][mono-color=\"secondary\"] {\r\n --_mono-tag-input-ring-color-preset: var(--_mono-tag-input-secondary);\r\n}\r\n[mono-tag-input][mono-color=\"success\"] {\r\n --_mono-tag-input-ring-color-preset: var(--_mono-tag-input-success);\r\n}\r\n[mono-tag-input][mono-color=\"danger\"] {\r\n --_mono-tag-input-ring-color-preset: var(--_mono-tag-input-danger);\r\n}\r\n[mono-tag-input][mono-color=\"warning\"] {\r\n --_mono-tag-input-ring-color-preset: var(--_mono-tag-input-warning);\r\n}\r\n[mono-tag-input][mono-color=\"info\"] {\r\n --_mono-tag-input-ring-color-preset: var(--_mono-tag-input-info);\r\n}\r\n[mono-tag-input][mono-color=\"teal\"] {\r\n --_mono-tag-input-ring-color-preset: var(--_mono-tag-input-teal);\r\n}\r\n[mono-tag-input][mono-color=\"purple\"] {\r\n --_mono-tag-input-ring-color-preset: var(--_mono-tag-input-purple);\r\n}\r\n[mono-tag-input][mono-color=\"neutral\"] {\r\n --_mono-tag-input-ring-color-preset: var(--_mono-tag-input-neutral);\r\n}\r\n[mono-tag-input][mono-color=\"dark\"] {\r\n --_mono-tag-input-ring-color-preset: var(--_mono-tag-input-dark);\r\n}\r\n\r\n/* =========================================\r\n Label\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 styles/vega.css .field > label, .label — flex items-center\r\n gap-2 text-sm leading-none font-medium select-none w-fit */\r\n[mono-tag-input] > [mono-label] {\r\n display: flex;\r\n align-items: center;\r\n width: fit-content;\r\n margin: 0 0 var(--_mono-tag-input-gap-y);\r\n gap: var(--mono-tag-input-label-gap, calc(var(--mono-spacing) * 2));\r\n font-size: var(--mono-tag-input-label-font-size, var(--mono-text-sm));\r\n line-height: var(--mono-tag-input-label-line-height, 1);\r\n font-weight: var(--mono-tag-input-label-font-weight, var(--mono-label-font-weight, var(--mono-font-weight-medium)));\r\n text-transform: var(--mono-tag-input-label-text-transform, none);\r\n letter-spacing: var(--mono-tag-input-label-letter-spacing, normal);\r\n color: var(--_mono-tag-input-text);\r\n user-select: none;\r\n}\r\n\r\n[mono-tag-input][mono-disabled] > [mono-label] {\r\n opacity: 0.5;\r\n pointer-events: none;\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .field — data-invalid:text-destructive */\r\n[mono-tag-input][mono-validation-state=\"invalid\"] > [mono-label] {\r\n color: var(--_mono-tag-input-invalid);\r\n}\r\n\r\n[mono-tag-input] [mono-required-mark] {\r\n color: var(--_mono-tag-input-danger);\r\n}\r\n\r\n/* =========================================\r\n The field — the chip box\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 components/combobox.css .combobox-chips — flex w-full min-w-0\r\n flex-wrap items-center */\r\n/* basecoat@1.0.2 styles/vega.css .combobox-chips — min-h-9 gap-1.5 rounded-md\r\n border border-input bg-transparent bg-clip-padding px-1.5 py-1.5 text-sm\r\n shadow-xs transition-[color,box-shadow] focus-within:border-ring\r\n focus-within:ring-3 focus-within:ring-ring/50 has-[[aria-invalid=true]]:…;\r\n mono: `--tw-ring-*` flattened to the ring + shadow slots, the min-height is\r\n the control token, the side edges read their own slot */\r\n[mono-tag-input] > [mono-field] {\r\n --_mono-tag-input-bc: var(--_mono-tag-input-border-color);\r\n --_mono-tag-input-side-bc: var(--mono-tag-input-side-border-color, var(--_mono-tag-input-side-border-color-preset, var(--_mono-tag-input-bc)));\r\n --_mono-tag-input-ring: 0 0 #0000;\r\n\r\n position: relative;\r\n display: flex;\r\n flex-wrap: wrap;\r\n align-items: center;\r\n gap: var(--_mono-tag-input-gap);\r\n width: 100%;\r\n min-width: 0;\r\n min-height: var(--_mono-tag-input-height);\r\n padding-block: var(--_mono-tag-input-padding-y);\r\n padding-inline: var(--_mono-tag-input-padding-x);\r\n outline-style: none;\r\n border: var(--mono-border-width) solid var(--_mono-tag-input-bc);\r\n border-top-color: var(--_mono-tag-input-side-bc);\r\n border-inline-color: var(--_mono-tag-input-side-bc);\r\n border-radius: var(--_mono-tag-input-radius);\r\n background: var(--_mono-tag-input-bg);\r\n background-clip: padding-box;\r\n color: var(--_mono-tag-input-text);\r\n box-shadow: var(--_mono-tag-input-ring), var(--_mono-tag-input-shadow);\r\n font-size: var(--_mono-tag-input-font-size);\r\n line-height: var(--_mono-tag-input-line-height);\r\n cursor: text;\r\n transition-property: color, box-shadow, border-color, background-color;\r\n transition-timing-function: var(--mono-ease);\r\n transition-duration: var(--mono-duration);\r\n\r\n /* focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 */\r\n &:focus-within {\r\n --_mono-tag-input-bc: var(--_mono-tag-input-ring-color);\r\n --_mono-tag-input-ring: 0 0 0 var(--_mono-tag-input-ring-width) color-mix(in oklab, var(--_mono-tag-input-ring-color) var(--_mono-tag-input-ring-alpha), transparent);\r\n }\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .combobox-chips — has-[[aria-invalid=true]]:border-destructive\r\n has-[[aria-invalid=true]]:ring-3 has-[[aria-invalid=true]]:ring-destructive/20 */\r\n[mono-tag-input][mono-validation-state=\"invalid\"] > [mono-field],\r\n[mono-tag-input] > [mono-field]:has(> [mono-native][aria-invalid=\"true\"]) {\r\n --_mono-tag-input-bc: var(--mono-mode-invalid-border);\r\n --_mono-tag-input-ring: 0 0 0 var(--_mono-tag-input-ring-width) var(--mono-mode-invalid-ring);\r\n}\r\n\r\n/* EXTENSION — valid / warning are the invalid pattern in the role's colour */\r\n[mono-tag-input][mono-validation-state=\"valid\"] > [mono-field] {\r\n --_mono-tag-input-bc: color-mix(in oklab, var(--_mono-tag-input-valid) var(--mono-mode-state-border-alpha), transparent);\r\n --_mono-tag-input-ring: 0 0 0 var(--_mono-tag-input-ring-width) color-mix(in oklab, var(--_mono-tag-input-valid) var(--mono-mode-state-ring-alpha), transparent);\r\n}\r\n[mono-tag-input][mono-validation-state=\"warning\"] > [mono-field] {\r\n --_mono-tag-input-bc: color-mix(in oklab, var(--_mono-tag-input-warning) var(--mono-mode-state-border-alpha), transparent);\r\n --_mono-tag-input-ring: 0 0 0 var(--_mono-tag-input-ring-width) color-mix(in oklab, var(--_mono-tag-input-warning) var(--mono-mode-state-ring-alpha), transparent);\r\n}\r\n\r\n/* EXTENSION — the bound dataSource failed: the invalid outline ONLY. Label,\r\n message and validation state stay as they are; it is not a validation error. */\r\n[mono-tag-input][mono-ds-error] > [mono-field] {\r\n --_mono-tag-input-bc: var(--mono-tag-input-ds-error-border, var(--mono-mode-invalid-border));\r\n --_mono-tag-input-ring: 0 0 0 var(--_mono-tag-input-ring-width) var(--mono-tag-input-ds-error-ring, var(--mono-mode-invalid-ring));\r\n}\r\n\r\n[mono-tag-input][mono-ds-error] [mono-native]::placeholder {\r\n color: var(--mono-tag-input-ds-error-text, var(--_mono-tag-input-invalid));\r\n}\r\n\r\n/* EXTENSION — the first load (or a retry) is in flight: read-only */\r\n[mono-tag-input][mono-ds-loading] > [mono-field],\r\n[mono-tag-input][mono-ds-loading] [mono-native] {\r\n cursor: progress;\r\n}\r\n\r\n/* EXTENSION — readonly: a muted surface */\r\n[mono-tag-input][mono-readonly] > [mono-field] {\r\n background: var(--mono-tag-input-readonly-bg, var(--muted));\r\n cursor: default;\r\n}\r\n\r\n/* .combobox-chips > input:disabled — opacity-50 (on the box, so the chips fade\r\n with it). The strip's ‹ › pager opts back in so the chips can still be read. */\r\n[mono-tag-input][mono-disabled] > [mono-field] {\r\n opacity: 0.5;\r\n pointer-events: none;\r\n cursor: not-allowed;\r\n background: var(--mono-tag-input-disabled-bg, var(--_mono-tag-input-bg));\r\n}\r\n\r\n[mono-tag-input][mono-disabled] [mono-scroll]:not([mono-idle]) {\r\n pointer-events: auto;\r\n cursor: pointer;\r\n}\r\n\r\n/* ── the actions row stays on the FIRST row ──────────────────────────────\r\n The field wraps, and the row is its last child, so once the chips wrapped it\r\n rode down to the bottom-right. Pinned out of that flow instead; `top` centres\r\n it on the single-row height. Not in inline mode: an inline field never wraps,\r\n so the row sits in normal flow and the strip flexes against it. */\r\n[mono-tag-input] > [mono-field]:not([mono-inline]) {\r\n padding-inline-end: calc(var(--_mono-tag-input-padding-x) + var(--_mono-tag-input-action) + var(--mono-spacing));\r\n}\r\n\r\n[mono-tag-input] > [mono-field]:not([mono-inline]) > [mono-actions] {\r\n position: absolute;\r\n inset-inline-end: var(--_mono-tag-input-padding-x);\r\n top: calc((var(--_mono-tag-input-height) - var(--_mono-tag-input-action)) / 2);\r\n}\r\n\r\n/* =========================================\r\n The text box\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 components/combobox.css .combobox-chips > input[role='combobox']\r\n — min-w-16 flex-1 bg-transparent outline-none placeholder:text-muted-foreground */\r\n[mono-tag-input] [mono-native] {\r\n flex: 1 1 calc(var(--mono-spacing) * 16);\r\n min-width: calc(var(--mono-spacing) * 16);\r\n align-self: stretch;\r\n appearance: none;\r\n margin: 0;\r\n padding: 0;\r\n border: 0;\r\n border-radius: 0;\r\n outline: none;\r\n background: transparent;\r\n box-shadow: none;\r\n color: var(--_mono-tag-input-text);\r\n font-family: inherit;\r\n font-size: var(--_mono-tag-input-font-size);\r\n line-height: var(--_mono-tag-input-line-height);\r\n /* The chip row is the box's height; the text box never exceeds it. `height`, not only\r\n `min-height`: an input's own line box is its floor, so with a chip shorter than the line (a\r\n dense flavor's capped chip — mira xs: 14px chip, 16px line) the input set the row and an\r\n empty field came out 2px over the control token. The 12px glyphs still fit. */\r\n min-height: var(--_mono-tag-input-chip-height);\r\n height: var(--_mono-tag-input-chip-height);\r\n\r\n &:focus,\r\n &:focus-visible {\r\n outline: none !important;\r\n }\r\n\r\n &::placeholder {\r\n color: var(--_mono-tag-input-placeholder);\r\n }\r\n\r\n &:disabled,\r\n &:read-only {\r\n cursor: inherit;\r\n }\r\n}\r\n\r\n/* =========================================\r\n Chips\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 components/combobox.css .combobox-chip — inline-flex w-fit\r\n shrink-0 items-center whitespace-nowrap */\r\n[mono-tag-input] [mono-chip] {\r\n display: inline-flex;\r\n width: fit-content;\r\n max-width: 100%;\r\n flex-shrink: 0;\r\n align-items: center;\r\n white-space: nowrap;\r\n vertical-align: middle;\r\n line-height: 1;\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .combobox-chip — h-5.5 gap-1 rounded-sm bg-muted\r\n px-1.5 text-xs font-medium text-foreground, has-[>.combobox-chip-remove]:pe-0 */\r\n[mono-tag-input] [mono-chip] > [mono-chip-main] {\r\n display: inline-flex;\r\n align-items: center;\r\n height: var(--_mono-tag-input-chip-height);\r\n max-width: 100%;\r\n gap: var(--mono-tag-input-chip-content-gap, var(--mono-spacing));\r\n margin: 0;\r\n padding-inline: var(--mono-tag-input-chip-padding-x, calc(var(--mono-spacing) * 1.5));\r\n border: 0;\r\n border-radius: var(--mono-tag-input-chip-radius, var(--mono-radius-sm));\r\n background: var(--mono-tag-input-chip-bg, var(--muted));\r\n color: var(--mono-tag-input-chip-color, var(--_mono-tag-input-text));\r\n font-family: inherit;\r\n font-size: var(--_mono-tag-input-chip-font-size);\r\n line-height: var(--_mono-tag-input-chip-line-height);\r\n font-weight: var(--mono-tag-input-chip-font-weight, var(--mono-font-weight-medium));\r\n text-decoration: none;\r\n cursor: default;\r\n}\r\n\r\n[mono-tag-input] [mono-chip][mono-removable] > [mono-chip-main] {\r\n padding-inline-end: 0;\r\n}\r\n\r\n[mono-tag-input] [mono-chip] [mono-chip-content] {\r\n display: inline-flex;\r\n align-items: center;\r\n gap: inherit;\r\n min-width: 0;\r\n max-width: 100%;\r\n height: 100%;\r\n}\r\n\r\n[mono-tag-input] [mono-chip] [mono-chip-label] {\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n\r\n/* EXTENSION — `chip.dot`: a coloured dot before the label (the badge's dot idiom) */\r\n[mono-tag-input] [mono-chip] [mono-chip-dot] {\r\n flex: 0 0 auto;\r\n width: calc(var(--mono-spacing) * 1.5);\r\n height: calc(var(--mono-spacing) * 1.5);\r\n border-radius: var(--mono-radius-full);\r\n background: currentColor;\r\n}\r\n\r\n/* EXTENSION — `chip.color` pins a hue: the tonal pattern (bg-x/10 text-x, dark 20) */\r\n[mono-tag-input] [mono-chip][mono-chip-color=\"primary\"] > [mono-chip-main] { background: color-mix(in oklab, var(--primary) var(--mono-mode-tint), transparent); color: var(--primary); }\r\n[mono-tag-input] [mono-chip][mono-chip-color=\"secondary\"] > [mono-chip-main] { background: var(--secondary); color: var(--secondary-foreground); }\r\n[mono-tag-input] [mono-chip][mono-chip-color=\"success\"] > [mono-chip-main] { background: color-mix(in oklab, var(--success) var(--mono-mode-tint), transparent); color: var(--success); }\r\n[mono-tag-input] [mono-chip][mono-chip-color=\"danger\"] > [mono-chip-main] { background: color-mix(in oklab, var(--destructive) var(--mono-mode-tint), transparent); color: var(--destructive); }\r\n[mono-tag-input] [mono-chip][mono-chip-color=\"warning\"] > [mono-chip-main] { background: color-mix(in oklab, var(--warning) var(--mono-mode-tint), transparent); color: var(--warning); }\r\n[mono-tag-input] [mono-chip][mono-chip-color=\"info\"] > [mono-chip-main] { background: color-mix(in oklab, var(--info) var(--mono-mode-tint), transparent); color: var(--info); }\r\n[mono-tag-input] [mono-chip][mono-chip-color=\"teal\"] > [mono-chip-main] { background: color-mix(in oklab, var(--teal) var(--mono-mode-tint), transparent); color: var(--teal); }\r\n[mono-tag-input] [mono-chip][mono-chip-color=\"purple\"] > [mono-chip-main] { background: color-mix(in oklab, var(--purple) var(--mono-mode-tint), transparent); color: var(--purple); }\r\n[mono-tag-input] [mono-chip][mono-chip-color=\"neutral\"] > [mono-chip-main] { background: color-mix(in oklab, var(--neutral) var(--mono-mode-tint), transparent); color: var(--neutral); }\r\n[mono-tag-input] [mono-chip][mono-chip-color=\"dark\"] > [mono-chip-main] { background: var(--dark); color: var(--dark-foreground); }\r\n\r\n/* basecoat@1.0.2 components/combobox.css .combobox-chip-remove — inline-flex\r\n shrink-0 items-center justify-center */\r\n/* basecoat@1.0.2 styles/vega.css .combobox-chip-remove — -ms-1 opacity-50\r\n hover:opacity-100, svg size-3.5 */\r\n[mono-tag-input] [mono-chip] [mono-chip-close] {\r\n display: inline-flex;\r\n flex-shrink: 0;\r\n align-items: center;\r\n justify-content: center;\r\n /* explicit: the element still carries chip.css's `.chip-close` class as a hook,\r\n which pins a 1rem box — the raw markup has no such class */\r\n width: auto;\r\n height: 100%;\r\n min-width: 0;\r\n margin: 0;\r\n transform: none;\r\n margin-inline-start: calc(var(--mono-spacing) * -1);\r\n padding: 0 var(--mono-spacing);\r\n border: 0;\r\n border-radius: inherit;\r\n background: transparent;\r\n color: inherit;\r\n font: inherit;\r\n line-height: 1;\r\n opacity: 0.5;\r\n cursor: pointer;\r\n outline-style: none;\r\n transition-property: opacity;\r\n transition-timing-function: var(--mono-ease);\r\n transition-duration: var(--mono-duration);\r\n\r\n &:focus-visible {\r\n opacity: 1;\r\n }\r\n}\r\n\r\n@media (hover: hover) {\r\n [mono-tag-input] [mono-chip] [mono-chip-close]:hover {\r\n opacity: 1;\r\n }\r\n}\r\n\r\n[mono-tag-input] [mono-chip] [mono-chip-close] > :is(svg, .mono-icon, [mono-icon]) {\r\n display: block;\r\n width: calc(var(--mono-spacing) * 3.5);\r\n height: calc(var(--mono-spacing) * 3.5);\r\n pointer-events: none;\r\n}\r\n\r\n/* EXTENSION — the \"+N more\" counter chip is a control */\r\n[mono-tag-input] [mono-chip][mono-more] > [mono-chip-main] {\r\n cursor: pointer;\r\n outline-style: none;\r\n}\r\n\r\n[mono-tag-input] [mono-chip][mono-more] > [mono-chip-main]:focus-visible {\r\n box-shadow: 0 0 0 var(--_mono-tag-input-ring-width) color-mix(in oklab, var(--_mono-tag-input-ring-color) var(--_mono-tag-input-ring-alpha), transparent);\r\n}\r\n\r\n@media (hover: hover) {\r\n [mono-tag-input] [mono-chip][mono-more] > [mono-chip-main]:hover {\r\n background: var(--mono-mode-surface-hover);\r\n }\r\n}\r\n\r\n/* ── the inline chip strip (`chip.behaviour: 'inline'`) ──────────────────\r\n One line that never grows: the field stops wrapping, the chips live in their\r\n own strip, and the strip absorbs the overflow instead of the field.\r\n\r\n `overflow-x: hidden` — NOT `auto` — is the whole scroll contract. Hidden still\r\n honours a programmatic `scrollLeft`, so `ChipStripController` can page the\r\n strip while the browser paints no scrollbar. */\r\n[mono-tag-input] > [mono-field][mono-inline] {\r\n flex-wrap: nowrap;\r\n min-width: 0;\r\n}\r\n\r\n[mono-tag-input] [mono-chip-strip] {\r\n display: flex;\r\n flex-wrap: nowrap;\r\n align-items: center;\r\n gap: var(--_mono-tag-input-gap);\r\n flex: 0 1 auto;\r\n min-width: 0;\r\n overflow-x: hidden;\r\n overflow-y: hidden;\r\n /* NO `scroll-behavior: smooth` — see ChipStripController (one scroll event per\r\n frame would reposition every open popup). */\r\n}\r\n\r\n[mono-tag-input] [mono-chip-strip] > * {\r\n flex-shrink: 0;\r\n}\r\n\r\n/* The text box takes the SLACK: `flex-basis: 0` contributes nothing to the\r\n overflow calculation, so when the chips overflow it collapses and the strip\r\n runs up to the pager; focus earns a caret's room, typing earns a real box. */\r\n[mono-tag-input] > [mono-field][mono-inline] > [mono-native] {\r\n flex: 1 1 0;\r\n min-width: 0;\r\n}\r\n\r\n[mono-tag-input] > [mono-field][mono-inline] > [mono-native]:focus,\r\n[mono-tag-input] > [mono-field][mono-inline] > [mono-native]:focus-visible {\r\n min-width: calc(var(--mono-spacing) * 5);\r\n}\r\n\r\n[mono-tag-input] > [mono-field][mono-inline][mono-typing] > [mono-native] {\r\n min-width: calc(var(--mono-spacing) * 24);\r\n}\r\n\r\n/* =========================================\r\n Actions — ‹ › pager, clear, caret\r\n ========================================= */\r\n\r\n[mono-tag-input] [mono-actions] {\r\n display: flex;\r\n align-items: center;\r\n gap: var(--mono-spacing);\r\n flex: 0 0 auto;\r\n line-height: 1;\r\n}\r\n\r\n/* basecoat@1.0.2 components/combobox.css .combobox [data-clear] — size-6 border-0\r\n bg-transparent p-0 text-current; the caret ≡ .combobox-trigger-icon (size-4\r\n text-muted-foreground), the pager the same box. Painted as .btn[data-variant='ghost']. */\r\n[mono-tag-input] [mono-clear],\r\n[mono-tag-input] [mono-arrow],\r\n[mono-tag-input] [mono-scroll],\r\n[mono-tag-input] [mono-ds-retry],\r\n[mono-tag-input] [mono-ds-spinner] {\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n flex: 0 0 auto;\r\n width: var(--_mono-tag-input-action);\r\n height: var(--_mono-tag-input-action);\r\n margin: 0;\r\n padding: 0;\r\n border: 0;\r\n border-radius: var(--mono-tag-input-clear-radius, calc(var(--radius) - 5px));\r\n background: transparent;\r\n color: var(--_mono-tag-input-muted);\r\n font: inherit;\r\n line-height: 1;\r\n cursor: pointer;\r\n outline-style: none;\r\n transition-property: color, background-color, transform;\r\n transition-timing-function: var(--mono-ease);\r\n transition-duration: var(--mono-duration);\r\n}\r\n\r\n[mono-tag-input] :is([mono-clear], [mono-arrow], [mono-scroll], [mono-ds-retry], [mono-ds-spinner]) > :is(svg, .mono-icon, [mono-icon]) {\r\n display: block;\r\n width: var(--_mono-tag-input-icon);\r\n height: var(--_mono-tag-input-icon);\r\n pointer-events: none;\r\n}\r\n\r\n[mono-tag-input] [mono-clear] > :is(svg, .mono-icon, [mono-icon]) {\r\n width: var(--_mono-tag-input-clear-glyph);\r\n height: var(--_mono-tag-input-clear-glyph);\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .btn[data-variant='ghost'] — hover:bg-muted hover:text-foreground */\r\n@media (hover: hover) {\r\n [mono-tag-input] :is([mono-clear], [mono-arrow], [mono-scroll], [mono-ds-retry]):hover {\r\n background: var(--mono-mode-ghost-hover);\r\n color: var(--_mono-tag-input-text);\r\n }\r\n}\r\n\r\n/* EXTENSION — the caret turns while the panel is open */\r\n[mono-tag-input][mono-open] [mono-arrow] > :is(svg, .mono-icon, [mono-icon]) {\r\n transform: rotate(180deg);\r\n}\r\n\r\n/* EXTENSION — dataSource state glyphs: the busy arc spins, the ↻ wears the\r\n error colour so it reads as the way out of the red field */\r\n[mono-tag-input] [mono-ds-spinner] {\r\n cursor: progress;\r\n}\r\n\r\n[mono-tag-input] [mono-ds-spinner] > svg {\r\n animation: mono-tag-input-spin 0.7s linear infinite;\r\n}\r\n\r\n[mono-tag-input] [mono-ds-retry] {\r\n color: var(--mono-tag-input-ds-error-text, var(--_mono-tag-input-invalid));\r\n}\r\n\r\n@keyframes mono-tag-input-spin {\r\n to {\r\n transform: rotate(360deg);\r\n }\r\n}\r\n\r\n/* At an end of the strip the pager keeps its box but disappears — hiding it with\r\n `display: none` would shrink the row and shove the strip sideways mid-click. */\r\n[mono-tag-input] [mono-scroll][mono-idle] {\r\n visibility: hidden;\r\n pointer-events: none;\r\n}\r\n\r\n/* =========================================\r\n The panel\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 components/popover.css [data-popover] — absolute z-50 overflow;\r\n mono: `display: none` while closed, `--mono-popup-z` from the shared stack,\r\n `--mono-popup-avail-h` from the portal controller */\r\n/* basecoat@1.0.2 styles/vega.css .combobox [data-popover] — bg-popover\r\n text-popover-foreground ring-foreground/10 max-h-72 rounded-md p-0 shadow-md ring-1 */\r\n/* basecoat@1.0.2 styles/vega.css .combobox [role='listbox'] — max-h-[min(18rem,\r\n var(--available-height,18rem))] scroll-py-1 overflow-y-auto p-1 (our panel IS\r\n the listbox: one scrolling box) */\r\n[mono-tag-input] > [mono-dropdown] {\r\n position: absolute;\r\n /* `top: auto` = the static position (under the field, before the message); the\r\n 6px offset is a transform the controller's inline `transform: none` cancels */\r\n top: auto;\r\n transform: translateY(calc(var(--mono-spacing) * 1.5));\r\n left: 0;\r\n right: 0;\r\n z-index: var(--mono-popup-z, 1000);\r\n display: none;\r\n min-width: var(--mono-tag-input-dropdown-min-width, 9rem);\r\n max-height: min(var(--_mono-tag-input-panel-max-h, 18rem), var(--mono-popup-avail-h, 100vh));\r\n padding: var(--mono-tag-input-dropdown-padding, var(--mono-spacing));\r\n overflow: auto;\r\n overscroll-behavior: contain;\r\n scroll-padding-block: var(--mono-tag-input-dropdown-padding, var(--mono-spacing));\r\n isolation: isolate;\r\n border-radius: var(--mono-tag-input-dropdown-radius, var(--mono-radius-md));\r\n background: var(--mono-tag-input-dropdown-bg, var(--popover));\r\n color: var(--mono-tag-input-dropdown-color, var(--popover-foreground));\r\n box-shadow: var(--mono-tag-input-dropdown-ring, 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent)), var(--mono-tag-input-dropdown-shadow, var(--mono-shadow-md));\r\n font-size: var(--mono-tag-input-option-font-size, var(--mono-text-sm));\r\n line-height: var(--mono-tag-input-option-line-height, var(--mono-text-sm--lh));\r\n outline-style: none;\r\n}\r\n\r\n[mono-tag-input][mono-open] > [mono-dropdown] {\r\n display: block;\r\n}\r\n\r\n/* =========================================\r\n Options\r\n -----------------------------------------\r\n Every rule that paints a native line lists its stamped twin (`slot=\"list\"`:\r\n `[data-mono-type='row']`, `[data-mono-active]`, `[data-mono-selected]`,\r\n `[data-mono-chrome]`) so the two can never drift. `:where()` wraps only the\r\n CONTAINER, keeping the twin at attribute weight.\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 components/select.css .select:not(select) [role='option'] — relative\r\n flex w-full cursor-default items-center outline-none select-none; disabled\r\n pointer-events-none opacity-50 */\r\n/* basecoat@1.0.2 styles/vega.css .combobox [role='option'] — gap-2 rounded-sm\r\n py-1.5 ps-2 pe-8 text-sm, svg size-4; EXTENSION: one indent step per level */\r\n[mono-tag-input] [mono-item],\r\n[mono-tag-input] :where([mono-list-slot]) [data-mono-type='row'] {\r\n --_ti-item-level: 0;\r\n position: relative;\r\n display: flex;\r\n width: 100%;\r\n align-items: center;\r\n gap: var(--mono-tag-input-option-gap, calc(var(--mono-spacing) * 2));\r\n margin: 0;\r\n padding-block: var(--mono-tag-input-option-padding-y, calc(var(--mono-spacing) * 1.5));\r\n padding-inline: var(--mono-tag-input-option-padding-x, calc(var(--mono-spacing) * 2)) var(--mono-tag-input-option-padding-end, calc(var(--mono-spacing) * 8));\r\n padding-inline-start: calc(var(--mono-tag-input-option-padding-x, calc(var(--mono-spacing) * 2)) + var(--_ti-item-level) * calc(var(--mono-spacing) * 3));\r\n min-height: var(--mono-tag-input-option-min-height, 0);\r\n border: 0;\r\n border-radius: var(--mono-tag-input-option-radius, var(--mono-radius-sm));\r\n /* longhands, so the selected row's check (a background-image) survives the\r\n active / hover background */\r\n background-color: transparent;\r\n background-image: none;\r\n color: var(--_mono-tag-input-text);\r\n font-family: inherit;\r\n font-size: var(--mono-tag-input-option-font-size, var(--mono-text-sm));\r\n line-height: var(--mono-tag-input-option-line-height, var(--mono-text-sm--lh));\r\n font-weight: var(--mono-tag-input-option-font-weight, var(--mono-font-weight-normal));\r\n text-align: start;\r\n outline-style: none;\r\n user-select: none;\r\n cursor: default;\r\n transition-property: color, background-color;\r\n transition-timing-function: var(--mono-ease);\r\n transition-duration: var(--mono-duration-fast);\r\n}\r\n\r\n/* EXTENSION: a hair of air between rows. Upstream stacks its options flush, so an\r\n active row directly under the selected one read as ONE tall highlight; a 2px\r\n seam keeps the two rounded-sm washes apart. `--mono-tag-input-option-spacing`. */\r\n[mono-tag-input] [mono-item] + [mono-item],\r\n[mono-tag-input] :where([mono-list-slot]) [data-mono-type='row'] + [data-mono-type='row'] {\r\n margin-top: var(--mono-tag-input-option-spacing, 2px);\r\n}\r\n\r\n[mono-tag-input] [mono-item][mono-level='1'] { --_ti-item-level: 1; }\r\n[mono-tag-input] [mono-item][mono-level='2'] { --_ti-item-level: 2; }\r\n[mono-tag-input] [mono-item][mono-level='3'] { --_ti-item-level: 3; }\r\n[mono-tag-input] [mono-item][mono-level='4'] { --_ti-item-level: 4; }\r\n\r\n/* basecoat@1.0.2 styles/vega.css .select:not(select) [role='option'].active, .select:not(select) [role='option']:focus-visible\r\n — bg-muted text-foreground. The keyboard cursor and the pointer share one look. */\r\n[mono-tag-input] [mono-item][mono-active]:not([mono-disabled]):not(:disabled),\r\n[mono-tag-input] [mono-item]:focus-visible,\r\n[mono-tag-input] :where([mono-list-slot]) [data-mono-active] {\r\n background-color: var(--mono-tag-input-option-active-bg, var(--muted));\r\n color: var(--mono-tag-input-option-active-color, var(--_mono-tag-input-text));\r\n}\r\n\r\n/* basecoat@1.0.2 components/select.css .select:not(select):not([data-select-initialized]) [role='option']:not([aria-disabled='true']):not(:disabled):hover, .select:not(select) [role='option'].active */\r\n[mono-tag-input] [mono-item]:hover:not([mono-disabled]):not(:disabled),\r\n[mono-tag-input] :where([mono-list-slot]) [data-mono-type='row']:hover {\r\n background-color: var(--mono-tag-input-option-active-bg, var(--muted));\r\n color: var(--mono-tag-input-option-active-color, var(--_mono-tag-input-text));\r\n}\r\n\r\n/* basecoat@1.0.2 components/select.css .select:not(select) [role='option'][aria-selected='true']\r\n — the --check-icon at the end. A row with its OWN checkbox says it there instead. */\r\n[mono-tag-input] [mono-item][mono-selected]:not([mono-check]),\r\n[mono-tag-input] :where([mono-list-slot]) [data-mono-type='row'][data-mono-selected] {\r\n background-image: var(--mono-tag-input-check-icon, var(--check-icon));\r\n background-size: var(--mono-tag-input-check-size, 0.875rem);\r\n background-position: center right calc(var(--mono-spacing) * 2);\r\n background-repeat: no-repeat;\r\n}\r\n\r\n[mono-tag-input] [mono-item][mono-selected]:not([mono-check]):dir(rtl),\r\n[mono-tag-input] :where([mono-list-slot]) [data-mono-type='row'][data-mono-selected]:dir(rtl) {\r\n background-position: center left calc(var(--mono-spacing) * 2);\r\n}\r\n\r\n[mono-tag-input] [mono-item][mono-disabled],\r\n[mono-tag-input] [mono-item]:disabled {\r\n opacity: 0.5;\r\n pointer-events: none;\r\n cursor: not-allowed;\r\n}\r\n\r\n/* the title IS the consumer's line — a custom row has no title element */\r\n[mono-tag-input] [mono-item-text] {\r\n flex: 1 1 auto;\r\n min-width: 0;\r\n}\r\n\r\n[mono-tag-input] [mono-item-title],\r\n[mono-tag-input] :where([mono-list-slot]) [data-mono-type='row'] {\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n\r\n/* EXTENSION — `item.description`: a muted second line */\r\n[mono-tag-input] [mono-item-sub] {\r\n margin-top: 0;\r\n font-size: var(--mono-text-xs);\r\n line-height: var(--mono-text-xs--lh);\r\n color: var(--_mono-tag-input-muted);\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n\r\n/* checkable rows: the box IS a mono-checkbox — the row emits the element's own\r\n markup ([mono-checkbox] > [mono-box], [mono-size=\"sm\"], the checked /\r\n indeterminate / loading states) and checkbox.css paints every pixel of it, in\r\n both builds; this sheet says only how it sits in the row: it must not shrink\r\n or take clicks (the row's button handles the toggle). A consumer's line lays\r\n out the same. */\r\n[mono-tag-input] [mono-check-box],\r\n[mono-tag-input] :where([mono-list-slot]) [data-mono-chrome] {\r\n flex: 0 0 auto;\r\n gap: 0;\r\n pointer-events: none;\r\n}\r\n\r\n[mono-tag-input] :where([mono-list-slot]) [data-mono-type='group'] {\r\n display: flex;\r\n align-items: center;\r\n gap: var(--mono-tag-input-option-gap, calc(var(--mono-spacing) * 2));\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .select:not(select) [role='listbox']:not(:has([data-value]:not([aria-hidden='true'])))::before\r\n — py-6 text-center text-sm */\r\n[mono-tag-input] [mono-empty-row] {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding-block: calc(var(--mono-spacing) * 6);\r\n padding-inline: calc(var(--mono-spacing) * 3);\r\n font-size: var(--mono-tag-input-option-font-size, var(--mono-text-sm));\r\n line-height: var(--mono-tag-input-option-line-height, var(--mono-text-sm--lh));\r\n color: var(--_mono-tag-input-muted);\r\n text-align: center;\r\n cursor: default;\r\n user-select: none;\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .combobox [role='heading'] — px-2 py-1.5 text-xs\r\n text-muted-foreground; EXTENSION: one indent step per level, a <button> when the\r\n header selects its group */\r\n[mono-tag-input] [mono-group],\r\n[mono-tag-input] :where([mono-list-slot]) [data-mono-type='group'] {\r\n --_ti-group-level: 0;\r\n width: 100%;\r\n margin: 0;\r\n padding-block: var(--mono-tag-input-group-padding-y, calc(var(--mono-spacing) * 1.5));\r\n padding-inline: var(--mono-tag-input-group-padding-x, calc(var(--mono-spacing) * 2));\r\n padding-inline-start: calc(var(--mono-tag-input-group-padding-x, calc(var(--mono-spacing) * 2)) + var(--_ti-group-level) * calc(var(--mono-spacing) * 3));\r\n border: 0;\r\n border-radius: var(--mono-tag-input-option-radius, var(--mono-radius-sm));\r\n background: transparent;\r\n font-family: inherit;\r\n font-size: var(--mono-tag-input-group-font-size, var(--mono-text-xs));\r\n line-height: var(--mono-tag-input-group-line-height, var(--mono-text-xs--lh));\r\n font-weight: var(--mono-tag-input-group-font-weight, var(--mono-font-weight-normal));\r\n text-transform: var(--mono-tag-input-group-text-transform, none);\r\n letter-spacing: var(--mono-tag-input-group-letter-spacing, normal);\r\n text-align: start;\r\n color: var(--_mono-tag-input-muted);\r\n cursor: default;\r\n user-select: none;\r\n}\r\n\r\n[mono-tag-input] [mono-group][mono-level='1'],\r\n[mono-tag-input] :where([mono-list-slot]) [data-mono-level='1'] { --_ti-group-level: 1; --_ti-item-level: 1; }\r\n[mono-tag-input] [mono-group][mono-level='2'],\r\n[mono-tag-input] :where([mono-list-slot]) [data-mono-level='2'] { --_ti-group-level: 2; --_ti-item-level: 2; }\r\n[mono-tag-input] [mono-group][mono-level='3'],\r\n[mono-tag-input] :where([mono-list-slot]) [data-mono-level='3'] { --_ti-group-level: 3; --_ti-item-level: 3; }\r\n[mono-tag-input] [mono-group][mono-level='4'],\r\n[mono-tag-input] :where([mono-list-slot]) [data-mono-level='4'] { --_ti-group-level: 4; --_ti-item-level: 4; }\r\n\r\n/* a header that selects its own group is a <button> laid out like the rows */\r\n[mono-tag-input] [mono-group][mono-toggle],\r\n[mono-tag-input] :where([mono-list-slot]) [data-mono-type='group']:has([data-mono-chrome]) {\r\n display: flex;\r\n align-items: center;\r\n gap: var(--mono-tag-input-option-gap, calc(var(--mono-spacing) * 2));\r\n cursor: pointer;\r\n}\r\n\r\n@media (hover: hover) {\r\n [mono-tag-input] [mono-group][mono-toggle]:hover {\r\n background-color: var(--mono-tag-input-option-active-bg, var(--muted));\r\n color: var(--_mono-tag-input-text);\r\n }\r\n}\r\n\r\n/* a group carrying a selection reads at a glance while scrolling */\r\n[mono-tag-input] [mono-group][mono-toggle][mono-selected] {\r\n color: var(--_mono-tag-input-text);\r\n}\r\n\r\n[mono-tag-input] [mono-group-label] {\r\n flex: 1 1 auto;\r\n min-width: 0;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n\r\n/* group-sticky: pin headers while their rows scroll, on the panel's own surface */\r\n[mono-tag-input] [mono-group][mono-sticky] {\r\n position: sticky;\r\n top: calc(var(--_ti-group-level) * 1.5rem);\r\n z-index: calc(5 - var(--_ti-group-level));\r\n background: var(--mono-tag-input-dropdown-bg, var(--popover));\r\n}\r\n\r\n/* EXTENSION — the \"All\" row: always first, always sticky, on the panel surface\r\n with a hairline under it; z above the group headers (which stack from 5 down) */\r\n[mono-tag-input] [mono-select-all] {\r\n position: sticky;\r\n top: 0;\r\n z-index: 6;\r\n background-color: var(--mono-tag-input-dropdown-bg, var(--popover));\r\n box-shadow: 0 1px 0 0 var(--border);\r\n font-weight: var(--mono-font-weight-medium);\r\n}\r\n\r\n@media (hover: hover) {\r\n [mono-tag-input] [mono-select-all]:hover:not(:disabled) {\r\n background-color: var(--mono-tag-input-option-active-bg, var(--muted));\r\n }\r\n}\r\n\r\n/* while it drains the server the row is `disabled` so a second click cannot start\r\n a second drain — but it is busy, not unavailable: undo the disabled look */\r\n[mono-tag-input] [mono-select-all][mono-loading],\r\n[mono-tag-input] [mono-select-all][mono-loading]:hover {\r\n opacity: 1;\r\n cursor: progress;\r\n pointer-events: none;\r\n background-color: var(--mono-tag-input-option-active-bg, var(--muted));\r\n}\r\n\r\n/* EXTENSION — the load-more affordance: an option-shaped ghost button */\r\n[mono-tag-input] [mono-load-more] {\r\n display: flex;\r\n width: 100%;\r\n align-items: center;\r\n justify-content: center;\r\n gap: var(--mono-tag-input-option-gap, calc(var(--mono-spacing) * 2));\r\n margin: 0;\r\n padding-block: var(--mono-tag-input-option-padding-y, calc(var(--mono-spacing) * 1.5));\r\n padding-inline: var(--mono-tag-input-option-padding-x, calc(var(--mono-spacing) * 2));\r\n border: 0;\r\n border-radius: var(--mono-tag-input-option-radius, var(--mono-radius-sm));\r\n background: transparent;\r\n color: var(--_mono-tag-input-muted);\r\n font-family: inherit;\r\n font-size: var(--mono-tag-input-option-font-size, var(--mono-text-sm));\r\n line-height: var(--mono-tag-input-option-line-height, var(--mono-text-sm--lh));\r\n font-weight: var(--mono-font-weight-medium);\r\n cursor: pointer;\r\n transition-property: color, background-color;\r\n transition-timing-function: var(--mono-ease);\r\n transition-duration: var(--mono-duration-fast);\r\n}\r\n\r\n@media (hover: hover) {\r\n [mono-tag-input] [mono-load-more]:hover:not([mono-loading]) {\r\n background: var(--mono-tag-input-option-active-bg, var(--muted));\r\n color: var(--_mono-tag-input-text);\r\n }\r\n}\r\n\r\n[mono-tag-input] [mono-load-more][mono-loading] {\r\n cursor: default;\r\n opacity: 0.7;\r\n}\r\n\r\n/* Consumer-rendered option rows (slot=\"list\"): `display: contents` so mono's own\r\n placement wrapper generates no box. */\r\n[mono-tag-input] [mono-list-slot] {\r\n display: contents;\r\n}\r\n\r\n/* =========================================\r\n The \"+N more\" overflow panel — a popover holding the overflow chips\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 styles/vega.css .combobox [data-popover] — bg-popover ring-1\r\n ring-foreground/10 rounded-md shadow-md; EXTENSION: p-1.5 gap-1.5 flex-wrap */\r\n[mono-tag-input] > [mono-more-panel] {\r\n position: absolute;\r\n left: 0;\r\n right: 0;\r\n top: auto;\r\n transform: translateY(calc(var(--mono-spacing) * 1.5));\r\n z-index: var(--mono-popup-z, 1000);\r\n display: none;\r\n flex-wrap: wrap;\r\n align-items: flex-start;\r\n gap: var(--_mono-tag-input-gap);\r\n padding: calc(var(--mono-spacing) * 1.5);\r\n max-height: min(14rem, var(--mono-popup-avail-h, 100vh));\r\n overflow: auto;\r\n overscroll-behavior: contain;\r\n border-radius: var(--mono-tag-input-dropdown-radius, var(--mono-radius-md));\r\n background: var(--mono-tag-input-dropdown-bg, var(--popover));\r\n color: var(--mono-tag-input-dropdown-color, var(--popover-foreground));\r\n box-shadow: var(--mono-tag-input-dropdown-ring, 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent)), var(--mono-tag-input-dropdown-shadow, var(--mono-shadow-md));\r\n}\r\n\r\n[mono-tag-input][mono-more-open] > [mono-more-panel] {\r\n display: flex;\r\n}\r\n\r\n/* =========================================\r\n Message\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 styles/vega.css .fieldset legend + p, .field > p, .field section > p */\r\n[mono-tag-input] > [mono-message-wrap] {\r\n display: block;\r\n margin-top: var(--_mono-tag-input-gap-y);\r\n}\r\n\r\n[mono-tag-input] > [mono-message-wrap]:not(:has([mono-message]:not([mono-empty]))) {\r\n display: none;\r\n}\r\n\r\n[mono-tag-input] [mono-message] {\r\n font-size: var(--mono-tag-input-message-font-size, var(--mono-text-sm));\r\n line-height: var(--mono-tag-input-message-line-height, var(--mono-leading-normal));\r\n font-weight: var(--mono-font-weight-normal);\r\n text-align: start;\r\n color: var(--_mono-tag-input-muted);\r\n}\r\n\r\n/* basecoat@1.0.2 styles/vega.css .field [role=\"alert\"] — text-destructive text-sm */\r\n[mono-tag-input] [mono-message=\"invalid\"] {\r\n color: var(--_mono-tag-input-invalid);\r\n}\r\n\r\n[mono-tag-input] [mono-message=\"valid\"] {\r\n color: var(--_mono-tag-input-valid);\r\n}\r\n\r\n[mono-tag-input] [mono-message=\"warning\"] {\r\n color: var(--_mono-tag-input-warning);\r\n}\r\n\r\n@media (prefers-reduced-motion: reduce) {\r\n [mono-tag-input] > [mono-field],\r\n [mono-tag-input] [mono-clear],\r\n [mono-tag-input] [mono-arrow],\r\n [mono-tag-input] [mono-scroll],\r\n [mono-tag-input] [mono-item],\r\n [mono-tag-input] [mono-chip-close] {\r\n transition: none;\r\n }\r\n\r\n [mono-tag-input] [mono-ds-spinner] > svg {\r\n animation-duration: 2.4s;\r\n }\r\n}\r\n";
|
|
2659
2787
|
//#endregion
|
|
2660
2788
|
//#region src/components/tag-input/mono-tag-input.shadow.ts
|
|
2661
2789
|
var SHADOW_EXTRA_CSS = "";
|