@threadlabs/looma 0.44.6 → 0.45.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.
@@ -1,15 +1,17 @@
1
1
  // Generated by HTML Next 1.0.0-alpha.69 for Vanilla DOM. Do not edit.
2
- import { attachGeneratedController, buildTemplate, toAttribute, writeAttribute, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkBoolean, checkFormat, checkString, defineComponent } from "@nextwebwg/html-next/generated-runtime";
2
+ import { attachGeneratedController, buildTemplate, NONCONFORMING, readIndex, textCall, toAttribute, toText, writeAttribute, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkBoolean, checkFormat, checkString, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
3
+ import * as controller from "../components/ui-site-header/ui-site-header.js";
3
4
  import "../styles/ui-site-header.css";
4
5
 
5
- const T0 = ["",[],"\n ",["span",["class","menu"],4],"\n ",["div",["class","identity"],"\n ",["div",["class","brand"],4],"\n ",["nav",["class","navigation"],4],"\n "],"\n ",["div",["class","actions"],4],"\n "];
6
+ const T0 = ["",[],"\n ",["div",["class","identity"],"\n ",["div",["class","brand"],4],"\n ",["div",["class","menu"],"\n ",["div",["class","custom-menu"],4],"\n ",["div",["class","automatic-menu"],"\n ",["ui-icon-button",["size","sm","aria-haspopup","dialog","aria-expanded","false"],["ui-icon",["name","menu"]]],"\n "],"\n "],"\n ",["dialog",["class","navigation-panel"],"\n ",["div",["class","panel-heading"],"\n ",["span",["class","panel-title"],0],"\n ",["ui-icon-button",["size","sm"],["ui-icon",["name","x"]]],"\n "],"\n ",["nav",["class","navigation"],4],"\n "],"\n "],"\n ",["div",["class","actions"],4],"\n "];
6
7
  const T1 = ["",[]];
7
8
  const T2 = ["",[]];
8
9
  const T3 = ["",[]];
9
10
  const T4 = ["",[]];
10
11
  let P0, P1, P2, P3, P4;
11
- const S = { n: [], t: [], f: import.meta.url, g: "ui-site-header", b: generatedInputs };
12
- const D = { g: "ui-site-header", props: { "breakpoint": { "required":false,"values":["sm","md","lg"],"default":"lg", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "label": { "required":false,"default":"Main", c: checkString, t: "string", j: 0, m: "s" }, "sticky": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" } } };
12
+ const S = { n: ["enhanced","drawer"], t: ["b","b"], f: import.meta.url, g: "ui-site-header", a: (host, I) => C(host, I), b: generatedInputs, i: [false, false] };
13
+ const D = { g: "ui-site-header", props: { "breakpoint": { "required":false,"values":["sm","md","lg"],"default":"lg", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "closeLabel": { "required":false,"default":"Close navigation", c: checkString, t: "string", j: 0, m: "s" }, "label": { "required":false,"default":"Main", c: checkString, t: "string", j: 0, m: "s" }, "menuLabel": { "required":false,"default":"Open navigation", c: checkString, t: "string", j: 0, m: "s" }, "sticky": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" } } };
14
+ const C = (host) => activateModule(controller, host);
13
15
 
14
16
  export function createUiSiteHeader(options = {}, html) {
15
17
  const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
@@ -20,7 +22,7 @@ export function createUiSiteHeader(options = {}, html) {
20
22
  }
21
23
  element.setAttribute("data-component", "ui-site-header");
22
24
  element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
23
- const v = [null, null, null];
25
+ const v = [false, false, null, null, null, null, null];
24
26
  const B = acceptProps(element, D, S.n, v, componentProps, [], html);
25
27
  const m1 = (d) => {
26
28
  const n = (P1 ??= buildTemplate(T1)).cloneNode(true);
@@ -55,42 +57,85 @@ export function createUiSiteHeader(options = {}, html) {
55
57
  const p4 = (r, c, d) => {
56
58
  };
57
59
  const p0 = (r, c, d) => {
58
- if (c & 2) {
59
- const x0 = v[1];
60
- const s0 = toAttribute(x0, "aria-label");
61
- if (s0 !== r.v0) writeAttribute(r.a2, "aria-label", r.v0 = s0);
60
+ if (c & 32) {
61
+ const x0 = v[5];
62
+ const s0 = toAttribute(x0, "label");
63
+ if (s0 !== r.v0) writeAttribute(r.a2, "label", r.v0 = s0);
62
64
  }
63
- if (c & 5) {
64
- const x1 = hostState(["sticky","breakpoint"], [v[2], v[0]]);
65
- const s1 = x1;
66
- if (s1 !== r.v1) writeAttribute(r.n, "data-ui-site-header-state", (r.v1 = s1) === "" ? null : s1);
65
+ if (c === -1) {
66
+ const x1 = true;
67
+ const s1 = toAttribute(x1, "open");
68
+ if (s1 !== r.v1) writeAttribute(r.a3, "open", r.v1 = s1);
67
69
  }
68
- if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a0, r.e0, "menu", J, false, undefined, d);
70
+ if (c & 1073741826) {
71
+ const x2 = readIndex({ "true": "dialog", "false": "none" }, textCall("concat", [v[1]]));
72
+ if (x2 !== NONCONFORMING) {
73
+ const s2 = toAttribute(x2, "role");
74
+ if (s2 !== r.v2) writeAttribute(r.a3, "role", r.v2 = s2);
75
+ }
76
+ }
77
+ if (c & 1073741842) {
78
+ const x3 = readIndex({ "true": v[4], "false": null }, textCall("concat", [v[1]]));
79
+ if (x3 !== NONCONFORMING) {
80
+ const s3 = toAttribute(x3, "aria-label");
81
+ if (s3 !== r.v3) writeAttribute(r.a3, "aria-label", r.v3 = s3);
82
+ }
83
+ }
84
+ if (c & 16) {
85
+ const x4 = v[4];
86
+ const s4 = toText(x4);
87
+ if (s4 !== r.v4) r.a4.data = r.v4 = s4;
88
+ const s6 = toAttribute(x4, "aria-label");
89
+ if (s6 !== r.v6) writeAttribute(r.a6, "aria-label", r.v6 = s6);
90
+ }
91
+ if (c & 8) {
92
+ const x5 = v[3];
93
+ const s5 = toAttribute(x5, "label");
94
+ if (s5 !== r.v5) writeAttribute(r.a5, "label", r.v5 = s5);
95
+ }
96
+ if (c & 71) {
97
+ const x6 = hostState(["sticky","breakpoint","drawer","enhanced"], [v[6], v[2], v[1], v[0]]);
98
+ const s7 = x6;
99
+ if (s7 !== r.v7) writeAttribute(r.n, "data-ui-site-header-state", (r.v7 = s7) === "" ? null : s7);
100
+ }
101
+ if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a0, r.e0, "brand", J, false, undefined, d);
69
102
  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); } }
70
103
  else if (r.b0 !== undefined) p1(r.b0, c, d);
71
- if (r.f1 === undefined) { r.f1 = 1; const at = fillSlot(r.a1, r.e1, "brand", J, false, undefined, d);
104
+ if (r.f1 === undefined) { r.f1 = 1; const at = fillSlot(r.a1, r.e1, "menu", J, false, undefined, d);
72
105
  if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b1 = m2(d); at.before(r.b1.n); } }
73
106
  else if (r.b1 !== undefined) p2(r.b1, c, d);
74
- if (r.f2 === undefined) { r.f2 = 1; const at = fillSlot(r.a3, r.e2, "navigation", J, false, undefined, d);
107
+ if (r.f2 === undefined) { r.f2 = 1; const at = fillSlot(r.a7, r.e2, "navigation", J, false, undefined, d);
75
108
  if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b2 = m3(d); at.before(r.b2.n); } }
76
109
  else if (r.b2 !== undefined) p3(r.b2, c, d);
77
- if (r.f3 === undefined) { r.f3 = 1; const at = fillSlot(r.a4, r.e3, "actions", J, false, undefined, d);
110
+ if (r.f3 === undefined) { r.f3 = 1; const at = fillSlot(r.a8, r.e3, "actions", J, false, undefined, d);
78
111
  if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b3 = m4(d); at.before(r.b3.n); } }
79
112
  else if (r.b3 !== undefined) p4(r.b3, c, d);
80
113
  };
81
114
  const t0 = element.firstChild.nextSibling;
82
- const t1 = t0.firstChild;
83
- const t2 = t0.nextSibling.nextSibling;
84
- const t3 = t2.firstChild.nextSibling;
85
- const t4 = t3.firstChild;
86
- const t5 = t3.nextSibling.nextSibling;
87
- const t6 = t5.firstChild;
88
- const t7 = t2.nextSibling.nextSibling.firstChild;
89
- const R = { n: element, a2: t5, v0: null, v1: undefined, a0: t1, e0: t1.nextSibling, b0: undefined, f0: undefined, a1: t4, e1: t4.nextSibling, b1: undefined, f1: undefined, a3: t6, e2: t6.nextSibling, b2: undefined, f2: undefined, a4: t7, e3: t7.nextSibling, b3: undefined, f3: undefined };
115
+ const t1 = t0.firstChild.nextSibling;
116
+ const t2 = t1.firstChild;
117
+ const t3 = t1.nextSibling.nextSibling;
118
+ const t4 = t3.firstChild.nextSibling;
119
+ const t5 = t4.firstChild;
120
+ const t6 = t4.nextSibling.nextSibling.firstChild.nextSibling;
121
+ const t7 = t3.nextSibling.nextSibling;
122
+ const t8 = t7.firstChild.nextSibling;
123
+ const t9 = t8.firstChild.nextSibling;
124
+ const t10 = t9.firstChild;
125
+ const t11 = t9.nextSibling.nextSibling;
126
+ const t12 = t8.nextSibling.nextSibling;
127
+ const t13 = t12.firstChild;
128
+ const t14 = t0.nextSibling.nextSibling.firstChild;
129
+ const R = { n: element, a2: t6, a3: t7, a4: t10, a5: t11, a6: t12, v0: null, v1: null, v2: null, v3: null, v4: "", v5: null, v6: null, v7: undefined, a0: t2, e0: t2.nextSibling, b0: undefined, f0: undefined, a1: t5, e1: t5.nextSibling, b1: undefined, f1: undefined, a7: t13, e2: t13.nextSibling, b2: undefined, f2: undefined, a8: t14, e3: t14.nextSibling, b3: undefined, f3: undefined };
90
130
  const I = { B };
91
131
  const J = project(I, children, slots);
92
- attachGeneratedController(element, S, v, ((c, d) => p0(R, c, d)), undefined, undefined, I);
132
+ I.R = new Set();
133
+ 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);
93
134
  manageProps(I);
135
+ I.r["trigger"] = t6;
136
+ I.r["panel"] = t7;
137
+ I.r["close"] = t11;
138
+ I.r["navigation"] = t12;
94
139
  return element;
95
140
  }
96
- defineComponent("ui-site-header", createUiSiteHeader, ["breakpoint","label","sticky"]);
141
+ defineComponent("ui-site-header", createUiSiteHeader, ["breakpoint","closeLabel","label","menuLabel","sticky"]);
package/vue/UiButton.vue CHANGED
@@ -1205,16 +1205,21 @@ useComponentHost(() => import('../components/ui-button/ui-button.js'), {
1205
1205
  }
1206
1206
 
1207
1207
  :global(:scope[data-appearance="outline"]:not([data-tone="neutral"]):where([data-hn-ui-button])) {
1208
+ --_outline-highlight: var(--ui-surface-highlight, linear-gradient(transparent, transparent));
1208
1209
  --_outline-wash: oklch(from var(--_tone) l c h / calc(8% * var(--ui-tonal-opacity, 1)));
1209
1210
  border-color: var(--ui-button-border, var(--_tone-outline-border, var(--_tone-text)));
1210
1211
  background-color: var(--ui-button-surface, transparent);
1211
1212
  box-shadow: var(--ui-button-shadow, var(--ui-neutral-shadow));
1212
1213
  background-image:
1213
1214
  linear-gradient(var(--_outline-wash), var(--_outline-wash)),
1214
- var(--ui-surface-highlight, linear-gradient(transparent, transparent));
1215
+ var(--_outline-highlight);
1215
1216
  }
1216
1217
 
1217
1218
  :global(:scope[data-appearance="outline"]:not([data-tone="neutral"]):hover:not(:disabled, [aria-disabled="true"]):where([data-hn-ui-button])) {
1219
+ --_outline-highlight: var(
1220
+ --ui-neutral-highlight,
1221
+ var(--ui-surface-highlight, linear-gradient(transparent, transparent))
1222
+ );
1218
1223
  --_outline-wash: oklch(from var(--_tone) l c h / calc(12% * var(--ui-tonal-opacity, 1)));
1219
1224
  background-color: var(--ui-button-hover-surface, transparent);
1220
1225
  border-color: var(--ui-button-hover-border, var(--_tone-outline-border));
package/vue/UiIcon.vue CHANGED
@@ -313,6 +313,10 @@ const shapes: ReturnType<typeof inputComputed<any>> = inputComputed<any>(
313
313
  { tag: 'rect', x: '3', y: '4', width: '6', height: '6', rx: '1' },
314
314
  ],
315
315
  loader: [{ tag: 'path', d: 'M21 12a9 9 0 1 1-6.219-8.56' }],
316
+ menu: [{ tag: 'path', d: 'M4 5h16' }, { tag: 'path', d: 'M4 12h16' }, {
317
+ tag: 'path',
318
+ d: 'M4 19h16',
319
+ }],
316
320
  merge: [{ tag: 'path', d: 'm8 6 4-4 4 4' }, {
317
321
  tag: 'path',
318
322
  d: 'M12 2v10.3a4 4 0 0 1-1.172 2.872L4 22',
@@ -940,6 +940,7 @@ useComponentHost(() => import('../components/ui-icon-button/ui-icon-button.js'),
940
940
  }
941
941
 
942
942
  :global(:scope[data-appearance="outline"]:not([data-tone="neutral"]):where([data-hn-ui-icon-button])) {
943
+ --_outline-highlight: var(--ui-surface-highlight, linear-gradient(transparent, transparent));
943
944
  --_outline-wash: oklch(
944
945
  from var(--_icon-button-solid-surface, var(--ui-accent))
945
946
  l c h / calc(8% * var(--ui-tonal-opacity, 1))
@@ -948,10 +949,14 @@ useComponentHost(() => import('../components/ui-icon-button/ui-icon-button.js'),
948
949
  background-color: var(--ui-icon-button-outline-surface, transparent);
949
950
  background-image:
950
951
  linear-gradient(var(--_outline-wash), var(--_outline-wash)),
951
- var(--ui-surface-highlight, linear-gradient(transparent, transparent));
952
+ var(--_outline-highlight);
952
953
  }
953
954
 
954
955
  :global(:scope[data-appearance="outline"]:not([data-tone="neutral"]):hover:enabled:not([aria-disabled="true"]):where([data-hn-ui-icon-button])) {
956
+ --_outline-highlight: var(
957
+ --ui-neutral-highlight,
958
+ var(--ui-surface-highlight, linear-gradient(transparent, transparent))
959
+ );
955
960
  --_outline-wash: oklch(
956
961
  from var(--_icon-button-solid-surface, var(--ui-accent))
957
962
  l c h / calc(12% * var(--ui-tonal-opacity, 1))
@@ -1,22 +1,28 @@
1
1
  import type { PropType } from 'vue';
2
2
  import { type InputBindings } from './props.js';
3
- declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {}, __VLS_7: {};
3
+ declare var __VLS_1: {}, __VLS_3: {}, __VLS_31: {}, __VLS_33: {};
4
4
  type __VLS_Slots = {} & {
5
- menu?: (props: typeof __VLS_1) => any;
5
+ brand?: (props: typeof __VLS_1) => any;
6
6
  } & {
7
- brand?: (props: typeof __VLS_3) => any;
7
+ menu?: (props: typeof __VLS_3) => any;
8
8
  } & {
9
- navigation?: (props: typeof __VLS_5) => any;
9
+ navigation?: (props: typeof __VLS_31) => any;
10
10
  } & {
11
- actions?: (props: typeof __VLS_7) => any;
11
+ actions?: (props: typeof __VLS_33) => any;
12
12
  };
13
13
  declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
14
14
  breakpoint: {
15
15
  type: PropType<"sm" | "md" | "lg" | null>;
16
16
  };
17
+ closeLabel: {
18
+ type: PropType<string | null>;
19
+ };
17
20
  label: {
18
21
  type: PropType<string | null>;
19
22
  };
23
+ menuLabel: {
24
+ type: PropType<string | null>;
25
+ };
20
26
  sticky: {
21
27
  type: PropType<boolean | null>;
22
28
  };
@@ -27,9 +33,15 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
27
33
  breakpoint: {
28
34
  type: PropType<"sm" | "md" | "lg" | null>;
29
35
  };
36
+ closeLabel: {
37
+ type: PropType<string | null>;
38
+ };
30
39
  label: {
31
40
  type: PropType<string | null>;
32
41
  };
42
+ menuLabel: {
43
+ type: PropType<string | null>;
44
+ };
33
45
  sticky: {
34
46
  type: PropType<boolean | null>;
35
47
  };