@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.
- package/component-registry.json +50 -3
- package/dist/components/Logo/Logo.d.ts +1 -1
- package/dist/components/Logo/Logo.d.ts.map +1 -1
- package/dist/components/Logo/Logo.js +3 -3
- package/dist/components/Logo/Logo.js.map +1 -1
- package/dist/components/Logo/Logo.variants.d.ts +5 -2
- package/dist/components/Logo/Logo.variants.d.ts.map +1 -1
- package/dist/components/Logo/Logo.variants.js +10 -1
- package/dist/components/Logo/Logo.variants.js.map +1 -1
- package/dist/components/Meter/Meter.d.ts +13 -0
- package/dist/components/Meter/Meter.d.ts.map +1 -0
- package/dist/components/Meter/Meter.js +8 -0
- package/dist/components/Meter/Meter.js.map +1 -0
- package/dist/components/Meter/Meter.variants.d.ts +14 -0
- package/dist/components/Meter/Meter.variants.d.ts.map +1 -0
- package/dist/components/Meter/Meter.variants.js +39 -0
- package/dist/components/Meter/Meter.variants.js.map +1 -0
- package/dist/components/Meter/index.d.ts +2 -0
- package/dist/components/Meter/index.d.ts.map +1 -0
- package/dist/components/Meter/index.js +2 -0
- package/dist/components/Meter/index.js.map +1 -0
- package/dist/components/Table/Table.d.ts +9 -2
- package/dist/components/Table/Table.d.ts.map +1 -1
- package/dist/components/Table/Table.js +14 -2
- package/dist/components/Table/Table.js.map +1 -1
- package/dist/components/Table/Table.variants.d.ts.map +1 -1
- package/dist/components/Table/Table.variants.js +2 -0
- package/dist/components/Table/Table.variants.js.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/patterns/AppShell/AppShell.d.ts +31 -7
- package/dist/patterns/AppShell/AppShell.d.ts.map +1 -1
- package/dist/patterns/AppShell/AppShell.js +21 -7
- package/dist/patterns/AppShell/AppShell.js.map +1 -1
- package/dist/patterns/AppShell/AppShell.variants.d.ts +61 -32
- package/dist/patterns/AppShell/AppShell.variants.d.ts.map +1 -1
- package/dist/patterns/AppShell/AppShell.variants.js +95 -38
- package/dist/patterns/AppShell/AppShell.variants.js.map +1 -1
- package/dist/patterns/AppShell/index.d.ts +1 -1
- package/dist/patterns/AppShell/index.d.ts.map +1 -1
- package/dist/patterns/AppShell/index.js.map +1 -1
- package/dist/patterns/CommandPalette/CommandPalette.d.ts +36 -0
- package/dist/patterns/CommandPalette/CommandPalette.d.ts.map +1 -0
- package/dist/patterns/CommandPalette/CommandPalette.js +18 -0
- package/dist/patterns/CommandPalette/CommandPalette.js.map +1 -0
- package/dist/patterns/CommandPalette/CommandPalette.variants.d.ts +18 -0
- package/dist/patterns/CommandPalette/CommandPalette.variants.d.ts.map +1 -0
- package/dist/patterns/CommandPalette/CommandPalette.variants.js +21 -0
- package/dist/patterns/CommandPalette/CommandPalette.variants.js.map +1 -0
- package/dist/patterns/CommandPalette/index.d.ts +2 -0
- package/dist/patterns/CommandPalette/index.d.ts.map +1 -0
- package/dist/patterns/CommandPalette/index.js +2 -0
- package/dist/patterns/CommandPalette/index.js.map +1 -0
- package/dist/patterns/Outline/Outline.d.ts +26 -0
- package/dist/patterns/Outline/Outline.d.ts.map +1 -0
- package/dist/patterns/Outline/Outline.js +21 -0
- package/dist/patterns/Outline/Outline.js.map +1 -0
- package/dist/patterns/Outline/Outline.variants.d.ts +11 -0
- package/dist/patterns/Outline/Outline.variants.d.ts.map +1 -0
- package/dist/patterns/Outline/Outline.variants.js +21 -0
- package/dist/patterns/Outline/Outline.variants.js.map +1 -0
- package/dist/patterns/Outline/index.d.ts +2 -0
- package/dist/patterns/Outline/index.d.ts.map +1 -0
- package/dist/patterns/Outline/index.js +2 -0
- package/dist/patterns/Outline/index.js.map +1 -0
- package/dist/patterns/SiteWindow/SiteWindow.d.ts +20 -0
- package/dist/patterns/SiteWindow/SiteWindow.d.ts.map +1 -0
- package/dist/patterns/SiteWindow/SiteWindow.js +8 -0
- package/dist/patterns/SiteWindow/SiteWindow.js.map +1 -0
- package/dist/patterns/SiteWindow/SiteWindow.variants.d.ts +24 -0
- package/dist/patterns/SiteWindow/SiteWindow.variants.d.ts.map +1 -0
- package/dist/patterns/SiteWindow/SiteWindow.variants.js +25 -0
- package/dist/patterns/SiteWindow/SiteWindow.variants.js.map +1 -0
- package/dist/patterns/SiteWindow/index.d.ts +2 -0
- package/dist/patterns/SiteWindow/index.d.ts.map +1 -0
- package/dist/patterns/SiteWindow/index.js +2 -0
- package/dist/patterns/SiteWindow/index.js.map +1 -0
- package/dist/patterns/Welcome/Welcome.d.ts +18 -0
- package/dist/patterns/Welcome/Welcome.d.ts.map +1 -0
- package/dist/patterns/Welcome/Welcome.js +14 -0
- package/dist/patterns/Welcome/Welcome.js.map +1 -0
- package/dist/patterns/Welcome/Welcome.variants.d.ts +12 -0
- package/dist/patterns/Welcome/Welcome.variants.d.ts.map +1 -0
- package/dist/patterns/Welcome/Welcome.variants.js +12 -0
- package/dist/patterns/Welcome/Welcome.variants.js.map +1 -0
- package/dist/patterns/Welcome/index.d.ts +2 -0
- package/dist/patterns/Welcome/index.d.ts.map +1 -0
- package/dist/patterns/Welcome/index.js +2 -0
- package/dist/patterns/Welcome/index.js.map +1 -0
- package/dist/patterns/Workbench/Workbench.d.ts +8 -4
- package/dist/patterns/Workbench/Workbench.d.ts.map +1 -1
- package/dist/patterns/Workbench/Workbench.js +7 -6
- package/dist/patterns/Workbench/Workbench.js.map +1 -1
- package/dist/patterns/Workbench/Workbench.variants.d.ts +6 -1
- package/dist/patterns/Workbench/Workbench.variants.d.ts.map +1 -1
- package/dist/patterns/Workbench/Workbench.variants.js +8 -3
- package/dist/patterns/Workbench/Workbench.variants.js.map +1 -1
- package/dist/patterns/index.d.ts +4 -0
- package/dist/patterns/index.d.ts.map +1 -1
- package/dist/patterns/index.js +4 -0
- package/dist/patterns/index.js.map +1 -1
- package/package.json +1 -1
- package/src/styles.css +18 -0
- package/src/tokens/tokens.css +21 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { cva } from 'class-variance-authority';
|
|
2
|
+
export const outlineClass = 'flex min-h-0 flex-col gap-2';
|
|
3
|
+
export const outlineTitleClass = 'px-2 text-xs font-semibold tracking-widest text-foreground-subtle uppercase';
|
|
4
|
+
export const outlineListClass = 'flex flex-col gap-0.5 outline-none';
|
|
5
|
+
export const outlineItemVariants = cva([
|
|
6
|
+
'flex min-h-9 cursor-default items-center gap-2.5 rounded-lg px-2 text-base text-foreground-secondary transition-colors motion-fast outline-none',
|
|
7
|
+
'data-hovered:bg-background-secondary data-hovered:text-foreground',
|
|
8
|
+
'data-focus-visible:ring-2 data-focus-visible:ring-ring data-focus-visible:ring-inset',
|
|
9
|
+
'data-selected:bg-background-tertiary data-selected:font-semibold data-selected:text-foreground',
|
|
10
|
+
], {
|
|
11
|
+
variants: {
|
|
12
|
+
/** A section inside another is set in under it, a step for each level. */
|
|
13
|
+
depth: { 0: '', 1: 'pl-6', 2: 'pl-10', 3: 'pl-14' },
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: { depth: 0 },
|
|
16
|
+
});
|
|
17
|
+
export const outlineIconClass = 'flex h-6 w-6 shrink-0 items-center justify-center rounded-md border border-border bg-background text-foreground-muted';
|
|
18
|
+
export const outlineIconSize = 14;
|
|
19
|
+
export const outlineLabelClass = 'min-w-0 flex-1 truncate';
|
|
20
|
+
export const outlineEmptyClass = 'px-2 py-3 text-sm text-foreground-muted';
|
|
21
|
+
//# sourceMappingURL=Outline.variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Outline.variants.js","sourceRoot":"","sources":["../../../src/patterns/Outline/Outline.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAE/C,MAAM,CAAC,MAAM,YAAY,GAAG,6BAA6B,CAAC;AAC1D,MAAM,CAAC,MAAM,iBAAiB,GAAG,6EAA6E,CAAC;AAC/G,MAAM,CAAC,MAAM,gBAAgB,GAAG,oCAAoC,CAAC;AACrE,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CACpC;IACE,iJAAiJ;IACjJ,mEAAmE;IACnE,sFAAsF;IACtF,gGAAgG;CACjG,EACD;IACE,QAAQ,EAAE;QACR,0EAA0E;QAC1E,KAAK,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE;KACpD;IACD,eAAe,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE;CAC9B,CACF,CAAC;AACF,MAAM,CAAC,MAAM,gBAAgB,GAAG,uHAAuH,CAAC;AACxJ,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAC;AAClC,MAAM,CAAC,MAAM,iBAAiB,GAAG,yBAAyB,CAAC;AAC3D,MAAM,CAAC,MAAM,iBAAiB,GAAG,yCAAyC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/patterns/Outline/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/patterns/Outline/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAuC,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type SiteWindowVariants } from './SiteWindow.variants.js';
|
|
2
|
+
export interface SiteWindowProps extends SiteWindowVariants {
|
|
3
|
+
/** The site's address, shown where a browser shows it: "lakeshore.example". */
|
|
4
|
+
readonly address: string;
|
|
5
|
+
/** The page to show, as visitors see it: a path on the site, such as "/". */
|
|
6
|
+
readonly src: string;
|
|
7
|
+
/** What the page is, for screen readers: "The home page of Lakeshore Realty". */
|
|
8
|
+
readonly title: string;
|
|
9
|
+
/** What pressing the card does, at its foot: "Edit the home page". */
|
|
10
|
+
readonly label: string;
|
|
11
|
+
/** A few words at the foot before it: when the page was last published, and by whom. */
|
|
12
|
+
readonly meta?: string;
|
|
13
|
+
/** Where pressing the card leads. */
|
|
14
|
+
readonly href?: string;
|
|
15
|
+
/** What pressing the card does, when it leads nowhere by itself. */
|
|
16
|
+
readonly onPress?: () => void;
|
|
17
|
+
}
|
|
18
|
+
/** A page of the site in a small browser window, as visitors see it now. The whole card is one link. */
|
|
19
|
+
export declare function SiteWindow({ address, src, title, label, meta, href, onPress, size }: SiteWindowProps): import("react").JSX.Element;
|
|
20
|
+
//# sourceMappingURL=SiteWindow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SiteWindow.d.ts","sourceRoot":"","sources":["../../../src/patterns/SiteWindow/SiteWindow.tsx"],"names":[],"mappings":"AACA,OAAO,EAYL,KAAK,kBAAkB,EACxB,MAAM,0BAA0B,CAAC;AAElC,MAAM,WAAW,eAAgB,SAAQ,kBAAkB;IACzD,+EAA+E;IAC/E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,6EAA6E;IAC7E,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,iFAAiF;IACjF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,sEAAsE;IACtE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,wFAAwF;IACxF,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,qCAAqC;IACrC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,oEAAoE;IACpE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED,wGAAwG;AACxG,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,eAAe,+BAuBpG"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Link } from 'react-aria-components';
|
|
3
|
+
import { siteWindowAddressClass, siteWindowBarClass, siteWindowClass, siteWindowDotClass, siteWindowDotsClass, siteWindowFootClass, siteWindowFrameVariants, siteWindowLinkClass, siteWindowMetaClass, siteWindowSpacerClass, siteWindowViewVariants, } from './SiteWindow.variants.js';
|
|
4
|
+
/** A page of the site in a small browser window, as visitors see it now. The whole card is one link. */
|
|
5
|
+
export function SiteWindow({ address, src, title, label, meta, href, onPress, size }) {
|
|
6
|
+
return (_jsxs("div", { className: siteWindowClass, children: [_jsxs("div", { "aria-hidden": true, className: siteWindowBarClass, children: [_jsxs("span", { className: siteWindowDotsClass, children: [_jsx("span", { className: siteWindowDotClass }), _jsx("span", { className: siteWindowDotClass }), _jsx("span", { className: siteWindowDotClass })] }), _jsx("span", { className: siteWindowAddressClass, children: address }), _jsx("span", { className: siteWindowSpacerClass })] }), _jsx("div", { className: siteWindowViewVariants({ size }), children: _jsx("iframe", { src: src, title: title, loading: "lazy", tabIndex: -1, "aria-hidden": true, className: siteWindowFrameVariants({ size }) }) }), _jsxs("div", { className: siteWindowFootClass, children: [meta !== undefined && _jsx("span", { className: siteWindowMetaClass, children: meta }), _jsx(Link, { className: siteWindowLinkClass, ...(href !== undefined && { href }), ...(onPress !== undefined && { onPress }), children: label })] })] }));
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=SiteWindow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SiteWindow.js","sourceRoot":"","sources":["../../../src/patterns/SiteWindow/SiteWindow.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EACL,sBAAsB,EACt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 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
/** `relative`, so the link at its foot can stretch over the whole card and make all of it one thing to press. */
|
|
3
|
+
export declare const siteWindowClass = "group relative w-full min-w-0 max-w-xl overflow-hidden rounded-xl border border-border bg-card shadow-xl transition-colors motion-base has-data-hovered:border-border-strong has-data-focus-visible:ring-2 has-data-focus-visible:ring-ring";
|
|
4
|
+
export declare const siteWindowBarClass = "flex items-center gap-3 border-b border-border bg-background-secondary px-3.5 py-2.5";
|
|
5
|
+
export declare const siteWindowDotsClass = "flex shrink-0 gap-1.5";
|
|
6
|
+
export declare const siteWindowDotClass = "h-2.5 w-2.5 rounded-full bg-border-strong";
|
|
7
|
+
export declare const siteWindowAddressClass = "min-w-0 flex-1 truncate text-center font-mono text-xs text-foreground-subtle";
|
|
8
|
+
export declare const siteWindowSpacerClass = "w-10 shrink-0";
|
|
9
|
+
/**
|
|
10
|
+
* The page is drawn at twice the card's width and shown at half its size, so it looks as it does on
|
|
11
|
+
* a desktop. It cannot be pressed or reached by the keyboard: the card is a way to edit the page, not the page.
|
|
12
|
+
*/
|
|
13
|
+
export declare const siteWindowViewVariants: (props?: ({
|
|
14
|
+
size?: "sm" | "md" | null | undefined;
|
|
15
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
16
|
+
/** `sm` draws the page wider still and shows it at a fifth of its size, for a narrow column. */
|
|
17
|
+
export declare const siteWindowFrameVariants: (props?: ({
|
|
18
|
+
size?: "sm" | "md" | null | undefined;
|
|
19
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
20
|
+
export type SiteWindowVariants = VariantProps<typeof siteWindowViewVariants>;
|
|
21
|
+
export declare const siteWindowFootClass = "flex items-center gap-3 border-t border-border px-4 py-3 text-sm";
|
|
22
|
+
export declare const siteWindowMetaClass = "min-w-0 flex-1 truncate text-foreground-muted";
|
|
23
|
+
export declare const siteWindowLinkClass = "shrink-0 font-semibold text-foreground outline-none after:absolute after:inset-0 group-hover:underline";
|
|
24
|
+
//# sourceMappingURL=SiteWindow.variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SiteWindow.variants.d.ts","sourceRoot":"","sources":["../../../src/patterns/SiteWindow/SiteWindow.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,iHAAiH;AACjH,eAAO,MAAM,eAAe,gPACmN,CAAC;AAChP,eAAO,MAAM,kBAAkB,yFAAyF,CAAC;AACzH,eAAO,MAAM,mBAAmB,0BAA0B,CAAC;AAC3D,eAAO,MAAM,kBAAkB,8CAA8C,CAAC;AAC9E,eAAO,MAAM,sBAAsB,iFAAiF,CAAC;AACrH,eAAO,MAAM,qBAAqB,kBAAkB,CAAC;AACrD;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;8EAGjC,CAAC;AACH,gGAAgG;AAChG,eAAO,MAAM,uBAAuB;;8EAGlC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAC7E,eAAO,MAAM,mBAAmB,qEAAqE,CAAC;AACtG,eAAO,MAAM,mBAAmB,kDAAkD,CAAC;AACnF,eAAO,MAAM,mBAAmB,2GAA2G,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { cva } from 'class-variance-authority';
|
|
2
|
+
/** `relative`, so the link at its foot can stretch over the whole card and make all of it one thing to press. */
|
|
3
|
+
export const siteWindowClass = 'group relative w-full min-w-0 max-w-xl overflow-hidden rounded-xl border border-border bg-card shadow-xl transition-colors motion-base has-data-hovered:border-border-strong has-data-focus-visible:ring-2 has-data-focus-visible:ring-ring';
|
|
4
|
+
export const siteWindowBarClass = 'flex items-center gap-3 border-b border-border bg-background-secondary px-3.5 py-2.5';
|
|
5
|
+
export const siteWindowDotsClass = 'flex shrink-0 gap-1.5';
|
|
6
|
+
export const siteWindowDotClass = 'h-2.5 w-2.5 rounded-full bg-border-strong';
|
|
7
|
+
export const siteWindowAddressClass = 'min-w-0 flex-1 truncate text-center font-mono text-xs text-foreground-subtle';
|
|
8
|
+
export const siteWindowSpacerClass = 'w-10 shrink-0';
|
|
9
|
+
/**
|
|
10
|
+
* The page is drawn at twice the card's width and shown at half its size, so it looks as it does on
|
|
11
|
+
* a desktop. It cannot be pressed or reached by the keyboard: the card is a way to edit the page, not the page.
|
|
12
|
+
*/
|
|
13
|
+
export const siteWindowViewVariants = cva('relative overflow-hidden bg-background', {
|
|
14
|
+
variants: { size: { md: 'h-72', sm: 'h-40' } },
|
|
15
|
+
defaultVariants: { size: 'md' },
|
|
16
|
+
});
|
|
17
|
+
/** `sm` draws the page wider still and shows it at a fifth of its size, for a narrow column. */
|
|
18
|
+
export const siteWindowFrameVariants = cva('pointer-events-none absolute top-0 left-0 origin-top-left border-0', {
|
|
19
|
+
variants: { size: { md: 'h-144 w-288 scale-50', sm: 'h-200 w-320 scale-20' } },
|
|
20
|
+
defaultVariants: { size: 'md' },
|
|
21
|
+
});
|
|
22
|
+
export const siteWindowFootClass = 'flex items-center gap-3 border-t border-border px-4 py-3 text-sm';
|
|
23
|
+
export const siteWindowMetaClass = 'min-w-0 flex-1 truncate text-foreground-muted';
|
|
24
|
+
export const siteWindowLinkClass = 'shrink-0 font-semibold text-foreground outline-none after:absolute after:inset-0 group-hover:underline';
|
|
25
|
+
//# sourceMappingURL=SiteWindow.variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SiteWindow.variants.js","sourceRoot":"","sources":["../../../src/patterns/SiteWindow/SiteWindow.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,iHAAiH;AACjH,MAAM,CAAC,MAAM,eAAe,GAC1B,6OAA6O,CAAC;AAChP,MAAM,CAAC,MAAM,kBAAkB,GAAG,sFAAsF,CAAC;AACzH,MAAM,CAAC,MAAM,mBAAmB,GAAG,uBAAuB,CAAC;AAC3D,MAAM,CAAC,MAAM,kBAAkB,GAAG,2CAA2C,CAAC;AAC9E,MAAM,CAAC,MAAM,sBAAsB,GAAG,8EAA8E,CAAC;AACrH,MAAM,CAAC,MAAM,qBAAqB,GAAG,eAAe,CAAC;AACrD;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAC,wCAAwC,EAAE;IAClF,QAAQ,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE;IAC9C,eAAe,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;CAChC,CAAC,CAAC;AACH,gGAAgG;AAChG,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAC,oEAAoE,EAAE;IAC/G,QAAQ,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,sBAAsB,EAAE,EAAE,EAAE,sBAAsB,EAAE,EAAE;IAC9E,eAAe,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;CAChC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,kEAAkE,CAAC;AACtG,MAAM,CAAC,MAAM,mBAAmB,GAAG,+CAA+C,CAAC;AACnF,MAAM,CAAC,MAAM,mBAAmB,GAAG,wGAAwG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/patterns/SiteWindow/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/patterns/SiteWindow/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAwB,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface WelcomeProps {
|
|
3
|
+
/** A few words over the title, such as today's date. */
|
|
4
|
+
readonly eyebrow?: string;
|
|
5
|
+
/** The screen's one heading: "Good morning, Dana. 3 drafts are waiting." */
|
|
6
|
+
readonly title: string;
|
|
7
|
+
/** Words inside the title to set apart, such as "3 drafts". Its first appearance is marked. */
|
|
8
|
+
readonly highlight?: string;
|
|
9
|
+
/** One or two sentences under the title. */
|
|
10
|
+
readonly description?: string;
|
|
11
|
+
/** What to do first: one main `Button` and one or two others. */
|
|
12
|
+
readonly actions?: ReactNode;
|
|
13
|
+
/** Beside the words, from a tablet's width up: a `SiteWindow`. A phone leaves it out. */
|
|
14
|
+
readonly aside?: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
/** The top of a screen that greets the person: what matters now in large words, what to do about it, and the site beside it. */
|
|
17
|
+
export declare function Welcome({ eyebrow, title, highlight, description, actions, aside }: WelcomeProps): import("react").JSX.Element;
|
|
18
|
+
//# sourceMappingURL=Welcome.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Welcome.d.ts","sourceRoot":"","sources":["../../../src/patterns/Welcome/Welcome.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAavC,MAAM,WAAW,YAAY;IAC3B,wDAAwD;IACxD,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,4EAA4E;IAC5E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,+FAA+F;IAC/F,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,4CAA4C;IAC5C,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,iEAAiE;IACjE,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC;IAC7B,yFAAyF;IACzF,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC;CAC5B;AAeD,gIAAgI;AAChI,wBAAgB,OAAO,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,YAAY,+BAc/F"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { welcomeActionsClass, welcomeAsideClass, welcomeClass, welcomeDescriptionClass, welcomeEyebrowClass, welcomeInnerClass, welcomeMarkClass, welcomeTextClass, welcomeTitleClass, } from './Welcome.variants.js';
|
|
3
|
+
/** The title with the highlighted words marked, where they appear in it. */
|
|
4
|
+
function marked(title, highlight) {
|
|
5
|
+
const at = highlight === undefined || highlight === '' ? -1 : title.indexOf(highlight);
|
|
6
|
+
if (highlight === undefined || at < 0)
|
|
7
|
+
return title;
|
|
8
|
+
return (_jsxs(_Fragment, { children: [title.slice(0, at), _jsx("mark", { className: welcomeMarkClass, children: highlight }), title.slice(at + highlight.length)] }));
|
|
9
|
+
}
|
|
10
|
+
/** The top of a screen that greets the person: what matters now in large words, what to do about it, and the site beside it. */
|
|
11
|
+
export function Welcome({ eyebrow, title, highlight, description, actions, aside }) {
|
|
12
|
+
return (_jsx("section", { className: welcomeClass, children: _jsxs("div", { className: welcomeInnerClass, children: [_jsxs("div", { className: welcomeTextClass, children: [eyebrow !== undefined && _jsx("p", { className: welcomeEyebrowClass, children: eyebrow }), _jsx("h1", { className: welcomeTitleClass, children: marked(title, highlight) }), description !== undefined && _jsx("p", { className: welcomeDescriptionClass, children: description }), actions !== undefined && _jsx("div", { className: welcomeActionsClass, children: actions })] }), aside !== undefined && _jsx("div", { className: welcomeAsideClass, children: aside })] }) }));
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=Welcome.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Welcome.js","sourceRoot":"","sources":["../../../src/patterns/Welcome/Welcome.tsx"],"names":[],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E,EACL,KAAK,KAAK,SAAS,IAAI,cAAK,SAAS,EAAE,iBAAiB,YAAG,KAAK,GAAO,IACpE,GACE,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const welcomeClass = "border-b border-border bg-background bg-grid";
|
|
2
|
+
export declare const welcomeInnerClass = "mx-auto flex max-w-7xl flex-wrap items-center gap-10 px-4 py-8 sm:px-6 md:px-12 md:py-12";
|
|
3
|
+
export declare const welcomeTextClass = "flex min-w-0 flex-1 basis-96 flex-col gap-4";
|
|
4
|
+
export declare const welcomeEyebrowClass = "text-xs font-semibold tracking-widest text-foreground-subtle uppercase";
|
|
5
|
+
export declare const welcomeTitleClass = "max-w-2xl font-display text-4xl font-bold tracking-tight text-balance text-foreground md:text-5xl";
|
|
6
|
+
/** The one phrase that matters on the screen, on the brand's colour: the only orange there. */
|
|
7
|
+
export declare const welcomeMarkClass = "rounded-md bg-brand-fill px-1.5 text-brand-ink box-decoration-clone";
|
|
8
|
+
export declare const welcomeDescriptionClass = "max-w-xl text-lg text-foreground-muted";
|
|
9
|
+
export declare const welcomeActionsClass = "flex flex-wrap gap-2 pt-2";
|
|
10
|
+
/** On a phone the words come first and alone: what stands beside them would push the screen's content far down. */
|
|
11
|
+
export declare const welcomeAsideClass = "hidden min-w-0 flex-1 basis-96 justify-center md:flex lg:justify-end";
|
|
12
|
+
//# sourceMappingURL=Welcome.variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Welcome.variants.d.ts","sourceRoot":"","sources":["../../../src/patterns/Welcome/Welcome.variants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,iDAAiD,CAAC;AAC3E,eAAO,MAAM,iBAAiB,6FAA6F,CAAC;AAC5H,eAAO,MAAM,gBAAgB,gDAAgD,CAAC;AAC9E,eAAO,MAAM,mBAAmB,2EAA2E,CAAC;AAC5G,eAAO,MAAM,iBAAiB,sGAAsG,CAAC;AACrI,+FAA+F;AAC/F,eAAO,MAAM,gBAAgB,wEAAwE,CAAC;AACtG,eAAO,MAAM,uBAAuB,2CAA2C,CAAC;AAChF,eAAO,MAAM,mBAAmB,8BAA8B,CAAC;AAC/D,mHAAmH;AACnH,eAAO,MAAM,iBAAiB,yEAAyE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export const welcomeClass = 'border-b border-border bg-background bg-grid';
|
|
2
|
+
export const welcomeInnerClass = 'mx-auto flex max-w-7xl flex-wrap items-center gap-10 px-4 py-8 sm:px-6 md:px-12 md:py-12';
|
|
3
|
+
export const welcomeTextClass = 'flex min-w-0 flex-1 basis-96 flex-col gap-4';
|
|
4
|
+
export const welcomeEyebrowClass = 'text-xs font-semibold tracking-widest text-foreground-subtle uppercase';
|
|
5
|
+
export const welcomeTitleClass = 'max-w-2xl font-display text-4xl font-bold tracking-tight text-balance text-foreground md:text-5xl';
|
|
6
|
+
/** The one phrase that matters on the screen, on the brand's colour: the only orange there. */
|
|
7
|
+
export const welcomeMarkClass = 'rounded-md bg-brand-fill px-1.5 text-brand-ink box-decoration-clone';
|
|
8
|
+
export const welcomeDescriptionClass = 'max-w-xl text-lg text-foreground-muted';
|
|
9
|
+
export const welcomeActionsClass = 'flex flex-wrap gap-2 pt-2';
|
|
10
|
+
/** On a phone the words come first and alone: what stands beside them would push the screen's content far down. */
|
|
11
|
+
export const welcomeAsideClass = 'hidden min-w-0 flex-1 basis-96 justify-center md:flex lg:justify-end';
|
|
12
|
+
//# sourceMappingURL=Welcome.variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Welcome.variants.js","sourceRoot":"","sources":["../../../src/patterns/Welcome/Welcome.variants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG,8CAA8C,CAAC;AAC3E,MAAM,CAAC,MAAM,iBAAiB,GAAG,0FAA0F,CAAC;AAC5H,MAAM,CAAC,MAAM,gBAAgB,GAAG,6CAA6C,CAAC;AAC9E,MAAM,CAAC,MAAM,mBAAmB,GAAG,wEAAwE,CAAC;AAC5G,MAAM,CAAC,MAAM,iBAAiB,GAAG,mGAAmG,CAAC;AACrI,+FAA+F;AAC/F,MAAM,CAAC,MAAM,gBAAgB,GAAG,qEAAqE,CAAC;AACtG,MAAM,CAAC,MAAM,uBAAuB,GAAG,wCAAwC,CAAC;AAChF,MAAM,CAAC,MAAM,mBAAmB,GAAG,2BAA2B,CAAC;AAC/D,mHAAmH;AACnH,MAAM,CAAC,MAAM,iBAAiB,GAAG,sEAAsE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/patterns/Welcome/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/patterns/Welcome/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAqB,MAAM,cAAc,CAAC"}
|
|
@@ -11,12 +11,16 @@ export interface WorkbenchProps extends WorkbenchVariants {
|
|
|
11
11
|
readonly bar?: ReactNode;
|
|
12
12
|
/** With the whole window, whether the form is put away at the side so the pane has it all. */
|
|
13
13
|
readonly isFormAway?: boolean;
|
|
14
|
+
/** With the whole window, on the left of the pane: the way around it, such as an `Outline` of the page's sections. */
|
|
15
|
+
readonly outline?: ReactNode;
|
|
16
|
+
/** Names the outline's column for screen readers, such as "Sections of the page". */
|
|
17
|
+
readonly outlineLabel?: string;
|
|
14
18
|
}
|
|
15
19
|
/**
|
|
16
20
|
* A form with what it makes shown large beside it. On a narrow screen the pane follows below.
|
|
17
|
-
* With `view="whole"` the two take the whole window, over the editor's frame
|
|
18
|
-
* panel
|
|
19
|
-
* are: nothing typed is lost and the pane is not made again.
|
|
21
|
+
* With `view="whole"` the two take the whole window, over the editor's frame: the outline on the
|
|
22
|
+
* left, the pane in the middle, and the form a panel on the right that can be put away. Going from
|
|
23
|
+
* one view to the other keeps both as they are: nothing typed is lost and the pane is not made again.
|
|
20
24
|
*/
|
|
21
|
-
export declare function Workbench({ paneLabel, children, pane, bar, isFormAway, view }: WorkbenchProps): import("react").JSX.Element;
|
|
25
|
+
export declare function Workbench({ paneLabel, children, pane, bar, isFormAway, outline, outlineLabel, view }: WorkbenchProps): import("react").JSX.Element;
|
|
22
26
|
//# sourceMappingURL=Workbench.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Workbench.d.ts","sourceRoot":"","sources":["../../../src/patterns/Workbench/Workbench.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,
|
|
1
|
+
{"version":3,"file":"Workbench.d.ts","sourceRoot":"","sources":["../../../src/patterns/Workbench/Workbench.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAML,KAAK,iBAAiB,EACvB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,WAAW,cAAe,SAAQ,iBAAiB;IACvD,6DAA6D;IAC7D,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,2DAA2D;IAC3D,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,6EAA6E;IAC7E,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,iHAAiH;IACjH,QAAQ,CAAC,GAAG,CAAC,EAAE,SAAS,CAAC;IACzB,8FAA8F;IAC9F,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAC9B,sHAAsH;IACtH,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC;IAC7B,qFAAqF;IACrF,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,UAAkB,EAAE,OAAO,EAAE,YAAY,EAAE,IAAe,EAAE,EAAE,cAAc,+BAuBvI"}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { FocusScope } from 'react-aria';
|
|
3
|
-
import { workbenchBodyVariants, workbenchFormVariants, workbenchPaneVariants, workbenchVariants } from './Workbench.variants.js';
|
|
3
|
+
import { workbenchBodyVariants, workbenchFormVariants, workbenchOutlineClass, workbenchPaneVariants, workbenchVariants, } from './Workbench.variants.js';
|
|
4
4
|
/**
|
|
5
5
|
* A form with what it makes shown large beside it. On a narrow screen the pane follows below.
|
|
6
|
-
* With `view="whole"` the two take the whole window, over the editor's frame
|
|
7
|
-
* panel
|
|
8
|
-
* are: nothing typed is lost and the pane is not made again.
|
|
6
|
+
* With `view="whole"` the two take the whole window, over the editor's frame: the outline on the
|
|
7
|
+
* left, the pane in the middle, and the form a panel on the right that can be put away. Going from
|
|
8
|
+
* one view to the other keeps both as they are: nothing typed is lost and the pane is not made again.
|
|
9
9
|
*/
|
|
10
|
-
export function Workbench({ paneLabel, children, pane, bar, isFormAway = false, view = 'beside' }) {
|
|
10
|
+
export function Workbench({ paneLabel, children, pane, bar, isFormAway = false, outline, outlineLabel, view = 'beside' }) {
|
|
11
11
|
const isWhole = view === 'whole';
|
|
12
|
+
const form = _jsx("div", { className: workbenchFormVariants({ view, isAway: isWhole && isFormAway }), children: children });
|
|
12
13
|
return (
|
|
13
14
|
// With the whole window, the keyboard stays in it: what is behind cannot be seen.
|
|
14
|
-
_jsx(FocusScope, { contain: isWhole, children: _jsxs("div", { className: workbenchVariants({ view }), children: [isWhole && bar, _jsxs("div", { className: workbenchBodyVariants({ view }), children: [_jsx("
|
|
15
|
+
_jsx(FocusScope, { contain: isWhole, children: _jsxs("div", { className: workbenchVariants({ view }), children: [isWhole && bar, _jsxs("div", { className: workbenchBodyVariants({ view }), children: [isWhole && outline !== undefined && (_jsx("aside", { "aria-label": outlineLabel, className: workbenchOutlineClass, children: outline })), form, _jsx("section", { "aria-label": paneLabel, className: workbenchPaneVariants({ view }), children: pane })] })] }) }));
|
|
15
16
|
}
|
|
16
17
|
//# sourceMappingURL=Workbench.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Workbench.js","sourceRoot":"","sources":["../../../src/patterns/Workbench/Workbench.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,
|
|
1
|
+
{"version":3,"file":"Workbench.js","sourceRoot":"","sources":["../../../src/patterns/Workbench/Workbench.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,GAElB,MAAM,yBAAyB,CAAC;AAmBjC;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,GAAG,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,IAAI,GAAG,QAAQ,EAAkB;IACtI,MAAM,OAAO,GAAG,IAAI,KAAK,OAAO,CAAC;IACjC,MAAM,IAAI,GAAG,cAAK,SAAS,EAAE,qBAAqB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,IAAI,UAAU,EAAE,CAAC,YAAG,QAAQ,GAAO,CAAC;IAC9G,OAAO;IACL,kFAAkF;IAClF,KAAC,UAAU,IAAC,OAAO,EAAE,OAAO,YAC1B,eAAK,SAAS,EAAE,iBAAiB,CAAC,EAAE,IAAI,EAAE,CAAC,aACxC,OAAO,IAAI,GAAG,EACf,eAAK,SAAS,EAAE,qBAAqB,CAAC,EAAE,IAAI,EAAE,CAAC,aAC5C,OAAO,IAAI,OAAO,KAAK,SAAS,IAAI,CACnC,8BAAmB,YAAY,EAAE,SAAS,EAAE,qBAAqB,YAC9D,OAAO,GACF,CACT,EAEA,IAAI,EACL,gCAAqB,SAAS,EAAE,SAAS,EAAE,qBAAqB,CAAC,EAAE,IAAI,EAAE,CAAC,YACvE,IAAI,GACG,IACN,IACF,GACK,CACd,CAAC;AACJ,CAAC"}
|
|
@@ -7,7 +7,10 @@ export declare const workbenchVariants: (props?: ({
|
|
|
7
7
|
export declare const workbenchBodyVariants: (props?: ({
|
|
8
8
|
view?: "beside" | "whole" | null | undefined;
|
|
9
9
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* Whole, the form is a panel on the right that scrolls by itself, where what is chosen on the page is edited, and slides away to
|
|
12
|
+
* leave the pane the window. On a phone it is as wide as the window, so away it is simply gone.
|
|
13
|
+
*/
|
|
11
14
|
export declare const workbenchFormVariants: (props?: ({
|
|
12
15
|
view?: "beside" | "whole" | null | undefined;
|
|
13
16
|
isAway?: boolean | null | undefined;
|
|
@@ -16,5 +19,7 @@ export declare const workbenchFormVariants: (props?: ({
|
|
|
16
19
|
export declare const workbenchPaneVariants: (props?: ({
|
|
17
20
|
view?: "beside" | "whole" | null | undefined;
|
|
18
21
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
22
|
+
/** Whole, the way around what is made, on the left: from `lg` up, where there is room for three columns. */
|
|
23
|
+
export declare const workbenchOutlineClass = "hidden w-60 shrink-0 flex-col overflow-auto border-r border-border bg-background p-3 lg:flex";
|
|
19
24
|
export type WorkbenchVariants = VariantProps<typeof workbenchVariants>;
|
|
20
25
|
//# sourceMappingURL=Workbench.variants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Workbench.variants.d.ts","sourceRoot":"","sources":["../../../src/patterns/Workbench/Workbench.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,uHAAuH;AACvH,eAAO,MAAM,iBAAiB;;8EAQ5B,CAAC;AAEH,uHAAuH;AACvH,eAAO,MAAM,qBAAqB;;8EAQhC,CAAC;AAEH
|
|
1
|
+
{"version":3,"file":"Workbench.variants.d.ts","sourceRoot":"","sources":["../../../src/patterns/Workbench/Workbench.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,uHAAuH;AACvH,eAAO,MAAM,iBAAiB;;8EAQ5B,CAAC;AAEH,uHAAuH;AACvH,eAAO,MAAM,qBAAqB;;8EAQhC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;8EAUhC,CAAC;AAEH,+FAA+F;AAC/F,eAAO,MAAM,qBAAqB;;8EAQhC,CAAC;AAEH,4GAA4G;AAC5G,eAAO,MAAM,qBAAqB,iGAAiG,CAAC;AAEpI,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -19,16 +19,19 @@ export const workbenchBodyVariants = cva('flex', {
|
|
|
19
19
|
},
|
|
20
20
|
defaultVariants: { view: 'beside' },
|
|
21
21
|
});
|
|
22
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* Whole, the form is a panel on the right that scrolls by itself, where what is chosen on the page is edited, and slides away to
|
|
24
|
+
* leave the pane the window. On a phone it is as wide as the window, so away it is simply gone.
|
|
25
|
+
*/
|
|
23
26
|
export const workbenchFormVariants = cva('flex min-w-0 flex-col gap-6', {
|
|
24
27
|
variants: {
|
|
25
28
|
view: {
|
|
26
29
|
beside: 'xl:w-lg xl:shrink-0',
|
|
27
|
-
whole: 'w-lg max-w-full shrink-0 overflow-auto border-
|
|
30
|
+
whole: 'order-last w-lg max-w-full shrink-0 overflow-auto border-l border-border bg-background p-4 transition-all motion-slide',
|
|
28
31
|
},
|
|
29
32
|
isAway: { true: '', false: '' },
|
|
30
33
|
},
|
|
31
|
-
compoundVariants: [{ view: 'whole', isAway: true, class: 'invisible max-md:hidden md:-
|
|
34
|
+
compoundVariants: [{ view: 'whole', isAway: true, class: 'invisible max-md:hidden md:-mr-128' }],
|
|
32
35
|
defaultVariants: { view: 'beside', isAway: false },
|
|
33
36
|
});
|
|
34
37
|
/** Beside the form, the pane stays in view while the form scrolls under the bar at the top. */
|
|
@@ -41,4 +44,6 @@ export const workbenchPaneVariants = cva('min-w-0', {
|
|
|
41
44
|
},
|
|
42
45
|
defaultVariants: { view: 'beside' },
|
|
43
46
|
});
|
|
47
|
+
/** Whole, the way around what is made, on the left: from `lg` up, where there is room for three columns. */
|
|
48
|
+
export const workbenchOutlineClass = 'hidden w-60 shrink-0 flex-col overflow-auto border-r border-border bg-background p-3 lg:flex';
|
|
44
49
|
//# sourceMappingURL=Workbench.variants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Workbench.variants.js","sourceRoot":"","sources":["../../../src/patterns/Workbench/Workbench.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,uHAAuH;AACvH,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAC,EAAE,EAAE;IACvC,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,MAAM,EAAE,QAAQ;YAChB,KAAK,EAAE,mEAAmE;SAC3E;KACF;IACD,eAAe,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;CACpC,CAAC,CAAC;AAEH,uHAAuH;AACvH,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC,MAAM,EAAE;IAC/C,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,MAAM,EAAE,kDAAkD;YAC1D,KAAK,EAAE,gBAAgB;SACxB;KACF;IACD,eAAe,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;CACpC,CAAC,CAAC;AAEH
|
|
1
|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AK,EAAE,gBAAgB;SACxB;KACF;IACD,eAAe,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;CACpC,CAAC,CAAC;AAEH,4GAA4G;AAC5G,MAAM,CAAC,MAAM,qBAAqB,GAAG,8FAA8F,CAAC"}
|
package/dist/patterns/index.d.ts
CHANGED
|
@@ -13,4 +13,8 @@ export * from './Board/index.js';
|
|
|
13
13
|
export * from './SectionList/index.js';
|
|
14
14
|
export * from './PagePreview/index.js';
|
|
15
15
|
export * from './Workbench/index.js';
|
|
16
|
+
export * from './CommandPalette/index.js';
|
|
17
|
+
export * from './Welcome/index.js';
|
|
18
|
+
export * from './SiteWindow/index.js';
|
|
19
|
+
export * from './Outline/index.js';
|
|
16
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/patterns/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/patterns/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC"}
|
package/dist/patterns/index.js
CHANGED
|
@@ -13,4 +13,8 @@ export * from './Board/index.js';
|
|
|
13
13
|
export * from './SectionList/index.js';
|
|
14
14
|
export * from './PagePreview/index.js';
|
|
15
15
|
export * from './Workbench/index.js';
|
|
16
|
+
export * from './CommandPalette/index.js';
|
|
17
|
+
export * from './Welcome/index.js';
|
|
18
|
+
export * from './SiteWindow/index.js';
|
|
19
|
+
export * from './Outline/index.js';
|
|
16
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/patterns/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/patterns/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@velocity-astro/cms-ui",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.8",
|
|
4
4
|
"description": "The Velocity CMS editor's design system: tokens, components and patterns. Knows nothing about content or the API.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/src/styles.css
CHANGED
|
@@ -71,6 +71,12 @@
|
|
|
71
71
|
--color-info-light: var(--info-light);
|
|
72
72
|
--color-info-foreground: var(--info-foreground);
|
|
73
73
|
--color-scrim: var(--scrim);
|
|
74
|
+
--color-rail: var(--rail);
|
|
75
|
+
--color-rail-foreground: var(--rail-foreground);
|
|
76
|
+
--color-rail-muted: var(--rail-muted);
|
|
77
|
+
--color-rail-hover: var(--rail-hover);
|
|
78
|
+
--color-rail-current: var(--rail-current);
|
|
79
|
+
--color-rail-border: var(--rail-border);
|
|
74
80
|
--color-brand-fill: var(--brand-fill);
|
|
75
81
|
--color-brand-ink: var(--brand-ink);
|
|
76
82
|
|
|
@@ -92,6 +98,10 @@
|
|
|
92
98
|
--text-2xl--line-height: var(--type-2xl-leading);
|
|
93
99
|
--text-3xl: var(--type-3xl);
|
|
94
100
|
--text-3xl--line-height: var(--type-3xl-leading);
|
|
101
|
+
--text-4xl: var(--type-4xl);
|
|
102
|
+
--text-4xl--line-height: var(--type-4xl-leading);
|
|
103
|
+
--text-5xl: var(--type-5xl);
|
|
104
|
+
--text-5xl--line-height: var(--type-5xl-leading);
|
|
95
105
|
|
|
96
106
|
--radius-sm: var(--theme-radius-sm);
|
|
97
107
|
--radius-md: var(--theme-radius-md);
|
|
@@ -302,6 +312,14 @@
|
|
|
302
312
|
animation-timing-function: var(--motion-ease);
|
|
303
313
|
}
|
|
304
314
|
|
|
315
|
+
/* A faint grid behind the top of a screen that greets: lines of the border colour, 40px apart. */
|
|
316
|
+
@utility bg-grid {
|
|
317
|
+
background-image:
|
|
318
|
+
linear-gradient(to bottom, var(--border-subtle) 1px, transparent 1px),
|
|
319
|
+
linear-gradient(to right, var(--border-subtle) 1px, transparent 1px);
|
|
320
|
+
background-size: 2.5rem 2.5rem;
|
|
321
|
+
}
|
|
322
|
+
|
|
305
323
|
/* As tall as the room a screen has under its bar, for a pane that stays in view. */
|
|
306
324
|
@utility pane-tall {
|
|
307
325
|
height: var(--pane-height);
|
package/src/tokens/tokens.css
CHANGED
|
@@ -220,6 +220,11 @@
|
|
|
220
220
|
--type-2xl-leading: 2rem;
|
|
221
221
|
--type-3xl: 1.875rem;
|
|
222
222
|
--type-3xl-leading: 2.125rem;
|
|
223
|
+
/* The greeting at the top of Home, the one large line of the editor. */
|
|
224
|
+
--type-4xl: 2.25rem;
|
|
225
|
+
--type-4xl-leading: 2.5rem;
|
|
226
|
+
--type-5xl: 3rem;
|
|
227
|
+
--type-5xl-leading: 3.25rem;
|
|
223
228
|
|
|
224
229
|
/* Motion: short, and off entirely for people who ask for less. */
|
|
225
230
|
--motion-fast: 100ms;
|
|
@@ -236,7 +241,16 @@
|
|
|
236
241
|
|
|
237
242
|
/* The height of a pane that stays in view beside a form: the window less the frame, the bar
|
|
238
243
|
at the top of the screen and the space around the pane. */
|
|
239
|
-
--pane-height: calc(100dvh -
|
|
244
|
+
--pane-height: calc(100dvh - 11rem);
|
|
245
|
+
|
|
246
|
+
/* The rail: the dark strip of the editor's sections down the side of the window. It is dark in
|
|
247
|
+
both themes, so these hold for light and dark alike (see .dark below for its ground). */
|
|
248
|
+
--rail: var(--gray-950);
|
|
249
|
+
--rail-foreground: var(--gray-50); /* 19.3:1 on the rail */
|
|
250
|
+
--rail-muted: var(--gray-400); /* 6.0:1 on the rail */
|
|
251
|
+
--rail-hover: oklch(100% 0 0 / 0.08);
|
|
252
|
+
--rail-current: oklch(100% 0 0 / 0.14);
|
|
253
|
+
--rail-border: oklch(100% 0 0 / 0.12);
|
|
240
254
|
|
|
241
255
|
/* Layering: the only stacking levels there are. */
|
|
242
256
|
--layer-raised: 10;
|
|
@@ -248,6 +262,12 @@
|
|
|
248
262
|
--scrim: oklch(0 0 0 / 0.5);
|
|
249
263
|
}
|
|
250
264
|
|
|
265
|
+
/* In the dark theme the rail sits a step below the page, so it still reads as its own strip. After
|
|
266
|
+
the block above: both are as specific, so the later one wins. */
|
|
267
|
+
.dark {
|
|
268
|
+
--rail: oklch(7% 0 0);
|
|
269
|
+
}
|
|
270
|
+
|
|
251
271
|
@media (prefers-reduced-motion: reduce) {
|
|
252
272
|
:root {
|
|
253
273
|
--motion-fast: 0ms;
|