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

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 (106) hide show
  1. package/component-registry.json +50 -3
  2. package/dist/components/Logo/Logo.d.ts +1 -1
  3. package/dist/components/Logo/Logo.d.ts.map +1 -1
  4. package/dist/components/Logo/Logo.js +3 -3
  5. package/dist/components/Logo/Logo.js.map +1 -1
  6. package/dist/components/Logo/Logo.variants.d.ts +5 -2
  7. package/dist/components/Logo/Logo.variants.d.ts.map +1 -1
  8. package/dist/components/Logo/Logo.variants.js +10 -1
  9. package/dist/components/Logo/Logo.variants.js.map +1 -1
  10. package/dist/components/Meter/Meter.d.ts +13 -0
  11. package/dist/components/Meter/Meter.d.ts.map +1 -0
  12. package/dist/components/Meter/Meter.js +8 -0
  13. package/dist/components/Meter/Meter.js.map +1 -0
  14. package/dist/components/Meter/Meter.variants.d.ts +14 -0
  15. package/dist/components/Meter/Meter.variants.d.ts.map +1 -0
  16. package/dist/components/Meter/Meter.variants.js +39 -0
  17. package/dist/components/Meter/Meter.variants.js.map +1 -0
  18. package/dist/components/Meter/index.d.ts +2 -0
  19. package/dist/components/Meter/index.d.ts.map +1 -0
  20. package/dist/components/Meter/index.js +2 -0
  21. package/dist/components/Meter/index.js.map +1 -0
  22. package/dist/components/Table/Table.d.ts +9 -2
  23. package/dist/components/Table/Table.d.ts.map +1 -1
  24. package/dist/components/Table/Table.js +14 -2
  25. package/dist/components/Table/Table.js.map +1 -1
  26. package/dist/components/Table/Table.variants.d.ts.map +1 -1
  27. package/dist/components/Table/Table.variants.js +2 -0
  28. package/dist/components/Table/Table.variants.js.map +1 -1
  29. package/dist/components/index.d.ts +1 -0
  30. package/dist/components/index.d.ts.map +1 -1
  31. package/dist/components/index.js +1 -0
  32. package/dist/components/index.js.map +1 -1
  33. package/dist/patterns/AppShell/AppShell.d.ts +31 -7
  34. package/dist/patterns/AppShell/AppShell.d.ts.map +1 -1
  35. package/dist/patterns/AppShell/AppShell.js +21 -7
  36. package/dist/patterns/AppShell/AppShell.js.map +1 -1
  37. package/dist/patterns/AppShell/AppShell.variants.d.ts +61 -32
  38. package/dist/patterns/AppShell/AppShell.variants.d.ts.map +1 -1
  39. package/dist/patterns/AppShell/AppShell.variants.js +95 -38
  40. package/dist/patterns/AppShell/AppShell.variants.js.map +1 -1
  41. package/dist/patterns/AppShell/index.d.ts +1 -1
  42. package/dist/patterns/AppShell/index.d.ts.map +1 -1
  43. package/dist/patterns/AppShell/index.js.map +1 -1
  44. package/dist/patterns/CommandPalette/CommandPalette.d.ts +36 -0
  45. package/dist/patterns/CommandPalette/CommandPalette.d.ts.map +1 -0
  46. package/dist/patterns/CommandPalette/CommandPalette.js +18 -0
  47. package/dist/patterns/CommandPalette/CommandPalette.js.map +1 -0
  48. package/dist/patterns/CommandPalette/CommandPalette.variants.d.ts +18 -0
  49. package/dist/patterns/CommandPalette/CommandPalette.variants.d.ts.map +1 -0
  50. package/dist/patterns/CommandPalette/CommandPalette.variants.js +21 -0
  51. package/dist/patterns/CommandPalette/CommandPalette.variants.js.map +1 -0
  52. package/dist/patterns/CommandPalette/index.d.ts +2 -0
  53. package/dist/patterns/CommandPalette/index.d.ts.map +1 -0
  54. package/dist/patterns/CommandPalette/index.js +2 -0
  55. package/dist/patterns/CommandPalette/index.js.map +1 -0
  56. package/dist/patterns/Outline/Outline.d.ts +26 -0
  57. package/dist/patterns/Outline/Outline.d.ts.map +1 -0
  58. package/dist/patterns/Outline/Outline.js +21 -0
  59. package/dist/patterns/Outline/Outline.js.map +1 -0
  60. package/dist/patterns/Outline/Outline.variants.d.ts +11 -0
  61. package/dist/patterns/Outline/Outline.variants.d.ts.map +1 -0
  62. package/dist/patterns/Outline/Outline.variants.js +21 -0
  63. package/dist/patterns/Outline/Outline.variants.js.map +1 -0
  64. package/dist/patterns/Outline/index.d.ts +2 -0
  65. package/dist/patterns/Outline/index.d.ts.map +1 -0
  66. package/dist/patterns/Outline/index.js +2 -0
  67. package/dist/patterns/Outline/index.js.map +1 -0
  68. package/dist/patterns/SiteWindow/SiteWindow.d.ts +20 -0
  69. package/dist/patterns/SiteWindow/SiteWindow.d.ts.map +1 -0
  70. package/dist/patterns/SiteWindow/SiteWindow.js +8 -0
  71. package/dist/patterns/SiteWindow/SiteWindow.js.map +1 -0
  72. package/dist/patterns/SiteWindow/SiteWindow.variants.d.ts +24 -0
  73. package/dist/patterns/SiteWindow/SiteWindow.variants.d.ts.map +1 -0
  74. package/dist/patterns/SiteWindow/SiteWindow.variants.js +25 -0
  75. package/dist/patterns/SiteWindow/SiteWindow.variants.js.map +1 -0
  76. package/dist/patterns/SiteWindow/index.d.ts +2 -0
  77. package/dist/patterns/SiteWindow/index.d.ts.map +1 -0
  78. package/dist/patterns/SiteWindow/index.js +2 -0
  79. package/dist/patterns/SiteWindow/index.js.map +1 -0
  80. package/dist/patterns/Welcome/Welcome.d.ts +18 -0
  81. package/dist/patterns/Welcome/Welcome.d.ts.map +1 -0
  82. package/dist/patterns/Welcome/Welcome.js +14 -0
  83. package/dist/patterns/Welcome/Welcome.js.map +1 -0
  84. package/dist/patterns/Welcome/Welcome.variants.d.ts +12 -0
  85. package/dist/patterns/Welcome/Welcome.variants.d.ts.map +1 -0
  86. package/dist/patterns/Welcome/Welcome.variants.js +12 -0
  87. package/dist/patterns/Welcome/Welcome.variants.js.map +1 -0
  88. package/dist/patterns/Welcome/index.d.ts +2 -0
  89. package/dist/patterns/Welcome/index.d.ts.map +1 -0
  90. package/dist/patterns/Welcome/index.js +2 -0
  91. package/dist/patterns/Welcome/index.js.map +1 -0
  92. package/dist/patterns/Workbench/Workbench.d.ts +8 -4
  93. package/dist/patterns/Workbench/Workbench.d.ts.map +1 -1
  94. package/dist/patterns/Workbench/Workbench.js +7 -6
  95. package/dist/patterns/Workbench/Workbench.js.map +1 -1
  96. package/dist/patterns/Workbench/Workbench.variants.d.ts +6 -1
  97. package/dist/patterns/Workbench/Workbench.variants.d.ts.map +1 -1
  98. package/dist/patterns/Workbench/Workbench.variants.js +8 -3
  99. package/dist/patterns/Workbench/Workbench.variants.js.map +1 -1
  100. package/dist/patterns/index.d.ts +4 -0
  101. package/dist/patterns/index.d.ts.map +1 -1
  102. package/dist/patterns/index.js +4 -0
  103. package/dist/patterns/index.js.map +1 -1
  104. package/package.json +1 -1
  105. package/src/styles.css +18 -0
  106. package/src/tokens/tokens.css +21 -1
