@cratis/scene.blueprint.default 4.39.0 → 4.40.0
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/ComponentName.ts +27 -0
- package/defaultBlueprintComponents.ts +10 -1
- package/dist/cjs/ComponentName.js +9 -0
- package/dist/cjs/ComponentName.js.map +1 -1
- package/dist/cjs/defaultBlueprintComponents.js +19 -1
- package/dist/cjs/defaultBlueprintComponents.js.map +1 -1
- package/dist/cjs/foundation/BulkBar.js +62 -0
- package/dist/cjs/foundation/BulkBar.js.map +1 -0
- package/dist/cjs/foundation/DataList.js +436 -0
- package/dist/cjs/foundation/DataList.js.map +1 -0
- package/dist/cjs/foundation/FormScreenBody.js +447 -0
- package/dist/cjs/foundation/FormScreenBody.js.map +1 -0
- package/dist/cjs/foundation/FoundationStates.js +2 -1
- package/dist/cjs/foundation/FoundationStates.js.map +1 -1
- package/dist/cjs/foundation/GlobalSearch.js +54 -0
- package/dist/cjs/foundation/GlobalSearch.js.map +1 -0
- package/dist/cjs/foundation/KanbanBoard.js +222 -0
- package/dist/cjs/foundation/KanbanBoard.js.map +1 -0
- package/dist/cjs/foundation/NotificationsButton.js +45 -0
- package/dist/cjs/foundation/NotificationsButton.js.map +1 -0
- package/dist/cjs/foundation/SubNavigation.js +72 -0
- package/dist/cjs/foundation/SubNavigation.js.map +1 -0
- package/dist/cjs/foundation/TabSet.js +101 -0
- package/dist/cjs/foundation/TabSet.js.map +1 -0
- package/dist/cjs/foundation/WizardProgress.js +185 -0
- package/dist/cjs/foundation/WizardProgress.js.map +1 -0
- package/dist/cjs/foundation/boardModel.js +67 -0
- package/dist/cjs/foundation/boardModel.js.map +1 -0
- package/dist/cjs/foundation/formModel.js +158 -0
- package/dist/cjs/foundation/formModel.js.map +1 -0
- package/dist/cjs/foundation/foundationComponentMetadata.js +54 -0
- package/dist/cjs/foundation/foundationComponentMetadata.js.map +1 -1
- package/dist/cjs/foundation/foundationDescriptors.js +400 -0
- package/dist/cjs/foundation/foundationDescriptors.js.map +1 -1
- package/dist/cjs/foundation/foundationSamples.js +303 -0
- package/dist/cjs/foundation/foundationSamples.js.map +1 -1
- package/dist/cjs/foundation/foundationStrings.js +72 -0
- package/dist/cjs/foundation/foundationStrings.js.map +1 -1
- package/dist/cjs/foundation/listModel.js +200 -0
- package/dist/cjs/foundation/listModel.js.map +1 -0
- package/dist/cjs/foundation/tabModel.js +41 -0
- package/dist/cjs/foundation/tabModel.js.map +1 -0
- package/dist/cjs/foundation/urlState.js +57 -0
- package/dist/cjs/foundation/urlState.js.map +1 -0
- package/dist/cjs/foundation/useCompactWidth.js +23 -0
- package/dist/cjs/foundation/useCompactWidth.js.map +1 -0
- package/dist/cjs/foundation/wizardModel.js +50 -0
- package/dist/cjs/foundation/wizardModel.js.map +1 -0
- package/dist/cjs/index.js +71 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/ComponentName.d.ts +10 -1
- package/dist/esm/ComponentName.d.ts.map +1 -1
- package/dist/esm/ComponentName.js +9 -0
- package/dist/esm/ComponentName.js.map +1 -1
- package/dist/esm/defaultBlueprintComponents.d.ts.map +1 -1
- package/dist/esm/defaultBlueprintComponents.js +19 -1
- package/dist/esm/defaultBlueprintComponents.js.map +1 -1
- package/dist/esm/foundation/BulkBar.d.ts +4 -0
- package/dist/esm/foundation/BulkBar.d.ts.map +1 -0
- package/dist/esm/foundation/BulkBar.js +59 -0
- package/dist/esm/foundation/BulkBar.js.map +1 -0
- package/dist/esm/foundation/DataList.d.ts +3 -0
- package/dist/esm/foundation/DataList.d.ts.map +1 -0
- package/dist/esm/foundation/DataList.js +434 -0
- package/dist/esm/foundation/DataList.js.map +1 -0
- package/dist/esm/foundation/FormScreenBody.d.ts +3 -0
- package/dist/esm/foundation/FormScreenBody.d.ts.map +1 -0
- package/dist/esm/foundation/FormScreenBody.js +445 -0
- package/dist/esm/foundation/FormScreenBody.js.map +1 -0
- package/dist/esm/foundation/FoundationStates.js +2 -1
- package/dist/esm/foundation/FoundationStates.js.map +1 -1
- package/dist/esm/foundation/GlobalSearch.d.ts +3 -0
- package/dist/esm/foundation/GlobalSearch.d.ts.map +1 -0
- package/dist/esm/foundation/GlobalSearch.js +52 -0
- package/dist/esm/foundation/GlobalSearch.js.map +1 -0
- package/dist/esm/foundation/KanbanBoard.d.ts +3 -0
- package/dist/esm/foundation/KanbanBoard.d.ts.map +1 -0
- package/dist/esm/foundation/KanbanBoard.js +220 -0
- package/dist/esm/foundation/KanbanBoard.js.map +1 -0
- package/dist/esm/foundation/NotificationsButton.d.ts +3 -0
- package/dist/esm/foundation/NotificationsButton.d.ts.map +1 -0
- package/dist/esm/foundation/NotificationsButton.js +43 -0
- package/dist/esm/foundation/NotificationsButton.js.map +1 -0
- package/dist/esm/foundation/SubNavigation.d.ts +3 -0
- package/dist/esm/foundation/SubNavigation.d.ts.map +1 -0
- package/dist/esm/foundation/SubNavigation.js +70 -0
- package/dist/esm/foundation/SubNavigation.js.map +1 -0
- package/dist/esm/foundation/TabSet.d.ts +3 -0
- package/dist/esm/foundation/TabSet.d.ts.map +1 -0
- package/dist/esm/foundation/TabSet.js +99 -0
- package/dist/esm/foundation/TabSet.js.map +1 -0
- package/dist/esm/foundation/WizardProgress.d.ts +3 -0
- package/dist/esm/foundation/WizardProgress.d.ts.map +1 -0
- package/dist/esm/foundation/WizardProgress.js +183 -0
- package/dist/esm/foundation/WizardProgress.js.map +1 -0
- package/dist/esm/foundation/boardModel.d.ts +22 -0
- package/dist/esm/foundation/boardModel.d.ts.map +1 -0
- package/dist/esm/foundation/boardModel.js +61 -0
- package/dist/esm/foundation/boardModel.js.map +1 -0
- package/dist/esm/foundation/formModel.d.ts +48 -0
- package/dist/esm/foundation/formModel.d.ts.map +1 -0
- package/dist/esm/foundation/formModel.js +147 -0
- package/dist/esm/foundation/formModel.js.map +1 -0
- package/dist/esm/foundation/foundationComponentMetadata.d.ts.map +1 -1
- package/dist/esm/foundation/foundationComponentMetadata.js +54 -0
- package/dist/esm/foundation/foundationComponentMetadata.js.map +1 -1
- package/dist/esm/foundation/foundationDescriptors.d.ts.map +1 -1
- package/dist/esm/foundation/foundationDescriptors.js +400 -0
- package/dist/esm/foundation/foundationDescriptors.js.map +1 -1
- package/dist/esm/foundation/foundationSamples.d.ts.map +1 -1
- package/dist/esm/foundation/foundationSamples.js +303 -0
- package/dist/esm/foundation/foundationSamples.js.map +1 -1
- package/dist/esm/foundation/foundationStrings.d.ts +72 -0
- package/dist/esm/foundation/foundationStrings.d.ts.map +1 -1
- package/dist/esm/foundation/foundationStrings.js +72 -0
- package/dist/esm/foundation/foundationStrings.js.map +1 -1
- package/dist/esm/foundation/index.d.ts +16 -0
- package/dist/esm/foundation/index.d.ts.map +1 -1
- package/dist/esm/foundation/index.js +16 -0
- package/dist/esm/foundation/index.js.map +1 -1
- package/dist/esm/foundation/listModel.d.ts +49 -0
- package/dist/esm/foundation/listModel.d.ts.map +1 -0
- package/dist/esm/foundation/listModel.js +183 -0
- package/dist/esm/foundation/listModel.js.map +1 -0
- package/dist/esm/foundation/tabModel.d.ts +10 -0
- package/dist/esm/foundation/tabModel.d.ts.map +1 -0
- package/dist/esm/foundation/tabModel.js +37 -0
- package/dist/esm/foundation/tabModel.js.map +1 -0
- package/dist/esm/foundation/urlState.d.ts +4 -0
- package/dist/esm/foundation/urlState.d.ts.map +1 -0
- package/dist/esm/foundation/urlState.js +53 -0
- package/dist/esm/foundation/urlState.js.map +1 -0
- package/dist/esm/foundation/useCompactWidth.d.ts +3 -0
- package/dist/esm/foundation/useCompactWidth.d.ts.map +1 -0
- package/dist/esm/foundation/useCompactWidth.js +20 -0
- package/dist/esm/foundation/useCompactWidth.js.map +1 -0
- package/dist/esm/foundation/wizardModel.d.ts +16 -0
- package/dist/esm/foundation/wizardModel.d.ts.map +1 -0
- package/dist/esm/foundation/wizardModel.js +43 -0
- package/dist/esm/foundation/wizardModel.js.map +1 -0
- package/dist/esm/index.js +16 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/foundation/BulkBar.tsx +38 -0
- package/foundation/DataList.tsx +208 -0
- package/foundation/FormScreenBody.tsx +196 -0
- package/foundation/FoundationStates.tsx +1 -1
- package/foundation/GlobalSearch.tsx +33 -0
- package/foundation/KanbanBoard.tsx +97 -0
- package/foundation/NotificationsButton.tsx +28 -0
- package/foundation/SubNavigation.tsx +49 -0
- package/foundation/TabSet.tsx +65 -0
- package/foundation/WizardProgress.tsx +109 -0
- package/foundation/boardModel.ts +64 -0
- package/foundation/formModel.ts +146 -0
- package/foundation/foundationComponentMetadata.ts +9 -0
- package/foundation/foundationDescriptors.ts +195 -0
- package/foundation/foundationSamples.ts +56 -0
- package/foundation/foundationStrings.ts +72 -0
- package/foundation/index.ts +16 -0
- package/foundation/listModel.ts +190 -0
- package/foundation/tabModel.ts +41 -0
- package/foundation/urlState.ts +52 -0
- package/foundation/useCompactWidth.ts +23 -0
- package/foundation/wizardModel.ts +54 -0
- package/package.json +8 -8
- package/shell/layout.css +513 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
5
|
+
|
|
6
|
+
/** Reads one query-string parameter of the current address, or undefined when it is absent or there is no address (server rendering). */
|
|
7
|
+
export function readUrlParameter(name: string): string | undefined {
|
|
8
|
+
if (typeof window === 'undefined') return undefined;
|
|
9
|
+
const value = new URLSearchParams(window.location.search).get(name);
|
|
10
|
+
return value === null ? undefined : value;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/** Writes one query-string parameter to the address without adding a history entry; an undefined or empty value removes it. */
|
|
14
|
+
export function writeUrlParameter(name: string, value: string | undefined): void {
|
|
15
|
+
if (typeof window === 'undefined') return;
|
|
16
|
+
const parameters = new URLSearchParams(window.location.search);
|
|
17
|
+
if (value === undefined || value === '') parameters.delete(name);
|
|
18
|
+
else parameters.set(name, value);
|
|
19
|
+
|
|
20
|
+
const query = parameters.toString();
|
|
21
|
+
window.history.replaceState(window.history.state, '', `${window.location.pathname}${query.length > 0 ? `?${query}` : ''}${window.location.hash}`);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* State that lives in the address bar: a list's search, sort, page and filters, a master/detail's selection, a module's active section.
|
|
26
|
+
*
|
|
27
|
+
* It starts from the address when the address has a value (so a shared link, a refresh and the back button restore the screen as it was),
|
|
28
|
+
* otherwise from the fallback the template supplies. Changing it rewrites the address in place and does not add a history entry per keystroke.
|
|
29
|
+
* Several components on one screen use distinct `key`s; a template names them (`q`, `sort`, `page`, `selected`, `section`). Without a
|
|
30
|
+
* `urlKey` the state is plain component state, which is what a gallery card and a design surface want.
|
|
31
|
+
*
|
|
32
|
+
* @param key The query-string parameter, or undefined to keep the state local.
|
|
33
|
+
* @param fallback The value used when the address has none.
|
|
34
|
+
* @returns The value and its setter.
|
|
35
|
+
*/
|
|
36
|
+
export function useUrlState(key: string | undefined, fallback: string | undefined): [string | undefined, (value: string | undefined) => void] {
|
|
37
|
+
const [value, setValue] = useState<string | undefined>(() => (key === undefined ? fallback : readUrlParameter(key) ?? fallback));
|
|
38
|
+
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
if (key === undefined) return;
|
|
41
|
+
const restore = () => setValue(readUrlParameter(key) ?? fallback);
|
|
42
|
+
window.addEventListener('popstate', restore);
|
|
43
|
+
return () => window.removeEventListener('popstate', restore);
|
|
44
|
+
}, [key, fallback]);
|
|
45
|
+
|
|
46
|
+
const update = useCallback((next: string | undefined) => {
|
|
47
|
+
setValue(next);
|
|
48
|
+
if (key !== undefined) writeUrlParameter(key, next);
|
|
49
|
+
}, [key]);
|
|
50
|
+
|
|
51
|
+
return [value, update];
|
|
52
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { useEffect, useState } from 'react';
|
|
5
|
+
|
|
6
|
+
/** The width below which a screen is a phone's: the collapse rules of Part B 1.3 (list to cards, master-detail to stack) apply under it. */
|
|
7
|
+
export const compactQuery = '(max-width: 40rem)';
|
|
8
|
+
|
|
9
|
+
/** Whether the viewport is phone-wide, kept up to date. Without `matchMedia` (a test environment, server rendering) it is false, so the full layout renders. */
|
|
10
|
+
export function useCompactWidth(): boolean {
|
|
11
|
+
const [compact, setCompact] = useState(() => typeof window !== 'undefined' && typeof window.matchMedia === 'function' && window.matchMedia(compactQuery).matches);
|
|
12
|
+
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') return;
|
|
15
|
+
const query = window.matchMedia(compactQuery);
|
|
16
|
+
const update = () => setCompact(query.matches);
|
|
17
|
+
update();
|
|
18
|
+
query.addEventListener('change', update);
|
|
19
|
+
return () => query.removeEventListener('change', update);
|
|
20
|
+
}, []);
|
|
21
|
+
|
|
22
|
+
return compact;
|
|
23
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
/** One step of a wizard. */
|
|
5
|
+
export interface WizardStep {
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
/** Whether the step's own fields are valid; a step that is not valid blocks Next. Defaults to true. */
|
|
9
|
+
valid: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/** Where a step stands for the person going through the wizard. */
|
|
13
|
+
export enum StepStatus {
|
|
14
|
+
Completed = 'completed',
|
|
15
|
+
Current = 'current',
|
|
16
|
+
Upcoming = 'upcoming',
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** Reads steps, dropping those without an id and repeated ids. */
|
|
20
|
+
export function readWizardSteps(value: unknown): WizardStep[] {
|
|
21
|
+
if (!Array.isArray(value)) return [];
|
|
22
|
+
|
|
23
|
+
const seen = new Set<string>();
|
|
24
|
+
return value.flatMap((entry): WizardStep[] => {
|
|
25
|
+
if (typeof entry !== 'object' || entry === null || Array.isArray(entry)) return [];
|
|
26
|
+
const { id, label, valid } = entry as Record<string, unknown>;
|
|
27
|
+
if (typeof id !== 'string' || id.length === 0 || seen.has(id)) return [];
|
|
28
|
+
seen.add(id);
|
|
29
|
+
return [{ id, label: typeof label === 'string' && label.length > 0 ? label : id, valid: valid !== false }];
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** The step to show: the requested one when it exists and every step before it is completed, else the furthest step that is reachable. A refresh can never land past a step that was not done. */
|
|
34
|
+
export function reachableStep(steps: WizardStep[], completed: ReadonlySet<string>, requested: string | undefined): string | undefined {
|
|
35
|
+
const wanted = steps.findIndex(step => step.id === requested);
|
|
36
|
+
let furthest = 0;
|
|
37
|
+
while (furthest < steps.length - 1 && completed.has(steps[furthest].id)) furthest++;
|
|
38
|
+
return steps[wanted >= 0 && wanted <= furthest ? wanted : furthest]?.id;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** The status of a step: the current one, a completed one (revisitable), or upcoming. */
|
|
42
|
+
export function statusOf(completed: ReadonlySet<string>, current: string | undefined, id: string): StepStatus {
|
|
43
|
+
if (id === current) return StepStatus.Current;
|
|
44
|
+
return completed.has(id) ? StepStatus.Completed : StepStatus.Upcoming;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** Whether a step may be opened from the progress indicator: a completed one, the current one, or the next one when the current is done. */
|
|
48
|
+
export function canOpen(steps: WizardStep[], completed: ReadonlySet<string>, id: string): boolean {
|
|
49
|
+
const index = steps.findIndex(step => step.id === id);
|
|
50
|
+
return index === 0 || steps.slice(0, index).every(step => completed.has(step.id));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** The step before or after another, or undefined at either end. */
|
|
54
|
+
export const neighbour = (steps: WizardStep[], id: string | undefined, direction: -1 | 1): WizardStep | undefined => steps[steps.findIndex(step => step.id === id) + direction];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cratis/scene.blueprint.default",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.40.0",
|
|
4
4
|
"description": "The default blueprint: application shell layouts, the screen and dialog templates that go inside them, the components that fill their slots, and two themes.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cratis",
|
|
@@ -55,15 +55,15 @@
|
|
|
55
55
|
"build-storybook": "storybook build"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@cratis/scene.engine": "4.
|
|
59
|
-
"@cratis/scene.model": "4.
|
|
60
|
-
"@cratis/scene.react": "4.
|
|
58
|
+
"@cratis/scene.engine": "4.40.0",
|
|
59
|
+
"@cratis/scene.model": "4.40.0",
|
|
60
|
+
"@cratis/scene.react": "4.40.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@cratis/scene.engine": "4.
|
|
64
|
-
"@cratis/scene.model": "4.
|
|
65
|
-
"@cratis/scene.primereact": "4.
|
|
66
|
-
"@cratis/scene.react": "4.
|
|
63
|
+
"@cratis/scene.engine": "4.40.0",
|
|
64
|
+
"@cratis/scene.model": "4.40.0",
|
|
65
|
+
"@cratis/scene.primereact": "4.40.0",
|
|
66
|
+
"@cratis/scene.react": "4.40.0",
|
|
67
67
|
"@primereact/core": "11.2.0",
|
|
68
68
|
"@primereact/headless": "11.2.0",
|
|
69
69
|
"@primeuix/themes": "^3.0.1",
|
package/shell/layout.css
CHANGED
|
@@ -1120,6 +1120,12 @@
|
|
|
1120
1120
|
--foundation-row-height: 2.75rem;
|
|
1121
1121
|
|
|
1122
1122
|
box-sizing: border-box;
|
|
1123
|
+
/*
|
|
1124
|
+
* A component is often a grid or flex item of the slot it sits in, whose minimum size is its content's. Without this a wide table or board
|
|
1125
|
+
* stretches its cell, and the page, instead of scrolling inside itself.
|
|
1126
|
+
*/
|
|
1127
|
+
min-inline-size: 0;
|
|
1128
|
+
max-inline-size: 100%;
|
|
1123
1129
|
color: var(--foundation-text);
|
|
1124
1130
|
font-family: inherit;
|
|
1125
1131
|
}
|
|
@@ -1979,6 +1985,7 @@
|
|
|
1979
1985
|
}
|
|
1980
1986
|
|
|
1981
1987
|
.foundation-matrix-scroll {
|
|
1988
|
+
position: relative; /* the containing block of the visually hidden text inside, so it scrolls with the content instead of widening the page */
|
|
1982
1989
|
overflow-x: auto;
|
|
1983
1990
|
}
|
|
1984
1991
|
|
|
@@ -2025,3 +2032,509 @@
|
|
|
2025
2032
|
align-items: center;
|
|
2026
2033
|
justify-content: center;
|
|
2027
2034
|
}
|
|
2035
|
+
|
|
2036
|
+
/* Tabs, sub-navigation, bulk bar, search and notifications. */
|
|
2037
|
+
.foundation-tabs {
|
|
2038
|
+
position: relative; /* the containing block of the visually hidden text inside, so it scrolls with the content instead of widening the page */
|
|
2039
|
+
display: flex;
|
|
2040
|
+
gap: var(--foundation-space-1);
|
|
2041
|
+
overflow-x: auto;
|
|
2042
|
+
border-block-end: 1px solid var(--foundation-border);
|
|
2043
|
+
}
|
|
2044
|
+
|
|
2045
|
+
.foundation-tab {
|
|
2046
|
+
display: inline-flex;
|
|
2047
|
+
align-items: center;
|
|
2048
|
+
gap: var(--foundation-space-2);
|
|
2049
|
+
min-block-size: 2.75rem;
|
|
2050
|
+
padding-inline: var(--foundation-space-3);
|
|
2051
|
+
border: 0;
|
|
2052
|
+
border-block-end: 3px solid transparent;
|
|
2053
|
+
background: transparent;
|
|
2054
|
+
color: var(--foundation-muted);
|
|
2055
|
+
font: inherit;
|
|
2056
|
+
font-weight: 600;
|
|
2057
|
+
white-space: nowrap;
|
|
2058
|
+
cursor: pointer;
|
|
2059
|
+
}
|
|
2060
|
+
|
|
2061
|
+
.foundation-tab[aria-selected='true'] {
|
|
2062
|
+
border-block-end-color: var(--foundation-primary);
|
|
2063
|
+
color: var(--foundation-text);
|
|
2064
|
+
}
|
|
2065
|
+
|
|
2066
|
+
.foundation-tab:disabled {
|
|
2067
|
+
opacity: 0.5;
|
|
2068
|
+
cursor: not-allowed;
|
|
2069
|
+
}
|
|
2070
|
+
|
|
2071
|
+
.foundation-tab-badge {
|
|
2072
|
+
padding: 0 var(--foundation-space-2);
|
|
2073
|
+
border-radius: 999px;
|
|
2074
|
+
background: var(--foundation-hover);
|
|
2075
|
+
color: var(--foundation-text);
|
|
2076
|
+
font-size: 0.75rem;
|
|
2077
|
+
}
|
|
2078
|
+
|
|
2079
|
+
.foundation-tab-panel {
|
|
2080
|
+
padding-block: var(--foundation-space-3);
|
|
2081
|
+
}
|
|
2082
|
+
|
|
2083
|
+
.foundation-tab-panel[hidden] {
|
|
2084
|
+
display: none;
|
|
2085
|
+
}
|
|
2086
|
+
|
|
2087
|
+
.foundation-subnav ul {
|
|
2088
|
+
display: flex;
|
|
2089
|
+
gap: var(--foundation-space-1);
|
|
2090
|
+
margin: 0;
|
|
2091
|
+
padding: 0;
|
|
2092
|
+
list-style: none;
|
|
2093
|
+
}
|
|
2094
|
+
|
|
2095
|
+
.foundation-subnav[data-orientation='vertical'] ul {
|
|
2096
|
+
flex-direction: column;
|
|
2097
|
+
}
|
|
2098
|
+
|
|
2099
|
+
.foundation-subnav-link {
|
|
2100
|
+
display: flex;
|
|
2101
|
+
align-items: center;
|
|
2102
|
+
justify-content: space-between;
|
|
2103
|
+
gap: var(--foundation-space-2);
|
|
2104
|
+
min-block-size: 2.5rem;
|
|
2105
|
+
padding-inline: var(--foundation-space-3);
|
|
2106
|
+
border-radius: var(--foundation-radius);
|
|
2107
|
+
color: var(--foundation-text);
|
|
2108
|
+
font-weight: 600;
|
|
2109
|
+
text-decoration: none;
|
|
2110
|
+
}
|
|
2111
|
+
|
|
2112
|
+
.foundation-subnav-link:hover {
|
|
2113
|
+
background: var(--foundation-hover);
|
|
2114
|
+
}
|
|
2115
|
+
|
|
2116
|
+
.foundation-subnav-link[aria-current='page'] {
|
|
2117
|
+
background: var(--foundation-highlight);
|
|
2118
|
+
color: var(--foundation-highlight-text);
|
|
2119
|
+
}
|
|
2120
|
+
|
|
2121
|
+
.foundation-bulk-bar {
|
|
2122
|
+
display: flex;
|
|
2123
|
+
flex-wrap: wrap;
|
|
2124
|
+
align-items: center;
|
|
2125
|
+
gap: var(--foundation-space-3);
|
|
2126
|
+
padding: var(--foundation-space-2) var(--foundation-space-4);
|
|
2127
|
+
border: 1px solid var(--foundation-primary);
|
|
2128
|
+
border-radius: var(--foundation-radius);
|
|
2129
|
+
background: var(--foundation-highlight);
|
|
2130
|
+
color: var(--foundation-highlight-text);
|
|
2131
|
+
}
|
|
2132
|
+
|
|
2133
|
+
.foundation-bulk-bar[hidden] {
|
|
2134
|
+
display: none;
|
|
2135
|
+
}
|
|
2136
|
+
|
|
2137
|
+
.foundation-bulk-actions {
|
|
2138
|
+
display: inline-flex;
|
|
2139
|
+
flex-wrap: wrap;
|
|
2140
|
+
gap: var(--foundation-space-2);
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2143
|
+
.foundation-search {
|
|
2144
|
+
display: inline-flex;
|
|
2145
|
+
align-items: center;
|
|
2146
|
+
gap: var(--foundation-space-2);
|
|
2147
|
+
padding-inline: var(--foundation-space-3);
|
|
2148
|
+
border: 1px solid var(--foundation-border);
|
|
2149
|
+
border-radius: var(--foundation-radius);
|
|
2150
|
+
background: var(--foundation-surface);
|
|
2151
|
+
}
|
|
2152
|
+
|
|
2153
|
+
.foundation-search input[type='search'] {
|
|
2154
|
+
min-inline-size: 12rem;
|
|
2155
|
+
border: 0;
|
|
2156
|
+
background: transparent;
|
|
2157
|
+
}
|
|
2158
|
+
|
|
2159
|
+
.foundation-notifications {
|
|
2160
|
+
position: relative;
|
|
2161
|
+
display: inline-flex;
|
|
2162
|
+
align-items: center;
|
|
2163
|
+
justify-content: center;
|
|
2164
|
+
min-inline-size: 2.5rem;
|
|
2165
|
+
min-block-size: 2.5rem;
|
|
2166
|
+
border: 0;
|
|
2167
|
+
border-radius: var(--foundation-radius);
|
|
2168
|
+
background: transparent;
|
|
2169
|
+
color: var(--foundation-text);
|
|
2170
|
+
font-size: 1.25rem;
|
|
2171
|
+
cursor: pointer;
|
|
2172
|
+
}
|
|
2173
|
+
|
|
2174
|
+
.foundation-notifications:hover {
|
|
2175
|
+
background: var(--foundation-hover);
|
|
2176
|
+
}
|
|
2177
|
+
|
|
2178
|
+
.foundation-notifications-badge {
|
|
2179
|
+
position: absolute;
|
|
2180
|
+
inset-block-start: 0;
|
|
2181
|
+
inset-inline-end: 0;
|
|
2182
|
+
min-inline-size: 1.25rem;
|
|
2183
|
+
padding-inline: var(--foundation-space-1);
|
|
2184
|
+
border-radius: 999px;
|
|
2185
|
+
background: var(--foundation-danger);
|
|
2186
|
+
color: var(--foundation-surface);
|
|
2187
|
+
font-size: 0.75rem;
|
|
2188
|
+
font-weight: 700;
|
|
2189
|
+
line-height: 1.25rem;
|
|
2190
|
+
text-align: center;
|
|
2191
|
+
}
|
|
2192
|
+
|
|
2193
|
+
/* Data list: table, cards, groups, pager. */
|
|
2194
|
+
.foundation-data-list {
|
|
2195
|
+
display: flex;
|
|
2196
|
+
flex-direction: column;
|
|
2197
|
+
gap: var(--foundation-space-3);
|
|
2198
|
+
}
|
|
2199
|
+
|
|
2200
|
+
.foundation-table-scroll {
|
|
2201
|
+
position: relative; /* the containing block of the visually hidden text inside, so it scrolls with the content instead of widening the page */
|
|
2202
|
+
overflow-x: auto;
|
|
2203
|
+
border: 1px solid var(--foundation-border);
|
|
2204
|
+
border-radius: var(--foundation-radius);
|
|
2205
|
+
background: var(--foundation-surface);
|
|
2206
|
+
}
|
|
2207
|
+
|
|
2208
|
+
.foundation-table {
|
|
2209
|
+
inline-size: 100%;
|
|
2210
|
+
border-collapse: collapse;
|
|
2211
|
+
}
|
|
2212
|
+
|
|
2213
|
+
.foundation-table th,
|
|
2214
|
+
.foundation-table td {
|
|
2215
|
+
min-block-size: var(--foundation-row-height);
|
|
2216
|
+
padding: var(--foundation-space-2) var(--foundation-space-3);
|
|
2217
|
+
border-block-end: 1px solid var(--foundation-border);
|
|
2218
|
+
text-align: start;
|
|
2219
|
+
white-space: nowrap;
|
|
2220
|
+
}
|
|
2221
|
+
|
|
2222
|
+
.foundation-table thead th {
|
|
2223
|
+
background: var(--foundation-background);
|
|
2224
|
+
color: var(--foundation-muted);
|
|
2225
|
+
font-size: 0.875rem;
|
|
2226
|
+
}
|
|
2227
|
+
|
|
2228
|
+
.foundation-table td[data-kind='number'],
|
|
2229
|
+
.foundation-table td[data-kind='currency'] {
|
|
2230
|
+
font-variant-numeric: tabular-nums;
|
|
2231
|
+
text-align: end;
|
|
2232
|
+
}
|
|
2233
|
+
|
|
2234
|
+
.foundation-table tr[data-selected='true'] {
|
|
2235
|
+
background: var(--foundation-highlight);
|
|
2236
|
+
}
|
|
2237
|
+
|
|
2238
|
+
.foundation-table-select {
|
|
2239
|
+
inline-size: 2.5rem;
|
|
2240
|
+
}
|
|
2241
|
+
|
|
2242
|
+
.foundation-sort {
|
|
2243
|
+
display: inline-flex;
|
|
2244
|
+
align-items: center;
|
|
2245
|
+
gap: var(--foundation-space-1);
|
|
2246
|
+
padding: 0;
|
|
2247
|
+
border: 0;
|
|
2248
|
+
background: transparent;
|
|
2249
|
+
color: inherit;
|
|
2250
|
+
font: inherit;
|
|
2251
|
+
font-weight: 600;
|
|
2252
|
+
cursor: pointer;
|
|
2253
|
+
}
|
|
2254
|
+
|
|
2255
|
+
.foundation-row-actions {
|
|
2256
|
+
max-inline-size: 8rem;
|
|
2257
|
+
}
|
|
2258
|
+
|
|
2259
|
+
.foundation-cards {
|
|
2260
|
+
display: grid;
|
|
2261
|
+
grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
|
|
2262
|
+
gap: var(--foundation-space-3);
|
|
2263
|
+
margin: 0;
|
|
2264
|
+
padding: 0;
|
|
2265
|
+
list-style: none;
|
|
2266
|
+
}
|
|
2267
|
+
|
|
2268
|
+
.foundation-card-row {
|
|
2269
|
+
display: flex;
|
|
2270
|
+
flex-direction: column;
|
|
2271
|
+
gap: var(--foundation-space-2);
|
|
2272
|
+
padding: var(--foundation-space-3);
|
|
2273
|
+
border: 1px solid var(--foundation-border);
|
|
2274
|
+
border-radius: var(--foundation-radius);
|
|
2275
|
+
background: var(--foundation-surface);
|
|
2276
|
+
}
|
|
2277
|
+
|
|
2278
|
+
.foundation-card-row[data-selected='true'] {
|
|
2279
|
+
border-color: var(--foundation-primary);
|
|
2280
|
+
}
|
|
2281
|
+
|
|
2282
|
+
.foundation-card-head {
|
|
2283
|
+
display: flex;
|
|
2284
|
+
align-items: center;
|
|
2285
|
+
gap: var(--foundation-space-2);
|
|
2286
|
+
}
|
|
2287
|
+
|
|
2288
|
+
.foundation-card-row dl {
|
|
2289
|
+
display: grid;
|
|
2290
|
+
gap: var(--foundation-space-1);
|
|
2291
|
+
margin: 0;
|
|
2292
|
+
}
|
|
2293
|
+
|
|
2294
|
+
.foundation-card-row dd {
|
|
2295
|
+
margin: 0;
|
|
2296
|
+
}
|
|
2297
|
+
|
|
2298
|
+
.foundation-list-group h3 {
|
|
2299
|
+
display: flex;
|
|
2300
|
+
align-items: center;
|
|
2301
|
+
justify-content: space-between;
|
|
2302
|
+
margin: 0 0 var(--foundation-space-2);
|
|
2303
|
+
font-size: 1rem;
|
|
2304
|
+
}
|
|
2305
|
+
|
|
2306
|
+
.foundation-pager {
|
|
2307
|
+
display: flex;
|
|
2308
|
+
align-items: center;
|
|
2309
|
+
justify-content: center;
|
|
2310
|
+
gap: var(--foundation-space-3);
|
|
2311
|
+
}
|
|
2312
|
+
|
|
2313
|
+
/* Kanban board. */
|
|
2314
|
+
.foundation-board {
|
|
2315
|
+
position: relative; /* the containing block of the visually hidden text inside, so it scrolls with the content instead of widening the page */
|
|
2316
|
+
display: flex;
|
|
2317
|
+
gap: var(--foundation-space-3);
|
|
2318
|
+
overflow-x: auto;
|
|
2319
|
+
padding-block-end: var(--foundation-space-2);
|
|
2320
|
+
}
|
|
2321
|
+
|
|
2322
|
+
.foundation-board-column {
|
|
2323
|
+
display: flex;
|
|
2324
|
+
flex: 1 0 15rem;
|
|
2325
|
+
flex-direction: column;
|
|
2326
|
+
gap: var(--foundation-space-2);
|
|
2327
|
+
max-inline-size: 22rem;
|
|
2328
|
+
padding: var(--foundation-space-2);
|
|
2329
|
+
border: 1px solid var(--foundation-border);
|
|
2330
|
+
border-radius: var(--foundation-radius);
|
|
2331
|
+
background: var(--foundation-background);
|
|
2332
|
+
}
|
|
2333
|
+
|
|
2334
|
+
.foundation-board-column[data-collapsed='true'] {
|
|
2335
|
+
flex-basis: auto;
|
|
2336
|
+
}
|
|
2337
|
+
|
|
2338
|
+
.foundation-board-column[data-over='true'] {
|
|
2339
|
+
border-color: var(--foundation-danger);
|
|
2340
|
+
}
|
|
2341
|
+
|
|
2342
|
+
.foundation-board-header {
|
|
2343
|
+
display: flex;
|
|
2344
|
+
flex-wrap: wrap;
|
|
2345
|
+
align-items: center;
|
|
2346
|
+
gap: var(--foundation-space-2);
|
|
2347
|
+
}
|
|
2348
|
+
|
|
2349
|
+
.foundation-board-header h3 {
|
|
2350
|
+
margin: 0;
|
|
2351
|
+
font-size: 1rem;
|
|
2352
|
+
}
|
|
2353
|
+
|
|
2354
|
+
.foundation-board-cards {
|
|
2355
|
+
display: flex;
|
|
2356
|
+
flex-direction: column;
|
|
2357
|
+
gap: var(--foundation-space-2);
|
|
2358
|
+
margin: 0;
|
|
2359
|
+
padding: 0;
|
|
2360
|
+
list-style: none;
|
|
2361
|
+
}
|
|
2362
|
+
|
|
2363
|
+
.foundation-board-card {
|
|
2364
|
+
display: flex;
|
|
2365
|
+
flex-direction: column;
|
|
2366
|
+
gap: var(--foundation-space-1);
|
|
2367
|
+
padding: var(--foundation-space-3);
|
|
2368
|
+
border: 1px solid var(--foundation-border);
|
|
2369
|
+
border-radius: var(--foundation-radius);
|
|
2370
|
+
background: var(--foundation-surface);
|
|
2371
|
+
}
|
|
2372
|
+
|
|
2373
|
+
.foundation-board-card[draggable='true'] {
|
|
2374
|
+
cursor: grab;
|
|
2375
|
+
}
|
|
2376
|
+
|
|
2377
|
+
.foundation-board-badges {
|
|
2378
|
+
display: inline-flex;
|
|
2379
|
+
flex-wrap: wrap;
|
|
2380
|
+
gap: var(--foundation-space-1);
|
|
2381
|
+
}
|
|
2382
|
+
|
|
2383
|
+
/* Wizard. */
|
|
2384
|
+
.foundation-wizard-steps {
|
|
2385
|
+
display: flex;
|
|
2386
|
+
flex-wrap: wrap;
|
|
2387
|
+
gap: var(--foundation-space-3);
|
|
2388
|
+
margin: 0 0 var(--foundation-space-4);
|
|
2389
|
+
padding: 0;
|
|
2390
|
+
list-style: none;
|
|
2391
|
+
}
|
|
2392
|
+
|
|
2393
|
+
.foundation-wizard-step button {
|
|
2394
|
+
display: inline-flex;
|
|
2395
|
+
align-items: center;
|
|
2396
|
+
gap: var(--foundation-space-2);
|
|
2397
|
+
min-block-size: 2.5rem;
|
|
2398
|
+
padding: 0 var(--foundation-space-2);
|
|
2399
|
+
border: 0;
|
|
2400
|
+
border-radius: var(--foundation-radius);
|
|
2401
|
+
background: transparent;
|
|
2402
|
+
color: var(--foundation-muted);
|
|
2403
|
+
font: inherit;
|
|
2404
|
+
font-weight: 600;
|
|
2405
|
+
cursor: pointer;
|
|
2406
|
+
}
|
|
2407
|
+
|
|
2408
|
+
.foundation-wizard-step button:disabled {
|
|
2409
|
+
cursor: not-allowed;
|
|
2410
|
+
opacity: 0.6;
|
|
2411
|
+
}
|
|
2412
|
+
|
|
2413
|
+
.foundation-wizard-step[data-status='current'] button {
|
|
2414
|
+
color: var(--foundation-text);
|
|
2415
|
+
}
|
|
2416
|
+
|
|
2417
|
+
.foundation-wizard-marker {
|
|
2418
|
+
display: inline-flex;
|
|
2419
|
+
align-items: center;
|
|
2420
|
+
justify-content: center;
|
|
2421
|
+
inline-size: 1.75rem;
|
|
2422
|
+
block-size: 1.75rem;
|
|
2423
|
+
border: 2px solid currentColor;
|
|
2424
|
+
border-radius: 50%;
|
|
2425
|
+
font-size: 0.875rem;
|
|
2426
|
+
}
|
|
2427
|
+
|
|
2428
|
+
.foundation-wizard-step[data-status='current'] .foundation-wizard-marker {
|
|
2429
|
+
background: var(--foundation-primary);
|
|
2430
|
+
border-color: var(--foundation-primary);
|
|
2431
|
+
color: var(--foundation-primary-contrast);
|
|
2432
|
+
}
|
|
2433
|
+
|
|
2434
|
+
.foundation-wizard-step[data-status='completed'] .foundation-wizard-marker {
|
|
2435
|
+
border-color: var(--foundation-success);
|
|
2436
|
+
color: var(--foundation-success);
|
|
2437
|
+
}
|
|
2438
|
+
|
|
2439
|
+
.foundation-wizard-body {
|
|
2440
|
+
padding-block: var(--foundation-space-3);
|
|
2441
|
+
}
|
|
2442
|
+
|
|
2443
|
+
.foundation-wizard-actions,
|
|
2444
|
+
.foundation-form-actions {
|
|
2445
|
+
display: flex;
|
|
2446
|
+
flex-wrap: wrap;
|
|
2447
|
+
align-items: center;
|
|
2448
|
+
gap: var(--foundation-space-2);
|
|
2449
|
+
padding-block: var(--foundation-space-3);
|
|
2450
|
+
border-block-start: 1px solid var(--foundation-border);
|
|
2451
|
+
}
|
|
2452
|
+
|
|
2453
|
+
.foundation-wizard-spacer {
|
|
2454
|
+
flex: 1;
|
|
2455
|
+
}
|
|
2456
|
+
|
|
2457
|
+
/* Form. */
|
|
2458
|
+
.foundation-form-section {
|
|
2459
|
+
margin: 0 0 var(--foundation-space-4);
|
|
2460
|
+
padding: var(--foundation-space-3) var(--foundation-space-4);
|
|
2461
|
+
border: 1px solid var(--foundation-border);
|
|
2462
|
+
border-radius: var(--foundation-radius);
|
|
2463
|
+
}
|
|
2464
|
+
|
|
2465
|
+
.foundation-form-section legend {
|
|
2466
|
+
padding-inline: var(--foundation-space-2);
|
|
2467
|
+
font-weight: 700;
|
|
2468
|
+
}
|
|
2469
|
+
|
|
2470
|
+
.foundation-form-grid {
|
|
2471
|
+
display: grid;
|
|
2472
|
+
gap: var(--foundation-space-3);
|
|
2473
|
+
}
|
|
2474
|
+
|
|
2475
|
+
.foundation-field {
|
|
2476
|
+
display: flex;
|
|
2477
|
+
flex-direction: column;
|
|
2478
|
+
gap: var(--foundation-space-1);
|
|
2479
|
+
min-inline-size: 0;
|
|
2480
|
+
}
|
|
2481
|
+
|
|
2482
|
+
.foundation-field-label {
|
|
2483
|
+
font-weight: 600;
|
|
2484
|
+
}
|
|
2485
|
+
|
|
2486
|
+
.foundation-required {
|
|
2487
|
+
color: var(--foundation-danger);
|
|
2488
|
+
}
|
|
2489
|
+
|
|
2490
|
+
.foundation-field-error {
|
|
2491
|
+
color: var(--foundation-danger);
|
|
2492
|
+
font-size: 0.875rem;
|
|
2493
|
+
}
|
|
2494
|
+
|
|
2495
|
+
.foundation-field[data-invalid] input,
|
|
2496
|
+
.foundation-field[data-invalid] select,
|
|
2497
|
+
.foundation-field[data-invalid] textarea {
|
|
2498
|
+
border-color: var(--foundation-danger);
|
|
2499
|
+
}
|
|
2500
|
+
|
|
2501
|
+
.foundation-field textarea,
|
|
2502
|
+
.foundation-field input[type='file'] {
|
|
2503
|
+
padding: var(--foundation-space-2);
|
|
2504
|
+
border: 1px solid var(--foundation-border);
|
|
2505
|
+
border-radius: var(--foundation-radius);
|
|
2506
|
+
background: var(--foundation-surface);
|
|
2507
|
+
color: var(--foundation-text);
|
|
2508
|
+
font: inherit;
|
|
2509
|
+
}
|
|
2510
|
+
|
|
2511
|
+
.foundation-fieldset {
|
|
2512
|
+
display: flex;
|
|
2513
|
+
flex-wrap: wrap;
|
|
2514
|
+
gap: var(--foundation-space-3);
|
|
2515
|
+
margin: 0;
|
|
2516
|
+
padding: 0;
|
|
2517
|
+
border: 0;
|
|
2518
|
+
}
|
|
2519
|
+
|
|
2520
|
+
.foundation-address {
|
|
2521
|
+
display: grid;
|
|
2522
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
2523
|
+
gap: var(--foundation-space-2);
|
|
2524
|
+
}
|
|
2525
|
+
|
|
2526
|
+
.foundation-form-actions {
|
|
2527
|
+
position: sticky;
|
|
2528
|
+
inset-block-end: 0;
|
|
2529
|
+
background: var(--foundation-surface);
|
|
2530
|
+
}
|
|
2531
|
+
|
|
2532
|
+
@media (max-width: 40rem) {
|
|
2533
|
+
.foundation-form-grid {
|
|
2534
|
+
grid-template-columns: minmax(0, 1fr) !important;
|
|
2535
|
+
}
|
|
2536
|
+
|
|
2537
|
+
.foundation-field {
|
|
2538
|
+
grid-column: auto !important;
|
|
2539
|
+
}
|
|
2540
|
+
}
|