@threadlabs/looma 0.34.0 → 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.
Files changed (88) hide show
  1. package/components/ui-badge/ui-badge.html +11 -3
  2. package/components/ui-button/ui-button.html +29 -4
  3. package/components/ui-card/ui-card.html +15 -13
  4. package/components/ui-checkbox/ui-checkbox.html +4 -2
  5. package/components/ui-dialog/ui-dialog.html +2 -0
  6. package/components/ui-icon-button/ui-icon-button.html +22 -8
  7. package/components/ui-input/ui-input.html +2 -1
  8. package/components/ui-input-group/ui-input-group.html +4 -1
  9. package/components/ui-light-editor/ui-light-editor.html +45 -0
  10. package/components/ui-light-editor/ui-light-editor.js +53 -0
  11. package/components/ui-menu/ui-menu.html +2 -0
  12. package/components/ui-number-input/ui-number-input.html +2 -1
  13. package/components/ui-number-input/ui-number-input.js +6 -3
  14. package/components/ui-popover/ui-popover.html +2 -0
  15. package/components/ui-select/ui-select.html +9 -7
  16. package/components/ui-switch/ui-switch.html +3 -0
  17. package/components/ui-textarea/ui-textarea.html +2 -1
  18. package/dist/index.js +24 -23
  19. package/docs/README.md +26 -2
  20. package/docs/catalog.json +566 -44
  21. package/docs/customizer-render.mjs +24 -11
  22. package/docs/customizer.js +67 -17
  23. package/docs/index.d.ts +4 -1
  24. package/docs/index.mjs +1 -1
  25. package/docs/render.mjs +1 -1
  26. package/docs/site.mjs +30 -20
  27. package/docs/theme-session.mjs +4 -2
  28. package/docs/theme.mjs +59 -7
  29. package/package.json +2 -2
  30. package/styles/ui-badge.css +11 -6
  31. package/styles/ui-button.css +29 -4
  32. package/styles/ui-card.css +9 -9
  33. package/styles/ui-checkbox.css +4 -2
  34. package/styles/ui-dialog.css +4 -0
  35. package/styles/ui-icon-button.css +22 -8
  36. package/styles/ui-input-group.css +4 -1
  37. package/styles/ui-input.css +2 -1
  38. package/styles/ui-light-editor.css +28 -0
  39. package/styles/ui-menu.css +2 -0
  40. package/styles/ui-popover.css +2 -0
  41. package/styles/ui-select.css +9 -7
  42. package/styles/ui-switch.css +3 -0
  43. package/styles/ui-textarea.css +2 -1
  44. package/theme-light.css +1 -0
  45. package/theme-system.css +43 -7
  46. package/tokens.css +4 -0
  47. package/vanilla/UiCard.d.ts +2 -1
  48. package/vanilla/UiCard.js +12 -12
  49. package/vanilla/UiLightEditor.d.ts +29 -0
  50. package/vanilla/UiLightEditor.js +102 -0
  51. package/vanilla/UiNumberInput.js +27 -20
  52. package/vanilla/index.js +1 -0
  53. package/vue/UiBadge.vue +29 -4
  54. package/vue/UiButton.vue +33 -4
  55. package/vue/UiCard.d.ts +8 -2
  56. package/vue/UiCard.vue +41 -17
  57. package/vue/UiCheckbox.vue +4 -2
  58. package/vue/UiDialog.vue +4 -0
  59. package/vue/UiIconButton.vue +26 -11
  60. package/vue/UiInput.vue +2 -1
  61. package/vue/UiInputGroup.vue +4 -1
  62. package/vue/UiLightEditor.d.ts +75 -0
  63. package/vue/UiLightEditor.js +2 -0
  64. package/vue/UiLightEditor.vue +402 -0
  65. package/vue/UiMenu.vue +2 -0
  66. package/vue/UiNumberInput.vue +32 -3
  67. package/vue/UiPopover.vue +2 -0
  68. package/vue/UiSelect.vue +16 -10
  69. package/vue/UiSwitch.vue +3 -0
  70. package/vue/UiTextarea.vue +2 -1
  71. package/vue/chunks/UiBadge.js +1 -1
  72. package/vue/chunks/UiButton.js +1 -1
  73. package/vue/chunks/UiCard.js +33 -5
  74. package/vue/chunks/UiCheckbox.js +1 -1
  75. package/vue/chunks/UiDialog.js +1 -1
  76. package/vue/chunks/UiIconButton.js +1 -1
  77. package/vue/chunks/UiInput.js +1 -1
  78. package/vue/chunks/UiInputGroup.js +1 -1
  79. package/vue/chunks/UiLightEditor.js +347 -0
  80. package/vue/chunks/UiMenu.js +1 -1
  81. package/vue/chunks/UiNumberInput.js +21 -8
  82. package/vue/chunks/UiPopover.js +1 -1
  83. package/vue/chunks/UiSelect.js +1 -1
  84. package/vue/chunks/UiSwitch.js +1 -1
  85. package/vue/chunks/UiTextarea.js +1 -1
  86. package/vue/components.css +306 -66
  87. package/vue/index.d.ts +1 -0
  88. package/vue/index.js +2 -1
