@threadlabs/looma 0.25.5 → 0.25.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@threadlabs/looma",
3
- "version": "0.25.5",
3
+ "version": "0.25.6",
4
4
  "type": "module",
5
5
  "description": "Looma components as HTML, Vue, and plain DOM, with design tokens.",
6
6
  "license": "MIT",
@@ -63,6 +63,9 @@
63
63
  :scope[data-ui-cluster-state~="align=end"] {
64
64
  align-items: flex-end;
65
65
  }
66
+ :scope[data-ui-cluster-state~="align=baseline"] {
67
+ align-items: baseline;
68
+ }
66
69
  :scope[data-ui-cluster-state~="align=stretch"] {
67
70
  align-items: stretch;
68
71
  }
@@ -53,11 +53,11 @@
53
53
  background: var(--ui-surface-raised);
54
54
  }
55
55
 
56
- :scope:has(.title a[href]:hover) {
57
- background: var(--ui-surface-hover);
56
+ :scope:where(:has(.title a[href])):hover {
57
+ background: var(--ui-selection-surface);
58
58
  }
59
59
 
60
- :scope[data-ui-list-item-state~="variant=card"]:has(.title a[href]:hover) {
60
+ :scope[data-ui-list-item-state~="variant=card"]:where(:has(.title a[href])):hover {
61
61
  border-color: var(--ui-border-strong);
62
62
  }
63
63
 
@@ -91,6 +91,12 @@
91
91
  color: var(--ui-selection-text);
92
92
  }
93
93
 
94
+ /* An explicitly independent leading control sits above the stretched row link. */
95
+ :scope[data-ui-list-item-state~="leadingInteractive"] .leading {
96
+ position: relative;
97
+ z-index: 1;
98
+ }
99
+
94
100
  /* Trailing controls take their own clicks, above the title link's stretched hit area. */
95
101
  .trailing {
96
102
  position: relative;
@@ -170,6 +176,8 @@
170
176
  a router, a modified click, and "open in new tab" all work. Trailing controls sit above it and
171
177
  stay their own. */
172
178
 
179
+ /* An explicitly independent leading control sits above the stretched row link. */
180
+
173
181
  /* Trailing controls take their own clicks, above the title link's stretched hit area. */
174
182
 
175
183
  .title > :where([data-slotted], [data-slotted] *):is(a) {
@@ -11,6 +11,7 @@ export interface UiCheckboxProps {
11
11
  disabled?: boolean | null;
12
12
  indeterminate?: boolean | null;
13
13
  invalid?: boolean | null;
14
+ label?: string | null;
14
15
  name?: string | null;
15
16
  required?: boolean | null;
16
17
  size?: "sm" | "md" | "lg" | null;
@@ -3,7 +3,7 @@ import { manageComponentLifecycle } from "@nextwebwg/html-next/runtime";
3
3
  import * as controller from "../components/ui-checkbox/ui-checkbox.js";
4
4
  import "../styles/ui-checkbox.css";
5
5
 
6
- const definition = {...{"contract":{"tag":"ui-checkbox","props":{"checked":{"type":"boolean","required":false,"target":{"attribute":"checked"},"default":false},"disabled":{"type":"boolean","required":false,"target":{"attribute":"disabled"},"default":false},"indeterminate":{"type":"boolean","required":false,"target":{"property":"indeterminate"},"default":false},"invalid":{"type":"boolean","required":false,"target":{"attribute":"aria-invalid"},"default":false},"name":{"type":"string","required":false,"target":{"attribute":"name"},"default":""},"required":{"type":"boolean","required":false,"target":{"attribute":"required"},"default":false},"size":{"type":{"kind":"terminal","name":"keyword"},"values":["sm","md","lg"],"required":false,"target":{"attribute":"size"},"default":"md"},"value":{"type":"string","required":false,"target":{"attribute":"value"},"default":"on"}}},"template":{"kind":"element","name":"label","attributes":[],"children":[{"kind":"element","name":"input","attributes":[{"kind":"literal","name":"type","value":"checkbox"},{"kind":"property","key":"checked","name":"checked","expression":"internalChecked","expressionPlan":{"source":"internalChecked","ast":{"kind":"id","name":"internalChecked"},"dependencies":["internalChecked"]}},{"kind":"property","key":"indeterminate","name":"indeterminate","expression":"indeterminate","expressionPlan":{"source":"indeterminate","ast":{"kind":"id","name":"indeterminate"},"dependencies":["indeterminate"]}},{"kind":"attribute","name":"disabled","expression":"disabled","expressionPlan":{"source":"disabled","ast":{"kind":"id","name":"disabled"},"dependencies":["disabled"]}},{"kind":"attribute","name":"aria-invalid","expression":"invalid","expressionPlan":{"source":"invalid","ast":{"kind":"id","name":"invalid"},"dependencies":["invalid"]}},{"kind":"attribute","name":"required","expression":"required","expressionPlan":{"source":"required","ast":{"kind":"id","name":"required"},"dependencies":["required"]}},{"kind":"attribute","name":"name","expression":"name","expressionPlan":{"source":"name","ast":{"kind":"id","name":"name"},"dependencies":["name"]}},{"kind":"attribute","name":"value","expression":"value","expressionPlan":{"source":"value","ast":{"kind":"id","name":"value"},"dependencies":["value"]}}],"children":[],"ref":"input"},{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"text"}],"children":[{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"label"}],"children":[{"kind":"slot"}]},{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"description"},{"kind":"literal","name":"aria-hidden","value":"true"}],"children":[{"kind":"slot","fallback":[],"name":"description"}],"ref":"description"}]}]},"declarations":[{"kind":"state","name":"internalChecked","type":"boolean","value":"false","expression":{"source":"false","ast":{"kind":"literal","value":false},"dependencies":[]}},{"kind":"event","name":"change","type":"object","shape":{"kind":"object","fields":[{"name":"checked","type":{"kind":"terminal","name":"boolean"},"optional":false},{"name":"value","type":{"kind":"terminal","name":"string"},"optional":false},{"name":"trigger","type":{"kind":"constrained","base":{"kind":"terminal","name":"keyword"},"values":["keyboard","pointer","programmatic"]},"optional":false}],"open":false},"bubbles":true,"composed":true,"cancelable":false}],"root":{"kind":"native","element":"label","choices":["label"]}},source:{file:import.meta.url},css:""};
6
+ const definition = {...{"contract":{"tag":"ui-checkbox","props":{"checked":{"type":"boolean","required":false,"target":{"attribute":"checked"},"default":false},"disabled":{"type":"boolean","required":false,"target":{"attribute":"disabled"},"default":false},"indeterminate":{"type":"boolean","required":false,"target":{"property":"indeterminate"},"default":false},"invalid":{"type":"boolean","required":false,"target":{"attribute":"aria-invalid"},"default":false},"label":{"type":"string","required":false,"target":{"attribute":"aria-label"},"default":""},"name":{"type":"string","required":false,"target":{"attribute":"name"},"default":""},"required":{"type":"boolean","required":false,"target":{"attribute":"required"},"default":false},"size":{"type":{"kind":"terminal","name":"keyword"},"values":["sm","md","lg"],"required":false,"target":{"attribute":"size"},"default":"md"},"value":{"type":"string","required":false,"target":{"attribute":"value"},"default":"on"}}},"template":{"kind":"element","name":"label","attributes":[],"children":[{"kind":"element","name":"input","attributes":[{"kind":"literal","name":"type","value":"checkbox"},{"kind":"attribute","name":"aria-label","expression":"label","expressionPlan":{"source":"label","ast":{"kind":"id","name":"label"},"dependencies":["label"]}},{"kind":"property","key":"checked","name":"checked","expression":"internalChecked","expressionPlan":{"source":"internalChecked","ast":{"kind":"id","name":"internalChecked"},"dependencies":["internalChecked"]}},{"kind":"property","key":"indeterminate","name":"indeterminate","expression":"indeterminate","expressionPlan":{"source":"indeterminate","ast":{"kind":"id","name":"indeterminate"},"dependencies":["indeterminate"]}},{"kind":"attribute","name":"disabled","expression":"disabled","expressionPlan":{"source":"disabled","ast":{"kind":"id","name":"disabled"},"dependencies":["disabled"]}},{"kind":"attribute","name":"aria-invalid","expression":"invalid","expressionPlan":{"source":"invalid","ast":{"kind":"id","name":"invalid"},"dependencies":["invalid"]}},{"kind":"attribute","name":"required","expression":"required","expressionPlan":{"source":"required","ast":{"kind":"id","name":"required"},"dependencies":["required"]}},{"kind":"attribute","name":"name","expression":"name","expressionPlan":{"source":"name","ast":{"kind":"id","name":"name"},"dependencies":["name"]}},{"kind":"attribute","name":"value","expression":"value","expressionPlan":{"source":"value","ast":{"kind":"id","name":"value"},"dependencies":["value"]}}],"children":[],"ref":"input"},{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"text"}],"children":[{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"label"}],"children":[{"kind":"slot"}]},{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"description"},{"kind":"literal","name":"aria-hidden","value":"true"}],"children":[{"kind":"slot","fallback":[],"name":"description"}],"ref":"description"}]}]},"declarations":[{"kind":"state","name":"internalChecked","type":"boolean","value":"false","expression":{"source":"false","ast":{"kind":"literal","value":false},"dependencies":[]}},{"kind":"event","name":"change","type":"object","shape":{"kind":"object","fields":[{"name":"checked","type":{"kind":"terminal","name":"boolean"},"optional":false},{"name":"value","type":{"kind":"terminal","name":"string"},"optional":false},{"name":"trigger","type":{"kind":"constrained","base":{"kind":"terminal","name":"keyword"},"values":["keyboard","pointer","programmatic"]},"optional":false}],"open":false},"bubbles":true,"composed":true,"cancelable":false}],"root":{"kind":"native","element":"label","choices":["label"]}},source:{file:import.meta.url},css:""};
7
7
 