@@ -166,6 +166,15 @@
166
166
  "useInstead": "ImagePicker to choose an image.",
167
167
  "uses": []
168
168
  },
169
+ {
170
+ "name": "Meter",
171
+ "layer": "component",
172
+ "group": "Data",
173
+ "description": "How far something is toward a whole, as a bar in the brand's colour with its words above it.",
174
+ "example": "<Meter label=\"November target\" value={13800} max={20000} valueText=\"69% of $20,000\" />",
175
+ "useInstead": "Spinner or LoadingState for something still loading.",
176
+ "uses": []
177
+ },
169
178
  {
170
179
  "name": "Stat",
171
180
  "layer": "component",
@@ -337,14 +346,52 @@
337
346
  "IconButton"
338
347
  ]
339
348
  },
349
+ {
350
+ "name": "CommandPalette",
351
+ "layer": "pattern",
352
+ "group": "Overlays",
353
+ "description": "A window to find anything by typing and go there: a box, and under it the matches in groups.",
354
+ "example": "<CommandPalette isOpen={isOpen} onOpenChange={setOpen} label=\"Search and commands\" placeholder=\"Search, jump to or create anything\" emptyText=\"Nothing matches that.\" groups={groups} onAction={run} />",
355
+ "useInstead": "SearchField to narrow down one list on a screen.",
356
+ "uses": []
357
+ },
358
+ {
359
+ "name": "Welcome",
360
+ "layer": "pattern",
361
+ "group": "Page",
362
+ "description": "The top of a screen that greets the person: what matters now in large words, one phrase set apart, what to do first, and the site beside it.",
363
+ "example": "<Welcome eyebrow=\"Saturday, 21 November\" title=\"Good morning, Dana. 3 drafts are waiting.\" highlight=\"3 drafts\" actions={actions} aside={preview} />",
364
+ "useInstead": "PageHeader for the top of every other screen.",
365
+ "uses": []
366
+ },
367
+ {
368
+ "name": "SiteWindow",
369
+ "layer": "pattern",
370
+ "group": "Page",
371
+ "description": "A page of the site in a small browser window, as visitors see it now. The whole card is one link.",
372
+ "example": "<SiteWindow address=\"lakeshore.example\" src=\"/\" title=\"The home page\" label=\"Edit the home page\" meta=\"Published 3 days ago\" onPress={edit} />",
373
+ "useInstead": "PagePreview to see and work on a draft.",
374
+ "uses": []
375
+ },
376
+ {
377
+ "name": "Outline",
378
+ "layer": "pattern",
379
+ "group": "Navigation",
380
+ "description": "The parts of something long, by name and in order, with the current one marked. Choosing one goes to it.",
381
+ "example": "<Outline title=\"Sections\" items={sections} currentId={current} onChoose={goTo} emptyText=\"No sections yet.\" />",
382
+ "useInstead": "SectionList to put sections in order and edit them.",
383
+ "uses": []
384
+ },
340
385
  {
341
386
  "name": "AppShell",
342
387
  "layer": "pattern",
343
388
  "group": "Page",
344
- "description": "The frame around every screen: the sidebar with its navigation, and the main area.",
345
- "example": "<AppShell siteName=\"Lakeshore Realty\" navLabel=\"Main\" skipLabel=\"Skip to content\" nav={groups} account={account}>…</AppShell>",
389
+ "description": "The frame around every screen: the rail of sections, the current section's places beside it, the bar with the search, and the main area.",
390
+ "example": "<AppShell logoLabel=\"Velocity\" siteName=\"Lakeshore Realty\" navLabel=\"Main\" skipLabel=\"Skip to content\" search={search} nav={groups} account={account}>…</AppShell>",
346
391
  "uses": [
347
- "Menu"
392
+ "Logo",
393
+ "Menu",
394
+ "Tooltip"
348
395
  ]
349
396
  },