package/tokens.css CHANGED
@@ -85,6 +85,10 @@
85
85
  never has to: these exist so components share one vocabulary, not to be configured. */
86
86
  :root,
87
87
  :where([data-theme], [data-contrast]) {
88
+ /* Neutral is a quiet filled surface, never the text colour inverted. */
89
+ --ui-neutral-surface: color-mix(in srgb, var(--ui-text) 6%, var(--ui-surface-raised));
90
+ --ui-neutral-hover: color-mix(in srgb, var(--ui-text) 10%, var(--ui-surface-raised));
91
+ --ui-neutral-active: color-mix(in srgb, var(--ui-text) 14%, var(--ui-surface-raised));
88
92
  --ui-accent-line-width: var(--ui-border-width);
89
93
 
90
94
  /* Type scale, from the base size. */
@@ -14,7 +14,8 @@ export interface UiCardProps {
14
14
  padding?: "xs" | "sm" | "md" | "lg" | null;
15
15
  size?: "content" | "sm" | "md" | "lg" | null;
16
16
  tone?: "neutral" | "accent" | "info" | "success" | "warning" | "danger" | null;
17
- variant?: "outlined" | "subtle" | "elevated" | "glass" | null;
17
+ treatment?: "standard" | "expressive" | null;
18
+ variant?: "outlined" | "subtle" | "elevated" | null;
18
19
  attributes?: Readonly<Record<string, string | number | boolean | null | undefined>>;
19
20
  children?: readonly (string | Node)[];
20
21
  slots?: Readonly<Record<string, readonly (string | Node)[]>>;
package/vanilla/UiCard.js CHANGED
@@ -12,13 +12,13 @@ const T6 = ["",[],4];
12
12
  const T7 = ["",[]];
13
13
  let P0, P1, P2, P3, P4, P5, P6, P7;
14
14
  const S = { n: [], t: [], f: import.meta.url, g: "ui-card", b: generatedInputs };
15
- const A = [["section",{},[],"",[],["data-ui-card-state","data-ui-card-prop-as","data-ui-card-prop-padding","data-ui-card-prop-size","data-ui-card-prop-tone","data-ui-card-prop-variant"]],["article",{},[],"",[],["data-ui-card-state","data-ui-card-prop-as","data-ui-card-prop-padding","data-ui-card-prop-size","data-ui-card-prop-tone","data-ui-card-prop-variant"]],["aside",{},[],"",[],["data-ui-card-state","data-ui-card-prop-as","data-ui-card-prop-padding","data-ui-card-prop-size","data-ui-card-prop-tone","data-ui-card-prop-variant"]],["div",{},[],"",[],["data-ui-card-state","data-ui-card-prop-as","data-ui-card-prop-padding","data-ui-card-prop-size","data-ui-card-prop-tone","data-ui-card-prop-variant"]]];
15
+ const A = [["section",{},[],"",[],["data-ui-card-state","data-ui-card-prop-as","data-ui-card-prop-padding","data-ui-card-prop-size","data-ui-card-prop-tone","data-ui-card-prop-treatment","data-ui-card-prop-variant"]],["article",{},[],"",[],["data-ui-card-state","data-ui-card-prop-as","data-ui-card-prop-padding","data-ui-card-prop-size","data-ui-card-prop-tone","data-ui-card-prop-treatment","data-ui-card-prop-variant"]],["aside",{},[],"",[],["data-ui-card-state","data-ui-card-prop-as","data-ui-card-prop-padding","data-ui-card-prop-size","data-ui-card-prop-tone","data-ui-card-prop-treatment","data-ui-card-prop-variant"]],["div",{},[],"",[],["data-ui-card-state","data-ui-card-prop-as","data-ui-card-prop-padding","data-ui-card-prop-size","data-ui-card-prop-tone","data-ui-card-prop-treatment","data-ui-card-prop-variant"]]];
16
16
  const Q = [[],[],[],[]];
17
- const D = { g: "ui-card", props: { "as": { "required":false,"values":["div","section","article","aside"],"default":"div", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "padding": { "required":false,"values":["xs","sm","md","lg"],"default":"md", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "size": { "required":false,"values":["content","sm","md","lg"],"default":"content", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "tone": { "required":false,"values":["neutral","accent","info","success","warning","danger"],"default":"neutral", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "variant": { "required":false,"values":["outlined","subtle","elevated","glass"],"default":"outlined", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] } } };
17
+ const D = { g: "ui-card", props: { "as": { "required":false,"values":["div","section","article","aside"],"default":"div", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "padding": { "required":false,"values":["xs","sm","md","lg"],"default":"md", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "size": { "required":false,"values":["content","sm","md","lg"],"default":"content", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "tone": { "required":false,"values":["neutral","accent","info","success","warning","danger"],"default":"neutral", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "treatment": { "required":false,"values":["standard","expressive"],"default":"standard", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "variant": { "required":false,"values":["outlined","subtle","elevated"],"default":"outlined", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] } } };
18
18
 
19
19
  export function createUiCard(options = {}, html) {
20
20
  const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
21
- const v = [null, null, null, null, null];
21
+ const v = [null, null, null, null, null, null];
22
22
  let B = acceptProps(undefined, D, S.n, v, componentProps, [], html);
23
23
  let a = ((v[0] === "section") ? 0 : (v[0] === "article") ? 1 : (v[0] === "aside") ? 2 : 3);
24
24
  let element;
@@ -92,8 +92,8 @@ export function createUiCard(options = {}, html) {
92
92
  return r;
93
93
  };
94
94
  const p0 = (r, c, d) => {
95
- if (c & 30) {
96
- const x0 = hostState(["padding","variant","tone","size"], [v[1], v[4], v[3], v[2]]);
95
+ if (c & 62) {
96
+ const x0 = hostState(["padding","variant","treatment","tone","size"], [v[1], v[5], v[4], v[3], v[2]]);
97
97
  const s0 = x0;
98
98
  if (s0 !== r.v0) writeAttribute(r.n, "data-ui-card-state", (r.v0 = s0) === "" ? null : s0);
99
99
  }
@@ -109,8 +109,8 @@ export function createUiCard(options = {}, html) {
109
109
  return r;
110
110
  };
111
111
  const p2 = (r, c, d) => {
112
- if (c & 30) {
113
- const x0 = hostState(["padding","variant","tone","size"], [v[1], v[4], v[3], v[2]]);
112
+ if (c & 62) {
113
+ const x0 = hostState(["padding","variant","treatment","tone","size"], [v[1], v[5], v[4], v[3], v[2]]);
114
114
  const s0 = x0;
115
115
  if (s0 !== r.v0) writeAttribute(r.n, "data-ui-card-state", (r.v0 = s0) === "" ? null : s0);
116
116
  }
@@ -126,8 +126,8 @@ export function createUiCard(options = {}, html) {
126
126
  return r;
127
127
  };
128
128
  const p4 = (r, c, d) => {
129
- if (c & 30) {
130
- const x0 = hostState(["padding","variant","tone","size"], [v[1], v[4], v[3], v[2]]);
129
+ if (c & 62) {
130
+ const x0 = hostState(["padding","variant","treatment","tone","size"], [v[1], v[5], v[4], v[3], v[2]]);
131
131
  const s0 = x0;
132
132
  if (s0 !== r.v0) writeAttribute(r.n, "data-ui-card-state", (r.v0 = s0) === "" ? null : s0);
133
133
  }
@@ -143,8 +143,8 @@ export function createUiCard(options = {}, html) {
143
143
  return r;
144
144
  };
145
145
  const p6 = (r, c, d) => {
146
- if (c & 30) {
147
- const x0 = hostState(["padding","variant","tone","size"], [v[1], v[4], v[3], v[2]]);
146
+ if (c & 62) {
147
+ const x0 = hostState(["padding","variant","treatment","tone","size"], [v[1], v[5], v[4], v[3], v[2]]);
148
148
  const s0 = x0;
149
149
  if (s0 !== r.v0) writeAttribute(r.n, "data-ui-card-state", (r.v0 = s0) === "" ? null : s0);
150
150
  }
@@ -179,4 +179,4 @@ export function createUiCard(options = {}, html) {
179
179
  manageProps(I);
180
180
  return element;
181
181
  }
182
- defineComponent("ui-card", createUiCard, ["as","padding","size","tone","variant"]);
182
+ defineComponent("ui-card", createUiCard, ["as","padding","size","tone","treatment","variant"]);
@@ -0,0 +1,29 @@
1
+ // Generated by HTML Next 1.0.0-alpha.69 for Vanilla DOM. Do not edit.
2
+ export interface UiLightEditorEventMap {
3
+ input: CustomEvent<{ readonly x: number; readonly y: number }>;
4
+ change: CustomEvent<{ readonly x: number; readonly y: number }>;
5
+ }
6
+ export interface UiLightEditorElement extends HTMLSpanElement {
7
+ addEventListener<K extends keyof UiLightEditorEventMap>(type: K, listener: (this: UiLightEditorElement, event: UiLightEditorEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void;
8
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: UiLightEditorElement, event: HTMLElementEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void;
9
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
10
+ removeEventListener<K extends keyof UiLightEditorEventMap>(type: K, listener: (this: UiLightEditorElement, event: UiLightEditorEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void;
11
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: UiLightEditorElement, event: HTMLElementEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void;
12
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
13
+ }
14
+ export interface UiLightEditorProps {
15
+ disabled?: boolean | null;
16
+ label?: string | null;
17
+ size?: "sm" | "md" | "lg" | null;
18
+ x?: number | null;
19
+ y?: number | null;
20
+ attributes?: Readonly<Record<string, string | number | boolean | null | undefined>>;
21
+ children?: readonly (string | Node)[];
22
+ slots?: Readonly<Record<string, readonly (string | Node)[]>>;
23
+ }
24
+ export declare function createUiLightEditor(props?: UiLightEditorProps): UiLightEditorElement;
25
+ declare global {
26
+ interface ComponentTagMap {
27
+ "ui-light-editor": { element: UiLightEditorElement; props: Omit<UiLightEditorProps, "attributes" | "children" | "slots"> };
28
+ }
29
+ }
@@ -0,0 +1,102 @@
1
+ // Generated by HTML Next 1.0.0-alpha.69 for Vanilla DOM. Do not edit.
2
+ import { attachGeneratedController, buildTemplate, NONCONFORMING, textCall, toAttribute, writeAttribute, dispatchDeclared, detailCheck, dispose, formatOf, keywordFormat, acceptProps, manageProps, generatedInputs, project, fillSlot, checkBoolean, checkFormat, checkNumber, checkObject, checkString, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
3
+ import * as controller from "../components/ui-light-editor/ui-light-editor.js";
4
+ import "../styles/ui-light-editor.css";
5
+
6
+ const T0 = ["",[],"\n ",["span",["class","stage","role","group"],"\n ",["span",["class","plane"],"\n ",["svg",["viewBox","0 0 100 60","preserveAspectRatio","none","aria-hidden","true"],["path",["d","M0 30 H100 M50 0 V60"]]],"\n ",["span",["class","specimen"],4],"\n ",["button",["type","button","class","source"]],"\n "],"\n "],"\n ",["span",["class","coordinates"],"\n ",["ui-number-input",["data-coordinate","x","min","0","max","100","step","1","unit","%","label","Light horizontal position"]],"\n ",["ui-number-input",["data-coordinate","y","min","0","max","100","step","1","unit","%","label","Light vertical position"]],"\n "],"\n ",["span",["class","hint"],"Drag the light, use arrow keys, or enter its position. Top centre is 50%, 0%."],"\n "];
7
+ const T1 = ["",[]];
8
+ let P0, P1;
9
+ const S = { n: ["horizontal","vertical"], t: ["s","s"], f: import.meta.url, g: "ui-light-editor", d: { "input": [detailCheck(checkObject([["x", checkNumber, false], ["y", checkNumber, false]], false)), true, true, false], "change": [detailCheck(checkObject([["x", checkNumber, false], ["y", checkNumber, false]], false)), true, true, false] }, x: dispatchDeclared, a: (host, I) => C(host, I), b: generatedInputs, i: ["50", "0"] };
10
+ const D = { g: "ui-light-editor", props: { "disabled": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "label": { "required":false,"default":"Light position", 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)] }, "x": { "required":false,"default":0.5, c: checkNumber, t: "number", j: 0, m: "n" }, "y": { "required":false,"default":0, c: checkNumber, t: "number", j: 0, m: "n" } } };
11
+ const C = (host) => activateModule(controller, host);
12
+
13
+ export function createUiLightEditor(options = {}, html) {
14
+ const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
15
+ const element = document.createElement("span");
16
+ for (const [name, value] of Object.entries(attributes)) {
17
+ if (value === null || value === undefined || value === false) continue;
18
+ element.setAttribute(name, value === true ? "" : String(value));
19
+ }
20
+ element.setAttribute("data-component", "ui-light-editor");
21
+ element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
22
+ const v = ["50", "0", null, null, null, null, null];
23
+ const B = acceptProps(element, D, S.n, v, componentProps, [], html);
24
+ const m1 = (d) => {
25
+ const n = (P1 ??= buildTemplate(T1)).cloneNode(true);
26
+ const r = { n };
27
+ p1(r, -1, d);
28
+ return r;
29
+ };
30
+ const p1 = (r, c, d) => {
31
+ };
32
+ const p0 = (r, c, d) => {
33
+ if (c & 8) {
34
+ const x0 = v[3];
35
+ const s0 = toAttribute(x0, "aria-label");
36
+ if (s0 !== r.v0) writeAttribute(r.a0, "aria-label", r.v0 = s0);
37
+ }
38
+ if (c & 4) {
39
+ const x1 = v[2];
40
+ const s1 = toAttribute(x1, "disabled");
41
+ if (s1 !== r.v1) writeAttribute(r.a3, "disabled", r.v1 = s1);
42
+ }
43
+ if (c & 8) {
44
+ const x2 = textCall("concat", [v[3], ". Arrow keys move the source; Shift moves faster."]);
45
+ if (x2 !== NONCONFORMING) {
46
+ const s2 = toAttribute(x2, "aria-label");
47
+ if (s2 !== r.v2) writeAttribute(r.a3, "aria-label", r.v2 = s2);
48
+ }
49
+ }
50
+ if (c & 1) {
51
+ const x3 = v[0];
52
+ const s3 = toAttribute(x3, "value");
53
+ if (s3 !== r.v3) writeAttribute(r.a4, "value", r.v3 = s3);
54
+ }
55
+ if (c & 1073741840) {
56
+ const x4 = v[4];
57
+ const s4 = toAttribute(x4, "size");
58
+ if (s4 !== r.v4) writeAttribute(r.a4, "size", r.v4 = s4);
59
+ }
60
+ if (c & 4) {
61
+ const x5 = v[2];
62
+ const s5 = toAttribute(x5, "disabled");
63
+ if (s5 !== r.v5) writeAttribute(r.a4, "disabled", r.v5 = s5);
64
+ }
65
+ if (c & 2) {
66
+ const x6 = v[1];
67
+ const s6 = toAttribute(x6, "value");
68
+ if (s6 !== r.v6) writeAttribute(r.a5, "value", r.v6 = s6);
69
+ }
70
+ if (c & 1073741840) {
71
+ const x7 = v[4];
72
+ const s7 = toAttribute(x7, "size");
73
+ if (s7 !== r.v7) writeAttribute(r.a5, "size", r.v7 = s7);
74
+ }
75
+ if (c & 4) {
76
+ const x8 = v[2];
77
+ const s8 = toAttribute(x8, "disabled");
78
+ if (s8 !== r.v8) writeAttribute(r.a5, "disabled", r.v8 = s8);
79
+ }
80
+ if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a2, r.e0, "", J, false, undefined, d);
81
+ if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b0 = m1(d); at.before(r.b0.n); } }
82
+ else if (r.b0 !== undefined) p1(r.b0, c, d);
83
+ };
84
+ const t0 = element.firstChild.nextSibling;
85
+ const t1 = t0.firstChild.nextSibling;
86
+ const t2 = t1.firstChild.nextSibling.nextSibling.nextSibling;
87
+ const t3 = t2.firstChild;
88
+ const t4 = t2.nextSibling.nextSibling;
89
+ const t5 = t0.nextSibling.nextSibling;
90
+ const t6 = t5.firstChild.nextSibling;
91
+ const t7 = t6.nextSibling.nextSibling;
92
+ const R = { a0: t0, a3: t4, a4: t6, a5: t7, v0: null, v1: null, v2: null, v3: null, v4: null, v5: null, v6: null, v7: null, v8: null, a2: t3, e0: t3.nextSibling, b0: undefined, f0: undefined };
93
+ const I = { B };
94
+ const J = project(I, children, slots);
95
+ I.R = new Set();
96
+ attachGeneratedController(element, S, v, (c, d) => { ((c, d) => p0(R, c, d))(c, d); for (const f of I.R) f(c, d); }, undefined, undefined, I);
97
+ manageProps(I);
98
+ I.r["plane"] = t1;
99
+ I.r["source"] = t4;
100
+ return element;
101
+ }
102
+ defineComponent("ui-light-editor", createUiLightEditor, ["disabled","label","size","x","y"]);
@@ -1,11 +1,11 @@
1
1
  // Generated by HTML Next 1.0.0-alpha.69 for Vanilla DOM. Do not edit.
2
- import { attachGeneratedController, buildTemplate, NONCONFORMING, textCall, toAttribute, writeAttribute, dispatchDeclared, detailCheck, formatOf, keywordFormat, acceptProps, manageProps, generatedInputs, checkBoolean, checkFormat, checkNumber, checkObject, checkString, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
2
+ import { attachGeneratedController, stateInitializers, buildTemplate, checkReference, NONCONFORMING, textCall, toAttribute, writeAttribute, dispatchDeclared, detailCheck, formatOf, keywordFormat, acceptProps, manageProps, generatedInputs, awaitInput, inputRead, READY_INPUT, UNRESOLVED_INPUT, checkBoolean, checkFormat, checkNumber, checkObject, checkString, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
3
3
  import * as controller from "../components/ui-number-input/ui-number-input.js";
4
4
  import "../styles/ui-number-input.css";
5
5
 
6
6
  const T0 = ["",[],"\n ",["ui-icon-button",["data-number-step","decrease","match-button","","type","button"],["ui-icon",["name","minus"]]],"\n ",["ui-input",["data-ui-field-control","","inputmode","decimal","spellcheck","false","aria-description","Enter calculates arithmetic. Arrow keys step; Shift changes ten steps."]],"\n ",["ui-icon-button",["data-number-step","increase","match-button","","type","button"],["ui-icon",["name","plus"]]],"\n "];
7
7
  let P0;
8
- const S = { n: [], t: [], f: import.meta.url, g: "ui-number-input", d: { "input": [detailCheck(checkObject([["value", checkString, false]], false)), true, true, false], "change": [detailCheck(checkObject([["value", checkString, false]], false)), true, true, false] }, x: dispatchDeclared, a: (host, I) => C(host, I), b: generatedInputs };
8
+ const S = { n: ["display"], t: ["s"], f: import.meta.url, g: "ui-number-input", d: { "input": [detailCheck(checkObject([["value", checkString, false]], false)), true, true, false], "change": [detailCheck(checkObject([["value", checkString, false]], false)), true, true, false] }, x: dispatchDeclared, a: (host, I) => C(host, I), b: generatedInputs };
9
9
  const D = { g: "ui-number-input", 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":1000000, c: checkNumber, t: "number", j: 0, m: "n" }, "min": { "required":false,"default":-1000000, 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: checkString, t: "string", j: 0, m: "s" } } };
10
10
  const C = (host) => activateModule(controller, host);
11
11
 
@@ -18,11 +18,15 @@ export function createUiNumberInput(options = {}, html) {
18
18
  }
19
19
  element.setAttribute("data-component", "ui-number-input");
20
20
  element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
21
- const v = [null, null, null, null, null, null, null, null, null];
21
+ const v = [null, null, null, null, null, null, null, null, null, null];
22
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)) });
23
27
  const p0 = (r, c, d) => {
24
- if (c & 1073741856) {
25
- const x0 = v[5];
28
+ if (c & 1073741888) {
29
+ const x0 = v[6];
26
30
  const s0 = toAttribute(x0, "size");
27
31
  if (s0 !== r.v0) writeAttribute(r.a0, "size", r.v0 = s0);
28
32
  const s3 = toAttribute(x0, "size");
@@ -30,8 +34,8 @@ export function createUiNumberInput(options = {}, html) {
30
34
  const s8 = toAttribute(x0, "size");
31
35
  if (s8 !== r.v8) writeAttribute(r.a2, "size", r.v8 = s8);
32
36
  }
33
- if (c & 1) {
34
- const x1 = v[0];
37
+ if (c & 2) {
38
+ const x1 = v[1];
35
39
  const s1 = toAttribute(x1, "disabled");
36
40
  if (s1 !== r.v1) writeAttribute(r.a0, "disabled", r.v1 = s1);
37
41
  const s4 = toAttribute(x1, "disabled");
@@ -39,30 +43,32 @@ export function createUiNumberInput(options = {}, html) {
39
43
  const s9 = toAttribute(x1, "disabled");
40
44
  if (s9 !== r.v9) writeAttribute(r.a2, "disabled", r.v9 = s9);
41
45
  }
42
- if (c & 2) {
43
- const x2 = textCall("concat", ["Decrease ", v[1]]);
46
+ if (c & 4) {
47
+ const x2 = textCall("concat", ["Decrease ", v[2]]);
44
48
  if (x2 !== NONCONFORMING) {
45
49
  const s2 = toAttribute(x2, "label");
46
50
  if (s2 !== r.v2) writeAttribute(r.a0, "label", r.v2 = s2);
47
51
  }
48
52
  }
49
- if (c & 256) {
50
- const x3 = v[8];
51
- const s5 = toAttribute(x3, "value");
52
- if (s5 !== r.v5) writeAttribute(r.a1, "value", r.v5 = s5);
53
+ if (c & 1) {
54
+ const x3 = (checkReference(S, v[0], "s", "expression:$display:display", "Reference `display` must satisfy string.") ? E.read(0) : NONCONFORMING);
55
+ if (x3 !== NONCONFORMING) {
56
+ const s5 = toAttribute(x3, "value");
57
+ if (s5 !== r.v5) writeAttribute(r.a1, "value", r.v5 = s5);
58
+ }
53
59
  }
54
- if (c & 2) {
55
- const x4 = v[1];
60
+ if (c & 4) {
61
+ const x4 = v[2];
56
62
  const s6 = toAttribute(x4, "aria-label");
57
63
  if (s6 !== r.v6) writeAttribute(r.a1, "aria-label", r.v6 = s6);
58
- const x5 = textCall("concat", ["Increase ", v[1]]);
64
+ const x5 = textCall("concat", ["Increase ", v[2]]);
59
65
  if (x5 !== NONCONFORMING) {
60
66
  const s10 = toAttribute(x5, "label");
61
67
  if (s10 !== r.v10) writeAttribute(r.a2, "label", r.v10 = s10);
62
68
  }
63
69
  }
64
- if (c & 16) {
65
- const x6 = v[4];
70
+ if (c & 32) {
71
+ const x6 = v[5];
66
72
  const s7 = toAttribute(x6, "name");
67
73
  if (s7 !== r.v7) writeAttribute(r.a1, "name", r.v7 = s7);
68
74
  }
@@ -71,8 +77,9 @@ export function createUiNumberInput(options = {}, html) {
71
77
  const t1 = t0.nextSibling.nextSibling;
72
78
  const t2 = t1.nextSibling.nextSibling;
73
79
  const R = { a0: t0, a1: t1, a2: t2, v0: null, v1: null, v2: null, v3: null, v4: null, v5: null, v6: null, v7: null, v8: null, v9: null, v10: null };
74
- const I = { B };
75
- attachGeneratedController(element, S, v, ((c, d) => p0(R, c, d)), undefined, undefined, I);
80
+ const I = { B, U: E };
81
+ I.R = new Set();
82
+ 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);
76
83
  manageProps(I);
77
84
  return element;
78
85
  }
package/vanilla/index.js CHANGED
@@ -47,6 +47,7 @@ export * from "./UiIconButton.js";
47
47
  export * from "./UiImage.js";
48
48
  export * from "./UiInput.js";
49
49
  export * from "./UiInputGroup.js";
50
+ export * from "./UiLightEditor.js";
50
51
  export * from "./UiList.js";
51
52
  export * from "./UiListbox.js";
52
53
  export * from "./UiListItem.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
- color: var(--ui-badge-text, var(--_badge-color-text, var(--_badge-surface)));
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.vue CHANGED
@@ -1051,7 +1051,7 @@ useComponentHost(() => import('../components/ui-button/ui-button.js'), {
1051
1051
  :global(:scope:where([data-hn-ui-button])) {
1052
1052
  /* Optional inherited action-group values keep text and icon actions under the same light.
1053
1053
  One fine top/start highlight follows the bottom/end lowlight at a joined action seam.
1054
- A single ambient lift avoids stacking a face gradient or another inset bevel. */
1054
+ The shared theme supplies reflections and glow independently of the resting lift. */
1055
1055
  --_ui-action-start: 1px;
1056
1056
  --_ui-action-edge: var(
1057
1057
  --ui-action-edge,
@@ -1067,6 +1067,8 @@ useComponentHost(() => import('../components/ui-button/ui-button.js'), {
1067
1067
  --_ui-action-shadow:
1068
1068
  var(--_ui-action-edge),
1069
1069
  0 1px 2px light-dark(rgb(0 0 0 / 0.10), rgb(0 0 0 / 0.20));
1070
+ --_tone-highlight: var(--ui-accent-highlight, none);
1071
+ --_tone-glow: var(--ui-accent-glow, 0 0 transparent);
1070
1072
  --_hue: var(--ui-accent);
1071
1073
  --_hue-hover: var(--ui-accent-hover);
1072
1074
  --_hue-active: var(--ui-accent-active);
@@ -1118,8 +1120,10 @@ useComponentHost(() => import('../components/ui-button/ui-button.js'), {
1118
1120
  line-height: var(--ui-line-height-tight);
1119
1121
  padding: var(--ui-control-inset-block-md, var(--ui-space-2))
1120
1122
  var(--ui-action-inset-md, var(--ui-space-3)) !important;
1121
- background-image: none;
1122
- box-shadow: var(--ui-button-shadow, var(--ui-action-shadow, var(--_ui-action-shadow)));
1123
+ background-image: var(--ui-surface-highlight, none);
1124
+ box-shadow:
1125
+ var(--ui-button-shadow, var(--ui-action-shadow, var(--_ui-action-shadow))),
1126
+ var(--_tone-glow);
1123
1127
  cursor: pointer;
1124
1128
  transition:
1125
1129
  scale var(--ui-motion-press, var(--ui-motion-fast)) var(--ui-motion-ease),
@@ -1239,7 +1243,10 @@ useComponentHost(() => import('../components/ui-button/ui-button.js'), {
1239
1243
  border-color: var(--_tone);
1240
1244
  background-color: var(--_tone);
1241
1245
  color: var(--_on-tone);
1242
- box-shadow: var(--ui-button-solid-shadow, var(--ui-action-shadow, var(--_ui-action-shadow)));
1246
+ background-image: var(--_tone-highlight);
1247
+ box-shadow:
1248
+ var(--ui-button-solid-shadow, var(--ui-action-shadow, var(--_ui-action-shadow))),
1249
+ var(--_tone-glow);
1243
1250
  }
1244
1251
 
1245
1252
  :global(:is(:scope[data-appearance="solid"], :scope[data-appearance="danger"]):hover:not(:disabled, [aria-disabled="true"]):where([data-hn-ui-button])) {
@@ -1254,6 +1261,8 @@ useComponentHost(() => import('../components/ui-button/ui-button.js'), {
1254
1261
  box-shadow: var(--ui-pressed);
1255
1262
  }
1256
1263
  :global(:scope[data-tone="neutral"]:where([data-hn-ui-button])) {
1264
+ --_tone-highlight: var(--ui-neutral-highlight, none);
1265
+ --_tone-glow: var(--ui-neutral-glow, 0 0 transparent);
1257
1266
  --_hue: var(--ui-text);
1258
1267
  --_hue-hover: var(--ui-text);
1259
1268
  --_hue-active: var(--ui-text);
@@ -1261,8 +1270,22 @@ useComponentHost(() => import('../components/ui-button/ui-button.js'), {
1261
1270
  --_on-hue: var(--ui-surface);
1262
1271
  }
1263
1272
 
1273
+ :global(:scope[data-tone="neutral"][data-appearance="solid"]:where([data-hn-ui-button])) {
1274
+ border-color: var(--ui-button-border, var(--ui-control-border));
1275
+ background-color: var(--ui-button-surface, var(--ui-neutral-surface));
1276
+ color: var(--ui-button-text, var(--ui-text));
1277
+ }
1278
+ :global(:scope[data-tone="neutral"][data-appearance="solid"]:hover:not(:disabled, [aria-disabled="true"]):where([data-hn-ui-button])) {
1279
+ background-color: var(--ui-button-hover-surface, var(--ui-neutral-hover));
1280
+ }
1281
+ :global(:scope[data-tone="neutral"][data-appearance="solid"]:active:not(:disabled, [aria-disabled="true"]):where([data-hn-ui-button])) {
1282
+ background-color: var(--ui-button-active-surface, var(--ui-neutral-active));
1283
+ }
1284
+
1264
1285
  :global(:scope[data-tone="danger"]:where([data-hn-ui-button])),
1265
1286
  :global(:scope[data-appearance="danger"]:where([data-hn-ui-button])) {
1287
+ --_tone-highlight: var(--ui-danger-highlight, none);
1288
+ --_tone-glow: var(--ui-danger-glow, 0 0 transparent);
1266
1289
  --_hue: var(--ui-danger);
1267
1290
  --_hue-hover: var(--ui-danger-hover);
1268
1291
  --_hue-active: var(--ui-danger-active, var(--ui-danger-hover));
@@ -1271,6 +1294,8 @@ useComponentHost(() => import('../components/ui-button/ui-button.js'), {
1271
1294
  }
1272
1295
 
1273
1296
  :global(:scope[data-tone="success"]:where([data-hn-ui-button])) {
1297
+ --_tone-highlight: var(--ui-success-highlight, none);
1298
+ --_tone-glow: var(--ui-success-glow, 0 0 transparent);
1274
1299
  --_hue: var(--ui-success);
1275
1300
  --_hue-hover: var(--ui-success-hover);
1276
1301
  --_hue-active: var(--ui-success-active);
@@ -1279,6 +1304,8 @@ useComponentHost(() => import('../components/ui-button/ui-button.js'), {
1279
1304
  }
1280
1305
 
1281
1306
  :global(:scope[data-tone="warning"]:where([data-hn-ui-button])) {
1307
+ --_tone-highlight: var(--ui-warning-highlight, none);
1308
+ --_tone-glow: var(--ui-warning-glow, 0 0 transparent);
1282
1309
  --_hue: var(--ui-warning);
1283
1310
  --_hue-hover: var(--ui-warning-hover);
1284
1311
  --_hue-active: var(--ui-warning-active);
@@ -1287,6 +1314,8 @@ useComponentHost(() => import('../components/ui-button/ui-button.js'), {
1287
1314
  }
1288
1315
 
1289
1316
  :global(:scope[data-tone="info"]:where([data-hn-ui-button])) {
1317
+ --_tone-highlight: var(--ui-info-highlight, none);
1318
+ --_tone-glow: var(--ui-info-glow, 0 0 transparent);
1290
1319
  --_hue: var(--ui-info);
1291
1320
  --_hue-hover: var(--ui-info-hover);
1292
1321
  --_hue-active: var(--ui-info-active);
package/vue/UiCard.d.ts CHANGED
@@ -23,8 +23,11 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
23
23
  tone: {
24
24
  type: PropType<"neutral" | "accent" | "info" | "success" | "warning" | "danger" | null>;
25
25
  };
26
+ treatment: {
27
+ type: PropType<"standard" | "expressive" | null>;
28
+ };
26
29
  variant: {
27
- type: PropType<"outlined" | "subtle" | "elevated" | "glass" | null>;
30
+ type: PropType<"outlined" | "subtle" | "elevated" | null>;
28
31
  };
29
32
  "\0htmlNextInputStatus": {
30
33
  type: PropType<InputBindings>;
@@ -42,8 +45,11 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
42
45
  tone: {
43
46
  type: PropType<"neutral" | "accent" | "info" | "success" | "warning" | "danger" | null>;
44
47
  };
48
+ treatment: {
49
+ type: PropType<"standard" | "expressive" | null>;
50
+ };
45
51
  variant: {
46
- type: PropType<"outlined" | "subtle" | "elevated" | "glass" | null>;
52
+ type: PropType<"outlined" | "subtle" | "elevated" | null>;
47
53
  };
48
54
  "\0htmlNextInputStatus": {
49
55
  type: PropType<InputBindings>;