@slashsuite/ui-react 0.0.0-stage → 0.11.3

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 (304) hide show
  1. package/LICENSE +21 -0
  2. package/MIGRATING.md +540 -0
  3. package/README.md +548 -2
  4. package/dist/AppShell.d.ts +127 -0
  5. package/dist/AppShell.js +119 -0
  6. package/dist/AppShellMenu.d.ts +26 -0
  7. package/dist/AppShellMenu.js +66 -0
  8. package/dist/Avatar.d.ts +75 -0
  9. package/dist/Avatar.js +95 -0
  10. package/dist/AvatarStack.d.ts +31 -0
  11. package/dist/AvatarStack.js +34 -0
  12. package/dist/Badge.d.ts +15 -0
  13. package/dist/Badge.js +15 -0
  14. package/dist/BottomSheet.d.ts +36 -0
  15. package/dist/BottomSheet.js +142 -0
  16. package/dist/Breadcrumbs.d.ts +27 -0
  17. package/dist/Breadcrumbs.js +29 -0
  18. package/dist/BulletList.d.ts +18 -0
  19. package/dist/BulletList.js +18 -0
  20. package/dist/Button.d.ts +121 -0
  21. package/dist/Button.js +182 -0
  22. package/dist/ButtonGroup.d.ts +15 -0
  23. package/dist/ButtonGroup.js +10 -0
  24. package/dist/Callout.d.ts +43 -0
  25. package/dist/Callout.js +45 -0
  26. package/dist/Card.d.ts +148 -0
  27. package/dist/Card.js +171 -0
  28. package/dist/CardBadge.d.ts +7 -0
  29. package/dist/CardBadge.js +12 -0
  30. package/dist/CardBody.d.ts +28 -0
  31. package/dist/CardBody.js +30 -0
  32. package/dist/CardGrid.d.ts +53 -0
  33. package/dist/CardGrid.js +52 -0
  34. package/dist/CardParts.d.ts +40 -0
  35. package/dist/CardParts.js +41 -0
  36. package/dist/ChatComposer.d.ts +35 -0
  37. package/dist/ChatComposer.js +50 -0
  38. package/dist/ChatMessage.d.ts +26 -0
  39. package/dist/ChatMessage.js +21 -0
  40. package/dist/ChatThread.d.ts +25 -0
  41. package/dist/ChatThread.js +60 -0
  42. package/dist/Checkbox.d.ts +42 -0
  43. package/dist/Checkbox.js +63 -0
  44. package/dist/Chevron.d.ts +5 -0
  45. package/dist/Chevron.js +6 -0
  46. package/dist/Cluster.d.ts +70 -0
  47. package/dist/Cluster.js +47 -0
  48. package/dist/Code.d.ts +6 -0
  49. package/dist/Code.js +5 -0
  50. package/dist/CodeBlock.d.ts +46 -0
  51. package/dist/CodeBlock.js +21 -0
  52. package/dist/CodeBody.d.ts +20 -0
  53. package/dist/CodeBody.js +38 -0
  54. package/dist/CodeExample.d.ts +25 -0
  55. package/dist/CodeExample.js +17 -0
  56. package/dist/CodeText.d.ts +11 -0
  57. package/dist/CodeText.js +64 -0
  58. package/dist/ColourSchemeToggle.d.ts +36 -0
  59. package/dist/ColourSchemeToggle.js +64 -0
  60. package/dist/Container.d.ts +22 -0
  61. package/dist/Container.js +26 -0
  62. package/dist/CopyButton.d.ts +17 -0
  63. package/dist/CopyButton.js +39 -0
  64. package/dist/CopyLine.d.ts +9 -0
  65. package/dist/CopyLine.js +7 -0
  66. package/dist/DateCalendar.d.ts +23 -0
  67. package/dist/DateCalendar.js +89 -0
  68. package/dist/DateField.d.ts +124 -0
  69. package/dist/DateField.js +111 -0
  70. package/dist/DateFieldCalendar.d.ts +24 -0
  71. package/dist/DateFieldCalendar.js +50 -0
  72. package/dist/DateRangePicker.d.ts +47 -0
  73. package/dist/DateRangePicker.js +44 -0
  74. package/dist/Dialog.d.ts +56 -0
  75. package/dist/Dialog.js +94 -0
  76. package/dist/Disclosure.d.ts +29 -0
  77. package/dist/Disclosure.js +23 -0
  78. package/dist/Divider.d.ts +4 -0
  79. package/dist/Divider.js +5 -0
  80. package/dist/DocsLayout.d.ts +69 -0
  81. package/dist/DocsLayout.js +64 -0
  82. package/dist/Drawer.d.ts +30 -0
  83. package/dist/Drawer.js +24 -0
  84. package/dist/EmptyState.d.ts +47 -0
  85. package/dist/EmptyState.js +34 -0
  86. package/dist/Field.d.ts +44 -0
  87. package/dist/Field.js +51 -0
  88. package/dist/FieldDialog.d.ts +26 -0
  89. package/dist/FieldDialog.js +31 -0
  90. package/dist/Fieldset.d.ts +21 -0
  91. package/dist/Fieldset.js +22 -0
  92. package/dist/FileDrop.d.ts +17 -0
  93. package/dist/FileDrop.js +14 -0
  94. package/dist/FormRow.d.ts +46 -0
  95. package/dist/FormRow.js +39 -0
  96. package/dist/Hero.d.ts +23 -0
  97. package/dist/Hero.js +28 -0
  98. package/dist/Icon.d.ts +40 -0
  99. package/dist/Icon.js +30 -0
  100. package/dist/IconButton.d.ts +72 -0
  101. package/dist/IconButton.js +65 -0
  102. package/dist/Image.d.ts +58 -0
  103. package/dist/Image.js +69 -0
  104. package/dist/InlineEdit.d.ts +22 -0
  105. package/dist/InlineEdit.js +60 -0
  106. package/dist/Input.d.ts +40 -0
  107. package/dist/Input.js +42 -0
  108. package/dist/InputShell.d.ts +24 -0
  109. package/dist/InputShell.js +40 -0
  110. package/dist/Kbd.d.ts +6 -0
  111. package/dist/Kbd.js +5 -0
  112. package/dist/KeyValueList.d.ts +34 -0
  113. package/dist/KeyValueList.js +35 -0
  114. package/dist/Lightbox.d.ts +45 -0
  115. package/dist/Lightbox.js +46 -0
  116. package/dist/ListRow.d.ts +26 -0
  117. package/dist/ListRow.js +151 -0
  118. package/dist/Markdown.d.ts +11 -0
  119. package/dist/Markdown.js +49 -0
  120. package/dist/MediaTile.d.ts +66 -0
  121. package/dist/MediaTile.js +50 -0
  122. package/dist/Menu.d.ts +64 -0
  123. package/dist/Menu.js +86 -0
  124. package/dist/MetaList.d.ts +23 -0
  125. package/dist/MetaList.js +20 -0
  126. package/dist/Morph.d.ts +41 -0
  127. package/dist/Morph.js +107 -0
  128. package/dist/NavigationProgress.d.ts +20 -0
  129. package/dist/NavigationProgress.js +26 -0
  130. package/dist/OutlineRegion.d.ts +60 -0
  131. package/dist/OutlineRegion.js +51 -0
  132. package/dist/PageFade.d.ts +30 -0
  133. package/dist/PageFade.js +46 -0
  134. package/dist/PageHeader.d.ts +26 -0
  135. package/dist/PageHeader.js +18 -0
  136. package/dist/PageLayouts.d.ts +100 -0
  137. package/dist/PageLayouts.js +78 -0
  138. package/dist/Pagination.d.ts +38 -0
  139. package/dist/Pagination.js +65 -0
  140. package/dist/Pill.d.ts +79 -0
  141. package/dist/Pill.js +121 -0
  142. package/dist/ProgressBar.d.ts +47 -0
  143. package/dist/ProgressBar.js +47 -0
  144. package/dist/RadioGroup.d.ts +55 -0
  145. package/dist/RadioGroup.js +53 -0
  146. package/dist/ScrollStrip.d.ts +21 -0
  147. package/dist/ScrollStrip.js +12 -0
  148. package/dist/SearchInput.d.ts +9 -0
  149. package/dist/SearchInput.js +55 -0
  150. package/dist/Section.d.ts +93 -0
  151. package/dist/Section.js +55 -0
  152. package/dist/SegmentedControl.d.ts +47 -0
  153. package/dist/SegmentedControl.js +78 -0
  154. package/dist/Select.d.ts +28 -0
  155. package/dist/Select.js +19 -0
  156. package/dist/Show.d.ts +33 -0
  157. package/dist/Show.js +27 -0
  158. package/dist/SideColumn.d.ts +50 -0
  159. package/dist/SideColumn.js +45 -0
  160. package/dist/SidebarLayout.d.ts +32 -0
  161. package/dist/SidebarLayout.js +77 -0
  162. package/dist/SiteFooter.d.ts +31 -0
  163. package/dist/SiteFooter.js +24 -0
  164. package/dist/SiteSearch.d.ts +40 -0
  165. package/dist/SiteSearch.js +150 -0
  166. package/dist/SortableList.d.ts +86 -0
  167. package/dist/SortableList.js +191 -0
  168. package/dist/SplitBar.d.ts +29 -0
  169. package/dist/SplitBar.js +22 -0
  170. package/dist/Stack.d.ts +114 -0
  171. package/dist/Stack.js +76 -0
  172. package/dist/StackedBar.d.ts +64 -0
  173. package/dist/StackedBar.js +58 -0
  174. package/dist/StatTile.d.ts +33 -0
  175. package/dist/StatTile.js +44 -0
  176. package/dist/StatusPages.d.ts +49 -0
  177. package/dist/StatusPages.js +63 -0
  178. package/dist/Steps.d.ts +29 -0
  179. package/dist/Steps.js +43 -0
  180. package/dist/StickyBar.d.ts +12 -0
  181. package/dist/StickyBar.js +10 -0
  182. package/dist/Switch.d.ts +56 -0
  183. package/dist/Switch.js +91 -0
  184. package/dist/Table.d.ts +92 -0
  185. package/dist/Table.js +92 -0
  186. package/dist/TableCells.d.ts +97 -0
  187. package/dist/TableCells.js +104 -0
  188. package/dist/TableEditCell.d.ts +31 -0
  189. package/dist/TableEditCell.js +17 -0
  190. package/dist/TableExpandCell.d.ts +25 -0
  191. package/dist/TableExpandCell.js +15 -0
  192. package/dist/Tabs.d.ts +38 -0
  193. package/dist/Tabs.js +46 -0
  194. package/dist/TextLink.d.ts +51 -0
  195. package/dist/TextLink.js +38 -0
  196. package/dist/Textarea.d.ts +11 -0
  197. package/dist/Textarea.js +11 -0
  198. package/dist/Timeline.d.ts +31 -0
  199. package/dist/Timeline.js +38 -0
  200. package/dist/ToastRegion.d.ts +44 -0
  201. package/dist/ToastRegion.js +37 -0
  202. package/dist/Tooltip.d.ts +46 -0
  203. package/dist/Tooltip.js +181 -0
  204. package/dist/TrendChart.d.ts +36 -0
  205. package/dist/TrendChart.js +58 -0
  206. package/dist/Video.d.ts +13 -0
  207. package/dist/Video.js +9 -0
  208. package/dist/blocked.d.ts +31 -0
  209. package/dist/blocked.js +31 -0
  210. package/dist/cardContext.d.ts +8 -0
  211. package/dist/cardContext.js +14 -0
  212. package/dist/cardWait.d.ts +13 -0
  213. package/dist/cardWait.js +16 -0
  214. package/dist/colourScheme.d.ts +22 -0
  215. package/dist/colourScheme.js +53 -0
  216. package/dist/control.d.ts +29 -0
  217. package/dist/control.js +37 -0
  218. package/dist/copyScript.d.ts +13 -0
  219. package/dist/copyScript.js +13 -0
  220. package/dist/cx.d.ts +19 -0
  221. package/dist/cx.js +21 -0
  222. package/dist/density.d.ts +38 -0
  223. package/dist/density.js +77 -0
  224. package/dist/emptySlot.d.ts +11 -0
  225. package/dist/emptySlot.js +16 -0
  226. package/dist/fieldControl.d.ts +23 -0
  227. package/dist/fieldControl.js +24 -0
  228. package/dist/fieldWait.d.ts +30 -0
  229. package/dist/fieldWait.js +27 -0
  230. package/dist/foldedColumn.d.ts +18 -0
  231. package/dist/foldedColumn.js +51 -0
  232. package/dist/headingLevel.d.ts +10 -0
  233. package/dist/headingLevel.js +18 -0
  234. package/dist/highlight.d.ts +18 -0
  235. package/dist/highlight.js +306 -0
  236. package/dist/highlightConsole.d.ts +9 -0
  237. package/dist/highlightConsole.js +42 -0
  238. package/dist/highlightHtml.d.ts +7 -0
  239. package/dist/highlightHtml.js +132 -0
  240. package/dist/highlightKit.d.ts +16 -0
  241. package/dist/highlightKit.js +23 -0
  242. package/dist/highlightYaml.d.ts +3 -0
  243. package/dist/highlightYaml.js +143 -0
  244. package/dist/icons.d.ts +16 -0
  245. package/dist/icons.js +108 -0
  246. package/dist/index.d.ts +99 -0
  247. package/dist/index.js +92 -0
  248. package/dist/isoDate.d.ts +5 -0
  249. package/dist/isoDate.js +16 -0
  250. package/dist/labelWords.d.ts +20 -0
  251. package/dist/labelWords.js +28 -0
  252. package/dist/layoutWait.d.ts +15 -0
  253. package/dist/layoutWait.js +18 -0
  254. package/dist/link.d.ts +82 -0
  255. package/dist/link.js +68 -0
  256. package/dist/listRowProps.d.ts +108 -0
  257. package/dist/listRowProps.js +1 -0
  258. package/dist/listRowWait.d.ts +6 -0
  259. package/dist/listRowWait.js +14 -0
  260. package/dist/modal.d.ts +25 -0
  261. package/dist/modal.js +61 -0
  262. package/dist/navFold.d.ts +15 -0
  263. package/dist/navFold.js +46 -0
  264. package/dist/pillTip.d.ts +8 -0
  265. package/dist/pillTip.js +25 -0
  266. package/dist/props.d.ts +26 -0
  267. package/dist/props.js +14 -0
  268. package/dist/scrollEdges.d.ts +12 -0
  269. package/dist/scrollEdges.js +40 -0
  270. package/dist/scrollStop.d.ts +32 -0
  271. package/dist/scrollStop.js +79 -0
  272. package/dist/sheetSnap.d.ts +27 -0
  273. package/dist/sheetSnap.js +45 -0
  274. package/dist/shownDate.d.ts +88 -0
  275. package/dist/shownDate.js +186 -0
  276. package/dist/size.d.ts +45 -0
  277. package/dist/size.js +12 -0
  278. package/dist/skeleton.d.ts +83 -0
  279. package/dist/skeleton.js +88 -0
  280. package/dist/stackGap.d.ts +9 -0
  281. package/dist/stackGap.js +16 -0
  282. package/dist/stickyColumn.d.ts +38 -0
  283. package/dist/stickyColumn.js +38 -0
  284. package/dist/switcher.d.ts +93 -0
  285. package/dist/switcher.js +78 -0
  286. package/dist/tableColumns.d.ts +31 -0
  287. package/dist/tableColumns.js +72 -0
  288. package/dist/tableEmpty.d.ts +15 -0
  289. package/dist/tableEmpty.js +26 -0
  290. package/dist/tableRow.d.ts +67 -0
  291. package/dist/tableRow.js +49 -0
  292. package/dist/tableSort.d.ts +22 -0
  293. package/dist/tableSort.js +19 -0
  294. package/dist/textBox.d.ts +10 -0
  295. package/dist/textBox.js +23 -0
  296. package/dist/tone.d.ts +11 -0
  297. package/dist/tone.js +1 -0
  298. package/dist/trend.d.ts +26 -0
  299. package/dist/trend.js +64 -0
  300. package/dist/typography.d.ts +203 -0
  301. package/dist/typography.js +242 -0
  302. package/dist/useImageFailed.d.ts +19 -0
  303. package/dist/useImageFailed.js +21 -0
  304. package/package.json +84 -4
