@velocity-astro/cms-ui 0.1.0-beta.1 → 0.1.0-beta.12
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 +93 -8
- package/dist/components/BarChart/BarChart.d.ts +23 -0
- package/dist/components/BarChart/BarChart.d.ts.map +1 -0
- package/dist/components/BarChart/BarChart.js +19 -0
- package/dist/components/BarChart/BarChart.js.map +1 -0
- package/dist/components/BarChart/BarChart.variants.d.ts +29 -0
- package/dist/components/BarChart/BarChart.variants.d.ts.map +1 -0
- package/dist/components/BarChart/BarChart.variants.js +81 -0
- package/dist/components/BarChart/BarChart.variants.js.map +1 -0
- package/dist/components/BarChart/index.d.ts +2 -0
- package/dist/components/BarChart/index.d.ts.map +1 -0
- package/dist/components/BarChart/index.js +2 -0
- package/dist/components/BarChart/index.js.map +1 -0
- package/dist/components/Button/Button.d.ts +6 -1
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.js +5 -3
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button/Button.variants.d.ts +6 -1
- package/dist/components/Button/Button.variants.d.ts.map +1 -1
- package/dist/components/Button/Button.variants.js +13 -1
- package/dist/components/Button/Button.variants.js.map +1 -1
- package/dist/components/Card/Card.d.ts +3 -1
- package/dist/components/Card/Card.d.ts.map +1 -1
- package/dist/components/Card/Card.js +3 -3
- package/dist/components/Card/Card.js.map +1 -1
- package/dist/components/Card/Card.variants.d.ts +4 -1
- package/dist/components/Card/Card.variants.d.ts.map +1 -1
- package/dist/components/Card/Card.variants.js +6 -1
- package/dist/components/Card/Card.variants.js.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.d.ts +30 -0
- package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -0
- package/dist/components/ColorPicker/ColorPicker.js +32 -0
- package/dist/components/ColorPicker/ColorPicker.js.map +1 -0
- package/dist/components/ColorPicker/ColorPicker.variants.d.ts +24 -0
- package/dist/components/ColorPicker/ColorPicker.variants.d.ts.map +1 -0
- package/dist/components/ColorPicker/ColorPicker.variants.js +42 -0
- package/dist/components/ColorPicker/ColorPicker.variants.js.map +1 -0
- package/dist/components/ColorPicker/index.d.ts +2 -0
- package/dist/components/ColorPicker/index.d.ts.map +1 -0
- package/dist/components/ColorPicker/index.js +2 -0
- package/dist/components/ColorPicker/index.js.map +1 -0
- package/dist/components/FileButton/FileButton.d.ts +3 -1
- package/dist/components/FileButton/FileButton.d.ts.map +1 -1
- package/dist/components/FileButton/FileButton.js +2 -2
- package/dist/components/FileButton/FileButton.js.map +1 -1
- 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/Heading/Heading.d.ts +1 -1
- package/dist/components/Heading/Heading.d.ts.map +1 -1
- package/dist/components/Heading/Heading.js +2 -2
- package/dist/components/Heading/Heading.js.map +1 -1
- package/dist/components/Heading/Heading.variants.d.ts +1 -0
- package/dist/components/Heading/Heading.variants.d.ts.map +1 -1
- package/dist/components/Heading/Heading.variants.js +2 -0
- package/dist/components/Heading/Heading.variants.js.map +1 -1
- package/dist/components/LoadingMark/LoadingMark.d.ts +11 -0
- package/dist/components/LoadingMark/LoadingMark.d.ts.map +1 -0
- package/dist/components/LoadingMark/LoadingMark.js +17 -0
- package/dist/components/LoadingMark/LoadingMark.js.map +1 -0
- package/dist/components/LoadingMark/LoadingMark.variants.d.ts +22 -0
- package/dist/components/LoadingMark/LoadingMark.variants.d.ts.map +1 -0
- package/dist/components/LoadingMark/LoadingMark.variants.js +18 -0
- package/dist/components/LoadingMark/LoadingMark.variants.js.map +1 -0
- package/dist/components/LoadingMark/index.d.ts +2 -0
- package/dist/components/LoadingMark/index.d.ts.map +1 -0
- package/dist/components/LoadingMark/index.js +2 -0
- package/dist/components/LoadingMark/index.js.map +1 -0
- package/dist/components/Logo/Logo.d.ts +10 -2
- package/dist/components/Logo/Logo.d.ts.map +1 -1
- package/dist/components/Logo/Logo.js +11 -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/RichTextEditor/RichTextEditor.d.ts +8 -1
- package/dist/components/RichTextEditor/RichTextEditor.d.ts.map +1 -1
- package/dist/components/RichTextEditor/RichTextEditor.js +62 -17
- package/dist/components/RichTextEditor/RichTextEditor.js.map +1 -1
- package/dist/components/RichTextEditor/index.d.ts +1 -1
- package/dist/components/RichTextEditor/index.d.ts.map +1 -1
- package/dist/components/RichTextEditor/index.js.map +1 -1
- package/dist/components/Segmented/Segmented.d.ts +14 -1
- package/dist/components/Segmented/Segmented.d.ts.map +1 -1
- package/dist/components/Segmented/Segmented.js +14 -5
- package/dist/components/Segmented/Segmented.js.map +1 -1
- package/dist/components/Segmented/Segmented.variants.d.ts +14 -1
- package/dist/components/Segmented/Segmented.variants.d.ts.map +1 -1
- package/dist/components/Segmented/Segmented.variants.js +19 -3
- package/dist/components/Segmented/Segmented.variants.js.map +1 -1
- package/dist/components/Spotlight/Spotlight.d.ts +16 -0
- package/dist/components/Spotlight/Spotlight.d.ts.map +1 -0
- package/dist/components/Spotlight/Spotlight.js +28 -0
- package/dist/components/Spotlight/Spotlight.js.map +1 -0
- package/dist/components/Spotlight/Spotlight.variants.d.ts +8 -0
- package/dist/components/Spotlight/Spotlight.variants.d.ts.map +1 -0
- package/dist/components/Spotlight/Spotlight.variants.js +15 -0
- package/dist/components/Spotlight/Spotlight.variants.js.map +1 -0
- package/dist/components/Spotlight/index.d.ts +2 -0
- package/dist/components/Spotlight/index.d.ts.map +1 -0
- package/dist/components/Spotlight/index.js +2 -0
- package/dist/components/Spotlight/index.js.map +1 -0
- package/dist/components/Table/Table.d.ts +8 -1
- package/dist/components/Table/Table.d.ts.map +1 -1
- package/dist/components/Table/Table.js +4 -4
- package/dist/components/Table/Table.js.map +1 -1
- package/dist/components/Table/Table.variants.d.ts +6 -2
- package/dist/components/Table/Table.variants.d.ts.map +1 -1
- package/dist/components/Table/Table.variants.js +11 -5
- package/dist/components/Table/Table.variants.js.map +1 -1
- package/dist/components/index.d.ts +5 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +5 -0
- package/dist/components/index.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 +38 -8
- package/dist/patterns/AppShell/AppShell.d.ts.map +1 -1
- package/dist/patterns/AppShell/AppShell.js +46 -7
- package/dist/patterns/AppShell/AppShell.js.map +1 -1
- package/dist/patterns/AppShell/AppShell.variants.d.ts +89 -20
- package/dist/patterns/AppShell/AppShell.variants.d.ts.map +1 -1
- package/dist/patterns/AppShell/AppShell.variants.js +148 -23
- 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 +43 -0
- package/dist/patterns/CommandPalette/CommandPalette.d.ts.map +1 -0
- package/dist/patterns/CommandPalette/CommandPalette.js +19 -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/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/OptionPicker/OptionPicker.d.ts +2 -0
- package/dist/patterns/OptionPicker/OptionPicker.d.ts.map +1 -1
- package/dist/patterns/OptionPicker/OptionPicker.js +8 -3
- package/dist/patterns/OptionPicker/OptionPicker.js.map +1 -1
- package/dist/patterns/OptionPicker/OptionPicker.variants.d.ts +10 -4
- package/dist/patterns/OptionPicker/OptionPicker.variants.d.ts.map +1 -1
- package/dist/patterns/OptionPicker/OptionPicker.variants.js +29 -6
- package/dist/patterns/OptionPicker/OptionPicker.variants.js.map +1 -1
- 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/PageHeader/PageHeader.d.ts +33 -4
- package/dist/patterns/PageHeader/PageHeader.d.ts.map +1 -1
- package/dist/patterns/PageHeader/PageHeader.js +31 -6
- package/dist/patterns/PageHeader/PageHeader.js.map +1 -1
- package/dist/patterns/PageHeader/PageHeader.variants.d.ts +23 -2
- package/dist/patterns/PageHeader/PageHeader.variants.d.ts.map +1 -1
- package/dist/patterns/PageHeader/PageHeader.variants.js +33 -2
- package/dist/patterns/PageHeader/PageHeader.variants.js.map +1 -1
- package/dist/patterns/PagePreview/PagePreview.d.ts +138 -4
- package/dist/patterns/PagePreview/PagePreview.d.ts.map +1 -1
- package/dist/patterns/PagePreview/PagePreview.js +159 -13
- package/dist/patterns/PagePreview/PagePreview.js.map +1 -1
- package/dist/patterns/PagePreview/PagePreview.variants.d.ts +15 -2
- package/dist/patterns/PagePreview/PagePreview.variants.d.ts.map +1 -1
- package/dist/patterns/PagePreview/PagePreview.variants.js +22 -6
- 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.d.ts +20 -4
- package/dist/patterns/SaveBar/SaveBar.d.ts.map +1 -1
- package/dist/patterns/SaveBar/SaveBar.js +22 -4
- package/dist/patterns/SaveBar/SaveBar.js.map +1 -1
- package/dist/patterns/SaveBar/SaveBar.variants.d.ts +27 -5
- package/dist/patterns/SaveBar/SaveBar.variants.d.ts.map +1 -1
- package/dist/patterns/SaveBar/SaveBar.variants.js +39 -6
- package/dist/patterns/SaveBar/SaveBar.variants.js.map +1 -1
- package/dist/patterns/SectionList/SectionList.d.ts.map +1 -1
- package/dist/patterns/SectionList/SectionList.js +2 -2
- package/dist/patterns/SectionList/SectionList.js.map +1 -1
- package/dist/patterns/SectionList/SectionList.variants.d.ts +4 -1
- package/dist/patterns/SectionList/SectionList.variants.d.ts.map +1 -1
- package/dist/patterns/SectionList/SectionList.variants.js +5 -2
- package/dist/patterns/SectionList/SectionList.variants.js.map +1 -1
- 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/Split/Split.variants.d.ts +2 -2
- package/dist/patterns/Split/Split.variants.d.ts.map +1 -1
- package/dist/patterns/Split/Split.variants.js +2 -2
- package/dist/patterns/Split/Split.variants.js.map +1 -1
- 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 +20 -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 +35 -4
- package/dist/patterns/Workbench/Workbench.d.ts.map +1 -1
- package/dist/patterns/Workbench/Workbench.js +59 -4
- package/dist/patterns/Workbench/Workbench.js.map +1 -1
- package/dist/patterns/Workbench/Workbench.variants.d.ts +56 -4
- package/dist/patterns/Workbench/Workbench.variants.d.ts.map +1 -1
- package/dist/patterns/Workbench/Workbench.variants.js +111 -4
- package/dist/patterns/Workbench/Workbench.variants.js.map +1 -1
- package/dist/patterns/Workbench/index.d.ts +1 -1
- package/dist/patterns/Workbench/index.d.ts.map +1 -1
- package/dist/patterns/Workbench/index.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/dist/patterns/page-bar.d.ts +17 -0
- package/dist/patterns/page-bar.d.ts.map +1 -0
- package/dist/patterns/page-bar.js +22 -0
- package/dist/patterns/page-bar.js.map +1 -0
- package/package.json +2 -1
- package/src/styles.css +179 -0
- package/src/tokens/tokens.css +27 -1
|
@@ -1,6 +1,113 @@
|
|
|
1
|
+
import { cva } from 'class-variance-authority';
|
|
2
|
+
/**
|
|
3
|
+
* Beside the form, the workbench is part of the screen. Whole, it covers the window, over the frame of
|
|
4
|
+
* the editor, as a studio of its own: always in the dark theme (`dark` turns every token in it to its
|
|
5
|
+
* dark value), so the page, the one thing in full colour, stands out from it.
|
|
6
|
+
*/
|
|
7
|
+
export const workbenchVariants = cva('', {
|
|
8
|
+
variants: {
|
|
9
|
+
view: {
|
|
10
|
+
beside: 'w-full',
|
|
11
|
+
whole: 'dark fixed inset-0 layer-overlay flex flex-col bg-background text-foreground',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
defaultVariants: { view: 'beside' },
|
|
15
|
+
});
|
|
1
16
|
/** One column on a narrow screen; from `xl` up, the form in a column of its own width and the pane taking the rest. */
|
|
2
|
-
export const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
17
|
+
export const workbenchBodyVariants = cva('flex', {
|
|
18
|
+
variants: {
|
|
19
|
+
view: {
|
|
20
|
+
beside: 'w-full flex-col gap-6 xl:flex-row xl:items-start',
|
|
21
|
+
whole: 'min-h-0 flex-1',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
defaultVariants: { view: 'beside' },
|
|
25
|
+
});
|
|
26
|
+
/**
|
|
27
|
+
* 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
|
|
28
|
+
* leave the pane the window. On a phone it is as wide as the window, so away it is simply gone.
|
|
29
|
+
*/
|
|
30
|
+
export const workbenchFormVariants = cva('flex min-w-0 flex-col gap-6', {
|
|
31
|
+
variants: {
|
|
32
|
+
view: {
|
|
33
|
+
beside: 'xl:w-lg xl:shrink-0',
|
|
34
|
+
whole: 'order-last max-w-full shrink-0 overflow-auto border-l border-border bg-card p-4',
|
|
35
|
+
},
|
|
36
|
+
isAway: { true: '', false: '' },
|
|
37
|
+
},
|
|
38
|
+
compoundVariants: [{ view: 'whole', isAway: true, class: 'hidden' }],
|
|
39
|
+
defaultVariants: { view: 'beside', isAway: false },
|
|
40
|
+
});
|
|
41
|
+
/** How wide the form's panel is with the whole window, in the steps a person drags it through. */
|
|
42
|
+
export const workbenchFormWidthVariants = cva('flex min-w-0 max-w-full flex-col gap-6', {
|
|
43
|
+
variants: {
|
|
44
|
+
width: {
|
|
45
|
+
0: 'md:w-80',
|
|
46
|
+
1: 'md:w-88',
|
|
47
|
+
2: 'md:w-96',
|
|
48
|
+
3: 'md:w-104',
|
|
49
|
+
4: 'md:w-112',
|
|
50
|
+
5: 'md:w-120',
|
|
51
|
+
6: 'md:w-128',
|
|
52
|
+
7: 'md:w-136',
|
|
53
|
+
8: 'md:w-144',
|
|
54
|
+
9: 'md:w-160',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
export const WORKBENCH_FORM_STEPS = 10;
|
|
59
|
+
export const WORKBENCH_FORM_DEFAULT = 6;
|
|
60
|
+
/** How wide the outline is, in the same way. */
|
|
61
|
+
export const workbenchOutlineWidthVariants = cva('', {
|
|
62
|
+
variants: {
|
|
63
|
+
width: {
|
|
64
|
+
0: 'w-48',
|
|
65
|
+
1: 'w-52',
|
|
66
|
+
2: 'w-56',
|
|
67
|
+
3: 'w-60',
|
|
68
|
+
4: 'w-64',
|
|
69
|
+
5: 'w-72',
|
|
70
|
+
6: 'w-80',
|
|
71
|
+
7: 'w-96',
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
export const WORKBENCH_OUTLINE_STEPS = 8;
|
|
76
|
+
export const WORKBENCH_OUTLINE_DEFAULT = 3;
|
|
77
|
+
/** How far the pointer moves for one step, in pixels. */
|
|
78
|
+
export const workbenchResizeStep = 32;
|
|
79
|
+
/** What the form holds, in a column: beside, as wide as the form's column; whole, as wide as the panel was dragged. */
|
|
80
|
+
export const workbenchFormInnerClass = 'flex min-w-0 flex-col gap-6';
|
|
81
|
+
/** Beside the form, the pane stays in view while the form scrolls under the bar at the top. */
|
|
82
|
+
export const workbenchPaneVariants = cva('min-w-0', {
|
|
83
|
+
variants: {
|
|
84
|
+
view: {
|
|
85
|
+
beside: 'pane-tall xl:sticky xl:top-8 xl:flex-1',
|
|
86
|
+
whole: 'min-h-0 flex-1 p-3',
|
|
87
|
+
},
|
|
88
|
+
/** While a panel is dragged wider or narrower, the page takes no pointer, so the drag is not lost over it. */
|
|
89
|
+
isResizing: { true: 'pointer-events-none select-none', false: '' },
|
|
90
|
+
},
|
|
91
|
+
defaultVariants: { view: 'beside', isResizing: false },
|
|
92
|
+
});
|
|
93
|
+
/** Whole, the way around what is made, on the left: from `lg` up, where there is room for three columns. */
|
|
94
|
+
export const workbenchOutlineClass = 'hidden shrink-0 flex-col overflow-auto border-r border-border bg-card p-3 lg:flex';
|
|
95
|
+
/**
|
|
96
|
+
* The edge between two columns, dragged to make one wider or narrower, or moved with the arrow keys
|
|
97
|
+
* once it has the focus. It shows as a line, and as the brand's colour while it is held or chosen.
|
|
98
|
+
*/
|
|
99
|
+
/**
|
|
100
|
+
* The edge a panel is dragged by: a hairline over the panel's own border, seen on hover and in the brand's
|
|
101
|
+
* orange while it moves, with a wider area either side to take the pointer.
|
|
102
|
+
*/
|
|
103
|
+
export const workbenchHandleVariants = cva([
|
|
104
|
+
'relative z-10 w-px shrink-0 cursor-col-resize touch-none bg-transparent transition-colors motion-fast outline-none hover:bg-border-strong',
|
|
105
|
+
'before:absolute before:inset-y-0 before:-inset-x-1.5',
|
|
106
|
+
].join(' '), {
|
|
107
|
+
variants: {
|
|
108
|
+
place: { outline: 'hidden lg:block', form: 'order-last max-md:hidden' },
|
|
109
|
+
isActive: { true: 'bg-brand-fill hover:bg-brand-fill', false: '' },
|
|
110
|
+
},
|
|
111
|
+
defaultVariants: { place: 'outline', isActive: false },
|
|
112
|
+
});
|
|
6
113
|
//# 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,uHAAuH;AACvH,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"Workbench.variants.js","sourceRoot":"","sources":["../../../src/patterns/Workbench/Workbench.variants.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Workbench, type WorkbenchProps } from './Workbench.js';
|
|
1
|
+
export { Workbench, type WorkbenchProps, type WorkbenchSizes } from './Workbench.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/patterns/Workbench/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/patterns/Workbench/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/patterns/Workbench/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/patterns/Workbench/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA4C,MAAM,gBAAgB,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 './Outline/index.js';
|
|
18
|
+
export * from './Welcome/index.js';
|
|
19
|
+
export * from './SiteWindow/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,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,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 './Outline/index.js';
|
|
18
|
+
export * from './Welcome/index.js';
|
|
19
|
+
export * from './SiteWindow/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,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where a screen's header goes: the bar across the top of `AppShell`. The shell gives the element
|
|
3
|
+
* once it is drawn (`null` until then); outside a shell there is none (`undefined`), and a header
|
|
4
|
+
* is drawn where it stands, as in a story or a test of one part.
|
|
5
|
+
*/
|
|
6
|
+
export declare const PageBarContext: import("react").Context<HTMLElement | null | undefined>;
|
|
7
|
+
/** The bar a screen's header is drawn in, `null` while the shell is still drawing it, or `undefined` outside a shell. */
|
|
8
|
+
export declare function usePageBar(): HTMLElement | null | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Told by a screen whose bar leads back (an entry, with the way back to its list) that it does, so on a
|
|
11
|
+
* phone the shell leaves out its menu and its search: one row, the way back in the menu's place, as on
|
|
12
|
+
* any phone. Outside a shell there is nothing to tell.
|
|
13
|
+
*/
|
|
14
|
+
export declare const PageBarBackContext: import("react").Context<((leadsBack: boolean) => void) | undefined>;
|
|
15
|
+
/** Says, while the screen is shown, that its bar leads back. */
|
|
16
|
+
export declare function usePageBarBack(): ((leadsBack: boolean) => void) | undefined;
|
|
17
|
+
//# sourceMappingURL=page-bar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-bar.d.ts","sourceRoot":"","sources":["../../src/patterns/page-bar.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,cAAc,yDAA2D,CAAC;AAEvF,yHAAyH;AACzH,wBAAgB,UAAU,IAAI,WAAW,GAAG,IAAI,GAAG,SAAS,CAE3D;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,uCAA8B,OAAO,KAAK,IAAI,cAAyB,CAAC;AAEvG,gEAAgE;AAChE,wBAAgB,cAAc,IAAI,CAAC,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC,GAAG,SAAS,CAE3E"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Where a screen's header goes: the bar across the top of `AppShell`. The shell gives the element
|
|
4
|
+
* once it is drawn (`null` until then); outside a shell there is none (`undefined`), and a header
|
|
5
|
+
* is drawn where it stands, as in a story or a test of one part.
|
|
6
|
+
*/
|
|
7
|
+
export const PageBarContext = createContext(undefined);
|
|
8
|
+
/** The bar a screen's header is drawn in, `null` while the shell is still drawing it, or `undefined` outside a shell. */
|
|
9
|
+
export function usePageBar() {
|
|
10
|
+
return useContext(PageBarContext);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Told by a screen whose bar leads back (an entry, with the way back to its list) that it does, so on a
|
|
14
|
+
* phone the shell leaves out its menu and its search: one row, the way back in the menu's place, as on
|
|
15
|
+
* any phone. Outside a shell there is nothing to tell.
|
|
16
|
+
*/
|
|
17
|
+
export const PageBarBackContext = createContext(undefined);
|
|
18
|
+
/** Says, while the screen is shown, that its bar leads back. */
|
|
19
|
+
export function usePageBarBack() {
|
|
20
|
+
return useContext(PageBarBackContext);
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=page-bar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-bar.js","sourceRoot":"","sources":["../../src/patterns/page-bar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAElD;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAiC,SAAS,CAAC,CAAC;AAEvF,yHAAyH;AACzH,MAAM,UAAU,UAAU;IACxB,OAAO,UAAU,CAAC,cAAc,CAAC,CAAC;AACpC,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,aAAa,CAA6C,SAAS,CAAC,CAAC;AAEvG,gEAAgE;AAChE,MAAM,UAAU,cAAc;IAC5B,OAAO,UAAU,CAAC,kBAAkB,CAAC,CAAC;AACxC,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.12",
|
|
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",
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"@tiptap/starter-kit": "^3.34.0",
|
|
51
51
|
"class-variance-authority": "^0.7.1",
|
|
52
52
|
"lucide-react": "^1.74.0",
|
|
53
|
+
"react-aria": "^3.53.1",
|
|
53
54
|
"react-aria-components": "^1.22.1"
|
|
54
55
|
},
|
|
55
56
|
"peerDependencies": {
|
package/src/styles.css
CHANGED
|
@@ -71,8 +71,16 @@
|
|
|
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);
|
|
82
|
+
--color-brand-fill-hover: var(--brand-fill-hover);
|
|
83
|
+
--color-brand-text: var(--brand-text);
|
|
76
84
|
|
|
77
85
|
--font-sans: var(--font-ui);
|
|
78
86
|
--font-mono: var(--font-code);
|
|
@@ -92,6 +100,10 @@
|
|
|
92
100
|
--text-2xl--line-height: var(--type-2xl-leading);
|
|
93
101
|
--text-3xl: var(--type-3xl);
|
|
94
102
|
--text-3xl--line-height: var(--type-3xl-leading);
|
|
103
|
+
--text-4xl: var(--type-4xl);
|
|
104
|
+
--text-4xl--line-height: var(--type-4xl-leading);
|
|
105
|
+
--text-5xl: var(--type-5xl);
|
|
106
|
+
--text-5xl--line-height: var(--type-5xl-leading);
|
|
95
107
|
|
|
96
108
|
--radius-sm: var(--theme-radius-sm);
|
|
97
109
|
--radius-md: var(--theme-radius-md);
|
|
@@ -117,6 +129,11 @@
|
|
|
117
129
|
transition-duration: var(--motion-base);
|
|
118
130
|
transition-timing-function: var(--motion-ease);
|
|
119
131
|
}
|
|
132
|
+
/* A panel that is part of the layout and makes room or takes it: the form beside a page. */
|
|
133
|
+
@utility motion-slide {
|
|
134
|
+
transition-duration: var(--motion-slow);
|
|
135
|
+
transition-timing-function: var(--motion-ease);
|
|
136
|
+
}
|
|
120
137
|
/*
|
|
121
138
|
* How things arrive and leave. React Aria marks a part `data-entering` while it opens and
|
|
122
139
|
* `data-exiting` while it closes, and waits for the animation before taking it away. Leaving is
|
|
@@ -154,6 +171,16 @@
|
|
|
154
171
|
transform: translateX(100%);
|
|
155
172
|
}
|
|
156
173
|
}
|
|
174
|
+
@keyframes motion-sheet-start-in {
|
|
175
|
+
from {
|
|
176
|
+
transform: translateX(-100%);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
@keyframes motion-sheet-start-out {
|
|
180
|
+
to {
|
|
181
|
+
transform: translateX(-100%);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
157
184
|
@keyframes motion-float-in {
|
|
158
185
|
from {
|
|
159
186
|
opacity: 0;
|
|
@@ -215,6 +242,16 @@
|
|
|
215
242
|
forwards;
|
|
216
243
|
}
|
|
217
244
|
}
|
|
245
|
+
/* The same from the other edge: the navigation of a narrow window. */
|
|
246
|
+
@utility motion-sheet-start {
|
|
247
|
+
&[data-entering] {
|
|
248
|
+
animation: motion-sheet-start-in var(--motion-slower) var(--motion-ease-enter);
|
|
249
|
+
}
|
|
250
|
+
&[data-exiting] {
|
|
251
|
+
animation: motion-sheet-start-out var(--motion-slow) var(--motion-ease-exit)
|
|
252
|
+
forwards;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
218
255
|
/* A list, menu or tooltip beside what opened it: it comes from that side. */
|
|
219
256
|
@utility motion-float {
|
|
220
257
|
&[data-placement^="bottom"] {
|
|
@@ -259,6 +296,81 @@
|
|
|
259
296
|
motion-fade-in var(--motion-slow) var(--motion-ease) var(--motion-slow) backwards,
|
|
260
297
|
motion-breathe var(--motion-loop) ease-in-out infinite;
|
|
261
298
|
}
|
|
299
|
+
/*
|
|
300
|
+
* The mark while the editor opens (LoadingMark): each facet arrives from its own side in grey and
|
|
301
|
+
* takes its colour, the top first, holds, fades, and assembles again until the editor is there.
|
|
302
|
+
* Someone who asks for less motion sees the whole mark, still.
|
|
303
|
+
*/
|
|
304
|
+
@keyframes motion-mark-arrive {
|
|
305
|
+
0% {
|
|
306
|
+
opacity: 0;
|
|
307
|
+
transform: translate(var(--mark-from-x), var(--mark-from-y));
|
|
308
|
+
}
|
|
309
|
+
22%,
|
|
310
|
+
82% {
|
|
311
|
+
opacity: 1;
|
|
312
|
+
transform: translate(0, 0);
|
|
313
|
+
}
|
|
314
|
+
100% {
|
|
315
|
+
opacity: 0;
|
|
316
|
+
transform: translate(0, 0);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
@keyframes motion-mark-colour {
|
|
320
|
+
0%,
|
|
321
|
+
30% {
|
|
322
|
+
opacity: 0;
|
|
323
|
+
}
|
|
324
|
+
46%,
|
|
325
|
+
100% {
|
|
326
|
+
opacity: 1;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
@utility motion-mark-top {
|
|
330
|
+
--mark-from-x: 0px;
|
|
331
|
+
--mark-from-y: -18px;
|
|
332
|
+
transform-box: fill-box;
|
|
333
|
+
animation: motion-mark-arrive var(--motion-mark) var(--motion-ease-enter) infinite;
|
|
334
|
+
@media (prefers-reduced-motion: reduce) {
|
|
335
|
+
animation: none;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
@utility motion-mark-left {
|
|
339
|
+
--mark-from-x: -18px;
|
|
340
|
+
--mark-from-y: 10px;
|
|
341
|
+
transform-box: fill-box;
|
|
342
|
+
animation: motion-mark-arrive var(--motion-mark) var(--motion-ease-enter) 140ms infinite backwards;
|
|
343
|
+
@media (prefers-reduced-motion: reduce) {
|
|
344
|
+
animation: none;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
@utility motion-mark-right {
|
|
348
|
+
--mark-from-x: 18px;
|
|
349
|
+
--mark-from-y: 10px;
|
|
350
|
+
transform-box: fill-box;
|
|
351
|
+
animation: motion-mark-arrive var(--motion-mark) var(--motion-ease-enter) 280ms infinite backwards;
|
|
352
|
+
@media (prefers-reduced-motion: reduce) {
|
|
353
|
+
animation: none;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
@utility motion-mark-colour-top {
|
|
357
|
+
animation: motion-mark-colour var(--motion-mark) var(--motion-ease) infinite;
|
|
358
|
+
@media (prefers-reduced-motion: reduce) {
|
|
359
|
+
animation: none;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
@utility motion-mark-colour-left {
|
|
363
|
+
animation: motion-mark-colour var(--motion-mark) var(--motion-ease) 140ms infinite backwards;
|
|
364
|
+
@media (prefers-reduced-motion: reduce) {
|
|
365
|
+
animation: none;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
@utility motion-mark-colour-right {
|
|
369
|
+
animation: motion-mark-colour var(--motion-mark) var(--motion-ease) 280ms infinite backwards;
|
|
370
|
+
@media (prefers-reduced-motion: reduce) {
|
|
371
|
+
animation: none;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
262
374
|
/* A control that gives a little under a press. */
|
|
263
375
|
@utility motion-press {
|
|
264
376
|
transition-property:
|
|
@@ -277,6 +389,73 @@
|
|
|
277
389
|
animation-timing-function: var(--motion-ease);
|
|
278
390
|
}
|
|
279
391
|
|
|
392
|
+
/*
|
|
393
|
+
* The frame's two moving parts, when a change of screen opens or closes the column of a section's
|
|
394
|
+
* places (`AppShell`). Each is carried apart from the rest of the window: the column is uncovered
|
|
395
|
+
* from its edge as it widens, and the panel beside it slides and makes room. Their pictures are never
|
|
396
|
+
* stretched to fit, only clipped, so words stay sharp while they move.
|
|
397
|
+
*
|
|
398
|
+
* The column also opens and closes by its width, for a change the browser makes without a view
|
|
399
|
+
* transition (going back). During one, that is switched off, so the new picture is of the column
|
|
400
|
+
* as it ends and the two never run one after the other.
|
|
401
|
+
*/
|
|
402
|
+
@utility view-shell-places {
|
|
403
|
+
view-transition-name: shell-places;
|
|
404
|
+
:root:active-view-transition &,
|
|
405
|
+
:root:active-view-transition & * {
|
|
406
|
+
transition: none;
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
@utility view-shell-panel {
|
|
410
|
+
view-transition-name: shell-panel;
|
|
411
|
+
}
|
|
412
|
+
::view-transition-group(shell-places),
|
|
413
|
+
::view-transition-group(shell-panel) {
|
|
414
|
+
overflow: clip;
|
|
415
|
+
animation-duration: var(--motion-slow);
|
|
416
|
+
animation-timing-function: var(--motion-ease);
|
|
417
|
+
}
|
|
418
|
+
::view-transition-old(shell-places),
|
|
419
|
+
::view-transition-new(shell-places),
|
|
420
|
+
::view-transition-old(shell-panel),
|
|
421
|
+
::view-transition-new(shell-panel) {
|
|
422
|
+
width: 100%;
|
|
423
|
+
height: 100%;
|
|
424
|
+
object-fit: none;
|
|
425
|
+
object-position: left top;
|
|
426
|
+
animation-duration: var(--motion-base);
|
|
427
|
+
animation-timing-function: var(--motion-ease);
|
|
428
|
+
}
|
|
429
|
+
@media (width >= 48rem) {
|
|
430
|
+
::view-transition-group(shell-panel) {
|
|
431
|
+
border-radius: var(--radius-2xl);
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
/* A faint grid behind the top of a screen that greets: lines of the border colour, 40px apart. */
|
|
436
|
+
@utility bg-grid {
|
|
437
|
+
background-image:
|
|
438
|
+
linear-gradient(to bottom, var(--border-subtle) 1px, transparent 1px),
|
|
439
|
+
linear-gradient(to right, var(--border-subtle) 1px, transparent 1px);
|
|
440
|
+
background-size: 2.5rem 2.5rem;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
/*
|
|
444
|
+
* The grid as a clearing: its lines show in the middle and fade toward the edges, so what sits
|
|
445
|
+
* in the middle (the mark while the editor opens) stands on it alone.
|
|
446
|
+
*/
|
|
447
|
+
@utility bg-grid-clearing {
|
|
448
|
+
background-image:
|
|
449
|
+
radial-gradient(closest-side, transparent 30%, var(--background) 100%),
|
|
450
|
+
linear-gradient(to bottom, var(--border) 1px, transparent 1px),
|
|
451
|
+
linear-gradient(to right, var(--border) 1px, transparent 1px);
|
|
452
|
+
background-size:
|
|
453
|
+
100% 100%,
|
|
454
|
+
1.5rem 1.5rem,
|
|
455
|
+
1.5rem 1.5rem;
|
|
456
|
+
background-position: center;
|
|
457
|
+
}
|
|
458
|
+
|
|
280
459
|
/* As tall as the room a screen has under its bar, for a pane that stays in view. */
|
|
281
460
|
@utility pane-tall {
|
|
282
461
|
height: var(--pane-height);
|
package/src/tokens/tokens.css
CHANGED
|
@@ -103,6 +103,8 @@
|
|
|
103
103
|
--accent: var(--brand-500);
|
|
104
104
|
--accent-hover: var(--brand-600);
|
|
105
105
|
--accent-light: var(--brand-100);
|
|
106
|
+
/* The brand as words: a heading's set-apart phrase. Over 4.5:1 on the page in both themes. */
|
|
107
|
+
--brand-text: var(--brand-600);
|
|
106
108
|
|
|
107
109
|
--muted: var(--gray-100);
|
|
108
110
|
--muted-foreground: var(--gray-500); /* 5.5:1 on white — WCAG AA */
|
|
@@ -176,6 +178,7 @@
|
|
|
176
178
|
--ring: var(--gray-0);
|
|
177
179
|
|
|
178
180
|
--accent-light: var(--brand-900);
|
|
181
|
+
--brand-text: var(--brand-400);
|
|
179
182
|
|
|
180
183
|
/* Light red with dark text: 7:1 as a button, and over 6.7:1 as text on dark surfaces. */
|
|
181
184
|
--destructive: oklch(72% 0.17 25);
|
|
@@ -220,6 +223,11 @@
|
|
|
220
223
|
--type-2xl-leading: 2rem;
|
|
221
224
|
--type-3xl: 1.875rem;
|
|
222
225
|
--type-3xl-leading: 2.125rem;
|
|
226
|
+
/* The greeting at the top of Home, the one large line of the editor. */
|
|
227
|
+
--type-4xl: 2.25rem;
|
|
228
|
+
--type-4xl-leading: 2.5rem;
|
|
229
|
+
--type-5xl: 3rem;
|
|
230
|
+
--type-5xl-leading: 3.25rem;
|
|
223
231
|
|
|
224
232
|
/* Motion: short, and off entirely for people who ask for less. */
|
|
225
233
|
--motion-fast: 100ms;
|
|
@@ -229,6 +237,8 @@
|
|
|
229
237
|
--motion-slower: 350ms;
|
|
230
238
|
/* One turn of something that repeats while it waits. */
|
|
231
239
|
--motion-loop: 1600ms;
|
|
240
|
+
/* One turn of the mark that shows while the editor opens (`motion-mark-*`). */
|
|
241
|
+
--motion-mark: 2800ms;
|
|
232
242
|
--motion-ease: cubic-bezier(0.2, 0, 0, 1);
|
|
233
243
|
/* Arriving: quick at first, then settling. Leaving: gathering speed on the way out. */
|
|
234
244
|
--motion-ease-enter: cubic-bezier(0.16, 1, 0.3, 1);
|
|
@@ -236,7 +246,17 @@
|
|
|
236
246
|
|
|
237
247
|
/* The height of a pane that stays in view beside a form: the window less the frame, the bar
|
|
238
248
|
at the top of the screen and the space around the pane. */
|
|
239
|
-
--pane-height: calc(100dvh -
|
|
249
|
+
--pane-height: calc(100dvh - 9rem);
|
|
250
|
+
|
|
251
|
+
/* The rail: the dark ground of the editor's navigation, from `md` up, which the rounded panel
|
|
252
|
+
holding the bar and the screen sits in. It is dark in both themes, so these hold for light and
|
|
253
|
+
dark alike (see .dark below for its ground). */
|
|
254
|
+
--rail: var(--gray-950);
|
|
255
|
+
--rail-foreground: var(--gray-50); /* 19.3:1 on the rail */
|
|
256
|
+
--rail-muted: var(--gray-400); /* 6.0:1 on the rail */
|
|
257
|
+
--rail-hover: oklch(100% 0 0 / 0.08);
|
|
258
|
+
--rail-current: oklch(100% 0 0 / 0.14);
|
|
259
|
+
--rail-border: oklch(100% 0 0 / 0.12);
|
|
240
260
|
|
|
241
261
|
/* Layering: the only stacking levels there are. */
|
|
242
262
|
--layer-raised: 10;
|
|
@@ -248,6 +268,12 @@
|
|
|
248
268
|
--scrim: oklch(0 0 0 / 0.5);
|
|
249
269
|
}
|
|
250
270
|
|
|
271
|
+
/* In the dark theme the rail sits a step below the page, so it still reads as its own strip. After
|
|
272
|
+
the block above: both are as specific, so the later one wins. */
|
|
273
|
+
.dark {
|
|
274
|
+
--rail: oklch(7% 0 0);
|
|
275
|
+
}
|
|
276
|
+
|
|
251
277
|
@media (prefers-reduced-motion: reduce) {
|
|
252
278
|
:root {
|
|
253
279
|
--motion-fast: 0ms;
|