350
397
  {
@@ -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"}
@@ -22,8 +22,15 @@ export interface TableProps {
22
22
  /** The first column names each row. */
23
23
  readonly columns: readonly TableColumn[];
24
24
  readonly rows: readonly TableRow[];
25
- /** Called when a row is pressed or Enter is pressed on it. */
25
+ /** Called when a row is pressed or Enter is pressed on it. With `onSelect`, a press chooses the row and a second one opens it. */
26
26
  readonly onRowAction?: (id: string) => void;
27
+ /** The row that is chosen, such as the one whose details stand beside the table. */
28
+ readonly selectedId?: string | null;
29
+ /**
30
+ * Called when a row is chosen: pressed once, or reached with the arrow keys. Enter or a second
31
+ * press then opens it (`onRowAction`). On a touch screen a tap still opens it.
32
+ */
33
+ readonly onSelect?: (id: string) => void;
27
34
  /** How the rows are sorted. The table shows it; the screen does the sorting. */
28
35
  readonly sort?: TableSort;
29
36
  readonly onSortChange?: (sort: TableSort) => void;
@@ -31,5 +38,5 @@ export interface TableProps {
31
38
  readonly empty?: ReactNode;
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, selectedId, onSelect, sort, onSortChange, empty, }: 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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}
@@ -3,12 +3,24 @@ import { ArrowDown, ArrowUp } from "lucide-react";
3
3
  import { Cell, Column, Row, Table as AriaTable, TableBody, TableHeader, } from "react-aria-components";
4
4
  import { tableCellVariants, tableClass, tableColumnLabelClass, tableColumnVariants, tableEmptyClass, tableFrameClass, 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, }) {
6
+ export function Table({ label, columns, rows, onRowAction, selectedId, onSelect, sort, onSortChange, empty, }) {
7
7
  return (_jsx("div", { className: tableFrameClass, 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)) }), ...(onSelect && {
13
+ selectionMode: 'single',
14
+ selectionBehavior: 'replace',
15
+ disallowEmptySelection: true,
16
+ selectedKeys: selectedId === undefined || selectedId === null ? [] : [selectedId],
17
+ onSelectionChange: (keys) => {
18
+ if (keys === 'all')
19
+ return;
20
+ const [first] = [...keys];
21
+ if (first !== undefined)
22
+ onSelect(String(first));
23
+ },
24
+ }), 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))) })] }) }));
13
25
  }
