@flood-md/agent 0.2.10 → 0.2.11
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/DESIGN.md +8 -5
- package/README.md +1 -1
- package/SKILL.md +11 -0
- package/dist/catalog.json +1875 -295
- package/dist/materials/component-app-shell.md +47 -0
- package/dist/materials/component-app-top-bar.md +36 -0
- package/dist/materials/component-autocomplete.md +54 -0
- package/dist/materials/component-bulk-action-bar.md +52 -0
- package/dist/materials/component-button.md +1 -0
- package/dist/materials/component-card.md +2 -2
- package/dist/materials/component-collapsible.md +1 -0
- package/dist/materials/component-collection-toolbar.md +68 -0
- package/dist/materials/component-collection-view-switcher.md +49 -0
- package/dist/materials/component-combobox.md +10 -0
- package/dist/materials/component-command-palette.md +53 -0
- package/dist/materials/component-copy-button.md +1 -0
- package/dist/materials/component-data-table.md +14 -2
- package/dist/materials/component-date-picker.md +1 -0
- package/dist/materials/component-date-range-picker.md +1 -0
- package/dist/materials/component-date-time-picker.md +2 -0
- package/dist/materials/component-date-time-range-picker.md +4 -0
- package/dist/materials/component-drawer.md +1 -0
- package/dist/materials/component-figure.md +1 -1
- package/dist/materials/component-filter-condition.md +53 -0
- package/dist/materials/component-filter-group.md +55 -0
- package/dist/materials/component-icon-button.md +2 -0
- package/dist/materials/component-menubar.md +41 -0
- package/dist/materials/component-multi-select.md +10 -0
- package/dist/materials/component-navigation-group.md +51 -0
- package/dist/materials/component-navigation-item.md +59 -0
- package/dist/materials/component-navigation-tree.md +8 -0
- package/dist/materials/component-overflow-actions.md +47 -0
- package/dist/materials/component-page-header.md +40 -0
- package/dist/materials/component-popover.md +2 -1
- package/dist/materials/component-radio-card.md +2 -2
- package/dist/materials/component-segmented-control.md +6 -4
- package/dist/materials/component-sidebar.md +64 -0
- package/dist/materials/component-tabs.md +2 -0
- package/dist/materials/component-text.md +2 -2
- package/dist/materials/component-toggle.md +1 -0
- package/dist/materials/component-toolbar.md +4 -0
- package/dist/materials/component-tooltip.md +1 -1
- package/dist/materials/guide-agent-knowledge.md +13 -6
- package/dist/materials/guide-agents.md +8 -1
- package/dist/materials/guide-foundations.md +45 -2
- package/dist/materials/guide-installation.md +6 -6
- package/dist/materials/guide-interface-content.md +1 -1
- package/dist/materials/guide-introduction.md +4 -2
- package/dist/materials/guide-layout.md +39 -10
- package/dist/materials/guide-motion.md +69 -0
- package/dist/materials/guide-skills.md +9 -0
- package/dist/materials/recipe-collection-views.md +648 -0
- package/dist/materials/recipe-command-palette.md +31 -52
- package/dist/materials/recipe-filter-bar.md +12 -3
- package/dist/materials/recipe-grouped-form.md +5 -0
- package/dist/materials/recipe-navigation-workspace.md +222 -0
- package/dist/materials/recipe-record-management.md +296 -0
- package/dist/materials/recipe-record-workspace.md +207 -0
- package/dist/materials/recipe-settings-workspace.md +232 -0
- package/dist/materials/token-sys.color.context.base.action-disabled.json +41 -0
- package/dist/materials/token-sys.color.context.base.action-hover.json +41 -0
- package/dist/materials/token-sys.color.context.base.action-pressed.json +41 -0
- package/dist/materials/token-sys.color.context.base.action-rest.json +41 -0
- package/dist/materials/token-sys.color.context.base.avatar-background.json +41 -0
- package/dist/materials/token-sys.color.context.base.border-decorative.json +41 -0
- package/dist/materials/token-sys.color.context.base.divider-decorative.json +41 -0
- package/dist/materials/token-sys.color.context.base.field-background.json +41 -0
- package/dist/materials/token-sys.color.context.base.field-border.json +41 -0
- package/dist/materials/token-sys.color.context.base.field-disabled.json +41 -0
- package/dist/materials/token-sys.color.context.base.field-readonly.json +41 -0
- package/dist/materials/token-sys.color.context.base.indicator-track.json +41 -0
- package/dist/materials/token-sys.color.context.base.loading-placeholder.json +41 -0
- package/dist/materials/token-sys.color.context.base.muted-background.json +41 -0
- package/dist/materials/token-sys.color.context.base.on-surface-action-disabled.json +41 -0
- package/dist/materials/token-sys.color.context.base.on-surface-action-hover.json +41 -0
- package/dist/materials/token-sys.color.context.base.on-surface-action-pressed.json +41 -0
- package/dist/materials/token-sys.color.context.base.on-surface-action-rest.json +41 -0
- package/dist/materials/token-sys.color.context.base.selection-background.json +41 -0
- package/dist/materials/token-sys.color.context.base.supporting-background.json +41 -0
- package/dist/materials/token-sys.color.context.filled.action-disabled.json +41 -0
- package/dist/materials/token-sys.color.context.filled.action-hover.json +41 -0
- package/dist/materials/token-sys.color.context.filled.action-pressed.json +41 -0
- package/dist/materials/token-sys.color.context.filled.action-rest.json +41 -0
- package/dist/materials/token-sys.color.context.filled.avatar-background.json +41 -0
- package/dist/materials/token-sys.color.context.filled.border-decorative.json +41 -0
- package/dist/materials/token-sys.color.context.filled.divider-decorative.json +41 -0
- package/dist/materials/token-sys.color.context.filled.field-background.json +41 -0
- package/dist/materials/token-sys.color.context.filled.field-border.json +41 -0
- package/dist/materials/token-sys.color.context.filled.field-disabled.json +41 -0
- package/dist/materials/token-sys.color.context.filled.field-readonly.json +41 -0
- package/dist/materials/token-sys.color.context.filled.indicator-track.json +41 -0
- package/dist/materials/token-sys.color.context.filled.loading-placeholder.json +41 -0
- package/dist/materials/token-sys.color.context.filled.muted-background.json +41 -0
- package/dist/materials/token-sys.color.context.filled.selection-background.json +41 -0
- package/dist/materials/token-sys.color.context.filled.supporting-background.json +41 -0
- package/dist/materials/token-sys.color.field.readonly.json +41 -0
- package/dist/materials/token-sys.color.surface.avatar.json +41 -0
- package/dist/materials/token-sys.color.surface.current.json +41 -0
- package/dist/materials/token-sys.color.surface.muted.json +41 -0
- package/dist/materials/token-sys.color.surface.supporting.json +41 -0
- package/dist/materials/token-sys.motion.distance-panel.json +36 -0
- package/dist/materials/token-sys.motion.distance-small.json +36 -0
- package/dist/materials/token-sys.motion.duration-enter.json +36 -0
- package/dist/materials/token-sys.motion.duration-exit.json +36 -0
- package/dist/materials/token-sys.motion.duration-layer.json +36 -0
- package/dist/materials/token-sys.motion.duration-loop.json +36 -0
- package/dist/materials/token-sys.motion.duration-press.json +36 -0
- package/dist/materials/token-sys.motion.easing-enter.json +38 -0
- package/dist/materials/token-sys.motion.easing-exit.json +38 -0
- package/knowledge.json +115 -2
- package/manifest.json +11 -1
- package/package.json +9 -3
- package/references/component-families.md +146 -0
- package/references/composition.md +4 -4
- package/references/customization.md +14 -0
- package/references/flood-composition/SKILL.md +4 -0
- package/references/flood-data-display/SKILL.md +117 -0
- package/references/flood-feedback/SKILL.md +25 -0
- package/references/flood-forms/SKILL.md +31 -0
- package/references/flood-foundations/SKILL.md +36 -0
- package/references/flood-hierarchy/SKILL.md +23 -7
- package/references/flood-interface-content/SKILL.md +26 -5
- package/references/flood-motion/SKILL.md +44 -0
- package/references/flood-navigation/SKILL.md +195 -0
- package/references/flood-overlays/SKILL.md +35 -0
- package/references/flood-records/SKILL.md +42 -2
- package/references/flood-spacing/SKILL.md +38 -0
- package/references/flood-verification/SKILL.md +20 -0
- package/references/interface-content-examples.md +4 -0
- package/references/rendered-review.md +5 -0
- package/references/spacing.md +30 -0
- package/rules.json +94 -8
- package/workflows.json +28 -3
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
# Record workspace
|
|
2
|
+
|
|
3
|
+
[Open the working composition](/playground/content#record-workspace).
|
|
4
|
+
|
|
5
|
+
This host-owned example combines a common page header, native destination links,
|
|
6
|
+
filters, applied tags, dataset selection, confirmation and a resizable editor.
|
|
7
|
+
It uses the same typed source in the playground and this document. It adds no
|
|
8
|
+
AppShell, FilterBar or persistence import to the library.
|
|
9
|
+
|
|
10
|
+
## Data and lifecycle ownership
|
|
11
|
+
|
|
12
|
+
The example starts with an empty collection when its key is absent. It never
|
|
13
|
+
replaces a malformed or unreadable collection with sample records. A failed read
|
|
14
|
+
blocks writes and offers retry, an export of the available raw snapshot and an
|
|
15
|
+
explicit replacement confirmation. Replacing records is a user action, not an
|
|
16
|
+
automatic recovery routine. Mount a separate instance/key for another collection.
|
|
17
|
+
|
|
18
|
+
A failed write retains accepted records and the current draft. Explicit Cancel
|
|
19
|
+
abandons that draft and its save error. Opening another record or destination with
|
|
20
|
+
edits requires confirmation. The collection's unresolved read error has a separate
|
|
21
|
+
lifetime. The example's local storage is a host adapter, not a recommended backend
|
|
22
|
+
for a production service or a guarantee of durable backups.
|
|
23
|
+
|
|
24
|
+
## Query and selection scope
|
|
25
|
+
|
|
26
|
+
The default loader filters/sorts a local snapshot, then returns one page through
|
|
27
|
+
the same async boundary as a remote loader. DataTable uses server paginationMode
|
|
28
|
+
and never slices that page again. An AbortController and request generation
|
|
29
|
+
discard late responses. Changing a filter resets the page and selection. Sorting
|
|
30
|
+
resets the page; selection retains its IDs. The current page's checkbox selects
|
|
31
|
+
only those rows. Bulk confirmation captures the proposed IDs before applying
|
|
32
|
+
the operation, and a failed write leaves that selection available for retry.
|
|
33
|
+
|
|
34
|
+
Injecting a real loader requires validating its payload and supplying a coherent
|
|
35
|
+
total/page result. Transport, permissions, reconciliation with other writers,
|
|
36
|
+
authorization and production data durability remain host responsibilities.
|
|
37
|
+
|
|
38
|
+
## Composition and geometry
|
|
39
|
+
|
|
40
|
+
NavigationList owns destinations, Grid/Stack own the shell and shared field
|
|
41
|
+
tracks, and the header stays at the same top anchor in short and long views.
|
|
42
|
+
The pane separator uses ResizablePanels when the workspace has room; narrower
|
|
43
|
+
containers stack the navigation and editor with existing Grid/Stack owners. Table/DataTable keep dense horizontal
|
|
44
|
+
overflow in their own region. The editor's Grid can reduce its track count with
|
|
45
|
+
enlarged text; label gaps still come from Field. No centering wrapper or bespoke
|
|
46
|
+
input/status/progress implementation repairs the layout.
|
|
47
|
+
|
|
48
|
+
```tsx
|
|
49
|
+
"use client";
|
|
50
|
+
import {useEffect,useMemo,useRef,useState,type FormEvent} from "react";
|
|
51
|
+
import {Alert,AlertDialog,Button,DataTable,EmptyState,Field,Fieldset,Grid,Heading,Inline,Input,Metric,NavigationList,
|
|
52
|
+
ResizablePanels,SearchInput,Select,Stack,StatusIndicator,Surface,Tag,Text,Toolbar,
|
|
53
|
+
type DataTableSort} from "@flood-md/react";
|
|
54
|
+
|
|
55
|
+
export interface ProjectRecord {id:string; name:string; owner:string; status:"active"|"archived";}
|
|
56
|
+
type Store=Pick<Storage,"getItem"|"setItem">;
|
|
57
|
+
type Collection={state:"ready";records:ProjectRecord[]}|{state:"error";records:ProjectRecord[];raw:string|null;message:string};
|
|
58
|
+
type Draft={record:ProjectRecord;initial:ProjectRecord|null;error?:string};
|
|
59
|
+
export interface ProjectPage {rows:ProjectRecord[];total:number;}
|
|
60
|
+
export interface ProjectQuery {records:readonly ProjectRecord[];search:string;status:string;page:number;pageSize:number;sort:DataTableSort|null;signal:AbortSignal;}
|
|
61
|
+
export type ProjectPageLoader=(query:ProjectQuery)=>Promise<ProjectPage>;
|
|
62
|
+
export interface RecordWorkspaceProps {storageKey?:string;storage?:Store;loadPage?:ProjectPageLoader;}
|
|
63
|
+
|
|
64
|
+
/** Host-owned schema. A bad read never becomes fixtures or a successful empty read. */
|
|
65
|
+
export function readProjectCollection(key:string,storage?:Store):Collection {
|
|
66
|
+
let raw:string|null=null;
|
|
67
|
+
try{
|
|
68
|
+
if(!storage&&typeof window==="undefined")return {state:"ready",records:[]};
|
|
69
|
+
raw=(storage??window.localStorage).getItem(key);
|
|
70
|
+
if(raw===null)return {state:"ready",records:[]};
|
|
71
|
+
const data:unknown=JSON.parse(raw);
|
|
72
|
+
if(!data||typeof data!=="object"||!("version"in data)||data.version!==1||!("records"in data)||!Array.isArray(data.records))throw Error("schema");
|
|
73
|
+
const ids=new Set<string>();
|
|
74
|
+
const records=data.records.map((record:unknown):ProjectRecord=>{
|
|
75
|
+
if(!record||typeof record!=="object"||!("id"in record)||typeof record.id!=="string"||!record.id.trim()||ids.has(record.id)||
|
|
76
|
+
!("name"in record)||typeof record.name!=="string"||!record.name.trim()||!("owner"in record)||typeof record.owner!=="string"||
|
|
77
|
+
!("status"in record)||(record.status!=="active"&&record.status!=="archived"))throw Error("schema");
|
|
78
|
+
ids.add(record.id);return {id:record.id,name:record.name,owner:record.owner,status:record.status};
|
|
79
|
+
});
|
|
80
|
+
return {state:"ready",records};
|
|
81
|
+
}catch{return {state:"error",records:[],raw,message:"Projects could not be read."};}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** The example's local adapter has the same boundary as a remote page loader. */
|
|
85
|
+
const localPage:ProjectPageLoader=async({records,search,status,page,pageSize,sort,signal})=>{
|
|
86
|
+
if(signal.aborted)throw new DOMException("Aborted","AbortError");
|
|
87
|
+
const filtered=records.filter(record=>(status==="all"||record.status===status)&&[record.name,record.owner].join(" ").toLocaleLowerCase().includes(search.toLocaleLowerCase()));
|
|
88
|
+
const sorted=sort?[...filtered].sort((a,b)=>a.name.localeCompare(b.name,undefined,{numeric:true})*(sort.direction==="ascending"?1:-1)):filtered;
|
|
89
|
+
return {rows:sorted.slice((page-1)*pageSize,page*pageSize),total:sorted.length};
|
|
90
|
+
};
|
|
91
|
+
const route=()=>typeof window!=="undefined"&&window.location.hash==="#record-workspace/overview"?"overview":"records";
|
|
92
|
+
|
|
93
|
+
/** Working host composition, not another library AppShell or persistence API. */
|
|
94
|
+
export function RecordWorkspace({storageKey="flood-recipe-projects-v1",storage,loadPage=localPage}:RecordWorkspaceProps){
|
|
95
|
+
const [collection,setCollection]=useState(()=>readProjectCollection(storageKey,storage));
|
|
96
|
+
const [view,setView]=useState(route),[search,setSearch]=useState(""),[status,setStatus]=useState("all"),[page,setPage]=useState(1),[sort,setSort]=useState<DataTableSort|null>(null);
|
|
97
|
+
const [selected,setSelected]=useState<string[]>([]),[draft,setDraft]=useState<Draft|null>(null),[revision,setRevision]=useState(0),[retry,setRetry]=useState(0);
|
|
98
|
+
const [response,setResponse]=useState<{key:string;page:ProjectPage;error?:string}|null>(null);
|
|
99
|
+
const loader = useRef(loadPage);
|
|
100
|
+
useEffect(() => { loader.current = loadPage; }, [loadPage]);
|
|
101
|
+
const [operationError,setOperationError]=useState("");
|
|
102
|
+
const [confirmation,setConfirmation]=useState<{kind:"replace"}|{kind:"delete";ids:string[]}|{kind:"leave";next:()=>void}|null>(null);
|
|
103
|
+
const workspace=useRef<HTMLElement>(null),[wide,setWide]=useState(false);
|
|
104
|
+
useEffect(()=>{const node=workspace.current;if(!node)return;const view=node.ownerDocument.defaultView!;const update=()=>setWide(node.getBoundingClientRect().width>=56*parseFloat(view.getComputedStyle(node.ownerDocument.documentElement).fontSize));update();const observer=new ResizeObserver(update);observer.observe(node);return()=>observer.disconnect();},[]);
|
|
105
|
+
const generation=useRef(0),name=useRef<HTMLInputElement>(null),[split,setSplit]=useState(58);
|
|
106
|
+
const records=collection.records,pageSize=5;
|
|
107
|
+
const key=JSON.stringify({search,status,page,sort,revision,retry});
|
|
108
|
+
const dirty=Boolean(draft&&(draft.initial?JSON.stringify(draft.record)!==JSON.stringify(draft.initial):draft.record.name||draft.record.owner||draft.record.status!=="active"));
|
|
109
|
+
useEffect(()=>{const update=()=>setView(route());window.addEventListener("hashchange",update);return()=>window.removeEventListener("hashchange",update);},[]);
|
|
110
|
+
useEffect(()=>{
|
|
111
|
+
if(collection.state!=="ready")return;
|
|
112
|
+
const controller=new AbortController(),ticket=++generation.current;
|
|
113
|
+
// A new callback identity alone does not invalidate a settled query.
|
|
114
|
+
void loader.current({records,search,status,page,pageSize,sort,signal:controller.signal}).then(result=>{
|
|
115
|
+
if(controller.signal.aborted||generation.current!==ticket)return;
|
|
116
|
+
const maxPage=Math.max(1,Math.ceil(result.total/pageSize));
|
|
117
|
+
if(page>maxPage){setPage(maxPage);return;}
|
|
118
|
+
setResponse({key,page:result});
|
|
119
|
+
}).catch(()=>{if(!controller.signal.aborted&&generation.current===ticket)setResponse({key,page:{rows:[],total:0},error:"Projects could not be loaded."});});
|
|
120
|
+
return()=>{controller.abort();};
|
|
121
|
+
},[key,records,collection.state]);
|
|
122
|
+
useEffect(()=>{if(draft)name.current?.focus({preventScroll:true});},[draft?.record.id]);
|
|
123
|
+
const current=response?.key===key?response:null,state=current?.error?"error":current?"ready":"loading";
|
|
124
|
+
const result=current?.page??{rows:[],total:response?.page.total??0};
|
|
125
|
+
const updateFilter=(nextSearch:string,nextStatus:string)=>{setSearch(nextSearch);setStatus(nextStatus);setPage(1);setSelected([]);};
|
|
126
|
+
const leave=(next:()=>void)=>{if(dirty)setConfirmation({kind:"leave",next});else{setDraft(null);next();}};
|
|
127
|
+
function persist(next:ProjectRecord[]){
|
|
128
|
+
if(collection.state!=="ready")return false;
|
|
129
|
+
try{(storage??window.localStorage).setItem(storageKey,JSON.stringify({version:1,records:next}));setCollection({state:"ready",records:next});setRevision(value=>value+1);setOperationError("");return true;}
|
|
130
|
+
catch{return false;}
|
|
131
|
+
}
|
|
132
|
+
function save(event:FormEvent<HTMLFormElement>){
|
|
133
|
+
event.preventDefault();if(!draft||collection.state!=="ready")return;
|
|
134
|
+
if(!draft.record.name.trim()){name.current?.setCustomValidity("Enter a project name.");name.current?.reportValidity();return;}
|
|
135
|
+
const record={...draft.record,name:draft.record.name.trim()},next=draft.initial?records.map(old=>old.id===record.id?record:old):[...records,record];
|
|
136
|
+
if(persist(next)){setDraft(null);setSelected(ids=>ids.filter(id=>next.some(record=>record.id===id)));}
|
|
137
|
+
else setDraft({...draft,error:"Changes could not be saved. Try again."});
|
|
138
|
+
}
|
|
139
|
+
function confirm(){
|
|
140
|
+
const pending=confirmation;setConfirmation(null);if(!pending)return;
|
|
141
|
+
if(pending.kind==="leave"){setDraft(null);pending.next();}
|
|
142
|
+
else if(pending.kind==="delete"){
|
|
143
|
+
const proposal=new Set(pending.ids),next=records.filter(record=>!proposal.has(record.id));
|
|
144
|
+
if(persist(next)){setSelected([]);if(draft&&proposal.has(draft.record.id))setDraft(null);}
|
|
145
|
+
else setOperationError("Projects could not be deleted. Try again.");
|
|
146
|
+
}else{
|
|
147
|
+
try{(storage??window.localStorage).setItem(storageKey,JSON.stringify({version:1,records:[]}));setCollection({state:"ready",records:[]});setDraft(null);setSelected([]);setPage(1);setRevision(value=>value+1);setOperationError("");}
|
|
148
|
+
catch{setOperationError("The saved collection could not be replaced.");}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
function exportRecovery(){
|
|
152
|
+
if(collection.state!=="error"||collection.raw===null)return;
|
|
153
|
+
try{const url=URL.createObjectURL(new Blob([collection.raw],{type:"application/json"})),anchor=document.createElement("a");anchor.href=url;anchor.download="projects-recovery.json";anchor.click();setTimeout(()=>URL.revokeObjectURL(url),0);}
|
|
154
|
+
catch{setOperationError("The recovery snapshot could not be exported.");}
|
|
155
|
+
}
|
|
156
|
+
const editor=draft?<Surface padding="6"><form onSubmit={save}><Stack gap="6">
|
|
157
|
+
<Heading level={3} size="section">{draft.initial?"Edit project":"New project"}</Heading>
|
|
158
|
+
<Fieldset legend="Project details" hideLabel><Grid minItemWidth="12rem" gap="6">
|
|
159
|
+
<div style={{gridColumn:"1 / -1"}}><Field label="Project name" required>{props=><Input {...props} ref={name} name="name" value={draft.record.name} onChange={event=>{event.currentTarget.setCustomValidity("");setDraft({...draft,record:{...draft.record,name:event.target.value}});}}/>}</Field></div>
|
|
160
|
+
<Field label="Owner">{props=><Input {...props} name="owner" value={draft.record.owner} onChange={event=>setDraft({...draft,record:{...draft.record,owner:event.target.value}})}/>}</Field>
|
|
161
|
+
<Field label="Status">{props=><Select {...props} name="status" value={draft.record.status} onChange={event=>setDraft({...draft,record:{...draft.record,status:event.target.value as ProjectRecord["status"]}})}><option value="active">Active</option><option value="archived">Archived</option></Select>}</Field>
|
|
162
|
+
</Grid></Fieldset>
|
|
163
|
+
{draft.error&&<Alert tone="error" announcement="polite">{draft.error}</Alert>}
|
|
164
|
+
<Inline gap="3"><Button type="submit">Save project</Button><Button variant="subtle" onClick={()=>setDraft(null)}>Cancel</Button></Inline>
|
|
165
|
+
</Stack></form></Surface>:null;
|
|
166
|
+
const table=<Stack gap="6">
|
|
167
|
+
<Grid minItemWidth="12rem" gap="4">
|
|
168
|
+
<Field label="Search projects">{props=><SearchInput {...props} value={search} onChange={event=>updateFilter(event.target.value,status)} clearLabel="Clear search"/>}</Field>
|
|
169
|
+
<Field label="Status">{props=><Select {...props} value={status} onChange={event=>updateFilter(search,event.target.value)}><option value="all">All statuses</option><option value="active">Active</option><option value="archived">Archived</option></Select>}</Field>
|
|
170
|
+
</Grid>
|
|
171
|
+
{(search||status!=="all")&&<Inline gap="2">{search&&<Tag onRemove={()=>updateFilter("",status)} removeLabel="Remove search filter">{search}</Tag>}{status!=="all"&&<Tag onRemove={()=>updateFilter(search,"all")} removeLabel="Remove status filter">{status==="active"?"Active":"Archived"}</Tag>}<Button variant="ghost" size="sm" onClick={()=>updateFilter("","all")}>Clear filters</Button></Inline>}
|
|
172
|
+
{selected.length>0&&<Toolbar label="Selected projects"><Text size="compact">{selected.length} selected</Text><Button variant="subtle" size="sm" tone="danger" onClick={()=>setConfirmation({kind:"delete",ids:[...selected]})}>Delete selected</Button><Button variant="ghost" size="sm" onClick={()=>setSelected([])}>Clear selection</Button></Toolbar>}
|
|
173
|
+
{operationError&&<Alert tone="error" announcement="polite">{operationError}</Alert>}
|
|
174
|
+
{state==="ready"&&!result.total&&!search&&status==="all"?<EmptyState title="No projects"/>:<DataTable caption="Projects" hideCaption paginationMode="server" page={page} pageSize={pageSize} totalRows={result.total}
|
|
175
|
+
sort={sort} onSortChange={next=>{setSort(next);setPage(1);}} onPageChange={setPage} state={state} onRetry={()=>setRetry(value=>value+1)}
|
|
176
|
+
selectable selectionScope="dataset" selectedIds={selected} onSelectionChange={setSelected} minWidth="32rem"
|
|
177
|
+
labels={{empty:"No matching projects.",error:"Projects could not be loaded."}}
|
|
178
|
+
columns={[{id:"name",label:"Project",sortable:true},{id:"owner",label:"Owner"},{id:"state",label:"Status"},{id:"actions",label:"Actions",align:"end"}]}
|
|
179
|
+
rows={result.rows.map(record=>({id:record.id,label:record.name,cells:{name:record.name,owner:record.owner||"—",state:<StatusIndicator label={record.status==="active"?"Active":"Archived"} tone={record.status==="active"?"success":"neutral"}/>,actions:<Button variant="subtle" size="sm" onClick={()=>leave(()=>setDraft({record:{...record},initial:{...record}}))}>Edit</Button>}}))}/>}
|
|
180
|
+
</Stack>;
|
|
181
|
+
const overview=useMemo(()=>records.reduce((totals,record)=>({...totals,[record.status]:totals[record.status]+1}),{active:0,archived:0}),[records]);
|
|
182
|
+
const navigate=(href:string)=>(event:React.MouseEvent<HTMLAnchorElement>)=>{if(event.button||event.ctrlKey||event.metaKey||event.shiftKey||event.altKey)return;if(dirty){event.preventDefault();leave(()=>{window.location.hash=href;});}};
|
|
183
|
+
return <section ref={workspace} aria-label="Project workspace"><Grid gap="6" style={{gridTemplateColumns:wide?"minmax(8rem, 12rem) minmax(0, 1fr)":"minmax(0, 1fr)",alignItems:"start"}}>
|
|
184
|
+
<NavigationList label="Project navigation" currentValue={view} items={[{value:"records",label:"Projects",href:"#record-workspace/records",linkProps:{onClick:navigate("#record-workspace/records")}},{value:"overview",label:"Overview",href:"#record-workspace/overview",linkProps:{onClick:navigate("#record-workspace/overview")}}]}/>
|
|
185
|
+
<Stack gap="6" style={{minWidth:0,marginBlock:0}}>
|
|
186
|
+
<Inline align="center" gap="4" style={{justifyContent:"space-between",minBlockSize:"2.5rem"}}><Heading level={2} size="page">{view==="records"?"Projects":"Overview"}</Heading>
|
|
187
|
+
{collection.state==="ready"&&<Button onClick={()=>leave(()=>setDraft({record:{id:crypto.randomUUID(),name:"",owner:"",status:"active"},initial:null}))}>New project</Button>}</Inline>
|
|
188
|
+
{collection.state==="error"?<Stack gap="4"><Alert tone="error">{collection.message}</Alert><Inline gap="3"><Button onClick={()=>{setCollection(readProjectCollection(storageKey,storage));setOperationError("");}}>Retry reading</Button>{collection.raw!==null&&<Button variant="subtle" onClick={exportRecovery}>Export recovery snapshot</Button>}<Button variant="subtle" tone="danger" onClick={()=>setConfirmation({kind:"replace"})}>Replace collection</Button></Inline>{operationError&&<Alert tone="error">{operationError}</Alert>}</Stack>:
|
|
189
|
+
view==="overview"?<Grid minItemWidth="12rem" gap="4"><Surface padding="6"><Metric label="Active projects" value={overview.active}/></Surface><Surface padding="6"><Metric label="Archived projects" value={overview.archived}/></Surface></Grid>:
|
|
190
|
+
draft?(wide?<ResizablePanels label="Projects and editor" main={table} secondary={editor} value={split} onValueChange={setSplit} min={35} max={70}/>:<Stack gap="6">{table}{editor}</Stack>):table}
|
|
191
|
+
</Stack>
|
|
192
|
+
{confirmation&&<AlertDialog title={confirmation.kind==="replace"?"Replace unreadable records?":confirmation.kind==="delete"?"Delete selected projects?":"Discard changes?"}
|
|
193
|
+
description={confirmation.kind==="replace"?"The saved snapshot will be replaced with an empty collection. Export it before continuing if available.":confirmation.kind==="delete"?`${confirmation.ids.length} selected projects will be removed from this collection.`:"Your edits to this project will be lost."}
|
|
194
|
+
open trigger={()=>null} confirmLabel={confirmation.kind==="replace"?"Replace":confirmation.kind==="delete"?"Delete projects":"Discard changes"} cancelLabel="Keep working"
|
|
195
|
+
onConfirm={confirm} onCancel={()=>setConfirmation(null)} onOpenChange={next=>{if(!next)setConfirmation(null);}}/>}
|
|
196
|
+
</Grid></section>;
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## Verification boundaries
|
|
201
|
+
|
|
202
|
+
Exercise missing/read-failed/malformed/write-failed storage, retry, explicit
|
|
203
|
+
replacement, failed save → Cancel → reopen, native required validation, paging,
|
|
204
|
+
sorting, late response rejection, captured bulk IDs, browser back/forward and
|
|
205
|
+
1280/1440 widths with 16px/24px root text. Test the last action in each scroll
|
|
206
|
+
owner. A fixture's schema or a quiet observer result is not a complete UX,
|
|
207
|
+
accessibility or remote-service certification.
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
# Settings workspace
|
|
2
|
+
|
|
3
|
+
[Open the working composition](/playground/settings).
|
|
4
|
+
|
|
5
|
+
Use a settings page when a person needs to review and change several related
|
|
6
|
+
preferences together. This example groups workspace details and notifications
|
|
7
|
+
in one form with a single save boundary. Fieldset names the groups, Field
|
|
8
|
+
associates labels and errors, and Grid lets related fields share tracks when
|
|
9
|
+
there is room. Use a standalone form control for a preference that should
|
|
10
|
+
apply immediately and has no shared save boundary.
|
|
11
|
+
|
|
12
|
+
## Save and discard
|
|
13
|
+
|
|
14
|
+
The host keeps a draft and the last accepted snapshot. Save validates the
|
|
15
|
+
workspace name, focuses its input if invalid and writes the full proposal
|
|
16
|
+
before announcing success. A write failure leaves the draft available for
|
|
17
|
+
retry. Discard restores the accepted snapshot and moves focus back to the first
|
|
18
|
+
field. Keep the save control available after success so a focused submit
|
|
19
|
+
button stays in the tab order.
|
|
20
|
+
|
|
21
|
+
This playground uses a dedicated browser storage key. The first visit starts
|
|
22
|
+
with defaults. If a saved snapshot cannot be read or parsed, show a retry
|
|
23
|
+
action and leave that snapshot intact. Use the host's actual persistence and
|
|
24
|
+
permission model when adapting the recipe.
|
|
25
|
+
|
|
26
|
+
## Source
|
|
27
|
+
|
|
28
|
+
```tsx
|
|
29
|
+
"use client";
|
|
30
|
+
|
|
31
|
+
import { useEffect, useRef, useState, type FormEvent } from "react";
|
|
32
|
+
import {
|
|
33
|
+
Alert, Button, Container, Field, Fieldset, Grid, Heading, Inline,
|
|
34
|
+
Input, Select, Stack, Surface, Switch, Text,
|
|
35
|
+
} from "@flood-md/react";
|
|
36
|
+
import "./settings-workspace.css";
|
|
37
|
+
|
|
38
|
+
const storageKey = "flood:settings-workspace:v1";
|
|
39
|
+
const timeZones = ["UTC", "Europe/London", "America/New_York", "Asia/Tokyo"] as const;
|
|
40
|
+
const maxNameLength = 80;
|
|
41
|
+
type TimeZone = typeof timeZones[number];
|
|
42
|
+
|
|
43
|
+
interface WorkspaceSettings {
|
|
44
|
+
name: string;
|
|
45
|
+
timeZone: TimeZone;
|
|
46
|
+
assignmentAlerts: boolean;
|
|
47
|
+
weeklyDigest: boolean;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const defaults: WorkspaceSettings = {
|
|
51
|
+
name: "Studio North",
|
|
52
|
+
timeZone: "UTC",
|
|
53
|
+
assignmentAlerts: true,
|
|
54
|
+
weeklyDigest: false,
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
function isTimeZone(value: unknown): value is TimeZone {
|
|
58
|
+
return timeZones.some(timeZone => timeZone === value);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function readSettings(): WorkspaceSettings {
|
|
62
|
+
const snapshot = window.localStorage.getItem(storageKey);
|
|
63
|
+
if (snapshot === null) return defaults;
|
|
64
|
+
const value: unknown = JSON.parse(snapshot);
|
|
65
|
+
if (
|
|
66
|
+
typeof value === "object" && value !== null &&
|
|
67
|
+
"name" in value && typeof value.name === "string" && value.name.trim() &&
|
|
68
|
+
value.name.length <= maxNameLength &&
|
|
69
|
+
"timeZone" in value && isTimeZone(value.timeZone) &&
|
|
70
|
+
"assignmentAlerts" in value && typeof value.assignmentAlerts === "boolean" &&
|
|
71
|
+
"weeklyDigest" in value && typeof value.weeklyDigest === "boolean"
|
|
72
|
+
) {
|
|
73
|
+
return {
|
|
74
|
+
name: value.name,
|
|
75
|
+
timeZone: value.timeZone,
|
|
76
|
+
assignmentAlerts: value.assignmentAlerts,
|
|
77
|
+
weeklyDigest: value.weeklyDigest,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
throw new Error("Invalid workspace settings");
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function SettingsWorkspace() {
|
|
84
|
+
const [accepted, setAccepted] = useState<WorkspaceSettings | null>(null);
|
|
85
|
+
const [draft, setDraft] = useState(defaults);
|
|
86
|
+
const [readError, setReadError] = useState(false);
|
|
87
|
+
const [nameError, setNameError] = useState("");
|
|
88
|
+
const [saveError, setSaveError] = useState("");
|
|
89
|
+
const [notice, setNotice] = useState("");
|
|
90
|
+
const nameInput = useRef<HTMLInputElement>(null);
|
|
91
|
+
|
|
92
|
+
function load() {
|
|
93
|
+
try {
|
|
94
|
+
const settings = readSettings();
|
|
95
|
+
setAccepted(settings);
|
|
96
|
+
setDraft(settings);
|
|
97
|
+
setReadError(false);
|
|
98
|
+
} catch {
|
|
99
|
+
setReadError(true);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
useEffect(load, []);
|
|
104
|
+
|
|
105
|
+
const dirty = accepted !== null && (
|
|
106
|
+
draft.name !== accepted.name || draft.timeZone !== accepted.timeZone ||
|
|
107
|
+
draft.assignmentAlerts !== accepted.assignmentAlerts || draft.weeklyDigest !== accepted.weeklyDigest
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
function update<K extends keyof WorkspaceSettings>(key: K, value: WorkspaceSettings[K]) {
|
|
111
|
+
setDraft(current => ({ ...current, [key]: value }));
|
|
112
|
+
setNotice("");
|
|
113
|
+
if (key === "name") setNameError("");
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function save(event: FormEvent<HTMLFormElement>) {
|
|
117
|
+
event.preventDefault();
|
|
118
|
+
if (!accepted) return;
|
|
119
|
+
const name = draft.name.trim();
|
|
120
|
+
if (!name) {
|
|
121
|
+
setNameError("Enter a workspace name.");
|
|
122
|
+
nameInput.current?.focus();
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
const proposal = { ...draft, name };
|
|
126
|
+
try {
|
|
127
|
+
window.localStorage.setItem(storageKey, JSON.stringify(proposal));
|
|
128
|
+
} catch {
|
|
129
|
+
setSaveError("Settings could not be saved. Try again.");
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
setAccepted(proposal);
|
|
133
|
+
setDraft(proposal);
|
|
134
|
+
setNameError("");
|
|
135
|
+
setSaveError("");
|
|
136
|
+
setNotice("Settings saved.");
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function reset() {
|
|
140
|
+
if (!accepted) return;
|
|
141
|
+
setDraft(accepted);
|
|
142
|
+
setNameError("");
|
|
143
|
+
setSaveError("");
|
|
144
|
+
setNotice("Unsaved changes discarded.");
|
|
145
|
+
nameInput.current?.focus({ preventScroll: true });
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
return (
|
|
149
|
+
<Container size="md" gutter="4">
|
|
150
|
+
<Stack gap="6">
|
|
151
|
+
<Heading level={1} size="page">Workspace settings</Heading>
|
|
152
|
+
{readError ? (
|
|
153
|
+
<Stack gap="4">
|
|
154
|
+
<Alert tone="error" announcement="polite">Settings could not be loaded.</Alert>
|
|
155
|
+
<Inline><Button variant="subtle" onClick={load}>Retry</Button></Inline>
|
|
156
|
+
</Stack>
|
|
157
|
+
) : accepted ? (
|
|
158
|
+
<Surface padding="6" elevation="raised">
|
|
159
|
+
<form aria-label="Workspace settings" onSubmit={save} noValidate>
|
|
160
|
+
<Stack gap="6">
|
|
161
|
+
<Fieldset legend="General" legendSize="section">
|
|
162
|
+
<Grid minItemWidth="14rem" gap="4">
|
|
163
|
+
<Field label="Workspace name" required error={nameError}>
|
|
164
|
+
{props => (
|
|
165
|
+
<Input {...props} ref={nameInput} name="name" maxLength={maxNameLength}
|
|
166
|
+
value={draft.name} onChange={event => update("name", event.currentTarget.value)} />
|
|
167
|
+
)}
|
|
168
|
+
</Field>
|
|
169
|
+
<Field label="Time zone">
|
|
170
|
+
{props => (
|
|
171
|
+
<Select {...props} name="timeZone" value={draft.timeZone}
|
|
172
|
+
onChange={event => {
|
|
173
|
+
const value = event.currentTarget.value;
|
|
174
|
+
if (isTimeZone(value)) update("timeZone", value);
|
|
175
|
+
}}>
|
|
176
|
+
{timeZones.map(timeZone => <option key={timeZone}>{timeZone}</option>)}
|
|
177
|
+
</Select>
|
|
178
|
+
)}
|
|
179
|
+
</Field>
|
|
180
|
+
</Grid>
|
|
181
|
+
</Fieldset>
|
|
182
|
+
<Fieldset legend="Notifications" legendSize="section">
|
|
183
|
+
<Stack gap="0" className="settings-switches">
|
|
184
|
+
<Switch className="settings-switch" label="New assignments" name="assignmentAlerts" checked={draft.assignmentAlerts}
|
|
185
|
+
onChange={event => update("assignmentAlerts", event.currentTarget.checked)} />
|
|
186
|
+
<Switch className="settings-switch" label="Weekly summary" name="weeklyDigest" checked={draft.weeklyDigest}
|
|
187
|
+
onChange={event => update("weeklyDigest", event.currentTarget.checked)} />
|
|
188
|
+
</Stack>
|
|
189
|
+
</Fieldset>
|
|
190
|
+
<Stack gap="4">
|
|
191
|
+
{saveError && <Alert tone="error" announcement="polite">{saveError}</Alert>}
|
|
192
|
+
<Inline gap="3">
|
|
193
|
+
<Button type="submit">Save settings</Button>
|
|
194
|
+
<Button variant="subtle" disabled={!dirty} onClick={reset}>Discard changes</Button>
|
|
195
|
+
<Text size="compact" tone="subtle" role="status">{notice}</Text>
|
|
196
|
+
</Inline>
|
|
197
|
+
</Stack>
|
|
198
|
+
</Stack>
|
|
199
|
+
</form>
|
|
200
|
+
</Surface>
|
|
201
|
+
) : <Text role="status">Loading settings…</Text>}
|
|
202
|
+
</Stack>
|
|
203
|
+
</Container>
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
```css
|
|
209
|
+
.settings-switches {
|
|
210
|
+
max-inline-size: 16rem;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.flood-root .settings-switch {
|
|
214
|
+
inline-size: 100%;
|
|
215
|
+
justify-content: space-between;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.settings-switch input {
|
|
219
|
+
flex: none;
|
|
220
|
+
}
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
## Review
|
|
224
|
+
|
|
225
|
+
Check empty-name validation and its focus target, changes across sections,
|
|
226
|
+
discard, persistence after reload and read/write failure. Confirm the form
|
|
227
|
+
stacks at narrow widths and the labels remain readable with enlarged text.
|
|
228
|
+
|
|
229
|
+
Compare the legend with the first switch label, then compare the spacing
|
|
230
|
+
between the two switch labels. The row target already creates pitch. Align
|
|
231
|
+
the tracks at the end of a bounded column and verify that each label still
|
|
232
|
+
pairs clearly with its switch. See [visible weight](../layout.md#review-visible-weight).
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"role": "sys.color.context.base.action-disabled",
|
|
3
|
+
"cssName": "--flood-sys-color-context-base-action-disabled",
|
|
4
|
+
"description": "Canvas-context action-disabled; explicit reset for a nested canvas scope",
|
|
5
|
+
"contexts": [
|
|
6
|
+
{
|
|
7
|
+
"preset": "neutral",
|
|
8
|
+
"theme": "dark",
|
|
9
|
+
"id": "sys.color.context.base.action-disabled",
|
|
10
|
+
"type": "color",
|
|
11
|
+
"cssName": "--flood-sys-color-context-base-action-disabled",
|
|
12
|
+
"description": "Canvas-context action-disabled; explicit reset for a nested canvas scope",
|
|
13
|
+
"status": "experimental",
|
|
14
|
+
"visibility": "public",
|
|
15
|
+
"owner": "foundations",
|
|
16
|
+
"since": "0.2.11",
|
|
17
|
+
"usage": {
|
|
18
|
+
"allowed": [
|
|
19
|
+
"Canvas-context action-disabled; explicit reset for a nested canvas scope"
|
|
20
|
+
],
|
|
21
|
+
"avoid": [
|
|
22
|
+
"Replacing focus, text or semantic feedback colors"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"value": {
|
|
26
|
+
"colorSpace": "srgb",
|
|
27
|
+
"components": [
|
|
28
|
+
0.12941176470588237,
|
|
29
|
+
0.12941176470588237,
|
|
30
|
+
0.12941176470588237
|
|
31
|
+
],
|
|
32
|
+
"alpha": 1
|
|
33
|
+
},
|
|
34
|
+
"alias": "ref.color.neutral.900",
|
|
35
|
+
"dependencies": [
|
|
36
|
+
"ref.color.neutral.900"
|
|
37
|
+
],
|
|
38
|
+
"dependents": []
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"role": "sys.color.context.base.action-hover",
|
|
3
|
+
"cssName": "--flood-sys-color-context-base-action-hover",
|
|
4
|
+
"description": "Canvas-context action-hover; explicit reset for a nested canvas scope",
|
|
5
|
+
"contexts": [
|
|
6
|
+
{
|
|
7
|
+
"preset": "neutral",
|
|
8
|
+
"theme": "dark",
|
|
9
|
+
"id": "sys.color.context.base.action-hover",
|
|
10
|
+
"type": "color",
|
|
11
|
+
"cssName": "--flood-sys-color-context-base-action-hover",
|
|
12
|
+
"description": "Canvas-context action-hover; explicit reset for a nested canvas scope",
|
|
13
|
+
"status": "experimental",
|
|
14
|
+
"visibility": "public",
|
|
15
|
+
"owner": "foundations",
|
|
16
|
+
"since": "0.2.11",
|
|
17
|
+
"usage": {
|
|
18
|
+
"allowed": [
|
|
19
|
+
"Canvas-context action-hover; explicit reset for a nested canvas scope"
|
|
20
|
+
],
|
|
21
|
+
"avoid": [
|
|
22
|
+
"Replacing focus, text or semantic feedback colors"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"value": {
|
|
26
|
+
"colorSpace": "srgb",
|
|
27
|
+
"components": [
|
|
28
|
+
0.1568627450980392,
|
|
29
|
+
0.1568627450980392,
|
|
30
|
+
0.1568627450980392
|
|
31
|
+
],
|
|
32
|
+
"alpha": 1
|
|
33
|
+
},
|
|
34
|
+
"alias": "ref.color.neutral.850",
|
|
35
|
+
"dependencies": [
|
|
36
|
+
"ref.color.neutral.850"
|
|
37
|
+
],
|
|
38
|
+
"dependents": []
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"role": "sys.color.context.base.action-pressed",
|
|
3
|
+
"cssName": "--flood-sys-color-context-base-action-pressed",
|
|
4
|
+
"description": "Canvas-context action-pressed; explicit reset for a nested canvas scope",
|
|
5
|
+
"contexts": [
|
|
6
|
+
{
|
|
7
|
+
"preset": "neutral",
|
|
8
|
+
"theme": "dark",
|
|
9
|
+
"id": "sys.color.context.base.action-pressed",
|
|
10
|
+
"type": "color",
|
|
11
|
+
"cssName": "--flood-sys-color-context-base-action-pressed",
|
|
12
|
+
"description": "Canvas-context action-pressed; explicit reset for a nested canvas scope",
|
|
13
|
+
"status": "experimental",
|
|
14
|
+
"visibility": "public",
|
|
15
|
+
"owner": "foundations",
|
|
16
|
+
"since": "0.2.11",
|
|
17
|
+
"usage": {
|
|
18
|
+
"allowed": [
|
|
19
|
+
"Canvas-context action-pressed; explicit reset for a nested canvas scope"
|
|
20
|
+
],
|
|
21
|
+
"avoid": [
|
|
22
|
+
"Replacing focus, text or semantic feedback colors"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"value": {
|
|
26
|
+
"colorSpace": "srgb",
|
|
27
|
+
"components": [
|
|
28
|
+
0.18823529411764706,
|
|
29
|
+
0.18823529411764706,
|
|
30
|
+
0.18823529411764706
|
|
31
|
+
],
|
|
32
|
+
"alpha": 1
|
|
33
|
+
},
|
|
34
|
+
"alias": "ref.color.neutral.800",
|
|
35
|
+
"dependencies": [
|
|
36
|
+
"ref.color.neutral.800"
|
|
37
|
+
],
|
|
38
|
+
"dependents": []
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"role": "sys.color.context.base.action-rest",
|
|
3
|
+
"cssName": "--flood-sys-color-context-base-action-rest",
|
|
4
|
+
"description": "Canvas-context action-rest; explicit reset for a nested canvas scope",
|
|
5
|
+
"contexts": [
|
|
6
|
+
{
|
|
7
|
+
"preset": "neutral",
|
|
8
|
+
"theme": "dark",
|
|
9
|
+
"id": "sys.color.context.base.action-rest",
|
|
10
|
+
"type": "color",
|
|
11
|
+
"cssName": "--flood-sys-color-context-base-action-rest",
|
|
12
|
+
"description": "Canvas-context action-rest; explicit reset for a nested canvas scope",
|
|
13
|
+
"status": "experimental",
|
|
14
|
+
"visibility": "public",
|
|
15
|
+
"owner": "foundations",
|
|
16
|
+
"since": "0.2.11",
|
|
17
|
+
"usage": {
|
|
18
|
+
"allowed": [
|
|
19
|
+
"Canvas-context action-rest; explicit reset for a nested canvas scope"
|
|
20
|
+
],
|
|
21
|
+
"avoid": [
|
|
22
|
+
"Replacing focus, text or semantic feedback colors"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"value": {
|
|
26
|
+
"colorSpace": "srgb",
|
|
27
|
+
"components": [
|
|
28
|
+
0.12941176470588237,
|
|
29
|
+
0.12941176470588237,
|
|
30
|
+
0.12941176470588237
|
|
31
|
+
],
|
|
32
|
+
"alpha": 1
|
|
33
|
+
},
|
|
34
|
+
"alias": "ref.color.neutral.900",
|
|
35
|
+
"dependencies": [
|
|
36
|
+
"ref.color.neutral.900"
|
|
37
|
+
],
|
|
38
|
+
"dependents": []
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"role": "sys.color.context.base.avatar-background",
|
|
3
|
+
"cssName": "--flood-sys-color-context-base-avatar-background",
|
|
4
|
+
"description": "Canvas avatar-background",
|
|
5
|
+
"contexts": [
|
|
6
|
+
{
|
|
7
|
+
"preset": "neutral",
|
|
8
|
+
"theme": "dark",
|
|
9
|
+
"id": "sys.color.context.base.avatar-background",
|
|
10
|
+
"type": "color",
|
|
11
|
+
"cssName": "--flood-sys-color-context-base-avatar-background",
|
|
12
|
+
"description": "Canvas avatar-background",
|
|
13
|
+
"status": "experimental",
|
|
14
|
+
"visibility": "public",
|
|
15
|
+
"owner": "foundations",
|
|
16
|
+
"since": "0.2.11",
|
|
17
|
+
"usage": {
|
|
18
|
+
"allowed": [
|
|
19
|
+
"Canvas avatar-background"
|
|
20
|
+
],
|
|
21
|
+
"avoid": [
|
|
22
|
+
"Replacing focus, text or semantic feedback colors"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"value": {
|
|
26
|
+
"colorSpace": "srgb",
|
|
27
|
+
"components": [
|
|
28
|
+
0.18823529411764706,
|
|
29
|
+
0.18823529411764706,
|
|
30
|
+
0.18823529411764706
|
|
31
|
+
],
|
|
32
|
+
"alpha": 1
|
|
33
|
+
},
|
|
34
|
+
"alias": "ref.color.neutral.800",
|
|
35
|
+
"dependencies": [
|
|
36
|
+
"ref.color.neutral.800"
|
|
37
|
+
],
|
|
38
|
+
"dependents": []
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|