@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,76 @@
1
+ /*
2
+ * Copyright © 2020-2026 EC2U Alliance
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 pill sets a short label in a rounded outline, inline with the text around it, wrapping rather than clipping past its
19
+ * room so no part of the label is ever hidden. The look decides how loud it is, and the colour a consumer hands over
20
+ * through the --clay-pill-color property marks it with a dot, a tint or a fill, the look deciding which.
21
+ */
22
+
23
+ clay-pill {
24
+
25
+ display: inline-block;
26
+ max-width: 100%;
27
+ padding: var(--skin--spacing-010) var(--skin--spacing-075);
28
+ border: var(--skin--border-width) var(--skin--border-style) var(--skin--border-color);
29
+ border-radius: var(--skin--border-radius-100);
30
+ overflow-wrap: anywhere;
31
+ vertical-align: baseline;
32
+ font-size: var(--skin--font-size-small);
33
+ font-weight: var(--skin--font-weight-strong);
34
+
35
+ /* The dot is kept concentric with the rounded start cap. */
36
+
37
+ &[color]:not([look]), &[color][look="normal"] {
38
+
39
+ padding-inline-start: var(--skin--spacing-010);
40
+
41
+ &::before {
42
+ content: "";
43
+ display: inline-block;
44
+ vertical-align: top;
45
+ width: 1cap;
46
+ height: 1cap;
47
+ margin: calc((1lh - 1cap) / 2);
48
+ margin-inline-end: var(--skin--spacing-050);
49
+ border-radius: 50%;
50
+ background-color: var(--clay-pill-color);
51
+ }
52
+
53
+ }
54
+
55
+ &[look="subtle"] {
56
+
57
+ font-weight: normal;
58
+
59
+ /* At 35% the label holds 5.3:1 on its tint for any sRGB colour, in both schemes. */
60
+
61
+ &[color] {
62
+ border-color: var(--clay-pill-color);
63
+ color: color-mix(in oklab, var(--clay-pill-color) 35%, var(--skin--color));
64
+ background-color: color-mix(in oklab, var(--clay-pill-color) 15%, var(--skin--background-color));
65
+ }
66
+
67
+ }
68
+
69
+ &[look="strong"] {
70
+ padding-inline: var(--skin--spacing-050);
71
+ border-color: transparent;
72
+ color: var(--skin--background-color);
73
+ background-color: var(--clay-pill-color, var(--skin--color));
74
+ }
75
+
76
+ }
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Classifying tag.
3
+ *
4
+ * Marks an item with the short values it is classified by, such as a state, a category or a keyword, so a reader
5
+ * scanning a list or a card picks them out at a glance rather than reading them out of the running text.
6
+ *
7
+ * @module pill
8
+ */
9
+ import { type ComponentChildren } from "preact";
10
+ import "./pill.css";
11
+ /**
12
+ * Creates a pill.
13
+ *
14
+ * Sets a short label in a rounded outline, inline with the content around it, so a value classifying an item reads as
15
+ * a tag rather than as running text. A label outrunning the room it is given wraps rather than being clipped, so it
16
+ * stays readable in full at any text size, though a short one keeps the pill reading as a tag.
17
+ *
18
+ * Assistive technologies meet the label alone, so the wording carries whatever the look and the colour suggest. A pill
19
+ * adds no break of its own to the text read around it: inside a link or a heading, keep a space or punctuation between
20
+ * pills and the neighbouring text, or the accessible name runs them together into a single word.
21
+ *
22
+ * @param options The widget configuration
23
+ *
24
+ * @returns The pill
25
+ */
26
+ export declare function Pill({ look, color, children }: {
27
+ /**
28
+ * How loud the pill appears among the items it marks; `normal` if omitted. A `subtle` pill recedes behind the
29
+ * content around it, while a `strong` one is filled so it stands out at a glance.
30
+ *
31
+ * The look is emphasis only, never a meaning: forced colours mode drops the dot, the tint and the fill.
32
+ */
33
+ look?: "subtle" | "normal" | "strong";
34
+ /**
35
+ * The CSS colour coding the pill, so pills sharing a value are matched at a glance; the page colours if omitted.
36
+ * The colour marks the label with a dot in the `normal` look, tints the label, border and fill in the `subtle`
37
+ * look, and fills the pill behind a label in the page colour in the `strong` look.
38
+ *
39
+ * The `normal` and `subtle` looks keep the label legible whatever the colour, while a `strong` pill sets the label
40
+ * in the page colour on the fill, so the consumer picks a fill holding 4.5:1 against the page colour in both
41
+ * schemes, such as `light-dark(#06C, #4AF)`, darker than a light page and lighter than a dark one.
42
+ *
43
+ * The colour is never announced to assistive technologies, so it never codes a meaning the label leaves unsaid.
44
+ */
45
+ color?: string;
46
+ /**
47
+ * The label set inside the pill.
48
+ */
49
+ children?: ComponentChildren;
50
+ }): import("preact").VNode<{
51
+ look: "subtle" | "normal" | "strong" | undefined;
52
+ color: string | undefined;
53
+ style: {
54
+ "--clay-pill-color": string;
55
+ } | undefined;
56
+ }>;
57
+ //# sourceMappingURL=pill.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pill.d.ts","sourceRoot":"","sources":["../../src/content/pill.tsx"],"names":[],"mappings":"AAgBA;;;;;;;GAOG;AAEH,OAAO,EAAE,KAAK,iBAAiB,EAAiB,MAAM,QAAQ,CAAC;AAC/D,OAAO,YAAY,CAAC;AAGpB;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,IAAI,CAAC,EAEpB,IAAI,EACJ,KAAK,EAEL,QAAQ,EAER,EAAE;IAEF;;;;;OAKG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAA;IAErC;;;;;;;;;;OAUG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,QAAQ,CAAC,EAAE,iBAAiB,CAAA;CAE5B;;;;;;GAQA"}
@@ -0,0 +1,48 @@
1
+ /*
2
+ * Copyright © 2020-2026 EC2U Alliance
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
+ * Classifying tag.
18
+ *
19
+ * Marks an item with the short values it is classified by, such as a state, a category or a keyword, so a reader
20
+ * scanning a list or a card picks them out at a glance rather than reading them out of the running text.
21
+ *
22
+ * @module pill
23
+ */
24
+ import { createElement } from "preact";
25
+ import "./pill.css";
26
+ /**
27
+ * Creates a pill.
28
+ *
29
+ * Sets a short label in a rounded outline, inline with the content around it, so a value classifying an item reads as
30
+ * a tag rather than as running text. A label outrunning the room it is given wraps rather than being clipped, so it
31
+ * stays readable in full at any text size, though a short one keeps the pill reading as a tag.
32
+ *
33
+ * Assistive technologies meet the label alone, so the wording carries whatever the look and the colour suggest. A pill
34
+ * adds no break of its own to the text read around it: inside a link or a heading, keep a space or punctuation between
35
+ * pills and the neighbouring text, or the accessible name runs them together into a single word.
36
+ *
37
+ * @param options The widget configuration
38
+ *
39
+ * @returns The pill
40
+ */
41
+ export function Pill({ look, color, children }) {
42
+ return createElement("clay-pill", {
43
+ look,
44
+ color,
45
+ style: color === undefined ? undefined : { "--clay-pill-color": color } // attr() can't yet portably read a colour
46
+ }, children);
47
+ }
48
+ //# sourceMappingURL=pill.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pill.js","sourceRoot":"","sources":["../../src/content/pill.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;GAOG;AAEH,OAAO,EAA0B,aAAa,EAAE,MAAM,QAAQ,CAAC;AAC/D,OAAO,YAAY,CAAC;AAGpB;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,IAAI,CAAC,EAEpB,IAAI,EACJ,KAAK,EAEL,QAAQ,EA8BR;IAEA,OAAO,aAAa,CAAC,WAAW,EAAE;QACjC,IAAI;QACJ,KAAK;QACL,KAAK,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,mBAAmB,EAAE,KAAK,EAAE,CAAC,0CAA0C;KAClH,EAAE,QAAQ,CAAC,CAAC;AAEd,CAAC"}
@@ -0,0 +1,44 @@
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
+ /* A text run stays inline, so the look it takes changes how loud the text reads and never where it sits. */
18
+
19
+ /* The look of a text run, which an area assigns to every run it holds. */
20
+
21
+ @property --clay-text-look {
22
+ syntax: "subtle | normal | strong";
23
+ inherits: true;
24
+ initial-value: normal;
25
+ }
26
+
27
+ clay-text {
28
+
29
+ display: inline;
30
+
31
+ /*
32
+ * A run takes the look the area around it sets, read off the `--clay-text-look` knob through a style query;
33
+ * a receding run takes the label colour, which holds its contrast against the page.
34
+ */
35
+
36
+ @container style(--clay-text-look: subtle) {
37
+ color: var(--skin--color-label);
38
+ }
39
+
40
+ @container style(--clay-text-look: strong) {
41
+ font-weight: var(--skin--font-weight-strong);
42
+ }
43
+
44
+ }
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Styled text run.
3
+ *
4
+ * Sets a run of text in the look of the area it sits in, without breaking the line it belongs to.
5
+ *
6
+ * @module text
7
+ */
8
+ import { type ComponentChildren } from "preact";
9
+ import "./text.css";
10
+ /**
11
+ * Creates a text run.
12
+ *
13
+ * Sets a run of text in the look the {@link style!Style styled area} around it assigns as `textLook`.
14
+ * A `subtle` run recedes in the label colour, a `normal` one reads as the text around it, and a `strong` one carries
15
+ * emphasis in a heavier weight. Runs read as `normal` where nothing assigns a look.
16
+ *
17
+ * The run adds no box of its own, so it sits in the line, the row or the column around it exactly as the bare text
18
+ * would. Its face and size always follow the text around it, whatever the look.
19
+ *
20
+ * @param options The widget configuration
21
+ *
22
+ * @returns The styled text
23
+ */
24
+ export declare function Text({ children }: {
25
+ /**
26
+ * The text to be styled.
27
+ */
28
+ children: ComponentChildren;
29
+ }): import("preact").VNode<import("preact").ClassAttributes<HTMLElement> & import("preact").HTMLAttributes<EventTarget> & import("preact").SVGAttributes<SVGElement>>;
30
+ //# sourceMappingURL=text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/content/text.tsx"],"names":[],"mappings":"AAgBA;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,iBAAiB,EAAiB,MAAM,QAAQ,CAAC;AAC/D,OAAO,YAAY,CAAC;AAGpB;;;;;;;;;;;;;GAaG;AACH,wBAAgB,IAAI,CAAC,EAEpB,QAAQ,EAER,EAAE;IAEF;;OAEG;IACH,QAAQ,EAAE,iBAAiB,CAAA;CAE3B,qKAIA"}
@@ -0,0 +1,42 @@
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
+ * Styled text run.
18
+ *
19
+ * Sets a run of text in the look of the area it sits in, without breaking the line it belongs to.
20
+ *
21
+ * @module text
22
+ */
23
+ import { createElement } from "preact";
24
+ import "./text.css";
25
+ /**
26
+ * Creates a text run.
27
+ *
28
+ * Sets a run of text in the look the {@link style!Style styled area} around it assigns as `textLook`.
29
+ * A `subtle` run recedes in the label colour, a `normal` one reads as the text around it, and a `strong` one carries
30
+ * emphasis in a heavier weight. Runs read as `normal` where nothing assigns a look.
31
+ *
32
+ * The run adds no box of its own, so it sits in the line, the row or the column around it exactly as the bare text
33
+ * would. Its face and size always follow the text around it, whatever the look.
34
+ *
35
+ * @param options The widget configuration
36
+ *
37
+ * @returns The styled text
38
+ */
39
+ export function Text({ children }) {
40
+ return createElement("clay-text", {}, children);
41
+ }
42
+ //# sourceMappingURL=text.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text.js","sourceRoot":"","sources":["../../src/content/text.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;GAMG;AAEH,OAAO,EAA0B,aAAa,EAAE,MAAM,QAAQ,CAAC;AAC/D,OAAO,YAAY,CAAC;AAGpB;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,IAAI,CAAC,EAEpB,QAAQ,EASR;IAEA,OAAO,aAAa,CAAC,WAAW,EAAE,EAAE,EAAE,QAAQ,CAAC,CAAC;AAEjD,CAAC"}