@threadlabs/looma 0.33.1 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/shared/overlay.js +8 -2
- package/components/shared/surface-material.js +21 -0
- package/components/ui-badge/ui-badge.html +11 -3
- package/components/ui-button/ui-button.html +92 -51
- package/components/ui-card/ui-card.html +50 -6
- package/components/ui-checkbox/ui-checkbox.html +4 -2
- package/components/ui-curve-editor/curve.js +10 -0
- package/components/ui-curve-editor/ui-curve-editor.html +181 -0
- package/components/ui-curve-editor/ui-curve-editor.js +51 -0
- package/components/ui-dialog/ui-dialog.html +64 -1
- package/components/ui-dialog/ui-dialog.js +9 -1
- package/components/ui-icon-button/ui-icon-button.html +97 -31
- package/components/ui-input/ui-input.html +2 -1
- package/components/ui-input-group/ui-input-group.html +4 -1
- package/components/ui-light-editor/ui-light-editor.html +45 -0
- package/components/ui-light-editor/ui-light-editor.js +53 -0
- package/components/ui-menu/ui-menu.html +62 -0
- package/components/ui-menu/ui-menu.js +1 -1
- package/components/ui-number-input/arithmetic.js +47 -0
- package/components/ui-number-input/ui-number-input.html +63 -0
- package/components/ui-number-input/ui-number-input.js +47 -0
- package/components/ui-popover/ui-popover.html +66 -1
- package/components/ui-popover/ui-popover.js +1 -1
- package/components/ui-select/ui-select.html +9 -7
- package/components/ui-slider/ui-slider.html +84 -0
- package/components/ui-slider/ui-slider.js +29 -0
- package/components/ui-switch/ui-switch.html +3 -0
- package/components/ui-tabs/ui-tabs.html +6 -1
- package/components/ui-text/ui-text.html +31 -6
- package/components/ui-textarea/ui-textarea.html +2 -1
- package/components/ui-tooltip/ui-tooltip.html +60 -0
- package/components/ui-tooltip/ui-tooltip.js +1 -1
- package/dist/index.js +47 -43
- package/docs/README.md +59 -5
- package/docs/card.html +16 -2
- package/docs/card.js +17 -2
- package/docs/catalog.json +1640 -108
- package/docs/customizer-render.mjs +50 -11
- package/docs/customizer.js +137 -24
- package/docs/documentation.css +9 -1
- package/docs/index.d.ts +8 -3
- package/docs/index.mjs +1 -1
- package/docs/preview.js +2 -0
- package/docs/render.mjs +16 -7
- package/docs/site.mjs +78 -27
- package/docs/theme-session.mjs +53 -0
- package/docs/theme.mjs +189 -18
- package/docs/value-editors.mjs +33 -0
- package/package.json +2 -2
- package/styles/ui-badge.css +11 -6
- package/styles/ui-button.css +74 -49
- package/styles/ui-card.css +51 -4
- package/styles/ui-checkbox.css +4 -2
- package/styles/ui-curve-editor.css +109 -0
- package/styles/ui-dialog.css +136 -0
- package/styles/ui-icon-button.css +85 -28
- package/styles/ui-input-group.css +4 -1
- package/styles/ui-input.css +2 -1
- package/styles/ui-light-editor.css +28 -0
- package/styles/ui-menu.css +74 -0
- package/styles/ui-number-input.css +34 -0
- package/styles/ui-popover.css +76 -0
- package/styles/ui-select.css +9 -7
- package/styles/ui-slider.css +53 -0
- package/styles/ui-switch.css +3 -0
- package/styles/ui-tabs.css +6 -1
- package/styles/ui-text.css +23 -1
- package/styles/ui-textarea.css +2 -1
- package/styles/ui-tooltip.css +72 -0
- package/theme-light.css +1 -0
- package/theme-system.css +69 -17
- package/tokens.css +12 -2
- package/vanilla/UiButton.d.ts +1 -0
- package/vanilla/UiButton.js +195 -130
- package/vanilla/UiCard.d.ts +1 -0
- package/vanilla/UiCard.js +12 -12
- package/vanilla/UiCurveEditor.d.ts +28 -0
- package/vanilla/UiCurveEditor.js +134 -0
- package/vanilla/UiIconButton.d.ts +2 -1
- package/vanilla/UiIconButton.js +58 -31
- package/vanilla/UiLightEditor.d.ts +29 -0
- package/vanilla/UiLightEditor.js +102 -0
- package/vanilla/UiNumberInput.d.ts +33 -0
- package/vanilla/UiNumberInput.js +86 -0
- package/vanilla/UiSlider.d.ts +33 -0
- package/vanilla/UiSlider.js +125 -0
- package/vanilla/UiText.d.ts +2 -2
- package/vanilla/UiText.js +45 -11
- package/vanilla/index.js +4 -0
- package/vue/UiBadge.vue +29 -4
- package/vue/UiButton.d.ts +6 -0
- package/vue/UiButton.vue +188 -60
- package/vue/UiCard.d.ts +6 -0
- package/vue/UiCard.vue +80 -6
- package/vue/UiCheckbox.vue +4 -2
- package/vue/UiCurveEditor.d.ts +53 -0
- package/vue/UiCurveEditor.js +2 -0
- package/vue/UiCurveEditor.vue +427 -0
- package/vue/UiDialog.vue +181 -1
- package/vue/UiIconButton.d.ts +8 -2
- package/vue/UiIconButton.vue +190 -45
- package/vue/UiInput.vue +2 -1
- package/vue/UiInputGroup.vue +4 -1
- package/vue/UiLightEditor.d.ts +75 -0
- package/vue/UiLightEditor.js +2 -0
- package/vue/UiLightEditor.vue +402 -0
- package/vue/UiMenu.vue +91 -0
- package/vue/UiNumberInput.d.ts +83 -0
- package/vue/UiNumberInput.js +2 -0
- package/vue/UiNumberInput.vue +399 -0
- package/vue/UiPopover.vue +94 -1
- package/vue/UiSelect.vue +16 -10
- package/vue/UiSlider.d.ts +83 -0
- package/vue/UiSlider.js +2 -0
- package/vue/UiSlider.vue +412 -0
- package/vue/UiSwitch.vue +3 -0
- package/vue/UiTabs.vue +6 -1
- package/vue/UiText.d.ts +7 -5
- package/vue/UiText.vue +104 -22
- package/vue/UiTextarea.vue +2 -1
- package/vue/UiTooltip.vue +89 -0
- package/vue/chunks/UiActionBar.js +1 -1
- package/vue/chunks/UiAffordanceScope.js +2 -2
- package/vue/chunks/UiAvatar.js +2 -2
- package/vue/chunks/UiAvatarGroup.js +2 -2
- package/vue/chunks/UiBadge.js +3 -3
- package/vue/chunks/UiBreadcrumbItem.js +2 -2
- package/vue/chunks/UiBreadcrumbs.js +2 -2
- package/vue/chunks/UiButton.js +94 -11
- package/vue/chunks/UiCallout.js +2 -2
- package/vue/chunks/UiCard.js +34 -5
- package/vue/chunks/UiCheckbox.js +3 -3
- package/vue/chunks/UiCluster.js +2 -2
- package/vue/chunks/UiColorPicker.js +2 -2
- package/vue/chunks/UiCombobox.js +2 -2
- package/vue/chunks/UiContainer.js +2 -2
- package/vue/chunks/UiContextMenu.js +2 -2
- package/vue/chunks/UiCover.js +2 -2
- package/vue/chunks/UiCurveEditor.js +413 -0
- package/vue/chunks/UiDescriptionItem.js +2 -2
- package/vue/chunks/UiDescriptionList.js +2 -2
- package/vue/chunks/UiDialog.js +4 -4
- package/vue/chunks/UiDisclosure.js +2 -2
- package/vue/chunks/UiEditable.js +2 -2
- package/vue/chunks/UiEditorBlockActions.js +2 -2
- package/vue/chunks/UiEditorChipEditor.js +2 -2
- package/vue/chunks/UiEditorCodeLanguage.js +2 -2
- package/vue/chunks/UiEditorFootnoteEditor.js +2 -2
- package/vue/chunks/UiEditorImageToolbar.js +3 -3
- package/vue/chunks/UiEditorInsertTableGrid.js +2 -2
- package/vue/chunks/UiEditorLinkCard.js +3 -3
- package/vue/chunks/UiEditorLinkForm.js +3 -3
- package/vue/chunks/UiEditorMentionMenu.js +2 -2
- package/vue/chunks/UiEditorMentionMenuItem.js +2 -2
- package/vue/chunks/UiEditorSlashMenu.js +2 -2
- package/vue/chunks/UiEditorSlashMenuGroup.js +2 -2
- package/vue/chunks/UiEditorSlashMenuItem.js +2 -2
- package/vue/chunks/UiEditorSurface.js +2 -2
- package/vue/chunks/UiEditorTableContextMenu.js +2 -2
- package/vue/chunks/UiEditorTableOverlay.js +2 -2
- package/vue/chunks/UiEditorTableToolbar.js +2 -2
- package/vue/chunks/UiEditorToolbar.js +2 -2
- package/vue/chunks/UiFloatingActionButton.js +2 -2
- package/vue/chunks/UiFormField.js +2 -2
- package/vue/chunks/UiGrid.js +2 -2
- package/vue/chunks/UiIcon.js +2 -2
- package/vue/chunks/UiIconButton.js +77 -11
- package/vue/chunks/UiImage.js +2 -2
- package/vue/chunks/UiInput.js +3 -3
- package/vue/chunks/UiInputGroup.js +3 -3
- package/vue/chunks/UiLightEditor.js +347 -0
- package/vue/chunks/UiList.js +2 -2
- package/vue/chunks/UiListItem.js +2 -2
- package/vue/chunks/UiListbox.js +2 -2
- package/vue/chunks/UiMenu.js +3 -3
- package/vue/chunks/UiMenuGroup.js +2 -2
- package/vue/chunks/UiMenuItem.js +2 -2
- package/vue/chunks/UiMeter.js +2 -2
- package/vue/chunks/UiNavItem.js +2 -2
- package/vue/chunks/UiNumberInput.js +403 -0
- package/vue/chunks/UiPageHeader.js +2 -2
- package/vue/chunks/UiPopover.js +4 -4
- package/vue/chunks/UiRadio.js +2 -2
- package/vue/chunks/UiRadioGroup.js +2 -2
- package/vue/chunks/UiReel.js +2 -2
- package/vue/chunks/UiScrollArea.js +2 -2
- package/vue/chunks/UiSearchResultRow.js +2 -2
- package/vue/chunks/UiSearchShell.js +2 -2
- package/vue/chunks/UiSection.js +2 -2
- package/vue/chunks/UiSelect.js +3 -3
- package/vue/chunks/UiSeparator.js +2 -2
- package/vue/chunks/UiSidebar.js +2 -2
- package/vue/chunks/UiSlider.js +396 -0
- package/vue/chunks/UiSpinner.js +2 -2
- package/vue/chunks/UiStack.js +2 -2
- package/vue/chunks/UiStatusMessage.js +2 -2
- package/vue/chunks/UiSwatch.js +2 -2
- package/vue/chunks/UiSwitch.js +3 -3
- package/vue/chunks/UiSwitcher.js +2 -2
- package/vue/chunks/UiTable.js +2 -2
- package/vue/chunks/UiTabs.js +3 -3
- package/vue/chunks/UiText.js +53 -12
- package/vue/chunks/UiTextarea.js +3 -3
- package/vue/chunks/UiToast.js +2 -2
- package/vue/chunks/UiToastRegion.js +2 -2
- package/vue/chunks/UiTooltip.js +3 -3
- package/vue/chunks/UiTopBar.js +1 -1
- package/vue/chunks/UiTree.js +2 -2
- package/vue/chunks/UiTreeItem.js +2 -2
- package/vue/chunks/_plugin-vue_export-helper.js +68 -2
- package/vue/chunks/props.js +24 -1
- package/vue/components.css +3391 -2139
- package/vue/editor/index.js +623 -211
- package/vue/index.d.ts +4 -0
- package/vue/index.js +6 -2
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.69 for Vanilla DOM. Do not edit.
|
|
2
|
+
import { attachGeneratedController, stateInitializers, buildTemplate, checkReference, NONCONFORMING, textCall, toAttribute, writeAttribute, dispatchDeclared, detailCheck, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, awaitInput, inputRead, READY_INPUT, UNRESOLVED_INPUT, checkBoolean, checkFormat, checkNumber, checkObject, checkString, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
|
|
3
|
+
import * as controller from "../components/ui-slider/ui-slider.js";
|
|
4
|
+
import "../styles/ui-slider.css";
|
|
5
|
+
|
|
6
|
+
const T0 = ["",[],"\n ",["input",["type","range","data-ui-field-control",""]],"\n ",["ui-number-input",["data-slider-exact",""]],"\n "];
|
|
7
|
+
let P0;
|
|
8
|
+
const S = { n: ["current"], t: ["n"], f: import.meta.url, g: "ui-slider", d: { "input": [detailCheck(checkObject([["value", checkNumber, false]], false)), true, true, false], "change": [detailCheck(checkObject([["value", checkNumber, false]], false)), true, true, false] }, x: dispatchDeclared, a: (host, I) => C(host, I), b: generatedInputs };
|
|
9
|
+
const D = { g: "ui-slider", props: { "disabled": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "label": { "required":false,"default":"Value", c: checkString, t: "string", j: 0, m: "s" }, "max": { "required":false,"default":100, c: checkNumber, t: "number", j: 0, m: "n" }, "min": { "required":false,"default":0, c: checkNumber, t: "number", j: 0, m: "n" }, "name": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" }, "size": { "required":false,"values":["sm","md","lg"],"default":"md", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "step": { "required":false,"default":1, c: checkNumber, t: "number", j: 0, m: "n" }, "unit": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" }, "value": { "required":false,"default":0, c: checkNumber, t: "number", j: 0, m: "n" } } };
|
|
10
|
+
const C = (host) => activateModule(controller, host);
|
|
11
|
+
|
|
12
|
+
export function createUiSlider(options = {}, html) {
|
|
13
|
+
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
14
|
+
const element = document.createElement("span");
|
|
15
|
+
for (const [name, value] of Object.entries(attributes)) {
|
|
16
|
+
if (value === null || value === undefined || value === false) continue;
|
|
17
|
+
element.setAttribute(name, value === true ? "" : String(value));
|
|
18
|
+
}
|
|
19
|
+
element.setAttribute("data-component", "ui-slider");
|
|
20
|
+
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
21
|
+
const v = [null, null, null, null, null, null, null, null, null, null];
|
|
22
|
+
const B = acceptProps(element, D, S.n, v, componentProps, [], html);
|
|
23
|
+
const CS = [];
|
|
24
|
+
const inputStatus = (j) => { if (j === 0) return E.status(j); if (j === 1) return awaitInput(B, "disabled", true); if (j === 2) return awaitInput(B, "label", true); if (j === 3) return awaitInput(B, "max", true); if (j === 4) return awaitInput(B, "min", true); if (j === 5) return awaitInput(B, "name", true); if (j === 6) return awaitInput(B, "size", true); if (j === 7) return awaitInput(B, "step", true); if (j === 8) return awaitInput(B, "unit", true); if (j === 9) return awaitInput(B, "value", true); return v[j] === undefined ? UNRESOLVED_INPUT : READY_INPUT; };
|
|
25
|
+
const X = { e: 0, g: (j) => v[j], w: new Set(), a: CS, i: inputStatus };
|
|
26
|
+
const E = stateInitializers(S, v, X, { 0: () => inputRead(v[9], inputStatus(9)) });
|
|
27
|
+
const p0 = (r, c, d) => {
|
|
28
|
+
if (c & 4) {
|
|
29
|
+
const x0 = v[2];
|
|
30
|
+
const s0 = toAttribute(x0, "aria-label");
|
|
31
|
+
if (s0 !== r.v0) writeAttribute(r.a0, "aria-label", r.v0 = s0);
|
|
32
|
+
}
|
|
33
|
+
if (c & 257) {
|
|
34
|
+
const x1 = (checkReference(S, v[0], "n", "expression:concat($current, $unit):current", "Reference `current` must satisfy number.") ? textCall("concat", [E.read(0), v[8]]) : NONCONFORMING);
|
|
35
|
+
if (x1 !== NONCONFORMING) {
|
|
36
|
+
const s1 = toAttribute(x1, "aria-valuetext");
|
|
37
|
+
if (s1 !== r.v1) writeAttribute(r.a0, "aria-valuetext", r.v1 = s1);
|
|
38
|
+
}
|
|
39
|
+
if (x1 !== NONCONFORMING) {
|
|
40
|
+
const s8 = toAttribute(x1, "value");
|
|
41
|
+
if (s8 !== r.v8) writeAttribute(r.a1, "value", r.v8 = s8);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (c & 512) {
|
|
45
|
+
const x2 = v[9];
|
|
46
|
+
const s2 = toAttribute(x2, "value");
|
|
47
|
+
if (s2 !== r.v2) writeAttribute(r.a0, "value", r.v2 = s2);
|
|
48
|
+
}
|
|
49
|
+
if (c & 16) {
|
|
50
|
+
const x3 = v[4];
|
|
51
|
+
const s3 = toAttribute(x3, "min");
|
|
52
|
+
if (s3 !== r.v3) writeAttribute(r.a0, "min", r.v3 = s3);
|
|
53
|
+
}
|
|
54
|
+
if (c & 8) {
|
|
55
|
+
const x4 = v[3];
|
|
56
|
+
const s4 = toAttribute(x4, "max");
|
|
57
|
+
if (s4 !== r.v4) writeAttribute(r.a0, "max", r.v4 = s4);
|
|
58
|
+
}
|
|
59
|
+
if (c & 128) {
|
|
60
|
+
const x5 = v[7];
|
|
61
|
+
const s5 = toAttribute(x5, "step");
|
|
62
|
+
if (s5 !== r.v5) writeAttribute(r.a0, "step", r.v5 = s5);
|
|
63
|
+
}
|
|
64
|
+
if (c & 2) {
|
|
65
|
+
const x6 = v[1];
|
|
66
|
+
const s6 = toAttribute(x6, "disabled");
|
|
67
|
+
if (s6 !== r.v6) writeAttribute(r.a0, "disabled", r.v6 = s6);
|
|
68
|
+
}
|
|
69
|
+
if (c & 32) {
|
|
70
|
+
const x7 = v[5];
|
|
71
|
+
const s7 = toAttribute(x7, "name");
|
|
72
|
+
if (s7 !== r.v7) writeAttribute(r.a0, "name", r.v7 = s7);
|
|
73
|
+
}
|
|
74
|
+
if (c & 256) {
|
|
75
|
+
const x8 = v[8];
|
|
76
|
+
const s9 = toAttribute(x8, "unit");
|
|
77
|
+
if (s9 !== r.v9) writeAttribute(r.a1, "unit", r.v9 = s9);
|
|
78
|
+
}
|
|
79
|
+
if (c & 16) {
|
|
80
|
+
const x9 = v[4];
|
|
81
|
+
const s10 = toAttribute(x9, "min");
|
|
82
|
+
if (s10 !== r.v10) writeAttribute(r.a1, "min", r.v10 = s10);
|
|
83
|
+
}
|
|
84
|
+
if (c & 8) {
|
|
85
|
+
const x10 = v[3];
|
|
86
|
+
const s11 = toAttribute(x10, "max");
|
|
87
|
+
if (s11 !== r.v11) writeAttribute(r.a1, "max", r.v11 = s11);
|
|
88
|
+
}
|
|
89
|
+
if (c & 128) {
|
|
90
|
+
const x11 = v[7];
|
|
91
|
+
const s12 = toAttribute(x11, "step");
|
|
92
|
+
if (s12 !== r.v12) writeAttribute(r.a1, "step", r.v12 = s12);
|
|
93
|
+
}
|
|
94
|
+
if (c & 1073741888) {
|
|
95
|
+
const x12 = v[6];
|
|
96
|
+
const s13 = toAttribute(x12, "size");
|
|
97
|
+
if (s13 !== r.v13) writeAttribute(r.a1, "size", r.v13 = s13);
|
|
98
|
+
}
|
|
99
|
+
if (c & 2) {
|
|
100
|
+
const x13 = v[1];
|
|
101
|
+
const s14 = toAttribute(x13, "disabled");
|
|
102
|
+
if (s14 !== r.v14) writeAttribute(r.a1, "disabled", r.v14 = s14);
|
|
103
|
+
}
|
|
104
|
+
if (c & 4) {
|
|
105
|
+
const x14 = v[2];
|
|
106
|
+
const s15 = toAttribute(x14, "label");
|
|
107
|
+
if (s15 !== r.v15) writeAttribute(r.a1, "label", r.v15 = s15);
|
|
108
|
+
}
|
|
109
|
+
if (c & 64) {
|
|
110
|
+
const x15 = hostState(["size"], [v[6]]);
|
|
111
|
+
const s16 = x15;
|
|
112
|
+
if (s16 !== r.v16) writeAttribute(r.n, "data-ui-slider-state", (r.v16 = s16) === "" ? null : s16);
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
const t0 = element.firstChild.nextSibling;
|
|
116
|
+
const t1 = t0.nextSibling.nextSibling;
|
|
117
|
+
const R = { n: element, a0: t0, a1: t1, v0: null, v1: null, v2: null, v3: null, v4: null, v5: null, v6: null, v7: null, v8: null, v9: null, v10: null, v11: null, v12: null, v13: null, v14: null, v15: null, v16: undefined };
|
|
118
|
+
const I = { B, U: E };
|
|
119
|
+
I.R = new Set();
|
|
120
|
+
attachGeneratedController(element, S, v, (c, d) => { ((c, d) => p0(R, c, d))(c, d); for (const f of I.R) f(c, d); }, undefined, X, I);
|
|
121
|
+
manageProps(I);
|
|
122
|
+
I.r["range"] = t0;
|
|
123
|
+
return element;
|
|
124
|
+
}
|
|
125
|
+
defineComponent("ui-slider", createUiSlider, ["disabled","label","max","min","name","size","step","unit","value"]);
|
package/vanilla/UiText.d.ts
CHANGED
|
@@ -11,14 +11,14 @@ export interface UiTextElement extends HTMLElement {
|
|
|
11
11
|
}
|
|
12
12
|
export interface UiTextProps {
|
|
13
13
|
align?: "start" | "center" | null;
|
|
14
|
-
as?: "p" | "span" | "div" | "small" | "strong" | "label" | "h2" | "h3" | "h4" | "h5" | "h6" | null;
|
|
14
|
+
as?: "p" | "span" | "div" | "small" | "strong" | "label" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | null;
|
|
15
15
|
font?: "inherit" | "sans" | null;
|
|
16
16
|
grow?: boolean | null;
|
|
17
17
|
size?: "inherit" | "xs" | "sm" | "md" | "lg" | null;
|
|
18
18
|
tone?: "default" | "secondary" | "muted" | "accent" | "danger" | "success" | "info" | "warning" | null;
|
|
19
19
|
trim?: boolean | null;
|
|
20
20
|
truncate?: boolean | null;
|
|
21
|
-
variant?: "body" | "eyebrow" | "code" | null;
|
|
21
|
+
variant?: "body" | "display" | "heading" | "label" | "caption" | "eyebrow" | "code" | null;
|
|
22
22
|
weight?: "inherit" | "normal" | "medium" | "semibold" | null;
|
|
23
23
|
wrap?: "normal" | "anywhere" | null;
|
|
24
24
|
attributes?: Readonly<Record<string, string | number | boolean | null | undefined>>;
|
package/vanilla/UiText.js
CHANGED
|
@@ -24,17 +24,19 @@ const T18 = ["",[],4];
|
|
|
24
24
|
const T19 = ["",[]];
|
|
25
25
|
const T20 = ["",[],4];
|
|
26
26
|
const T21 = ["",[]];
|
|
27
|
-
|
|
27
|
+
const T22 = ["",[],4];
|
|
28
|
+
const T23 = ["",[]];
|
|
29
|
+
let P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23;
|
|
28
30
|
const S = { n: [], t: [], f: import.meta.url, g: "ui-text", b: generatedInputs };
|
|
29
|
-
const A = [["span",{},[],"",[],["data-ui-text-state","data-ui-text-prop-align","data-ui-text-prop-as","data-ui-text-prop-font","data-ui-text-prop-grow","data-ui-text-prop-size","data-ui-text-prop-tone","data-ui-text-prop-trim","data-ui-text-prop-truncate","data-ui-text-prop-variant","data-ui-text-prop-weight","data-ui-text-prop-wrap"]],["div",{},[],"",[],["data-ui-text-state","data-ui-text-prop-align","data-ui-text-prop-as","data-ui-text-prop-font","data-ui-text-prop-grow","data-ui-text-prop-size","data-ui-text-prop-tone","data-ui-text-prop-trim","data-ui-text-prop-truncate","data-ui-text-prop-variant","data-ui-text-prop-weight","data-ui-text-prop-wrap"]],["small",{},[],"",[],["data-ui-text-state","data-ui-text-prop-align","data-ui-text-prop-as","data-ui-text-prop-font","data-ui-text-prop-grow","data-ui-text-prop-size","data-ui-text-prop-tone","data-ui-text-prop-trim","data-ui-text-prop-truncate","data-ui-text-prop-variant","data-ui-text-prop-weight","data-ui-text-prop-wrap"]],["strong",{},[],"",[],["data-ui-text-state","data-ui-text-prop-align","data-ui-text-prop-as","data-ui-text-prop-font","data-ui-text-prop-grow","data-ui-text-prop-size","data-ui-text-prop-tone","data-ui-text-prop-trim","data-ui-text-prop-truncate","data-ui-text-prop-variant","data-ui-text-prop-weight","data-ui-text-prop-wrap"]],["label",{},[],"",[],["data-ui-text-state","data-ui-text-prop-align","data-ui-text-prop-as","data-ui-text-prop-font","data-ui-text-prop-grow","data-ui-text-prop-size","data-ui-text-prop-tone","data-ui-text-prop-trim","data-ui-text-prop-truncate","data-ui-text-prop-variant","data-ui-text-prop-weight","data-ui-text-prop-wrap"]],["h2",{},[],"",[],["data-ui-text-state","data-ui-text-prop-align","data-ui-text-prop-as","data-ui-text-prop-font","data-ui-text-prop-grow","data-ui-text-prop-size","data-ui-text-prop-tone","data-ui-text-prop-trim","data-ui-text-prop-truncate","data-ui-text-prop-variant","data-ui-text-prop-weight","data-ui-text-prop-wrap"]],["h3",{},[],"",[],["data-ui-text-state","data-ui-text-prop-align","data-ui-text-prop-as","data-ui-text-prop-font","data-ui-text-prop-grow","data-ui-text-prop-size","data-ui-text-prop-tone","data-ui-text-prop-trim","data-ui-text-prop-truncate","data-ui-text-prop-variant","data-ui-text-prop-weight","data-ui-text-prop-wrap"]],["h4",{},[],"",[],["data-ui-text-state","data-ui-text-prop-align","data-ui-text-prop-as","data-ui-text-prop-font","data-ui-text-prop-grow","data-ui-text-prop-size","data-ui-text-prop-tone","data-ui-text-prop-trim","data-ui-text-prop-truncate","data-ui-text-prop-variant","data-ui-text-prop-weight","data-ui-text-prop-wrap"]],["h5",{},[],"",[],["data-ui-text-state","data-ui-text-prop-align","data-ui-text-prop-as","data-ui-text-prop-font","data-ui-text-prop-grow","data-ui-text-prop-size","data-ui-text-prop-tone","data-ui-text-prop-trim","data-ui-text-prop-truncate","data-ui-text-prop-variant","data-ui-text-prop-weight","data-ui-text-prop-wrap"]],["h6",{},[],"",[],["data-ui-text-state","data-ui-text-prop-align","data-ui-text-prop-as","data-ui-text-prop-font","data-ui-text-prop-grow","data-ui-text-prop-size","data-ui-text-prop-tone","data-ui-text-prop-trim","data-ui-text-prop-truncate","data-ui-text-prop-variant","data-ui-text-prop-weight","data-ui-text-prop-wrap"]],["p",{},[],"",[],["data-ui-text-state","data-ui-text-prop-align","data-ui-text-prop-as","data-ui-text-prop-font","data-ui-text-prop-grow","data-ui-text-prop-size","data-ui-text-prop-tone","data-ui-text-prop-trim","data-ui-text-prop-truncate","data-ui-text-prop-variant","data-ui-text-prop-weight","data-ui-text-prop-wrap"]]];
|
|
30
|
-
const Q = [[],[],[],[],[],[],[],[],[],[],[]];
|
|
31
|
-
const D = { g: "ui-text", props: { "align": { "required":false,"values":["start","center"],"default":"start", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "as": { "required":false,"values":["p","span","div","small","strong","label","h2","h3","h4","h5","h6"],"default":"p", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "font": { "required":false,"values":["inherit","sans"],"default":"inherit", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "grow": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "size": { "required":false,"values":["inherit","xs","sm","md","lg"],"default":"inherit", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "tone": { "required":false,"values":["default","secondary","muted","accent","danger","success","info","warning"],"default":"default", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "trim": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "truncate": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "variant": { "required":false,"values":["body","eyebrow","code"],"default":"body", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "weight": { "required":false,"values":["inherit","normal","medium","semibold"],"default":"inherit", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "wrap": { "required":false,"values":["normal","anywhere"],"default":"normal", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] } } };
|
|
31
|
+
const A = [["span",{},[],"",[],["data-ui-text-state","data-ui-text-prop-align","data-ui-text-prop-as","data-ui-text-prop-font","data-ui-text-prop-grow","data-ui-text-prop-size","data-ui-text-prop-tone","data-ui-text-prop-trim","data-ui-text-prop-truncate","data-ui-text-prop-variant","data-ui-text-prop-weight","data-ui-text-prop-wrap"]],["div",{},[],"",[],["data-ui-text-state","data-ui-text-prop-align","data-ui-text-prop-as","data-ui-text-prop-font","data-ui-text-prop-grow","data-ui-text-prop-size","data-ui-text-prop-tone","data-ui-text-prop-trim","data-ui-text-prop-truncate","data-ui-text-prop-variant","data-ui-text-prop-weight","data-ui-text-prop-wrap"]],["small",{},[],"",[],["data-ui-text-state","data-ui-text-prop-align","data-ui-text-prop-as","data-ui-text-prop-font","data-ui-text-prop-grow","data-ui-text-prop-size","data-ui-text-prop-tone","data-ui-text-prop-trim","data-ui-text-prop-truncate","data-ui-text-prop-variant","data-ui-text-prop-weight","data-ui-text-prop-wrap"]],["strong",{},[],"",[],["data-ui-text-state","data-ui-text-prop-align","data-ui-text-prop-as","data-ui-text-prop-font","data-ui-text-prop-grow","data-ui-text-prop-size","data-ui-text-prop-tone","data-ui-text-prop-trim","data-ui-text-prop-truncate","data-ui-text-prop-variant","data-ui-text-prop-weight","data-ui-text-prop-wrap"]],["label",{},[],"",[],["data-ui-text-state","data-ui-text-prop-align","data-ui-text-prop-as","data-ui-text-prop-font","data-ui-text-prop-grow","data-ui-text-prop-size","data-ui-text-prop-tone","data-ui-text-prop-trim","data-ui-text-prop-truncate","data-ui-text-prop-variant","data-ui-text-prop-weight","data-ui-text-prop-wrap"]],["h1",{},[],"",[],["data-ui-text-state","data-ui-text-prop-align","data-ui-text-prop-as","data-ui-text-prop-font","data-ui-text-prop-grow","data-ui-text-prop-size","data-ui-text-prop-tone","data-ui-text-prop-trim","data-ui-text-prop-truncate","data-ui-text-prop-variant","data-ui-text-prop-weight","data-ui-text-prop-wrap"]],["h2",{},[],"",[],["data-ui-text-state","data-ui-text-prop-align","data-ui-text-prop-as","data-ui-text-prop-font","data-ui-text-prop-grow","data-ui-text-prop-size","data-ui-text-prop-tone","data-ui-text-prop-trim","data-ui-text-prop-truncate","data-ui-text-prop-variant","data-ui-text-prop-weight","data-ui-text-prop-wrap"]],["h3",{},[],"",[],["data-ui-text-state","data-ui-text-prop-align","data-ui-text-prop-as","data-ui-text-prop-font","data-ui-text-prop-grow","data-ui-text-prop-size","data-ui-text-prop-tone","data-ui-text-prop-trim","data-ui-text-prop-truncate","data-ui-text-prop-variant","data-ui-text-prop-weight","data-ui-text-prop-wrap"]],["h4",{},[],"",[],["data-ui-text-state","data-ui-text-prop-align","data-ui-text-prop-as","data-ui-text-prop-font","data-ui-text-prop-grow","data-ui-text-prop-size","data-ui-text-prop-tone","data-ui-text-prop-trim","data-ui-text-prop-truncate","data-ui-text-prop-variant","data-ui-text-prop-weight","data-ui-text-prop-wrap"]],["h5",{},[],"",[],["data-ui-text-state","data-ui-text-prop-align","data-ui-text-prop-as","data-ui-text-prop-font","data-ui-text-prop-grow","data-ui-text-prop-size","data-ui-text-prop-tone","data-ui-text-prop-trim","data-ui-text-prop-truncate","data-ui-text-prop-variant","data-ui-text-prop-weight","data-ui-text-prop-wrap"]],["h6",{},[],"",[],["data-ui-text-state","data-ui-text-prop-align","data-ui-text-prop-as","data-ui-text-prop-font","data-ui-text-prop-grow","data-ui-text-prop-size","data-ui-text-prop-tone","data-ui-text-prop-trim","data-ui-text-prop-truncate","data-ui-text-prop-variant","data-ui-text-prop-weight","data-ui-text-prop-wrap"]],["p",{},[],"",[],["data-ui-text-state","data-ui-text-prop-align","data-ui-text-prop-as","data-ui-text-prop-font","data-ui-text-prop-grow","data-ui-text-prop-size","data-ui-text-prop-tone","data-ui-text-prop-trim","data-ui-text-prop-truncate","data-ui-text-prop-variant","data-ui-text-prop-weight","data-ui-text-prop-wrap"]]];
|
|
32
|
+
const Q = [[],[],[],[],[],[],[],[],[],[],[],[]];
|
|
33
|
+
const D = { g: "ui-text", props: { "align": { "required":false,"values":["start","center"],"default":"start", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "as": { "required":false,"values":["p","span","div","small","strong","label","h1","h2","h3","h4","h5","h6"],"default":"p", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "font": { "required":false,"values":["inherit","sans"],"default":"inherit", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "grow": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "size": { "required":false,"values":["inherit","xs","sm","md","lg"],"default":"inherit", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "tone": { "required":false,"values":["default","secondary","muted","accent","danger","success","info","warning"],"default":"default", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "trim": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "truncate": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "variant": { "required":false,"values":["body","display","heading","label","caption","eyebrow","code"],"default":"body", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "weight": { "required":false,"values":["inherit","normal","medium","semibold"],"default":"inherit", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "wrap": { "required":false,"values":["normal","anywhere"],"default":"normal", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] } } };
|
|
32
34
|
|
|
33
35
|
export function createUiText(options = {}, html) {
|
|
34
36
|
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
35
37
|
const v = [null, null, null, null, null, null, null, null, null, null, null];
|
|
36
38
|
let B = acceptProps(undefined, D, S.n, v, componentProps, [], html);
|
|
37
|
-
let a = ((v[1] === "span") ? 0 : (v[1] === "div") ? 1 : (v[1] === "small") ? 2 : (v[1] === "strong") ? 3 : (v[1] === "label") ? 4 : (v[1] === "
|
|
39
|
+
let a = ((v[1] === "span") ? 0 : (v[1] === "div") ? 1 : (v[1] === "small") ? 2 : (v[1] === "strong") ? 3 : (v[1] === "label") ? 4 : (v[1] === "h1") ? 5 : (v[1] === "h2") ? 6 : (v[1] === "h3") ? 7 : (v[1] === "h4") ? 8 : (v[1] === "h5") ? 9 : (v[1] === "h6") ? 10 : 11);
|
|
38
40
|
let element;
|
|
39
41
|
if (a === 0) {
|
|
40
42
|
element = document.createElement("span");
|
|
@@ -72,34 +74,41 @@ export function createUiText(options = {}, html) {
|
|
|
72
74
|
}
|
|
73
75
|
element.setAttribute("data-component", "ui-text");
|
|
74
76
|
} else if (a === 5) {
|
|
75
|
-
element = document.createElement("
|
|
77
|
+
element = document.createElement("h1");
|
|
76
78
|
for (const [name, value] of Object.entries(attributes)) {
|
|
77
79
|
if (value === null || value === undefined || value === false) continue;
|
|
78
80
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
79
81
|
}
|
|
80
82
|
element.setAttribute("data-component", "ui-text");
|
|
81
83
|
} else if (a === 6) {
|
|
82
|
-
element = document.createElement("
|
|
84
|
+
element = document.createElement("h2");
|
|
83
85
|
for (const [name, value] of Object.entries(attributes)) {
|
|
84
86
|
if (value === null || value === undefined || value === false) continue;
|
|
85
87
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
86
88
|
}
|
|
87
89
|
element.setAttribute("data-component", "ui-text");
|
|
88
90
|
} else if (a === 7) {
|
|
89
|
-
element = document.createElement("
|
|
91
|
+
element = document.createElement("h3");
|
|
90
92
|
for (const [name, value] of Object.entries(attributes)) {
|
|
91
93
|
if (value === null || value === undefined || value === false) continue;
|
|
92
94
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
93
95
|
}
|
|
94
96
|
element.setAttribute("data-component", "ui-text");
|
|
95
97
|
} else if (a === 8) {
|
|
96
|
-
element = document.createElement("
|
|
98
|
+
element = document.createElement("h4");
|
|
97
99
|
for (const [name, value] of Object.entries(attributes)) {
|
|
98
100
|
if (value === null || value === undefined || value === false) continue;
|
|
99
101
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
100
102
|
}
|
|
101
103
|
element.setAttribute("data-component", "ui-text");
|
|
102
104
|
} else if (a === 9) {
|
|
105
|
+
element = document.createElement("h5");
|
|
106
|
+
for (const [name, value] of Object.entries(attributes)) {
|
|
107
|
+
if (value === null || value === undefined || value === false) continue;
|
|
108
|
+
element.setAttribute(name, value === true ? "" : String(value));
|
|
109
|
+
}
|
|
110
|
+
element.setAttribute("data-component", "ui-text");
|
|
111
|
+
} else if (a === 10) {
|
|
103
112
|
element = document.createElement("h6");
|
|
104
113
|
for (const [name, value] of Object.entries(attributes)) {
|
|
105
114
|
if (value === null || value === undefined || value === false) continue;
|
|
@@ -203,6 +212,14 @@ export function createUiText(options = {}, html) {
|
|
|
203
212
|
};
|
|
204
213
|
const p21 = (r, c, d) => {
|
|
205
214
|
};
|
|
215
|
+
const m23 = (d) => {
|
|
216
|
+
const n = (P23 ??= buildTemplate(T23)).cloneNode(true);
|
|
217
|
+
const r = { n };
|
|
218
|
+
p23(r, -1, d);
|
|
219
|
+
return r;
|
|
220
|
+
};
|
|
221
|
+
const p23 = (r, c, d) => {
|
|
222
|
+
};
|
|
206
223
|
const m0 = (n, d) => {
|
|
207
224
|
n.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
208
225
|
const t0 = n.firstChild;
|
|
@@ -390,13 +407,30 @@ export function createUiText(options = {}, html) {
|
|
|
390
407
|
if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b0 = m21(d); at.before(r.b0.n); } }
|
|
391
408
|
else if (r.b0 !== undefined) p21(r.b0, c, d);
|
|
392
409
|
};
|
|
393
|
-
const
|
|
410
|
+
const m22 = (n, d) => {
|
|
411
|
+
n.append((P22 ??= buildTemplate(T22)).cloneNode(true));
|
|
412
|
+
const t0 = n.firstChild;
|
|
413
|
+
const r = { n, v0: undefined, a0: t0, e0: t0.nextSibling, b0: undefined, f0: undefined };
|
|
414
|
+
p22(r, -1, d);
|
|
415
|
+
return r;
|
|
416
|
+
};
|
|
417
|
+
const p22 = (r, c, d) => {
|
|
418
|
+
if (c & 2045) {
|
|
419
|
+
const x0 = hostState(["grow","size","trim","tone","weight","variant","truncate","align","font","wrap"], [v[3], v[4], v[6], v[5], v[9], v[8], v[7], v[0], v[2], v[10]]);
|
|
420
|
+
const s0 = x0;
|
|
421
|
+
if (s0 !== r.v0) writeAttribute(r.n, "data-ui-text-state", (r.v0 = s0) === "" ? null : s0);
|
|
422
|
+
}
|
|
423
|
+
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a0, r.e0, "", J, false, undefined, d);
|
|
424
|
+
if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b0 = m23(d); at.before(r.b0.n); } }
|
|
425
|
+
else if (r.b0 !== undefined) p23(r.b0, c, d);
|
|
426
|
+
};
|
|
427
|
+
const M = [m0, m2, m4, m6, m8, m10, m12, m14, m16, m18, m20, m22], N = [p0, p2, p4, p6, p8, p10, p12, p14, p16, p18, p20, p22];
|
|
394
428
|
let R;
|
|
395
429
|
const p = (c, d) => {
|
|
396
430
|
if (R === null) return;
|
|
397
431
|
if (R === undefined) { R = M[a](element, d); return; }
|
|
398
432
|
if (c & 2) {
|
|
399
|
-
const t = ((v[1] === "span") ? 0 : (v[1] === "div") ? 1 : (v[1] === "small") ? 2 : (v[1] === "strong") ? 3 : (v[1] === "label") ? 4 : (v[1] === "
|
|
433
|
+
const t = ((v[1] === "span") ? 0 : (v[1] === "div") ? 1 : (v[1] === "small") ? 2 : (v[1] === "strong") ? 3 : (v[1] === "label") ? 4 : (v[1] === "h1") ? 5 : (v[1] === "h2") ? 6 : (v[1] === "h3") ? 7 : (v[1] === "h4") ? 8 : (v[1] === "h5") ? 9 : (v[1] === "h6") ? 10 : 11);
|
|
400
434
|
if (t !== a) {
|
|
401
435
|
dispose(R);
|
|
402
436
|
for (const key in I.r) delete I.r[key];
|
package/vanilla/index.js
CHANGED
|
@@ -15,6 +15,7 @@ export * from "./UiCombobox.js";
|
|
|
15
15
|
export * from "./UiContainer.js";
|
|
16
16
|
export * from "./UiContextMenu.js";
|
|
17
17
|
export * from "./UiCover.js";
|
|
18
|
+
export * from "./UiCurveEditor.js";
|
|
18
19
|
export * from "./UiDescriptionItem.js";
|
|
19
20
|
export * from "./UiDescriptionList.js";
|
|
20
21
|
export * from "./UiDialog.js";
|
|
@@ -46,6 +47,7 @@ export * from "./UiIconButton.js";
|
|
|
46
47
|
export * from "./UiImage.js";
|
|
47
48
|
export * from "./UiInput.js";
|
|
48
49
|
export * from "./UiInputGroup.js";
|
|
50
|
+
export * from "./UiLightEditor.js";
|
|
49
51
|
export * from "./UiList.js";
|
|
50
52
|
export * from "./UiListbox.js";
|
|
51
53
|
export * from "./UiListItem.js";
|
|
@@ -54,6 +56,7 @@ export * from "./UiMenuGroup.js";
|
|
|
54
56
|
export * from "./UiMenuItem.js";
|
|
55
57
|
export * from "./UiMeter.js";
|
|
56
58
|
export * from "./UiNavItem.js";
|
|
59
|
+
export * from "./UiNumberInput.js";
|
|
57
60
|
export * from "./UiPageHeader.js";
|
|
58
61
|
export * from "./UiPopover.js";
|
|
59
62
|
export * from "./UiRadio.js";
|
|
@@ -66,6 +69,7 @@ export * from "./UiSection.js";
|
|
|
66
69
|
export * from "./UiSelect.js";
|
|
67
70
|
export * from "./UiSeparator.js";
|
|
68
71
|
export * from "./UiSidebar.js";
|
|
72
|
+
export * from "./UiSlider.js";
|
|
69
73
|
export * from "./UiSpinner.js";
|
|
70
74
|
export * from "./UiStack.js";
|
|
71
75
|
export * from "./UiStatusMessage.js";
|
package/vue/UiBadge.vue
CHANGED
|
@@ -257,9 +257,6 @@ const hostState = computed(() =>
|
|
|
257
257
|
/* A count can keep its containing control's contrasting ink instead of reversing it.
|
|
258
258
|
The faint fill preserves text contrast; a quiet boundary separates the count from its control. */
|
|
259
259
|
|
|
260
|
-
/* Neutral reverses a subtle surface/ink pair rather than a strong tone. Keep its original
|
|
261
|
-
surface ink: moving it toward dark-theme primary text would reduce overlay contrast. */
|
|
262
|
-
|
|
263
260
|
/* An icon mark keeps the existing tone recipe and follows the global spacing and radius. */
|
|
264
261
|
|
|
265
262
|
/* A visible glyph needs fixed geometry, unlike a content-sized pill or a hidden-label dot. */
|
|
@@ -557,8 +554,36 @@ const hostState = computed(() =>
|
|
|
557
554
|
border-color: var(--ui-badge-border, color-mix(in srgb, currentColor 20%, transparent));
|
|
558
555
|
box-shadow: none;
|
|
559
556
|
}
|
|
557
|
+
|
|
560
558
|
:global(:scope[data-ui-badge-state~="variant=inverse"][data-ui-badge-state~="tone=neutral"]:where([data-hn-ui-badge])) {
|
|
561
|
-
|
|
559
|
+
--_badge-outline-surface: var(
|
|
560
|
+
--ui-badge-surface,
|
|
561
|
+
var(--_badge-color-surface, color-mix(in srgb, var(--ui-surface-raised) 88%, transparent))
|
|
562
|
+
);
|
|
563
|
+
color: var(--ui-badge-text, var(--_badge-color-text, var(--ui-text-primary)));
|
|
564
|
+
}
|
|
565
|
+
:global(:scope[data-ui-badge-state~="variant=inverse"][data-ui-badge-state~="tone=neutral"]:not([data-ui-badge-state~="shape=circle"]):where([data-hn-ui-badge])) {
|
|
566
|
+
border-color: var(--ui-badge-border, var(--_badge-color-border, var(--_badge-outline-surface)));
|
|
567
|
+
}
|
|
568
|
+
:global(:scope[data-ui-badge-state~="variant=inverse"][data-ui-badge-state~="tone=neutral"][data-ui-badge-state~="shape=circle"]:where([data-hn-ui-badge])) {
|
|
569
|
+
--_badge-outline-surface: var(
|
|
570
|
+
--ui-badge-surface,
|
|
571
|
+
var(
|
|
572
|
+
--_badge-color-surface,
|
|
573
|
+
light-dark(
|
|
574
|
+
color-mix(
|
|
575
|
+
in srgb,
|
|
576
|
+
var(--ui-surface-raised) var(--ui-badge-circle-opacity, 66%),
|
|
577
|
+
transparent
|
|
578
|
+
),
|
|
579
|
+
color-mix(
|
|
580
|
+
in srgb,
|
|
581
|
+
var(--ui-surface-raised) var(--ui-badge-circle-opacity, 56%),
|
|
582
|
+
transparent
|
|
583
|
+
)
|
|
584
|
+
)
|
|
585
|
+
)
|
|
586
|
+
);
|
|
562
587
|
}
|
|
563
588
|
|
|
564
589
|
:global(:scope[data-ui-badge-state~="variant=outline"]:where([data-hn-ui-badge])) {
|
package/vue/UiButton.d.ts
CHANGED
|
@@ -41,6 +41,9 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
41
41
|
pending: {
|
|
42
42
|
type: PropType<boolean | null>;
|
|
43
43
|
};
|
|
44
|
+
preset: {
|
|
45
|
+
type: PropType<"none" | "primary" | "standard" | "quiet" | "destructive" | null>;
|
|
46
|
+
};
|
|
44
47
|
rel: {
|
|
45
48
|
type: PropType<string | null>;
|
|
46
49
|
};
|
|
@@ -87,6 +90,9 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
87
90
|
pending: {
|
|
88
91
|
type: PropType<boolean | null>;
|
|
89
92
|
};
|
|
93
|
+
preset: {
|
|
94
|
+
type: PropType<"none" | "primary" | "standard" | "quiet" | "destructive" | null>;
|
|
95
|
+
};
|
|
90
96
|
rel: {
|
|
91
97
|
type: PropType<string | null>;
|
|
92
98
|
};
|