@aiaiai-pt/design-system 0.3.6 → 0.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/Alert.svelte.d.ts +35 -0
- package/components/Badge.svelte.d.ts +31 -0
- package/components/BottomNav.svelte.d.ts +26 -0
- package/components/BottomNavItem.svelte.d.ts +39 -0
- package/components/Button.svelte.d.ts +58 -0
- package/components/Card.svelte.d.ts +36 -0
- package/components/CardGrid.svelte.d.ts +42 -0
- package/components/Checkbox.svelte.d.ts +33 -0
- package/components/CodeBlock.svelte.d.ts +43 -0
- package/components/CodeEditor.svelte.d.ts +41 -0
- package/components/CollapsibleSection.svelte.d.ts +43 -0
- package/components/Combobox.svelte.d.ts +60 -0
- package/components/CommandPalette.svelte.d.ts +69 -0
- package/components/ConditionTable.svelte.d.ts +61 -0
- package/components/EmptyState.svelte.d.ts +54 -0
- package/components/FileUpload.svelte.d.ts +47 -0
- package/components/FileUploadItem.svelte.d.ts +40 -0
- package/components/FilterBar.svelte.d.ts +62 -0
- package/components/Input.svelte.d.ts +56 -0
- package/components/KeyValue.svelte.d.ts +34 -0
- package/components/Label.svelte.d.ts +29 -0
- package/components/List.svelte.d.ts +36 -0
- package/components/ListItem.svelte.d.ts +46 -0
- package/components/LogViewer.svelte.d.ts +56 -0
- package/components/Menu.svelte.d.ts +44 -0
- package/components/MenuItem.svelte.d.ts +47 -0
- package/components/MenuSeparator.svelte.d.ts +24 -0
- package/components/Modal.svelte.d.ts +46 -0
- package/components/OptionGrid.svelte.d.ts +40 -0
- package/components/PageContainer.svelte.d.ts +45 -0
- package/components/Panel.svelte.d.ts +52 -0
- package/components/Popover.svelte.d.ts +43 -0
- package/components/Progress.svelte.d.ts +29 -0
- package/components/SearchInput.svelte.d.ts +64 -0
- package/components/Select.svelte.d.ts +47 -0
- package/components/Separator.svelte.d.ts +27 -0
- package/components/Sidebar.svelte.d.ts +38 -0
- package/components/SidebarItem.svelte.d.ts +48 -0
- package/components/SidebarSection.svelte.d.ts +23 -0
- package/components/Skeleton.svelte.d.ts +34 -0
- package/components/Status.svelte.d.ts +31 -0
- package/components/Stepper.svelte.d.ts +26 -0
- package/components/Tab.svelte.d.ts +30 -0
- package/components/TabList.svelte.d.ts +25 -0
- package/components/TabPanel.svelte.d.ts +27 -0
- package/components/Tabs.svelte.d.ts +31 -0
- package/components/Tag.svelte.d.ts +29 -0
- package/components/Textarea.svelte.d.ts +42 -0
- package/components/Toast.svelte.d.ts +38 -0
- package/components/Toggle.svelte.d.ts +33 -0
- package/components/index.d.ts +49 -0
- package/package.json +18 -1
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export default FileUpload;
|
|
2
|
+
type FileUpload = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* FileUpload
|
|
8
|
+
*
|
|
9
|
+
* Drag-and-drop file upload zone. Does NOT handle uploads — emits
|
|
10
|
+
* validated File[] to parent via callback. Parent owns upload logic.
|
|
11
|
+
*
|
|
12
|
+
* Consumes --fileupload-* tokens from components.css.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* <FileUpload accept=".pdf,.docx" maxSize={52_428_800} onfiles={(files) => handleFiles(files)}>
|
|
16
|
+
* {#snippet icon()}<PhCloudArrowUp size={32} />{/snippet}
|
|
17
|
+
* </FileUpload>
|
|
18
|
+
*
|
|
19
|
+
* @example Custom content
|
|
20
|
+
* <FileUpload onfiles={handleFiles}>
|
|
21
|
+
* {#snippet children()}
|
|
22
|
+
* <p>Custom drop zone content</p>
|
|
23
|
+
* {/snippet}
|
|
24
|
+
* </FileUpload>
|
|
25
|
+
*/
|
|
26
|
+
declare const FileUpload: import("svelte").Component<{
|
|
27
|
+
accept?: string;
|
|
28
|
+
maxSize?: number;
|
|
29
|
+
multiple?: boolean;
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
onfiles?: any;
|
|
32
|
+
onreject?: any;
|
|
33
|
+
icon?: any;
|
|
34
|
+
children?: any;
|
|
35
|
+
class?: string;
|
|
36
|
+
} & Record<string, any>, {}, "">;
|
|
37
|
+
type $$ComponentProps = {
|
|
38
|
+
accept?: string;
|
|
39
|
+
maxSize?: number;
|
|
40
|
+
multiple?: boolean;
|
|
41
|
+
disabled?: boolean;
|
|
42
|
+
onfiles?: any;
|
|
43
|
+
onreject?: any;
|
|
44
|
+
icon?: any;
|
|
45
|
+
children?: any;
|
|
46
|
+
class?: string;
|
|
47
|
+
} & Record<string, any>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export default FileUploadItem;
|
|
2
|
+
type FileUploadItem = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* FileUploadItem
|
|
8
|
+
*
|
|
9
|
+
* Per-file upload/processing status row. Parent controls all state —
|
|
10
|
+
* this is a pure display component. Uses DS Progress internally.
|
|
11
|
+
*
|
|
12
|
+
* Consumes --fileupload-item-* tokens from components.css.
|
|
13
|
+
*
|
|
14
|
+
* @example Uploading
|
|
15
|
+
* <FileUploadItem name="report.pdf" size={2_400_000} status="uploading" progress={65} />
|
|
16
|
+
*
|
|
17
|
+
* @example Error
|
|
18
|
+
* <FileUploadItem name="data.csv" status="error" error="File exceeds 50 MB limit" onremove={() => {}} />
|
|
19
|
+
*
|
|
20
|
+
* @example Complete
|
|
21
|
+
* <FileUploadItem name="notes.txt" size={1_200} status="complete" />
|
|
22
|
+
*/
|
|
23
|
+
declare const FileUploadItem: import("svelte").Component<{
|
|
24
|
+
name?: string;
|
|
25
|
+
size?: number;
|
|
26
|
+
status?: string;
|
|
27
|
+
progress?: number;
|
|
28
|
+
error?: string;
|
|
29
|
+
onremove?: any;
|
|
30
|
+
class?: string;
|
|
31
|
+
} & Record<string, any>, {}, "">;
|
|
32
|
+
type $$ComponentProps = {
|
|
33
|
+
name?: string;
|
|
34
|
+
size?: number;
|
|
35
|
+
status?: string;
|
|
36
|
+
progress?: number;
|
|
37
|
+
error?: string;
|
|
38
|
+
onremove?: any;
|
|
39
|
+
class?: string;
|
|
40
|
+
} & Record<string, any>;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export default FilterBar;
|
|
2
|
+
export type FilterOption = {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
icon?: import("svelte").Component;
|
|
6
|
+
};
|
|
7
|
+
export type FilterDef = {
|
|
8
|
+
key: string;
|
|
9
|
+
label: string;
|
|
10
|
+
type: "toggle" | "select" | "multi-select";
|
|
11
|
+
options?: FilterOption[];
|
|
12
|
+
defaultValue?: any;
|
|
13
|
+
};
|
|
14
|
+
type FilterBar = {
|
|
15
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
16
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* FilterBar
|
|
20
|
+
*
|
|
21
|
+
* Horizontal bar of filter chips with active-filter state and clear-all action.
|
|
22
|
+
* Accepts a declarative config of filters or renders children directly.
|
|
23
|
+
* Consumes --filter-chip-* and --filter-bar-* tokens from components.css.
|
|
24
|
+
*
|
|
25
|
+
* @example Declarative (common case)
|
|
26
|
+
* <FilterBar
|
|
27
|
+
* filters={[
|
|
28
|
+
* { key: 'status', label: 'Status', type: 'toggle', options: [
|
|
29
|
+
* { value: 'active', label: 'Active' },
|
|
30
|
+
* { value: 'draft', label: 'Draft' },
|
|
31
|
+
* { value: 'error', label: 'Error' },
|
|
32
|
+
* ]},
|
|
33
|
+
* ]}
|
|
34
|
+
* bind:value={activeFilters}
|
|
35
|
+
* onchange={handleFilterChange}
|
|
36
|
+
* />
|
|
37
|
+
*
|
|
38
|
+
* @example Composable (custom rendering)
|
|
39
|
+
* <FilterBar bind:value={activeFilters} onchange={handleFilterChange}>
|
|
40
|
+
* {#snippet children(toggle, isActive)}
|
|
41
|
+
* <FilterBar.Chip active={isActive('status', 'active')} onclick={() => toggle('status', 'active')}>
|
|
42
|
+
* Active
|
|
43
|
+
* </FilterBar.Chip>
|
|
44
|
+
* {/snippet}
|
|
45
|
+
* </FilterBar>
|
|
46
|
+
*/
|
|
47
|
+
declare const FilterBar: import("svelte").Component<{
|
|
48
|
+
filters?: any[];
|
|
49
|
+
value?: Record<string, any>;
|
|
50
|
+
onchange?: any;
|
|
51
|
+
onclear?: any;
|
|
52
|
+
class?: string;
|
|
53
|
+
children?: any;
|
|
54
|
+
} & Record<string, any>, {}, "value">;
|
|
55
|
+
type $$ComponentProps = {
|
|
56
|
+
filters?: any[];
|
|
57
|
+
value?: Record<string, any>;
|
|
58
|
+
onchange?: any;
|
|
59
|
+
onclear?: any;
|
|
60
|
+
class?: string;
|
|
61
|
+
children?: any;
|
|
62
|
+
} & Record<string, any>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export default Input;
|
|
2
|
+
type Input = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Input
|
|
8
|
+
*
|
|
9
|
+
* Text input with label, help text, and error state.
|
|
10
|
+
* Values displayed in Berkeley Mono (data font).
|
|
11
|
+
* Consumes --input-* tokens from components.css.
|
|
12
|
+
*
|
|
13
|
+
* @example Basic
|
|
14
|
+
* <Input label="EMAIL" placeholder="you@example.com" />
|
|
15
|
+
*
|
|
16
|
+
* @example With help text
|
|
17
|
+
* <Input label="USERNAME" placeholder="Enter username" help="3-20 characters" />
|
|
18
|
+
*
|
|
19
|
+
* @example Error
|
|
20
|
+
* <Input label="EMAIL" value="bad" error="Please enter a valid email" />
|
|
21
|
+
*
|
|
22
|
+
* @example With leading icon
|
|
23
|
+
* <Input label="SEARCH" placeholder="Search...">
|
|
24
|
+
* {#snippet leadingIcon()}
|
|
25
|
+
* <PhMagnifyingGlass size={16} />
|
|
26
|
+
* {/snippet}
|
|
27
|
+
* </Input>
|
|
28
|
+
*/
|
|
29
|
+
declare const Input: import("svelte").Component<{
|
|
30
|
+
label?: any;
|
|
31
|
+
placeholder?: any;
|
|
32
|
+
value?: string;
|
|
33
|
+
help?: any;
|
|
34
|
+
error?: any;
|
|
35
|
+
size?: string;
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
readonly?: boolean;
|
|
38
|
+
type?: string;
|
|
39
|
+
id?: any;
|
|
40
|
+
class?: string;
|
|
41
|
+
leadingIcon?: any;
|
|
42
|
+
} & Record<string, any>, {}, "value">;
|
|
43
|
+
type $$ComponentProps = {
|
|
44
|
+
label?: any;
|
|
45
|
+
placeholder?: any;
|
|
46
|
+
value?: string;
|
|
47
|
+
help?: any;
|
|
48
|
+
error?: any;
|
|
49
|
+
size?: string;
|
|
50
|
+
disabled?: boolean;
|
|
51
|
+
readonly?: boolean;
|
|
52
|
+
type?: string;
|
|
53
|
+
id?: any;
|
|
54
|
+
class?: string;
|
|
55
|
+
leadingIcon?: any;
|
|
56
|
+
} & Record<string, any>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export default KeyValue;
|
|
2
|
+
type KeyValue = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* KeyValue
|
|
8
|
+
*
|
|
9
|
+
* Structured data display. Key in mono label, value in mono data.
|
|
10
|
+
* Consumes --kv-* tokens from components.css.
|
|
11
|
+
*
|
|
12
|
+
* @example Stacked (default)
|
|
13
|
+
* <KeyValue key="STATUS" value="Active" />
|
|
14
|
+
*
|
|
15
|
+
* @example Inline
|
|
16
|
+
* <KeyValue key="PLAN" value="Pro" layout="inline" />
|
|
17
|
+
*
|
|
18
|
+
* @example Custom value via snippet
|
|
19
|
+
* <KeyValue key="STATUS">
|
|
20
|
+
* {#snippet value()}<Badge variant="success">ACTIVE</Badge>{/snippet}
|
|
21
|
+
* </KeyValue>
|
|
22
|
+
*/
|
|
23
|
+
declare const KeyValue: import("svelte").Component<{
|
|
24
|
+
key: any;
|
|
25
|
+
value?: any;
|
|
26
|
+
layout?: string;
|
|
27
|
+
class?: string;
|
|
28
|
+
} & Record<string, any>, {}, "">;
|
|
29
|
+
type $$ComponentProps = {
|
|
30
|
+
key: any;
|
|
31
|
+
value?: any;
|
|
32
|
+
layout?: string;
|
|
33
|
+
class?: string;
|
|
34
|
+
} & Record<string, any>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export default Label;
|
|
2
|
+
type Label = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Label
|
|
8
|
+
*
|
|
9
|
+
* Standalone form label. Uses the same typography tokens as Input labels.
|
|
10
|
+
* Use this in complex form layouts where the label isn't built into a form component.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* <Label for="my-input">EMAIL ADDRESS</Label>
|
|
14
|
+
*
|
|
15
|
+
* @example Disabled
|
|
16
|
+
* <Label for="my-input" disabled>LOCKED FIELD</Label>
|
|
17
|
+
*/
|
|
18
|
+
declare const Label: import("svelte").Component<{
|
|
19
|
+
for?: any;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
class?: string;
|
|
22
|
+
children?: any;
|
|
23
|
+
} & Record<string, any>, {}, "">;
|
|
24
|
+
type $$ComponentProps = {
|
|
25
|
+
for?: any;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
class?: string;
|
|
28
|
+
children?: any;
|
|
29
|
+
} & Record<string, any>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export default List;
|
|
2
|
+
type List = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* List
|
|
8
|
+
*
|
|
9
|
+
* Container for sequences of items. Two variants:
|
|
10
|
+
* - "gap" (default) — flex column with `var(--list-gap)` between children.
|
|
11
|
+
* - "bordered" — outer border + border-radius + overflow hidden. Children use border-bottom dividers.
|
|
12
|
+
*
|
|
13
|
+
* Consumes --list-* tokens from components.css.
|
|
14
|
+
*
|
|
15
|
+
* @example Gap variant (default)
|
|
16
|
+
* <List>
|
|
17
|
+
* <ListItem>First item</ListItem>
|
|
18
|
+
* <ListItem>Second item</ListItem>
|
|
19
|
+
* </List>
|
|
20
|
+
*
|
|
21
|
+
* @example Bordered variant
|
|
22
|
+
* <List variant="bordered">
|
|
23
|
+
* <ListItem>Row one</ListItem>
|
|
24
|
+
* <ListItem>Row two</ListItem>
|
|
25
|
+
* </List>
|
|
26
|
+
*/
|
|
27
|
+
declare const List: import("svelte").Component<{
|
|
28
|
+
variant?: string;
|
|
29
|
+
class?: string;
|
|
30
|
+
children?: any;
|
|
31
|
+
} & Record<string, any>, {}, "">;
|
|
32
|
+
type $$ComponentProps = {
|
|
33
|
+
variant?: string;
|
|
34
|
+
class?: string;
|
|
35
|
+
children?: any;
|
|
36
|
+
} & Record<string, any>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export default ListItem;
|
|
2
|
+
type ListItem = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* ListItem
|
|
8
|
+
*
|
|
9
|
+
* A single row with leading content area (flex: 1, column layout) and trailing action area (flex-shrink: 0).
|
|
10
|
+
* Consumes --list-item-* tokens from components.css.
|
|
11
|
+
*
|
|
12
|
+
* @example Simple content
|
|
13
|
+
* <ListItem>Item text here</ListItem>
|
|
14
|
+
*
|
|
15
|
+
* @example With leading and trailing snippets
|
|
16
|
+
* <ListItem>
|
|
17
|
+
* {#snippet leading()}
|
|
18
|
+
* <span class="name">Pipeline v2</span>
|
|
19
|
+
* <span class="desc">Last run: 2 hours ago</span>
|
|
20
|
+
* {/snippet}
|
|
21
|
+
* {#snippet trailing()}
|
|
22
|
+
* <Toggle checked />
|
|
23
|
+
* {/snippet}
|
|
24
|
+
* </ListItem>
|
|
25
|
+
*
|
|
26
|
+
* @example Interactive (renders as button)
|
|
27
|
+
* <ListItem interactive onclick={() => select(id)}>
|
|
28
|
+
* {#snippet leading()}
|
|
29
|
+
* <span>Clickable row</span>
|
|
30
|
+
* {/snippet}
|
|
31
|
+
* </ListItem>
|
|
32
|
+
*/
|
|
33
|
+
declare const ListItem: import("svelte").Component<{
|
|
34
|
+
interactive?: boolean;
|
|
35
|
+
class?: string;
|
|
36
|
+
leading?: any;
|
|
37
|
+
trailing?: any;
|
|
38
|
+
children?: any;
|
|
39
|
+
} & Record<string, any>, {}, "">;
|
|
40
|
+
type $$ComponentProps = {
|
|
41
|
+
interactive?: boolean;
|
|
42
|
+
class?: string;
|
|
43
|
+
leading?: any;
|
|
44
|
+
trailing?: any;
|
|
45
|
+
children?: any;
|
|
46
|
+
} & Record<string, any>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export default LogViewer;
|
|
2
|
+
type LogViewer = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* LogViewer
|
|
8
|
+
*
|
|
9
|
+
* Structured log display for viewing timestamped, level-coded entries.
|
|
10
|
+
* Optimized for scanning many entries at compact density.
|
|
11
|
+
* Composes Badge, Input, Checkbox, Toggle, Alert, EmptyState, and Skeleton.
|
|
12
|
+
* Consumes --log-viewer-* tokens from components.css.
|
|
13
|
+
*
|
|
14
|
+
* @example Basic
|
|
15
|
+
* <LogViewer entries={logEntries} />
|
|
16
|
+
*
|
|
17
|
+
* @example With all states
|
|
18
|
+
* <LogViewer
|
|
19
|
+
* entries={logEntries}
|
|
20
|
+
* available={true}
|
|
21
|
+
* truncated={false}
|
|
22
|
+
* fallbackUrl="https://temporal.example.com/..."
|
|
23
|
+
* loading={false}
|
|
24
|
+
* />
|
|
25
|
+
*
|
|
26
|
+
* @example Unavailable (show fallback)
|
|
27
|
+
* <LogViewer available={false} fallbackUrl="https://temporal.example.com/..." />
|
|
28
|
+
*/
|
|
29
|
+
declare const LogViewer: import("svelte").Component<{
|
|
30
|
+
entries?: any[];
|
|
31
|
+
available?: boolean;
|
|
32
|
+
truncated?: boolean;
|
|
33
|
+
fallbackUrl?: any;
|
|
34
|
+
loading?: boolean;
|
|
35
|
+
emptyHeading?: string;
|
|
36
|
+
emptyBody?: string;
|
|
37
|
+
unavailableHeading?: string;
|
|
38
|
+
unavailableBody?: string;
|
|
39
|
+
class?: string;
|
|
40
|
+
emptyIcon?: any;
|
|
41
|
+
unavailableIcon?: any;
|
|
42
|
+
} & Record<string, any>, {}, "">;
|
|
43
|
+
type $$ComponentProps = {
|
|
44
|
+
entries?: any[];
|
|
45
|
+
available?: boolean;
|
|
46
|
+
truncated?: boolean;
|
|
47
|
+
fallbackUrl?: any;
|
|
48
|
+
loading?: boolean;
|
|
49
|
+
emptyHeading?: string;
|
|
50
|
+
emptyBody?: string;
|
|
51
|
+
unavailableHeading?: string;
|
|
52
|
+
unavailableBody?: string;
|
|
53
|
+
class?: string;
|
|
54
|
+
emptyIcon?: any;
|
|
55
|
+
unavailableIcon?: any;
|
|
56
|
+
} & Record<string, any>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export default Menu;
|
|
2
|
+
type Menu = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Menu
|
|
8
|
+
*
|
|
9
|
+
* Positioned floating menu anchored to a trigger element.
|
|
10
|
+
* Composes Popover internally and adds WAI-ARIA Menu Button semantics:
|
|
11
|
+
* arrow key navigation, typeahead, and Enter/Space activation.
|
|
12
|
+
*
|
|
13
|
+
* Consumes --menu-* tokens from components.css.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* <button bind:this={anchor} onclick={() => open = !open}>Options</button>
|
|
17
|
+
* <Menu bind:open {anchor} placement="bottom-start">
|
|
18
|
+
* <MenuItem onclick={handleEdit}>
|
|
19
|
+
* {#snippet leading()}<PencilIcon size={14} />{/snippet}
|
|
20
|
+
* Edit name
|
|
21
|
+
* </MenuItem>
|
|
22
|
+
* <MenuSeparator />
|
|
23
|
+
* <MenuItem variant="destructive" onclick={handleDelete}>
|
|
24
|
+
* {#snippet leading()}<TrashIcon size={14} />{/snippet}
|
|
25
|
+
* Delete
|
|
26
|
+
* </MenuItem>
|
|
27
|
+
* </Menu>
|
|
28
|
+
*/
|
|
29
|
+
declare const Menu: import("svelte").Component<{
|
|
30
|
+
open?: boolean;
|
|
31
|
+
anchor?: any;
|
|
32
|
+
placement?: string;
|
|
33
|
+
onclose?: any;
|
|
34
|
+
class?: string;
|
|
35
|
+
children?: any;
|
|
36
|
+
} & Record<string, any>, {}, "open">;
|
|
37
|
+
type $$ComponentProps = {
|
|
38
|
+
open?: boolean;
|
|
39
|
+
anchor?: any;
|
|
40
|
+
placement?: string;
|
|
41
|
+
onclose?: any;
|
|
42
|
+
class?: string;
|
|
43
|
+
children?: any;
|
|
44
|
+
} & Record<string, any>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export default MenuItem;
|
|
2
|
+
type MenuItem = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* MenuItem
|
|
8
|
+
*
|
|
9
|
+
* A single actionable row inside a Menu.
|
|
10
|
+
* Renders as <button role="menuitem"> with optional leading/trailing snippets.
|
|
11
|
+
*
|
|
12
|
+
* Consumes --menu-item-* tokens from components.css.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* <MenuItem onclick={handleEdit}>
|
|
16
|
+
* {#snippet leading()}<PencilIcon size={14} />{/snippet}
|
|
17
|
+
* Edit name
|
|
18
|
+
* </MenuItem>
|
|
19
|
+
*
|
|
20
|
+
* @example Destructive
|
|
21
|
+
* <MenuItem variant="destructive" onclick={handleDelete}>
|
|
22
|
+
* {#snippet leading()}<TrashIcon size={14} />{/snippet}
|
|
23
|
+
* Delete
|
|
24
|
+
* </MenuItem>
|
|
25
|
+
*
|
|
26
|
+
* @example With keyboard shortcut
|
|
27
|
+
* <MenuItem onclick={handleCopy}>
|
|
28
|
+
* Copy
|
|
29
|
+
* {#snippet trailing()}<kbd>⌘C</kbd>{/snippet}
|
|
30
|
+
* </MenuItem>
|
|
31
|
+
*/
|
|
32
|
+
declare const MenuItem: import("svelte").Component<{
|
|
33
|
+
variant?: string;
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
leading?: any;
|
|
36
|
+
trailing?: any;
|
|
37
|
+
children?: any;
|
|
38
|
+
class?: string;
|
|
39
|
+
} & Record<string, any>, {}, "">;
|
|
40
|
+
type $$ComponentProps = {
|
|
41
|
+
variant?: string;
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
leading?: any;
|
|
44
|
+
trailing?: any;
|
|
45
|
+
children?: any;
|
|
46
|
+
class?: string;
|
|
47
|
+
} & Record<string, any>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export default MenuSeparator;
|
|
2
|
+
type MenuSeparator = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* MenuSeparator
|
|
8
|
+
*
|
|
9
|
+
* A thin visual divider between groups of MenuItems.
|
|
10
|
+
* Consumes --menu-separator-* tokens from components.css.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* <Menu bind:open {anchor}>
|
|
14
|
+
* <MenuItem>Edit</MenuItem>
|
|
15
|
+
* <MenuSeparator />
|
|
16
|
+
* <MenuItem variant="destructive">Delete</MenuItem>
|
|
17
|
+
* </Menu>
|
|
18
|
+
*/
|
|
19
|
+
declare const MenuSeparator: import("svelte").Component<{
|
|
20
|
+
class?: string;
|
|
21
|
+
} & Record<string, any>, {}, "">;
|
|
22
|
+
type $$ComponentProps = {
|
|
23
|
+
class?: string;
|
|
24
|
+
} & Record<string, any>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export default Modal;
|
|
2
|
+
type Modal = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Modal
|
|
8
|
+
*
|
|
9
|
+
* Centered overlay dialog with focus trap and backdrop.
|
|
10
|
+
* Unlike Panel (slide-over drawer), Modal is centered and rounded.
|
|
11
|
+
* Consumes --modal-* tokens from components.css.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* <Modal open={showConfirm} title="Delete Pipeline" onclose={() => showConfirm = false}>
|
|
15
|
+
* Are you sure you want to delete this pipeline?
|
|
16
|
+
* {#snippet footer()}
|
|
17
|
+
* <Button variant="ghost" onclick={() => showConfirm = false}>CANCEL</Button>
|
|
18
|
+
* <Button variant="destructive" onclick={handleDelete}>DELETE</Button>
|
|
19
|
+
* {/snippet}
|
|
20
|
+
* </Modal>
|
|
21
|
+
*
|
|
22
|
+
* @example Small
|
|
23
|
+
* <Modal open width="sm" title="Rename" onclose={close}>
|
|
24
|
+
* <Input label="NAME" bind:value={name} />
|
|
25
|
+
* </Modal>
|
|
26
|
+
*/
|
|
27
|
+
declare const Modal: import("svelte").Component<{
|
|
28
|
+
open?: boolean;
|
|
29
|
+
title: any;
|
|
30
|
+
width?: string;
|
|
31
|
+
onclose: any;
|
|
32
|
+
class?: string;
|
|
33
|
+
header?: any;
|
|
34
|
+
footer?: any;
|
|
35
|
+
children?: any;
|
|
36
|
+
} & Record<string, any>, {}, "">;
|
|
37
|
+
type $$ComponentProps = {
|
|
38
|
+
open?: boolean;
|
|
39
|
+
title: any;
|
|
40
|
+
width?: string;
|
|
41
|
+
onclose: any;
|
|
42
|
+
class?: string;
|
|
43
|
+
header?: any;
|
|
44
|
+
footer?: any;
|
|
45
|
+
children?: any;
|
|
46
|
+
} & Record<string, any>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export default OptionGrid;
|
|
2
|
+
type OptionGrid = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* OptionGrid
|
|
8
|
+
*
|
|
9
|
+
* Exclusive selection grid using Card (interactive + selected).
|
|
10
|
+
* Implements radiogroup semantics with keyboard navigation.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* <script>
|
|
14
|
+
* import { Database, Code } from 'phosphor-svelte';
|
|
15
|
+
* let type = $state(null);
|
|
16
|
+
* const options = [
|
|
17
|
+
* { value: 'sql', label: 'SQL', description: 'SQL transform', icon: Database },
|
|
18
|
+
* { value: 'python', label: 'Python', description: 'Python code', icon: Code },
|
|
19
|
+
* ];
|
|
20
|
+
* </script>
|
|
21
|
+
*
|
|
22
|
+
* <OptionGrid {options} bind:value={type} columns={2} />
|
|
23
|
+
*
|
|
24
|
+
* @example Compact mode (no descriptions)
|
|
25
|
+
* <OptionGrid {options} bind:value={type} columns={3} compact />
|
|
26
|
+
*/
|
|
27
|
+
declare const OptionGrid: import("svelte").Component<{
|
|
28
|
+
options?: any[];
|
|
29
|
+
value?: any;
|
|
30
|
+
columns?: number;
|
|
31
|
+
compact?: boolean;
|
|
32
|
+
class?: string;
|
|
33
|
+
} & Record<string, any>, {}, "value">;
|
|
34
|
+
type $$ComponentProps = {
|
|
35
|
+
options?: any[];
|
|
36
|
+
value?: any;
|
|
37
|
+
columns?: number;
|
|
38
|
+
compact?: boolean;
|
|
39
|
+
class?: string;
|
|
40
|
+
} & Record<string, any>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export default PageContainer;
|
|
2
|
+
type PageContainer = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* PageContainer
|
|
8
|
+
*
|
|
9
|
+
* Content container for page-level layout. Centers content with max-width
|
|
10
|
+
* and consistent horizontal/vertical padding. Used inside an app shell's
|
|
11
|
+
* main content area — one per page.
|
|
12
|
+
*
|
|
13
|
+
* Uses semantic content-width and content-padding tokens from semantic.css.
|
|
14
|
+
*
|
|
15
|
+
* @example Default (standard content width)
|
|
16
|
+
* <PageContainer>
|
|
17
|
+
* <h1>Page Title</h1>
|
|
18
|
+
* <p>Content here</p>
|
|
19
|
+
* </PageContainer>
|
|
20
|
+
*
|
|
21
|
+
* @example Narrow (forms, settings)
|
|
22
|
+
* <PageContainer size="narrow">
|
|
23
|
+
* <SettingsForm />
|
|
24
|
+
* </PageContainer>
|
|
25
|
+
*
|
|
26
|
+
* @example Wide (dashboards, data tables)
|
|
27
|
+
* <PageContainer size="wide">
|
|
28
|
+
* <DataTable />
|
|
29
|
+
* </PageContainer>
|
|
30
|
+
*
|
|
31
|
+
* @example Fluid (no max-width)
|
|
32
|
+
* <PageContainer size="full">
|
|
33
|
+
* <CanvasEditor />
|
|
34
|
+
* </PageContainer>
|
|
35
|
+
*/
|
|
36
|
+
declare const PageContainer: import("svelte").Component<{
|
|
37
|
+
size?: string;
|
|
38
|
+
class?: string;
|
|
39
|
+
children?: any;
|
|
40
|
+
} & Record<string, any>, {}, "">;
|
|
41
|
+
type $$ComponentProps = {
|
|
42
|
+
size?: string;
|
|
43
|
+
class?: string;
|
|
44
|
+
children?: any;
|
|
45
|
+
} & Record<string, any>;
|