@velocity-astro/cms-ui 0.1.0-beta.7 → 0.1.0-beta.9

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 (205) hide show
  1. package/component-registry.json +72 -5
  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/Heading/Heading.d.ts +1 -1
  47. package/dist/components/Heading/Heading.d.ts.map +1 -1
  48. package/dist/components/Heading/Heading.js +2 -2
  49. package/dist/components/Heading/Heading.js.map +1 -1
  50. package/dist/components/Heading/Heading.variants.d.ts +1 -0
  51. package/dist/components/Heading/Heading.variants.d.ts.map +1 -1
  52. package/dist/components/Heading/Heading.variants.js +2 -0
  53. package/dist/components/Heading/Heading.variants.js.map +1 -1
  54. package/dist/components/Logo/Logo.d.ts +1 -1
  55. package/dist/components/Logo/Logo.d.ts.map +1 -1
  56. package/dist/components/Logo/Logo.js +3 -3
  57. package/dist/components/Logo/Logo.js.map +1 -1
  58. package/dist/components/Logo/Logo.variants.d.ts +5 -2
  59. package/dist/components/Logo/Logo.variants.d.ts.map +1 -1
  60. package/dist/components/Logo/Logo.variants.js +10 -1
  61. package/dist/components/Logo/Logo.variants.js.map +1 -1
  62. package/dist/components/Meter/Meter.d.ts +13 -0
  63. package/dist/components/Meter/Meter.d.ts.map +1 -0
  64. package/dist/components/Meter/Meter.js +8 -0
  65. package/dist/components/Meter/Meter.js.map +1 -0
  66. package/dist/components/Meter/Meter.variants.d.ts +14 -0
  67. package/dist/components/Meter/Meter.variants.d.ts.map +1 -0
  68. package/dist/components/Meter/Meter.variants.js +39 -0
  69. package/dist/components/Meter/Meter.variants.js.map +1 -0
  70. package/dist/components/Meter/index.d.ts +2 -0
  71. package/dist/components/Meter/index.d.ts.map +1 -0
  72. package/dist/components/Meter/index.js +2 -0
  73. package/dist/components/Meter/index.js.map +1 -0
  74. package/dist/components/Segmented/Segmented.d.ts +6 -1
  75. package/dist/components/Segmented/Segmented.d.ts.map +1 -1
  76. package/dist/components/Segmented/Segmented.js +9 -3
  77. package/dist/components/Segmented/Segmented.js.map +1 -1
  78. package/dist/components/Segmented/Segmented.variants.d.ts +7 -1
  79. package/dist/components/Segmented/Segmented.variants.d.ts.map +1 -1
  80. package/dist/components/Segmented/Segmented.variants.js +11 -3
  81. package/dist/components/Segmented/Segmented.variants.js.map +1 -1
  82. package/dist/components/Table/Table.d.ts +8 -1
  83. package/dist/components/Table/Table.d.ts.map +1 -1
  84. package/dist/components/Table/Table.js +4 -4
  85. package/dist/components/Table/Table.js.map +1 -1
  86. package/dist/components/Table/Table.variants.d.ts +6 -2
  87. package/dist/components/Table/Table.variants.d.ts.map +1 -1
  88. package/dist/components/Table/Table.variants.js +9 -4
  89. package/dist/components/Table/Table.variants.js.map +1 -1
  90. package/dist/components/index.d.ts +3 -0
  91. package/dist/components/index.d.ts.map +1 -1
  92. package/dist/components/index.js +3 -0
  93. package/dist/components/index.js.map +1 -1
  94. package/dist/patterns/AppShell/AppShell.d.ts +31 -8
  95. package/dist/patterns/AppShell/AppShell.d.ts.map +1 -1
  96. package/dist/patterns/AppShell/AppShell.js +31 -7
  97. package/dist/patterns/AppShell/AppShell.js.map +1 -1
  98. package/dist/patterns/AppShell/AppShell.variants.d.ts +70 -32
  99. package/dist/patterns/AppShell/AppShell.variants.d.ts.map +1 -1
  100. package/dist/patterns/AppShell/AppShell.variants.js +116 -38
  101. package/dist/patterns/AppShell/AppShell.variants.js.map +1 -1
  102. package/dist/patterns/AppShell/index.d.ts +1 -1
  103. package/dist/patterns/AppShell/index.d.ts.map +1 -1
  104. package/dist/patterns/AppShell/index.js.map +1 -1
  105. package/dist/patterns/CommandPalette/CommandPalette.d.ts +36 -0
  106. package/dist/patterns/CommandPalette/CommandPalette.d.ts.map +1 -0
  107. package/dist/patterns/CommandPalette/CommandPalette.js +18 -0
  108. package/dist/patterns/CommandPalette/CommandPalette.js.map +1 -0
  109. package/dist/patterns/CommandPalette/CommandPalette.variants.d.ts +18 -0
  110. package/dist/patterns/CommandPalette/CommandPalette.variants.d.ts.map +1 -0
  111. package/dist/patterns/CommandPalette/CommandPalette.variants.js +21 -0
  112. package/dist/patterns/CommandPalette/CommandPalette.variants.js.map +1 -0
  113. package/dist/patterns/CommandPalette/index.d.ts +2 -0
  114. package/dist/patterns/CommandPalette/index.d.ts.map +1 -0
  115. package/dist/patterns/CommandPalette/index.js +2 -0
  116. package/dist/patterns/CommandPalette/index.js.map +1 -0
  117. package/dist/patterns/Outline/Outline.d.ts +26 -0
  118. package/dist/patterns/Outline/Outline.d.ts.map +1 -0
  119. package/dist/patterns/Outline/Outline.js +21 -0
  120. package/dist/patterns/Outline/Outline.js.map +1 -0
  121. package/dist/patterns/Outline/Outline.variants.d.ts +11 -0
  122. package/dist/patterns/Outline/Outline.variants.d.ts.map +1 -0
  123. package/dist/patterns/Outline/Outline.variants.js +21 -0
  124. package/dist/patterns/Outline/Outline.variants.js.map +1 -0
  125. package/dist/patterns/Outline/index.d.ts +2 -0
  126. package/dist/patterns/Outline/index.d.ts.map +1 -0
  127. package/dist/patterns/Outline/index.js +2 -0
  128. package/dist/patterns/Outline/index.js.map +1 -0
  129. package/dist/patterns/PageHeader/PageHeader.d.ts +33 -4
  130. package/dist/patterns/PageHeader/PageHeader.d.ts.map +1 -1
  131. package/dist/patterns/PageHeader/PageHeader.js +31 -6
  132. package/dist/patterns/PageHeader/PageHeader.js.map +1 -1
  133. package/dist/patterns/PageHeader/PageHeader.variants.d.ts +23 -3
  134. package/dist/patterns/PageHeader/PageHeader.variants.d.ts.map +1 -1
  135. package/dist/patterns/PageHeader/PageHeader.variants.js +33 -3
  136. package/dist/patterns/PageHeader/PageHeader.variants.js.map +1 -1
  137. package/dist/patterns/PagePreview/PagePreview.d.ts +9 -1
  138. package/dist/patterns/PagePreview/PagePreview.d.ts.map +1 -1
  139. package/dist/patterns/PagePreview/PagePreview.js +6 -2
  140. package/dist/patterns/PagePreview/PagePreview.js.map +1 -1
  141. package/dist/patterns/SaveBar/SaveBar.d.ts +16 -5
  142. package/dist/patterns/SaveBar/SaveBar.d.ts.map +1 -1
  143. package/dist/patterns/SaveBar/SaveBar.js +21 -3
  144. package/dist/patterns/SaveBar/SaveBar.js.map +1 -1
  145. package/dist/patterns/SaveBar/SaveBar.variants.d.ts +25 -7
  146. package/dist/patterns/SaveBar/SaveBar.variants.d.ts.map +1 -1
  147. package/dist/patterns/SaveBar/SaveBar.variants.js +32 -10
  148. package/dist/patterns/SaveBar/SaveBar.variants.js.map +1 -1
  149. package/dist/patterns/SectionList/SectionList.d.ts.map +1 -1
  150. package/dist/patterns/SectionList/SectionList.js +2 -2
  151. package/dist/patterns/SectionList/SectionList.js.map +1 -1
  152. package/dist/patterns/SectionList/SectionList.variants.d.ts +4 -1
  153. package/dist/patterns/SectionList/SectionList.variants.d.ts.map +1 -1
  154. package/dist/patterns/SectionList/SectionList.variants.js +5 -2
  155. package/dist/patterns/SectionList/SectionList.variants.js.map +1 -1
  156. package/dist/patterns/SiteWindow/SiteWindow.d.ts +20 -0
  157. package/dist/patterns/SiteWindow/SiteWindow.d.ts.map +1 -0
  158. package/dist/patterns/SiteWindow/SiteWindow.js +8 -0
  159. package/dist/patterns/SiteWindow/SiteWindow.js.map +1 -0
  160. package/dist/patterns/SiteWindow/SiteWindow.variants.d.ts +24 -0
  161. package/dist/patterns/SiteWindow/SiteWindow.variants.d.ts.map +1 -0
  162. package/dist/patterns/SiteWindow/SiteWindow.variants.js +25 -0
  163. package/dist/patterns/SiteWindow/SiteWindow.variants.js.map +1 -0
  164. package/dist/patterns/SiteWindow/index.d.ts +2 -0
  165. package/dist/patterns/SiteWindow/index.d.ts.map +1 -0
  166. package/dist/patterns/SiteWindow/index.js +2 -0
  167. package/dist/patterns/SiteWindow/index.js.map +1 -0
  168. package/dist/patterns/Split/Split.variants.d.ts +2 -2
  169. package/dist/patterns/Split/Split.variants.d.ts.map +1 -1
  170. package/dist/patterns/Split/Split.variants.js +2 -2
  171. package/dist/patterns/Split/Split.variants.js.map +1 -1
  172. package/dist/patterns/Welcome/Welcome.d.ts +18 -0
  173. package/dist/patterns/Welcome/Welcome.d.ts.map +1 -0
  174. package/dist/patterns/Welcome/Welcome.js +14 -0
  175. package/dist/patterns/Welcome/Welcome.js.map +1 -0
  176. package/dist/patterns/Welcome/Welcome.variants.d.ts +12 -0
  177. package/dist/patterns/Welcome/Welcome.variants.d.ts.map +1 -0
  178. package/dist/patterns/Welcome/Welcome.variants.js +12 -0
  179. package/dist/patterns/Welcome/Welcome.variants.js.map +1 -0
  180. package/dist/patterns/Welcome/index.d.ts +2 -0
  181. package/dist/patterns/Welcome/index.d.ts.map +1 -0
  182. package/dist/patterns/Welcome/index.js +2 -0
  183. package/dist/patterns/Welcome/index.js.map +1 -0
  184. package/dist/patterns/Workbench/Workbench.d.ts +26 -5
  185. package/dist/patterns/Workbench/Workbench.d.ts.map +1 -1
  186. package/dist/patterns/Workbench/Workbench.js +53 -7
  187. package/dist/patterns/Workbench/Workbench.js.map +1 -1
  188. package/dist/patterns/Workbench/Workbench.variants.d.ts +36 -2
  189. package/dist/patterns/Workbench/Workbench.variants.d.ts.map +1 -1
  190. package/dist/patterns/Workbench/Workbench.variants.js +70 -8
  191. package/dist/patterns/Workbench/Workbench.variants.js.map +1 -1
  192. package/dist/patterns/Workbench/index.d.ts +1 -1
  193. package/dist/patterns/Workbench/index.d.ts.map +1 -1
  194. package/dist/patterns/Workbench/index.js.map +1 -1
  195. package/dist/patterns/index.d.ts +4 -0
  196. package/dist/patterns/index.d.ts.map +1 -1
  197. package/dist/patterns/index.js +4 -0
  198. package/dist/patterns/index.js.map +1 -1
  199. package/dist/patterns/page-bar.d.ts +17 -0
  200. package/dist/patterns/page-bar.d.ts.map +1 -0
  201. package/dist/patterns/page-bar.js +22 -0
  202. package/dist/patterns/page-bar.js.map +1 -0
  203. package/package.json +1 -1
  204. package/src/styles.css +19 -0
  205. package/src/tokens/tokens.css +21 -1
