@grafctory/clay-widgets 0.0.0-stage → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +46 -2
  3. package/dist/content/empty.css +107 -0
  4. package/dist/content/empty.d.ts +40 -0
  5. package/dist/content/empty.d.ts.map +1 -0
  6. package/dist/content/empty.js +42 -0
  7. package/dist/content/empty.js.map +1 -0
  8. package/dist/content/heading.css +34 -0
  9. package/dist/content/heading.d.ts +45 -0
  10. package/dist/content/heading.d.ts.map +1 -0
  11. package/dist/content/heading.js +49 -0
  12. package/dist/content/heading.js.map +1 -0
  13. package/dist/content/image.css +176 -0
  14. package/dist/content/image.d.ts +71 -0
  15. package/dist/content/image.d.ts.map +1 -0
  16. package/dist/content/image.js +63 -0
  17. package/dist/content/image.js.map +1 -0
  18. package/dist/content/infobox.css +186 -0
  19. package/dist/content/infobox.d.ts +72 -0
  20. package/dist/content/infobox.d.ts.map +1 -0
  21. package/dist/content/infobox.js +63 -0
  22. package/dist/content/infobox.js.map +1 -0
  23. package/dist/content/pill.css +76 -0
  24. package/dist/content/pill.d.ts +57 -0
  25. package/dist/content/pill.d.ts.map +1 -0
  26. package/dist/content/pill.js +48 -0
  27. package/dist/content/pill.js.map +1 -0
  28. package/dist/content/text.css +44 -0
  29. package/dist/content/text.d.ts +30 -0
  30. package/dist/content/text.d.ts.map +1 -0
  31. package/dist/content/text.js +42 -0
  32. package/dist/content/text.js.map +1 -0
  33. package/dist/controls/button.css +469 -0
  34. package/dist/controls/button.d.ts +116 -0
  35. package/dist/controls/button.d.ts.map +1 -0
  36. package/dist/controls/button.js +61 -0
  37. package/dist/controls/button.js.map +1 -0
  38. package/dist/controls/checkbox.css +23 -0
  39. package/dist/controls/checkbox.d.ts +54 -0
  40. package/dist/controls/checkbox.d.ts.map +1 -0
  41. package/dist/controls/checkbox.js +49 -0
  42. package/dist/controls/checkbox.js.map +1 -0
  43. package/dist/controls/choice.css +288 -0
  44. package/dist/controls/choice.d.ts +63 -0
  45. package/dist/controls/choice.d.ts.map +1 -0
  46. package/dist/controls/choice.js +52 -0
  47. package/dist/controls/choice.js.map +1 -0
  48. package/dist/controls/fieldset.css +37 -0
  49. package/dist/controls/fieldset.d.ts +49 -0
  50. package/dist/controls/fieldset.d.ts.map +1 -0
  51. package/dist/controls/fieldset.js +51 -0
  52. package/dist/controls/fieldset.js.map +1 -0
  53. package/dist/controls/form.css +50 -0
  54. package/dist/controls/form.d.ts +64 -0
  55. package/dist/controls/form.d.ts.map +1 -0
  56. package/dist/controls/form.js +62 -0
  57. package/dist/controls/form.js.map +1 -0
  58. package/dist/controls/input.css +57 -0
  59. package/dist/controls/input.d.ts +120 -0
  60. package/dist/controls/input.d.ts.map +1 -0
  61. package/dist/controls/input.js +78 -0
  62. package/dist/controls/input.js.map +1 -0
  63. package/dist/controls/label.css +73 -0
  64. package/dist/controls/label.d.ts +76 -0
  65. package/dist/controls/label.d.ts.map +1 -0
  66. package/dist/controls/label.js +73 -0
  67. package/dist/controls/label.js.map +1 -0
  68. package/dist/controls/radio.css +23 -0
  69. package/dist/controls/radio.d.ts +60 -0
  70. package/dist/controls/radio.d.ts.map +1 -0
  71. package/dist/controls/radio.js +50 -0
  72. package/dist/controls/radio.js.map +1 -0
  73. package/dist/controls/select.css +37 -0
  74. package/dist/controls/select.d.ts +62 -0
  75. package/dist/controls/select.d.ts.map +1 -0
  76. package/dist/controls/select.js +59 -0
  77. package/dist/controls/select.js.map +1 -0
  78. package/dist/controls/switch.css +154 -0
  79. package/dist/controls/switch.d.ts +44 -0
  80. package/dist/controls/switch.d.ts.map +1 -0
  81. package/dist/controls/switch.js +48 -0
  82. package/dist/controls/switch.js.map +1 -0
  83. package/dist/controls/textarea.css +50 -0
  84. package/dist/controls/textarea.d.ts +97 -0
  85. package/dist/controls/textarea.d.ts.map +1 -0
  86. package/dist/controls/textarea.js +75 -0
  87. package/dist/controls/textarea.js.map +1 -0
  88. package/dist/glyphs/icon.core.d.ts +52 -0
  89. package/dist/glyphs/icon.core.d.ts.map +1 -0
  90. package/dist/glyphs/icon.core.js +67 -0
  91. package/dist/glyphs/icon.core.js.map +1 -0
  92. package/dist/glyphs/icon.css +32 -0
  93. package/dist/glyphs/icon.d.ts +152 -0
  94. package/dist/glyphs/icon.d.ts.map +1 -0
  95. package/dist/glyphs/icon.js +167 -0
  96. package/dist/glyphs/icon.js.map +1 -0
  97. package/dist/glyphs/icon.md +76 -0
  98. package/dist/glyphs/logo.css +73 -0
  99. package/dist/glyphs/logo.d.ts +27 -0
  100. package/dist/glyphs/logo.d.ts.map +1 -0
  101. package/dist/glyphs/logo.js +49 -0
  102. package/dist/glyphs/logo.js.map +1 -0
  103. package/dist/index.d.ts +65 -0
  104. package/dist/index.d.ts.map +1 -0
  105. package/dist/index.js +95 -0
  106. package/dist/index.js.map +1 -0
  107. package/dist/layouts/card.css +166 -0
  108. package/dist/layouts/card.d.ts +69 -0
  109. package/dist/layouts/card.d.ts.map +1 -0
  110. package/dist/layouts/card.js +57 -0
  111. package/dist/layouts/card.js.map +1 -0
  112. package/dist/layouts/stack.css +58 -0
  113. package/dist/layouts/stack.d.ts +64 -0
  114. package/dist/layouts/stack.d.ts.map +1 -0
  115. package/dist/layouts/stack.js +69 -0
  116. package/dist/layouts/stack.js.map +1 -0
  117. package/dist/layouts/strip.css +58 -0
  118. package/dist/layouts/strip.d.ts +72 -0
  119. package/dist/layouts/strip.d.ts.map +1 -0
  120. package/dist/layouts/strip.js +73 -0
  121. package/dist/layouts/strip.js.map +1 -0
  122. package/dist/layouts/tabs.core.d.ts +73 -0
  123. package/dist/layouts/tabs.core.d.ts.map +1 -0
  124. package/dist/layouts/tabs.core.js +65 -0
  125. package/dist/layouts/tabs.core.js.map +1 -0
  126. package/dist/layouts/tabs.css +260 -0
  127. package/dist/layouts/tabs.d.ts +57 -0
  128. package/dist/layouts/tabs.d.ts.map +1 -0
  129. package/dist/layouts/tabs.js +128 -0
  130. package/dist/layouts/tabs.js.map +1 -0
  131. package/dist/layouts/tree.css +138 -0
  132. package/dist/layouts/tree.d.ts +46 -0
  133. package/dist/layouts/tree.d.ts.map +1 -0
  134. package/dist/layouts/tree.js +69 -0
  135. package/dist/layouts/tree.js.map +1 -0
  136. package/dist/navigation/link.css +229 -0
  137. package/dist/navigation/link.d.ts +89 -0
  138. package/dist/navigation/link.d.ts.map +1 -0
  139. package/dist/navigation/link.js +91 -0
  140. package/dist/navigation/link.js.map +1 -0
  141. package/dist/navigation/path.css +122 -0
  142. package/dist/navigation/path.d.ts +42 -0
  143. package/dist/navigation/path.d.ts.map +1 -0
  144. package/dist/navigation/path.js +49 -0
  145. package/dist/navigation/path.js.map +1 -0
  146. package/dist/navigation/toc.core.d.ts +111 -0
  147. package/dist/navigation/toc.core.d.ts.map +1 -0
  148. package/dist/navigation/toc.core.js +60 -0
  149. package/dist/navigation/toc.core.js.map +1 -0
  150. package/dist/navigation/toc.css +53 -0
  151. package/dist/navigation/toc.d.ts +112 -0
  152. package/dist/navigation/toc.d.ts.map +1 -0
  153. package/dist/navigation/toc.js +321 -0
  154. package/dist/navigation/toc.js.map +1 -0
  155. package/dist/scopes/guard.css +26 -0
  156. package/dist/scopes/guard.d.ts +37 -0
  157. package/dist/scopes/guard.d.ts.map +1 -0
  158. package/dist/scopes/guard.js +60 -0
  159. package/dist/scopes/guard.js.map +1 -0
  160. package/dist/scopes/style.css +26 -0
  161. package/dist/scopes/style.d.ts +68 -0
  162. package/dist/scopes/style.d.ts.map +1 -0
  163. package/dist/scopes/style.js +108 -0
  164. package/dist/scopes/style.js.map +1 -0
  165. package/dist/shells/tool.css +778 -0
  166. package/dist/shells/tool.d.ts +164 -0
  167. package/dist/shells/tool.d.ts.map +1 -0
  168. package/dist/shells/tool.js +251 -0
  169. package/dist/shells/tool.js.map +1 -0
  170. package/dist/signals/more.css +42 -0
  171. package/dist/signals/more.d.ts +28 -0
  172. package/dist/signals/more.d.ts.map +1 -0
  173. package/dist/signals/more.js +61 -0
  174. package/dist/signals/more.js.map +1 -0
  175. package/dist/signals/note.css +221 -0
  176. package/dist/signals/note.d.ts +83 -0
  177. package/dist/signals/note.d.ts.map +1 -0
  178. package/dist/signals/note.js +72 -0
  179. package/dist/signals/note.js.map +1 -0
  180. package/dist/signals/toasts.css +463 -0
  181. package/dist/signals/toasts.d.ts +68 -0
  182. package/dist/signals/toasts.d.ts.map +1 -0
  183. package/dist/signals/toasts.js +160 -0
  184. package/dist/signals/toasts.js.map +1 -0
  185. package/package.json +331 -4
