@velocity-astro/cms-ui 0.1.0-beta.6 → 0.1.0-beta.7
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/dist/components/Grid/Grid.variants.d.ts +1 -0
- package/dist/components/Grid/Grid.variants.d.ts.map +1 -1
- package/dist/components/Grid/Grid.variants.js +4 -3
- package/dist/components/Grid/Grid.variants.js.map +1 -1
- package/dist/components/Segmented/Segmented.d.ts +9 -1
- package/dist/components/Segmented/Segmented.d.ts.map +1 -1
- package/dist/components/Segmented/Segmented.js +8 -5
- package/dist/components/Segmented/Segmented.js.map +1 -1
- package/dist/components/Segmented/Segmented.variants.d.ts +7 -0
- package/dist/components/Segmented/Segmented.variants.d.ts.map +1 -1
- package/dist/components/Segmented/Segmented.variants.js +9 -1
- package/dist/components/Segmented/Segmented.variants.js.map +1 -1
- package/dist/components/Table/Table.variants.d.ts.map +1 -1
- package/dist/components/Table/Table.variants.js +2 -1
- package/dist/components/Table/Table.variants.js.map +1 -1
- package/dist/components/scales.d.ts +2 -2
- package/dist/components/scales.d.ts.map +1 -1
- package/dist/components/scales.js +4 -2
- package/dist/components/scales.js.map +1 -1
- package/dist/patterns/AppShell/AppShell.d.ts +3 -1
- package/dist/patterns/AppShell/AppShell.d.ts.map +1 -1
- package/dist/patterns/AppShell/AppShell.js +14 -6
- package/dist/patterns/AppShell/AppShell.js.map +1 -1
- package/dist/patterns/AppShell/AppShell.variants.d.ts +17 -3
- package/dist/patterns/AppShell/AppShell.variants.d.ts.map +1 -1
- package/dist/patterns/AppShell/AppShell.variants.js +20 -3
- package/dist/patterns/AppShell/AppShell.variants.js.map +1 -1
- package/dist/patterns/ImagePicker/ImagePicker.d.ts +9 -1
- package/dist/patterns/ImagePicker/ImagePicker.d.ts.map +1 -1
- package/dist/patterns/ImagePicker/ImagePicker.js +13 -8
- package/dist/patterns/ImagePicker/ImagePicker.js.map +1 -1
- package/dist/patterns/PageHeader/PageHeader.variants.d.ts +3 -2
- package/dist/patterns/PageHeader/PageHeader.variants.d.ts.map +1 -1
- package/dist/patterns/PageHeader/PageHeader.variants.js +3 -2
- package/dist/patterns/PageHeader/PageHeader.variants.js.map +1 -1
- package/dist/patterns/PagePreview/PagePreview.d.ts +76 -3
- package/dist/patterns/PagePreview/PagePreview.d.ts.map +1 -1
- package/dist/patterns/PagePreview/PagePreview.js +111 -12
- package/dist/patterns/PagePreview/PagePreview.js.map +1 -1
- package/dist/patterns/PagePreview/PagePreview.variants.d.ts +11 -1
- package/dist/patterns/PagePreview/PagePreview.variants.d.ts.map +1 -1
- package/dist/patterns/PagePreview/PagePreview.variants.js +17 -5
- package/dist/patterns/PagePreview/PagePreview.variants.js.map +1 -1
- package/dist/patterns/PagePreview/index.d.ts +1 -1
- package/dist/patterns/PagePreview/index.d.ts.map +1 -1
- package/dist/patterns/PagePreview/index.js.map +1 -1
- package/dist/patterns/SaveBar/SaveBar.variants.d.ts +3 -2
- package/dist/patterns/SaveBar/SaveBar.variants.d.ts.map +1 -1
- package/dist/patterns/SaveBar/SaveBar.variants.js +5 -4
- package/dist/patterns/SaveBar/SaveBar.variants.js.map +1 -1
- package/dist/patterns/Workbench/Workbench.variants.d.ts +1 -1
- package/dist/patterns/Workbench/Workbench.variants.d.ts.map +1 -1
- package/dist/patterns/Workbench/Workbench.variants.js +2 -2
- package/dist/patterns/Workbench/Workbench.variants.js.map +1 -1
- package/package.json +1 -1
- package/src/styles.css +20 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
/** Columns are for a window with room for them: a narrow one stacks them, or halves four. */
|
|
2
3
|
export declare const gridVariants: (props?: ({
|
|
3
4
|
gap?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | null | undefined;
|
|
4
5
|
columns?: 1 | 2 | 3 | 4 | null | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Grid.variants.d.ts","sourceRoot":"","sources":["../../../src/components/Grid/Grid.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,eAAO,MAAM,YAAY;;;8EAWvB,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"Grid.variants.d.ts","sourceRoot":"","sources":["../../../src/components/Grid/Grid.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,6FAA6F;AAC7F,eAAO,MAAM,YAAY;;;8EAWvB,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,CAAC"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { cva } from 'class-variance-authority';
|
|
2
2
|
import { gap } from '../scales.js';
|
|
3
|
+
/** Columns are for a window with room for them: a narrow one stacks them, or halves four. */
|
|
3
4
|
export const gridVariants = cva('grid', {
|
|
4
5
|
variants: {
|
|
5
6
|
gap,
|
|
6
7
|
columns: {
|
|
7
8
|
1: 'grid-cols-1',
|
|
8
|
-
2: 'grid-cols-2',
|
|
9
|
-
3: 'grid-cols-3',
|
|
10
|
-
4: 'grid-cols-4',
|
|
9
|
+
2: 'grid-cols-1 md:grid-cols-2',
|
|
10
|
+
3: 'grid-cols-1 md:grid-cols-3',
|
|
11
|
+
4: 'grid-cols-2 md:grid-cols-4',
|
|
11
12
|
},
|
|
12
13
|
},
|
|
13
14
|
defaultVariants: { gap: 4, columns: 2 },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Grid.variants.js","sourceRoot":"","sources":["../../../src/components/Grid/Grid.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEnC,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAC,MAAM,EAAE;IACtC,QAAQ,EAAE;QACR,GAAG;QACH,OAAO,EAAE;YACP,CAAC,EAAE,aAAa;YAChB,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"Grid.variants.js","sourceRoot":"","sources":["../../../src/components/Grid/Grid.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEnC,6FAA6F;AAC7F,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAC,MAAM,EAAE;IACtC,QAAQ,EAAE;QACR,GAAG;QACH,OAAO,EAAE;YACP,CAAC,EAAE,aAAa;YAChB,CAAC,EAAE,4BAA4B;YAC/B,CAAC,EAAE,4BAA4B;YAC/B,CAAC,EAAE,4BAA4B;SAChC;KACF;IACD,eAAe,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE;CACxC,CAAC,CAAC"}
|
|
@@ -2,6 +2,8 @@ export interface SegmentedOption {
|
|
|
2
2
|
readonly id: string;
|
|
3
3
|
readonly label: string;
|
|
4
4
|
readonly isDisabled?: boolean;
|
|
5
|
+
/** A colour to show beside the label, where the choice is a colour of the site's, as CSS writes one. A sample only. */
|
|
6
|
+
readonly swatch?: string;
|
|
5
7
|
}
|
|
6
8
|
export interface SegmentedProps {
|
|
7
9
|
/** What is being chosen, for screen readers, such as "Show" or "Language". */
|
|
@@ -10,7 +12,13 @@ export interface SegmentedProps {
|
|
|
10
12
|
/** The id of the option chosen. One always is. */
|
|
11
13
|
readonly selected: string;
|
|
12
14
|
readonly onChange: (id: string) => void;
|
|
15
|
+
/** Shows the label above the choices, as a field of a form has it. */
|
|
16
|
+
readonly isLabelShown?: boolean;
|
|
17
|
+
/** Help under the choices, for a field of a form. */
|
|
18
|
+
readonly description?: string;
|
|
19
|
+
/** What is wrong with the choice, shown in place of the help. */
|
|
20
|
+
readonly errorMessage?: string;
|
|
13
21
|
}
|
|
14
22
|
/** A few choices in a row, one of them always chosen: a filter over a list, or a language. */
|
|
15
|
-
export declare function Segmented({ label, options, selected, onChange }: SegmentedProps): import("react").JSX.Element;
|
|
23
|
+
export declare function Segmented({ label, options, selected, onChange, isLabelShown, description, errorMessage }: SegmentedProps): import("react").JSX.Element;
|
|
16
24
|
//# sourceMappingURL=Segmented.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Segmented.d.ts","sourceRoot":"","sources":["../../../src/components/Segmented/Segmented.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Segmented.d.ts","sourceRoot":"","sources":["../../../src/components/Segmented/Segmented.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAC9B,uHAAuH;IACvH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,cAAc;IAC7B,8EAA8E;IAC9E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,SAAS,eAAe,EAAE,CAAC;IAC7C,kDAAkD;IAClD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,sEAAsE;IACtE,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAChC,qDAAqD;IACrD,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,iEAAiE;IACjE,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,8FAA8F;AAC9F,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAoB,EAAE,WAAW,EAAE,YAAY,EAAE,EAAE,cAAc,+BAqChI"}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ToggleButton, ToggleButtonGroup } from 'react-aria-components';
|
|
3
|
-
import { segmentedClass, segmentedOptionClass } from './Segmented.variants.js';
|
|
3
|
+
import { segmentedClass, segmentedDescriptionClass, segmentedErrorClass, segmentedFieldClass, segmentedLabelClass, segmentedOptionClass, segmentedSwatchClass } from './Segmented.variants.js';
|
|
4
4
|
/** A few choices in a row, one of them always chosen: a filter over a list, or a language. */
|
|
5
|
-
export function Segmented({ label, options, selected, onChange }) {
|
|
6
|
-
|
|
5
|
+
export function Segmented({ label, options, selected, onChange, isLabelShown = false, description, errorMessage }) {
|
|
6
|
+
const group = (_jsx(ToggleButtonGroup, { "aria-label": label, className: segmentedClass, selectionMode: "single", disallowEmptySelection: true, selectedKeys: [selected], onSelectionChange: (keys) => {
|
|
7
7
|
const [next] = keys;
|
|
8
8
|
if (next !== undefined && String(next) !== selected)
|
|
9
9
|
onChange(String(next));
|
|
10
|
-
}, children: options.map((option) => (
|
|
10
|
+
}, children: options.map((option) => (_jsxs(ToggleButton, { id: option.id, className: segmentedOptionClass, isDisabled: option.isDisabled ?? false, children: [option.swatch !== undefined && (_jsx("svg", { "aria-hidden": "true", viewBox: "0 0 16 16", className: segmentedSwatchClass, children: _jsx("circle", { cx: "8", cy: "8", r: "7", fill: option.swatch }) })), option.label] }, option.id))) }));
|
|
11
|
+
if (!isLabelShown && description === undefined && errorMessage === undefined)
|
|
12
|
+
return group;
|
|
13
|
+
return (_jsxs("div", { className: segmentedFieldClass, children: [isLabelShown && (_jsx("span", { "aria-hidden": "true", className: segmentedLabelClass, children: label })), group, errorMessage !== undefined ? _jsx("p", { className: segmentedErrorClass, children: errorMessage }) : description !== undefined && _jsx("p", { className: segmentedDescriptionClass, children: description })] }));
|
|
11
14
|
}
|
|
12
15
|
//# sourceMappingURL=Segmented.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Segmented.js","sourceRoot":"","sources":["../../../src/components/Segmented/Segmented.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"Segmented.js","sourceRoot":"","sources":["../../../src/components/Segmented/Segmented.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAyB/L,8FAA8F;AAC9F,MAAM,UAAU,SAAS,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,GAAG,KAAK,EAAE,WAAW,EAAE,YAAY,EAAkB;IAC/H,MAAM,KAAK,GAAG,CACZ,KAAC,iBAAiB,kBACJ,KAAK,EACjB,SAAS,EAAE,cAAc,EACzB,aAAa,EAAC,QAAQ,EACtB,sBAAsB,QACtB,YAAY,EAAE,CAAC,QAAQ,CAAC,EACxB,iBAAiB,EAAE,CAAC,IAAI,EAAE,EAAE;YAC1B,MAAM,CAAC,IAAI,CAAC,GAAG,IA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** The sample of a colour beside a choice, with a line around it so a colour like the page's still shows. */
|
|
4
|
+
export declare const segmentedSwatchClass = "h-4 w-4 shrink-0 stroke-border-strong";
|
|
5
|
+
/** The choices as a field of a form: its label above, its help or its problem under. */
|
|
6
|
+
export declare const segmentedFieldClass = "flex min-w-0 flex-col items-start gap-2";
|
|
7
|
+
export declare const segmentedLabelClass = "text-sm font-medium text-foreground";
|
|
8
|
+
export declare const segmentedDescriptionClass = "text-sm text-foreground-muted";
|
|
9
|
+
export declare const segmentedErrorClass = "motion-rise text-sm text-destructive";
|
|
3
10
|
//# sourceMappingURL=Segmented.variants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Segmented.variants.d.ts","sourceRoot":"","sources":["../../../src/components/Segmented/Segmented.variants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Segmented.variants.d.ts","sourceRoot":"","sources":["../../../src/components/Segmented/Segmented.variants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,gCAAgC,CAAC;AAE5D,eAAO,MAAM,oBAAoB,QAKtB,CAAC;AAEZ,6GAA6G;AAC7G,eAAO,MAAM,oBAAoB,0CAA0C,CAAC;AAE5E,wFAAwF;AACxF,eAAO,MAAM,mBAAmB,4CAA4C,CAAC;AAC7E,eAAO,MAAM,mBAAmB,wCAAkB,CAAC;AACnD,eAAO,MAAM,yBAAyB,kCAAwB,CAAC;AAC/D,eAAO,MAAM,mBAAmB,yCAAkB,CAAC"}
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
+
import { fieldDescriptionClass, fieldErrorClass, fieldLabelClass } from '../field.js';
|
|
1
2
|
export const segmentedClass = 'inline-flex flex-wrap gap-1';
|
|
2
3
|
export const segmentedOptionClass = [
|
|
3
|
-
'inline-flex h-8 cursor-default items-center rounded-md px-3 text-sm font-medium text-foreground-secondary',
|
|
4
|
+
'inline-flex h-8 cursor-default items-center gap-2 rounded-md px-3 text-sm font-medium text-foreground-secondary',
|
|
4
5
|
'transition-colors motion-fast',
|
|
5
6
|
'outline-none data-hovered:text-foreground data-selected:bg-background-tertiary data-selected:text-foreground',
|
|
6
7
|
'data-focus-visible:ring-2 data-focus-visible:ring-ring data-disabled:text-foreground-subtle',
|
|
7
8
|
].join(' ');
|
|
9
|
+
/** The sample of a colour beside a choice, with a line around it so a colour like the page's still shows. */
|
|
10
|
+
export const segmentedSwatchClass = 'h-4 w-4 shrink-0 stroke-border-strong';
|
|
11
|
+
/** The choices as a field of a form: its label above, its help or its problem under. */
|
|
12
|
+
export const segmentedFieldClass = 'flex min-w-0 flex-col items-start gap-2';
|
|
13
|
+
export const segmentedLabelClass = fieldLabelClass;
|
|
14
|
+
export const segmentedDescriptionClass = fieldDescriptionClass;
|
|
15
|
+
export const segmentedErrorClass = fieldErrorClass;
|
|
8
16
|
//# sourceMappingURL=Segmented.variants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Segmented.variants.js","sourceRoot":"","sources":["../../../src/components/Segmented/Segmented.variants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,6BAA6B,CAAC;AAE5D,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,
|
|
1
|
+
{"version":3,"file":"Segmented.variants.js","sourceRoot":"","sources":["../../../src/components/Segmented/Segmented.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEtF,MAAM,CAAC,MAAM,cAAc,GAAG,6BAA6B,CAAC;AAE5D,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,iHAAiH;IACjH,+BAA+B;IAC/B,8GAA8G;IAC9G,6FAA6F;CAC9F,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEZ,6GAA6G;AAC7G,MAAM,CAAC,MAAM,oBAAoB,GAAG,uCAAuC,CAAC;AAE5E,wFAAwF;AACxF,MAAM,CAAC,MAAM,mBAAmB,GAAG,yCAAyC,CAAC;AAC7E,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAC;AACnD,MAAM,CAAC,MAAM,yBAAyB,GAAG,qBAAqB,CAAC;AAC/D,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,QAMf,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"}
|
|
@@ -16,7 +16,8 @@ export const tableRowClass = [
|
|
|
16
16
|
'group outline-none transition-colors motion-fast',
|
|
17
17
|
'data-hovered:bg-background-secondary data-pressed:bg-background-tertiary',
|
|
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
|
+
'data-href:cursor-pointer data-action:cursor-pointer',
|
|
20
21
|
].join(' ');
|
|
21
22
|
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' } });
|
|
22
23
|
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,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,mFAAmF;AACnF,MAAM,CAAC,MAAM,eAAe,GAAG,yDAAyD,CAAC;AAEzF,MAAM,CAAC,MAAM,UAAU,GAAG,0EAA0E,CAAC;AAErG,MAAM,KAAK,GAAG;IACZ,KAAK,EAAE,WAAW;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;CACtD,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEZ,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAClC,uLAAuL,EACvL,EAAE,QAAQ,E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B,GAAG,EAAE,CAAC"}
|
|
@@ -37,7 +37,7 @@ export declare const paddingX: {
|
|
|
37
37
|
readonly 6: "px-6";
|
|
38
38
|
readonly 8: "px-8";
|
|
39
39
|
readonly 10: "px-10";
|
|
40
|
-
readonly 12: "px-12";
|
|
40
|
+
readonly 12: "px-4 md:px-12";
|
|
41
41
|
};
|
|
42
42
|
export declare const paddingY: {
|
|
43
43
|
readonly 0: "py-0";
|
|
@@ -48,7 +48,7 @@ export declare const paddingY: {
|
|
|
48
48
|
readonly 5: "py-5";
|
|
49
49
|
readonly 6: "py-6";
|
|
50
50
|
readonly 8: "py-8";
|
|
51
|
-
readonly 10: "py-10";
|
|
51
|
+
readonly 10: "py-6 md:py-10";
|
|
52
52
|
readonly 12: "py-12";
|
|
53
53
|
};
|
|
54
54
|
/** A step on the spacing scale, in units of 4px. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scales.d.ts","sourceRoot":"","sources":["../../src/components/scales.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,GAAG;;;;;;;;;;;CAWN,CAAC;AAEX,eAAO,MAAM,OAAO;;;;;;;;;;;CAWV,CAAC;AAEX,eAAO,MAAM,QAAQ;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"scales.d.ts","sourceRoot":"","sources":["../../src/components/scales.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,GAAG;;;;;;;;;;;CAWN,CAAC;AAEX,eAAO,MAAM,OAAO;;;;;;;;;;;CAWV,CAAC;AAEX,eAAO,MAAM,QAAQ;;;;;;;;;;;CAYX,CAAC;AAEX,eAAO,MAAM,QAAQ;;;;;;;;;;;CAYX,CAAC;AAEX,oDAAoD;AACpD,MAAM,MAAM,KAAK,GAAG,MAAM,OAAO,GAAG,CAAC"}
|
|
@@ -37,7 +37,8 @@ export const paddingX = {
|
|
|
37
37
|
6: 'px-6',
|
|
38
38
|
8: 'px-8',
|
|
39
39
|
10: 'px-10',
|
|
40
|
-
|
|
40
|
+
// A screen's own gutter, which a narrow window cannot spare.
|
|
41
|
+
12: 'px-4 md:px-12',
|
|
41
42
|
};
|
|
42
43
|
export const paddingY = {
|
|
43
44
|
0: 'py-0',
|
|
@@ -48,7 +49,8 @@ export const paddingY = {
|
|
|
48
49
|
5: 'py-5',
|
|
49
50
|
6: 'py-6',
|
|
50
51
|
8: 'py-8',
|
|
51
|
-
|
|
52
|
+
// A screen's own gutter, which a narrow window cannot spare.
|
|
53
|
+
10: 'py-6 md:py-10',
|
|
52
54
|
12: 'py-12',
|
|
53
55
|
};
|
|
54
56
|
//# sourceMappingURL=scales.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scales.js","sourceRoot":"","sources":["../../src/components/scales.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG;IACjB,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,QAAQ;CACJ,CAAC;AAEX,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;CACF,CAAC;AAEX,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,EAAE,EAAE,OAAO;IACX,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"scales.js","sourceRoot":"","sources":["../../src/components/scales.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG;IACjB,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,QAAQ;CACJ,CAAC;AAEX,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;CACF,CAAC;AAEX,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,EAAE,EAAE,OAAO;IACX,6DAA6D;IAC7D,EAAE,EAAE,eAAe;CACX,CAAC;AAEX,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,6DAA6D;IAC7D,EAAE,EAAE,eAAe;IACnB,EAAE,EAAE,OAAO;CACH,CAAC"}
|
|
@@ -35,6 +35,8 @@ export interface AppShellProps {
|
|
|
35
35
|
/** Names the navigation for screen readers, such as "Main". */
|
|
36
36
|
readonly navLabel: string;
|
|
37
37
|
readonly nav: readonly AppShellNavGroup[];
|
|
38
|
+
/** The name of the button that opens the navigation on a narrow window, such as "Open the menu". */
|
|
39
|
+
readonly menuLabel: string;
|
|
38
40
|
/** The words of the link that jumps past the navigation, such as "Skip to content". */
|
|
39
41
|
readonly skipLabel: string;
|
|
40
42
|
/** The signed-in person, at the bottom of the sidebar, with their menu. */
|
|
@@ -43,5 +45,5 @@ export interface AppShellProps {
|
|
|
43
45
|
readonly children: ReactNode;
|
|
44
46
|
}
|
|
45
47
|
/** The frame around every screen: the sidebar with its navigation, and the main area. */
|
|
46
|
-
export declare function AppShell({ logo, siteName, siteDetail, navLabel, nav, skipLabel, account, children }: AppShellProps): import("react").JSX.Element;
|
|
48
|
+
export declare function AppShell({ logo, siteName, siteDetail, navLabel, nav, menuLabel, skipLabel, account, children }: AppShellProps): import("react").JSX.Element;
|
|
47
49
|
//# 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,
|
|
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,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAiCvE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,E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2E;IAC3E,QAAQ,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC;IACnC,kBAAkB;IAClB,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;CAC9B;AAWD,yFAAyF;AACzF,wBAAgB,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,aAAa,+BA8F7H"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { ChevronsUpDown } from 'lucide-react';
|
|
3
|
-
import { Button as AriaButton, Link } from 'react-aria-components';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronsUpDown, Menu as MenuIcon } from 'lucide-react';
|
|
3
|
+
import { Button as AriaButton, Dialog as AriaDialog, DialogTrigger, Link, Modal, ModalOverlay } from 'react-aria-components';
|
|
4
4
|
import { Menu } from '../../components/Menu/index.js';
|
|
5
|
-
import { appShellAccountAvatarClass, appShellAccountClass, appShellAccountLabelClass, appShellAccountDetailClass, appShellAccountIconSize, appShellAccountNameClass, appShellAccountTextClass, appShellBrandClass, appShellBrandDetailClass, appShellBrandNameClass, appShellBrandTextClass, appShellClass, appShellFooterClass, appShellGroupLabelClass, appShellMainClass, appShellMainId, appShellNavClass, appShellNavIconSize, appShellNavLinkVariants, appShellNavListClass, appShellSidebarClass, appShellSkipClass, } from './AppShell.variants.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
6
|
/** The first letters of up to two names: "Maya Ellison" is "ME". */
|
|
7
7
|
const initials = (name) => name
|
|
8
8
|
.split(/\s+/)
|
|
@@ -11,7 +11,15 @@ const initials = (name) => name
|
|
|
11
11
|
.map((word) => word.charAt(0).toUpperCase())
|
|
12
12
|
.join('');
|
|
13
13
|
/** The frame around every screen: the sidebar with its navigation, and the main area. */
|
|
14
|
-
export function AppShell({ logo, siteName, siteDetail, navLabel, nav, skipLabel, account, children }) {
|
|
15
|
-
|
|
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 })] }) }) }))] }));
|
|
17
|
+
return (_jsxs("div", { className: appShellClass, children: [_jsx("a", { className: appShellSkipClass, href: `#${appShellMainId}`,
|
|
18
|
+
// The link is followed here, not by the browser: a page with a base address would be sent
|
|
19
|
+
// to that address, off the screen the person is on.
|
|
20
|
+
onClick: (event) => {
|
|
21
|
+
event.preventDefault();
|
|
22
|
+
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 })] }));
|
|
16
24
|
}
|
|
17
25
|
//# sourceMappingURL=AppShell.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.js","sourceRoot":"","sources":["../../../src/patterns/AppShell/AppShell.tsx"],"names":[],"mappings":";AAAA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AAE,oBAAoB,GAAI,GACzC,EACb,KAAC,YAAY,IAAC,aAAa,QAAC,SAAS,EAAE,0BAA0B,YAC/D,KAAC,KAAK,IAAC,SAAS,EAAE,mBAAmB,YACnC,KAAC,UAAU,kBAAa,SAAS,EAAE,SAAS,EAAE,0BAA0B,YACrE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,GACtB,GACP,GACK,IACD,EAChB,oCAAiB,SAAS,EAAE,qBAAqB,aAC9C,IAAI,EACL,cAAK,SAAS,EAAE,sBAAsB,YAAG,QAAQ,GAAO,IACpD,IACF,EACN,gBAAO,SAAS,EAAE,oBAAoB,YAAG,UAAU,EAAE,GAAS,EAC9D,eAAM,EAAE,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,iBAAiB,YACjE,QAAQ,GACJ,IACH,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
/** The page is one quiet surface: the sidebar is part of it, and the screen sits on it in a panel. */
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* From `md` up the navigation is a sidebar beside the screen. On a narrower window (a phone, a
|
|
4
|
+
* tablet held upright) it is behind a button in a bar across the top, so the screen has the width.
|
|
5
|
+
*/
|
|
6
|
+
export declare const appShellClass = "flex h-dvh flex-col overflow-hidden bg-background-secondary text-foreground md:flex-row";
|
|
7
|
+
/** The bar across the top of a narrow window: the button that opens the navigation, and the site's name. */
|
|
8
|
+
export declare const appShellTopClass = "flex shrink-0 items-center gap-2 px-2 py-1.5 md:hidden";
|
|
9
|
+
export declare const appShellTopBrandClass = "flex min-w-0 items-center gap-2";
|
|
10
|
+
export declare const appShellMenuButtonClass: string;
|
|
11
|
+
/** The navigation of a narrow window: a panel that slides in from the edge the button is on. */
|
|
12
|
+
export declare const appShellDrawerOverlayClass = "fixed inset-0 layer-overlay flex bg-scrim motion-scrim";
|
|
13
|
+
export declare const appShellDrawerClass = "h-full w-72 max-w-full border-r border-border bg-background-secondary shadow-xl outline-none motion-sheet-start";
|
|
14
|
+
export declare const appShellDrawerContentClass = "flex h-full flex-col px-3 py-5 outline-none";
|
|
15
|
+
/** The size of the icon on the button that opens the navigation, in pixels. */
|
|
16
|
+
export declare const appShellMenuIconSize = 20;
|
|
3
17
|
export declare const appShellSkipClass: string;
|
|
4
|
-
export declare const appShellSidebarClass = "
|
|
18
|
+
export declare const appShellSidebarClass = "hidden w-60 shrink-0 flex-col px-3 py-5 md:flex";
|
|
5
19
|
export declare const appShellBrandClass = "flex items-center gap-2.5 px-2.5 pb-4";
|
|
6
20
|
export declare const appShellBrandTextClass = "min-w-0";
|
|
7
21
|
export declare const appShellBrandNameClass = "truncate text-base font-bold text-foreground";
|
|
@@ -23,7 +37,7 @@ export declare const appShellAccountDetailClass = "truncate text-xs text-foregro
|
|
|
23
37
|
* get) scrolls with it. Without it such an element is placed against the page and makes the page
|
|
24
38
|
* itself scroll far past the frame.
|
|
25
39
|
*/
|
|
26
|
-
export declare const appShellMainClass = "relative
|
|
40
|
+
export declare const appShellMainClass = "relative min-h-0 min-w-0 flex-1 overflow-auto border-t border-border bg-background outline-none md:my-2 md:mr-2 md:rounded-2xl md:border md:shadow-sm";
|
|
27
41
|
/** The id of the main area, which the skip link jumps to. */
|
|
28
42
|
export declare const appShellMainId = "main";
|
|
29
43
|
/** The size of a navigation icon, in pixels. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.variants.d.ts","sourceRoot":"","sources":["../../../src/patterns/AppShell/AppShell.variants.ts"],"names":[],"mappings":"AAEA,sGAAsG;AACtG,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"AppShell.variants.d.ts","sourceRoot":"","sources":["../../../src/patterns/AppShell/AppShell.variants.ts"],"names":[],"mappings":"AAEA,sGAAsG;AACtG;;;GAGG;AACH,eAAO,MAAM,aAAa,4FAA4F,CAAC;AAEvH,4GAA4G;AAC5G,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C"}
|
|
@@ -1,11 +1,28 @@
|
|
|
1
1
|
import { cva } from 'class-variance-authority';
|
|
2
2
|
/** The page is one quiet surface: the sidebar is part of it, and the screen sits on it in a panel. */
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* From `md` up the navigation is a sidebar beside the screen. On a narrower window (a phone, a
|
|
5
|
+
* tablet held upright) it is behind a button in a bar across the top, so the screen has the width.
|
|
6
|
+
*/
|
|
7
|
+
export const appShellClass = 'flex h-dvh flex-col overflow-hidden bg-background-secondary text-foreground md:flex-row';
|
|
8
|
+
/** The bar across the top of a narrow window: the button that opens the navigation, and the site's name. */
|
|
9
|
+
export const appShellTopClass = 'flex shrink-0 items-center gap-2 px-2 py-1.5 md:hidden';
|
|
10
|
+
export const appShellTopBrandClass = 'flex min-w-0 items-center gap-2';
|
|
11
|
+
export const appShellMenuButtonClass = [
|
|
12
|
+
'flex h-10 w-10 shrink-0 items-center justify-center rounded-md text-foreground transition-colors motion-fast',
|
|
13
|
+
'outline-none data-hovered:bg-background-tertiary data-pressed:bg-background-tertiary data-focus-visible:ring-2 data-focus-visible:ring-ring',
|
|
14
|
+
].join(' ');
|
|
15
|
+
/** The navigation of a narrow window: a panel that slides in from the edge the button is on. */
|
|
16
|
+
export const appShellDrawerOverlayClass = 'fixed inset-0 layer-overlay flex bg-scrim motion-scrim';
|
|
17
|
+
export const appShellDrawerClass = 'h-full w-72 max-w-full border-r border-border bg-background-secondary shadow-xl outline-none motion-sheet-start';
|
|
18
|
+
export const appShellDrawerContentClass = 'flex h-full flex-col px-3 py-5 outline-none';
|
|
19
|
+
/** The size of the icon on the button that opens the navigation, in pixels. */
|
|
20
|
+
export const appShellMenuIconSize = 20;
|
|
4
21
|
export const appShellSkipClass = [
|
|
5
22
|
'sr-only layer-toast rounded-md bg-primary px-4 py-2 text-base font-medium text-primary-foreground',
|
|
6
23
|
'focus:not-sr-only focus:fixed focus:top-2 focus:left-2',
|
|
7
24
|
].join(' ');
|
|
8
|
-
export const appShellSidebarClass = '
|
|
25
|
+
export const appShellSidebarClass = 'hidden w-60 shrink-0 flex-col px-3 py-5 md:flex';
|
|
9
26
|
export const appShellBrandClass = 'flex items-center gap-2.5 px-2.5 pb-4';
|
|
10
27
|
export const appShellBrandTextClass = 'min-w-0';
|
|
11
28
|
export const appShellBrandNameClass = 'truncate text-base font-bold text-foreground';
|
|
@@ -39,7 +56,7 @@ export const appShellAccountDetailClass = 'truncate text-xs text-foreground-mute
|
|
|
39
56
|
* get) scrolls with it. Without it such an element is placed against the page and makes the page
|
|
40
57
|
* itself scroll far past the frame.
|
|
41
58
|
*/
|
|
42
|
-
export const appShellMainClass = 'relative
|
|
59
|
+
export const appShellMainClass = 'relative min-h-0 min-w-0 flex-1 overflow-auto border-t border-border bg-background outline-none md:my-2 md:mr-2 md:rounded-2xl md:border md:shadow-sm';
|
|
43
60
|
/** The id of the main area, which the skip link jumps to. */
|
|
44
61
|
export const appShellMainId = 'main';
|
|
45
62
|
/** The size of a navigation icon, in pixels. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.variants.js","sourceRoot":"","sources":["../../../src/patterns/AppShell/AppShell.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAE/C,sGAAsG;AACtG,MAAM,CAAC,MAAM,aAAa,GAAG,
|
|
1
|
+
{"version":3,"file":"AppShell.variants.js","sourceRoot":"","sources":["../../../src/patterns/AppShell/AppShell.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAE/C,sGAAsG;AACtG;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,yFAAyF,CAAC;AAEvH,4GAA4G;AAC5G,MAAM,CAAC,MAAM,gBAAgB,GAAG,wDAAwD,CAAC;AACzF,MAAM,CAAC,MAAM,qBAAqB,GAAG,iCAAiC,CAAC;AACvE,MAAM,CAAC,MAAM,uBAAuB,GAAG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CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACZ,MAAM,CAAC,MAAM,0BAA0B,GACrC,kJAAkJ,CAAC;AACrJ,MAAM,CAAC,MAAM,wBAAwB,GAAG,8BAA8B,CAAC;AACvE,MAAM,CAAC,MAAM,wBAAwB,GAAG,gDAAgD,CAAC;AACzF,MAAM,CAAC,MAAM,0BAA0B,GAAG,wCAAwC,CAAC;AACnF;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAC5B,uJAAuJ,CAAC;AAE1J,6DAA6D;AAC7D,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC;AACrC,gDAAgD;AAChD,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AACtC,+DAA+D;AAC/D,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAE1C,qGAAqG;AACrG,MAAM,CAAC,MAAM,yBAAyB,GAAG,SAAS,CAAC"}
|
|
@@ -41,7 +41,15 @@ export interface ImagePickerProps {
|
|
|
41
41
|
readonly uploadHint?: string;
|
|
42
42
|
/** Why the last upload did not work. */
|
|
43
43
|
readonly uploadError?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Given, only the window is drawn, and whoever gave it opens and closes it: for choosing an
|
|
46
|
+
* image from somewhere other than the field, such as the page the image is shown on.
|
|
47
|
+
*/
|
|
48
|
+
readonly window?: {
|
|
49
|
+
readonly isOpen: boolean;
|
|
50
|
+
readonly onOpenChange: (isOpen: boolean) => void;
|
|
51
|
+
};
|
|
44
52
|
}
|
|
45
53
|
/** Shows the image a field holds and lets a person choose another from the site's images. */
|
|
46
|
-
export declare function ImagePicker({ label, isLabelHidden, description, errorMessage, isRequired, value, images, onChange, chooseLabel, changeLabel, noneText, dialogTitle, closeLabel, emptyText, onUpload, uploadLabel, uploadHint, uploadError, }: ImagePickerProps): import("react").JSX.Element;
|
|
54
|
+
export declare function ImagePicker({ label, isLabelHidden, description, errorMessage, isRequired, value, images, onChange, chooseLabel, changeLabel, noneText, dialogTitle, closeLabel, emptyText, onUpload, uploadLabel, uploadHint, uploadError, window: held, }: ImagePickerProps): import("react").JSX.Element;
|
|
47
55
|
//# sourceMappingURL=ImagePicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImagePicker.d.ts","sourceRoot":"","sources":["../../../src/patterns/ImagePicker/ImagePicker.tsx"],"names":[],"mappings":"AA0BA,MAAM,WAAW,aAAa;IAC5B,gFAAgF;IAChF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,2CAA2C;IAC3C,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,oDAAoD;IACpD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,oGAAoG;IACpG,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAC9B,4DAA4D;IAC5D,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,2CAA2C;IAC3C,QAAQ,CAAC,MAAM,EAAE,SAAS,aAAa,EAAE,CAAC;IAC1C,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,2EAA2E;IAC3E,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,8DAA8D;IAC9D,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,iFAAiF;IACjF,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,kFAAkF;IAClF,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,+DAA+D;IAC/D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,2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EAAE,MAAM,CAAC;IAC7B,iFAAiF;IACjF,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,kFAAkF;IAClF,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,+DAA+D;IAC/D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,2FAA2F;IAC3F,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAClD,mFAAmF;IACnF,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,mEAAmE;IACnE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,wCAAwC;IACxC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE;QAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,YAAY,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAA;KAAE,CAAC;CAClG;AAKD,6FAA6F;AAC7F,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,aAAqB,EACrB,WAAW,EACX,YAAY,EACZ,UAAkB,EAClB,KAAK,EACL,MAAM,EACN,QAAQ,EACR,WAAW,EACX,WAAW,EACX,QAAQ,EACR,WAAW,EACX,UAAU,EACV,SAAS,EACT,QAAQ,EACR,WAAW,EACX,UAAU,EACV,WAAW,EACX,MAAM,EAAE,IAAI,GACb,EAAE,gBAAgB,+BA0FlB"}
|
|
@@ -8,9 +8,11 @@ import { imagePickerChoiceClass, imagePickerChoiceImageClass, imagePickerChoiceN
|
|
|
8
8
|
/** The kinds of file the file chooser offers. What a file really is, the server decides. */
|
|
9
9
|
const IMAGE_FILES = ['image/jpeg', 'image/png', 'image/webp'];
|
|
10
10
|
/** Shows the image a field holds and lets a person choose another from the site's images. */
|
|
11
|
-
export function ImagePicker({ label, isLabelHidden = false, description, errorMessage, isRequired = false, value, images, onChange, chooseLabel, changeLabel, noneText, dialogTitle, closeLabel, emptyText, onUpload, uploadLabel, uploadHint, uploadError, }) {
|
|
11
|
+
export function ImagePicker({ label, isLabelHidden = false, description, errorMessage, isRequired = false, value, images, onChange, chooseLabel, changeLabel, noneText, dialogTitle, closeLabel, emptyText, onUpload, uploadLabel, uploadHint, uploadError, window: held, }) {
|
|
12
12
|
const labelId = useId();
|
|
13
|
-
const [
|
|
13
|
+
const [isOwnOpen, setOwnOpen] = useState(false);
|
|
14
|
+
const isOpen = held ? held.isOpen : isOwnOpen;
|
|
15
|
+
const setOpen = held ? held.onOpenChange : setOwnOpen;
|
|
14
16
|
const [isUploading, setUploading] = useState(false);
|
|
15
17
|
const upload = async (file) => {
|
|
16
18
|
if (!file || !onUpload)
|
|
@@ -28,11 +30,14 @@ export function ImagePicker({ label, isLabelHidden = false, description, errorMe
|
|
|
28
30
|
}
|
|
29
31
|
};
|
|
30
32
|
const chosen = images.find((image) => image.name === value);
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
const choosing = (_jsxs(Dialog, { isOpen: isOpen, onOpenChange: setOpen, title: dialogTitle, closeLabel: closeLabel, size: "lg", children: [onUpload && uploadLabel !== undefined && (_jsxs("div", { className: imagePickerUploadClass, children: [_jsx(FileTrigger, { acceptedFileTypes: IMAGE_FILES, onSelect: (files) => void upload(files?.[0]), children: _jsx(Button, { variant: "secondary", size: "sm", icon: Upload, isPending: isUploading, children: uploadLabel }) }), uploadError !== undefined ? (_jsx("p", { role: "alert", className: imagePickerUploadErrorClass, children: uploadError })) : (uploadHint !== undefined && _jsx("p", { className: imagePickerUploadHintClass, children: uploadHint }))] })), _jsx(ListBox, { "aria-label": dialogTitle, layout: "grid", selectionMode: "single", autoFocus: true, selectedKeys: value === null ? [] : [value], onSelectionChange: (keys) => {
|
|
34
|
+
const [name] = keys === 'all' ? [] : [...keys];
|
|
35
|
+
if (typeof name === 'string')
|
|
36
|
+
onChange(name);
|
|
37
|
+
setOpen(false);
|
|
38
|
+
}, renderEmptyState: () => _jsx("p", { className: imagePickerEmptyClass, children: emptyText }), className: imagePickerChoicesClass, children: images.map((image) => (_jsxs(ListBoxItem, { id: image.name, textValue: image.name, className: imagePickerChoiceClass, children: [_jsx("img", { src: image.url, alt: "", loading: "lazy", className: imagePickerChoiceImageClass }), _jsx("span", { className: imagePickerChoiceNameClass, children: image.name })] }, image.name))) })] }));
|
|
39
|
+
if (held)
|
|
40
|
+
return choosing;
|
|
41
|
+
return (_jsxs("div", { role: "group", "aria-labelledby": labelId, className: imagePickerClass, children: [_jsxs("span", { id: labelId, className: imagePickerLabelVariants({ isLabelHidden }), children: [label, isRequired && (_jsx("span", { "aria-hidden": "true", className: imagePickerRequiredMarkClass, children: ' *' }))] }), _jsxs("div", { className: imagePickerRowClass, children: [chosen ? (_jsx("img", { src: chosen.url, alt: "", loading: "lazy", className: imagePickerThumbClass })) : (_jsx("span", { className: imagePickerPlaceholderClass, children: _jsx(ImageOff, { "aria-hidden": "true", className: imagePickerPlaceholderIconClass }) })), _jsx("span", { className: imagePickerNameClass, children: value ?? noneText }), _jsx(Button, { variant: "secondary", size: "sm", onPress: () => setOpen(true), children: value === null ? chooseLabel : changeLabel })] }), description !== undefined && _jsx("p", { className: imagePickerDescriptionClass, children: description }), errorMessage !== undefined && _jsx("p", { className: imagePickerErrorClass, children: errorMessage }), choosing] }));
|
|
37
42
|
}
|
|
38
43
|
//# sourceMappingURL=ImagePicker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImagePicker.js","sourceRoot":"","sources":["../../../src/patterns/ImagePicker/ImagePicker.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;A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B,GAAI,GACtE,CACR,EACD,eAAM,SAAS,EAAE,oBAAoB,YAAG,KAAK,IAAI,QAAQ,GAAQ,EACjE,KAAC,MAAM,IAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,YAC/D,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,GACpC,IACL,EACL,WAAW,KAAK,SAAS,IAAI,YAAG,SAAS,EAAE,2BAA2B,YAAG,WAAW,GAAK,EACzF,YAAY,KAAK,SAAS,IAAI,YAAG,SAAS,EAAE,qBAAqB,YAAG,YAAY,GAAK,EACrF,QAAQ,IACL,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
1
|
+
/** The actions go under the title when the window has no room for them beside it. */
|
|
2
|
+
export declare const pageHeaderClass = "flex flex-wrap items-start justify-between gap-x-6 gap-y-4";
|
|
3
|
+
export declare const pageHeaderActionsClass = "flex max-w-full shrink-0 flex-wrap items-center gap-2";
|
|
3
4
|
//# sourceMappingURL=PageHeader.variants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageHeader.variants.d.ts","sourceRoot":"","sources":["../../../src/patterns/PageHeader/PageHeader.variants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"PageHeader.variants.d.ts","sourceRoot":"","sources":["../../../src/patterns/PageHeader/PageHeader.variants.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,eAAO,MAAM,eAAe,+DAA+D,CAAC;AAC5F,eAAO,MAAM,sBAAsB,0DAA0D,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export const
|
|
1
|
+
/** The actions go under the title when the window has no room for them beside it. */
|
|
2
|
+
export const pageHeaderClass = 'flex flex-wrap items-start justify-between gap-x-6 gap-y-4';
|
|
3
|
+
export const pageHeaderActionsClass = 'flex max-w-full shrink-0 flex-wrap items-center gap-2';
|
|
3
4
|
//# sourceMappingURL=PageHeader.variants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageHeader.variants.js","sourceRoot":"","sources":["../../../src/patterns/PageHeader/PageHeader.variants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG,
|
|
1
|
+
{"version":3,"file":"PageHeader.variants.js","sourceRoot":"","sources":["../../../src/patterns/PageHeader/PageHeader.variants.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,MAAM,CAAC,MAAM,eAAe,GAAG,4DAA4D,CAAC;AAC5F,MAAM,CAAC,MAAM,sBAAsB,GAAG,uDAAuD,CAAC"}
|