14
26
  //# sourceMappingURL=Table.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Table.js","sourceRoot":"","sources":["../../../src/components/Table/Table.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAElD,OAAO,EACL,IAAI,EACJ,MAAM,EACN,GAAG,EACH,KAAK,IAAI,SAAS,EAClB,SAAS,EACT,WAAW,GACZ,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,iBAAiB,EACjB,UAAU,EACV,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,aAAa,EACb,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAqC7B,sEAAsE;AACtE,MAAM,UAAU,KAAK,CAAC,EACpB,KAAK,EACL,OAAO,EACP,IAAI,EACJ,WAAW,EACX,IAAI,EACJ,YAAY,EACZ,KAAK,GACM;IACX,OAAO,CACL,cAAK,SAAS,EAAE,eAAe,YAC7B,MAAC,SAAS,kBACI,KAAK,EACjB,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AG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CACjB,KAAC,GAAG,IAAc,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,SAAS,EAAE,aAAa,YACnD,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CACvB,KAAC,IAAI,IAEH,SAAS,EAAE,iBAAiB,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,YAEpD,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,IAHhB,MAAM,CAAC,EAAE,CAIT,CACR,CAAC,IARM,GAAG,CAAC,EAAE,CASV,CACP,CAAC,GACQ,IACF,GACR,CACP,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"Table.js","sourceRoot":"","sources":["../../../src/components/Table/Table.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAElD,OAAO,EACL,IAAI,EACJ,MAAM,EACN,GAAG,EACH,KAAK,IAAI,SAAS,EAClB,SAAS,EACT,WAAW,GACZ,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,iBAAiB,EACjB,UAAU,EACV,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,aAAa,EACb,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AA4C7B,sEAAsE;AACtE,MAAM,UAAU,KAAK,CAAC,EACpB,KAAK,EACL,OAAO,EACP,IAAI,EACJ,WAAW,EACX,UAAU,EACV,QAAQ,EACR,IAAI,EACJ,YAAY,EACZ,KAAK,GACM;IACX,OAAO,CACL,cAAK,SAAS,EAAE,eAAe,YAC7B,MAAC,SAAS,kBACI,KAAK,EACjB,SAAS,EAAE,UAAU,KACjB,CAAC,IAAI,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,KAClC,CAAC,YAAY,IAAI;gBACnB,YAAY,EAAE,CAAC,IAAI,EAAE,EAAE,CACrB,YAA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e,iDAAiD,CAAC;AAE9E,6CAA6C;AAC7C,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