@@ -0,0 +1,24 @@
1
+ import { type VariantProps } from 'class-variance-authority';
2
+ export declare const colorPickerVariants: (props?: ({
3
+ width?: "sm" | "md" | "full" | null | undefined;
4
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
5
+ /** The button with the colour in it, then the hex colour typed beside it. */
6
+ export declare const colorPickerRowClass = "flex items-center gap-2";
7
+ export declare const colorPickerSwatchButtonClass: string;
8
+ export declare const colorPickerSwatchClass = "size-full rounded-sm";
9
+ export declare const colorPickerInputClass: string;
10
+ /** The panel the colour is chosen in. */
11
+ export declare const colorPickerPopoverClass = "layer-overlay motion-float overflow-auto rounded-md border border-border bg-background-elevated p-1 shadow-lg outline-none p-3";
12
+ export declare const colorPickerDialogClass = "flex w-56 flex-col gap-3 outline-none";
13
+ /** Shades of the hue: saturation across, brightness up. */
14
+ export declare const colorPickerAreaClass = "aspect-square w-full rounded-md";
15
+ export declare const colorPickerThumbClass: string;
16
+ export declare const colorPickerSliderClass = "flex w-full flex-col";
17
+ export declare const colorPickerTrackClass = "h-6 w-full rounded-md";
18
+ export declare const colorPickerSliderThumbClass: string;
19
+ /** The colours a template suggests, a press away. */
20
+ export declare const colorPickerPresetsClass = "grid grid-cols-6 gap-2";
21
+ export declare const colorPickerPresetClass: string;
22
+ export declare const colorPickerPresetSwatchClass = "size-full rounded-md";
23
+ export type ColorPickerVariants = VariantProps<typeof colorPickerVariants>;
24
+ //# sourceMappingURL=ColorPicker.variants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColorPicker.variants.d.ts","sourceRoot":"","sources":["../../../src/components/ColorPicker/ColorPicker.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,eAAO,MAAM,mBAAmB;;8EAS9B,CAAC;AAEH,6EAA6E;AAC7E,eAAO,MAAM,mBAAmB,4BAA4B,CAAC;AAC7D,eAAO,MAAM,4BAA4B,QAI9B,CAAC;AACZ,eAAO,MAAM,sBAAsB,yBAAyB,CAAC;AAC7D,eAAO,MAAM,qBAAqB,QAA4D,CAAC;AAE/F,yCAAyC;AACzC,eAAO,MAAM,uBAAuB,mIAA8B,CAAC;AACnE,eAAO,MAAM,sBAAsB,0CAA0C,CAAC;AAC9E,2DAA2D;AAC3D,eAAO,MAAM,oBAAoB,oCAAoC,CAAC;AACtE,eAAO,MAAM,qBAAqB,QAGvB,CAAC;AACZ,eAAO,MAAM,sBAAsB,yBAAyB,CAAC;AAC7D,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAC7D,eAAO,MAAM,2BAA2B,QAAqC,CAAC;AAC9E,qDAAqD;AACrD,eAAO,MAAM,uBAAuB,2BAA2B,CAAC;AAChE,eAAO,MAAM,sBAAsB,QAIxB,CAAC;AACZ,eAAO,MAAM,4BAA4B,yBAAyB,CAAC;AAEnE,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { cva } from 'class-variance-authority';
2
+ import { fieldControlClass, floatingPanelClass } from '../field.js';
3
+ export const colorPickerVariants = cva('flex flex-col gap-1.5', {
4
+ variants: {
5
+ width: {
6
+ full: 'w-full',
7
+ md: 'w-80',
8
+ sm: 'w-48',
9
+ },
10
+ },
11
+ defaultVariants: { width: 'full' },
12
+ });
13
+ /** The button with the colour in it, then the hex colour typed beside it. */
14
+ export const colorPickerRowClass = 'flex items-center gap-2';
15
+ export const colorPickerSwatchButtonClass = [
16
+ 'flex size-10 shrink-0 cursor-default items-center justify-center rounded-md border border-input-border bg-input p-1',
17
+ 'outline-none transition-colors motion-fast data-hovered:border-border-strong',
18
+ 'data-focus-visible:ring-2 data-focus-visible:ring-ring data-disabled:opacity-50',
19
+ ].join(' ');
20
+ export const colorPickerSwatchClass = 'size-full rounded-sm';
21
+ export const colorPickerInputClass = `${fieldControlClass} min-w-0 flex-1 font-mono uppercase`;
22
+ /** The panel the colour is chosen in. */
23
+ export const colorPickerPopoverClass = `${floatingPanelClass} p-3`;
24
+ export const colorPickerDialogClass = 'flex w-56 flex-col gap-3 outline-none';
25
+ /** Shades of the hue: saturation across, brightness up. */
26
+ export const colorPickerAreaClass = 'aspect-square w-full rounded-md';
27
+ export const colorPickerThumbClass = [
28
+ 'size-5 rounded-full border-2 border-background shadow-md',
29
+ 'data-focus-visible:size-6 data-dragging:size-6',
30
+ ].join(' ');
31
+ export const colorPickerSliderClass = 'flex w-full flex-col';
32
+ export const colorPickerTrackClass = 'h-6 w-full rounded-md';
33
+ export const colorPickerSliderThumbClass = `${colorPickerThumbClass} top-1/2`;
34
+ /** The colours a template suggests, a press away. */
35
+ export const colorPickerPresetsClass = 'grid grid-cols-6 gap-2';
36
+ export const colorPickerPresetClass = [
37
+ 'size-7 cursor-default rounded-md outline-none',
38
+ 'data-selected:ring-2 data-selected:ring-ring data-selected:ring-offset-2 data-selected:ring-offset-background-elevated',
39
+ 'data-focus-visible:ring-2 data-focus-visible:ring-ring',
40
+ ].join(' ');
41
+ export const colorPickerPresetSwatchClass = 'size-full rounded-md';
42
+ //# sourceMappingURL=ColorPicker.variants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColorPicker.variants.js","sourceRoot":"","sources":["../../../src/components/ColorPicker/ColorPicker.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEpE,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG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B,GAAG,sBAAsB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { ColorPicker, type ColorPickerProps } from './ColorPicker.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ColorPicker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { ColorPicker } from './ColorPicker.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ColorPicker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAyB,MAAM,kBAAkB,CAAC"}
@@ -12,7 +12,9 @@ export interface FileButtonProps {
12
12
  readonly isPending?: boolean;
13
13
  readonly variant?: 'primary' | 'secondary';
14
14
  readonly size?: 'sm' | 'md';
15
+ /** On a phone, its icon alone, as `Button`'s `collapses`. */
16
+ readonly collapses?: boolean;
15
17
  }
16
18
  /** A button that opens the computer's file chooser and hands back the file that was picked. */
17
- export declare function FileButton({ children, icon, accept, onSelect, isPending, variant, size }: FileButtonProps): import("react").JSX.Element;
19
+ export declare function FileButton({ children, icon, accept, onSelect, isPending, variant, size, collapses }: FileButtonProps): import("react").JSX.Element;
18
20
  //# sourceMappingURL=FileButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FileButton.d.ts","sourceRoot":"","sources":["../../../src/components/FileButton/FileButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpE,MAAM,WAAW,eAAe;IAC9B,yDAAyD;IACzD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,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S,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,+FAA+F;AAC/F,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAiB,EAAE,OAAqB,EAAE,IAAW,EAAE,SAAiB,EAAE,EAAE,eAAe,+BAczJ"}
@@ -3,11 +3,11 @@ import { FileTrigger } from 'react-aria-components';
3
3
  import { Button } from '../Button/index.js';
4
4
  import { fileKinds } from './FileButton.variants.js';
5
5
  /** A button that opens the computer's file chooser and hands back the file that was picked. */
6
- export function FileButton({ children, icon, accept, onSelect, isPending = false, variant = 'secondary', size = 'md' }) {
6
+ export function FileButton({ children, icon, accept, onSelect, isPending = false, variant = 'secondary', size = 'md', collapses = false }) {
7
7
  return (_jsx(FileTrigger, { acceptedFileTypes: [...fileKinds[accept]], onSelect: (files) => {
8
8
  const file = files?.[0];
9
9
  if (file)
10
10
  onSelect(file);
11
- }, children: _jsx(Button, { variant: variant, size: size, isPending: isPending, ...(icon && { icon }), children: children }) }));
11
+ }, children: _jsx(Button, { variant: variant, size: size, isPending: isPending, collapses: collapses, ...(icon && { icon }), children: children }) }));
12
12
  }