8
8
  export function createUiCheckbox(options = {}) {
9
9
  const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
@@ -16,23 +16,26 @@ export function createUiCheckbox(options = {}) {
16
16
  element.setAttribute("data-component", "ui-checkbox");
17
17
  const element0 = document.createElement("input");
18
18
  element0.setAttribute("type", "checkbox");
19
- const value0 = componentProps["indeterminate"] === undefined ? false : componentProps["indeterminate"];
20
- if (value0 !== undefined) element0["indeterminate"] = value0;
21
- const value1 = componentProps["disabled"] === undefined ? false : componentProps["disabled"];
22
- if (value1 === true) element0.setAttribute("disabled", "");
19
+ const value0 = componentProps["label"] === undefined ? "" : componentProps["label"];
20
+ if (value0 === null || value0 === undefined) element0.removeAttribute("aria-label");
21
+ else element0.setAttribute("aria-label", String(value0));
22
+ const value1 = componentProps["indeterminate"] === undefined ? false : componentProps["indeterminate"];
23
+ if (value1 !== undefined) element0["indeterminate"] = value1;
24
+ const value2 = componentProps["disabled"] === undefined ? false : componentProps["disabled"];
25
+ if (value2 === true) element0.setAttribute("disabled", "");
23
26
  else element0.removeAttribute("disabled");
24
- const value2 = componentProps["invalid"] === undefined ? false : componentProps["invalid"];
25
- if (typeof value2 === "boolean") element0.setAttribute("aria-invalid", String(value2));
27
+ const value3 = componentProps["invalid"] === undefined ? false : componentProps["invalid"];
28
+ if (typeof value3 === "boolean") element0.setAttribute("aria-invalid", String(value3));
26
29
  else element0.removeAttribute("aria-invalid");
27
- const value3 = componentProps["required"] === undefined ? false : componentProps["required"];
28
- if (value3 === true) element0.setAttribute("required", "");
30
+ const value4 = componentProps["required"] === undefined ? false : componentProps["required"];
31
+ if (value4 === true) element0.setAttribute("required", "");
29
32
  else element0.removeAttribute("required");
30
- const value4 = componentProps["name"] === undefined ? "" : componentProps["name"];
31
- if (value4 === null || value4 === undefined) element0.removeAttribute("name");
32
- else element0.setAttribute("name", String(value4));
33
- const value5 = componentProps["value"] === undefined ? "on" : componentProps["value"];
34
- if (value5 === null || value5 === undefined) element0.removeAttribute("value");
35
- else element0.setAttribute("value", String(value5));
33
+ const value5 = componentProps["name"] === undefined ? "" : componentProps["name"];
34
+ if (value5 === null || value5 === undefined) element0.removeAttribute("name");
35
+ else element0.setAttribute("name", String(value5));
36
+ const value6 = componentProps["value"] === undefined ? "on" : componentProps["value"];
37
+ if (value6 === null || value6 === undefined) element0.removeAttribute("value");
38
+ else element0.setAttribute("value", String(value6));
36
39
  element.append(element0);
37
40
  const element1 = document.createElement("span");
38
41
  element1.setAttribute("class", "text");
@@ -6,7 +6,7 @@ export interface UiClusterElement extends HTMLDivElement {
6
6
  removeEventListener<K extends keyof UiClusterEventMap>(type: K, listener: (this: UiClusterElement, event: UiClusterEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void;
7
7
  }
8
8
  export interface UiClusterProps {
9
- align?: "start" | "center" | "end" | "stretch" | null;
9
+ align?: "start" | "center" | "end" | "stretch" | "baseline" | null;
10
10
  fixed?: boolean | null;
11
11
  gap?: "xs" | "s" | "m" | "l" | "xl" | null;
12
12
  justify?: "start" | "center" | "end" | "between" | null;
@@ -28,7 +28,7 @@ export function createUiCluster(options = {}) {
28
28
  } else {
29
29
  }
30
30
  manageGeneratedProps(element, [
31
- { name: "align", attribute: "data-align", value: componentProps["align"], type: ["start","center","end","stretch"], required: false },
31
+ { name: "align", attribute: "data-align", value: componentProps["align"], type: ["start","center","end","stretch","baseline"], required: false },
32
32
  { name: "fixed", attribute: "data-fixed", value: componentProps["fixed"], default: false, type: "boolean", required: false },
33
33
  { name: "gap", attribute: "data-gap", value: componentProps["gap"], type: ["xs","s","m","l","xl"], required: false },
34
34
  { name: "justify", attribute: "data-justify", value: componentProps["justify"], type: ["start","center","end","between"], required: false },
@@ -8,6 +8,7 @@ export interface UiListItemElement extends HTMLLIElement {
8
8
  export interface UiListItemProps {
9
9
  current?: boolean | null;
10
10
  highlighted?: boolean | null;
11
+ leadingInteractive?: boolean | null;
11
12
  variant?: "row" | "card" | null;
12
13
  wrap?: boolean | null;
13
14
  attributes?: Readonly<Record<string, string | number | boolean | null | undefined>>;
@@ -7,8 +7,9 @@ export function createUiListItem(options = {}) {
7
7
  const projected = [];
8
8
  const prop0 = componentProps["current"] === undefined ? false : componentProps["current"];
9
9
  const prop1 = componentProps["highlighted"] === undefined ? false : componentProps["highlighted"];
10
- const prop2 = componentProps["variant"] === undefined ? "row" : componentProps["variant"];
11
- const prop3 = componentProps["wrap"] === undefined ? false : componentProps["wrap"];
10
+ const prop2 = componentProps["leadingInteractive"] === undefined ? false : componentProps["leadingInteractive"];
11
+ const prop3 = componentProps["variant"] === undefined ? "row" : componentProps["variant"];
12
+ const prop4 = componentProps["wrap"] === undefined ? false : componentProps["wrap"];
12
13
  const element = document.createElement("li");
13
14
  for (const [name, value] of Object.entries(attributes)) {
14
15
  if (value === null || value === undefined || value === false) continue;
@@ -72,6 +73,7 @@ export function createUiListItem(options = {}) {
72
73
  manageGeneratedProps(element, [
73
74
  { name: "current", attribute: "data-current", value: componentProps["current"], default: false, type: "boolean", required: false },
74
75
  { name: "highlighted", attribute: "data-highlighted", value: componentProps["highlighted"], default: false, type: "boolean", required: false },
76
+ { name: "leadingInteractive", attribute: "data-leading-interactive", value: componentProps["leadingInteractive"], default: false, type: "boolean", required: false },
75
77
  { name: "variant", attribute: "data-variant", value: componentProps["variant"], default: "row", type: ["row","card"], required: false },
76
78
  { name: "wrap", attribute: "data-wrap", value: componentProps["wrap"], default: false, type: "boolean", required: false },
77
79
  ], (name, value) => {
@@ -18,6 +18,10 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<import
18
18
  type: PropType<boolean | null>;
19
19
  default: boolean;
20
20
  };
21
+ label: {
22
+ type: PropType<string | null>;
23
+ default: string;
24
+ };
21
25
  name: {
22
26
  type: PropType<string | null>;
23
27
  default: string;
@@ -59,6 +63,10 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<import
59
63
  type: PropType<boolean | null>;
60
64
  default: boolean;
61
65
  };
66
+ label: {
67
+ type: PropType<string | null>;
68
+ default: string;
69
+ };
62
70
  name: {
63
71
  type: PropType<string | null>;
64
72
  default: string;
@@ -84,6 +92,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<import
84
92
  "onUpdate:checked"?: ((value: boolean) => any) | undefined;
85
93
  "onUpdate:value"?: ((value: string) => any) | undefined;
86
94
  }>, {
95
+ label: string | null;
87
96
  name: string | null;
88
97
  value: string | null;
89
98
  invalid: boolean | null;
@@ -53,6 +53,14 @@ const propValidityContract = {
53
53
  'Exposes an externally validated error and styles the checkbox with the field danger colour.',
54
54
  default: false,
55
55
  },
56
+ label: {
57
+ type: { kind: 'terminal', name: 'string' },
58
+ required: false,
59
+ target: { attribute: 'aria-label' },
60
+ description:
61
+ 'An accessible name for a checkbox without a visible label slot. It names the native input.',
62
+ default: '',
63
+ },
56
64
  name: {
57
65
  type: { kind: 'terminal', name: 'string' },
58
66
  required: false,
@@ -93,6 +101,7 @@ const props = defineProps({
93
101
  disabled: { type: null as unknown as PropType<boolean | null>, default: false },
94
102
  indeterminate: { type: null as unknown as PropType<boolean | null>, default: false },
95
103
  invalid: { type: null as unknown as PropType<boolean | null>, default: false },
104
+ label: { type: null as unknown as PropType<string | null>, default: '' },
96
105
  name: { type: null as unknown as PropType<string | null>, default: '' },
97
106
  required: { type: null as unknown as PropType<boolean | null>, default: false },
98
107
  size: { type: null as unknown as PropType<'sm' | 'md' | 'lg' | null>, default: 'md' },
@@ -103,6 +112,7 @@ const acceptedProps: Record<string, unknown> = {
103
112
  disabled: false,
104
113
  indeterminate: false,
105
114
  invalid: false,
115
+ label: '',
106
116
  name: '',
107
117
  required: false,
108
118
  size: 'md',
@@ -137,6 +147,13 @@ const checkedProps = computed(() => ({
137
147
  'invalid',
138
148
  acceptedProps,
139
149
  ) as boolean,
150
+ label: checkedProp<string>(
151
+ props['label'],
152
+ { kind: 'terminal', name: 'string' },
153
+ false,
154
+ 'label',
155
+ acceptedProps,
156
+ ) as string,
140
157
  name: checkedProp<string>(
141
158
  props['name'],
142
159
  { kind: 'terminal', name: 'string' },
@@ -302,6 +319,7 @@ useComponentHost(() => import('../components/ui-checkbox/ui-checkbox.js'), {
302
319
  'disabled',
303
320
  'indeterminate',
304
321
  'invalid',
322
+ 'label',
305
323
  'name',
306
324
  'required',
307
325
  'size',
@@ -323,6 +341,7 @@ useComponentHost(() => import('../components/ui-checkbox/ui-checkbox.js'), {
323
341
  :data-disabled="reflectedProp('disabled', 'disabled', checkedProps.disabled, undefined, false)"
324
342
  :data-indeterminate="reflectedProp('indeterminate', 'indeterminate', checkedProps.indeterminate, undefined, false)"
325
343
  :data-invalid="reflectedProp('invalid', 'invalid', checkedProps.invalid, undefined, false)"
344
+ :data-label="reflectedProp('label', 'label', checkedProps.label, undefined, false)"
326
345
  :data-name="reflectedProp('name', 'name', checkedProps.name, undefined, false)"
327
346
  :data-required="reflectedProp('required', 'required', checkedProps.required, undefined, false)"
328
347
  :data-size="reflectedProp('size', 'size', checkedProps.size, undefined, false)"
@@ -338,6 +357,7 @@ useComponentHost(() => import('../components/ui-checkbox/ui-checkbox.js'), {
338
357
  nativeProperty: true,
339
358
  defaultChecked: false,
340
359
  }"
360
+ :aria-label="checkedProps.label ?? undefined"
341
361
  :indeterminate.prop="checkedProps.indeterminate as any"
342
362
  :disabled="checkedProps.disabled ?? undefined"
343
363
  :aria-invalid="checkedProps.invalid ?? undefined"
@@ -5,7 +5,7 @@ type __VLS_Slots = {} & {
5
5
  };
6
6
  declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
7
7
  align: {
8
- type: PropType<"start" | "center" | "end" | "stretch" | null>;
8
+ type: PropType<"start" | "center" | "end" | "stretch" | "baseline" | null>;
9
9
  default: null;
10
10
  };
11
11
  fixed: {
@@ -34,7 +34,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
34
34
  };
35
35
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
36
36
  align: {
37
- type: PropType<"start" | "center" | "end" | "stretch" | null>;
37
+ type: PropType<"start" | "center" | "end" | "stretch" | "baseline" | null>;
38
38
  default: null;
39
39
  };
40
40
  fixed: {
@@ -62,7 +62,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
62
62
  default: null;
63
63
  };
64
64
  }>> & Readonly<{}>, {
65
- align: "center" | "start" | "stretch" | "end" | null;
65
+ align: "center" | "start" | "stretch" | "end" | "baseline" | null;
66
66
  padding: "s" | "none" | "m" | "l" | null;
67
67
  fixed: boolean | null;
68
68
  gap: "s" | "xs" | "m" | "l" | "xl" | null;
package/vue/UiCluster.vue CHANGED
@@ -13,8 +13,8 @@ const propValidityContract = {
13
13
  required: false,
14
14
  target: { attribute: 'align' },
15
15
  description:
16
- 'How items line up within each row: center (the default) aligns their middles, start their tops, end their bottoms, and stretch makes every item as tall as\n its row.',
17
- values: ['start', 'center', 'end', 'stretch'],
16
+ 'How items line up within each row: center (the default) aligns their middles, start their tops, end their bottoms, and stretch makes every item as tall as\n its row. baseline aligns the first text baselines, including multiline columns.',
17
+ values: ['start', 'center', 'end', 'stretch', 'baseline'],
18
18
  },
19
19
  fixed: {
20
20
  type: { kind: 'terminal', name: 'boolean' },
@@ -68,7 +68,7 @@ const propValidityContract = {
68
68
  } as const
69
69
  const props = defineProps({
70
70
  align: {
71
- type: null as unknown as PropType<'start' | 'center' | 'end' | 'stretch' | null>,
71
+ type: null as unknown as PropType<'start' | 'center' | 'end' | 'stretch' | 'baseline' | null>,
72
72
  default: null,
73
73
  },
74
74
  fixed: { type: null as unknown as PropType<boolean | null>, default: false },
@@ -94,7 +94,7 @@ const acceptedProps: Record<string, unknown> = {
94
94
  wrap: null,
95
95
  }
96
96
  const checkedProps = computed(() => ({
97
- align: checkedProp<'start' | 'center' | 'end' | 'stretch'>(
97
+ align: checkedProp<'start' | 'center' | 'end' | 'stretch' | 'baseline'>(
98
98
  props['align'],
99
99
  { kind: 'terminal', name: 'keyword' },
100
100
  false,
@@ -304,6 +304,9 @@ const hostState = computed(() =>
304
304
  [data-component~="ui-cluster"][data-ui-cluster-state~="align=end"] {
305
305
  align-items: flex-end;
306
306
  }
307
+ [data-component~="ui-cluster"][data-ui-cluster-state~="align=baseline"] {
308
+ align-items: baseline;
309
+ }
307
310
  [data-component~="ui-cluster"][data-ui-cluster-state~="align=stretch"] {
308
311
  align-items: stretch;
309
312
  }
@@ -18,6 +18,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
18
18
  type: PropType<boolean | null>;
19
19
  default: boolean;
20
20
  };
21
+ leadingInteractive: {
22
+ type: PropType<boolean | null>;
23
+ default: boolean;
24
+ };
21
25
  variant: {
22
26
  type: PropType<"row" | "card" | null>;
23
27
  default: string;
@@ -35,6 +39,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
35
39
  type: PropType<boolean | null>;
36
40
  default: boolean;
37
41
  };
42
+ leadingInteractive: {
43
+ type: PropType<boolean | null>;
44
+ default: boolean;
45
+ };
38
46
  variant: {
39
47
  type: PropType<"row" | "card" | null>;
40
48
  default: string;
@@ -48,6 +56,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
48
56
  current: boolean | null;
49
57
  wrap: boolean | null;
50
58
  highlighted: boolean | null;
59
+ leadingInteractive: boolean | null;
51
60
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
52
61
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
53
62
  declare const _default: typeof __VLS_export;
@@ -24,6 +24,14 @@ const propValidityContract = {
24
24
  'Gives an item a quiet accent wash without changing its text or announcing selection. Several items may be highlighted, such as new messages. Describe the\n reason in the item\'s text; use current only for the current destination.',
25
25
  default: false,
26
26
  },
27
+ leadingInteractive: {
28
+ type: { kind: 'terminal', name: 'boolean' },
29
+ required: false,
30
+ target: { attribute: 'leadinginteractive' },
31
+ description:
32
+ 'Makes the leading region an independent control above the row link. Use it for a checkbox or button; keep noninteractive row icons in the title link when\n combining them with a leading control.',
33
+ default: false,
34
+ },
27
35
  variant: {
28
36
  type: { kind: 'terminal', name: 'keyword' },
29
37
  required: false,
@@ -46,12 +54,14 @@ const propValidityContract = {
46
54
  const props = defineProps({
47
55
  current: { type: null as unknown as PropType<boolean | null>, default: false },
48
56
  highlighted: { type: null as unknown as PropType<boolean | null>, default: false },
57
+ leadingInteractive: { type: null as unknown as PropType<boolean | null>, default: false },
49
58
  variant: { type: null as unknown as PropType<'row' | 'card' | null>, default: 'row' },
50
59
  wrap: { type: null as unknown as PropType<boolean | null>, default: false },
51
60
  })
52
61
  const acceptedProps: Record<string, unknown> = {
53
62
  current: false,
54
63
  highlighted: false,
64
+ leadingInteractive: false,
55
65
  variant: 'row',
56
66
  wrap: false,
57
67
  }
@@ -70,6 +80,13 @@ const checkedProps = computed(() => ({
70
80
  'highlighted',
71
81
  acceptedProps,
72
82
  ) as boolean,
83
+ leadingInteractive: checkedProp<boolean>(
84
+ props['leadingInteractive'],
85
+ { kind: 'terminal', name: 'boolean' },
86
+ false,
87
+ 'leadingInteractive',
88
+ acceptedProps,
89
+ ) as boolean,
73
90
  variant: checkedProp<'row' | 'card'>(
74
91
  props['variant'],
75
92
  { kind: 'terminal', name: 'keyword' },
@@ -148,6 +165,7 @@ const hostState = computed(() =>
148
165
  && `variant=${encodeURIComponent(checkedProps.value.variant)}`,
149
166
  checkedProps.value.highlighted && 'highlighted',
150
167
  checkedProps.value.current && 'current',
168
+ checkedProps.value.leadingInteractive && 'leadingInteractive',
151
169
  checkedProps.value.wrap && 'wrap',
152
170
  ].filter(Boolean).join(' ')
153
171
  )
@@ -161,6 +179,13 @@ const hostState = computed(() =>
161
179
  v-prop-validity="{ contract: propValidityContract, values: { ...props } }"
162
180
  :data-current="reflectedProp('current', 'current', checkedProps.current, undefined, false)"
163
181
  :data-highlighted="reflectedProp('highlighted', 'highlighted', checkedProps.highlighted, undefined, false)"
182
+ :data-leading-interactive="reflectedProp(
183
+ 'leadingInteractive',
184
+ 'leading-interactive',
185
+ checkedProps.leadingInteractive,
186
+ undefined,
187
+ false,
188
+ )"
164
189
  :data-variant="reflectedProp('variant', 'variant', checkedProps.variant, undefined, false)"
165
190
  :data-wrap="reflectedProp('wrap', 'wrap', checkedProps.wrap, undefined, false)"
166
191
  :data-ui-list-item-state="hostState || undefined"
@@ -234,12 +259,12 @@ const hostState = computed(() =>
234
259
  background: var(--ui-surface-raised);
235
260
  }
236
261
 
237
- [data-component~="ui-list-item"]:has(.title a[href]:hover) {
238
- background: var(--ui-surface-hover);
262
+ [data-component~="ui-list-item"]:where(:has(.title a[href])):hover {
263
+ background: var(--ui-selection-surface);
239
264
  }
240
265
 
241
- [data-component~="ui-list-item"][data-ui-list-item-state~="variant=card"]:has(.title
242
- a[href]:hover) {
266
+ [data-component~="ui-list-item"][data-ui-list-item-state~="variant=card"]:where(:has(.title
267
+ a[href])):hover {
243
268
  border-color: var(--ui-border-strong);
244
269
  }
245
270
 
@@ -273,6 +298,12 @@ const hostState = computed(() =>
273
298
  color: var(--ui-selection-text);
274
299
  }
275
300
 
301
+ /* An explicitly independent leading control sits above the stretched row link. */
302
+ [data-component~="ui-list-item"][data-ui-list-item-state~="leadingInteractive"] .leading {
303
+ position: relative;
304
+ z-index: 1;
305
+ }
306
+
276
307
  /* Trailing controls take their own clicks, above the title link's stretched hit area. */
277
308
  .trailing {
278
309
  position: relative;
@@ -9,6 +9,7 @@ var _hoisted_1 = [
9
9
  "data-disabled",
10
10
  "data-indeterminate",
11
11
  "data-invalid",
12
+ "data-label",
12
13
  "data-name",
13
14
  "data-required",
14
15
  "data-size",
@@ -16,6 +17,7 @@ var _hoisted_1 = [
16
17
  "data-ui-checkbox-state"
17
18
  ];
18
19
  var _hoisted_2 = [
20
+ "aria-label",
19
21
  ".indeterminate",
20
22
  "disabled",
21
23
  "aria-invalid",
@@ -55,6 +57,10 @@ var UiCheckbox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
55
57
  type: null,
56
58
  default: false
57
59
  },
60
+ label: {
61
+ type: null,
62
+ default: ""
63
+ },
58
64
  name: {
59
65
  type: null,
60
66
  default: ""
@@ -119,6 +125,16 @@ var UiCheckbox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
119
125
  description: "Exposes an externally validated error and styles the checkbox with the field danger colour.",
120
126
  default: false
121
127
  },
128
+ label: {
129
+ type: {
130
+ kind: "terminal",
131
+ name: "string"
132
+ },
133
+ required: false,
134
+ target: { attribute: "aria-label" },
135
+ description: "An accessible name for a checkbox without a visible label slot. It names the native input.",
136
+ default: ""
137
+ },
122
138
  name: {
123
139
  type: {
124
140
  kind: "terminal",
@@ -171,6 +187,7 @@ var UiCheckbox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
171
187
  disabled: false,
172
188
  indeterminate: false,
173
189
  invalid: false,
190
+ label: "",
174
191
  name: "",
175
192
  required: false,
176
193
  size: "md",
@@ -193,6 +210,10 @@ var UiCheckbox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
193
210
  kind: "terminal",
194
211
  name: "boolean"
195
212
  }, false, "invalid", acceptedProps),
213
+ label: checkedProp(props["label"], {
214
+ kind: "terminal",
215
+ name: "string"
216
+ }, false, "label", acceptedProps),
196
217
  name: checkedProp(props["name"], {
197
218
  kind: "terminal",
198
219
  name: "string"
@@ -284,6 +305,7 @@ var UiCheckbox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
284
305
  "disabled",
285
306
  "indeterminate",
286
307
  "invalid",
308
+ "label",
287
309
  "name",
288
310
  "required",
289
311
  "size",
@@ -305,6 +327,7 @@ var UiCheckbox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
305
327
  "data-disabled": reflectedProp("disabled", "disabled", checkedProps.value.disabled, void 0, false),
306
328
  "data-indeterminate": reflectedProp("indeterminate", "indeterminate", checkedProps.value.indeterminate, void 0, false),
307
329
  "data-invalid": reflectedProp("invalid", "invalid", checkedProps.value.invalid, void 0, false),
330
+ "data-label": reflectedProp("label", "label", checkedProps.value.label, void 0, false),
308
331
  "data-name": reflectedProp("name", "name", checkedProps.value.name, void 0, false),
309
332
  "data-required": reflectedProp("required", "required", checkedProps.value.required, void 0, false),
310
333
  "data-size": reflectedProp("size", "size", checkedProps.value.size, void 0, false),
@@ -314,6 +337,7 @@ var UiCheckbox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
314
337
  ref: root
315
338
  }), [withDirectives(createElementVNode("input", {
316
339
  type: "checkbox",
340
+ "aria-label": checkedProps.value.label ?? void 0,
317
341
  ".indeterminate": checkedProps.value.indeterminate,
318
342
  disabled: checkedProps.value.disabled ?? void 0,
319
343
  "aria-invalid": checkedProps.value.invalid ?? void 0,
@@ -339,6 +363,6 @@ var UiCheckbox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
339
363
  }]]);
340
364
  };
341
365
  }
342
- }), [["__scopeId", "data-v-ce204e6e"]]);
366
+ }), [["__scopeId", "data-v-3bebca63"]]);
343
367
  //#endregion
344
368
  export { UiCheckbox_default as t };
@@ -56,12 +56,13 @@ var UiCluster_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
56
56
  },
57
57
  required: false,
58
58
  target: { attribute: "align" },
59
- description: "How items line up within each row: center (the default) aligns their middles, start their tops, end their bottoms, and stretch makes every item as tall as\n its row.",
59
+ description: "How items line up within each row: center (the default) aligns their middles, start their tops, end their bottoms, and stretch makes every item as tall as\n its row. baseline aligns the first text baselines, including multiline columns.",
60
60
  values: [
61
61
  "start",
62
62
  "center",
63
63
  "end",
64
- "stretch"
64
+ "stretch",
65
+ "baseline"
65
66
  ]
66
67
  },
67
68
  fixed: {
@@ -245,6 +246,6 @@ var UiCluster_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
245
246
  }]]);
246
247
  };
247
248
  }
248
- }), [["__scopeId", "data-v-e3a64464"]]);
249
+ }), [["__scopeId", "data-v-acd23e4a"]]);
249
250
  //#endregion
250
251
  export { UiCluster_default as t };