@@ -0,0 +1,132 @@
1
+ import { sticky } from "./highlightKit.js";
2
+ const OPEN = /<(\/?)([A-Za-z][\w:-]*)/y;
3
+ const DOCTYPE = /<!doctype\b[^>]*>?/iy;
4
+ const SPACE = /\s+/y;
5
+ const ATTR = /[^\s"'<>/=]+/y;
6
+ const UNQUOTED = /[^\s>"'=<`]+/y;
7
+ /** `>` or `/>` where the tag ends. */
8
+ function tagEnd(code, at) {
9
+ if (code.startsWith("/>", at))
10
+ return "/>";
11
+ return code.charAt(at) === ">" ? ">" : undefined;
12
+ }
13
+ /** The value after an `=`: a quoted string (which may span lines) or a bare run, which stays plain. */
14
+ function takeValue(scan) {
15
+ const { code, at } = scan;
16
+ const c = code.charAt(at);
17
+ if (c === '"' || c === "'") {
18
+ const close = code.indexOf(c, at + 1);
19
+ const end = close === -1 ? code.length : close + 1;
20
+ scan.emit("string", code.slice(at, end));
21
+ scan.at = end;
22
+ return true;
23
+ }
24
+ const bare = sticky(UNQUOTED, code, at);
25
+ if (bare === undefined)
26
+ return false;
27
+ scan.emit("plain", bare);
28
+ scan.at += bare.length;
29
+ return true;
30
+ }
31
+ /** One piece of a tag's insides: space, `=`, a value, an attribute name, or a stray character. */
32
+ function tagStep(scan) {
33
+ const { code, at } = scan;
34
+ const space = sticky(SPACE, code, at);
35
+ if (space !== undefined) {
36
+ scan.emit("plain", space);
37
+ scan.at += space.length;
38
+ return;
39
+ }
40
+ if (code.charAt(at) === "=") {
41
+ scan.emit("plain", "=");
42
+ scan.afterEquals = true;
43
+ scan.at += 1;
44
+ return;
45
+ }
46
+ const wasAfterEquals = scan.afterEquals;
47
+ scan.afterEquals = false;
48
+ if (wasAfterEquals && takeValue(scan))
49
+ return;
50
+ const name = sticky(ATTR, code, at);
51
+ scan.emit(name === undefined ? "plain" : "attr", name ?? code.charAt(at));
52
+ scan.at += name?.length ?? 1;
53
+ }
54
+ /** The rest of a tag from just past its name; says where it ended and how. */
55
+ function scanTag(code, from, emit) {
56
+ const scan = { code, emit, at: from, afterEquals: false };
57
+ while (scan.at < code.length) {
58
+ const end = tagEnd(code, scan.at);
59
+ if (end !== undefined) {
60
+ emit("plain", end);
61
+ return { end: scan.at + end.length, closed: true, selfClosed: end === "/>" };
62
+ }
63
+ tagStep(scan);
64
+ }
65
+ return { end: code.length, closed: false, selfClosed: false };
66
+ }
67
+ /** A comment (which may span lines) or a doctype at `at`: where it ends and its colour. */
68
+ function special(code, at) {
69
+ if (code.startsWith("<!--", at)) {
70
+ const close = code.indexOf("-->", at + 4);
71
+ return { end: close === -1 ? code.length : close + 3, kind: "comment" };
72
+ }
73
+ const doctype = sticky(DOCTYPE, code, at);
74
+ return doctype === undefined ? undefined : { end: at + doctype.length, kind: "keyword" };
75
+ }
76
+ /** The `<script>` or `<style>` start tag whose content is another language, if this is one. */
77
+ function rawOf(name, tag, embedded) {
78
+ if (!tag.closed || tag.selfClosed)
79
+ return undefined;
80
+ if (name === "script")
81
+ return { name, scan: embedded.script };
82
+ return name === "style" ? { name, scan: embedded.style } : undefined;
83
+ }
84
+ /** The content of a `<script>` or `<style>`, up to the first closing tag of that name, wherever it falls. */
85
+ function rawContent(code, at, raw, emit) {
86
+ const closing = new RegExp(`</${raw.name}(?=[\\s/>]|$)`, "gi");
87
+ closing.lastIndex = at;
88
+ const end = closing.exec(code)?.index ?? code.length;
89
+ raw.scan(code.slice(at, end), emit);
90
+ return end;
91
+ }
92
+ /** A tag at a `<`, or a lone `<` that opens nothing. Returns the index to carry on from. */
93
+ function scanElement(code, at, emit, embedded) {
94
+ OPEN.lastIndex = at;
95
+ const open = OPEN.exec(code);
96
+ if (open === null) {
97
+ emit("plain", "<");
98
+ return at + 1;
99
+ }
100
+ const [whole, slash = "", tagName = ""] = open;
101
+ emit("plain", `<${slash}`);
102
+ emit("tag", tagName);
103
+ const tag = scanTag(code, at + whole.length, emit);
104
+ const raw = slash === "" ? rawOf(tagName.toLowerCase(), tag, embedded) : undefined;
105
+ return raw === undefined ? tag.end : rawContent(code, tag.end, raw, emit);
106
+ }
107
+ /** Markup at a `<`: a comment, a doctype or a tag. Returns the index to carry on from. */
108
+ function scanMarkup(code, at, emit, embedded) {
109
+ const found = special(code, at);
110
+ if (found === undefined)
111
+ return scanElement(code, at, emit, embedded);
112
+ emit(found.kind, code.slice(at, found.end));
113
+ return found.end;
114
+ }
115
+ /**
116
+ * HTML: comments, the doctype, tags with their attributes (a start tag may span lines), and text,
117
+ * which is plain. The content of `<script>` and `<style>` runs to the first closing tag of that
118
+ * name, wherever it falls, and is scanned with `script` (JS) or `style` (CSS).
119
+ */
120
+ export function scanHtml(code, emit, script, style) {
121
+ let at = 0;
122
+ while (at < code.length) {
123
+ if (code.charAt(at) === "<") {
124
+ at = scanMarkup(code, at, emit, { script, style });
125
+ continue;
126
+ }
127
+ const next = code.indexOf("<", at);
128
+ const end = next === -1 ? code.length : next;
129
+ emit("plain", code.slice(at, end));
130
+ at = end;
131
+ }
132
+ }
@@ -0,0 +1,16 @@
1
+ /** The pieces the scanners in `highlight*.ts` share. */
2
+ export type TokenKind = "plain" | "comment" | "keyword" | "string" | "number" | "tag" | "attr" | "function" | "prompt";
3
+ export type Token = {
4
+ text: string;
5
+ kind: TokenKind;
6
+ };
7
+ export type Emit = (kind: TokenKind, text: string) => void;
8
+ /** A scanner for a whole run of code, given to a scanner of a language that holds another. */
9
+ export type Scanner = (code: string, emit: Emit) => void;
10
+ /** The text a sticky `pattern` matches at `at`, or `undefined`. */
11
+ export declare function sticky(pattern: RegExp, code: string, at: number): string | undefined;
12
+ /** Each line of `code` without its line break, and the break (`\n`, `\r\n` or nothing at the end). */
13
+ export declare function splitLines(code: string): {
14
+ body: string;
15
+ eol: string;
16
+ }[];
@@ -0,0 +1,23 @@
1
+ /** The pieces the scanners in `highlight*.ts` share. */
2
+ /** The text a sticky `pattern` matches at `at`, or `undefined`. */
3
+ export function sticky(pattern, code, at) {
4
+ pattern.lastIndex = at;
5
+ return pattern.exec(code)?.[0];
6
+ }
7
+ /** Each line of `code` without its line break, and the break (`\n`, `\r\n` or nothing at the end). */
8
+ export function splitLines(code) {
9
+ const out = [];
10
+ let at = 0;
11
+ for (;;) {
12
+ const newline = code.indexOf("\n", at);
13
+ const end = newline === -1 ? code.length : newline;
14
+ const bodyEnd = end > at && code.charAt(end - 1) === "\r" ? end - 1 : end;
15
+ out.push({
16
+ body: code.slice(at, bodyEnd),
17
+ eol: code.slice(bodyEnd, newline === -1 ? end : end + 1),
18
+ });
19
+ if (newline === -1)
20
+ return out;
21
+ at = newline + 1;
22
+ }
23
+ }
@@ -0,0 +1,3 @@
1
+ import type { Emit } from "./highlightKit.js";
2
+ /** Line by line. The lines of a block scalar are one plain run: no comment or key is read in them. */
3
+ export declare function scanYaml(code: string, emit: Emit): void;
@@ -0,0 +1,143 @@
1
+ import { splitLines, sticky } from "./highlightKit.js";
2
+ const YAML_MARKER = /-(?: +|$)/y;
3
+ const YAML_KEYWORDS = /^(?:true|false|null|~)$/;
4
+ const YAML_NUMBER = /^-?\d[\d._]*$/;
5
+ const YAML_BLOCK_HEADER = /^[|>](?:[1-9][-+]?|[-+][1-9]?)?$/;
6
+ /**
7
+ * The index past the quoted scalar at `at` in a YAML line, or `undefined`. A single-quoted scalar
8
+ * escapes a quote by doubling it (`'it''s'`), a double-quoted one with a backslash.
9
+ */
10
+ function quotedEnd(line, at) {
11
+ const quote = line.charAt(at);
12
+ if (quote !== '"' && quote !== "'")
13
+ return undefined;
14
+ let i = at + 1;
15
+ while (i < line.length) {
16
+ const c = line.charAt(i);
17
+ if (quote === '"' && c === "\\")
18
+ i += 2;
19
+ else if (c !== quote)
20
+ i += 1;
21
+ else if (quote === "'" && line.charAt(i + 1) === "'")
22
+ i += 2;
23
+ else
24
+ return i + 1;
25
+ }
26
+ return line.length;
27
+ }
28
+ /** What follows a quoted scalar: spaces, then perhaps a comment. */
29
+ function trailing(rest, emit) {
30
+ const comment = /^(\s+)(#.*)$/.exec(rest);
31
+ if (comment === null)
32
+ emit("plain", rest);
33
+ else {
34
+ emit("plain", comment[1] ?? "");
35
+ emit("comment", comment[2] ?? "");
36
+ }
37
+ }
38
+ /** A quoted key: the closing quote must be followed by `:` and a space or the line end. */
39
+ function quotedKey(line, at) {
40
+ const end = quotedEnd(line, at);
41
+ if (end === undefined || end - at < 2 || line.charAt(end - 1) !== line.charAt(at))
42
+ return undefined;
43
+ return /^:(?:\s|$)/.test(line.slice(end)) ? { end, kind: "string" } : undefined;
44
+ }
45
+ /** An unquoted key: the text up to the first `:` that is followed by a space or the line end. */
46
+ function plainKey(line, at) {
47
+ if ("#[{|>".includes(line.charAt(at)))
48
+ return undefined;
49
+ const colon = /:(?:\s|$)/.exec(line.slice(at));
50
+ if (colon === null || colon.index === 0)
51
+ return undefined;
52
+ const text = line.slice(at, at + colon.index);
53
+ if (/(?:^|\s)#/.test(text))
54
+ return undefined;
55
+ return { end: at + text.trimEnd().length, kind: "attr" };
56
+ }
57
+ /** The mapping key at `at`: where its text ends (before the `:`) and its colour. */
58
+ function keyAt(line, at) {
59
+ const first = line.charAt(at);
60
+ if (first === "")
61
+ return undefined;
62
+ return first === '"' || first === "'" ? quotedKey(line, at) : plainKey(line, at);
63
+ }
64
+ /** The colour of an unquoted scalar read whole. */
65
+ function scalarKind(scalar) {
66
+ if (YAML_NUMBER.test(scalar))
67
+ return "number";
68
+ return YAML_KEYWORDS.test(scalar) ? "keyword" : "plain";
69
+ }
70
+ /** A value: a quoted string, or an unquoted scalar up to a comment. True when it opens a block scalar. */
71
+ function emitValue(line, from, emit) {
72
+ const value = line.slice(from);
73
+ if (value === "")
74
+ return false;
75
+ if (value.startsWith("#")) {
76
+ emit("comment", value);
77
+ return false;
78
+ }
79
+ const quoted = quotedEnd(line, from);
80
+ if (quoted !== undefined) {
81
+ emit("string", line.slice(from, quoted));
82
+ trailing(line.slice(quoted), emit);
83
+ return false;
84
+ }
85
+ const comment = /\s#/.exec(value);
86
+ const scalar = line.slice(from, comment === null ? line.length : from + comment.index).trimEnd();
87
+ emit(scalarKind(scalar), scalar);
88
+ const commentAt = comment === null ? line.length : from + comment.index + 1;
89
+ emit("plain", line.slice(from + scalar.length, commentAt));
90
+ emit("comment", line.slice(commentAt));
91
+ return YAML_BLOCK_HEADER.test(scalar);
92
+ }
93
+ /** The `- ` markers from `at`: where the content starts, and the column of the last dash. */
94
+ function emitMarkers(line, at, emit) {
95
+ let column = at;
96
+ let next = at;
97
+ for (;;) {
98
+ const marker = sticky(YAML_MARKER, line, next);
99
+ if (marker === undefined)
100
+ return { at: next, column };
101
+ column = next;
102
+ emit("plain", marker);
103
+ next += marker.length;
104
+ }
105
+ }
106
+ /**
107
+ * One YAML line. Returns the column its block scalar's lines must be indented past, when it ends
108
+ * in `|` or `>`: the key's own column, after any `- ` markers (a key-less item uses its dash's).
109
+ */
110
+ function scanLine(line, emit) {
111
+ const indent = line.length - line.trimStart().length;
112
+ emit("plain", line.slice(0, indent));
113
+ if (line.charAt(indent) === "#") {
114
+ emit("comment", line.slice(indent));
115
+ return undefined;
116
+ }
117
+ const markers = emitMarkers(line, indent, emit);
118
+ let { at, column } = markers;
119
+ const key = keyAt(line, at);
120
+ if (key !== undefined) {
121
+ column = at;
122
+ emit(key.kind, line.slice(at, key.end));
123
+ const colon = line.indexOf(":", key.end);
124
+ emit("plain", line.slice(key.end, colon + 1));
125
+ at = colon + 1;
126
+ }
127
+ const gap = line.length - at - line.slice(at).trimStart().length;
128
+ emit("plain", line.slice(at, at + gap));
129
+ return emitValue(line, at + gap, emit) ? column : undefined;
130
+ }
131
+ /** Line by line. The lines of a block scalar are one plain run: no comment or key is read in them. */
132
+ export function scanYaml(code, emit) {
133
+ let block;
134
+ for (const { body, eol } of splitLines(code)) {
135
+ const indent = body.length - body.trimStart().length;
136
+ if (block !== undefined && (body.trim() === "" || indent > block)) {
137
+ emit("plain", body + eol);
138
+ continue;
139
+ }
140
+ block = scanLine(body, emit);
141
+ emit("plain", eol);
142
+ }
143
+ }
@@ -0,0 +1,16 @@
1
+ import type { ReactElement } from "react";
2
+ /**
3
+ * The icon set: one grammar, drawn here and nowhere else. Every icon sits on a 24-unit grid with
4
+ * two units of padding (its ink lives in 2..22), is drawn as an outline with a 1.5 stroke, round
5
+ * caps and round joins, and never fills: `GLYPH` below is the only place those are set, so an
6
+ * icon's own shapes carry no `fill`, `stroke` or `stroke-width` (`Icon.test.tsx` holds them to
7
+ * that). A name is the idea or action the icon stands for, not a product.
8
+ */
9
+ declare const NAMES: readonly ["diff", "baseline", "review", "ci", "self-host", "privacy", "capture", "branch", "theme", "speed", "search", "chevron-right", "chevron-down", "close", "external-link", "settings", "bell", "check", "plus", "more", "grid", "window", "type", "card", "pointer", "field", "table", "compass", "page", "briefcase"];
10
+ /** The names of the icon set: feature ideas, then UI glyphs, then the ideas the docs sections stand for. */
11
+ export type IconName = (typeof NAMES)[number];
12
+ /** The icon `name` as an `<svg>`: the set's one grid, stroke, caps and joins, drawn in `currentColor`. */
13
+ export declare function iconGlyph(name: IconName): ReactElement;
14
+ /** Every icon name, for tests. Not exported from the package. */
15
+ export declare const ICON_NAMES: readonly IconName[];
16
+ export {};
package/dist/icons.js ADDED
@@ -0,0 +1,108 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * The icon set: one grammar, drawn here and nowhere else. Every icon sits on a 24-unit grid with
4
+ * two units of padding (its ink lives in 2..22), is drawn as an outline with a 1.5 stroke, round
5
+ * caps and round joins, and never fills: `GLYPH` below is the only place those are set, so an
6
+ * icon's own shapes carry no `fill`, `stroke` or `stroke-width` (`Icon.test.tsx` holds them to
7
+ * that). A name is the idea or action the icon stands for, not a product.
8
+ */
9
+ const NAMES = [
10
+ "diff",
11
+ "baseline",
12
+ "review",
13
+ "ci",
14
+ "self-host",
15
+ "privacy",
16
+ "capture",
17
+ "branch",
18
+ "theme",
19
+ "speed",
20
+ "search",
21
+ "chevron-right",
22
+ "chevron-down",
23
+ "close",
24
+ "external-link",
25
+ "settings",
26
+ "bell",
27
+ "check",
28
+ "plus",
29
+ "more",
30
+ "grid",
31
+ "window",
32
+ "type",
33
+ "card",
34
+ "pointer",
35
+ "field",
36
+ "table",
37
+ "compass",
38
+ "page",
39
+ "briefcase",
40
+ ];
41
+ const GLYPHS = {
42
+ /** Before and after, side by side: a minus on the left, a plus on the right. */
43
+ diff: (_jsxs(_Fragment, { children: [_jsx("rect", { x: "3", y: "4.5", width: "18", height: "15", rx: "2.5" }), _jsx("path", { d: "M12 4.5v15M6.5 12h3M14.5 12h3M16 10.5v3" })] })),
44
+ /** The approved picture to compare against: a frame holding a sun over hills. */
45
+ baseline: (_jsxs(_Fragment, { children: [_jsx("rect", { x: "3", y: "4.5", width: "18", height: "15", rx: "2.5" }), _jsx("circle", { cx: "8.5", cy: "9.5", r: "1.5" }), _jsx("path", { d: "m3.5 17 5-4.5 3.5 3 3-2.5 5.5 4" })] })),
46
+ /** Looking something over: an eye. */
47
+ review: (_jsxs(_Fragment, { children: [_jsx("path", { d: "M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12Z" }), _jsx("circle", { cx: "12", cy: "12", r: "3" })] })),
48
+ /** A pipeline that comes round and passes: a loop with a tick in it. */
49
+ ci: (_jsxs(_Fragment, { children: [_jsx("path", { d: "M20 12a8 8 0 1 1-2.34-5.66M13.8 6.34h3.86V2.5" }), _jsx("path", { d: "m8.8 12.2 2.2 2.2 4.2-4.6" })] })),
50
+ /** Your own machine: two stacked servers with their lights. */
51
+ "self-host": (_jsxs(_Fragment, { children: [_jsx("rect", { x: "3", y: "4", width: "18", height: "6.5", rx: "2" }), _jsx("rect", { x: "3", y: "13.5", width: "18", height: "6.5", rx: "2" }), _jsx("path", { d: "M7 7.25h.01M7 16.75h.01M11 7.25h6M11 16.75h6" })] })),
52
+ /** Kept to yourself: a closed padlock. */
53
+ privacy: (_jsxs(_Fragment, { children: [_jsx("rect", { x: "4.5", y: "10.5", width: "15", height: "10", rx: "2.5" }), _jsx("path", { d: "M8 10.5V8a4 4 0 0 1 8 0v2.5M12 14.5v2" })] })),
54
+ /** Taking a screenshot: viewfinder corners round a lens. */
55
+ capture: (_jsxs(_Fragment, { children: [_jsx("path", { d: "M4 8V6.5A2.5 2.5 0 0 1 6.5 4H8M16 4h1.5A2.5 2.5 0 0 1 20 6.5V8M20 16v1.5a2.5 2.5 0 0 1-2.5 2.5H16M8 20H6.5A2.5 2.5 0 0 1 4 17.5V16" }), _jsx("circle", { cx: "12", cy: "12", r: "3.25" })] })),
56
+ /** A line of work that splits off and comes back: a branch joining its trunk. */
57
+ branch: (_jsxs(_Fragment, { children: [_jsx("circle", { cx: "6", cy: "5.5", r: "2.5" }), _jsx("circle", { cx: "6", cy: "18.5", r: "2.5" }), _jsx("circle", { cx: "18", cy: "8", r: "2.5" }), _jsx("path", { d: "M6 8v8M18 10.5c0 3.2-2.4 4.5-6 4.5H6" })] })),
58
+ /** The look of a site, which a theme swaps: a drop of colour. */
59
+ theme: (_jsx("path", { d: "M12 3.5S5.75 9.9 5.75 14.25a6.25 6.25 0 0 0 12.5 0C18.25 9.9 12 3.5 12 3.5ZM9 14.5a3 3 0 0 0 3 3" })),
60
+ /** Fast: a bolt. */
61
+ speed: _jsx("path", { d: "M13.25 3 5 13.5h6.25L10.75 21 19 10.5h-6.25Z" }),
62
+ /** Finding something: a magnifying glass, a circle with its handle to the lower right. */
63
+ search: (_jsxs(_Fragment, { children: [_jsx("circle", { cx: "10.5", cy: "10.5", r: "6.5" }), _jsx("path", { d: "M15.5 15.5 20.5 20.5" })] })),
64
+ /** A link or next step: an open chevron pointing right. */
65
+ "chevron-right": _jsx("path", { d: "m9 5.5 6.5 6.5L9 18.5" }),
66
+ /** A disclosure or menu: an open chevron pointing down. */
67
+ "chevron-down": _jsx("path", { d: "m5.5 9 6.5 6.5L18.5 9" }),
68
+ /** Dismiss: two strokes crossing in an X. */
69
+ close: _jsx("path", { d: "m5.5 5.5 13 13M18.5 5.5l-13 13" }),
70
+ /** Leaves the site: a box open at its top right, with an arrow out to the top right. */
71
+ "external-link": (_jsxs(_Fragment, { children: [_jsx("path", { d: "M10.5 6H7a3 3 0 0 0-3 3v8a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3v-3.5" }), _jsx("path", { d: "M14 4h6v6M20 4l-9.5 9.5" })] })),
72
+ /** Preferences: a cog, a ring of teeth round a hole. */
73
+ settings: (_jsxs(_Fragment, { children: [_jsx("path", { d: "M10.59 5.35L10.75 3.09L13.25 3.09L13.41 5.35A6.8 6.8 0 0 1 15.7 6.3L17.42 4.81L19.19 6.58L17.7 8.3A6.8 6.8 0 0 1 18.65 10.59L20.91 10.75L20.91 13.25L18.65 13.41A6.8 6.8 0 0 1 17.7 15.7L19.19 17.42L17.42 19.19L15.7 17.7A6.8 6.8 0 0 1 13.41 18.65L13.25 20.91L10.75 20.91L10.59 18.65A6.8 6.8 0 0 1 8.3 17.7L6.58 19.19L4.81 17.42L6.3 15.7A6.8 6.8 0 0 1 5.35 13.41L3.09 13.25L3.09 10.75L5.35 10.59A6.8 6.8 0 0 1 6.3 8.3L4.81 6.58L6.58 4.81L8.3 6.3A6.8 6.8 0 0 1 10.59 5.35Z" }), _jsx("circle", { cx: "12", cy: "12", r: "2.75" })] })),
74
+ /** Notifications: a bell with its clapper. */
75
+ bell: (_jsxs(_Fragment, { children: [_jsx("path", { d: "M6 9.5a6 6 0 0 1 12 0c0 5 2 6.5 2 6.5H4s2-1.5 2-6.5Z" }), _jsx("path", { d: "M10 19.5a2.2 2.2 0 0 0 4 0" })] })),
76
+ /** Done or selected: a single tick. */
77
+ check: _jsx("path", { d: "m4.5 12.5 5 5L19.5 7" }),
78
+ /** Add or create: two strokes crossing, upright. */
79
+ plus: _jsx("path", { d: "M12 5v14M5 12h14" }),
80
+ /** More actions behind a menu: three dots in a row. */
81
+ more: (_jsxs(_Fragment, { children: [_jsx("circle", { cx: "5.5", cy: "12", r: "1" }), _jsx("circle", { cx: "12", cy: "12", r: "1" }), _jsx("circle", { cx: "18.5", cy: "12", r: "1" })] })),
82
+ /** Things laid out in a grid: four tiles. */
83
+ grid: (_jsxs(_Fragment, { children: [_jsx("rect", { x: "3.5", y: "3.5", width: "7", height: "7", rx: "1.5" }), _jsx("rect", { x: "13.5", y: "3.5", width: "7", height: "7", rx: "1.5" }), _jsx("rect", { x: "3.5", y: "13.5", width: "7", height: "7", rx: "1.5" }), _jsx("rect", { x: "13.5", y: "13.5", width: "7", height: "7", rx: "1.5" })] })),
84
+ /** A whole page's frame: a window with a title bar and a panel down the side. */
85
+ window: (_jsxs(_Fragment, { children: [_jsx("rect", { x: "3", y: "4.5", width: "18", height: "15", rx: "2.5" }), _jsx("path", { d: "M3 9h18M9.5 9v10.5M6.5 6.75h.01M9 6.75h.01" })] })),
86
+ /** Text and its styles: a capital T. */
87
+ type: _jsx("path", { d: "M5.5 7V5h13v2M12 5v14M9 19h6" }),
88
+ /** A unit of content: a card with a title line and lines of body. */
89
+ card: (_jsxs(_Fragment, { children: [_jsx("rect", { x: "3", y: "4.5", width: "18", height: "15", rx: "2.5" }), _jsx("path", { d: "M7 9h5M7 12.5h10M7 15.75h7" })] })),
90
+ /** Something to press: a pointer arrow. */
91
+ pointer: _jsx("path", { d: "M7 4.5v13.2l3.3-3.1 2.4 5 2.2-1-2.3-4.9h4.6Z" }),
92
+ /** Something to type in: a text field with its text and caret. */
93
+ field: (_jsxs(_Fragment, { children: [_jsx("rect", { x: "3", y: "7.5", width: "18", height: "9", rx: "2.5" }), _jsx("path", { d: "M7 12h4M13.5 9.5v5" })] })),
94
+ /** Rows and columns of data: a table with a header row and a first column. */
95
+ table: (_jsxs(_Fragment, { children: [_jsx("rect", { x: "3", y: "4.5", width: "18", height: "15", rx: "2.5" }), _jsx("path", { d: "M3 9.5h18M3 14.5h18M9.5 9.5v10" })] })),
96
+ /** Finding your way around: a compass with its needle. */
97
+ compass: (_jsxs(_Fragment, { children: [_jsx("circle", { cx: "12", cy: "12", r: "9" }), _jsx("path", { d: "m15.5 8.5-2 5-5 2 2-5Z" })] })),
98
+ /** A whole page of its own: a sheet with a folded corner and lines of text. */
99
+ page: (_jsxs(_Fragment, { children: [_jsx("path", { d: "M7.5 3H14l5 5v10.5a2.5 2.5 0 0 1-2.5 2.5h-9A2.5 2.5 0 0 1 5 18.5v-13A2.5 2.5 0 0 1 7.5 3Z" }), _jsx("path", { d: "M14 3v3.5A1.5 1.5 0 0 0 15.5 8H19M9 13h6M9 16.5h6" })] })),
100
+ /** Work for hire: a briefcase with its handle and clasp. */
101
+ briefcase: (_jsxs(_Fragment, { children: [_jsx("rect", { x: "3", y: "7.5", width: "18", height: "12", rx: "2.5" }), _jsx("path", { d: "M8.5 7.5V6a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v1.5M3 13h18M12 12v2.5" })] })),
102
+ };
103
+ /** The icon `name` as an `<svg>`: the set's one grid, stroke, caps and joins, drawn in `currentColor`. */
104
+ export function iconGlyph(name) {
105
+ return (_jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: GLYPHS[name] }));
106
+ }
107
+ /** Every icon name, for tests. Not exported from the package. */
108
+ export const ICON_NAMES = NAMES;
@@ -0,0 +1,99 @@
1
+ export { Card } from "./Card.js";
2
+ export { Pill, type PillTone } from "./Pill.js";
3
+ export { Badge } from "./Badge.js";
4
+ export { StatTile, type StatTileTone } from "./StatTile.js";
5
+ export { ProgressBar, type BarSize, type BarTone } from "./ProgressBar.js";
6
+ export { SplitBar } from "./SplitBar.js";
7
+ export { Legend, StackedBar, type LegendItem, type StackedSegment, type VizTone, } from "./StackedBar.js";
8
+ export { TrendChart, type TrendSeries } from "./TrendChart.js";
9
+ export { Markdown } from "./Markdown.js";
10
+ export { AppShell, AppShellBrand, type AppShellDensity, appShellRootClassFor } from "./AppShell.js";
11
+ export { SiteFooter, type SiteFooterLink } from "./SiteFooter.js";
12
+ export { Container } from "./Container.js";
13
+ export { PageHeader } from "./PageHeader.js";
14
+ export { Hero } from "./Hero.js";
15
+ export { CardGrid, CenteredLayout, DetailLayout, FormLayout, FullBleedLayout, ListLayout, ProseLayout, } from "./PageLayouts.js";
16
+ export { SidebarLayout } from "./SidebarLayout.js";
17
+ export { DocsLayout, type DocsHeading, type DocsNavGroup, type DocsNeighbour, } from "./DocsLayout.js";
18
+ export { SideColumn, type SideColumnWidth } from "./SideColumn.js";
19
+ export { StickyBar } from "./StickyBar.js";
20
+ export { ErrorPage, Forbidden, Maintenance, NotFound, Offline } from "./StatusPages.js";
21
+ export { Cluster, ClusterGrow, type ClusterAlign, type ClusterGrowMinWidth, type ClusterGap, type ClusterJustify, } from "./Cluster.js";
22
+ export { Section, type SectionSize } from "./Section.js";
23
+ export { Stack, type StackAlign, type StackGap, type StackRowFrom, type StackWidth, } from "./Stack.js";
24
+ export { Show, type Breakpoint } from "./Show.js";
25
+ export { Button, type ButtonSize, type ButtonTone, type ButtonVariant } from "./Button.js";
26
+ export { ButtonGroup } from "./ButtonGroup.js";
27
+ export { type LinkAdapter, type LinkAdapterProps, LinkProvider } from "./link.js";
28
+ export { Avatar, type AvatarShape, type AvatarSize } from "./Avatar.js";
29
+ export { AvatarStack, type AvatarStackPerson } from "./AvatarStack.js";
30
+ export { Breadcrumbs, type Crumb } from "./Breadcrumbs.js";
31
+ export { Pagination } from "./Pagination.js";
32
+ export { BulletItem, BulletList } from "./BulletList.js";
33
+ export { Callout } from "./Callout.js";
34
+ export { ToastRegion, type Toast } from "./ToastRegion.js";
35
+ export { ListRow } from "./ListRow.js";
36
+ export { SortableItem, SortableList, type SortableMove, SortableSection } from "./SortableList.js";
37
+ export { OutlineRegion, RegionFrame, type RegionRect } from "./OutlineRegion.js";
38
+ export { type CellTone, Table, TableBody, TableCell, TableFoot, TableGroupRow, TableHead, TableExpandCell, TableHeaderCell, TableRow, type TableSort, } from "./Table.js";
39
+ export type { RowTone } from "./tableRow.js";
40
+ export { InlineEdit } from "./InlineEdit.js";
41
+ export { TableEditCell } from "./TableEditCell.js";
42
+ export { EmptyState } from "./EmptyState.js";
43
+ export { Step, Steps, type StepsSize } from "./Steps.js";
44
+ export { Timeline, TimelineItem } from "./Timeline.js";
45
+ export { ChatComposer } from "./ChatComposer.js";
46
+ export { ChatMessage } from "./ChatMessage.js";
47
+ export { ChatThread } from "./ChatThread.js";
48
+ export { Code } from "./Code.js";
49
+ export { CodeBlock } from "./CodeBlock.js";
50
+ export type { CodeLanguage } from "./highlight.js";
51
+ export { CodeExample } from "./CodeExample.js";
52
+ export { Disclosure } from "./Disclosure.js";
53
+ export { Divider } from "./Divider.js";
54
+ export { PageFade, startPageTransition } from "./PageFade.js";
55
+ export { Morph, refreshMorphs } from "./Morph.js";
56
+ export { NavigationProgress } from "./NavigationProgress.js";
57
+ export { Dialog } from "./Dialog.js";
58
+ export { SiteSearch, type SiteSearchItem } from "./SiteSearch.js";
59
+ export { Drawer } from "./Drawer.js";
60
+ export { BottomSheet, type BottomSheetSnap } from "./BottomSheet.js";
61
+ export { Lightbox } from "./Lightbox.js";
62
+ export { Icon } from "./Icon.js";
63
+ export type { IconName } from "./icons.js";
64
+ export { IconButton, type IconButtonTone, type IconButtonVariant } from "./IconButton.js";
65
+ export { Menu, type MenuAction } from "./Menu.js";
66
+ export { ColourSchemeToggle } from "./ColourSchemeToggle.js";
67
+ export { applyColourScheme, schemeClass, type ColourSchemeClasses, colourSchemeScript, readColourScheme, storeColourScheme, type ColourScheme, } from "./colourScheme.js";
68
+ export { Tabs, type Tab } from "./Tabs.js";
69
+ export { SegmentedControl, type Segment } from "./SegmentedControl.js";
70
+ export { Fieldset } from "./Fieldset.js";
71
+ export { Checkbox } from "./Checkbox.js";
72
+ export { Switch } from "./Switch.js";
73
+ export { Radio, RadioGroup } from "./RadioGroup.js";
74
+ export { FileDrop } from "./FileDrop.js";
75
+ export { CopyButton } from "./CopyButton.js";
76
+ export { copyScript } from "./copyScript.js";
77
+ export { CopyLine } from "./CopyLine.js";
78
+ export { Field } from "./Field.js";
79
+ export { FormGrid, FormRow, FormRowField, type FormRowSpan } from "./FormRow.js";
80
+ export { FieldDialog } from "./FieldDialog.js";
81
+ export { Input } from "./Input.js";
82
+ export type { ControlSize, ControlWidth } from "./control.js";
83
+ export type { ResponsiveSize, Size } from "./size.js";
84
+ export type { Tone } from "./tone.js";
85
+ export { MetaList, type MetaListSeparator } from "./MetaList.js";
86
+ export { Kbd } from "./Kbd.js";
87
+ export { KeyValue, KeyValueList } from "./KeyValueList.js";
88
+ export { Select } from "./Select.js";
89
+ export { Textarea } from "./Textarea.js";
90
+ export { Video } from "./Video.js";
91
+ export { Image, type ImageAspect, type ImageWidth } from "./Image.js";
92
+ export { MediaTile } from "./MediaTile.js";
93
+ export { ScrollStrip } from "./ScrollStrip.js";
94
+ export { TextLink, type TextLinkSize } from "./TextLink.js";
95
+ export { Caption, Display, Lead, Overline, PageHeading, Prose, SectionHeading, SubsectionHeading, type SubsectionHeadingSize, Text, type TextAlign, type TextLines, type TextMinWidth, type TextTone, } from "./typography.js";
96
+ export { DateField } from "./DateField.js";
97
+ export { DateRangePicker, type DateRange, type DateRangePreset } from "./DateRangePicker.js";
98
+ export { fromISODate, toISODate } from "./isoDate.js";
99
+ export type { CalendarDate } from "@internationalized/date";
package/dist/index.js ADDED
@@ -0,0 +1,92 @@
1
+ export { Card } from "./Card.js";
2
+ export { Pill } from "./Pill.js";
3
+ export { Badge } from "./Badge.js";
4
+ export { StatTile } from "./StatTile.js";
5
+ export { ProgressBar } from "./ProgressBar.js";
6
+ export { SplitBar } from "./SplitBar.js";
7
+ export { Legend, StackedBar, } from "./StackedBar.js";
8
+ export { TrendChart } from "./TrendChart.js";
9
+ export { Markdown } from "./Markdown.js";
10
+ export { AppShell, AppShellBrand, appShellRootClassFor } from "./AppShell.js";
11
+ export { SiteFooter } from "./SiteFooter.js";
12
+ export { Container } from "./Container.js";
13
+ export { PageHeader } from "./PageHeader.js";
14
+ export { Hero } from "./Hero.js";
15
+ export { CardGrid, CenteredLayout, DetailLayout, FormLayout, FullBleedLayout, ListLayout, ProseLayout, } from "./PageLayouts.js";
16
+ export { SidebarLayout } from "./SidebarLayout.js";
17
+ export { DocsLayout, } from "./DocsLayout.js";
18
+ export { SideColumn } from "./SideColumn.js";
19
+ export { StickyBar } from "./StickyBar.js";
20
+ export { ErrorPage, Forbidden, Maintenance, NotFound, Offline } from "./StatusPages.js";
21
+ export { Cluster, ClusterGrow, } from "./Cluster.js";
22
+ export { Section } from "./Section.js";
23
+ export { Stack, } from "./Stack.js";
24
+ export { Show } from "./Show.js";
25
+ export { Button } from "./Button.js";
26
+ export { ButtonGroup } from "./ButtonGroup.js";
27
+ export { LinkProvider } from "./link.js";
28
+ export { Avatar } from "./Avatar.js";
29
+ export { AvatarStack } from "./AvatarStack.js";
30
+ export { Breadcrumbs } from "./Breadcrumbs.js";
31
+ export { Pagination } from "./Pagination.js";
32
+ export { BulletItem, BulletList } from "./BulletList.js";
33
+ export { Callout } from "./Callout.js";
34
+ export { ToastRegion } from "./ToastRegion.js";
35
+ export { ListRow } from "./ListRow.js";
36
+ export { SortableItem, SortableList, SortableSection } from "./SortableList.js";
37
+ export { OutlineRegion, RegionFrame } from "./OutlineRegion.js";
38
+ export { Table, TableBody, TableCell, TableFoot, TableGroupRow, TableHead, TableExpandCell, TableHeaderCell, TableRow, } from "./Table.js";
39
+ export { InlineEdit } from "./InlineEdit.js";
40
+ export { TableEditCell } from "./TableEditCell.js";
41
+ export { EmptyState } from "./EmptyState.js";
42
+ export { Step, Steps } from "./Steps.js";
43
+ export { Timeline, TimelineItem } from "./Timeline.js";
44
+ export { ChatComposer } from "./ChatComposer.js";
45
+ export { ChatMessage } from "./ChatMessage.js";
46
+ export { ChatThread } from "./ChatThread.js";
47
+ export { Code } from "./Code.js";
48
+ export { CodeBlock } from "./CodeBlock.js";
49
+ export { CodeExample } from "./CodeExample.js";
50
+ export { Disclosure } from "./Disclosure.js";
51
+ export { Divider } from "./Divider.js";
52
+ export { PageFade, startPageTransition } from "./PageFade.js";
53
+ export { Morph, refreshMorphs } from "./Morph.js";
54
+ export { NavigationProgress } from "./NavigationProgress.js";
55
+ export { Dialog } from "./Dialog.js";
56
+ export { SiteSearch } from "./SiteSearch.js";
57
+ export { Drawer } from "./Drawer.js";
58
+ export { BottomSheet } from "./BottomSheet.js";
59
+ export { Lightbox } from "./Lightbox.js";
60
+ export { Icon } from "./Icon.js";
61
+ export { IconButton } from "./IconButton.js";
62
+ export { Menu } from "./Menu.js";
63
+ export { ColourSchemeToggle } from "./ColourSchemeToggle.js";
64
+ export { applyColourScheme, schemeClass, colourSchemeScript, readColourScheme, storeColourScheme, } from "./colourScheme.js";
65
+ export { Tabs } from "./Tabs.js";
66
+ export { SegmentedControl } from "./SegmentedControl.js";
67
+ export { Fieldset } from "./Fieldset.js";
68
+ export { Checkbox } from "./Checkbox.js";
69
+ export { Switch } from "./Switch.js";
70
+ export { Radio, RadioGroup } from "./RadioGroup.js";
71
+ export { FileDrop } from "./FileDrop.js";
72
+ export { CopyButton } from "./CopyButton.js";
73
+ export { copyScript } from "./copyScript.js";
74
+ export { CopyLine } from "./CopyLine.js";
75
+ export { Field } from "./Field.js";
76
+ export { FormGrid, FormRow, FormRowField } from "./FormRow.js";
77
+ export { FieldDialog } from "./FieldDialog.js";
78
+ export { Input } from "./Input.js";
79
+ export { MetaList } from "./MetaList.js";
80
+ export { Kbd } from "./Kbd.js";
81
+ export { KeyValue, KeyValueList } from "./KeyValueList.js";
82
+ export { Select } from "./Select.js";
83
+ export { Textarea } from "./Textarea.js";
84
+ export { Video } from "./Video.js";
85
+ export { Image } from "./Image.js";
86
+ export { MediaTile } from "./MediaTile.js";
87
+ export { ScrollStrip } from "./ScrollStrip.js";
88
+ export { TextLink } from "./TextLink.js";
89
+ export { Caption, Display, Lead, Overline, PageHeading, Prose, SectionHeading, SubsectionHeading, Text, } from "./typography.js";
90
+ export { DateField } from "./DateField.js";
91
+ export { DateRangePicker } from "./DateRangePicker.js";
92
+ export { fromISODate, toISODate } from "./isoDate.js";
@@ -0,0 +1,5 @@
1
+ import { CalendarDate } from "@internationalized/date";
2
+ /** `"1990-05-17"` for `CalendarDate(1990, 5, 17)`; `""` for no date, so it drops into a form field. */
3
+ export declare function toISODate(date: CalendarDate | null | undefined): string;
4
+ /** The `CalendarDate` of a `"YYYY-MM-DD"` string; `null` for an empty, malformed or impossible one. */
5
+ export declare function fromISODate(iso: string | null | undefined): CalendarDate | null;