13
13
  //# sourceMappingURL=FileButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FileButton.js","sourceRoot":"","sources":["../../../src/components/FileButton/FileButton.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAiB,MAAM,0BAA0B,CAAC;AAgBpE,+FAA+F;AAC/F,MAAM,UAAU,UAAU,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,GAAG,KAAK,EAAE,OAAO,GAAG,WAAW,EAAE,IAAI,GAAG,IAAI,EAAmB;IACrI,OAAO,CACL,KAAC,WAAW,IACV,iBAAiB,EAAE,CA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AAI,EAAE,IAAI,EAAE,CAAC,YACrG,QAAQ,GACF,GACG,CACf,CAAC;AACJ,CAAC"}
@@ -6,5 +6,5 @@ export interface HeadingProps extends HeadingVariants {
6
6
  readonly children?: ReactNode;
7
7
  }
8
8
  /** A title. `level` sets its place in the outline; `size` changes only how big it looks. */
9
- export declare function Heading({ level, size, children }: HeadingProps): import("react").JSX.Element;
9
+ export declare function Heading({ level, size, truncate, children }: HeadingProps): import("react").JSX.Element;
10
10
  //# sourceMappingURL=Heading.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Heading.d.ts","sourceRoot":"","sources":["../../../src/components/Heading/Heading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAiC,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE5F,MAAM,WAAW,YAAa,SAAQ,eAAe;IACnD,iGAAiG;IACjG,QAAQ,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC9B,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;CAC/B;AAID,4FAA4F;AAC5F,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,YAAY,+BAG9D"}