@@ -0,0 +1,89 @@
1
+ import { type Scalar } from "@grafctory/core";
2
+ import { type ComponentChildren, type TargetedMouseEvent, type VNode } from "preact";
3
+ import "./link.css";
4
+ /**
5
+ * Creates a link.
6
+ *
7
+ * Shows its content on a native anchor, so the link role, the activation by `Enter`, the tab stop, the focus ring and
8
+ * the browser's own handling of modified clicks come with it rather than having to be asked for. A plain click on a
9
+ * route of the same site is followed by the enclosing {@link @grafctory/clay!router.Router Router} without
10
+ * reloading the page.
11
+ *
12
+ * An `active` link, while the route it points at is current, is set apart from its neighbours by an underline in the
13
+ * accent colour, and is announced as the current page, or as the current entry of a section where `href` covers the
14
+ * routes nested under it, so a navigation menu tells the reader where they are whether or not they see it. The anchor
15
+ * also carries an empty `active` attribute, for a stylesheet of the consumer's own to read.
16
+ *
17
+ * Reads the current route, so it renders below the {@link @grafctory/clay!router.Router Router}.
18
+ *
19
+ * @param options The widget configuration
20
+ *
21
+ * @returns The link
22
+ *
23
+ * @see {@link https://www.w3.org/WAI/ARIA/apg/patterns/link/ ARIA Authoring Practices: Link Pattern}
24
+ */
25
+ export declare function Link({ active, look, // deliberately left undefaulted, so an unstated look falls through to the one the area assigns
26
+ href, query, title, onClick, children }: {
27
+ /**
28
+ * Whether the link is marked while the route it points at is current; never marked if omitted.
29
+ */
30
+ active?: boolean;
31
+ /**
32
+ * How loud the link appears: `subtle` reads as the text around it, font and colour alike, `normal` adds the link
33
+ * colour and an underline, and `strong` is heavier in the link colour, underlined only under the pointer, as is
34
+ * `subtle`. Every look keeps the face and size of the text around it, turns to the hover colour under the pointer
35
+ * and holds it through the press. However loud, a marked link is underlined in the accent colour, thick except for
36
+ * `subtle`, where the mark is thinner and drawn closer to the text it sits under.
37
+ *
38
+ * A link stating nothing takes the look the {@link style!Style styled area} around it assigns as `linkLook`,
39
+ * which is `normal` where nothing assigns it. Stating a look here answers to that alone, whatever the area says.
40
+ */
41
+ look?: "subtle" | "normal" | "strong";
42
+ /**
43
+ * The route the link points at; a trailing `/*` extends the marking of an `active` link to every route nested under
44
+ * it, so `/users/*` links to `/users/` and is marked for `/users/123`, though not for `/users`.
45
+ */
46
+ href: string;
47
+ /**
48
+ * The entries the link adds to the query of the route it points at, after any query `href` carries; none if
49
+ * omitted.
50
+ *
51
+ * The page reached reads them from its location, so a link hands over the criteria it is narrowed by, as a facet
52
+ * value linking to the catalogue filtered on it, and a link to the current route narrows the page in place with an
53
+ * entry in the history to go back by. The query never takes part in marking an `active` link.
54
+ */
55
+ query?: {
56
+ readonly [name: string]: Scalar;
57
+ };
58
+ /**
59
+ * The hint the platform shows on resting the pointer on the link, such as where it leads; no hint if omitted.
60
+ *
61
+ * Beside content that names the link it names nothing. On a glyph standing alone with no label of its own it names
62
+ * the link, and is then spoken as a name rather than as an aside. Either way it reaches neither a reader who never
63
+ * rests the pointer nor one on a touch screen, so whatever a reader has to take in to follow the link belongs in
64
+ * its content rather than here.
65
+ */
66
+ title?: string;
67
+ /**
68
+ * What activating the link is handed to, whether the activation comes from a pointer or from `Enter`; followed as a
69
+ * link if omitted. A link given a handler is never followed, by the enclosing router or by the browser, so the
70
+ * handler alone decides what the activation does, while `href` still states where the link points. The activation
71
+ * event is handed over as it stands, so a handler may read the modifier keys it carries.
72
+ *
73
+ * @param event The activation event
74
+ */
75
+ onClick?: (event: TargetedMouseEvent<HTMLAnchorElement>) => void;
76
+ /**
77
+ * The content the link shows, naming it; a glyph standing alone carries a label of its own to be announced by.
78
+ *
79
+ * Wording running out of room is cut short with an ellipsis wherever the area around it keeps it to one line. A
80
+ * glyph shown without wording has no text to underline, so under the pointer it is laid on the hover fill of a
81
+ * control instead, without moving the content around it, and the focus ring encloses both the glyph and the fill.
82
+ * The `--clay-link-inset` custom property sets how far the fill and the ring reach past the glyph. Set on an area,
83
+ * it reaches every link the area holds, and a length in `em` is measured on each link rather than on the area.
84
+ */
85
+ children?: ComponentChildren;
86
+ }): VNode<{
87
+ look: "strong" | "subtle" | "normal" | undefined;
88
+ }>;
89
+ //# sourceMappingURL=link.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../src/navigation/link.tsx"],"names":[],"mappings":"AA0BA,OAAO,EAAY,KAAK,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EACN,KAAK,iBAAiB,EAGtB,KAAK,kBAAkB,EAEvB,KAAK,KAAK,EACV,MAAM,QAAQ,CAAC;AAChB,OAAO,YAAY,CAAC;AAGpB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,IAAI,CAAC,EAEpB,MAAM,EAEN,IAAI,EAAE,+FAA+F;AAErG,IAAI,EACJ,KAAK,EACL,KAAK,EAEL,OAAO,EAEP,QAAQ,EAER,EAAE;IAEF;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAGhB;;;;;;;;;OASG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAA;IAGrC;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAA;IAEZ;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE;QAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;IAE3C;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAGd;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAA;IAGhE;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,iBAAiB,CAAA;CAE5B;;GA+DA"}
@@ -0,0 +1,91 @@
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
+ * Route navigation control.
18
+ *
19
+ * Offers the control a reader moves to another route with, followed in place by the enclosing router or left to the
20
+ * browser, and marked on request while the route it points at is current.
21
+ *
22
+ * @module link
23
+ */
24
+ import { useRoute } from "@grafctory/clay/router";
25
+ import { isString } from "@grafctory/core";
26
+ import { createElement, isValidElement, toChildArray } from "preact";
27
+ import "./link.css";
28
+ /**
29
+ * Creates a link.
30
+ *
31
+ * Shows its content on a native anchor, so the link role, the activation by `Enter`, the tab stop, the focus ring and
32
+ * the browser's own handling of modified clicks come with it rather than having to be asked for. A plain click on a
33
+ * route of the same site is followed by the enclosing {@link @grafctory/clay!router.Router Router} without
34
+ * reloading the page.
35
+ *
36
+ * An `active` link, while the route it points at is current, is set apart from its neighbours by an underline in the
37
+ * accent colour, and is announced as the current page, or as the current entry of a section where `href` covers the
38
+ * routes nested under it, so a navigation menu tells the reader where they are whether or not they see it. The anchor
39
+ * also carries an empty `active` attribute, for a stylesheet of the consumer's own to read.
40
+ *
41
+ * Reads the current route, so it renders below the {@link @grafctory/clay!router.Router Router}.
42
+ *
43
+ * @param options The widget configuration
44
+ *
45
+ * @returns The link
46
+ *
47
+ * @see {@link https://www.w3.org/WAI/ARIA/apg/patterns/link/ ARIA Authoring Practices: Link Pattern}
48
+ */
49
+ export function Link({ active, look, // deliberately left undefaulted, so an unstated look falls through to the one the area assigns
50
+ href, query, title, onClick, children }) {
51
+ const route = useRoute();
52
+ const section = href.endsWith("/*");
53
+ const target = section ? href.slice(0, -1) : href;
54
+ const path = target.replace(/\?.*$/, ""); // the route carries no query, so marking compares the path alone
55
+ const entries = Object.entries(query ?? {})
56
+ .map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`) // spaces stay %20, not `+`
57
+ .join("&");
58
+ const marked = active && (section ? route.startsWith(path) : route === path);
59
+ // `active` is no anchor attribute JSX knows of, so the anchor is created as the wrapper is
60
+ return createElement("clay-link", { look }, createElement("a", {
61
+ href: !entries ? target : `${target}${target.includes("?") ? "&" : "?"}${entries}`,
62
+ title,
63
+ active: marked ? "" : undefined,
64
+ "aria-current": !marked ? undefined : section ? "true" : "page",
65
+ // preventing the default action keeps the browser from following the link and the router from taking it over
66
+ onClick: onClick && ((event) => {
67
+ event.preventDefault();
68
+ onClick(event);
69
+ })
70
+ }, ...spans()));
71
+ /**
72
+ * Sets each run of text in the content in a span of its own, leaving elements as they stand.
73
+ *
74
+ * Text left bare in the flex anchor would sit in an anonymous box that no rule can reach. The stylesheet could then
75
+ * neither shrink it nor end it in an ellipsis when the link runs out of room on a single line.
76
+ */
77
+ function spans() {
78
+ return toChildArray(children)
79
+ .map(child => isValidElement(child) ? child : `${child}`)
80
+ .reduce(join, [])
81
+ .map(item => isString(item) ? createElement("span", {}, item) : item);
82
+ /**
83
+ * Returns the collected items with an item appended, merged into the last one if both are text.
84
+ */
85
+ function join(items, item) {
86
+ const last = items.at(-1);
87
+ return isString(last) && isString(item) ? [...items.slice(0, -1), `${last}${item}`] : [...items, item];
88
+ }
89
+ }
90
+ }
91
+ //# sourceMappingURL=link.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"link.js","sourceRoot":"","sources":["../../src/navigation/link.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAc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AC,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,IAAI,CAAC,CAAC;QAExG,CAAC;IAEF,CAAC;AAEF,CAAC"}
@@ -0,0 +1,122 @@
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
+ /*
18
+ * A path lays its steps in a single row, clipping the last one with an ellipsis where the row runs out, and stacks them
19
+ * one per line on a phone held upright, where a row would leave the steps no room at all.
20
+ */
21
+
22
+ clay-path {
23
+
24
+ display: block;
25
+
26
+ min-width: 0;
27
+
28
+ /*
29
+ * The trail assigns its links the loud look, so a step linking back up takes the colour of a strong link whatever area
30
+ * the trail stands in, while a link stating a look of its own keeps that one instead of the look the trail sets.
31
+ */
32
+
33
+ --clay-link-look: strong;
34
+
35
+ & > nav {
36
+
37
+ display: contents;
38
+
39
+ /* The list drops the markers, indent and gaps the design system gives running text. */
40
+
41
+ & > ol {
42
+
43
+ display: flex;
44
+ align-items: baseline;
45
+
46
+ overflow: hidden;
47
+
48
+ margin: 0;
49
+ padding: 0;
50
+
51
+ list-style: none;
52
+
53
+ & > li {
54
+
55
+ flex-shrink: 0;
56
+
57
+ margin: 0;
58
+
59
+ white-space: nowrap;
60
+
61
+ /*
62
+ * A link keeps the weight of the plain steps beside it, whatever its look, so the trail reads at one
63
+ * weight throughout. Matching the anchor as a link outweighs the looks the link sheet keys on its
64
+ * attribute, so no look of the link can bring a weight of its own back into the trail.
65
+ */
66
+
67
+ & > clay-link > a:any-link {
68
+ font-weight: inherit;
69
+ }
70
+
71
+ /*
72
+ * Every step ends on a separator, save plain text closing the trail, which names the current page and
73
+ * leads nowhere further. Separators carry empty alternative text, so they are drawn but never
74
+ * announced: each is a single right guillemet set in the text font and painted in the label colour.
75
+ */
76
+
77
+ &:not(:last-child:not(:has(> clay-link)))::after {
78
+
79
+ content: "›" / "";
80
+
81
+ margin: 0 var(--skin--spacing-025); /* Between the two steps. */
82
+
83
+ color: var(--skin--color-label);
84
+
85
+ }
86
+
87
+ &:last-child {
88
+ flex-shrink: 1;
89
+ min-width: 0;
90
+ overflow: hidden;
91
+ text-overflow: ellipsis;
92
+ }
93
+
94
+ }
95
+
96
+ /*
97
+ * Below the small viewport a phone held upright leaves no room for a row, so the steps stack one per line,
98
+ * outermost on top, each closing on its separator. A step too long for the line wraps rather than being
99
+ * clipped, as the whole width is its own, and carries its separator at the end of its last line.
100
+ */
101
+
102
+ @container style(--skin--viewport-small: off) {
103
+
104
+ flex-direction: column;
105
+ align-items: flex-start;
106
+
107
+ & > li {
108
+
109
+ max-width: 100%;
110
+
111
+ white-space: normal;
112
+ overflow-wrap: anywhere;
113
+
114
+ }
115
+
116
+ }
117
+
118
+ }
119
+
120
+ }
121
+
122
+ }
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Breadcrumb trail.
3
+ *
4
+ * Offers the trail that tells a reader where the current page sits in the hierarchy and leads them back up through it.
5
+ *
6
+ * @module path
7
+ */
8
+ import { type ComponentChildren } from "preact";
9
+ import "./path.css";
10
+ /**
11
+ * Creates a breadcrumb path.
12
+ *
13
+ * Shows its steps in a row, from the outermost level to the current page. The separators closing every step but a
14
+ * plain one at the end are supplied by the widget and never announced: a step carries only its link or its text.
15
+ *
16
+ * The trail is a navigation landmark holding an ordered list, and its last step is announced as the current page. A
17
+ * reader thus learns where they stand whether or not they see the trail. A trail too long for its row clips its last
18
+ * step with an ellipsis and keeps the levels above it whole, so the page name is best stated in full elsewhere.
19
+ *
20
+ * On a phone held upright the steps stack one per line instead, outermost on top, each closing on its separator, and
21
+ * a step too long for the line wraps rather than being clipped, so the whole trail stays legible.
22
+ *
23
+ * @param options The widget configuration
24
+ *
25
+ * @returns The breadcrumb path
26
+ *
27
+ * @see {@link https://www.w3.org/WAI/ARIA/apg/patterns/breadcrumb/ ARIA Authoring Practices: Breadcrumb Pattern}
28
+ */
29
+ export declare function Path({ name, children }: {
30
+ /**
31
+ * The accessible name of the trail, such as `Breadcrumb`, setting it apart from other navigation landmarks on the
32
+ * page; unnamed if omitted, as befits a page holding no other navigation landmark.
33
+ */
34
+ name?: string;
35
+ /**
36
+ * The steps of the trail, outermost first, one child each: a {@link link.Link Link} for a level the reader may
37
+ * return to, coloured as a strong link unless it states a look of its own, plain content for one they may not;
38
+ * empty children such as `null`, `undefined` or `false` are dropped rather than shown as empty steps.
39
+ */
40
+ children?: ComponentChildren;
41
+ }): import("preact").VNode<import("preact").ClassAttributes<HTMLElement> & import("preact").HTMLAttributes<EventTarget> & import("preact").SVGAttributes<SVGElement>>;
42
+ //# sourceMappingURL=path.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../src/navigation/path.tsx"],"names":[],"mappings":"AAgBA;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,iBAAiB,EAA+B,MAAM,QAAQ,CAAC;AAC7E,OAAO,YAAY,CAAC;AAGpB;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,IAAI,CAAC,EAEpB,IAAI,EAEJ,QAAQ,EAER,EAAE;IAEF;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAGb;;;;OAIG;IACH,QAAQ,CAAC,EAAE,iBAAiB,CAAA;CAE5B,qKAUA"}
@@ -0,0 +1,49 @@
1
+ import { jsx as _jsx } from "preact/jsx-runtime";
2
+ /*
3
+ * Copyright © 2026 Metreeca srl
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ /**
18
+ * Breadcrumb trail.
19
+ *
20
+ * Offers the trail that tells a reader where the current page sits in the hierarchy and leads them back up through it.
21
+ *
22
+ * @module path
23
+ */
24
+ import { createElement, toChildArray } from "preact";
25
+ import "./path.css";
26
+ /**
27
+ * Creates a breadcrumb path.
28
+ *
29
+ * Shows its steps in a row, from the outermost level to the current page. The separators closing every step but a
30
+ * plain one at the end are supplied by the widget and never announced: a step carries only its link or its text.
31
+ *
32
+ * The trail is a navigation landmark holding an ordered list, and its last step is announced as the current page. A
33
+ * reader thus learns where they stand whether or not they see the trail. A trail too long for its row clips its last
34
+ * step with an ellipsis and keeps the levels above it whole, so the page name is best stated in full elsewhere.
35
+ *
36
+ * On a phone held upright the steps stack one per line instead, outermost on top, each closing on its separator, and
37
+ * a step too long for the line wraps rather than being clipped, so the whole trail stays legible.
38
+ *
39
+ * @param options The widget configuration
40
+ *
41
+ * @returns The breadcrumb path
42
+ *
43
+ * @see {@link https://www.w3.org/WAI/ARIA/apg/patterns/breadcrumb/ ARIA Authoring Practices: Breadcrumb Pattern}
44
+ */
45
+ export function Path({ name, children }) {
46
+ const steps = toChildArray(children);
47
+ return createElement("clay-path", {}, _jsx("nav", { "aria-label": name, children: _jsx("ol", { role: "list", children: steps.map((step, index) => _jsx("li", { "aria-current": index === steps.length - 1 ? "page" : undefined, children: step }, index)) }) }));
48
+ }
49
+ //# sourceMappingURL=path.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"path.js","sourceRoot":"","sources":["../../src/navigation/path.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;GAMG;AAEH,OAAO,EAA0B,aAAa,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAC7E,OAAO,YAAY,CAAC;AAGpB;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,IAAI,CAAC,EAEpB,IAAI,EAEJ,QAAQ,EAkBR;IAEA,MAAM,KAAK,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;IAErC,OAAO,aAAa,CAAC,WAAW,EAAE,EAAE,EAAE,4BAAiB,IAAI,YAC1D,aAAI,IAAI,EAAC,MAAM,YAAE,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAC1C,6BAA8B,KAAK,KAAK,KAAK,CAAC,MAAM,GAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,YAAG,IAAI,IAAzE,KAAK,CAA0E,CACxF,GAAM,GACF,CAAC,CAAC;AAET,CAAC"}
@@ -0,0 +1,111 @@
1
+ /**
2
+ * Headless table of contents.
3
+ *
4
+ * Offers what an outline beside a long page does without drawing one: the sections it lists, in the order the page
5
+ * holds them, and which of them the reader is currently in, followed as the page scrolls. A rendering layer adopts it
6
+ * and supplies the markup, the styling and the measure of where each section stands.
7
+ *
8
+ * @module toc.core
9
+ */
10
+ import { type Optional } from "@grafctory/core";
11
+ /**
12
+ * Headless table of contents.
13
+ *
14
+ * Holds the sections an outline lists and the one the reader is in, followed as the page scrolls.
15
+ *
16
+ * A reader takes in a page from the top of the view down, so the current section is the one at the top of the view.
17
+ * That is the first section starting in the top third of the view, or failing that the last one scrolled up past the
18
+ * top edge. Before any has been, it is the first section in view. No section is current while the first one still
19
+ * starts below the view, as it does beneath a long introduction or a cover image.
20
+ *
21
+ * The current section changes only as a section start crosses the top edge of the view or the bottom of its top third,
22
+ * or as the page reaches its end or leaves it. Sections starting too low in the last screenful of the page to ever be
23
+ * scrolled into the top third are left to the end of the page, where the last section in view is current instead.
24
+ *
25
+ * A section the reader asks for, by following a link to it, is current as soon as it is chosen. It stays current while
26
+ * the page scrolls to bring it into view, smoothly or at once. The choice is pinned until it is released, as the reader
27
+ * scrolls on their own. After that, the section chosen keeps precedence over the scroll position while its start is
28
+ * in view, so it stays current while the reader reads on around it. Once its start leaves the view, the choice lapses
29
+ * for good and the current section follows the page under the rules above, however often the section comes back.
30
+ *
31
+ * A transition yields a new outline and leaves this one as it stands. One that changes nothing yields this outline
32
+ * itself, which a rendering layer takes as nothing to redraw, so scrolling within a section costs no render.
33
+ */
34
+ export interface TOC {
35
+ /**
36
+ * The ids of the elements opening the sections, in page order, unique.
37
+ */
38
+ readonly sections: readonly string[];
39
+ /**
40
+ * The id of the section the reader is in, or `undefined` while the first section starts below the view.
41
+ */
42
+ readonly current: Optional<string>;
43
+ /**
44
+ * Whether the current section was chosen by the reader and is held against the scroll position of the page.
45
+ */
46
+ readonly pinned: boolean;
47
+ /**
48
+ * The id of the section the reader chose, held as current while its start is in view, or `undefined` if no choice
49
+ * holds, either because none was made or because the section chosen has since left the view.
50
+ */
51
+ readonly chosen: Optional<string>;
52
+ /**
53
+ * Follows the page to where the reader has scrolled it.
54
+ *
55
+ * @param metrics Where the page stands in the viewport
56
+ *
57
+ * @returns An outline whose current section is the one `metrics` puts the reader in, or this outline itself if
58
+ * that section is already current or if the current section is pinned, which no position of the page overrides
59
+ */
60
+ scroll(metrics: TOCMetrics): this;
61
+ /**
62
+ * Chooses a section, as the reader does by following a link to it.
63
+ *
64
+ * @param id The id of the section to make current
65
+ *
66
+ * @returns An outline whose current section is `id`, pinned against the scroll position, or this outline itself if
67
+ * `id` is not one of its sections, leaving the current section and any pin it carries as they stand
68
+ */
69
+ select(id: string): this;
70
+ /**
71
+ * Releases a chosen section, as the reader does by scrolling on their own.
72
+ *
73
+ * @returns An outline following the page again from the next {@link TOC.scroll scroll}, or this outline itself if
74
+ * no section is pinned; the section released stays current for as long as its start is in view
75
+ */
76
+ release(): this;
77
+ }
78
+ /**
79
+ * Where the page stands in the viewport, as an outline follows it.
80
+ */
81
+ export interface TOCMetrics {
82
+ /**
83
+ * The distance of each section start below the top of the viewport, keyed by section id, negative for a start
84
+ * scrolled above it; a section missing from the record is taken as not on the page, and never becomes current.
85
+ */
86
+ readonly tops: Readonly<Record<string, number>>;
87
+ /**
88
+ * The height of the viewport, the distance below its top within which a section start stands in view.
89
+ */
90
+ readonly height: number;
91
+ /**
92
+ * Whether the page has been scrolled to its end, leaving the sections starting low in its last screenful no way to
93
+ * reach the top third; `false` for a page with nothing to scroll, which is followed from the top of the view alone.
94
+ */
95
+ readonly end: boolean;
96
+ }
97
+ /**
98
+ * Creates a headless table of contents.
99
+ *
100
+ * @param options The outline configuration
101
+ *
102
+ * @returns An immutable {@link TOC} listing `sections`, with no section current or pinned
103
+ */
104
+ export declare function createTOC({ sections }?: {
105
+ /**
106
+ * The ids of the elements opening the sections, in page order, taken as given with duplicates removed, keeping the
107
+ * first occurrence of each, so a section listed twice is followed once; empty if omitted.
108
+ */
109
+ sections?: readonly string[];
110
+ }): TOC;
111
+ //# sourceMappingURL=toc.core.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toc.core.d.ts","sourceRoot":"","sources":["../../src/navigation/toc.core.ts"],"names":[],"mappings":"AAgBA;;;;;;;;GAQG;AAEH,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAkBhD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,GAAG;IAEnB;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IAErC;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEnC;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IAEzB;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAGlC;;;;;;;OAOG;IACH,MAAM,CAAC,OAAO,EAAE,UAAU,GAAG,IAAI,CAAC;IAElC;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB;;;;;OAKG;IACH,OAAO,IAAI,IAAI,CAAC;CAEhB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IAE1B;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAEhD;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;CAEtB;AAKD;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,EAEzB,QAAa,EAEb,GAAE;IAEF;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAEvB,GAAG,GAAG,CAyCX"}
@@ -0,0 +1,60 @@
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
+ import { unique } from "@grafctory/core/arrays";
17
+ import { createState } from "@grafctory/core/state";
18
+ /**
19
+ * The share of the view height, from its top, where a section start counts as standing at the top of the view.
20
+ */
21
+ const Top = 1 / 3;
22
+ /**
23
+ * The distance, in pixels, within which a section start counts as standing on the top edge of the view, absorbing the
24
+ * fractional offsets layout leaves a start brought to the edge by a followed link.
25
+ */
26
+ const Edge = 1;
27
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
28
+ /**
29
+ * Creates a headless table of contents.
30
+ *
31
+ * @param options The outline configuration
32
+ *
33
+ * @returns An immutable {@link TOC} listing `sections`, with no section current or pinned
34
+ */
35
+ export function createTOC({ sections = [] } = {}) {
36
+ return createState({
37
+ sections: unique(sections),
38
+ current: undefined,
39
+ pinned: false,
40
+ chosen: undefined,
41
+ scroll({ tops, height, end }) {
42
+ const top = (id) => tops[id] ?? Infinity;
43
+ const visible = this.sections.filter(id => top(id) >= -Edge && top(id) < height);
44
+ const leading = visible.find(id => top(id) <= height * Top + Edge);
45
+ const reached = this.sections.filter(id => top(id) < -Edge).at(-1);
46
+ const chosen = this.chosen !== undefined && visible.includes(this.chosen) ? this.chosen : undefined;
47
+ return this.pinned ? {} : {
48
+ chosen,
49
+ current: chosen ?? (end ? visible.at(-1) ?? reached : leading ?? reached ?? visible[0])
50
+ };
51
+ },
52
+ select(id) {
53
+ return this.sections.includes(id) ? { current: id, pinned: true, chosen: id } : {};
54
+ },
55
+ release() {
56
+ return { pinned: false };
57
+ }
58
+ });
59
+ }
60
+ //# sourceMappingURL=toc.core.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toc.core.js","sourceRoot":"","sources":["../../src/navigation/toc.core.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAaH,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD;;GAEG;AACH,MAAM,GAAG,GAAG,CAAC,GAAC,CAAC,CAAC;AAEhB;;;GAGG;AACH,MAAM,IAAI,GAAG,CAAC,CAAC;AA0Gf,wHAAwH;AAExH;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAAC,EAEzB,QAAQ,GAAG,EAAE,KAUV,EAAE;IAE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C,CAAC,CAAC,CAAC;aACvF,CAAC;QAEH,CAAC;QAED,MAAM,CAAC,EAAU;YAEhB,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAEpF,CAAC;QAED,OAAO;YAEN,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;QAE1B,CAAC;KAED,CAAC,CAAC;AAEJ,CAAC"}
@@ -0,0 +1,53 @@
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
+ /*
18
+ * The outline is a navigation landmark of nested lists, which the design system sets as an outline like any other on
19
+ * the page, current entry included, standing as a column of entries at every width.
20
+ */
21
+
22
+ clay-toc {
23
+
24
+ display: block;
25
+
26
+ /*
27
+ * Labels are kept to one line each, clipped with an ellipsis where they outrun the column, so a long identifier
28
+ * neither breaks midway nor widens the outline. Each label is a block of its own, standing beside the chevron
29
+ * floated at the end of a summary, so the ellipsis falls before the chevron rather than running under it.
30
+ *
31
+ * The clip reaches past the label, clear of the focus mark of any link the label holds, so the mark
32
+ * shows whole while the ellipsis still cuts text at the edge of the column, where the outline ends for the reader.
33
+ */
34
+
35
+ & :is(li, a, summary) > span {
36
+ display: flow-root;
37
+ overflow: clip;
38
+ overflow-clip-margin: var(--skin--spacing-050);
39
+ text-overflow: ellipsis;
40
+ white-space: nowrap;
41
+ }
42
+
43
+ /*
44
+ * Wrapping, a long label wraps within the column rather than being clipped, so it is shown in full however long it
45
+ * runs, and a word outrunning the column alone, as a long identifier, breaks wherever needed to fit it.
46
+ */
47
+
48
+ &[wrap] :is(li, a, summary) > span {
49
+ white-space: normal;
50
+ overflow-wrap: anywhere;
51
+ }
52
+
53
+ }