@grafctory/clay-widgets 0.4.1 → 0.5.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/README.md CHANGED
@@ -1,8 +1,13 @@
1
1
  # @grafctory/clay-widgets
2
2
 
3
- [![npm](https://img.shields.io/npm/v/@grafctory/clay-widgets)](https://www.npmjs.com/package/@grafctory/clay-widgets)
3
+ [![npm][npm-badge]][npm] [![Grafctory][grafctory-badge]][grafctory]
4
4
 
5
- Preact interface components for [@grafctory/clay](https://github.com/grafctory/clay).
5
+ [npm-badge]: https://img.shields.io/npm/v/@grafctory/clay-widgets
6
+ [npm]: https://www.npmjs.com/package/@grafctory/clay-widgets
7
+ [grafctory-badge]: https://img.shields.io/badge/part%20of-Grafctory-blue
8
+ [grafctory]: https://github.com/grafctory
9
+
10
+ Preact interface components for [@grafctory/clay].
6
11
 
7
12
  The components an interface is assembled from: buttons, forms with their labels, fields and field groups, links and
8
13
  icons, the app logo, text runs, tags and captioned images, notices and placeholders, breadcrumb trails and incremental
@@ -12,7 +17,10 @@ and keyboard helpers, and marked with the same role-named glyphs, behaves and lo
12
17
  restating their keyboard handling or visual vocabulary, so a screen mixing both reads and responds as one interface.
13
18
 
14
19
  Styling is structural only: what a widget needs to work, with colour, type and spacing left to
15
- [@grafctory/skin](https://github.com/grafctory/skin) or to whoever styles the app.
20
+ [@grafctory/skin] or to whoever styles the app.
21
+
22
+ [@grafctory/clay]: https://github.com/grafctory/clay
23
+ [@grafctory/skin]: https://github.com/grafctory/skin
16
24
 
17
25
  # Installation
18
26
 
@@ -45,3 +53,5 @@ npm install lucide-preact # peer dependency
45
53
 
46
54
  This project is licensed under the Apache 2.0 License –
47
55
  see [LICENSE](https://github.com/grafctory/clay?tab=Apache-2.0-1-ov-file) file for details.
56
+
57
+ <sub>Grafctory™ is a trademark of Metreeca srl.</sub>
@@ -85,18 +85,40 @@ clay-image {
85
85
  * Floated, the image is the one place it takes spacing of its own: the text wrapping around it keeps off the
86
86
  * picture on the side it faces and off its bottom edge, so a column of wrapped lines, ragged against the picture,
87
87
  * still reads as standing clear of it however its lines happen to break against it.
88
+ *
89
+ * The image is sized against the column rather than against the room the clearance leaves beside it, so a clearance
90
+ * taking the whole column moves the text below the picture without shrinking the picture to nothing.
88
91
  */
89
92
 
93
+ &[float] {
94
+ width: max-content;
95
+ max-width: min(100% - var(--skin--spacing-200), var(--clay-image-max-width));
96
+ margin-bottom: var(--skin--spacing-200);
97
+ }
98
+
90
99
  &[float="start"] {
91
100
  float: inline-start;
92
- margin-inline-end: var(--skin--spacing-200);
93
- margin-bottom: var(--skin--spacing-200);
101
+ margin-inline-end: var(--clay-image-clearance, var(--skin--spacing-200));
94
102
  }
95
103
 
96
104
  &[float="end"] {
97
105
  float: inline-end;
98
- margin-inline-start: var(--skin--spacing-200);
99
- margin-bottom: var(--skin--spacing-200);
106
+ margin-inline-start: var(--clay-image-clearance, var(--skin--spacing-200));
107
+ }
108
+
109
+ /*
110
+ * A floated image of bounded width leaves the text at least 20rem beside its bound, about forty characters, below
111
+ * which wrapped lines break into a word or two each; the design system names no text measure to read instead. Where
112
+ * the column is narrower, the clearance on the text side snaps to the whole column, leaving no room beside the
113
+ * picture, so the text resumes below it as it would under an image floating to no side.
114
+ */
115
+
116
+ &[sized] {
117
+ --clay-image-clearance: clamp(
118
+ var(--skin--spacing-200),
119
+ (var(--clay-image-max-width) + 20rem - 100%) * 1000, /* a step rather than a ramp */
120
+ 100%
121
+ );
100
122
  }
101
123
 
102
124
  /*
@@ -40,6 +40,10 @@ float, within, src, alt, caption }: {
40
40
  *
41
41
  * The text that follows a floating image wraps around it and keeps clear of it by the design system spacing. An
42
42
  * image floating to no side stands in the column as a block of its own, with the text resuming below it.
43
+ *
44
+ * An image with a width bound set by `within` floats only where the column leaves the text at least `20rem` beside
45
+ * it. In a narrower column it stands as a block, with the text resuming below, so the text is never squeezed to a
46
+ * word or two per line. An image with no width bound floats in any column, however narrow.
43
47
  */
44
48
  float?: "start" | "end";
45
49
  /**
@@ -49,6 +53,7 @@ float, within, src, alt, caption }: {
49
53
  * or as a value CSS does not accept, takes no bound beyond the column, which limits the width but not the height.
50
54
  *
51
55
  * Percentages are relative to the column, and a percentage height has no effect because the column sets no height.
56
+ * A width bound also lets a floating image stand as a block in a narrow column, as described under `float`.
52
57
  */
53
58
  within?: string | readonly [width: string, height: string];
54
59
  /**
@@ -64,8 +69,9 @@ float, within, src, alt, caption }: {
64
69
  */
65
70
  caption?: ComponentChildren;
66
71
  }): import("preact").VNode<{
67
- look: "strong" | "subtle" | "normal" | undefined;
72
+ look: "subtle" | "normal" | "strong" | undefined;
68
73
  float: "start" | "end" | undefined;
74
+ sized: boolean;
69
75
  style: Readonly<Record<string, string>> | undefined;
70
76
  }>;
71
77
  //# sourceMappingURL=image.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../src/content/image.tsx"],"names":[],"mappings":"AAgBA;;;;;;;GAOG;AAEH,OAAO,EAAE,KAAK,iBAAiB,EAAiB,MAAM,QAAQ,CAAC;AAE/D,OAAO,aAAa,CAAC;AAGrB;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,KAAK,CAAC,EAErB,IAAI,EAAE,+FAA+F;AACrG,KAAK,EACL,MAAM,EAEN,GAAG,EACH,GAAQ,EAER,OAAO,EAEP,EAAE;IAEF;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAA;IAErC;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,CAAA;IAEvB;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;IAG1D;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IAEX;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IAGZ;;OAEG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAA;CAE3B;;;;GA6BA"}
1
+ {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../src/content/image.tsx"],"names":[],"mappings":"AAgBA;;;;;;;GAOG;AAEH,OAAO,EAAE,KAAK,iBAAiB,EAAiB,MAAM,QAAQ,CAAC;AAE/D,OAAO,aAAa,CAAC;AAGrB;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,KAAK,CAAC,EAErB,IAAI,EAAE,+FAA+F;AACrG,KAAK,EACL,MAAM,EAEN,GAAG,EACH,GAAQ,EAER,OAAO,EAEP,EAAE;IAEF;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAA;IAErC;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,CAAA;IAEvB;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;IAG1D;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IAEX;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IAGZ;;OAEG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAA;CAE3B;;;;;GAmCA"}
@@ -48,12 +48,16 @@ float, within, src, alt = "", caption }) {
48
48
  return createElement("clay-image", {
49
49
  look,
50
50
  float,
51
+ sized: within !== undefined && sides(within)[0] !== "none",
51
52
  style: within === undefined ? undefined : bounds(within)
52
53
  }, isContent(caption)
53
54
  ? _jsxs("figure", { children: [picture, _jsx("figcaption", { children: caption })] })
54
55
  : picture);
56
+ function sides(within) {
57
+ return typeof within === "string" ? [within, within] : within;
58
+ }
55
59
  function bounds(within) {
56
- const [width, height] = typeof within === "string" ? [within, within] : within;
60
+ const [width, height] = sides(within);
57
61
  return {
58
62
  "--clay-image-max-width": width,
59
63
  "--clay-image-max-height": height
@@ -1 +1 @@
1
- {"version":3,"file":"image.js","sourceRoot":"","sources":["../../src/content/image.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;GAOG;AAEH,OAAO,EAA0B,aAAa,EAAE,MAAM,QAAQ,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,aAAa,CAAC;AAGrB;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,KAAK,CAAC,EAErB,IAAI,EAAE,+FAA+F;AACrG,KAAK,EACL,MAAM,EAEN,GAAG,EACH,GAAG,GAAG,EAAE,EAER,OAAO,EAgDP;IAEA,MAAM,OAAO,GAAG,cAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC;IAE3C,OAAO,aAAa,CAAC,YAAY,EAAE;QAEjC,IAAI;QACJ,KAAK;QACL,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;KAExD,EAAE,SAAS,CAAC,OAAO,CAAC;QACpB,CAAC,CAAC,6BAAS,OAAO,EACjB,+BAAa,OAAO,GAAc,IAC1B;QACT,CAAC,CAAC,OAAO,CACV,CAAC;IAGF,SAAS,MAAM,CAAC,MAA0C;QAEzD,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QAE/E,OAAO;YACN,wBAAwB,EAAE,KAAK;YAC/B,yBAAyB,EAAE,MAAM;SACjC,CAAC;IAEH,CAAC;AAEF,CAAC"}
1
+ {"version":3,"file":"image.js","sourceRoot":"","sources":["../../src/content/image.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;GAOG;AAEH,OAAO,EAA0B,aAAa,EAAE,MAAM,QAAQ,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,aAAa,CAAC;AAGrB;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,KAAK,CAAC,EAErB,IAAI,EAAE,+FAA+F;AACrG,KAAK,EACL,MAAM,EAEN,GAAG,EACH,GAAG,GAAG,EAAE,EAER,OAAO,EAqDP;IAEA,MAAM,OAAO,GAAG,cAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC;IAE3C,OAAO,aAAa,CAAC,YAAY,EAAE;QAEjC,IAAI;QACJ,KAAK;QAEL,KAAK,EAAE,MAAM,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,MAAM;QAC1D,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;KAExD,EAAE,SAAS,CAAC,OAAO,CAAC;QACpB,CAAC,CAAC,6BAAS,OAAO,EACjB,+BAAa,OAAO,GAAc,IAC1B;QACT,CAAC,CAAC,OAAO,CACV,CAAC;IAGF,SAAS,KAAK,CAAC,MAA0C;QACxD,OAAO,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IAC/D,CAAC;IAED,SAAS,MAAM,CAAC,MAA0C;QAEzD,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;QAEtC,OAAO;YACN,wBAAwB,EAAE,KAAK;YAC/B,yBAAyB,EAAE,MAAM;SACjC,CAAC;IAEH,CAAC;AAEF,CAAC"}
@@ -17,7 +17,7 @@ import "./input.css";
17
17
  *
18
18
  * [input]: https://html.spec.whatwg.org/multipage/input.html#the-input-element
19
19
  */
20
- export declare function Input({ name, id, description, disabled, readonly, required, type, min, max, step, minLength, maxLength, pattern, error, grow, size, placeholder, value, onChange }: {
20
+ export declare function Input({ name, id, description, disabled, grow, readonly, required, type, autocomplete, min, max, step, minLength, maxLength, pattern, error, size, placeholder, value, onChange }: {
21
21
  /**
22
22
  * The accessible name, required where no {@link label!Label Label} names the field.
23
23
  */
@@ -36,6 +36,13 @@ export declare function Input({ name, id, description, disabled, readonly, requi
36
36
  * Whether the field takes no input, greyed and out of the tab order; editable if omitted.
37
37
  */
38
38
  disabled?: boolean;
39
+ /**
40
+ * Whether the field spans the column holding it, or the room left on its line in a {@link strip!Strip Strip};
41
+ * sized to `size` characters if omitted. A growing field of any type takes that whole room, so a long value such as
42
+ * an address stays in view. A field wrapped in a {@link label!Label Label} is bounded by the room the label takes
43
+ * instead, so spanning the column, or the room beside the label text, takes a label told to grow.
44
+ */
45
+ grow?: boolean;
39
46
  /**
40
47
  * Whether the field shows its value without taking edits, while staying in the tab order; editable if omitted.
41
48
  */
@@ -51,6 +58,15 @@ export declare function Input({ name, id, description, disabled, readonly, requi
51
58
  * `YYYY-MM-DDThh:mm`, a `month` as `YYYY-MM` and a `week` as `YYYY-Www`, with the week number in two digits.
52
59
  */
53
60
  type?: "text" | "email" | "url" | "tel" | "password" | "number" | "date" | "time" | "datetime-local" | "month" | "week";
61
+ /**
62
+ * The purpose of the value, as one of the [autofill names][autofill] the platform defines, such as `email` or
63
+ * `shipping street-address`; none if omitted. The browser offers the data it keeps for that purpose, and assistive
64
+ * technology states what the field asks for. WCAG SC 1.3.5 requires one on any field asking readers about
65
+ * themselves, so that a reader is spared typing what the browser already knows.
66
+ *
67
+ * [autofill]: https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill-field
68
+ */
69
+ autocomplete?: string;
54
70
  /**
55
71
  * The least value a `number` field or a date or time field accepts, written as its values are; none if omitted.
56
72
  */
@@ -83,13 +99,6 @@ export declare function Input({ name, id, description, disabled, readonly, requi
83
99
  * the field or the {@link form!Form Form} around it is valid, which the constraints alone decide.
84
100
  */
85
101
  error?: string;
86
- /**
87
- * Whether the field spans the column holding it, or the room left on its line in a {@link strip!Strip Strip};
88
- * sized to `size` characters if omitted. A growing field of any type takes that whole room, so a long value such as
89
- * an address stays in view. A field wrapped in a {@link label!Label Label} is bounded by the room the label takes
90
- * instead, so spanning the column, or the room beside the label text, takes a label told to grow.
91
- */
92
- grow?: boolean;
93
102
  /**
94
103
  * The width the field stands at, in characters, never wider than the column holding it; a `number` field or a
95
104
  * date or time field ignores it, as does a growing field. The platform width, about 20 characters, if omitted.
@@ -1 +1 @@
1
- {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/controls/input.tsx"],"names":[],"mappings":"AA2BA,OAAO,aAAa,CAAC;AAGrB;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,KAAK,CAAC,EAErB,IAAI,EACJ,EAAE,EACF,WAAW,EAEX,QAAQ,EACR,QAAQ,EACR,QAAQ,EAER,IAAa,EAEb,GAAG,EACH,GAAG,EACH,IAAI,EACJ,SAAS,EACT,SAAS,EACT,OAAO,EACP,KAAK,EAEL,IAAY,EACZ,IAAI,EAEJ,WAAW,EACX,KAAK,EAEL,QAAQ,EAER,EAAE;IAEF;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IAEX;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;;;OAKG;IAEH,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,UAAU,GAAG,QAAQ,GAC5D,MAAM,GAAG,MAAM,GAAG,gBAAgB,GAAG,OAAO,GAAG,MAAM,CAAA;IAExD;;OAEG;IACH,GAAG,CAAC,EAAE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,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;;;OAKG;IAEH,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,UAAU,GAAG,QAAQ,GAC5D,MAAM,GAAG,MAAM,GAAG,gBAAgB,GAAG,OAAO,GAAG,MAAM,CAAA;IAExD;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAElC;;;GA4DA"}
@@ -24,6 +24,7 @@ import { jsx as _jsx } from "preact/jsx-runtime";
24
24
  */
25
25
  import { createElement } from "preact";
26
26
  import { useLayoutEffect, useRef, useState } from "preact/hooks";
27
+ import { report } from "../index.core.js";
27
28
  import "./input.css";
28
29
  /**
29
30
  * Creates a single-line field.
@@ -43,7 +44,7 @@ import "./input.css";
43
44
  *
44
45
  * [input]: https://html.spec.whatwg.org/multipage/input.html#the-input-element
45
46
  */
46
- export function Input({ name, id, description, disabled, readonly, required, type = "text", min, max, step, minLength, maxLength, pattern, error, grow = false, size, placeholder, value, onChange }) {
47
+ export function Input({ name, id, description, disabled, grow = false, readonly, required, type = "text", autocomplete, min, max, step, minLength, maxLength, pattern, error, size, placeholder, value, onChange }) {
47
48
  /*
48
49
  * The element tells a stylesheet whether the field holds a value, which a date or time field offers no selector
49
50
  * for, having no placeholder. A value held by the caller settles it; otherwise the last edit of the reader does.
@@ -61,18 +62,10 @@ export function Input({ name, id, description, disabled, readonly, required, typ
61
62
  report(field.current, error);
62
63
  }
63
64
  });
64
- return createElement("clay-input", { empty, grow }, _jsx("input", { ref: field, id: id, disabled: disabled, readOnly: readonly, required: required, "aria-label": name, "aria-describedby": description, type: type, min: min, max: max, step: step, minLength: minLength, maxLength: maxLength, pattern: pattern, size: size, placeholder: placeholder, value: value, onInput: event => {
65
+ return createElement("clay-input", { empty, grow }, _jsx("input", { ref: field, id: id, disabled: disabled, readOnly: readonly, required: required, "aria-label": name, "aria-describedby": description, type: type, autocomplete: autocomplete, min: min, max: max, step: step, minLength: minLength, maxLength: maxLength, pattern: pattern, size: size, placeholder: placeholder, value: value, onInput: event => {
65
66
  report(event.currentTarget, error);
66
67
  setTyped(event.currentTarget.value);
67
68
  onChange?.(event.currentTarget.value);
68
69
  } }));
69
70
  }
70
- /**
71
- * Sets the custom message of a field to the error given while the field fails its own constraints, and clears it
72
- * otherwise, so the message names the rule a failing value breaks but never decides whether the field is valid.
73
- */
74
- function report(field, error) {
75
- field.setCustomValidity("");
76
- field.setCustomValidity(error === undefined || field.validity.valid ? "" : error);
77
- }
78
71
  //# sourceMappingURL=input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"input.js","sourceRoot":"","sources":["../../src/controls/input.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;GAOG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,eAAe,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.html#the-select-element
25
25
  */
26
- export declare function Select<V extends string>({ name, id, disabled, required, options, placeholder, value, onChange }: {
26
+ export declare function Select<V extends string>({ name, id, disabled, required, autocomplete, options, placeholder, value, onChange }: {
27
27
  /**
28
28
  * The accessible name, required where no {@link label!Label Label} names the menu.
29
29
  */
@@ -40,6 +40,15 @@ export declare function Select<V extends string>({ name, id, disabled, required,
40
40
  * Whether the menu fails its constraints while showing the `placeholder`; optional if omitted.
41
41
  */
42
42
  required?: boolean;
43
+ /**
44
+ * The purpose of the value, as one of the [autofill names][autofill] the platform defines, such as `country` or
45
+ * `honorific-prefix`; none if omitted. The browser picks the option it keeps for that purpose, and assistive
46
+ * technology states what the menu asks for. WCAG SC 1.3.5 requires one on any menu asking readers about
47
+ * themselves, so that a reader is spared picking what the browser already knows.
48
+ *
49
+ * [autofill]: https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill-field
50
+ */
51
+ autocomplete?: string;
43
52
  /**
44
53
  * The label of each option, keyed by its value, in display order.
45
54
  */
@@ -1 +1 @@
1
- {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/controls/select.tsx"],"names":[],"mappings":"AA0BA,OAAO,cAAc,CAAC;AAGtB;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,EAAE,EAExC,IAAI,EACJ,EAAE,EAEF,QAAQ,EACR,QAAQ,EAER,OAAO,EAEP,WAAW,EACX,KAAK,EAEL,QAAQ,EAER,EAAE;IAEF;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IAEX;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAA;IAEpC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,CAAC,CAAA;IAET;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAA;CAE7B,qKA8BA"}
1
+ {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/controls/select.tsx"],"names":[],"mappings":"AA0BA,OAAO,cAAc,CAAC;AAGtB;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,EAAE,EAExC,IAAI,EACJ,EAAE,EAEF,QAAQ,EACR,QAAQ,EAER,YAAY,EAEZ,OAAO,EAEP,WAAW,EACX,KAAK,EAEL,QAAQ,EAER,EAAE;IAEF;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IAEX;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB;;OAEG;IACH,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAA;IAEpC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,CAAC,CAAA;IAET;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAA;CAE7B,qKAgCA"}
@@ -48,12 +48,12 @@ import "./select.css";
48
48
  *
49
49
  * [select]: https://html.spec.whatwg.org/multipage/form-elements.html#the-select-element
50
50
  */
51
- export function Select({ name, id, disabled, required, options, placeholder, value, onChange }) {
51
+ export function Select({ name, id, disabled, required, autocomplete, options, placeholder, value, onChange }) {
52
52
  /*
53
53
  * The placeholder is the empty first option the platform reads as a placeholder label option, which a required
54
54
  * menu fails on; a menu holding no value of its own opens on it, the platform picking the first option otherwise.
55
55
  */
56
- return createElement("clay-select", {}, _jsxs("select", { id: id, disabled: disabled, required: required, "aria-label": name, value: value ?? (placeholder === undefined ? undefined : ""), onChange: event => onChange?.(event.currentTarget.value), children: [placeholder !== undefined && _jsx("option", { value: "", disabled: true, children: placeholder }), Object.keys(options).map(option => // ;(cast) options is assumed to carry no keys beyond V
56
+ return createElement("clay-select", {}, _jsxs("select", { id: id, disabled: disabled, required: required, "aria-label": name, autocomplete: autocomplete, value: value ?? (placeholder === undefined ? undefined : ""), onChange: event => onChange?.(event.currentTarget.value), children: [placeholder !== undefined && _jsx("option", { value: "", disabled: true, children: placeholder }), Object.keys(options).map(option => // ;(cast) options is assumed to carry no keys beyond V
57
57
  _jsx("option", { value: option, children: options[option] }, option))] }));
58
58
  }
59
59
  //# sourceMappingURL=select.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"select.js","sourceRoot":"","sources":["../../src/controls/select.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;GAOG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,cAAc,CAAC;AAGtB;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,MAAM,CAAmB,EAExC,IAAI,EACJ,EAAE,EAEF,QAAQ,EACR,QAAQ,EAER,OAAO,EAEP,WAAW,EACX,KAAK,EAEL,QAAQ,EA8CR;IAEA;;;OAGG;IAEH,OAAO,aAAa,CAAC,aAAa,EAAE,EAAE,EAAE,kBAEvC,EAAE,EAAE,EAAE,EAEN,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,gBAEN,IAAI,EAEhB,KAAK,EAAE,KAAK,IAAI,CAAC,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAA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,EAAC,QAAQ,kBAAE,WAAW,GAAU,EAE5E,MAAM,CAAC,IAAI,CAAC,OAAO,CAAS,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,uDAAuD;aACnG,iBAAqB,KAAK,EAAE,MAAM,YAAG,OAAO,CAAC,MAAM,CAAC,IAAvC,MAAM,CAA2C,CAC9D,IAEO,CAAC,CAAC;AAEZ,CAAC"}
@@ -21,7 +21,7 @@ import "./textarea.css";
21
21
  *
22
22
  * [textarea]: https://html.spec.whatwg.org/multipage/form-elements.html#the-textarea-element
23
23
  */
24
- export declare function Textarea({ name, id, description, disabled, readonly, required, minLength, maxLength, error, grow, rows, placeholder, value, onChange }: {
24
+ export declare function Textarea({ name, id, description, disabled, readonly, required, autocomplete, minLength, maxLength, error, grow, rows, placeholder, value, onChange }: {
25
25
  /**
26
26
  * The accessible name, required where no {@link label!Label Label} names the field.
27
27
  */
@@ -48,6 +48,15 @@ export declare function Textarea({ name, id, description, disabled, readonly, re
48
48
  * Whether the field fails its constraints while empty; optional if omitted.
49
49
  */
50
50
  required?: boolean;
51
+ /**
52
+ * The purpose of the value, as one of the [autofill names][autofill] the platform defines, such as
53
+ * `street-address`; none if omitted. The browser offers the data it keeps for that purpose, and assistive
54
+ * technology states what the field asks for. WCAG SC 1.3.5 requires one on any field asking readers about
55
+ * themselves, so that a reader is spared typing what the browser already knows.
56
+ *
57
+ * [autofill]: https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill-field
58
+ */
59
+ autocomplete?: string;
51
60
  /**
52
61
  * The least number of characters a non-empty value holds; no floor if omitted.
53
62
  */
@@ -1 +1 @@
1
- {"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../src/controls/textarea.tsx"],"names":[],"mappings":"AA2BA,OAAO,gBAAgB,CAAC;AAGxB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,QAAQ,CAAC,EAExB,IAAI,EACJ,EAAE,EACF,WAAW,EAEX,QAAQ,EACR,QAAQ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G;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IAEX;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;;;OAKG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAElC;;GA8CA"}
@@ -24,6 +24,7 @@ import { jsx as _jsx } from "preact/jsx-runtime";
24
24
  */
25
25
  import { createElement } from "preact";
26
26
  import { useLayoutEffect, useRef } from "preact/hooks";
27
+ import { report } from "../index.core.js";
27
28
  import "./textarea.css";
28
29
  /**
29
30
  * Creates a multi-line field.
@@ -47,7 +48,7 @@ import "./textarea.css";
47
48
  *
48
49
  * [textarea]: https://html.spec.whatwg.org/multipage/form-elements.html#the-textarea-element
49
50
  */
50
- export function Textarea({ name, id, description, disabled, readonly, required, minLength, maxLength, error, grow = false, rows, placeholder, value, onChange }) {
51
+ export function Textarea({ name, id, description, disabled, readonly, required, autocomplete, minLength, maxLength, error, grow = false, rows, placeholder, value, onChange }) {
51
52
  /*
52
53
  * The platform takes a custom message only through setCustomValidity, with no attribute standing for it, so the
53
54
  * message is set on the element after every render, catching a value or an error changed by the caller, and on
@@ -59,17 +60,9 @@ export function Textarea({ name, id, description, disabled, readonly, required,
59
60
  report(field.current, error);
60
61
  }
61
62
  });
62
- return createElement("clay-textarea", { grow }, _jsx("textarea", { ref: field, id: id, disabled: disabled, readOnly: readonly, required: required, "aria-label": name, "aria-describedby": description, minLength: minLength, maxLength: maxLength, style: rows === undefined ? undefined : `--clay-textarea-rows: ${rows}`, placeholder: placeholder, value: value, onInput: event => {
63
+ return createElement("clay-textarea", { grow }, _jsx("textarea", { ref: field, id: id, disabled: disabled, readOnly: readonly, required: required, "aria-label": name, "aria-describedby": description, autocomplete: autocomplete, minLength: minLength, maxLength: maxLength, style: rows === undefined ? undefined : `--clay-textarea-rows: ${rows}`, placeholder: placeholder, value: value, onInput: event => {
63
64
  report(event.currentTarget, error);
64
65
  onChange?.(event.currentTarget.value);
65
66
  } }));
66
67
  }
67
- /**
68
- * Sets the custom message of a field to the error given while the field fails its own constraints, and clears it
69
- * otherwise, so the message names the rule a failing value breaks but never decides whether the field is valid.
70
- */
71
- function report(field, error) {
72
- field.setCustomValidity("");
73
- field.setCustomValidity(error === undefined || field.validity.valid ? "" : error);
74
- }
75
68
  //# sourceMappingURL=textarea.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../src/controls/textarea.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;GAOG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,gBAAgB,CAAC;AAGxB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,QAAQ,CAAC,EAExB,IAAI,EACJ,EAAE,EACF,WAAW,EAEX,QAAQ,EACR,QAAQ,EACR,QAAQ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,EAAE,WAAW,EACxB,KAAK,EAAE,KAAK,EAEZ,OAAO,EAAE,KAAK,CAAC,EAAE;YAChB,MAAM,CAAC,KAAK,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;YACnC,QAAQ,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QACvC,CAAC,GAEA,CAAC,CAAC;AAEL,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Field validity.
3
+ *
4
+ * Lets a text field name the rule a failing value breaks, while the platform constraints alone decide its validity.
5
+ *
6
+ * @module index.core
7
+ */
8
+ /**
9
+ * Names the rule a failing field breaks.
10
+ *
11
+ * Shows the error as the message of the field while its value fails the constraints the field states, and clears the
12
+ * message once the value passes. The message never makes a field invalid: the platform constraints alone decide that.
13
+ *
14
+ * @param field The field whose message is set
15
+ * @param error The message naming the rule a failing value breaks, or `undefined` for the message of the platform
16
+ */
17
+ export declare function report(field: HTMLInputElement | HTMLTextAreaElement, error: undefined | string): void;
18
+ //# sourceMappingURL=index.core.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.core.d.ts","sourceRoot":"","sources":["../src/index.core.ts"],"names":[],"mappings":"AAgBA;;;;;;GAMG;AAGH;;;;;;;;GAQG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,gBAAgB,GAAG,mBAAmB,EAAE,KAAK,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI,CAGrG"}
@@ -0,0 +1,36 @@
1
+ /*
2
+ * Copyright © 2026 Metreeca srl
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ /**
17
+ * Field validity.
18
+ *
19
+ * Lets a text field name the rule a failing value breaks, while the platform constraints alone decide its validity.
20
+ *
21
+ * @module index.core
22
+ */
23
+ /**
24
+ * Names the rule a failing field breaks.
25
+ *
26
+ * Shows the error as the message of the field while its value fails the constraints the field states, and clears the
27
+ * message once the value passes. The message never makes a field invalid: the platform constraints alone decide that.
28
+ *
29
+ * @param field The field whose message is set
30
+ * @param error The message naming the rule a failing value breaks, or `undefined` for the message of the platform
31
+ */
32
+ export function report(field, error) {
33
+ field.setCustomValidity("");
34
+ field.setCustomValidity(error === undefined || field.validity.valid ? "" : error);
35
+ }
36
+ //# sourceMappingURL=index.core.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.core.js","sourceRoot":"","sources":["../src/index.core.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;GAMG;AAGH;;;;;;;;GAQG;AACH,MAAM,UAAU,MAAM,CAAC,KAA6C,EAAE,KAAyB;IAC9F,KAAK,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC;IAC5B,KAAK,CAAC,iBAAiB,CAAC,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AACnF,CAAC"}
@@ -16,7 +16,8 @@
16
16
 
17
17
  /*
18
18
  * A card lays its parts out as a two-column grid: the title over the description in a main column, the badge over the
19
- * image in a side column kept to the end of the card, as wide as what it holds up to the cap set below.
19
+ * image in a side column kept to the end of the card, as wide as what it holds up to the cap set below. A card given
20
+ * a number of lines fixes the width of the side column beside an image instead, so a run of cards ends alike.
20
21
  */
21
22
 
22
23
  /*
@@ -31,6 +32,17 @@
31
32
  initial-value: min(15rem, 33%);
32
33
  }
33
34
 
35
+ /*
36
+ * The proportions of the side column beside an image in a card given a number of lines, as a width-to-height ratio
37
+ * over the height of the lines. Landscape by default, as the pictures standing for an item usually are.
38
+ */
39
+
40
+ @property --clay-card-image-ratio {
41
+ syntax: "*";
42
+ inherits: true;
43
+ initial-value: 16 / 9;
44
+ }
45
+
34
46
  clay-card {
35
47
 
36
48
  display: grid;
@@ -161,6 +173,18 @@ clay-card {
161
173
  align-self: stretch;
162
174
  }
163
175
 
176
+ /*
177
+ * Beside an image, the side column takes a fixed width rather than the width of the picture. The description
178
+ * then keeps its width while the picture loads, and a run of cards ends every description at the same edge.
179
+ */
180
+
181
+ &:has(> i) {
182
+ grid-template-columns: 1fr min(
183
+ var(--clay-card-side-max-width),
184
+ var(--clay-card-lines) * 1lh * (var(--clay-card-image-ratio))
185
+ );
186
+ }
187
+
164
188
  }
165
189
 
166
190
  }
@@ -26,6 +26,11 @@ import "./card.css";
26
26
  * A card given a number of lines cuts its description short with an ellipsis past them, and holds its image to the
27
27
  * same height. A run of cards then keeps its entries alike in height, with text and image ending together.
28
28
  *
29
+ * A card given a number of lines and an image fixes the width of its side column, whatever the proportions of the
30
+ * picture. The description keeps its width while the picture loads, and a run of cards ends every description at the
31
+ * same edge. The column is sized for a landscape picture up to the cap, and the `--clay-card-image-ratio` knob retunes
32
+ * it to other proportions. A picture that does not match is scaled down to fit the column, and is never cropped.
33
+ *
29
34
  * @param options The widget configuration
30
35
  *
31
36
  * @returns The card, or `null` if every part is empty
@@ -38,7 +43,8 @@ export declare function Card({ look, lines, title, badge, image, children }: {
38
43
  look?: "subtle" | "normal" | "strong";
39
44
  /**
40
45
  * The most lines the description shows before it is cut short with an ellipsis. The image is held to the same
41
- * height. If omitted, the description shows in full and the image keeps its own height.
46
+ * height, in a side column of fixed width. If omitted, the description shows in full, and the image keeps its own
47
+ * height in a side column as wide as the picture, so the edge the description ends at varies from card to card.
42
48
  */
43
49
  lines?: number;
44
50
  /**
@@ -60,7 +66,7 @@ export declare function Card({ look, lines, title, badge, image, children }: {
60
66
  */
61
67
  children?: ComponentChildren;
62
68
  }): import("preact").VNode<{
63
- look: "strong" | "subtle" | "normal" | undefined;
69
+ look: "subtle" | "normal" | "strong" | undefined;
64
70
  lines: number | undefined;
65
71
  style: {
66
72
  "--clay-card-lines": number;
@@ -1 +1 @@
1
- {"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/layouts/card.tsx"],"names":[],"mappings":"AAgBA;;;;;;;GAOG;AAEH,OAAO,EAAE,KAAK,iBAAiB,EAAiB,MAAM,QAAQ,CAAC;AAE/D,OAAO,YAAY,CAAC;AAGpB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,IAAI,CAAC,EAEpB,IAAI,EACJ,KAAK,EAEL,KAAK,EACL,KAAK,EACL,KAAK,EAEL,QAAQ,EAER,EAAE;IAEF;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAA;IAErC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAGd;;OAEG;IACH,KAAK,CAAC,EAAE,iBAAiB,CAAA;IAEzB;;;OAGG;IACH,KAAK,CAAC,EAAE,iBAAiB,CAAA;IAEzB;;;OAGG;IACH,KAAK,CAAC,EAAE,iBAAiB,CAAA;IAGzB;;OAEG;IACH,QAAQ,CAAC,EAAE,iBAAiB,CAAA;CAE5B;;;;;;UAiBA"}
1
+ {"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/layouts/card.tsx"],"names":[],"mappings":"AAgBA;;;;;;;GAOG;AAEH,OAAO,EAAE,KAAK,iBAAiB,EAAiB,MAAM,QAAQ,CAAC;AAE/D,OAAO,YAAY,CAAC;AAGpB;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,IAAI,CAAC,EAEpB,IAAI,EACJ,KAAK,EAEL,KAAK,EACL,KAAK,EACL,KAAK,EAEL,QAAQ,EAER,EAAE;IAEF;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAA;IAErC;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAGd;;OAEG;IACH,KAAK,CAAC,EAAE,iBAAiB,CAAA;IAEzB;;;OAGG;IACH,KAAK,CAAC,EAAE,iBAAiB,CAAA;IAEzB;;;OAGG;IACH,KAAK,CAAC,EAAE,iBAAiB,CAAA;IAGzB;;OAEG;IACH,QAAQ,CAAC,EAAE,iBAAiB,CAAA;CAE5B;;;;;;UAiBA"}
@@ -43,6 +43,11 @@ import "./card.css";
43
43
  * A card given a number of lines cuts its description short with an ellipsis past them, and holds its image to the
44
44
  * same height. A run of cards then keeps its entries alike in height, with text and image ending together.
45
45
  *
46
+ * A card given a number of lines and an image fixes the width of its side column, whatever the proportions of the
47
+ * picture. The description keeps its width while the picture loads, and a run of cards ends every description at the
48
+ * same edge. The column is sized for a landscape picture up to the cap, and the `--clay-card-image-ratio` knob retunes
49
+ * it to other proportions. A picture that does not match is scaled down to fit the column, and is never cropped.
50
+ *
46
51
  * @param options The widget configuration
47
52
  *
48
53
  * @returns The card, or `null` if every part is empty
@@ -1 +1 @@
1
- {"version":3,"file":"card.js","sourceRoot":"","sources":["../../src/layouts/card.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;GAOG;AAEH,OAAO,EAA0B,aAAa,EAAE,MAAM,QAAQ,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,YAAY,CAAC;AAGpB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,IAAI,CAAC,EAEpB,IAAI,EACJ,KAAK,EAEL,KAAK,EACL,KAAK,EACL,KAAK,EAEL,QAAQ,EAwCR;IAEA,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,WAAW,EAAE;QACnF,IAAI;QACJ,KAAK;QACL,KAAK,EAAE,KAAK,KAAK,SAAS,C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AQ,EAEtD,SAAS,CAAC,QAAQ,CAAC,IAAI,wBAAM,QAAQ,GAAO,EAE5C,SAAS,CAAC,KAAK,CAAC,IAAI,sBAAI,KAAK,GAAK,IAEjC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAEb,CAAC"}
@@ -52,7 +52,7 @@ export declare function Stack({ look, grow, place, align, space, children }: {
52
52
  */
53
53
  children?: ComponentChildren;
54
54
  }): import("preact").VNode<{
55
- look: "strong" | "subtle" | "normal" | undefined;
55
+ look: "subtle" | "normal" | "strong" | undefined;
56
56
  place: "head" | "start" | "end" | "center" | "spread" | "tail";
57
57
  style: {
58
58
  flexGrow: number | undefined;
@@ -58,7 +58,7 @@ export declare function Strip({ look, grow, wrap, place, align, space, children
58
58
  */
59
59
  children?: ComponentChildren;
60
60
  }): import("preact").VNode<{
61
- look: "strong" | "subtle" | "normal" | undefined;
61
+ look: "subtle" | "normal" | "strong" | undefined;
62
62
  place: "head" | "start" | "end" | "center" | "spread" | "tail";
63
63
  style: {
64
64
  flexGrow: number | undefined;
@@ -84,6 +84,6 @@ href, query, title, onClick, children }: {
84
84
  */
85
85
  children?: ComponentChildren;
86
86
  }): VNode<{
87
- look: "strong" | "subtle" | "normal" | undefined;
87
+ look: "subtle" | "normal" | "strong" | undefined;
88
88
  }>;
89
89
  //# sourceMappingURL=link.d.ts.map
@@ -69,7 +69,10 @@
69
69
  inherits: true;
70
70
  }
71
71
 
72
- /* The block gutter of the head row, where two columns fit; narrower heads take the edge inset of the frame. */
72
+ /*
73
+ * The block gutter of the head row, where two columns fit. Where they do not, the heads take the edge inset of the
74
+ * frame instead, while the heading opening the main body keeps this gutter above and below it.
75
+ */
73
76
 
74
77
  @property --clay-tool-head-gutter {
75
78
  syntax: "*";
@@ -392,6 +395,23 @@ clay-tool {
392
395
 
393
396
  }
394
397
 
398
+ /*
399
+ * The meta of the side head and the menu of the main head stand at the end of their head, apart from what
400
+ * leads it. They never shrink, so they clip nothing and the other items of the head give way to them. The
401
+ * button ending them reaches into the gutter, as at the end of any bar. They take the height of a single
402
+ * line of the head, and what they hold is centred on it, overhanging into the gutter above and below. A
403
+ * button shown or removed in them thus leaves the height of the head row unchanged, padding included.
404
+ */
405
+
406
+ & > :is(.meta, .menu) {
407
+ display: flex;
408
+ flex: none;
409
+ align-items: center;
410
+ block-size: 1lh;
411
+ margin-inline-start: auto;
412
+ overflow: visible;
413
+ }
414
+
395
415
  }
396
416
 
397
417
  /*
@@ -399,13 +419,15 @@ clay-tool {
399
419
  * carried by the boxes scrolling inside it, each column setting it on what its body holds. A column with no foot
400
420
  * runs its body down to the end of the frame, leaving no empty bar beside the foot of the other column. Content
401
421
  * scrolled into view, as the target of a link is, stops on the inset rather than flush with the head, so the
402
- * first heading of the body lands where it stands before any scrolling.
422
+ * first heading of the body lands where it stands before any scrolling. The room for a classic scrollbar stays
423
+ * reserved, so the content of a body keeps its width and never reflows as the body starts scrolling.
403
424
  */
404
425
 
405
426
  & > div {
406
427
 
407
428
  grid-row: 2;
408
429
  overflow: auto;
430
+ scrollbar-gutter: stable;
409
431
  scroll-padding-block-start: var(--clay-tool-body-inset);
410
432
  scroll-timeline: var(--clay-tool-scroll) block;
411
433
 
@@ -453,22 +475,6 @@ clay-tool {
453
475
  padding-inline: var(--clay-tool-side-inset);
454
476
  }
455
477
 
456
- /*
457
- * The meta stands apart from what leads the head, the mark or the close button of the drawer, pushed to its
458
- * end. Never shrinking, it clips nothing, while the mark gives way to it where the head runs short. It takes
459
- * the height of a single line of the head, what it holds centred on it and overhanging into the gutter above
460
- * and below, so buttons and their padding leave the height of the head row unchanged.
461
- */
462
-
463
- & > header > .meta {
464
- display: flex;
465
- flex: none;
466
- align-items: center;
467
- block-size: 1lh;
468
- margin-inline-start: auto;
469
- overflow: visible;
470
- }
471
-
472
478
  /*
473
479
  * The tray stands in a box of its own, carrying the inset without touching the margins of what it holds. The
474
480
  * box fills the body and lays what it holds out as a column, so an item can grow, shrink or align with the flex
@@ -625,26 +631,10 @@ clay-tool {
625
631
 
626
632
  }
627
633
 
628
- /*
629
- * The menu stands apart from the head, pushed to its end whatever the head holds. Never shrinking, it clips
630
- * nothing, so the button ending it reaches into the gutter as at the end of any bar. While a turning glyph
631
- * stands over it, the menu keeps its box hidden beneath, so the head neither shrinks nor shifts. It takes
632
- * the height of a single line of the head, as the heading does, its buttons overhanging into the gutter.
633
- */
634
-
635
- & > .menu {
636
-
637
- display: flex;
638
- flex: none;
639
- align-items: center;
640
- block-size: 1lh;
641
- margin-inline-start: auto;
642
- overflow: visible;
643
-
644
- &:has(+ .busy) {
645
- visibility: hidden;
646
- }
634
+ /* A menu under the turning glyph keeps its box hidden beneath, so the head neither shrinks nor shifts. */
647
635
 
636
+ & > .menu:has(+ .busy) {
637
+ visibility: hidden;
648
638
  }
649
639
 
650
640
  /*
@@ -706,12 +696,14 @@ clay-tool {
706
696
  }
707
697
 
708
698
  /*
709
- * A head opening the body, where two columns do not fit, keeps the type it takes in the head and stands
710
- * above the block, which keeps the full height of the body: scrolling down takes the head out of view and
711
- * leaves the block filling the body, as it does where the head stands in the main head.
699
+ * A head opening the body, where two columns do not fit, keeps the type and the gutter it takes in the head.
700
+ * The body block has no gutter of its own, so the head gutter keeps the head apart from the content, as in
701
+ * the main head. The head stands above the block, which keeps the full height of the body: scrolling down
702
+ * takes the head out of view and leaves the block filling the body, as in the main head.
712
703
  */
713
704
 
714
705
  & > header {
706
+ padding-block: var(--clay-tool-head-inset);
715
707
  font-size: var(--clay-tool-head-font-size, var(--skin--font-size));
716
708
  }
717
709
 
@@ -6,9 +6,10 @@ import "./tool.css";
6
6
  * Lays a screen out as two columns, the side column beside the main one, each with a head, a body and a foot. The
7
7
  * heads of the two columns share one row, so they always match in height, and the feet do the same. A column with
8
8
  * nothing for its foot shows none, its body running down to the bottom of the frame. The body of each column scrolls
9
- * on its own, while its head and foot stay in view, so what they hold is always within reach. Content made sticky in a
10
- * body pins flush against the head or foot of its column, leaving no strip of scrolled content showing between them,
11
- * while the body keeps its gutter around everything else, so only what is meant to stand pinned meets the bars.
9
+ * on its own, while its head and foot stay in view, so what they hold is always within reach. The content of a body
10
+ * keeps its width whether the body scrolls or not, so it never reflows where the platform shows a classic scrollbar.
11
+ * Content made sticky in a body pins flush against the head or foot of its column, with no strip of scrolled content
12
+ * showing between them. Everything else keeps the gutter of the body, so only pinned content meets the bars.
12
13
  *
13
14
  * Heads and feet lay what they hold out as a single row of flex items, centred vertically and never wrapping, so each
14
15
  * bar keeps the height of a single line. An item keeps its own width unless it states flex properties of its own, as
@@ -29,13 +30,14 @@ import "./tool.css";
29
30
  *
30
31
  * The main column is named after `head` and takes the focus as the {@link @grafctory/clay!router.Router router} lands a
31
32
  * screen, without adding a tab stop, so a reader hears which screen they are on rather than a control of the last one.
32
- * The main body then opens at its top, or on the element a link targets, set below the head at the gutter of the
33
- * body, as it stands before any scrolling. The side body keeps its place, so a reader never loses their position in it.
34
- * A screen replacing its content without a landing, as a catalogue does on a change of filters, states it through the
35
- * `gist`, and the main body opens at its top again, so the reader never lands halfway down a list they have not read.
36
- * Under the Clay router, going back or forward through the browser history returns the main body to where the reader
37
- * left it. The router finds the body again by the fixed ids of the shell boxes, so a page shows a single shell at a
38
- * time, since a second shell on the same page would repeat those ids and leave the router unable to tell them apart.
33
+ * The column hands that focus on to the main body, so the keys scroll the content at once, while a control inside the
34
+ * column keeps the focus it takes. The main body then opens at its top, or on the element a link targets, set below
35
+ * the head at the gutter of the body, as it stands before any scrolling. The side body keeps its place, so a reader
36
+ * never loses their position in it. A screen replacing its content without a landing, as a catalogue does on a change
37
+ * of filters, states it through the `gist`, and the main body opens at its top again, so the reader never lands halfway
38
+ * down a list they have not read. Under the Clay router, going back or forward in the browser history returns the main
39
+ * body to where the reader left it. The router finds the body again by the fixed ids of the shell boxes, so a page
40
+ * shows one shell at a time, since a second one would repeat those ids and leave the router unable to tell them apart.
39
41
  *
40
42
  * On a viewport too narrow for two columns, the main column takes the whole frame and the side column becomes a drawer
41
43
  * opened from a menu button leading the main head. The drawer covers the main column, across the whole width of a
@@ -44,9 +46,10 @@ import "./tool.css";
44
46
  * outside the drawer, or a link followed inside it closes the drawer and returns focus to the menu button.
45
47
  *
46
48
  * On such a viewport the heading of the screen also moves from the main head to the top of the main body, and scrolls
47
- * away with the content it names, while the mark moves from the side head to stand next to the menu button. The main
48
- * head keeps only the menu button, the mark and the menu, leaving the room to content. Both heads stand close to the
49
- * top of the window, with the same narrow spacing above and below them, whatever head gutter the shell is tuned to.
49
+ * away with the content it names, keeping the head gutter above and below it so it stands apart from that content as
50
+ * it does in the main head. The mark moves from the side head to stand next to the menu button. The main head keeps
51
+ * only the menu button, the mark and the menu, leaving the room to content. Both heads stand close to the top of the
52
+ * window, with the same narrow spacing above and below them, whatever head gutter the shell is tuned to.
50
53
  *
51
54
  * While the side column is locked on such a viewport, the menu button is left out and the mark leads the main head.
52
55
  * The heading of the screen keeps its place in the main head, as on a wider viewport, so the actions it holds, such
@@ -1 +1 @@
1
- {"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../../src/shells/tool.tsx"],"names":[],"mappings":"AA6BA,OAAO,EAAE,KAAK,iBAAiB,EAA8D,MAAM,QAAQ,CAAC;AAG5G,OAAO,YAAY,CAAC;AAmCpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,wBAAgB,IAAI,CAAC,EAEpB,IAAY,EACZ,IAAY,EAEZ,MAAc,EACd,MAAc,EAEd,IAAI,EAEJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EAEJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EAEJ,QAAQ,EAER,EAAE;IAEF;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IAGd;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;;;;OAKG;IACH,MAAM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C,EAAE,OAAO,CAAA;IAGhB;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IAGd;;;;;OAKG;IACH,IAAI,CAAC,EAAE,iBAAiB,CAAA;IAExB;;;;OAIG;IACH,IAAI,CAAC,EAAE,iBAAiB,CAAA;IAExB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,iBAAiB,CAAA;IAExB;;OAEG;IACH,IAAI,CAAC,EAAE,iBAAiB,CAAA;IAGxB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,iBAAiB,CAAA;IAExB;;;;OAIG;IACH,IAAI,CAAC,EAAE,iBAAiB,CAAA;IAExB;;;;OAIG;IACH,IAAI,CAAC,EAAE,iBAAiB,CAAA;IAExB;;OAEG;IACH,IAAI,CAAC,EAAE,iBAAiB,CAAA;IAGxB;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,iBAAiB,CAAA;CAE5B;;;;;;GA6MA"}
@@ -35,6 +35,10 @@ import "./tool.css";
35
35
  * body again on a history traversal and returns it to the position the reader left it at.
36
36
  */
37
37
  const Id = "clay-tool";
38
+ /**
39
+ * The id of the main body, which takes the focus the main column passes on and scrolls back to its top on a new gist.
40
+ */
41
+ const Body = `${Id}-body`;
38
42
  /**
39
43
  * The delay a change of `busy` waits out before the frame shows it (ms).
40
44
  */
@@ -63,9 +67,10 @@ const Ignored = Object.fromEntries([
63
67
  * Lays a screen out as two columns, the side column beside the main one, each with a head, a body and a foot. The
64
68
  * heads of the two columns share one row, so they always match in height, and the feet do the same. A column with
65
69
  * nothing for its foot shows none, its body running down to the bottom of the frame. The body of each column scrolls
66
- * on its own, while its head and foot stay in view, so what they hold is always within reach. Content made sticky in a
67
- * body pins flush against the head or foot of its column, leaving no strip of scrolled content showing between them,
68
- * while the body keeps its gutter around everything else, so only what is meant to stand pinned meets the bars.
70
+ * on its own, while its head and foot stay in view, so what they hold is always within reach. The content of a body
71
+ * keeps its width whether the body scrolls or not, so it never reflows where the platform shows a classic scrollbar.
72
+ * Content made sticky in a body pins flush against the head or foot of its column, with no strip of scrolled content
73
+ * showing between them. Everything else keeps the gutter of the body, so only pinned content meets the bars.
69
74
  *
70
75
  * Heads and feet lay what they hold out as a single row of flex items, centred vertically and never wrapping, so each
71
76
  * bar keeps the height of a single line. An item keeps its own width unless it states flex properties of its own, as
@@ -86,13 +91,14 @@ const Ignored = Object.fromEntries([
86
91
  *
87
92
  * The main column is named after `head` and takes the focus as the {@link @grafctory/clay!router.Router router} lands a
88
93
  * screen, without adding a tab stop, so a reader hears which screen they are on rather than a control of the last one.
89
- * The main body then opens at its top, or on the element a link targets, set below the head at the gutter of the
90
- * body, as it stands before any scrolling. The side body keeps its place, so a reader never loses their position in it.
91
- * A screen replacing its content without a landing, as a catalogue does on a change of filters, states it through the
92
- * `gist`, and the main body opens at its top again, so the reader never lands halfway down a list they have not read.
93
- * Under the Clay router, going back or forward through the browser history returns the main body to where the reader
94
- * left it. The router finds the body again by the fixed ids of the shell boxes, so a page shows a single shell at a
95
- * time, since a second shell on the same page would repeat those ids and leave the router unable to tell them apart.
94
+ * The column hands that focus on to the main body, so the keys scroll the content at once, while a control inside the
95
+ * column keeps the focus it takes. The main body then opens at its top, or on the element a link targets, set below
96
+ * the head at the gutter of the body, as it stands before any scrolling. The side body keeps its place, so a reader
97
+ * never loses their position in it. A screen replacing its content without a landing, as a catalogue does on a change
98
+ * of filters, states it through the `gist`, and the main body opens at its top again, so the reader never lands halfway
99
+ * down a list they have not read. Under the Clay router, going back or forward in the browser history returns the main
100
+ * body to where the reader left it. The router finds the body again by the fixed ids of the shell boxes, so a page
101
+ * shows one shell at a time, since a second one would repeat those ids and leave the router unable to tell them apart.
96
102
  *
97
103
  * On a viewport too narrow for two columns, the main column takes the whole frame and the side column becomes a drawer
98
104
  * opened from a menu button leading the main head. The drawer covers the main column, across the whole width of a
@@ -101,9 +107,10 @@ const Ignored = Object.fromEntries([
101
107
  * outside the drawer, or a link followed inside it closes the drawer and returns focus to the menu button.
102
108
  *
103
109
  * On such a viewport the heading of the screen also moves from the main head to the top of the main body, and scrolls
104
- * away with the content it names, while the mark moves from the side head to stand next to the menu button. The main
105
- * head keeps only the menu button, the mark and the menu, leaving the room to content. Both heads stand close to the
106
- * top of the window, with the same narrow spacing above and below them, whatever head gutter the shell is tuned to.
110
+ * away with the content it names, keeping the head gutter above and below it so it stands apart from that content as
111
+ * it does in the main head. The mark moves from the side head to stand next to the menu button. The main head keeps
112
+ * only the menu button, the mark and the menu, leaving the room to content. Both heads stand close to the top of the
113
+ * window, with the same narrow spacing above and below them, whatever head gutter the shell is tuned to.
107
114
  *
108
115
  * While the side column is locked on such a viewport, the menu button is left out and the mark leads the main head.
109
116
  * The heading of the screen keeps its place in the main head, as on a wider viewport, so the actions it holds, such
@@ -117,7 +124,6 @@ export function Tool({ wide = false, busy = false, locked = false, tucked = fals
117
124
  const side = `${Id}-side`;
118
125
  // the landmark is named by the head on show, so the reference stands or falls with its target and never dangles
119
126
  const title = head ? `${Id}-title` : undefined;
120
- const body = `${Id}-body`;
121
127
  const { waiting, settle } = useModel(() => createState({
122
128
  waiting: false,
123
129
  settle(waiting) {
@@ -135,6 +141,9 @@ export function Tool({ wide = false, busy = false, locked = false, tucked = fals
135
141
  if (locked) {
136
142
  release(document.getElementById(side));
137
143
  }
144
+ else {
145
+ // an unlocked side column keeps the focus where the reader left it
146
+ }
138
147
  }, [locked]);
139
148
  const { changes, track } = useModel(() => createState({
140
149
  gist,
@@ -146,7 +155,10 @@ export function Tool({ wide = false, busy = false, locked = false, tucked = fals
146
155
  // a gist built anew on every render reaches the model each time, which counts only a change of content
147
156
  useEffect(() => {
148
157
  if (track(gist).changes > changes) {
149
- document.getElementById(body)?.scrollTo(0, 0);
158
+ document.getElementById(Body)?.scrollTo(0, 0);
159
+ }
160
+ else {
161
+ // the same content keeps the reader where they are
150
162
  }
151
163
  }, [gist]);
152
164
  const { open, toggle } = useModel(() => createState({
@@ -184,7 +196,7 @@ export function Tool({ wide = false, busy = false, locked = false, tucked = fals
184
196
  reveal(event);
185
197
  toggle(opened(event));
186
198
  }, children: [_jsxs("header", { children: [split ? mark :
187
- _jsx("button", { type: "button", popovertarget: side, popovertargetaction: "hide", "aria-label": "Close menu", children: _jsx(Icon.Close, {}) }), meta && _jsx("div", { class: "meta", children: meta })] }), _jsx("div", { tabIndex: 0, children: _jsx("div", { children: tray }) }), more && _jsx("footer", { children: more })] }), _jsxs("main", { id: `${Id}-main`, "aria-labelledby": title, tabIndex: -1, inert: open, children: [_jsxs("header", { children: [!tucked && !locked && _jsx("button", { type: "button", popovertarget: side, "aria-label": "Open menu", children: _jsx(Icon.Menu, {}) }), !tucked && !split && mark && _jsx("div", { class: "mark", inert: locked, children: mark }), headed && head && _jsx("div", { id: title, children: head }), menu && _jsx("div", { class: "menu", children: menu }), waiting && _jsx("span", { class: "busy", inert: true, children: _jsx(Icon.Busy, {}) })] }), _jsxs("div", { id: body, tabIndex: 0, children: [!headed && head && _jsx("header", { id: title, children: head }), _jsx("div", { children: children }), copy && _jsx("footer", { children: copy })] }), foot && _jsx("footer", { children: foot })] }), _jsx("span", { role: "status", "data-offscreen": true, children: waiting ? "Busy" : "" })] }));
199
+ _jsx("button", { type: "button", popovertarget: side, popovertargetaction: "hide", "aria-label": "Close menu", children: _jsx(Icon.Close, {}) }), meta && _jsx("div", { class: "meta", children: meta })] }), _jsx("div", { children: _jsx("div", { children: tray }) }), more && _jsx("footer", { children: more })] }), _jsxs("main", { id: `${Id}-main`, "aria-labelledby": title, tabIndex: -1, inert: open, onFocus: relay, children: [_jsxs("header", { children: [!tucked && !locked && _jsx("button", { type: "button", popovertarget: side, "aria-label": "Open menu", children: _jsx(Icon.Menu, {}) }), !tucked && !split && mark && _jsx("div", { class: "mark", inert: locked, children: mark }), headed && head && _jsx("div", { id: title, children: head }), menu && _jsx("div", { class: "menu", children: menu }), waiting && _jsx("span", { class: "busy", inert: true, children: _jsx(Icon.Busy, {}) })] }), _jsxs("div", { id: Body, tabIndex: -1, children: [!headed && head && _jsx("header", { id: title, children: head }), _jsx("div", { children: children }), copy && _jsx("footer", { children: copy })] }), foot && _jsx("footer", { children: foot })] }), _jsx("span", { role: "status", "data-offscreen": true, children: waiting ? "Busy" : "" })] }));
188
200
  }
189
201
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
190
202
  /**
@@ -216,6 +228,23 @@ function reveal(event) {
216
228
  if (opened(event)) {
217
229
  event.currentTarget.querySelector(":scope > header > button")?.focus();
218
230
  }
231
+ else {
232
+ // the platform returns the focus to the menu button as the drawer closes
233
+ }
234
+ }
235
+ /**
236
+ * Passes the focus the main column takes on to its body, so the keys scroll the content while a screen reader still
237
+ * announces the landmark entered. The body takes no tab stop: the focus reaches it from code alone, as on a navigation.
238
+ *
239
+ * @param event The focus the main column or an element inside it took
240
+ */
241
+ function relay(event) {
242
+ if (event.target === event.currentTarget) {
243
+ document.getElementById(Body)?.focus({ preventScroll: true });
244
+ }
245
+ else {
246
+ // a control inside the main column keeps the focus it took
247
+ }
219
248
  }
220
249
  /**
221
250
  * Takes the focus off the control holding it inside a column.
@@ -227,6 +256,9 @@ function release(column) {
227
256
  if (control instanceof HTMLElement && column?.contains(control)) {
228
257
  control.blur();
229
258
  }
259
+ else {
260
+ // the focus rests outside the column
261
+ }
230
262
  }
231
263
  /**
232
264
  * Cancels a gesture aimed inside a busy shell, stopping its default action and the handlers of the control it targets.
@@ -247,5 +279,8 @@ function follow(event) {
247
279
  if (event.target instanceof Element && event.target.closest("a[href]")) {
248
280
  event.currentTarget.togglePopover(false);
249
281
  }
282
+ else {
283
+ // a click elsewhere in the drawer leaves it open
284
+ }
250
285
  }
251
286
  //# sourceMappingURL=tool.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tool.js","sourceRoot":"","sources":["../../src/shells/tool.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;GAOG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OA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SAAM,CAAC;QACP,iDAAiD;IAClD,CAAC;AACF,CAAC"}
@@ -62,7 +62,7 @@ export declare function Toasts({ position, timeout, onAction }?: {
62
62
  onAction?: (post: Post) => void;
63
63
  }): import("preact").VNode<{
64
64
  role: string;
65
- edge: "top" | "bottom";
65
+ edge: "bottom" | "top";
66
66
  side: string;
67
67
  }>;
68
68
  //# sourceMappingURL=toasts.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafctory/clay-widgets",
3
- "version": "0.4.1",
3
+ "version": "0.5.0",
4
4
  "description": "Preact interface components for @grafctory/clay.",
5
5
  "keywords": [
6
6
  "typescript",
@@ -10,7 +10,7 @@
10
10
  "homepage": "https://grafctory.github.io/clay/",
11
11
  "bugs": {
12
12
  "url": "https://github.com/grafctory/clay/issues",
13
- "email": "info@metreeca.com"
13
+ "email": "info@grafctory.dev"
14
14
  },
15
15
  "license": "Apache-2.0",
16
16
  "author": {
@@ -317,7 +317,7 @@
317
317
  "@grafctory/skin": "^0.3.0"
318
318
  },
319
319
  "devDependencies": {
320
- "@grafctory/clay": "^0.4.1",
320
+ "@grafctory/clay": "^0.5.0",
321
321
  "happy-dom": "^21.0.4",
322
322
  "lucide-preact": "^1.47.0",
323
323
  "preact": "^10.29.8",
@@ -326,7 +326,7 @@
326
326
  "vitest": "^5.0.5"
327
327
  },
328
328
  "peerDependencies": {
329
- "@grafctory/clay": "^0.4.1",
329
+ "@grafctory/clay": "^0.5.0",
330
330
  "lucide-preact": "^1.47.0",
331
331
  "preact": "^10.27.2"
332
332
  }