1
+ {"version":3,"file":"Heading.d.ts","sourceRoot":"","sources":["../../../src/components/Heading/Heading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAiC,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE5F,MAAM,WAAW,YAAa,SAAQ,eAAe;IACnD,iGAAiG;IACjG,QAAQ,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC9B,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;CAC/B;AAID,4FAA4F;AAC5F,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,YAAY,+BAGxE"}
@@ -2,8 +2,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { headingVariants, sizeForLevel } from './Heading.variants.js';
3
3
  const ELEMENTS = { 1: 'h1', 2: 'h2', 3: 'h3', 4: 'h4' };
4
4
  /** A title. `level` sets its place in the outline; `size` changes only how big it looks. */
5
- export function Heading({ level, size, children }) {
5
+ export function Heading({ level, size, truncate, children }) {
6
6
  const Element = ELEMENTS[level];
7
- return _jsx(Element, { className: headingVariants({ size: size ?? sizeForLevel[level] }), children: children });
7
+ return _jsx(Element, { className: headingVariants({ size: size ?? sizeForLevel[level], truncate }), children: children });
8
8
  }
9
9
  //# sourceMappingURL=Heading.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Heading.js","sourceRoot":"","sources":["../../../src/components/Heading/Heading.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAwB,MAAM,uBAAuB,CAAC;AAQ5F,MAAM,QAAQ,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAW,CAAC;AAEjE,4FAA4F;AAC5F,MAAM,UAAU,OAAO,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAgB;IAC7D,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAChC,OAAO,KAAC,OAAO,IAAC,SAAS,EAAE,eAAe,CAAC,EAAE,IAAI,EAAE,IAAI,IAAI,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC,YAAG,QAAQ,GAAW,CAAC;AAC1G,CAAC"}
1
+ {"version":3,"file":"Heading.js","sourceRoot":"","sources":["../../../src/components/Heading/Heading.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAwB,MAAM,uBAAuB,CAAC;AAQ5F,MAAM,QAAQ,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAW,CAAC;AAEjE,4FAA4F;AAC5F,MAAM,UAAU,OAAO,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAgB;IACvE,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAChC,OAAO,KAAC,OAAO,IAAC,SAAS,EAAE,eAAe,CAAC,EAAE,IAAI,EAAE,IAAI,IAAI,YAAY,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC,YAAG,QAAQ,GAAW,CAAC;AACpH,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { type VariantProps } from 'class-variance-authority';
2
2
  export declare const headingVariants: (props?: ({
3
3
  size?: "sm" | "md" | "lg" | "display" | "xl" | null | undefined;
4
+ truncate?: boolean | null | undefined;
4
5
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
5
6
  /** The size a heading has when none is given: one step smaller for each level down. */
6
7
  export declare const sizeForLevel: {
@@ -1 +1 @@
1
- {"version":3,"file":"Heading.variants.d.ts","sourceRoot":"","sources":["../../../src/components/Heading/Heading.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,eAAe;;8EAW1B,CAAC;AAEH,uFAAuF;AACvF,eAAO,MAAM,YAAY;;;;;CAAuD,CAAC;AAEjF,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,OAAO,eAAe,CAAC,CAAC"}
1
+ {"version":3,"file":"Heading.variants.d.ts","sourceRoot":"","sources":["../../../src/components/Heading/Heading.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,eAAe;;;8EAa1B,CAAC;AAEH,uFAAuF;AACvF,eAAO,MAAM,YAAY;;;;;CAAuD,CAAC;AAEjF,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,OAAO,eAAe,CAAC,CAAC"}
@@ -9,6 +9,8 @@ export const headingVariants = cva('text-foreground tracking-tight', {
9
9
  // A screen's title: the display face, as on the site itself.
10
10
  display: 'font-display text-3xl font-bold',
11
11
  },
12
+ /** One line, cut with an ellipsis: for a title in a bar, where a long name must not push the buttons off. */
13
+ truncate: { true: 'truncate', false: '' },
12
14
  },
13
15
  });
14
16
  /** The size a heading has when none is given: one step smaller for each level down. */
@@ -1 +1 @@
1
- {"version":3,"file":"Heading.variants.js","sourceRoot":"","sources":["../../../src/components/Heading/Heading.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAC,gCAAgC,EAAE;IACnE,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,EAAE,EAAE,yBAAyB;YAC7B,EAAE,EAAE,uBAAuB;YAC3B,EAAE,EAAE,uBAAuB;YAC3B,EAAE,EAAE,wBAAwB;YAC5B,6DAA6D;YAC7D,OAAO,EAAE,iCAAiC;SAC3C;KACF;CACF,CAAC,CAAC;AAEH,uFAAuF;AACvF,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAW,CAAC"}
1
+ {"version":3,"file":"Heading.variants.js","sourceRoot":"","sources":["../../../src/components/Heading/Heading.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAC,gCAAgC,EAAE;IACnE,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,EAAE,EAAE,yBAAyB;YAC7B,EAAE,EAAE,uBAAuB;YAC3B,EAAE,EAAE,uBAAuB;YAC3B,EAAE,EAAE,wBAAwB;YAC5B,6DAA6D;YAC7D,OAAO,EAAE,iCAAiC;SAC3C;QACD,6GAA6G;QAC7G,QAAQ,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,EAAE;KAC1C;CACF,CAAC,CAAC;AAEH,uFAAuF;AACvF,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAW,CAAC"}
@@ -4,5 +4,5 @@ export interface LogoProps extends LogoVariants {
4
4
  readonly label: string;
5
5
  }
6
6
  /** The Velocity mark. */
7
- export declare function Logo({ label, size }: LogoProps): import("react").JSX.Element;
7
+ export declare function Logo({ label, size, tone }: LogoProps): import("react").JSX.Element;
8
8
  //# sourceMappingURL=Logo.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Logo.d.ts","sourceRoot":"","sources":["../../../src/components/Logo/Logo.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgD,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAErG,MAAM,WAAW,SAAU,SAAQ,YAAY;IAC7C,wEAAwE;IACxE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,yBAAyB;AACzB,wBAAgB,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,SAAS,+BAiB9C"}
1
+ {"version":3,"file":"Logo.d.ts","sourceRoot":"","sources":["../../../src/components/Logo/Logo.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmD,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAExG,MAAM,WAAW,SAAU,SAAQ,YAAY;IAC7C,wEAAwE;IACxE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,yBAAyB;AACzB,wBAAgB,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,SAAS,+BAiBpD"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { logoAccentClass, logoBodyClass, logoVariants } from './Logo.variants.js';
2
+ import { logoAccentClass, logoBodyVariants, logoVariants } from './Logo.variants.js';
3
3
  /** The Velocity mark. */
4
- export function Logo({ label, size }) {
5
- return (_jsxs("svg", { role: "img", "aria-label": label, viewBox: "0 0 90 101", className: logoVariants({ size }), children: [_jsx("path", { className: logoAccentClass, d: "M35.1288 23.8398L45.1667 49.4151L56.2482 23.8398H87.1082C86.5647 23.3764 85.9776 22.9637 85.3616 22.5944L48.6165 0.704798C46.377 -0.0699896 43.4273 -0.439281 41.2675 0.842377L3.36286 23.3692C3.13819 23.5067 2.92801 23.666 2.72508 23.8326H35.1288V23.8398Z" }), _jsx("path", { className: logoBodyClass, d: "M0.144951 28.8578C0.079723 29.2851 0.0434853 29.7123 0.0434853 30.1323L0 72.036C0 76.1778 1.95684 78.3936 5.26172 80.3631L39.4919 100.703L0.144951 28.8578Z" }), _jsx("path", { className: logoBodyClass, d: "M89.9203 28.7058L50.0588 101L86.6661 79.1539C88.7027 77.9374 90 75.0265 90 72.6442L89.9783 29.6037C89.9783 29.2923 89.9493 28.9954 89.913 28.6985L89.9203 28.7058Z" })] }));
4
+ export function Logo({ label, size, tone }) {
5
+ return (_jsxs("svg", { role: "img", "aria-label": label, viewBox: "0 0 90 101", className: logoVariants({ size }), children: [_jsx("path", { className: logoAccentClass, d: "M35.1288 23.8398L45.1667 49.4151L56.2482 23.8398H87.1082C86.5647 23.3764 85.9776 22.9637 85.3616 22.5944L48.6165 0.704798C46.377 -0.0699896 43.4273 -0.439281 41.2675 0.842377L3.36286 23.3692C3.13819 23.5067 2.92801 23.666 2.72508 23.8326H35.1288V23.8398Z" }), _jsx("path", { className: logoBodyVariants({ tone }), d: "M0.144951 28.8578C0.079723 29.2851 0.0434853 29.7123 0.0434853 30.1323L0 72.036C0 76.1778 1.95684 78.3936 5.26172 80.3631L39.4919 100.703L0.144951 28.8578Z" }), _jsx("path", { className: logoBodyVariants({ tone }), d: "M89.9203 28.7058L50.0588 101L86.6661 79.1539C88.7027 77.9374 90 75.0265 90 72.6442L89.9783 29.6037C89.9783 29.2923 89.9493 28.9954 89.913 28.6985L89.9203 28.7058Z" })] }));
6
6
  }
7
7
  //# sourceMappingURL=Logo.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Logo.js","sourceRoot":"","sources":["../../../src/components/Logo/Logo.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,YAAY,EAAqB,MAAM,oBAAoB,CAAC;AAOrG,yBAAyB;AACzB,MAAM,UAAU,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,EAAa;IAC7C,OAAO,CACL,eAAK,IAAI,EAAC,KAAK,gBAAa,KAAK,EAAE,OAAO,EAAC,YAAY,EAAC,SAAS,EAAE,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC,aACvF,eACE,SAAS,EAAE,eAAe,EAC1B,CAAC,EAAC,gQAAgQ,GAClQ,EACF,eACE,SAAS,EAAE,aAAa,EACxB,CAAC,EAAC,6JAA6J,GAC/J,EACF,eACE,SAAS,EAAE,aAAa,EACxB,CAAC,EAAC,oKAAoK,GACtK,IACE,CACP,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"Logo.js","sourceRoot":"","sources":["../../../src/components/Logo/Logo.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,YAAY,EAAqB,MAAM,oBAAoB,CAAC;AAOxG,yBAAyB;AACzB,MAAM,UAAU,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAa;IACnD,OAAO,CACL,eAAK,IAAI,EAAC,KAAK,gBAAa,KAAK,EAAE,OAAO,EAAC,YAAY,EAAC,SAAS,EAAE,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC,aACvF,eACE,SAAS,EAAE,eAAe,EAC1B,CAAC,EAAC,gQAAgQ,GAClQ,EACF,eACE,SAAS,EAAE,gBAAgB,CAAC,EAAE,IAAI,EAAE,CAAC,EACrC,CAAC,EAAC,6JAA6J,GAC/J,EACF,eACE,SAAS,EAAE,gBAAgB,CAAC,EAAE,IAAI,EAAE,CAAC,EACrC,CAAC,EAAC,oKAAoK,GACtK,IACE,CACP,CAAC;AACJ,CAAC"}
@@ -4,6 +4,9 @@ export declare const logoVariants: (props?: ({
4
4
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
5
5
  /** The top of the mark is the brand colour; the rest follows the text, so it works in the dark. */
6
6
  export declare const logoAccentClass = "fill-brand-fill";
7
- export declare const logoBodyClass = "fill-foreground";
8
- export type LogoVariants = VariantProps<typeof logoVariants>;
7
+ /** The rest of the mark: the text's colour on the page, light on the rail, which is dark in both themes. */
8
+ export declare const logoBodyVariants: (props?: ({
9
+ tone?: "default" | "rail" | null | undefined;
10
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
11
+ export type LogoVariants = VariantProps<typeof logoVariants> & VariantProps<typeof logoBodyVariants>;
9
12
  //# sourceMappingURL=Logo.variants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Logo.variants.d.ts","sourceRoot":"","sources":["../../../src/components/Logo/Logo.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,YAAY;;8EASvB,CAAC;AAEH,mGAAmG;AACnG,eAAO,MAAM,eAAe,oBAAoB,CAAC;AACjD,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAE/C,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,CAAC"}
1
+ {"version":3,"file":"Logo.variants.d.ts","sourceRoot":"","sources":["../../../src/components/Logo/Logo.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,YAAY;;8EASvB,CAAC;AAEH,mGAAmG;AACnG,eAAO,MAAM,eAAe,oBAAoB,CAAC;AACjD,4GAA4G;AAC5G,eAAO,MAAM,gBAAgB;;8EAQ3B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,GAAG,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
@@ -11,5 +11,14 @@ export const logoVariants = cva('shrink-0', {
11
11
  });
12
12
  /** The top of the mark is the brand colour; the rest follows the text, so it works in the dark. */
13
13
  export const logoAccentClass = 'fill-brand-fill';
14
- export const logoBodyClass = 'fill-foreground';
14
+ /** The rest of the mark: the text's colour on the page, light on the rail, which is dark in both themes. */
15
+ export const logoBodyVariants = cva('', {
16
+ variants: {
17
+ tone: {
18
+ default: 'fill-foreground',
19
+ rail: 'fill-rail-foreground',
20
+ },
21
+ },
22
+ defaultVariants: { tone: 'default' },
23
+ });
15
24
  //# sourceMappingURL=Logo.variants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Logo.variants.js","sourceRoot":"","sources":["../../../src/components/Logo/Logo.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAC,UAAU,EAAE;IAC1C,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,EAAE,EAAE,SAAS;YACb,EAAE,EAAE,SAAS;YACb,EAAE,EAAE,SAAS;SACd;KACF;IACD,eAAe,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;CAChC,CAAC,CAAC;AAEH,mGAAmG;AACnG,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,CAAC;AACjD,MAAM,CAAC,MAAM,aAAa,GAAG,iBAAiB,CAAC"}
1
+ {"version":3,"file":"Logo.variants.js","sourceRoot":"","sources":["../../../src/components/Logo/Logo.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAC,UAAU,EAAE;IAC1C,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,EAAE,EAAE,SAAS;YACb,EAAE,EAAE,SAAS;YACb,EAAE,EAAE,SAAS;SACd;KACF;IACD,eAAe,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;CAChC,CAAC,CAAC;AAEH,mGAAmG;AACnG,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,CAAC;AACjD,4GAA4G;AAC5G,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAC,EAAE,EAAE;IACtC,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,OAAO,EAAE,iBAAiB;YAC1B,IAAI,EAAE,sBAAsB;SAC7B;KACF;IACD,eAAe,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;CACrC,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ export interface MeterProps {
2
+ /** What is measured: "November target". */
3
+ readonly label: string;
4
+ /** How far along it is. Past `max`, the bar is full. */
5
+ readonly value: number;
6
+ /** What counts as all of it. */
7
+ readonly max: number;
8
+ /** How far along, in words, at the end of the line and read out: "69% of $20,000". */
9
+ readonly valueText: string;
10
+ }
11
+ /** How far something is toward a whole, as a bar with its words above it. */
12
+ export declare function Meter({ label, value, max, valueText }: MeterProps): import("react").JSX.Element;
13
+ //# sourceMappingURL=Meter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Meter.d.ts","sourceRoot":"","sources":["../../../src/components/Meter/Meter.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,UAAU;IACzB,2CAA2C;IAC3C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,wDAAwD;IACxD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,gCAAgC;IAChC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,sFAAsF;IACtF,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,6EAA6E;AAC7E,wBAAgB,KAAK,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,UAAU,+BAgBjE"}
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Label, Meter as AriaMeter } from 'react-aria-components';
3
+ import { meterClass, meterFillVariants, meterHeadClass, meterLabelClass, meterTrackClass, meterValueClass } from './Meter.variants.js';
4
+ /** How far something is toward a whole, as a bar with its words above it. */
5
+ export function Meter({ label, value, max, valueText }) {
6
+ return (_jsx(AriaMeter, { className: meterClass, value: Math.min(value, max), minValue: 0, maxValue: max, valueLabel: valueText, children: ({ percentage, valueText: said }) => (_jsxs(_Fragment, { children: [_jsxs("span", { className: meterHeadClass, children: [_jsx(Label, { className: meterLabelClass, children: label }), _jsx("span", { className: meterValueClass, children: said })] }), _jsx("span", { className: meterTrackClass, children: _jsx("span", { className: meterFillVariants({ step: Math.min(20, Math.max(0, Math.round(percentage / 5))) }) }) })] })) }));
7
+ }
8
+ //# sourceMappingURL=Meter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Meter.js","sourceRoot":"","sources":["../../../src/components/Meter/Meter.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,cAAc,EAAE,eAAe,EAAE,eAAe,EAAE,eAAe,EAAkB,MAAM,qBAAqB,CAAC;AAavJ,6EAA6E;AAC7E,MAAM,UAAU,KAAK,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAc;IAChE,OAAO,CACL,KAAC,SAAS,IAAC,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,UAAU,EAAE,SAAS,YAC7G,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CACpC,8BACE,gBAAM,SAAS,EAAE,cAAc,aAC7B,KAAC,KAAK,IAAC,SAAS,EAAE,eAAe,YAAG,KAAK,GAAS,EAClD,eAAM,SAAS,EAAE,eAAe,YAAG,IAAI,GAAQ,IAC1C,EACP,eAAM,SAAS,EAAE,eAAe,YAC9B,eAAM,SAAS,EAAE,iBAAiB,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,CAAc,EAAE,CAAC,GAAI,GAC/G,IACN,CACJ,GACS,CACb,CAAC;AACJ,CAAC"}
@@ -0,0 +1,14 @@
1
+ export declare const meterClass = "flex w-full flex-col gap-2";
2
+ export declare const meterHeadClass = "flex items-baseline justify-between gap-3 text-sm";
3
+ export declare const meterLabelClass = "font-medium text-foreground-muted";
4
+ export declare const meterValueClass = "font-semibold text-foreground tabular-nums";
5
+ export declare const meterTrackClass = "flex h-2 w-full overflow-hidden rounded-full bg-background-tertiary";
6
+ /**
7
+ * The brand's colour, a screen's one orange, on how far along something is. How much of the track
8
+ * it fills goes in twentieths: a width from the scale, never one made up.
9
+ */
10
+ export declare const meterFillVariants: (props?: ({
11
+ step?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 7 | 9 | 11 | 13 | 15 | 17 | 19 | null | undefined;
12
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
13
+ export type MeterStep = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20;
14
+ //# sourceMappingURL=Meter.variants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Meter.variants.d.ts","sourceRoot":"","sources":["../../../src/components/Meter/Meter.variants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,+BAA+B,CAAC;AACvD,eAAO,MAAM,cAAc,sDAAsD,CAAC;AAClF,eAAO,MAAM,eAAe,sCAAsC,CAAC;AACnE,eAAO,MAAM,eAAe,+CAA+C,CAAC;AAC5E,eAAO,MAAM,eAAe,wEAAwE,CAAC;AACrG;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;8EA2B5B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC"}
@@ -0,0 +1,39 @@
1
+ import { cva } from 'class-variance-authority';
2
+ export const meterClass = 'flex w-full flex-col gap-2';
3
+ export const meterHeadClass = 'flex items-baseline justify-between gap-3 text-sm';
4
+ export const meterLabelClass = 'font-medium text-foreground-muted';
5
+ export const meterValueClass = 'font-semibold text-foreground tabular-nums';
6
+ export const meterTrackClass = 'flex h-2 w-full overflow-hidden rounded-full bg-background-tertiary';
7
+ /**
8
+ * The brand's colour, a screen's one orange, on how far along something is. How much of the track
9
+ * it fills goes in twentieths: a width from the scale, never one made up.
10
+ */
11
+ export const meterFillVariants = cva('h-full rounded-full bg-brand-fill transition-all motion-slide', {
12
+ variants: {
13
+ step: {
14
+ 0: 'w-0',
15
+ 1: 'w-1/20',
16
+ 2: 'w-2/20',
17
+ 3: 'w-3/20',
18
+ 4: 'w-4/20',
19
+ 5: 'w-5/20',
20
+ 6: 'w-6/20',
21
+ 7: 'w-7/20',
22
+ 8: 'w-8/20',
23
+ 9: 'w-9/20',
24
+ 10: 'w-10/20',
25
+ 11: 'w-11/20',
26
+ 12: 'w-12/20',
27
+ 13: 'w-13/20',
28
+ 14: 'w-14/20',
29
+ 15: 'w-15/20',
30
+ 16: 'w-16/20',
31
+ 17: 'w-17/20',
32
+ 18: 'w-18/20',
33
+ 19: 'w-19/20',
34
+ 20: 'w-full',
35
+ },
36
+ },
37
+ defaultVariants: { step: 0 },
38
+ });
39
+ //# sourceMappingURL=Meter.variants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Meter.variants.js","sourceRoot":"","sources":["../../../src/components/Meter/Meter.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAE/C,MAAM,CAAC,MAAM,UAAU,GAAG,4BAA4B,CAAC;AACvD,MAAM,CAAC,MAAM,cAAc,GAAG,mDAAmD,CAAC;AAClF,MAAM,CAAC,MAAM,eAAe,GAAG,mCAAmC,CAAC;AACnE,MAAM,CAAC,MAAM,eAAe,GAAG,4CAA4C,CAAC;AAC5E,MAAM,CAAC,MAAM,eAAe,GAAG,qEAAqE,CAAC;AACrG;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAC,+DAA+D,EAAE;IACpG,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,CAAC,EAAE,KAAK;YACR,CAAC,EAAE,QAAQ;YACX,CAAC,EAAE,QAAQ;YACX,CAAC,EAAE,QAAQ;YACX,CAAC,EAAE,QAAQ;YACX,CAAC,EAAE,QAAQ;YACX,CAAC,EAAE,QAAQ;YACX,CAAC,EAAE,QAAQ;YACX,CAAC,EAAE,QAAQ;YACX,CAAC,EAAE,QAAQ;YACX,EAAE,EAAE,SAAS;YACb,EAAE,EAAE,SAAS;YACb,EAAE,EAAE,SAAS;YACb,EAAE,EAAE,SAAS;YACb,EAAE,EAAE,SAAS;YACb,EAAE,EAAE,SAAS;YACb,EAAE,EAAE,SAAS;YACb,EAAE,EAAE,SAAS;YACb,EAAE,EAAE,SAAS;YACb,EAAE,EAAE,SAAS;YACb,EAAE,EAAE,QAAQ;SACb;KACF;IACD,eAAe,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;CAC7B,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Meter, type MeterProps } from './Meter.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Meter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Meter } from './Meter.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Meter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAmB,MAAM,YAAY,CAAC"}
@@ -1,9 +1,12 @@
1
+ import type { LucideIcon } from 'lucide-react';
1
2
  export interface SegmentedOption {
2
3
  readonly id: string;
3
4
  readonly label: string;
4
5
  readonly isDisabled?: boolean;
5
6
  /** A colour to show beside the label, where the choice is a colour of the site's, as CSS writes one. A sample only. */
6
7
  readonly swatch?: string;
8
+ /** An icon before the label. With `areLabelsHidden`, the icon alone. */
9
+ readonly icon?: LucideIcon;
7
10
  }
8
11
  export interface SegmentedProps {
9
12
  /** What is being chosen, for screen readers, such as "Show" or "Language". */
@@ -18,7 +21,9 @@ export interface SegmentedProps {
18
21
  readonly description?: string;
19
22
  /** What is wrong with the choice, shown in place of the help. */
20
23
  readonly errorMessage?: string;
24
+ /** Shows each choice as its icon alone, where every choice has one: its words are read out and shown in a tooltip. */
25
+ readonly areLabelsHidden?: boolean;
21
26
  }
22
27
  /** A few choices in a row, one of them always chosen: a filter over a list, or a language. */
23
- export declare function Segmented({ label, options, selected, onChange, isLabelShown, description, errorMessage }: SegmentedProps): import("react").JSX.Element;
28
+ export declare function Segmented({ label, options, selected, onChange, isLabelShown, description, errorMessage, areLabelsHidden }: SegmentedProps): import("react").JSX.Element;
24
29
  //# sourceMappingURL=Segmented.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Segmented.d.ts","sourceRoot":"","sources":["../../../src/components/Segmented/Segmented.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAC9B,uHAAuH;IACvH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,cAAc;IAC7B,8EAA8E;IAC9E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,SAAS,eAAe,EAAE,CAAC;IAC7C,kDAAkD;IAClD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,sEAAsE;IACtE,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAChC,qDAAqD;IACrD,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,iEAAiE;IACjE,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,8FAA8F;AAC9F,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAoB,EAAE,WAAW,EAAE,YAAY,EAAE,EAAE,cAAc,+BAqChI"}
1
+ {"version":3,"file":"Segmented.d.ts","sourceRoot":"","sources":["../../../src/components/Segmented/Segmented.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAe/C,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAC9B,uHAAuH;IACvH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,wEAAwE;IACxE,QAAQ,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC;CAC5B;AAED,MAAM,WAAW,cAAc;IAC7B,8EAA8E;IAC9E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,SAAS,eAAe,EAAE,CAAC;IAC7C,kDAAkD;IAClD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,sEAAsE;IACtE,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAChC,qDAAqD;IACrD,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,iEAAiE;IACjE,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,sHAAsH;IACtH,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;CACpC;AAED,8FAA8F;AAC9F,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAoB,EAAE,WAAW,EAAE,YAAY,EAAE,eAAuB,EAAE,EAAE,cAAc,+BAiDzJ"}
@@ -1,13 +1,19 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { ToggleButton, ToggleButtonGroup } from 'react-aria-components';
3
- import { segmentedClass, segmentedDescriptionClass, segmentedErrorClass, segmentedFieldClass, segmentedLabelClass, segmentedOptionClass, segmentedSwatchClass } from './Segmented.variants.js';
3
+ import { Tooltip } from '../Tooltip/index.js';
4
+ import { segmentedClass, segmentedDescriptionClass, segmentedErrorClass, segmentedFieldClass, segmentedHiddenLabelClass, segmentedIconSize, segmentedLabelClass, segmentedOptionVariants, segmentedSwatchClass, } from './Segmented.variants.js';
4
5
  /** A few choices in a row, one of them always chosen: a filter over a list, or a language. */
5
- export function Segmented({ label, options, selected, onChange, isLabelShown = false, description, errorMessage }) {
6
+ export function Segmented({ label, options, selected, onChange, isLabelShown = false, description, errorMessage, areLabelsHidden = false }) {
6
7
  const group = (_jsx(ToggleButtonGroup, { "aria-label": label, className: segmentedClass, selectionMode: "single", disallowEmptySelection: true, selectedKeys: [selected], onSelectionChange: (keys) => {
7
8
  const [next] = keys;
8
9
  if (next !== undefined && String(next) !== selected)
9
10
  onChange(String(next));
10
- }, children: options.map((option) => (_jsxs(ToggleButton, { id: option.id, className: segmentedOptionClass, isDisabled: option.isDisabled ?? false, children: [option.swatch !== undefined && (_jsx("svg", { "aria-hidden": "true", viewBox: "0 0 16 16", className: segmentedSwatchClass, children: _jsx("circle", { cx: "8", cy: "8", r: "7", fill: option.swatch }) })), option.label] }, option.id))) }));
11
+ }, children: options.map((option) => {
12
+ const Icon = option.icon;
13
+ const isIconOnly = areLabelsHidden && Icon !== undefined;
14
+ const button = (_jsxs(ToggleButton, { id: option.id, className: segmentedOptionVariants({ isIconOnly }), isDisabled: option.isDisabled ?? false, children: [option.swatch !== undefined && (_jsx("svg", { "aria-hidden": "true", viewBox: "0 0 16 16", className: segmentedSwatchClass, children: _jsx("circle", { cx: "8", cy: "8", r: "7", fill: option.swatch }) })), Icon && _jsx(Icon, { "aria-hidden": true, size: segmentedIconSize }), isIconOnly ? _jsx("span", { className: segmentedHiddenLabelClass, children: option.label }) : option.label] }, option.id));
15
+ return isIconOnly ? (_jsx(Tooltip, { content: option.label, placement: "bottom", children: button }, option.id)) : (button);
16
+ }) }));
11
17
  if (!isLabelShown && description === undefined && errorMessage === undefined)
12
18
  return group;
13
19
  return (_jsxs("div", { className: segmentedFieldClass, children: [isLabelShown && (_jsx("span", { "aria-hidden": "true", className: segmentedLabelClass, children: label })), group, errorMessage !== undefined ? _jsx("p", { className: segmentedErrorClass, children: errorMessage }) : description !== undefined && _jsx("p", { className: segmentedDescriptionClass, children: description })] }));
@@ -1 +1 @@
1
- {"version":3,"file":"Segmented.js","sourceRoot":"","sources":["../../../src/components/Segmented/Segmented.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAyB/L,8FAA8F;AAC9F,MAAM,UAAU,SAAS,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,GAAG,KAAK,EAAE,WAAW,EAAE,YAAY,EAAkB;IAC/H,MAAM,KAAK,GAAG,CACZ,KAAC,iBAAiB,kBACJ,KAAK,EACjB,SAAS,EAAE,cAAc,EACzB,aAAa,EAAC,QAAQ,EACtB,sBAAsB,QACtB,YAAY,EAAE,CAAC,QAAQ,CAAC,EACxB,iBAAiB,EAAE,CAAC,IAAI,EAAE,EAAE;YAC1B,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;YACpB,IAAI,IAAI,KAAK,SAAS,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,QAAQ;gBAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;QAC9E,CAAC,YAEA,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CACvB,MAAC,YAAY,IAAiB,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,SAAS,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,IAAI,KAAK,aACjH,MAAM,CAAC,MAAM,KAAK,SAAS,IAAI,CAC9B,6BAAiB,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,SAAS,EAAE,oBAAoB,YACzE,iBAAQ,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,EAAC,IAAI,EAAE,MAAM,CAAC,MAAM,GAAI,GAC/C,CACP,EACA,MAAM,CAAC,KAAK,KANI,MAAM,CAAC,EAAE,CAOb,CAChB,CAAC,GACgB,CACrB,CAAC;IACF,IAAI,CAAC,YAAY,IAAI,WAAW,KAAK,SAAS,IAAI,YAAY,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IAC3F,OAAO,CACL,eAAK,SAAS,EAAE,mBAAmB,aAChC,YAAY,IAAI,CACf,8BAAkB,MAAM,EAAC,SAAS,EAAE,mBAAmB,YACpD,KAAK,GACD,CACR,EACA,KAAK,EACL,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,YAAG,SAAS,EAAE,mBAAmB,YAAG,YAAY,GAAK,CAAC,CAAC,CAAC,WAAW,KAAK,SAAS,IAAI,YAAG,SAAS,EAAE,yBAAyB,YAAG,WAAW,GAAK,IACzK,CACP,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"Segmented.js","sourceRoot":"","sources":["../../../src/components/Segmented/Segmented.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EACL,cAAc,EACd,yBAAyB,EACzB,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EACzB,iBAAiB,EACjB,mBAAmB,EACnB,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AA6BjC,8FAA8F;AAC9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C,CAAC,eAAM,SAAS,EAAE,yBAAyB,YAAG,MAAM,CAAC,KAAK,GAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,KAP7E,MAAM,CAAC,EAAE,CAQb,CAChB,CAAC;YACF,OAAO,UAAU,CAAC,CAAC,CAAC,CAClB,KAAC,OAAO,IAAiB,OAAO,EAAE,MAAM,CAAC,KAAK,EAAE,SAAS,EAAC,QAAQ,YAC/D,MAAM,IADK,MAAM,CAAC,EAAE,CAEb,CACX,CAAC,CAAC,CAAC,CACF,MAAM,CACP,CAAC;QACJ,CAAC,CAAC,GACgB,CACrB,CAAC;IACF,IAAI,CAAC,YAAY,IAAI,WAAW,KAAK,SAAS,IAAI,YAAY,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IAC3F,OAAO,CACL,eAAK,SAAS,EAAE,mBAAmB,aAChC,YAAY,IAAI,CACf,8BAAkB,MAAM,EAAC,SAAS,EAAE,mBAAmB,YACpD,KAAK,GACD,CACR,EACA,KAAK,EACL,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,YAAG,SAAS,EAAE,mBAAmB,YAAG,YAAY,GAAK,CAAC,CAAC,CAAC,WAAW,KAAK,SAAS,IAAI,YAAG,SAAS,EAAE,yBAAyB,YAAG,WAAW,GAAK,IACzK,CACP,CAAC;AACJ,CAAC"}
@@ -1,5 +1,11 @@
1
1
  export declare const segmentedClass = "inline-flex flex-wrap gap-1";
2
- export declare const segmentedOptionClass: string;
2
+ /** With its words shown, a choice is as wide as they are; with only its icon, it is square. */
3
+ export declare const segmentedOptionVariants: (props?: ({
4
+ isIconOnly?: boolean | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ /** The words of a choice shown only as its icon: read out, and shown in a tooltip. */
7
+ export declare const segmentedHiddenLabelClass = "sr-only";
8
+ export declare const segmentedIconSize = 16;
3
9
  /** The sample of a colour beside a choice, with a line around it so a colour like the page's still shows. */
4
10
  export declare const segmentedSwatchClass = "h-4 w-4 shrink-0 stroke-border-strong";
5
11
  /** The choices as a field of a form: its label above, its help or its problem under. */
@@ -1 +1 @@
1
- {"version":3,"file":"Segmented.variants.d.ts","sourceRoot":"","sources":["../../../src/components/Segmented/Segmented.variants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,gCAAgC,CAAC;AAE5D,eAAO,MAAM,oBAAoB,QAKtB,CAAC;AAEZ,6GAA6G;AAC7G,eAAO,MAAM,oBAAoB,0CAA0C,CAAC;AAE5E,wFAAwF;AACxF,eAAO,MAAM,mBAAmB,4CAA4C,CAAC;AAC7E,eAAO,MAAM,mBAAmB,wCAAkB,CAAC;AACnD,eAAO,MAAM,yBAAyB,kCAAwB,CAAC;AAC/D,eAAO,MAAM,mBAAmB,yCAAkB,CAAC"}
1
+ {"version":3,"file":"Segmented.variants.d.ts","sourceRoot":"","sources":["../../../src/components/Segmented/Segmented.variants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc,gCAAgC,CAAC;AAE5D,+FAA+F;AAC/F,eAAO,MAAM,uBAAuB;;8EAWnC,CAAC;AACF,sFAAsF;AACtF,eAAO,MAAM,yBAAyB,YAAY,CAAC;AACnD,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,6GAA6G;AAC7G,eAAO,MAAM,oBAAoB,0CAA0C,CAAC;AAE5E,wFAAwF;AACxF,eAAO,MAAM,mBAAmB,4CAA4C,CAAC;AAC7E,eAAO,MAAM,mBAAmB,wCAAkB,CAAC;AACnD,eAAO,MAAM,yBAAyB,kCAAwB,CAAC;AAC/D,eAAO,MAAM,mBAAmB,yCAAkB,CAAC"}
@@ -1,11 +1,19 @@
1
+ import { cva } from 'class-variance-authority';
1
2
  import { fieldDescriptionClass, fieldErrorClass, fieldLabelClass } from '../field.js';
2
3
  export const segmentedClass = 'inline-flex flex-wrap gap-1';
3
- export const segmentedOptionClass = [
4
- 'inline-flex h-8 cursor-default items-center gap-2 rounded-md px-3 text-sm font-medium text-foreground-secondary',
4
+ /** With its words shown, a choice is as wide as they are; with only its icon, it is square. */
5
+ export const segmentedOptionVariants = cva([
6
+ 'inline-flex h-8 cursor-default items-center gap-2 rounded-md text-sm font-medium text-foreground-secondary',
5
7
  'transition-colors motion-fast',
6
8
  'outline-none data-hovered:text-foreground data-selected:bg-background-tertiary data-selected:text-foreground',
7
9
  'data-focus-visible:ring-2 data-focus-visible:ring-ring data-disabled:text-foreground-subtle',
8
- ].join(' ');
10
+ ], {
11
+ variants: { isIconOnly: { true: 'w-8 justify-center', false: 'px-3' } },
12
+ defaultVariants: { isIconOnly: false },
13
+ });
14
+ /** The words of a choice shown only as its icon: read out, and shown in a tooltip. */
15
+ export const segmentedHiddenLabelClass = 'sr-only';
16
+ export const segmentedIconSize = 16;
9
17
  /** The sample of a colour beside a choice, with a line around it so a colour like the page's still shows. */
10
18
  export const segmentedSwatchClass = 'h-4 w-4 shrink-0 stroke-border-strong';
11
19
  /** The choices as a field of a form: its label above, its help or its problem under. */
@@ -1 +1 @@
1
- {"version":3,"file":"Segmented.variants.js","sourceRoot":"","sources":["../../../src/components/Segmented/Segmented.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEtF,MAAM,CAAC,MAAM,cAAc,GAAG,6BAA6B,CAAC;AAE5D,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,iHAAiH;IACjH,+BAA+B;IAC/B,8GAA8G;IAC9G,6FAA6F;CAC9F,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEZ,6GAA6G;AAC7G,MAAM,CAAC,MAAM,oBAAoB,GAAG,uCAAuC,CAAC;AAE5E,wFAAwF;AACxF,MAAM,CAAC,MAAM,mBAAmB,GAAG,yCAAyC,CAAC;AAC7E,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAC;AACnD,MAAM,CAAC,MAAM,yBAAyB,GAAG,qBAAqB,CAAC;AAC/D,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAC"}
1
+ {"version":3,"file":"Segmented.variants.js","sourceRoot":"","sources":["../../../src/components/Segmented/Segmented.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEtF,MAAM,CAAC,MAAM,cAAc,GAAG,6BAA6B,CAAC;AAE5D,+FAA+F;AAC/F,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CACxC;IACE,4GAA4G;IAC5G,+BAA+B;IAC/B,8GAA8G;IAC9G,6FAA6F;CAC9F,EACD;IACE,QAAQ,EAAE,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;IACvE,eAAe,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE;CACvC,CACF,CAAC;AACF,sFAAsF;AACtF,MAAM,CAAC,MAAM,yBAAyB,GAAG,SAAS,CAAC;AACnD,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAEpC,6GAA6G;AAC7G,MAAM,CAAC,MAAM,oBAAoB,GAAG,uCAAuC,CAAC;AAE5E,wFAAwF;AACxF,MAAM,CAAC,MAAM,mBAAmB,GAAG,yCAAyC,CAAC;AAC7E,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAC;AACnD,MAAM,CAAC,MAAM,yBAAyB,GAAG,qBAAqB,CAAC;AAC/D,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAC"}
@@ -6,6 +6,11 @@ export interface TableColumn {
6
6
  /** `end` for numbers and amounts, so their digits line up. */
7
7
  readonly align?: "start" | "end";
8
8
  readonly isSortable?: boolean;
9
+ /**
10
+ * Left out on a narrow window (below `md`), where there is room for the main columns only.
11
+ * Never the first column, which names each row.
12
+ */
13
+ readonly isSecondary?: boolean;
9
14
  }
10
15
  export interface TableRow {
11
16
  readonly id: string;
@@ -29,7 +34,9 @@ export interface TableProps {
29
34
  readonly onSortChange?: (sort: TableSort) => void;
30
35
  /** Shown instead of rows when there are none. */
31
36
  readonly empty?: ReactNode;
37
+ /** `none` inside a `Card` with `isFlush`, which frames it already. */
38
+ readonly frame?: 'card' | 'none';
32
39
  }
33
40
  /** Rows of the same kind of thing, with a heading for each column. */
34
- export declare function Table({ label, columns, rows, onRowAction, sort, onSortChange, empty, }: TableProps): import("react").JSX.Element;
41
+ export declare function Table({ label, columns, rows, onRowAction, sort, onSortChange, empty, frame, }: TableProps): import("react").JSX.Element;
35
42
  //# sourceMappingURL=Table.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/components/Table/Table.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAoBvC,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,4BAA4B;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,8DAA8D;IAC9D,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IACjC,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,iDAAiD;IACjD,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;CACrD;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,WAAW,GAAG,YAAY,CAAC;CAChD;AAED,MAAM,WAAW,UAAU;IACzB,8DAA8D;IAC9D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,uCAAuC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;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,WAAW,GAAG,YAAY,CAAC;CAChD;AAED,MAAM,WAAW,UAAU;IACzB,8DAA8D;IAC9D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,uCAAuC;IACvC,QAAQ,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,CAAC;IACzC,QAAQ,CAAC,IAAI,EAAE,SAAS,QAAQ,EAAE,CAAC;IACnC,8DAA8D;IAC9D,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,gFAAgF;IAChF,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IAClD,iDAAiD;IACjD,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC;IAC3B,sEAAsE;IACtE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAClC;AAED,sEAAsE;AACtE,wBAAgB,KAAK,CAAC,EACpB,KAAK,EACL,OAAO,EACP,IAAI,EACJ,WAAW,EACX,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,KAAc,GACf,EAAE,UAAU,+BA6DZ"}
@@ -1,14 +1,14 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { ArrowDown, ArrowUp } from "lucide-react";
3
3
  import { Cell, Column, Row, Table as AriaTable, TableBody, TableHeader, } from "react-aria-components";
4
- import { tableCellVariants, tableClass, tableColumnLabelClass, tableColumnVariants, tableEmptyClass, tableFrameClass, tableRowClass, tableSortIconSize, } from "./Table.variants.js";
4
+ import { tableCellVariants, tableClass, tableColumnLabelClass, tableColumnVariants, tableEmptyClass, tableFrameVariants, tableRowClass, tableSortIconSize, } from "./Table.variants.js";
5
5
  /** Rows of the same kind of thing, with a heading for each column. */
6
- export function Table({ label, columns, rows, onRowAction, sort, onSortChange, empty, }) {
7
- return (_jsx("div", { className: tableFrameClass, children: _jsxs(AriaTable, { "aria-label": label, className: tableClass, ...(sort && { sortDescriptor: sort }), ...(onSortChange && {
6
+ export function Table({ label, columns, rows, onRowAction, sort, onSortChange, empty, frame = 'card', }) {
7
+ return (_jsx("div", { className: tableFrameVariants({ frame }), children: _jsxs(AriaTable, { "aria-label": label, className: tableClass, ...(sort && { sortDescriptor: sort }), ...(onSortChange && {
8
8
  onSortChange: (next) => onSortChange({
9
9
  column: String(next.column),
10
10
  direction: next.direction,
11
11
  }),
12
- }), ...(onRowAction && { onRowAction: (key) => onRowAction(String(key)) }), children: [_jsx(TableHeader, { children: columns.map((column, index) => (_jsx(Column, { id: column.id, className: tableColumnVariants({ align: column.align }), isRowHeader: index === 0, allowsSorting: column.isSortable ?? false, textValue: column.label, children: (state) => (_jsxs("span", { className: tableColumnLabelClass, children: [column.label, state.sortDirection === "ascending" && (_jsx(ArrowUp, { "aria-hidden": true, size: tableSortIconSize })), state.sortDirection === "descending" && (_jsx(ArrowDown, { "aria-hidden": true, size: tableSortIconSize }))] })) }, column.id))) }), _jsx(TableBody, { renderEmptyState: () => (_jsx("div", { className: tableEmptyClass, children: empty })), children: rows.map((row) => (_jsx(Row, { id: row.id, className: tableRowClass, children: columns.map((column) => (_jsx(Cell, { className: tableCellVariants({ align: column.align }), children: row.cells[column.id] }, column.id))) }, row.id))) })] }) }));
12
+ }), ...(onRowAction && { onRowAction: (key) => onRowAction(String(key)) }), children: [_jsx(TableHeader, { children: columns.map((column, index) => (_jsx(Column, { id: column.id, className: tableColumnVariants({ align: column.align, isSecondary: index > 0 && column.isSecondary === true }), isRowHeader: index === 0, allowsSorting: column.isSortable ?? false, textValue: column.label, children: (state) => (_jsxs("span", { className: tableColumnLabelClass, children: [column.label, state.sortDirection === "ascending" && (_jsx(ArrowUp, { "aria-hidden": true, size: tableSortIconSize })), state.sortDirection === "descending" && (_jsx(ArrowDown, { "aria-hidden": true, size: tableSortIconSize }))] })) }, column.id))) }), _jsx(TableBody, { renderEmptyState: () => (_jsx("div", { className: tableEmptyClass, children: empty })), children: rows.map((row) => (_jsx(Row, { id: row.id, className: tableRowClass, children: columns.map((column, index) => (_jsx(Cell, { className: tableCellVariants({ align: column.align, isSecondary: index > 0 && column.isSecondary === true }), children: row.cells[column.id] }, column.id))) }, row.id))) })] }) }));
13
13
  }
14
14
  //# sourceMappingURL=Table.js.map