@velocity-astro/cms-ui 0.1.0-beta.1 → 0.1.0-beta.11

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 (256) hide show
  1. package/component-registry.json +93 -8
  2. package/dist/components/BarChart/BarChart.d.ts +23 -0
  3. package/dist/components/BarChart/BarChart.d.ts.map +1 -0
  4. package/dist/components/BarChart/BarChart.js +19 -0
  5. package/dist/components/BarChart/BarChart.js.map +1 -0
  6. package/dist/components/BarChart/BarChart.variants.d.ts +29 -0
  7. package/dist/components/BarChart/BarChart.variants.d.ts.map +1 -0
  8. package/dist/components/BarChart/BarChart.variants.js +81 -0
  9. package/dist/components/BarChart/BarChart.variants.js.map +1 -0
  10. package/dist/components/BarChart/index.d.ts +2 -0
  11. package/dist/components/BarChart/index.d.ts.map +1 -0
  12. package/dist/components/BarChart/index.js +2 -0
  13. package/dist/components/BarChart/index.js.map +1 -0
  14. package/dist/components/Button/Button.d.ts +6 -1
  15. package/dist/components/Button/Button.d.ts.map +1 -1
  16. package/dist/components/Button/Button.js +5 -3
  17. package/dist/components/Button/Button.js.map +1 -1
  18. package/dist/components/Button/Button.variants.d.ts +6 -1
  19. package/dist/components/Button/Button.variants.d.ts.map +1 -1
  20. package/dist/components/Button/Button.variants.js +13 -1
  21. package/dist/components/Button/Button.variants.js.map +1 -1
  22. package/dist/components/Card/Card.d.ts +3 -1
  23. package/dist/components/Card/Card.d.ts.map +1 -1
  24. package/dist/components/Card/Card.js +3 -3
  25. package/dist/components/Card/Card.js.map +1 -1
  26. package/dist/components/Card/Card.variants.d.ts +4 -1
  27. package/dist/components/Card/Card.variants.d.ts.map +1 -1
  28. package/dist/components/Card/Card.variants.js +6 -1
  29. package/dist/components/Card/Card.variants.js.map +1 -1
  30. package/dist/components/ColorPicker/ColorPicker.d.ts +30 -0
  31. package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -0
  32. package/dist/components/ColorPicker/ColorPicker.js +32 -0
  33. package/dist/components/ColorPicker/ColorPicker.js.map +1 -0
  34. package/dist/components/ColorPicker/ColorPicker.variants.d.ts +24 -0
  35. package/dist/components/ColorPicker/ColorPicker.variants.d.ts.map +1 -0
  36. package/dist/components/ColorPicker/ColorPicker.variants.js +42 -0
  37. package/dist/components/ColorPicker/ColorPicker.variants.js.map +1 -0
  38. package/dist/components/ColorPicker/index.d.ts +2 -0
  39. package/dist/components/ColorPicker/index.d.ts.map +1 -0
  40. package/dist/components/ColorPicker/index.js +2 -0
  41. package/dist/components/ColorPicker/index.js.map +1 -0
  42. package/dist/components/FileButton/FileButton.d.ts +3 -1
  43. package/dist/components/FileButton/FileButton.d.ts.map +1 -1
  44. package/dist/components/FileButton/FileButton.js +2 -2
  45. package/dist/components/FileButton/FileButton.js.map +1 -1
  46. package/dist/components/Grid/Grid.variants.d.ts +1 -0
  47. package/dist/components/Grid/Grid.variants.d.ts.map +1 -1
  48. package/dist/components/Grid/Grid.variants.js +4 -3
  49. package/dist/components/Grid/Grid.variants.js.map +1 -1
  50. package/dist/components/Heading/Heading.d.ts +1 -1
  51. package/dist/components/Heading/Heading.d.ts.map +1 -1
  52. package/dist/components/Heading/Heading.js +2 -2
  53. package/dist/components/Heading/Heading.js.map +1 -1
  54. package/dist/components/Heading/Heading.variants.d.ts +1 -0
  55. package/dist/components/Heading/Heading.variants.d.ts.map +1 -1
  56. package/dist/components/Heading/Heading.variants.js +2 -0
  57. package/dist/components/Heading/Heading.variants.js.map +1 -1
  58. package/dist/components/LoadingMark/LoadingMark.d.ts +11 -0
  59. package/dist/components/LoadingMark/LoadingMark.d.ts.map +1 -0
  60. package/dist/components/LoadingMark/LoadingMark.js +17 -0
  61. package/dist/components/LoadingMark/LoadingMark.js.map +1 -0
  62. package/dist/components/LoadingMark/LoadingMark.variants.d.ts +22 -0
  63. package/dist/components/LoadingMark/LoadingMark.variants.d.ts.map +1 -0
  64. package/dist/components/LoadingMark/LoadingMark.variants.js +18 -0
  65. package/dist/components/LoadingMark/LoadingMark.variants.js.map +1 -0
  66. package/dist/components/LoadingMark/index.d.ts +2 -0
  67. package/dist/components/LoadingMark/index.d.ts.map +1 -0
  68. package/dist/components/LoadingMark/index.js +2 -0
  69. package/dist/components/LoadingMark/index.js.map +1 -0
  70. package/dist/components/Logo/Logo.d.ts +10 -2
  71. package/dist/components/Logo/Logo.d.ts.map +1 -1
  72. package/dist/components/Logo/Logo.js +11 -3
  73. package/dist/components/Logo/Logo.js.map +1 -1
  74. package/dist/components/Logo/Logo.variants.d.ts +5 -2
  75. package/dist/components/Logo/Logo.variants.d.ts.map +1 -1
  76. package/dist/components/Logo/Logo.variants.js +10 -1
  77. package/dist/components/Logo/Logo.variants.js.map +1 -1
  78. package/dist/components/Meter/Meter.d.ts +13 -0
  79. package/dist/components/Meter/Meter.d.ts.map +1 -0
  80. package/dist/components/Meter/Meter.js +8 -0
  81. package/dist/components/Meter/Meter.js.map +1 -0
  82. package/dist/components/Meter/Meter.variants.d.ts +14 -0
  83. package/dist/components/Meter/Meter.variants.d.ts.map +1 -0
  84. package/dist/components/Meter/Meter.variants.js +39 -0
  85. package/dist/components/Meter/Meter.variants.js.map +1 -0
  86. package/dist/components/Meter/index.d.ts +2 -0
  87. package/dist/components/Meter/index.d.ts.map +1 -0
  88. package/dist/components/Meter/index.js +2 -0
  89. package/dist/components/Meter/index.js.map +1 -0
  90. package/dist/components/Segmented/Segmented.d.ts +14 -1
  91. package/dist/components/Segmented/Segmented.d.ts.map +1 -1
  92. package/dist/components/Segmented/Segmented.js +14 -5
  93. package/dist/components/Segmented/Segmented.js.map +1 -1
  94. package/dist/components/Segmented/Segmented.variants.d.ts +14 -1
  95. package/dist/components/Segmented/Segmented.variants.d.ts.map +1 -1
  96. package/dist/components/Segmented/Segmented.variants.js +19 -3
  97. package/dist/components/Segmented/Segmented.variants.js.map +1 -1
  98. package/dist/components/Spotlight/Spotlight.d.ts +16 -0
  99. package/dist/components/Spotlight/Spotlight.d.ts.map +1 -0
  100. package/dist/components/Spotlight/Spotlight.js +28 -0
  101. package/dist/components/Spotlight/Spotlight.js.map +1 -0
  102. package/dist/components/Spotlight/Spotlight.variants.d.ts +8 -0
  103. package/dist/components/Spotlight/Spotlight.variants.d.ts.map +1 -0
  104. package/dist/components/Spotlight/Spotlight.variants.js +15 -0
  105. package/dist/components/Spotlight/Spotlight.variants.js.map +1 -0
  106. package/dist/components/Spotlight/index.d.ts +2 -0
  107. package/dist/components/Spotlight/index.d.ts.map +1 -0
  108. package/dist/components/Spotlight/index.js +2 -0
  109. package/dist/components/Spotlight/index.js.map +1 -0
  110. package/dist/components/Table/Table.d.ts +8 -1
  111. package/dist/components/Table/Table.d.ts.map +1 -1
  112. package/dist/components/Table/Table.js +4 -4
  113. package/dist/components/Table/Table.js.map +1 -1
  114. package/dist/components/Table/Table.variants.d.ts +6 -2
  115. package/dist/components/Table/Table.variants.d.ts.map +1 -1
  116. package/dist/components/Table/Table.variants.js +11 -5
  117. package/dist/components/Table/Table.variants.js.map +1 -1
  118. package/dist/components/index.d.ts +5 -0
  119. package/dist/components/index.d.ts.map +1 -1
  120. package/dist/components/index.js +5 -0
  121. package/dist/components/index.js.map +1 -1
  122. package/dist/components/scales.d.ts +2 -2
  123. package/dist/components/scales.d.ts.map +1 -1
  124. package/dist/components/scales.js +4 -2
  125. package/dist/components/scales.js.map +1 -1
  126. package/dist/patterns/AppShell/AppShell.d.ts +33 -8
  127. package/dist/patterns/AppShell/AppShell.d.ts.map +1 -1
  128. package/dist/patterns/AppShell/AppShell.js +39 -7
  129. package/dist/patterns/AppShell/AppShell.js.map +1 -1
  130. package/dist/patterns/AppShell/AppShell.variants.d.ts +72 -20
  131. package/dist/patterns/AppShell/AppShell.variants.d.ts.map +1 -1
  132. package/dist/patterns/AppShell/AppShell.variants.js +118 -23
  133. package/dist/patterns/AppShell/AppShell.variants.js.map +1 -1
  134. package/dist/patterns/AppShell/index.d.ts +1 -1
  135. package/dist/patterns/AppShell/index.d.ts.map +1 -1
  136. package/dist/patterns/AppShell/index.js.map +1 -1
  137. package/dist/patterns/CommandPalette/CommandPalette.d.ts +36 -0
  138. package/dist/patterns/CommandPalette/CommandPalette.d.ts.map +1 -0
  139. package/dist/patterns/CommandPalette/CommandPalette.js +18 -0
  140. package/dist/patterns/CommandPalette/CommandPalette.js.map +1 -0
  141. package/dist/patterns/CommandPalette/CommandPalette.variants.d.ts +18 -0
  142. package/dist/patterns/CommandPalette/CommandPalette.variants.d.ts.map +1 -0
  143. package/dist/patterns/CommandPalette/CommandPalette.variants.js +21 -0
  144. package/dist/patterns/CommandPalette/CommandPalette.variants.js.map +1 -0
  145. package/dist/patterns/CommandPalette/index.d.ts +2 -0
  146. package/dist/patterns/CommandPalette/index.d.ts.map +1 -0
  147. package/dist/patterns/CommandPalette/index.js +2 -0
  148. package/dist/patterns/CommandPalette/index.js.map +1 -0
  149. package/dist/patterns/ImagePicker/ImagePicker.d.ts +9 -1
  150. package/dist/patterns/ImagePicker/ImagePicker.d.ts.map +1 -1
  151. package/dist/patterns/ImagePicker/ImagePicker.js +13 -8
  152. package/dist/patterns/ImagePicker/ImagePicker.js.map +1 -1
  153. package/dist/patterns/OptionPicker/OptionPicker.d.ts +2 -0
  154. package/dist/patterns/OptionPicker/OptionPicker.d.ts.map +1 -1
  155. package/dist/patterns/OptionPicker/OptionPicker.js +8 -3
  156. package/dist/patterns/OptionPicker/OptionPicker.js.map +1 -1
  157. package/dist/patterns/OptionPicker/OptionPicker.variants.d.ts +10 -4
  158. package/dist/patterns/OptionPicker/OptionPicker.variants.d.ts.map +1 -1
  159. package/dist/patterns/OptionPicker/OptionPicker.variants.js +29 -6
  160. package/dist/patterns/OptionPicker/OptionPicker.variants.js.map +1 -1
  161. package/dist/patterns/Outline/Outline.d.ts +26 -0
  162. package/dist/patterns/Outline/Outline.d.ts.map +1 -0
  163. package/dist/patterns/Outline/Outline.js +21 -0
  164. package/dist/patterns/Outline/Outline.js.map +1 -0
  165. package/dist/patterns/Outline/Outline.variants.d.ts +11 -0
  166. package/dist/patterns/Outline/Outline.variants.d.ts.map +1 -0
  167. package/dist/patterns/Outline/Outline.variants.js +21 -0
  168. package/dist/patterns/Outline/Outline.variants.js.map +1 -0
  169. package/dist/patterns/Outline/index.d.ts +2 -0
  170. package/dist/patterns/Outline/index.d.ts.map +1 -0
  171. package/dist/patterns/Outline/index.js +2 -0
  172. package/dist/patterns/Outline/index.js.map +1 -0
  173. package/dist/patterns/PageHeader/PageHeader.d.ts +33 -4
  174. package/dist/patterns/PageHeader/PageHeader.d.ts.map +1 -1
  175. package/dist/patterns/PageHeader/PageHeader.js +31 -6
  176. package/dist/patterns/PageHeader/PageHeader.js.map +1 -1
  177. package/dist/patterns/PageHeader/PageHeader.variants.d.ts +23 -2
  178. package/dist/patterns/PageHeader/PageHeader.variants.d.ts.map +1 -1
  179. package/dist/patterns/PageHeader/PageHeader.variants.js +33 -2
  180. package/dist/patterns/PageHeader/PageHeader.variants.js.map +1 -1
  181. package/dist/patterns/PagePreview/PagePreview.d.ts +138 -4
  182. package/dist/patterns/PagePreview/PagePreview.d.ts.map +1 -1
  183. package/dist/patterns/PagePreview/PagePreview.js +159 -13
  184. package/dist/patterns/PagePreview/PagePreview.js.map +1 -1
  185. package/dist/patterns/PagePreview/PagePreview.variants.d.ts +15 -2
  186. package/dist/patterns/PagePreview/PagePreview.variants.d.ts.map +1 -1
  187. package/dist/patterns/PagePreview/PagePreview.variants.js +22 -6
  188. package/dist/patterns/PagePreview/PagePreview.variants.js.map +1 -1
  189. package/dist/patterns/PagePreview/index.d.ts +1 -1
  190. package/dist/patterns/PagePreview/index.d.ts.map +1 -1
  191. package/dist/patterns/PagePreview/index.js.map +1 -1
  192. package/dist/patterns/SaveBar/SaveBar.d.ts +20 -4
  193. package/dist/patterns/SaveBar/SaveBar.d.ts.map +1 -1
  194. package/dist/patterns/SaveBar/SaveBar.js +22 -4
  195. package/dist/patterns/SaveBar/SaveBar.js.map +1 -1
  196. package/dist/patterns/SaveBar/SaveBar.variants.d.ts +27 -5
  197. package/dist/patterns/SaveBar/SaveBar.variants.d.ts.map +1 -1
  198. package/dist/patterns/SaveBar/SaveBar.variants.js +39 -6
  199. package/dist/patterns/SaveBar/SaveBar.variants.js.map +1 -1
  200. package/dist/patterns/SectionList/SectionList.d.ts.map +1 -1
  201. package/dist/patterns/SectionList/SectionList.js +2 -2
  202. package/dist/patterns/SectionList/SectionList.js.map +1 -1
  203. package/dist/patterns/SectionList/SectionList.variants.d.ts +4 -1
  204. package/dist/patterns/SectionList/SectionList.variants.d.ts.map +1 -1
  205. package/dist/patterns/SectionList/SectionList.variants.js +5 -2
  206. package/dist/patterns/SectionList/SectionList.variants.js.map +1 -1
  207. package/dist/patterns/SiteWindow/SiteWindow.d.ts +20 -0
  208. package/dist/patterns/SiteWindow/SiteWindow.d.ts.map +1 -0
  209. package/dist/patterns/SiteWindow/SiteWindow.js +8 -0
  210. package/dist/patterns/SiteWindow/SiteWindow.js.map +1 -0
  211. package/dist/patterns/SiteWindow/SiteWindow.variants.d.ts +24 -0
  212. package/dist/patterns/SiteWindow/SiteWindow.variants.d.ts.map +1 -0
  213. package/dist/patterns/SiteWindow/SiteWindow.variants.js +25 -0
  214. package/dist/patterns/SiteWindow/SiteWindow.variants.js.map +1 -0
  215. package/dist/patterns/SiteWindow/index.d.ts +2 -0
  216. package/dist/patterns/SiteWindow/index.d.ts.map +1 -0
  217. package/dist/patterns/SiteWindow/index.js +2 -0
  218. package/dist/patterns/SiteWindow/index.js.map +1 -0
  219. package/dist/patterns/Split/Split.variants.d.ts +2 -2
  220. package/dist/patterns/Split/Split.variants.d.ts.map +1 -1
  221. package/dist/patterns/Split/Split.variants.js +2 -2
  222. package/dist/patterns/Split/Split.variants.js.map +1 -1
  223. package/dist/patterns/Welcome/Welcome.d.ts +18 -0
  224. package/dist/patterns/Welcome/Welcome.d.ts.map +1 -0
  225. package/dist/patterns/Welcome/Welcome.js +20 -0
  226. package/dist/patterns/Welcome/Welcome.js.map +1 -0
  227. package/dist/patterns/Welcome/Welcome.variants.d.ts +12 -0
  228. package/dist/patterns/Welcome/Welcome.variants.d.ts.map +1 -0
  229. package/dist/patterns/Welcome/Welcome.variants.js +12 -0
  230. package/dist/patterns/Welcome/Welcome.variants.js.map +1 -0
  231. package/dist/patterns/Welcome/index.d.ts +2 -0
  232. package/dist/patterns/Welcome/index.d.ts.map +1 -0
  233. package/dist/patterns/Welcome/index.js +2 -0
  234. package/dist/patterns/Welcome/index.js.map +1 -0
  235. package/dist/patterns/Workbench/Workbench.d.ts +35 -4
  236. package/dist/patterns/Workbench/Workbench.d.ts.map +1 -1
  237. package/dist/patterns/Workbench/Workbench.js +59 -4
  238. package/dist/patterns/Workbench/Workbench.js.map +1 -1
  239. package/dist/patterns/Workbench/Workbench.variants.d.ts +56 -4
  240. package/dist/patterns/Workbench/Workbench.variants.d.ts.map +1 -1
  241. package/dist/patterns/Workbench/Workbench.variants.js +111 -4
  242. package/dist/patterns/Workbench/Workbench.variants.js.map +1 -1
  243. package/dist/patterns/Workbench/index.d.ts +1 -1
  244. package/dist/patterns/Workbench/index.d.ts.map +1 -1
  245. package/dist/patterns/Workbench/index.js.map +1 -1
  246. package/dist/patterns/index.d.ts +4 -0
  247. package/dist/patterns/index.d.ts.map +1 -1
  248. package/dist/patterns/index.js +4 -0
  249. package/dist/patterns/index.js.map +1 -1
  250. package/dist/patterns/page-bar.d.ts +17 -0
  251. package/dist/patterns/page-bar.d.ts.map +1 -0
  252. package/dist/patterns/page-bar.js +22 -0
  253. package/dist/patterns/page-bar.js.map +1 -0
  254. package/package.json +2 -1
  255. package/src/styles.css +136 -0
  256. package/src/tokens/tokens.css +26 -1