1
+ {"version":3,"file":"Table.variants.d.ts","sourceRoot":"","sources":["../../../src/components/Table/Table.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,mFAAmF;AACnF,eAAO,MAAM,eAAe,4DAA4D,CAAC;AAEzF,eAAO,MAAM,UAAU,6EAA6E,CAAC;AAOrG,eAAO,MAAM,mBAAmB;;8EAO/B,CAAC;AAEF,eAAO,MAAM,qBAAqB,mCAAmC,CAAC;AAEtE,eAAO,MAAM,aAAa,QAQf,CAAC;AAEZ,eAAO,MAAM,iBAAiB;;8EAG7B,CAAC;AAEF,eAAO,MAAM,eAAe,iDAAiD,CAAC;AAE9E,6CAA6C;AAC7C,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
@@ -18,6 +18,8 @@ export const tableRowClass = [
18
18
  'data-focus-visible:ring-2 data-focus-visible:ring-ring data-focus-visible:ring-inset',
19
19
  // A row that opens something says so to the pointer.
20
20
  'data-href:cursor-pointer data-action:cursor-pointer',
21
+ // The row whose details stand beside the table.
22
+ 'data-selected:bg-background-tertiary',
21
23
  ].join(' ');
22
24
  export const tableCellVariants = cva('border-b border-border px-4 py-3 align-middle text-foreground outline-none group-last:border-b-0 data-focus-visible:ring-2 data-focus-visible:ring-ring data-focus-visible:ring-inset', { variants: { align }, defaultVariants: { align: 'start' } });
23
25
  export const tableEmptyClass = 'px-4 py-12 text-center text-foreground-muted';
@@ -1 +1 @@
1
- {"version":3,"file":"Table.variants.js","sourceRoot":"","sources":["../../../src/components/Table/Table.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAA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IAClB,GAAG,EAAE,YAAY;CACT,CAAC;AAEX,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CACpC;IACE,kGAAkG;IAClG,mGAAmG;IACnG,iEAAiE;CAClE,EACD,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,eAAe,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,CAC7D,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,gCAAgC,CAAC;AAEtE,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,kDAAkD;IAClD,0EAA0E;IAC1E,sFAAsF;IACtF,qDAAqD;IACrD,qDAAqD;IACrD,gDAAgD;IAChD,sCAAsC;CACvC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEZ,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAClC,uLAAuL,EACvL,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,eAAe,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,CAC7D,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,8CAA8C,CAAC;AAE9E,6CAA6C;AAC7C,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAC"}
@@ -35,4 +35,5 @@ export * from './Thumbnail/index.js';
35
35
  export * from './Toast/index.js';
36
36
  export * from './Tooltip/index.js';
37
37
  export type { Space } from './scales.js';
38
+ export * from './Meter/index.js';
38
39
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAA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AAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,YAAY,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,cAAc,kBAAkB,CAAC"}
@@ -34,4 +34,5 @@ export * from './TextField/index.js';
34
34
  export * from './Thumbnail/index.js';
35
35
  export * from './Toast/index.js';
36
36
  export * from './Tooltip/index.js';
37
+ export * from './Meter/index.js';
37
38
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AAEnC,cAAc,kBAAkB,CAAC"}
@@ -8,11 +8,20 @@ export interface AppShellNavItem {
8
8
  readonly icon?: LucideIcon;
9
9
  /** The screen being shown is this one, or inside it. */
10
10
  readonly isCurrent?: boolean;
11
+ /** A short number beside it: how many it holds, or how many are new. */
12
+ readonly count?: string;
13
+ /**
14
+ * The places inside a section, such as each kind of content under "Content". While the section is
15
+ * the current one they are listed in a column beside the rail, under the section's name.
16
+ */
17
+ readonly children?: readonly AppShellNavGroup[];
11
18
  }
12
19
  export interface AppShellNavGroup {
13
20
  readonly id: string;
14
21
  /** A small heading over the group, such as "Content". The first group usually has none. */
15
22
  readonly label?: string;
23
+ /** `end` puts the group at the bottom of the rail: the sections a person visits least. */
24
+ readonly place?: 'start' | 'end';
16
25
  readonly items: readonly AppShellNavItem[];
17
26
  }
18
27
  export interface AppShellAccount {
@@ -25,25 +34,40 @@ export interface AppShellAccount {
25
34
  readonly actions: readonly MenuAction[];
26
35
  readonly onAction: (id: string) => void;
27
36
  }
37
+ export interface AppShellSearch {
38
+ /** What the button says and is called: "Search, jump to or create…". */
39
+ readonly label: string;
40
+ /** The keys that open it too, as they are shown: "⌘K". */
41
+ readonly shortcut?: string;
42
+ readonly onPress: () => void;
43
+ }
28
44
  export interface AppShellProps {
29
- /** The mark at the top of the sidebar: a `Logo`. */
30
- readonly logo?: ReactNode;
31
- /** The site's name, at the top of the sidebar. */
45
+ /** What the mark at the top of the rail stands for, such as "Velocity", for screen readers. */
46
+ readonly logoLabel: string;
47
+ /** The site's name, at the start of the bar. */
32
48
  readonly siteName: string;
33
- /** Under the site's name: its template, or its address. */
49
+ /** Under the site's name: its address, or its template. */
34
50
  readonly siteDetail?: string;
35
51
  /** Names the navigation for screen readers, such as "Main". */
36
52
  readonly navLabel: string;
53
+ /** The sections of the rail, in groups. A section may hold places of its own (`children`). */
37
54
  readonly nav: readonly AppShellNavGroup[];
38
55
  /** The name of the button that opens the navigation on a narrow window, such as "Open the menu". */
39
56
  readonly menuLabel: string;
40
57
  /** The words of the link that jumps past the navigation, such as "Skip to content". */
41
58
  readonly skipLabel: string;
42
- /** The signed-in person, at the bottom of the sidebar, with their menu. */
59
+ /** The button in the middle of the bar that opens the search. */
60
+ readonly search?: AppShellSearch;
61
+ /** At the end of the bar: the one or two things a person does from anywhere, such as a `Button` that creates. */
62
+ readonly actions?: ReactNode;
63
+ /** The signed-in person, at the bottom of the rail, with their menu. */
43
64
  readonly account?: AppShellAccount;
44
65
  /** The screen. */
45
66
  readonly children: ReactNode;
46
67
  }
47
- /** The frame around every screen: the sidebar with its navigation, and the main area. */
48
- export declare function AppShell({ logo, siteName, siteDetail, navLabel, nav, menuLabel, skipLabel, account, children }: AppShellProps): import("react").JSX.Element;
68
+ /**
69
+ * The frame around every screen: the rail of sections, the places of the current section beside it,
70
+ * the bar across the top with the search, and the main area.
71
+ */
72
+ export declare function AppShell({ logoLabel, siteName, siteDetail, navLabel, nav, menuLabel, skipLabel, search, actions, account, children }: AppShellProps): import("react").JSX.Element;
49
73
  //# sourceMappingURL=AppShell.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../../src/patterns/AppShell/AppShell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AACjF,OAAO,KAAK,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,CAAC;IACjC,iHAAiH;IACjH,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC;IAC7B,wEAAwE;IACxE,QAAQ,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC;IACnC,kBAAkB;IAClB,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;CAC9B;AA2CD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,aAAa,+BA+KnJ"}
@@ -1,8 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { ChevronsUpDown, Menu as MenuIcon } from 'lucide-react';
2
+ import { ChevronsUpDown, Menu as MenuIcon, Search } from 'lucide-react';
3
3
  import { Button as AriaButton, Dialog as AriaDialog, DialogTrigger, Link, Modal, ModalOverlay } from 'react-aria-components';
4
+ import { Logo } from '../../components/Logo/index.js';
4
5
  import { Menu } from '../../components/Menu/index.js';
5
- import { appShellAccountAvatarClass, appShellAccountClass, appShellAccountLabelClass, appShellAccountDetailClass, appShellAccountIconSize, appShellAccountNameClass, appShellAccountTextClass, appShellBrandClass, appShellBrandDetailClass, appShellBrandNameClass, appShellBrandTextClass, appShellClass, appShellDrawerClass, appShellDrawerContentClass, appShellDrawerOverlayClass, appShellFooterClass, appShellGroupLabelClass, appShellMainClass, appShellMainId, appShellMenuButtonClass, appShellMenuIconSize, appShellNavClass, appShellNavIconSize, appShellNavLinkVariants, appShellNavListClass, appShellSidebarClass, appShellSkipClass, appShellTopBrandClass, appShellTopClass, } from './AppShell.variants.js';
6
+ import { Tooltip } from '../../components/Tooltip/index.js';
7
+ import { appShellAccountDetailClass, appShellAccountIconSize, appShellAccountNameClass, appShellAccountTextClass, appShellBarActionsClass, appShellBarClass, appShellBarLogoClass, appShellBarSiteClass, appShellBarSiteDetailClass, appShellBarSiteNameClass, appShellBarSiteTextClass, appShellBarSpacerClass, appShellClass, appShellColumnClass, appShellDrawerAccountClass, appShellDrawerAvatarClass, appShellDrawerChildrenClass, appShellDrawerClass, appShellDrawerContentClass, appShellDrawerFooterClass, appShellDrawerNavClass, appShellDrawerOverlayClass, appShellGroupLabelClass, appShellHiddenClass, appShellMainClass, appShellMainId, appShellMenuButtonClass, appShellMenuIconSize, appShellNavCountClass, appShellNavIconSize, appShellNavLabelClass, appShellNavLinkVariants, appShellNavListClass, appShellRailAccountClass, appShellRailAvatarClass, appShellRailBadgeClass, appShellRailClass, appShellRailGroupVariants, appShellRailIconSize, appShellRailLabelClass, appShellRailLinkVariants, appShellRailListClass, appShellRailLogoClass, appShellRailNavClass, appShellSearchClass, appShellSearchIconSize, appShellSearchLabelClass, appShellSearchShortcutClass, appShellSectionClass, appShellSectionTitleClass, appShellSkipClass, } from './AppShell.variants.js';
6
8
  /** The first letters of up to two names: "Maya Ellison" is "ME". */
7
9
  const initials = (name) => name
8
10
  .split(/\s+/)
@@ -10,16 +12,28 @@ const initials = (name) => name
10
12
  .slice(0, 2)
11
13
  .map((word) => word.charAt(0).toUpperCase())
12
14
  .join('');
13
- /** The frame around every screen: the sidebar with its navigation, and the main area. */
14
- export function AppShell({ logo, siteName, siteDetail, navLabel, nav, menuLabel, skipLabel, account, children }) {
15
- /** The navigation and the account, as the sidebar holds them and as the panel of a narrow window does. There a link also closes the panel. */
16
- const navigation = (close) => (_jsxs(_Fragment, { children: [_jsxs("div", { className: appShellBrandClass, children: [logo, _jsxs("div", { className: appShellBrandTextClass, children: [_jsx("div", { className: appShellBrandNameClass, children: siteName }), siteDetail !== undefined && _jsx("div", { className: appShellBrandDetailClass, children: siteDetail })] })] }), _jsx("nav", { "aria-label": navLabel, className: appShellNavClass, children: nav.map((group) => (_jsxs("div", { role: "group", ...(group.label !== undefined && { 'aria-label': group.label }), children: [group.label !== undefined && (_jsx("div", { "aria-hidden": true, className: appShellGroupLabelClass, children: group.label })), _jsx("ul", { className: appShellNavListClass, children: group.items.map(({ id, label, href, icon: Icon, isCurrent = false }) => (_jsx("li", { children: _jsxs(Link, { className: appShellNavLinkVariants({ isCurrent }), href: href, ...(isCurrent && { 'aria-current': 'page' }), ...(close && { onPress: close }), children: [Icon && _jsx(Icon, { "aria-hidden": true, size: appShellNavIconSize }), label] }) }, id))) })] }, group.id))) }), account !== undefined && (_jsx("div", { className: appShellFooterClass, children: _jsx(Menu, { placement: "top start", actions: account.actions, onAction: account.onAction, trigger: _jsxs(AriaButton, { className: appShellAccountClass, children: [_jsx("span", { className: appShellAccountLabelClass, children: account.label }), _jsx("span", { "aria-hidden": true, className: appShellAccountAvatarClass, children: initials(account.name) }), _jsxs("span", { className: appShellAccountTextClass, children: [_jsx("span", { className: appShellAccountNameClass, children: account.name }), account.detail !== undefined && _jsx("span", { className: appShellAccountDetailClass, children: account.detail })] }), _jsx(ChevronsUpDown, { "aria-hidden": true, size: appShellAccountIconSize })] }) }) }))] }));
15
+ /** One place in a list with its words showing: the column beside the rail, and the panel of a narrow window. */
16
+ function PlaceLink({ item, onPress }) {
17
+ const { label, href, icon: Icon, isCurrent = false, count } = item;
18
+ return (_jsxs(Link, { className: appShellNavLinkVariants({ isCurrent }), href: href, ...(isCurrent && { 'aria-current': 'page' }), ...(onPress && { onPress }), children: [Icon && _jsx(Icon, { "aria-hidden": true, size: appShellNavIconSize }), _jsx("span", { className: appShellNavLabelClass, children: label }), count !== undefined && _jsx("span", { className: appShellNavCountClass, children: count })] }));
19
+ }
20
+ /** Groups of places, each under its small heading. */
21
+ function PlaceGroups({ groups, onPress }) {
22
+ return groups.map((group) => (_jsxs("div", { role: "group", ...(group.label !== undefined && { 'aria-label': group.label }), children: [group.label !== undefined && (_jsx("div", { "aria-hidden": true, className: appShellGroupLabelClass, children: group.label })), _jsx("ul", { className: appShellNavListClass, children: group.items.map((item) => (_jsx("li", { children: _jsx(PlaceLink, { item: item, onPress: onPress }) }, item.id))) })] }, group.id)));
23
+ }
24
+ /**
25
+ * The frame around every screen: the rail of sections, the places of the current section beside it,
26
+ * the bar across the top with the search, and the main area.
27
+ */
28
+ export function AppShell({ logoLabel, siteName, siteDetail, navLabel, nav, menuLabel, skipLabel, search, actions, account, children }) {
29
+ const current = nav.flatMap((group) => group.items).find((item) => item.isCurrent === true && (item.children?.length ?? 0) > 0);
30
+ const accountWords = account !== undefined && (_jsxs(_Fragment, { children: [_jsx("span", { className: appShellHiddenClass, children: account.label }), _jsx("span", { "aria-hidden": true, className: appShellRailAvatarClass, children: initials(account.name) })] }));
17
31
  return (_jsxs("div", { className: appShellClass, children: [_jsx("a", { className: appShellSkipClass, href: `#${appShellMainId}`,
18
32
  // The link is followed here, not by the browser: a page with a base address would be sent
19
33
  // to that address, off the screen the person is on.
20
34
  onClick: (event) => {
21
35
  event.preventDefault();
22
36
  document.getElementById(appShellMainId)?.focus();
23
- }, children: skipLabel }), _jsxs("div", { className: appShellTopClass, children: [_jsxs(DialogTrigger, { children: [_jsx(AriaButton, { "aria-label": menuLabel, className: appShellMenuButtonClass, children: _jsx(MenuIcon, { "aria-hidden": true, size: appShellMenuIconSize }) }), _jsx(ModalOverlay, { isDismissable: true, className: appShellDrawerOverlayClass, children: _jsx(Modal, { className: appShellDrawerClass, children: _jsx(AriaDialog, { "aria-label": menuLabel, className: appShellDrawerContentClass, children: ({ close }) => navigation(close) }) }) })] }), _jsxs("div", { "aria-hidden": true, className: appShellTopBrandClass, children: [logo, _jsx("div", { className: appShellBrandNameClass, children: siteName })] })] }), _jsx("aside", { className: appShellSidebarClass, children: navigation() }), _jsx("main", { id: appShellMainId, tabIndex: -1, className: appShellMainClass, children: children })] }));
37
+ }, children: skipLabel }), _jsxs("aside", { className: appShellRailClass, children: [_jsx("div", { className: appShellRailLogoClass, children: _jsx(Logo, { label: logoLabel, tone: "rail" }) }), _jsx("nav", { "aria-label": navLabel, className: appShellRailNavClass, children: nav.map((group) => (_jsx("div", { role: "group", className: appShellRailGroupVariants({ place: group.place }), ...(group.label !== undefined && { 'aria-label': group.label }), children: _jsx("ul", { className: appShellRailListClass, children: group.items.map(({ id, label, href, icon: Icon, isCurrent = false, count }) => (_jsx("li", { children: _jsx(Tooltip, { content: label, placement: "right", children: _jsxs(Link, { className: appShellRailLinkVariants({ isCurrent }), href: href, ...(isCurrent && { 'aria-current': 'page' }), children: [Icon && _jsx(Icon, { "aria-hidden": true, size: appShellRailIconSize }), _jsx("span", { className: appShellRailLabelClass, children: label }), count !== undefined && (_jsx("span", { "aria-hidden": true, className: appShellRailBadgeClass, children: count }))] }) }) }, id))) }) }, group.id))) }), account !== undefined && (_jsx(Menu, { placement: "top start", actions: account.actions, onAction: account.onAction, trigger: _jsxs(AriaButton, { className: appShellRailAccountClass, children: [accountWords, _jsxs("span", { className: appShellHiddenClass, children: [_jsx("span", { children: account.name }), account.detail !== undefined && _jsx("span", { children: account.detail })] })] }) }))] }), current?.children !== undefined && (_jsxs("nav", { "aria-label": current.label, className: appShellSectionClass, children: [_jsx("div", { "aria-hidden": true, className: appShellSectionTitleClass, children: current.label }), _jsx(PlaceGroups, { groups: current.children })] })), _jsxs("div", { className: appShellColumnClass, children: [_jsxs("header", { className: appShellBarClass, children: [_jsxs(DialogTrigger, { children: [_jsx(AriaButton, { "aria-label": menuLabel, className: appShellMenuButtonClass, children: _jsx(MenuIcon, { "aria-hidden": true, size: appShellMenuIconSize }) }), _jsx(ModalOverlay, { isDismissable: true, className: appShellDrawerOverlayClass, children: _jsx(Modal, { className: appShellDrawerClass, children: _jsx(AriaDialog, { "aria-label": menuLabel, className: appShellDrawerContentClass, children: ({ close }) => (_jsxs(_Fragment, { children: [_jsx("nav", { "aria-label": navLabel, className: appShellDrawerNavClass, children: nav.map((group) => (_jsxs("div", { role: "group", ...(group.label !== undefined && { 'aria-label': group.label }), children: [group.label !== undefined && (_jsx("div", { "aria-hidden": true, className: appShellGroupLabelClass, children: group.label })), _jsx("ul", { className: appShellNavListClass, children: group.items.map((item) => (_jsxs("li", { children: [_jsx(PlaceLink, { item: item, onPress: close }), item.children !== undefined && item.children.length > 0 && (_jsx("div", { className: appShellDrawerChildrenClass, children: _jsx(PlaceGroups, { groups: item.children, onPress: close }) }))] }, item.id))) })] }, group.id))) }), account !== undefined && (_jsx("div", { className: appShellDrawerFooterClass, children: _jsx(Menu, { placement: "top start", actions: account.actions, onAction: account.onAction, trigger: _jsxs(AriaButton, { className: appShellDrawerAccountClass, children: [_jsx("span", { className: appShellHiddenClass, children: account.label }), _jsx("span", { "aria-hidden": true, className: appShellDrawerAvatarClass, children: initials(account.name) }), _jsxs("span", { className: appShellAccountTextClass, children: [_jsx("span", { className: appShellAccountNameClass, children: account.name }), account.detail !== undefined && _jsx("span", { className: appShellAccountDetailClass, children: account.detail })] }), _jsx(ChevronsUpDown, { "aria-hidden": true, size: appShellAccountIconSize })] }) }) }))] })) }) }) })] }), _jsxs("div", { className: appShellBarSiteClass, children: [_jsx("span", { className: appShellBarLogoClass, children: _jsx(Logo, { label: logoLabel, size: "sm" }) }), _jsxs("div", { className: appShellBarSiteTextClass, children: [_jsx("span", { className: appShellBarSiteNameClass, children: siteName }), siteDetail !== undefined && _jsx("span", { className: appShellBarSiteDetailClass, children: siteDetail })] })] }), _jsx("span", { "aria-hidden": true, className: appShellBarSpacerClass }), search !== undefined && (_jsxs(AriaButton, { className: appShellSearchClass, onPress: search.onPress, children: [_jsx(Search, { "aria-hidden": true, size: appShellSearchIconSize }), _jsx("span", { className: appShellSearchLabelClass, children: search.label }), search.shortcut !== undefined && (_jsx("kbd", { "aria-hidden": true, className: appShellSearchShortcutClass, children: search.shortcut }))] })), _jsx("span", { "aria-hidden": true, className: appShellBarSpacerClass }), actions !== undefined && _jsx("div", { className: appShellBarActionsClass, children: actions })] }), _jsx("main", { id: appShellMainId, tabIndex: -1, className: appShellMainClass, children: children })] })] }));
24
38
  }
25
39
  //# sourceMappingURL=AppShell.js.map