@@ -1 +1 @@
1
- {"version":3,"file":"SaveBar.d.ts","sourceRoot":"","sources":["../../../src/patterns/SaveBar/SaveBar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAYvC,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,M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AAS,CAAC;IAC1B,qCAAqC;IACrC,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;IAC5B,wGAAwG;IACxG,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;CACnD;AAED,8HAA8H;AAC9H,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAiB,EAAE,EAAE,YAAY,sCAuC7G"}
@@ -1,9 +1,27 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { ChevronLeft } from 'lucide-react';
3
- import { Link } from 'react-aria-components';
4
- import { saveBarActionsClass, saveBarBackClass, saveBarBackIconSize, saveBarClass, saveBarHeadingClass, saveBarStatusClass, saveBarTitleClass, } from './SaveBar.variants.js';
3
+ import { useEffect } from 'react';
4
+ import { createPortal } from 'react-dom';
5
+ import { Button, Link } from 'react-aria-components';
6
+ import { saveBarActionsClass, saveBarBackClass, saveBarBackLabelClass, saveBarBackIconSize, saveBarCenterClass, saveBarHeadingVariants, saveBarNoteClass, saveBarStatusClass, saveBarTitleClass, saveBarVariants, } from './SaveBar.variants.js';
7
+ import { usePageBar, usePageBarBack } from '../page-bar.js';
5
8
  /** The bar that stays at the top of an editing screen: the way back, what is being edited, its state and its save buttons. */
6
- export function SaveBar({ label, back, title, status, actions }) {
7
- return (_jsxs("div", { role: "region", "aria-label": label, className: saveBarClass, children: [back !== undefined && (_jsxs(Link, { href: back.href, className: saveBarBackClass, children: [_jsx(ChevronLeft, { "aria-hidden": true, size: saveBarBackIconSize }), back.label] })), _jsxs("div", { className: saveBarHeadingClass, children: [title !== undefined && _jsx("h1", { className: saveBarTitleClass, children: title }), _jsx("div", { className: saveBarStatusClass, "aria-live": "polite", children: status })] }), _jsx("div", { className: saveBarActionsClass, children: actions })] }));
9
+ export function SaveBar({ label, back, title, status, note, actions, center, across = 'screen' }) {
10
+ const shellBar = usePageBar();
11
+ const inShell = across === 'screen' && shellBar !== undefined;
12
+ // A bar that leads back has the way back where a phone shows the menu: the shell leaves its menu and search out there.
13
+ const leadsBack = usePageBarBack();
14
+ const isLeadingBack = inShell && back !== undefined;
15
+ useEffect(() => {
16
+ if (!isLeadingBack || leadsBack === undefined)
17
+ return;
18
+ leadsBack(true);
19
+ return () => leadsBack(false);
20
+ }, [isLeadingBack, leadsBack]);
21
+ // The shell is still drawing its bar: this one comes once there is a place for it.
22
+ if (inShell && shellBar === null)
23
+ return null;
24
+ const bar = (_jsxs("div", { role: "region", "aria-label": label, className: saveBarVariants({ across: inShell ? 'shell' : across }), children: [back?.href !== undefined && (_jsxs(Link, { href: back.href, className: saveBarBackClass, children: [_jsx(ChevronLeft, { "aria-hidden": true, size: saveBarBackIconSize }), _jsx("span", { className: saveBarBackLabelClass, children: back.label })] })), back !== undefined && back.href === undefined && (_jsxs(Button, { className: saveBarBackClass, ...(back.onPress && { onPress: back.onPress }), children: [_jsx(ChevronLeft, { "aria-hidden": true, size: saveBarBackIconSize }), _jsx("span", { className: saveBarBackLabelClass, children: back.label })] })), _jsxs("div", { className: saveBarHeadingVariants({ hasCenter: center !== undefined }), children: [title !== undefined && _jsx("h1", { className: saveBarTitleClass, children: title }), _jsxs("div", { className: saveBarStatusClass, "aria-live": "polite", children: [status, note !== undefined && _jsx("span", { className: saveBarNoteClass, children: note })] })] }), center !== undefined && _jsx("div", { className: saveBarCenterClass, children: center }), _jsx("div", { className: saveBarActionsClass, children: actions })] }));
25
+ return inShell && shellBar ? createPortal(bar, shellBar) : bar;
8
26
  }
9
27
  //# sourceMappingURL=SaveBar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SaveBar.js","sourceRoot":"","sources":["../../../src/patterns/SaveBar/SaveBar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WA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a,IAAI,EAAE,mBAAmB,GAAI,EACtD,eAAM,SAAS,EAAE,qBAAqB,YAAG,IAAI,CAAC,KAAK,GAAQ,IACtD,CACR,EACA,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,CAChD,MAAC,MAAM,IAAC,SAAS,EAAE,gBAAgB,KAAM,CAAC,IAAI,CAAC,OAAO,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,aAClF,KAAC,WAAW,yBAAa,IAAI,EAAE,mBAAmB,GAAI,EACtD,eAAM,SAAS,EAAE,qBAAqB,YAAG,IAAI,CAAC,KAAK,GAAQ,IACpD,CACV,EACD,eAAK,SAAS,EAAE,sBAAsB,CAAC,EAAE,SAAS,EAAE,MAAM,KAAK,SAAS,EAAE,CAAC,aACxE,KAAK,KAAK,SAAS,IAAI,aAAI,SAAS,EAAE,iBAAiB,YAAG,KAAK,GAAM,EACtE,eAAK,SAAS,EAAE,kBAAkB,eAAY,QAAQ,aACnD,MAAM,EACN,IAAI,KAAK,SAAS,IAAI,eAAM,SAAS,EAAE,gBAAgB,YAAG,IAAI,GAAQ,IACnE,IACF,EACL,MAAM,KAAK,SAAS,IAAI,cAAK,SAAS,EAAE,kBAAkB,YAAG,MAAM,GAAO,EAC3E,cAAK,SAAS,EAAE,mBAAmB,YAAG,OAAO,GAAO,IAChD,CACP,CAAC;IACF,OAAO,OAAO,IAAI,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;AACjE,CAAC"}
@@ -1,9 +1,31 @@
1
- export declare const saveBarClass = "sticky top-0 layer-sticky flex flex-wrap items-center gap-4 rounded-t-2xl border-b border-border bg-background px-6 py-3";
1
+ /**
2
+ * On a screen the bar stays at the top of the screen. Inside `AppShell` it is drawn in the shell's own
3
+ * bar, which already stays. Across a whole window it is the window's top edge.
4
+ * In the shell's bar and across a window it is one row, as on any phone: the way back, the title cut to fit,
5
+ * and buttons few enough to fit (a screen folds the rest into its menu there). On its own in a screen the
6
+ * buttons go under the title when the window has no room for them beside it, and never off its edge.
7
+ */
8
+ export declare const saveBarVariants: (props?: ({
9
+ across?: "section" | "screen" | "shell" | "window" | null | undefined;
10
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
11
+ /** On a phone the way back is its arrow alone, and its words are read out. */
2
12
  export declare const saveBarBackClass: string;
3
- export declare const saveBarHeadingClass = "flex min-w-0 flex-1 flex-col gap-0.5";
4
- export declare const saveBarTitleClass = "truncate text-lg font-semibold text-foreground";
5
- export declare const saveBarStatusClass = "flex min-w-0 items-center gap-2";
6
- export declare const saveBarActionsClass = "flex shrink-0 items-center gap-2";
13
+ export declare const saveBarBackLabelClass = "sr-only md:not-sr-only";
14
+ /**
15
+ * The title and its status on one row: the title is cut to fit, the status keeps its words. With something in
16
+ * the middle of the bar, the heading keeps to its words and the middle takes the room.
17
+ */
18
+ export declare const saveBarHeadingVariants: (props?: ({
19
+ hasCenter?: boolean | null | undefined;
20
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
21
+ /** In the middle of the bar, from `md` up: the controls of what is shown, such as the widths of a page. */
22
+ export declare const saveBarCenterClass = "hidden min-w-0 flex-1 items-center justify-center md:flex";
23
+ export declare const saveBarTitleClass = "min-w-0 truncate text-lg font-semibold text-foreground";
24
+ export declare const saveBarStatusClass = "flex shrink-0 items-center gap-2 whitespace-nowrap";
25
+ /** The words after the status: from `lg` up, where the row has room. */
26
+ export declare const saveBarNoteClass = "sr-only text-sm text-foreground-muted lg:not-sr-only";
27
+ /** The buttons, the main one last. */
28
+ export declare const saveBarActionsClass = "flex max-w-full shrink-0 flex-wrap items-center justify-end gap-1 md:gap-2";
7
29
  /** The size of the arrow on the way back, in pixels. */
8
30
  export declare const saveBarBackIconSize = 16;
9
31
  //# sourceMappingURL=SaveBar.variants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SaveBar.variants.d.ts","sourceRoot":"","sources":["../../../src/patterns/SaveBar/SaveBar.variants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,6HACmG,CAAC;AAE7H,eAAO,MAAM,gBAAgB,QAIlB,CAAC;AAEZ,eAAO,MAAM,mBAAmB,yCAAyC,CAAC;AAC1E,eAAO,MAAM,iBAAiB,mDAAmD,CAAC;AAClF,eAAO,MAAM,kBAAkB,oCAAoC,CAAC;AACpE,eAAO,MAAM,mBAAmB,qCAAqC,CAAC;AAEtE,wDAAwD;AACxD,eAAO,MAAM,mBAAmB,KAAK,CAAC"}
1
+ {"version":3,"file":"SaveBar.variants.d.ts","sourceRoot":"","sources":["../../../src/patterns/SaveBar/SaveBar.variants.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,eAAO,MAAM,eAAe;;8EAU1B,CAAC;AAEH,8EAA8E;AAC9E,eAAO,MAAM,gBAAgB,QAKlB,CAAC;AAEZ,eAAO,MAAM,qBAAqB,2BAA2B,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;8EAGjC,CAAC;AACH,2GAA2G;AAC3G,eAAO,MAAM,kBAAkB,8DAA8D,CAAC;AAC9F,eAAO,MAAM,iBAAiB,2DAA2D,CAAC;AAC1F,eAAO,MAAM,kBAAkB,uDAAuD,CAAC;AACvF,wEAAwE;AACxE,eAAO,MAAM,gBAAgB,yDAAyD,CAAC;AACvF,sCAAsC;AACtC,eAAO,MAAM,mBAAmB,+EAA+E,CAAC;AAEhH,wDAAwD;AACxD,eAAO,MAAM,mBAAmB,KAAK,CAAC"}
@@ -1,13 +1,46 @@
1
- export const saveBarClass = 'sticky top-0 layer-sticky flex flex-wrap items-center gap-4 rounded-t-2xl border-b border-border bg-background px-6 py-3';
1
+ import { cva } from 'class-variance-authority';
2
+ /**
3
+ * On a screen the bar stays at the top of the screen. Inside `AppShell` it is drawn in the shell's own
4
+ * bar, which already stays. Across a whole window it is the window's top edge.
5
+ * In the shell's bar and across a window it is one row, as on any phone: the way back, the title cut to fit,
6
+ * and buttons few enough to fit (a screen folds the rest into its menu there). On its own in a screen the
7
+ * buttons go under the title when the window has no room for them beside it, and never off its edge.
8
+ */
9
+ export const saveBarVariants = cva('flex items-center', {
10
+ variants: {
11
+ across: {
12
+ screen: 'sticky top-0 layer-sticky flex-wrap gap-x-4 gap-y-2 border-b border-border bg-background px-4 py-3 md:px-6',
13
+ shell: 'min-w-0 flex-1 gap-2 py-2 md:gap-4',
14
+ section: 'sticky top-0 layer-sticky flex-wrap gap-x-4 gap-y-2 border-b border-border bg-background px-4 py-3 md:px-6',
15
+ window: 'shrink-0 gap-2 border-b border-border bg-card px-3 py-2 md:gap-4',
16
+ },
17
+ },
18
+ defaultVariants: { across: 'screen' },
19
+ });
20
+ /** On a phone the way back is its arrow alone, and its words are read out. */
2
21
  export const saveBarBackClass = [
3
- 'inline-flex h-8 shrink-0 items-center gap-1.5 rounded-md border border-border-strong bg-background pr-3 pl-2 text-sm font-medium text-foreground',
22
+ 'inline-flex h-8 shrink-0 items-center justify-center gap-1.5 rounded-md border border-border-strong bg-background text-sm font-medium text-foreground',
23
+ 'w-8 md:w-auto md:pr-3 md:pl-2',
4
24
  'transition-colors motion-fast',
5
25
  'outline-none data-hovered:bg-background-secondary data-focus-visible:ring-2 data-focus-visible:ring-ring',
6
26
  ].join(' ');
7
- export const saveBarHeadingClass = 'flex min-w-0 flex-1 flex-col gap-0.5';
8
- export const saveBarTitleClass = 'truncate text-lg font-semibold text-foreground';
9
- export const saveBarStatusClass = 'flex min-w-0 items-center gap-2';
10
- export const saveBarActionsClass = 'flex shrink-0 items-center gap-2';
27
+ export const saveBarBackLabelClass = 'sr-only md:not-sr-only';
28
+ /**
29
+ * The title and its status on one row: the title is cut to fit, the status keeps its words. With something in
30
+ * the middle of the bar, the heading keeps to its words and the middle takes the room.
31
+ */
32
+ export const saveBarHeadingVariants = cva('flex min-w-0 items-center gap-3', {
33
+ variants: { hasCenter: { true: 'flex-1 md:flex-none md:shrink', false: 'flex-1 basis-0 md:basis-48' } },
34
+ defaultVariants: { hasCenter: false },
35
+ });
36
+ /** In the middle of the bar, from `md` up: the controls of what is shown, such as the widths of a page. */
37
+ export const saveBarCenterClass = 'hidden min-w-0 flex-1 items-center justify-center md:flex';
38
+ export const saveBarTitleClass = 'min-w-0 truncate text-lg font-semibold text-foreground';
39
+ export const saveBarStatusClass = 'flex shrink-0 items-center gap-2 whitespace-nowrap';
40
+ /** The words after the status: from `lg` up, where the row has room. */
41
+ export const saveBarNoteClass = 'sr-only text-sm text-foreground-muted lg:not-sr-only';
42
+ /** The buttons, the main one last. */
43
+ export const saveBarActionsClass = 'flex max-w-full shrink-0 flex-wrap items-center justify-end gap-1 md:gap-2';
11
44
  /** The size of the arrow on the way back, in pixels. */
12
45
  export const saveBarBackIconSize = 16;
13
46
  //# sourceMappingURL=SaveBar.variants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SaveBar.variants.js","sourceRoot":"","sources":["../../../src/patterns/SaveBar/SaveBar.variants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GACvB,0HAA0H,CAAC;AAE7H,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,kJAAkJ;IAClJ,+BAA+B;IAC/B,0GAA0G;CAC3G,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEZ,MAAM,CAAC,MAAM,mBAAmB,GAAG,sCAAsC,CAAC;AAC1E,MAAM,CAAC,MAAM,iBAAiB,GAAG,gDAAgD,CAAC;AAClF,MAAM,CAAC,MAAM,kBAAkB,GAAG,iCAAiC,CAAC;AACpE,MAAM,CAAC,MAAM,mBAAmB,GAAG,kCAAkC,CAAC;AAEtE,wDAAwD;AACxD,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAC"}
1
+ {"version":3,"file":"SaveBar.variants.js","sourceRoot":"","sources":["../../../src/patterns/SaveBar/SaveBar.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,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Q,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B,6EAA6E;IAC7E,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,gFAAgF;IAChF,QAAQ,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACxD,6FAA6F;IAC7F,QAAQ,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;IACnD,QAAQ,CAAC,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;IACrD,QAAQ,CAAC,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;IACjD,wEAAwE;IACxE,QAAQ,CAAC,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;IACjD,qFAAqF;IACrF,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACxC;AAED,mGAAmG;AACnG,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,WAAW,EACX,YAAY,EACZ,KAAK,EACL,OAAO,EACP,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,KAAK,EACL,MAAc,EACd,MAAM,EACN,QAAQ,EACR,WAAW,EACX,aAAa,EACb,SAAS,EACT,SAAS,EACT,QAAQ,GACT,EAAE,gBAAgB,+BA8ClB"}
@@ -6,7 +6,7 @@ import { Button } from '../../components/Button/index.js';
6
6
  import { IconButton } from '../../components/IconButton/index.js';
7
7
  import { Menu } from '../../components/Menu/index.js';
8
8
  import { Tag } from '../../components/Tag/index.js';
9
- import { sectionActionsClass, sectionChevronClass, sectionDropLineClass, sectionGripClass, sectionHeaderClass, sectionHeadingClass, sectionIconSize, sectionIconVariants, sectionListAddClass, sectionListClass, sectionListDescriptionClass, sectionListEmptyClass, sectionListErrorClass, sectionListItemsClass, sectionListLabelClass, sectionPanelClass, sectionProblemClass, sectionSummaryClass, sectionTextClass, sectionTitleVariants, sectionTriggerClass, sectionVariants, } from './SectionList.variants.js';
9
+ import { sectionActionsClass, sectionChevronClass, sectionDropLineClass, sectionGripClass, sectionHeaderClass, sectionHeadingClass, sectionIconSize, sectionIconVariants, sectionListAddClass, sectionListClass, sectionListDescriptionClass, sectionListEmptyClass, sectionListErrorClass, sectionListItemsClass, sectionListLabelClass, sectionPanelClass, sectionProblemClass, sectionDetailClass, sectionSummaryClass, sectionTextClass, sectionTitleVariants, sectionTriggerClass, sectionVariants, } from './SectionList.variants.js';
10
10
  /** Sections of different kinds in an order a person chooses. Each opens to show its own fields. */
11
11
  export function SectionList({ label, description, errorMessage, items, openIds, onOpenChange, emptyText, addLabel, onAdd, isFull = false, onMove, onAction, moveUpLabel, moveDownLabel, moreLabel, dragLabel, revealId, }) {
12
12
  const labelId = useId();
@@ -54,6 +54,6 @@ function SectionRow({ item, index, ids, isOpen, onOpenChange, onMove, onAction,
54
54
  });
55
55
  const tone = tag === undefined ? 'default' : 'quiet';
56
56
  const Chevron = isOpen ? ChevronDown : ChevronRight;
57
- return (_jsxs("li", { ref: row, "data-section": id, ...dropProps, children: [landing === 'before' && _jsx("div", { className: sectionDropLineClass }), _jsxs(Disclosure, { className: sectionVariants({ state: problem !== undefined ? 'problem' : landing === 'here' ? 'target' : isDragging ? 'dragging' : 'default' }), isExpanded: isOpen, onExpandedChange: (next) => onOpenChange(id, next), children: [_jsxs("div", { className: sectionHeaderClass, ...dragProps, children: [_jsx(AriaButton, { ...dragButtonProps, "aria-label": dragLabel(index + 1), className: sectionGripClass, children: _jsx(GripVertical, { "aria-hidden": true, size: sectionIconSize }) }), _jsx(Heading, { level: 3, className: sectionHeadingClass, children: _jsxs(AriaButton, { slot: "trigger", className: sectionTriggerClass, children: [_jsx(Chevron, { "aria-hidden": true, size: sectionIconSize, className: sectionChevronClass }), Icon && (_jsx("span", { className: sectionIconVariants({ tone }), children: _jsx(Icon, { "aria-hidden": true, size: sectionIconSize }) })), _jsxs("span", { className: sectionTextClass, children: [_jsx("span", { className: sectionTitleVariants({ tone }), children: title }), summary !== undefined && _jsx("span", { className: sectionSummaryClass, children: summary })] }), tag !== undefined && _jsx(Tag, { children: tag })] }) }), _jsxs("div", { className: sectionActionsClass, children: [_jsx(IconButton, { size: "sm", icon: ArrowUp, label: moveUpLabel(index + 1), isDisabled: index === 0, onPress: () => onMove(index, index - 1) }), _jsx(IconButton, { size: "sm", icon: ArrowDown, label: moveDownLabel(index + 1), isDisabled: index === ids.length - 1, onPress: () => onMove(index, index + 1) }), _jsx(Menu, { trigger: _jsx(IconButton, { size: "sm", icon: Ellipsis, label: moreLabel(index + 1) }), actions: actions, onAction: (action) => onAction(id, action) })] })] }), problem !== undefined && !isOpen && _jsx("p", { className: sectionProblemClass, children: problem }), _jsx(DisclosurePanel, { children: _jsx("div", { className: sectionPanelClass, children: content }) })] }), landing === 'after' && _jsx("div", { className: sectionDropLineClass })] }));
57
+ return (_jsxs("li", { ref: row, "data-section": id, ...dropProps, children: [landing === 'before' && _jsx("div", { className: sectionDropLineClass }), _jsxs(Disclosure, { className: sectionVariants({ state: problem !== undefined ? 'problem' : landing === 'here' ? 'target' : isDragging ? 'dragging' : 'default' }), isExpanded: isOpen, onExpandedChange: (next) => onOpenChange(id, next), children: [_jsxs("div", { className: sectionHeaderClass, ...dragProps, children: [_jsx(AriaButton, { ...dragButtonProps, "aria-label": dragLabel(index + 1), className: sectionGripClass, children: _jsx(GripVertical, { "aria-hidden": true, size: sectionIconSize }) }), _jsx(Heading, { level: 3, className: sectionHeadingClass, children: _jsxs(AriaButton, { slot: "trigger", className: sectionTriggerClass, children: [_jsx(Chevron, { "aria-hidden": true, size: sectionIconSize, className: sectionChevronClass }), Icon && (_jsx("span", { className: sectionIconVariants({ tone }), children: _jsx(Icon, { "aria-hidden": true, size: sectionIconSize }) })), _jsxs("span", { className: sectionTextClass, children: [_jsx("span", { className: sectionTitleVariants({ tone }), children: title }), (tag !== undefined || summary !== undefined) && (_jsxs("span", { className: sectionDetailClass, children: [summary !== undefined && _jsx("span", { className: sectionSummaryClass, children: summary }), tag !== undefined && _jsx(Tag, { children: tag })] }))] })] }) }), _jsxs("div", { className: sectionActionsClass, children: [_jsx(IconButton, { size: "sm", icon: ArrowUp, label: moveUpLabel(index + 1), isDisabled: index === 0, onPress: () => onMove(index, index - 1) }), _jsx(IconButton, { size: "sm", icon: ArrowDown, label: moveDownLabel(index + 1), isDisabled: index === ids.length - 1, onPress: () => onMove(index, index + 1) }), _jsx(Menu, { trigger: _jsx(IconButton, { size: "sm", icon: Ellipsis, label: moreLabel(index + 1) }), actions: actions, onAction: (action) => onAction(id, action) })] })] }), problem !== undefined && !isOpen && _jsx("p", { className: sectionProblemClass, children: problem }), _jsx(DisclosurePanel, { children: _jsx("div", { className: sectionPanelClass, children: content }) })] }), landing === 'after' && _jsx("div", { className: sectionDropLineClass })] }));
58
58
  }
59
59
  //# sourceMappingURL=SectionList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SectionList.js","sourceRoot":"","sources":["../../../src/patterns/SectionList/SectionList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAC;AAC5H,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AAC3E,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrI,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,EAAE,IAAI,EAAmB,MAAM,gC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C7D,CACN,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"SectionList.js","sourceRoot":"","sources":["../../../src/patterns/SectionList/SectionList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAC;AAC5H,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AAC3E,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrI,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,EAAE,IAAI,EAAmB,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAC;AACpD,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,2BAA2B,EAC3B,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,GAChB,MAAM,2BAA2B,CAAC;AAmDnC,mGAAmG;AACnG,MAAM,UAAU,WAAW,CAAC,EAC1B,KAAK,EACL,WAAW,EACX,YAAY,EACZ,KAAK,EACL,OAAO,EACP,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,KAAK,EACL,MAAM,GAAG,KAAK,EACd,MAAM,EACN,QAAQ,EACR,WA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AAE,KAAK,EAAE,aAAa,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE,UAAU,EAAE,KAAK,KAAK,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,GAAG,CAAC,CAAC,GAAI,EACzJ,KAAC,IAAI,IAAC,OAAO,EAAE,KAAC,UAAU,IAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,GAAG,CAAC,CAAC,GAAI,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC,GAAI,IAClJ,IACF,EACL,OAAO,KAAK,SAAS,IAAI,CAAC,MAAM,IAAI,YAAG,SAAS,EAAE,mBAAmB,YAAG,OAAO,GAAK,EACrF,KAAC,eAAe,cACd,cAAK,SAAS,EAAE,iBAAiB,YAAG,OAAO,GAAO,GAClC,IACP,EACZ,OAAO,KAAK,OAAO,IAAI,cAAK,SAAS,EAAE,oBAAoB,GAAI,IAC7D,CACN,CAAC;AACJ,CAAC"}
@@ -17,6 +17,7 @@ export declare const sectionDropLineClass = "my-1 h-0.5 rounded-full bg-ring";
17
17
  export declare const sectionHeadingClass = "min-w-0 flex-1";
18
18
  export declare const sectionTriggerClass: string;
19
19
  export declare const sectionChevronClass = "shrink-0 text-foreground-muted";
20
+ /** The block's icon, left out on a phone, where the row needs its width for the words and the buttons. */
20
21
  export declare const sectionIconVariants: (props?: ({
21
22
  tone?: "default" | "quiet" | null | undefined;
22
23
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
@@ -24,7 +25,9 @@ export declare const sectionTextClass = "flex min-w-0 flex-1 flex-col";
24
25
  export declare const sectionTitleVariants: (props?: ({
25
26
  tone?: "default" | "quiet" | null | undefined;
26
27
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
27
- export declare const sectionSummaryClass = "truncate text-sm text-foreground-muted";
28
+ /** Under the title: the summary, which gives way to a tag after it (such as a block no longer used). */
29
+ export declare const sectionDetailClass = "flex min-w-0 items-center gap-2";
30
+ export declare const sectionSummaryClass = "min-w-0 truncate text-sm text-foreground-muted";
28
31
  export declare const sectionActionsClass = "flex shrink-0 items-center";
29
32
  export declare const sectionPanelClass = "border-t border-border p-4";
30
33
  export declare const sectionProblemClass = "px-4 pb-3 text-sm text-destructive";
@@ -1 +1 @@
1
- {"version":3,"file":"SectionList.variants.d.ts","sourceRoot":"","sources":["../../../src/patterns/SectionList/SectionList.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,eAAO,MAAM,gBAAgB,gCAAgC,CAAC;AAC9D,eAAO,MAAM,qBAAqB,wCAAkB,CAAC;AACrD,eAAO,MAAM,2BAA2B,kCAAwB,CAAC;AACjE,eAAO,MAAM,qBAAqB,yCAAkB,CAAC;AACrD,eAAO,MAAM,qBAAqB,wBAAwB,CAAC;AAC3D,eAAO,MAAM,qBAAqB,sGAAsG,CAAC;AACzI,eAAO,MAAM,mBAAmB,SAAS,CAAC;AAE1C,eAAO,MAAM,eAAe;;8EAY1B,CAAC;AAEH,eAAO,MAAM,kBAAkB,2CAA2C,CAAC;AAC3E,0CAA0C;AAC1C,eAAO,MAAM,gBAAgB,QAIlB,CAAC;AACZ,8DAA8D;AAC9D,eAAO,MAAM,oBAAoB,oCAAoC,CAAC;AACtE,eAAO,MAAM,mBAAmB,mBAAmB,CAAC;AACpD,eAAO,MAAM,mBAAmB,QAIrB,CAAC;AACZ,eAAO,MAAM,mBAAmB,mCAAmC,CAAC;AAEpE,eAAO,MAAM,mBAAmB;;8EAQ9B,CAAC;AAEH,eAAO,MAAM,gBAAgB,iCAAiC,CAAC;AAC/D,eAAO,MAAM,oBAAoB;;8EAQ/B,CAAC;AACH,eAAO,MAAM,mBAAmB,2CAA2C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DAAmD,CAAC;AACpF,eAAO,MAAM,mBAAmB,+BAA+B,CAAC;AAChE,eAAO,MAAM,iBAAiB,+BAA+B,CAAC;AAC9D,eAAO,MAAM,mBAAmB,uCAAuC,CAAC;AAExE,iDAAiD;AACjD,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,OAAO,eAAe,CAAC,CAAC"}
@@ -36,7 +36,8 @@ export const sectionTriggerClass = [
36
36
  'data-focus-visible:ring-2 data-focus-visible:ring-input-focus',
37
37
  ].join(' ');
38
38
  export const sectionChevronClass = 'shrink-0 text-foreground-muted';
39
- export const sectionIconVariants = cva('grid size-8 shrink-0 place-items-center rounded-md', {
39
+ /** The block's icon, left out on a phone, where the row needs its width for the words and the buttons. */
40
+ export const sectionIconVariants = cva('hidden size-8 shrink-0 place-items-center rounded-md sm:grid', {
40
41
  variants: {
41
42
  tone: {
42
43
  default: 'bg-secondary text-secondary-foreground',
@@ -55,7 +56,9 @@ export const sectionTitleVariants = cva('truncate text-sm font-medium', {
55
56
  },
56
57
  defaultVariants: { tone: 'default' },
57
58
  });
58
- export const sectionSummaryClass = 'truncate text-sm text-foreground-muted';
59
+ /** Under the title: the summary, which gives way to a tag after it (such as a block no longer used). */
60
+ export const sectionDetailClass = 'flex min-w-0 items-center gap-2';
61
+ export const sectionSummaryClass = 'min-w-0 truncate text-sm text-foreground-muted';
59
62
  export const sectionActionsClass = 'flex shrink-0 items-center';
60
63
  export const sectionPanelClass = 'border-t border-border p-4';
61
64
  export const sectionProblemClass = 'px-4 pb-3 text-sm text-destructive';
@@ -1 +1 @@
1
- {"version":3,"file":"SectionList.variants.js","sourceRoot":"","sources":["../../../src/patterns/SectionList/SectionList.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEpG,M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3F,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,OAAO,EAAE,wCAAwC;YACjD,KAAK,EAAE,gDAAgD;SACxD;KACF;IACD,eAAe,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;CACrC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,8BAA8B,CAAC;AAC/D,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAC,8BAA8B,EAAE;IACtE,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,OAAO,EAAE,iBAAiB;YAC1B,KAAK,EAAE,uBAAuB;SAC/B;KACF;IACD,eAAe,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;CACrC,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,wCAAwC,CAAC;AAC5E,MAAM,CAAC,MAAM,mBAAmB,GAAG,4BAA4B,CAAC;AAChE,MAAM,CAAC,MAAM,iBAAiB,GAAG,4BAA4B,CAAC;AAC9D,MAAM,CAAC,MAAM,mBAAmB,GAAG,oCAAoC,CAAC;AAExE,iDAAiD;AACjD,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAC"}
1
+ {"version":3,"file":"SectionList.variants.js","sourceRoot":"","sources":["../../../src/patterns/SectionList/SectionList.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEpG,MAAM,CAAC,MAAM,gBAAgB,GAAG,6BAA6B,CAAC;AAC9D,MAAM,CAAC,MAAM,qBAAqB,GAAG,eAAe,CAAC;AACrD,MAAM,CAAC,MAAM,2BAA2B,GAAG,qBAAqB,CAAC;AACjE,MAAM,CAAC,MAAM,qBAAqB,GAAG,eAAe,CAAC;AACrD,MAAM,CAAC,MAAM,qBAAqB,GAAG,qBAAqB,CAAC;AAC3D,MAAM,CAAC,MAAM,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C,8BAA8B,EAAE;IACtE,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,OAAO,EAAE,iBAAiB;YAC1B,KAAK,EAAE,uBAAuB;SAC/B;KACF;IACD,eAAe,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;CACrC,CAAC,CAAC;AACH,wGAAwG;AACxG,MAAM,CAAC,MAAM,kBAAkB,GAAG,iCAAiC,CAAC;AACpE,MAAM,CAAC,MAAM,mBAAmB,GAAG,gDAAgD,CAAC;AACpF,MAAM,CAAC,MAAM,mBAAmB,GAAG,4BAA4B,CAAC;AAChE,MAAM,CAAC,MAAM,iBAAiB,GAAG,4BAA4B,CAAC;AAC9D,MAAM,CAAC,MAAM,mBAAmB,GAAG,oCAAoC,CAAC;AAExE,iDAAiD;AACjD,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { type SiteWindowVariants } from './SiteWindow.variants.js';
2
+ export interface SiteWindowProps extends SiteWindowVariants {
3
+ /** The site's address, shown where a browser shows it: "lakeshore.example". */
4
+ readonly address: string;
5
+ /** The page to show, as visitors see it: a path on the site, such as "/". */
6
+ readonly src: string;
7
+ /** What the page is, for screen readers: "The home page of Lakeshore Realty". */
8
+ readonly title: string;
9
+ /** What pressing the card does, at its foot: "Edit the home page". */
10
+ readonly label: string;
11
+ /** A few words at the foot before it: when the page was last published, and by whom. */
12
+ readonly meta?: string;
13
+ /** Where pressing the card leads. */
14
+ readonly href?: string;
15
+ /** What pressing the card does, when it leads nowhere by itself. */
16
+ readonly onPress?: () => void;
17
+ }
18
+ /** A page of the site in a small browser window, as visitors see it now. The whole card is one link. */
19
+ export declare function SiteWindow({ address, src, title, label, meta, href, onPress, size }: SiteWindowProps): import("react").JSX.Element;
20
+ //# sourceMappingURL=SiteWindow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SiteWindow.d.ts","sourceRoot":"","sources":["../../../src/patterns/SiteWindow/SiteWindow.tsx"],"names":[],"mappings":"AACA,OAAO,EAYL,KAAK,kBAAkB,EACxB,MAAM,0BAA0B,CAAC;AAElC,MAAM,WAAW,eAAgB,SAAQ,kBAAkB;IACzD,+EAA+E;IAC/E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,6EAA6E;IAC7E,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,iFAAiF;IACjF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,sEAAsE;IACtE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,wFAAwF;IACxF,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,qCAAqC;IACrC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,oEAAoE;IACpE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED,wGAAwG;AACxG,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,eAAe,+BAuBpG"}
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Link } from 'react-aria-components';
3
+ import { siteWindowAddressClass, siteWindowBarClass, siteWindowClass, siteWindowDotClass, siteWindowDotsClass, siteWindowFootClass, siteWindowFrameVariants, siteWindowLinkClass, siteWindowMetaClass, siteWindowSpacerClass, siteWindowViewVariants, } from './SiteWindow.variants.js';
4
+ /** A page of the site in a small browser window, as visitors see it now. The whole card is one link. */
5
+ export function SiteWindow({ address, src, title, label, meta, href, onPress, size }) {
6
+ return (_jsxs("div", { className: siteWindowClass, children: [_jsxs("div", { "aria-hidden": true, className: siteWindowBarClass, children: [_jsxs("span", { className: siteWindowDotsClass, children: [_jsx("span", { className: siteWindowDotClass }), _jsx("span", { className: siteWindowDotClass }), _jsx("span", { className: siteWindowDotClass })] }), _jsx("span", { className: siteWindowAddressClass, children: address }), _jsx("span", { className: siteWindowSpacerClass })] }), _jsx("div", { className: siteWindowViewVariants({ size }), children: _jsx("iframe", { src: src, title: title, loading: "lazy", tabIndex: -1, "aria-hidden": true, className: siteWindowFrameVariants({ size }) }) }), _jsxs("div", { className: siteWindowFootClass, children: [meta !== undefined && _jsx("span", { className: siteWindowMetaClass, children: meta }), _jsx(Link, { className: siteWindowLinkClass, ...(href !== undefined && { href }), ...(onPress !== undefined && { onPress }), children: label })] })] }));
7
+ }
8
+ //# sourceMappingURL=SiteWindow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SiteWindow.js","sourceRoot":"","sources":["../../../src/patterns/SiteWindow/SiteWindow.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,GAEvB,MAAM,0BAA0B,CAAC;AAmBlC,wGAAwG;AACxG,MAAM,UAAU,UAAU,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAmB;IACnG,OAAO,CACL,eAAK,SAAS,EAAE,eAAe,aAC7B,oCAAiB,SAAS,EAAE,kBAAkB,aAC5C,gBAAM,SAAS,EAAE,mBAAmB,aAClC,eAAM,SAAS,EAAE,kBAAkB,GAAI,EACvC,eAAM,SAAS,EAAE,kBAAkB,GAAI,EACvC,eAAM,SAAS,EAAE,kBAAkB,GAAI,IAClC,EACP,eAAM,SAAS,EAAE,sBAAsB,YAAG,OAAO,GAAQ,EACzD,eAAM,SAAS,EAAE,qBAAqB,GAAI,IACtC,EACN,cAAK,SAAS,EAAE,sBAAsB,CAAC,EAAE,IAAI,EAAE,CAAC,YAC9C,iBAAQ,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAC,MAAM,EAAC,QAAQ,EAAE,CAAC,CAAC,uBAAc,SAAS,EAAE,uBAAuB,CAAC,EAAE,IAAI,EAAE,CAAC,GAAI,GACrH,EACN,eAAK,SAAS,EAAE,mBAAmB,aAChC,IAAI,KAAK,SAAS,IAAI,eAAM,SAAS,EAAE,mBAAmB,YAAG,IAAI,GAAQ,EAC1E,KAAC,IAAI,IAAC,SAAS,EAAE,mBAAmB,KAAM,CAAC,IAAI,KAAK,SAAS,IAAI,EAAE,IAAI,EAAE,CAAC,KAAM,CAAC,OAAO,KAAK,SAAS,IAAI,EAAE,OAAO,EAAE,CAAC,YACnH,KAAK,GACD,IACH,IACF,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { type VariantProps } from 'class-variance-authority';
2
+ /** `relative`, so the link at its foot can stretch over the whole card and make all of it one thing to press. */
3
+ export declare const siteWindowClass = "group relative w-full min-w-0 max-w-xl overflow-hidden rounded-xl border border-border bg-card shadow-xl transition-colors motion-base has-data-hovered:border-border-strong has-data-focus-visible:ring-2 has-data-focus-visible:ring-ring";
4
+ export declare const siteWindowBarClass = "flex items-center gap-3 border-b border-border bg-background-secondary px-3.5 py-2.5";
5
+ export declare const siteWindowDotsClass = "flex shrink-0 gap-1.5";
6
+ export declare const siteWindowDotClass = "h-2.5 w-2.5 rounded-full bg-border-strong";
7
+ export declare const siteWindowAddressClass = "min-w-0 flex-1 truncate text-center font-mono text-xs text-foreground-subtle";
8
+ export declare const siteWindowSpacerClass = "w-10 shrink-0";
9
+ /**
10
+ * The page is drawn at twice the card's width and shown at half its size, so it looks as it does on
11
+ * a desktop. It cannot be pressed or reached by the keyboard: the card is a way to edit the page, not the page.
12
+ */
13
+ export declare const siteWindowViewVariants: (props?: ({
14
+ size?: "sm" | "md" | null | undefined;
15
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
16
+ /** `sm` draws the page wider still and shows it at a fifth of its size, for a narrow column. */
17
+ export declare const siteWindowFrameVariants: (props?: ({
18
+ size?: "sm" | "md" | null | undefined;
19
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
20
+ export type SiteWindowVariants = VariantProps<typeof siteWindowViewVariants>;
21
+ export declare const siteWindowFootClass = "flex items-center gap-3 border-t border-border px-4 py-3 text-sm";
22
+ export declare const siteWindowMetaClass = "min-w-0 flex-1 truncate text-foreground-muted";
23
+ export declare const siteWindowLinkClass = "shrink-0 font-semibold text-foreground outline-none after:absolute after:inset-0 group-hover:underline";
24
+ //# sourceMappingURL=SiteWindow.variants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SiteWindow.variants.d.ts","sourceRoot":"","sources":["../../../src/patterns/SiteWindow/SiteWindow.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,iHAAiH;AACjH,eAAO,MAAM,eAAe,gPACmN,CAAC;AAChP,eAAO,MAAM,kBAAkB,yFAAyF,CAAC;AACzH,eAAO,MAAM,mBAAmB,0BAA0B,CAAC;AAC3D,eAAO,MAAM,kBAAkB,8CAA8C,CAAC;AAC9E,eAAO,MAAM,sBAAsB,iFAAiF,CAAC;AACrH,eAAO,MAAM,qBAAqB,kBAAkB,CAAC;AACrD;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;8EAGjC,CAAC;AACH,gGAAgG;AAChG,eAAO,MAAM,uBAAuB;;8EAGlC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAC7E,eAAO,MAAM,mBAAmB,qEAAqE,CAAC;AACtG,eAAO,MAAM,mBAAmB,kDAAkD,CAAC;AACnF,eAAO,MAAM,mBAAmB,2GAA2G,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { cva } from 'class-variance-authority';
2
+ /** `relative`, so the link at its foot can stretch over the whole card and make all of it one thing to press. */
3
+ export const siteWindowClass = 'group relative w-full min-w-0 max-w-xl overflow-hidden rounded-xl border border-border bg-card shadow-xl transition-colors motion-base has-data-hovered:border-border-strong has-data-focus-visible:ring-2 has-data-focus-visible:ring-ring';
4
+ export const siteWindowBarClass = 'flex items-center gap-3 border-b border-border bg-background-secondary px-3.5 py-2.5';
5
+ export const siteWindowDotsClass = 'flex shrink-0 gap-1.5';
6
+ export const siteWindowDotClass = 'h-2.5 w-2.5 rounded-full bg-border-strong';
7
+ export const siteWindowAddressClass = 'min-w-0 flex-1 truncate text-center font-mono text-xs text-foreground-subtle';
8
+ export const siteWindowSpacerClass = 'w-10 shrink-0';
9
+ /**
10
+ * The page is drawn at twice the card's width and shown at half its size, so it looks as it does on
11
+ * a desktop. It cannot be pressed or reached by the keyboard: the card is a way to edit the page, not the page.
12
+ */
13
+ export const siteWindowViewVariants = cva('relative overflow-hidden bg-background', {
14
+ variants: { size: { md: 'h-72', sm: 'h-40' } },
15
+ defaultVariants: { size: 'md' },
16
+ });
17
+ /** `sm` draws the page wider still and shows it at a fifth of its size, for a narrow column. */
18
+ export const siteWindowFrameVariants = cva('pointer-events-none absolute top-0 left-0 origin-top-left border-0', {
19
+ variants: { size: { md: 'h-144 w-288 scale-50', sm: 'h-200 w-320 scale-20' } },
20
+ defaultVariants: { size: 'md' },
21
+ });
22
+ export const siteWindowFootClass = 'flex items-center gap-3 border-t border-border px-4 py-3 text-sm';
23
+ export const siteWindowMetaClass = 'min-w-0 flex-1 truncate text-foreground-muted';
24
+ export const siteWindowLinkClass = 'shrink-0 font-semibold text-foreground outline-none after:absolute after:inset-0 group-hover:underline';
25
+ //# sourceMappingURL=SiteWindow.variants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SiteWindow.variants.js","sourceRoot":"","sources":["../../../src/patterns/SiteWindow/SiteWindow.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,iHAAiH;AACjH,MAAM,CAAC,MAAM,eAAe,GAC1B,6OAA6O,CAAC;AAChP,MAAM,CAAC,MAAM,kBAAkB,GAAG,sFAAsF,CAAC;AACzH,MAAM,CAAC,MAAM,mBAAmB,GAAG,uBAAuB,CAAC;AAC3D,MAAM,CAAC,MAAM,kBAAkB,GAAG,2CAA2C,CAAC;AAC9E,MAAM,CAAC,MAAM,sBAAsB,GAAG,8EAA8E,CAAC;AACrH,MAAM,CAAC,MAAM,qBAAqB,GAAG,eAAe,CAAC;AACrD;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAC,wCAAwC,EAAE;IAClF,QAAQ,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE;IAC9C,eAAe,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;CAChC,CAAC,CAAC;AACH,gGAAgG;AAChG,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAC,oEAAoE,EAAE;IAC/G,QAAQ,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,sBAAsB,EAAE,EAAE,EAAE,sBAAsB,EAAE,EAAE;IAC9E,eAAe,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;CAChC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,kEAAkE,CAAC;AACtG,MAAM,CAAC,MAAM,mBAAmB,GAAG,+CAA+C,CAAC;AACnF,MAAM,CAAC,MAAM,mBAAmB,GAAG,wGAAwG,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { SiteWindow, type SiteWindowProps } from './SiteWindow.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/patterns/SiteWindow/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { SiteWindow } from './SiteWindow.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/patterns/SiteWindow/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAwB,MAAM,iBAAiB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  /** One column on a narrow screen; the main column and a side column from `xl` up. */
2
2
  export declare const splitClass = "mx-auto flex w-full max-w-7xl flex-col gap-6 xl:flex-row xl:items-start";
3
3
  export declare const splitMainClass = "flex min-w-0 flex-1 flex-col gap-6";
4
- /** The side column stays in view while the main column scrolls under the bar at the top. */
5
- export declare const splitAsideClass = "flex w-full shrink-0 flex-col gap-6 xl:sticky xl:top-24 xl:w-80";
4
+ /** The side column stays in view while the main column scrolls, as far from the top as the screen's own padding. */
5
+ export declare const splitAsideClass = "flex w-full shrink-0 flex-col gap-6 xl:sticky xl:top-8 xl:w-80";
6
6
  //# sourceMappingURL=Split.variants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Split.variants.d.ts","sourceRoot":"","sources":["../../../src/patterns/Split/Split.variants.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,eAAO,MAAM,UAAU,4EAA4E,CAAC;AACpG,eAAO,MAAM,cAAc,uCAAuC,CAAC;AACnE,4FAA4F;AAC5F,eAAO,MAAM,eAAe,oEAAoE,CAAC"}
1
+ {"version":3,"file":"Split.variants.d.ts","sourceRoot":"","sources":["../../../src/patterns/Split/Split.variants.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,eAAO,MAAM,UAAU,4EAA4E,CAAC;AACpG,eAAO,MAAM,cAAc,uCAAuC,CAAC;AACnE,oHAAoH;AACpH,eAAO,MAAM,eAAe,mEAAmE,CAAC"}
@@ -1,6 +1,6 @@
1
1
  /** One column on a narrow screen; the main column and a side column from `xl` up. */
2
2
  export const splitClass = 'mx-auto flex w-full max-w-7xl flex-col gap-6 xl:flex-row xl:items-start';
3
3
  export const splitMainClass = 'flex min-w-0 flex-1 flex-col gap-6';
4
- /** The side column stays in view while the main column scrolls under the bar at the top. */
5
- export const splitAsideClass = 'flex w-full shrink-0 flex-col gap-6 xl:sticky xl:top-24 xl:w-80';
4
+ /** The side column stays in view while the main column scrolls, as far from the top as the screen's own padding. */
5
+ export const splitAsideClass = 'flex w-full shrink-0 flex-col gap-6 xl:sticky xl:top-8 xl:w-80';
6
6
  //# sourceMappingURL=Split.variants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Split.variants.js","sourceRoot":"","sources":["../../../src/patterns/Split/Split.variants.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,MAAM,CAAC,MAAM,UAAU,GAAG,yEAAyE,CAAC;AACpG,MAAM,CAAC,MAAM,cAAc,GAAG,oCAAoC,CAAC;AACnE,4FAA4F;AAC5F,MAAM,CAAC,MAAM,eAAe,GAAG,iEAAiE,CAAC"}
1
+ {"version":3,"file":"Split.variants.js","sourceRoot":"","sources":["../../../src/patterns/Split/Split.variants.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,MAAM,CAAC,MAAM,UAAU,GAAG,yEAAyE,CAAC;AACpG,MAAM,CAAC,MAAM,cAAc,GAAG,oCAAoC,CAAC;AACnE,oHAAoH;AACpH,MAAM,CAAC,MAAM,eAAe,GAAG,gEAAgE,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface WelcomeProps {
3
+ /** A few words over the title, such as today's date. */
4
+ readonly eyebrow?: string;
5
+ /** The screen's one heading: "Good morning, Dana. 3 drafts are waiting." */
6
+ readonly title: string;
7
+ /** Words inside the title to set apart, such as "3 drafts". Its first appearance is marked. */
8
+ readonly highlight?: string;
9
+ /** One or two sentences under the title. */
10
+ readonly description?: string;
11
+ /** What to do first: one main `Button` and one or two others. */
12
+ readonly actions?: ReactNode;
13
+ /** Beside the words, from a tablet's width up: a `SiteWindow`. A phone leaves it out. */
14
+ readonly aside?: ReactNode;
15
+ }
16
+ /** The top of a screen that greets the person: what matters now in large words, what to do about it, and the site beside it. */
17
+ export declare function Welcome({ eyebrow, title, highlight, description, actions, aside }: WelcomeProps): import("react").JSX.Element;
18
+ //# sourceMappingURL=Welcome.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Welcome.d.ts","sourceRoot":"","sources":["../../../src/patterns/Welcome/Welcome.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAavC,MAAM,WAAW,YAAY;IAC3B,wDAAwD;IACxD,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,4EAA4E;IAC5E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,+FAA+F;IAC/F,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,4CAA4C;IAC5C,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,iEAAiE;IACjE,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC;IAC7B,yFAAyF;IACzF,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC;CAC5B;AAsBD,gIAAgI;AAChI,wBAAgB,OAAO,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,YAAY,+BAc/F"}
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { welcomeActionsClass, welcomeAsideClass, welcomeClass, welcomeDescriptionClass, welcomeEyebrowClass, welcomeInnerClass, welcomeMarkClass, welcomeTextClass, welcomeTitleClass, } from './Welcome.variants.js';
3
+ /** Where the words first stand whole in the title (a name "No" is not the end of "afternoon"), else where they first appear. */
4
+ function placeOf(title, words) {
5
+ const escaped = words.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
6
+ const whole = new RegExp(`(?<![\\p{L}\\p{N}])${escaped}(?![\\p{L}\\p{N}])`, 'u').exec(title);
7
+ return whole ? whole.index : title.indexOf(words);
8
+ }
9
+ /** The title with the highlighted words marked, where they appear in it. */
10
+ function marked(title, highlight) {
11
+ const at = highlight === undefined || highlight === '' ? -1 : placeOf(title, highlight);
12
+ if (highlight === undefined || at < 0)
13
+ return title;
14
+ return (_jsxs(_Fragment, { children: [title.slice(0, at), _jsx("mark", { className: welcomeMarkClass, children: highlight }), title.slice(at + highlight.length)] }));
15
+ }
16
+ /** The top of a screen that greets the person: what matters now in large words, what to do about it, and the site beside it. */
17
+ export function Welcome({ eyebrow, title, highlight, description, actions, aside }) {
18
+ return (_jsx("section", { className: welcomeClass, children: _jsxs("div", { className: welcomeInnerClass, children: [_jsxs("div", { className: welcomeTextClass, children: [eyebrow !== undefined && _jsx("p", { className: welcomeEyebrowClass, children: eyebrow }), _jsx("h1", { className: welcomeTitleClass, children: marked(title, highlight) }), description !== undefined && _jsx("p", { className: welcomeDescriptionClass, children: description }), actions !== undefined && _jsx("div", { className: welcomeActionsClass, children: actions })] }), aside !== undefined && _jsx("div", { className: welcomeAsideClass, children: aside })] }) }));
19
+ }
20
+ //# sourceMappingURL=Welcome.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Welcome.js","sourceRoot":"","sources":["../../../src/patterns/Welcome/Welcome.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,YAAY,EACZ,uBAAuB,EACvB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,uBAAuB,CAAC;AAiB/B,gIAAgI;AAChI,SAAS,OAAO,CAAC,KAAa,EAAE,KAAa;IAC3C,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;IAC7D,MAAM,KAAK,GAAG,I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AK,SAAS,EAAE,mBAAmB,YAAG,OAAO,GAAO,IAC1E,EACL,KAAK,KAAK,SAAS,IAAI,cAAK,SAAS,EAAE,iBAAiB,YAAG,KAAK,GAAO,IACpE,GACE,CACX,CAAC;AACJ,CAAC"}
@@ -0,0 +1,12 @@
1
+ export declare const welcomeClass = "border-b border-border bg-background bg-grid";
2
+ export declare const welcomeInnerClass = "mx-auto flex max-w-7xl flex-wrap items-center gap-10 px-4 py-8 sm:px-6 md:px-12 md:py-12";
3
+ export declare const welcomeTextClass = "flex min-w-0 flex-1 basis-96 flex-col gap-4";
4
+ export declare const welcomeEyebrowClass = "text-xs font-semibold tracking-widest text-foreground-subtle uppercase";
5
+ export declare const welcomeTitleClass = "max-w-2xl font-display text-4xl font-bold tracking-tight text-balance text-foreground md:text-5xl";
6
+ /** The one phrase that matters on the screen, in the brand's colour, as a site's own hero sets its words apart: the only orange there. */
7
+ export declare const welcomeMarkClass = "bg-transparent text-brand-text";
8
+ export declare const welcomeDescriptionClass = "max-w-xl text-lg text-foreground-muted";
9
+ export declare const welcomeActionsClass = "flex flex-wrap gap-2 pt-2";
10
+ /** On a phone the words come first and alone: what stands beside them would push the screen's content far down. */
11
+ export declare const welcomeAsideClass = "hidden min-w-0 flex-1 basis-96 justify-center md:flex lg:justify-end";
12
+ //# sourceMappingURL=Welcome.variants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Welcome.variants.d.ts","sourceRoot":"","sources":["../../../src/patterns/Welcome/Welcome.variants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,iDAAiD,CAAC;AAC3E,eAAO,MAAM,iBAAiB,6FAA6F,CAAC;AAC5H,eAAO,MAAM,gBAAgB,gDAAgD,CAAC;AAC9E,eAAO,MAAM,mBAAmB,2EAA2E,CAAC;AAC5G,eAAO,MAAM,iBAAiB,sGAAsG,CAAC;AACrI,0IAA0I;AAC1I,eAAO,MAAM,gBAAgB,mCAAmC,CAAC;AACjE,eAAO,MAAM,uBAAuB,2CAA2C,CAAC;AAChF,eAAO,MAAM,mBAAmB,8BAA8B,CAAC;AAC/D,mHAAmH;AACnH,eAAO,MAAM,iBAAiB,yEAAyE,CAAC"}
@@ -0,0 +1,12 @@
1
+ export const welcomeClass = 'border-b border-border bg-background bg-grid';
2
+ export const welcomeInnerClass = 'mx-auto flex max-w-7xl flex-wrap items-center gap-10 px-4 py-8 sm:px-6 md:px-12 md:py-12';
3
+ export const welcomeTextClass = 'flex min-w-0 flex-1 basis-96 flex-col gap-4';
4
+ export const welcomeEyebrowClass = 'text-xs font-semibold tracking-widest text-foreground-subtle uppercase';
5
+ export const welcomeTitleClass = 'max-w-2xl font-display text-4xl font-bold tracking-tight text-balance text-foreground md:text-5xl';
6
+ /** The one phrase that matters on the screen, in the brand's colour, as a site's own hero sets its words apart: the only orange there. */
7
+ export const welcomeMarkClass = 'bg-transparent text-brand-text';
8
+ export const welcomeDescriptionClass = 'max-w-xl text-lg text-foreground-muted';
9
+ export const welcomeActionsClass = 'flex flex-wrap gap-2 pt-2';
10
+ /** On a phone the words come first and alone: what stands beside them would push the screen's content far down. */
11
+ export const welcomeAsideClass = 'hidden min-w-0 flex-1 basis-96 justify-center md:flex lg:justify-end';
12
+ //# sourceMappingURL=Welcome.variants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Welcome.variants.js","sourceRoot":"","sources":["../../../src/patterns/Welcome/Welcome.variants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG,8CAA8C,CAAC;AAC3E,MAAM,CAAC,MAAM,iBAAiB,GAAG,0FAA0F,CAAC;AAC5H,MAAM,CAAC,MAAM,gBAAgB,GAAG,6CAA6C,CAAC;AAC9E,MAAM,CAAC,MAAM,mBAAmB,GAAG,wEAAwE,CAAC;AAC5G,MAAM,CAAC,MAAM,iBAAiB,GAAG,mGAAmG,CAAC;AACrI,0IAA0I;AAC1I,MAAM,CAAC,MAAM,gBAAgB,GAAG,gCAAgC,CAAC;AACjE,MAAM,CAAC,MAAM,uBAAuB,GAAG,wCAAwC,CAAC;AAChF,MAAM,CAAC,MAAM,mBAAmB,GAAG,2BAA2B,CAAC;AAC/D,mHAAmH;AACnH,MAAM,CAAC,MAAM,iBAAiB,GAAG,sEAAsE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Welcome, type WelcomeProps } from './Welcome.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/patterns/Welcome/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Welcome } from './Welcome.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/patterns/Welcome/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAqB,MAAM,cAAc,CAAC"}