@aiaiai-pt/design-system 0.3.5 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +13 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export default Alert;
|
|
2
|
+
type Alert = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Alert
|
|
8
|
+
*
|
|
9
|
+
* Inline callout for contextual messages.
|
|
10
|
+
* Unlike Toast (floating, transient), Alert is in-flow and persistent.
|
|
11
|
+
* Consumes --alert-* tokens from components.css.
|
|
12
|
+
*
|
|
13
|
+
* @example Info
|
|
14
|
+
* <Alert variant="info">
|
|
15
|
+
* <strong>Note:</strong> This pipeline requires a source connection.
|
|
16
|
+
* </Alert>
|
|
17
|
+
*
|
|
18
|
+
* @example Error with icon
|
|
19
|
+
* <Alert variant="error">
|
|
20
|
+
* {#snippet icon()}<svg>...</svg>{/snippet}
|
|
21
|
+
* <strong>Build failed.</strong> Check the CI logs for details.
|
|
22
|
+
* </Alert>
|
|
23
|
+
*/
|
|
24
|
+
declare const Alert: import("svelte").Component<{
|
|
25
|
+
variant?: string;
|
|
26
|
+
class?: string;
|
|
27
|
+
icon?: any;
|
|
28
|
+
children?: any;
|
|
29
|
+
} & Record<string, any>, {}, "">;
|
|
30
|
+
type $$ComponentProps = {
|
|
31
|
+
variant?: string;
|
|
32
|
+
class?: string;
|
|
33
|
+
icon?: any;
|
|
34
|
+
children?: any;
|
|
35
|
+
} & Record<string, any>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export default Badge;
|
|
2
|
+
type Badge = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Badge
|
|
8
|
+
*
|
|
9
|
+
* Semantic status label. Pill-shaped, mono font, color-coded.
|
|
10
|
+
* Consumes --badge-* tokens from components.css.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* <Badge variant="success">PASSED</Badge>
|
|
14
|
+
*
|
|
15
|
+
* @example With dot
|
|
16
|
+
* <Badge variant="info" dot>SYNCING</Badge>
|
|
17
|
+
*/
|
|
18
|
+
declare const Badge: import("svelte").Component<{
|
|
19
|
+
variant?: string;
|
|
20
|
+
dot?: boolean;
|
|
21
|
+
class?: string;
|
|
22
|
+
icon?: any;
|
|
23
|
+
children?: any;
|
|
24
|
+
} & Record<string, any>, {}, "">;
|
|
25
|
+
type $$ComponentProps = {
|
|
26
|
+
variant?: string;
|
|
27
|
+
dot?: boolean;
|
|
28
|
+
class?: string;
|
|
29
|
+
icon?: any;
|
|
30
|
+
children?: any;
|
|
31
|
+
} & Record<string, any>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export default BottomNav;
|
|
2
|
+
type BottomNav = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* BottomNav
|
|
8
|
+
*
|
|
9
|
+
* Mobile bottom navigation bar.
|
|
10
|
+
* Consumes --nav-bottom-* tokens from components.css.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* <BottomNav>
|
|
14
|
+
* <BottomNavItem active label="Home">
|
|
15
|
+
* {#snippet icon()}<svg>...</svg>{/snippet}
|
|
16
|
+
* </BottomNavItem>
|
|
17
|
+
* </BottomNav>
|
|
18
|
+
*/
|
|
19
|
+
declare const BottomNav: import("svelte").Component<{
|
|
20
|
+
class?: string;
|
|
21
|
+
children?: any;
|
|
22
|
+
} & Record<string, any>, {}, "">;
|
|
23
|
+
type $$ComponentProps = {
|
|
24
|
+
class?: string;
|
|
25
|
+
children?: any;
|
|
26
|
+
} & Record<string, any>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export default BottomNavItem;
|
|
2
|
+
type BottomNavItem = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* BottomNavItem
|
|
8
|
+
*
|
|
9
|
+
* Individual item in a BottomNav.
|
|
10
|
+
* Consumes --nav-bottom-* tokens from components.css.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* <BottomNavItem active label="Home" onclick={() => goto('/')}>
|
|
14
|
+
* {#snippet icon()}<svg>...</svg>{/snippet}
|
|
15
|
+
* </BottomNavItem>
|
|
16
|
+
*
|
|
17
|
+
* @example With badge dot
|
|
18
|
+
* <BottomNavItem label="Activity" badge>
|
|
19
|
+
* {#snippet icon()}<svg>...</svg>{/snippet}
|
|
20
|
+
* </BottomNavItem>
|
|
21
|
+
*/
|
|
22
|
+
declare const BottomNavItem: import("svelte").Component<{
|
|
23
|
+
active?: boolean;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
href?: any;
|
|
26
|
+
label: any;
|
|
27
|
+
badge?: boolean;
|
|
28
|
+
class?: string;
|
|
29
|
+
icon?: any;
|
|
30
|
+
} & Record<string, any>, {}, "">;
|
|
31
|
+
type $$ComponentProps = {
|
|
32
|
+
active?: boolean;
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
href?: any;
|
|
35
|
+
label: any;
|
|
36
|
+
badge?: boolean;
|
|
37
|
+
class?: string;
|
|
38
|
+
icon?: any;
|
|
39
|
+
} & Record<string, any>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export default Button;
|
|
2
|
+
type Button = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Button
|
|
8
|
+
*
|
|
9
|
+
* Four variants, three sizes. Labels always mono (Berkeley Mono).
|
|
10
|
+
* Renders as `<a>` when `href` is provided, `<button>` otherwise.
|
|
11
|
+
* Consumes --button-* tokens from components.css.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* <Button variant="primary" size="md">CREATE</Button>
|
|
15
|
+
*
|
|
16
|
+
* @example With icon
|
|
17
|
+
* <Button variant="secondary" size="sm">
|
|
18
|
+
* {#snippet icon()}<PhPlus size={16} />{/snippet}
|
|
19
|
+
* ADD ITEM
|
|
20
|
+
* </Button>
|
|
21
|
+
*
|
|
22
|
+
* @example As link
|
|
23
|
+
* <Button variant="secondary" size="sm" href="/some/path">
|
|
24
|
+
* GO THERE
|
|
25
|
+
* </Button>
|
|
26
|
+
*
|
|
27
|
+
* @example Loading
|
|
28
|
+
* <Button variant="primary" loading>SAVING</Button>
|
|
29
|
+
*
|
|
30
|
+
* @example Icon only
|
|
31
|
+
* <Button variant="ghost" size="md" iconOnly aria-label="Settings">
|
|
32
|
+
* {#snippet icon()}<PhGear size={16} />{/snippet}
|
|
33
|
+
* </Button>
|
|
34
|
+
*/
|
|
35
|
+
declare const Button: import("svelte").Component<{
|
|
36
|
+
variant?: string;
|
|
37
|
+
size?: string;
|
|
38
|
+
loading?: boolean;
|
|
39
|
+
disabled?: boolean;
|
|
40
|
+
iconOnly?: boolean;
|
|
41
|
+
type?: string;
|
|
42
|
+
href?: any;
|
|
43
|
+
class?: string;
|
|
44
|
+
icon?: any;
|
|
45
|
+
children?: any;
|
|
46
|
+
} & Record<string, any>, {}, "">;
|
|
47
|
+
type $$ComponentProps = {
|
|
48
|
+
variant?: string;
|
|
49
|
+
size?: string;
|
|
50
|
+
loading?: boolean;
|
|
51
|
+
disabled?: boolean;
|
|
52
|
+
iconOnly?: boolean;
|
|
53
|
+
type?: string;
|
|
54
|
+
href?: any;
|
|
55
|
+
class?: string;
|
|
56
|
+
icon?: any;
|
|
57
|
+
children?: any;
|
|
58
|
+
} & Record<string, any>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export default Card;
|
|
2
|
+
type Card = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Card
|
|
8
|
+
*
|
|
9
|
+
* Surface container. Three variants: flat, bordered (default), elevated.
|
|
10
|
+
* Content-agnostic. Consumes --card-* tokens from components.css.
|
|
11
|
+
*
|
|
12
|
+
* @example Bordered (default)
|
|
13
|
+
* <Card>Content here</Card>
|
|
14
|
+
*
|
|
15
|
+
* @example Elevated
|
|
16
|
+
* <Card variant="elevated">Floating content</Card>
|
|
17
|
+
*
|
|
18
|
+
* @example Interactive + selectable
|
|
19
|
+
* <Card interactive selected={isSelected} onclick={() => select(id)}>
|
|
20
|
+
* Clickable card
|
|
21
|
+
* </Card>
|
|
22
|
+
*/
|
|
23
|
+
declare const Card: import("svelte").Component<{
|
|
24
|
+
variant?: string;
|
|
25
|
+
interactive?: boolean;
|
|
26
|
+
selected?: boolean;
|
|
27
|
+
class?: string;
|
|
28
|
+
children?: any;
|
|
29
|
+
} & Record<string, any>, {}, "">;
|
|
30
|
+
type $$ComponentProps = {
|
|
31
|
+
variant?: string;
|
|
32
|
+
interactive?: boolean;
|
|
33
|
+
selected?: boolean;
|
|
34
|
+
class?: string;
|
|
35
|
+
children?: any;
|
|
36
|
+
} & Record<string, any>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export default CardGrid;
|
|
2
|
+
type CardGrid = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* CardGrid
|
|
8
|
+
*
|
|
9
|
+
* Responsive grid layout for cards. Standardizes column counts and gaps
|
|
10
|
+
* across all card grid usages in the application.
|
|
11
|
+
*
|
|
12
|
+
* Uses --grid-gutter token for consistent gap spacing.
|
|
13
|
+
*
|
|
14
|
+
* @example Default (3-column card grid)
|
|
15
|
+
* <CardGrid>
|
|
16
|
+
* <Card>...</Card>
|
|
17
|
+
* <Card>...</Card>
|
|
18
|
+
* <Card>...</Card>
|
|
19
|
+
* </CardGrid>
|
|
20
|
+
*
|
|
21
|
+
* @example Stats row (4-column, compact)
|
|
22
|
+
* <CardGrid columns="4">
|
|
23
|
+
* <Card><StatValue /></Card>
|
|
24
|
+
* <Card><StatValue /></Card>
|
|
25
|
+
* </CardGrid>
|
|
26
|
+
*
|
|
27
|
+
* @example 2-column layout
|
|
28
|
+
* <CardGrid columns="2">
|
|
29
|
+
* <Card>...</Card>
|
|
30
|
+
* <Card>...</Card>
|
|
31
|
+
* </CardGrid>
|
|
32
|
+
*/
|
|
33
|
+
declare const CardGrid: import("svelte").Component<{
|
|
34
|
+
columns?: string;
|
|
35
|
+
class?: string;
|
|
36
|
+
children?: any;
|
|
37
|
+
} & Record<string, any>, {}, "">;
|
|
38
|
+
type $$ComponentProps = {
|
|
39
|
+
columns?: string;
|
|
40
|
+
class?: string;
|
|
41
|
+
children?: any;
|
|
42
|
+
} & Record<string, any>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export default Checkbox;
|
|
2
|
+
type Checkbox = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Checkbox
|
|
8
|
+
*
|
|
9
|
+
* Checkbox with label. Supports checked, indeterminate, and disabled states.
|
|
10
|
+
* Consumes --checkbox-* tokens from components.css.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* <Checkbox label="Accept terms" bind:checked />
|
|
14
|
+
*
|
|
15
|
+
* @example Indeterminate
|
|
16
|
+
* <Checkbox label="Select all" indeterminate />
|
|
17
|
+
*/
|
|
18
|
+
declare const Checkbox: import("svelte").Component<{
|
|
19
|
+
checked?: boolean;
|
|
20
|
+
indeterminate?: boolean;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
label?: any;
|
|
23
|
+
id?: any;
|
|
24
|
+
class?: string;
|
|
25
|
+
} & Record<string, any>, {}, "checked">;
|
|
26
|
+
type $$ComponentProps = {
|
|
27
|
+
checked?: boolean;
|
|
28
|
+
indeterminate?: boolean;
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
label?: any;
|
|
31
|
+
id?: any;
|
|
32
|
+
class?: string;
|
|
33
|
+
} & Record<string, any>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export default CodeBlock;
|
|
2
|
+
type CodeBlock = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* CodeBlock
|
|
8
|
+
*
|
|
9
|
+
* Formatted code display with optional line numbers.
|
|
10
|
+
* Consumes --code-* tokens from components.css.
|
|
11
|
+
*
|
|
12
|
+
* Syntax highlighting is the consumer's responsibility (Prism, Shiki, etc).
|
|
13
|
+
* This component handles layout, line numbers, and copy.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* <CodeBlock code="SELECT * FROM users WHERE active = true;" language="sql" />
|
|
17
|
+
*
|
|
18
|
+
* @example Without line numbers
|
|
19
|
+
* <CodeBlock code="pip install pandas" lineNumbers={false} />
|
|
20
|
+
*
|
|
21
|
+
* @example With highlighted HTML (pre-highlighted by consumer)
|
|
22
|
+
* <CodeBlock language="python" lineNumbers>
|
|
23
|
+
* {#snippet content()}
|
|
24
|
+
* <span class="token keyword">def</span> <span class="token function">main</span>():
|
|
25
|
+
* {/snippet}
|
|
26
|
+
* </CodeBlock>
|
|
27
|
+
*/
|
|
28
|
+
declare const CodeBlock: import("svelte").Component<{
|
|
29
|
+
code?: any;
|
|
30
|
+
language?: any;
|
|
31
|
+
lineNumbers?: boolean;
|
|
32
|
+
copyable?: boolean;
|
|
33
|
+
class?: string;
|
|
34
|
+
content?: any;
|
|
35
|
+
} & Record<string, any>, {}, "">;
|
|
36
|
+
type $$ComponentProps = {
|
|
37
|
+
code?: any;
|
|
38
|
+
language?: any;
|
|
39
|
+
lineNumbers?: boolean;
|
|
40
|
+
copyable?: boolean;
|
|
41
|
+
class?: string;
|
|
42
|
+
content?: any;
|
|
43
|
+
} & Record<string, any>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export default CodeEditor;
|
|
2
|
+
type CodeEditor = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* CodeEditor
|
|
8
|
+
*
|
|
9
|
+
* Editable code editor wrapping CodeMirror 6.
|
|
10
|
+
* Styled from --code-* tokens to match CodeBlock appearance.
|
|
11
|
+
* Requires @codemirror/* peer dependencies installed by the consumer.
|
|
12
|
+
*
|
|
13
|
+
* @example SQL editor
|
|
14
|
+
* <CodeEditor bind:value={sql} language="sql" />
|
|
15
|
+
*
|
|
16
|
+
* @example Readonly Python
|
|
17
|
+
* <CodeEditor value={code} readonly language="python" minLines={10} />
|
|
18
|
+
*
|
|
19
|
+
* @example Empty with placeholder
|
|
20
|
+
* <CodeEditor language="sql" placeholder="Enter your query..." />
|
|
21
|
+
*/
|
|
22
|
+
declare const CodeEditor: import("svelte").Component<{
|
|
23
|
+
value?: string;
|
|
24
|
+
language?: string;
|
|
25
|
+
readonly?: boolean;
|
|
26
|
+
placeholder?: string;
|
|
27
|
+
lineNumbers?: boolean;
|
|
28
|
+
minLines?: number;
|
|
29
|
+
maxLines?: number;
|
|
30
|
+
class?: string;
|
|
31
|
+
}, {}, "value">;
|
|
32
|
+
type $$ComponentProps = {
|
|
33
|
+
value?: string;
|
|
34
|
+
language?: string;
|
|
35
|
+
readonly?: boolean;
|
|
36
|
+
placeholder?: string;
|
|
37
|
+
lineNumbers?: boolean;
|
|
38
|
+
minLines?: number;
|
|
39
|
+
maxLines?: number;
|
|
40
|
+
class?: string;
|
|
41
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export default CollapsibleSection;
|
|
2
|
+
type CollapsibleSection = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* CollapsibleSection
|
|
8
|
+
*
|
|
9
|
+
* Animated expand/collapse container for grouped content.
|
|
10
|
+
* Built on native <details>/<summary> for no-JS accessibility.
|
|
11
|
+
* Consumes --type-label-* and --color-* tokens.
|
|
12
|
+
*
|
|
13
|
+
* @example Basic
|
|
14
|
+
* <CollapsibleSection title="Advanced Options" bind:open>
|
|
15
|
+
* <p>Content here</p>
|
|
16
|
+
* </CollapsibleSection>
|
|
17
|
+
*
|
|
18
|
+
* @example With badge count and action buttons
|
|
19
|
+
* <CollapsibleSection title="Filters" bind:open badge={3}>
|
|
20
|
+
* {#snippet actions()}
|
|
21
|
+
* <Button variant="ghost" size="sm">Clear</Button>
|
|
22
|
+
* {/snippet}
|
|
23
|
+
* <p>Filter content</p>
|
|
24
|
+
* </CollapsibleSection>
|
|
25
|
+
*/
|
|
26
|
+
declare const CollapsibleSection: import("svelte").Component<{
|
|
27
|
+
title?: string;
|
|
28
|
+
open?: boolean;
|
|
29
|
+
badge?: any;
|
|
30
|
+
defaultOpen?: boolean;
|
|
31
|
+
class?: string;
|
|
32
|
+
actions?: any;
|
|
33
|
+
children?: any;
|
|
34
|
+
} & Record<string, any>, {}, "open">;
|
|
35
|
+
type $$ComponentProps = {
|
|
36
|
+
title?: string;
|
|
37
|
+
open?: boolean;
|
|
38
|
+
badge?: any;
|
|
39
|
+
defaultOpen?: boolean;
|
|
40
|
+
class?: string;
|
|
41
|
+
actions?: any;
|
|
42
|
+
children?: any;
|
|
43
|
+
} & Record<string, any>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export default Combobox;
|
|
2
|
+
export type ComboboxItem = {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
group?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
};
|
|
8
|
+
type Combobox = {
|
|
9
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
10
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Combobox
|
|
14
|
+
*
|
|
15
|
+
* Searchable select composing Input + Popover + filtered list.
|
|
16
|
+
* Supports grouped items, description text, and highlighted matches.
|
|
17
|
+
* Consumes --combobox-* tokens from components.css.
|
|
18
|
+
*
|
|
19
|
+
* @example Basic
|
|
20
|
+
* <Combobox
|
|
21
|
+
* label="FUNCTION"
|
|
22
|
+
* items={[{ value: 'a', label: 'Alpha' }, { value: 'b', label: 'Beta' }]}
|
|
23
|
+
* bind:value={selected}
|
|
24
|
+
* />
|
|
25
|
+
*
|
|
26
|
+
* @example With groups and descriptions
|
|
27
|
+
* <Combobox
|
|
28
|
+
* label="NODE TYPE"
|
|
29
|
+
* placeholder="Search node types..."
|
|
30
|
+
* items={[
|
|
31
|
+
* { value: 'llm', label: 'LLM', group: 'Processing', description: 'AI model call' },
|
|
32
|
+
* { value: 'fn', label: 'Function', group: 'Integration', description: 'HTTP endpoint' },
|
|
33
|
+
* ]}
|
|
34
|
+
* bind:value={selected}
|
|
35
|
+
* />
|
|
36
|
+
*/
|
|
37
|
+
declare const Combobox: import("svelte").Component<{
|
|
38
|
+
items?: any[];
|
|
39
|
+
value?: string;
|
|
40
|
+
label?: any;
|
|
41
|
+
placeholder?: string;
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
error?: any;
|
|
44
|
+
help?: any;
|
|
45
|
+
size?: string;
|
|
46
|
+
onchange?: any;
|
|
47
|
+
class?: string;
|
|
48
|
+
} & Record<string, any>, {}, "value">;
|
|
49
|
+
type $$ComponentProps = {
|
|
50
|
+
items?: any[];
|
|
51
|
+
value?: string;
|
|
52
|
+
label?: any;
|
|
53
|
+
placeholder?: string;
|
|
54
|
+
disabled?: boolean;
|
|
55
|
+
error?: any;
|
|
56
|
+
help?: any;
|
|
57
|
+
size?: string;
|
|
58
|
+
onchange?: any;
|
|
59
|
+
class?: string;
|
|
60
|
+
} & Record<string, any>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Simple fuzzy score: returns 0-1 for how well query matches text.
|
|
3
|
+
* 0 = no match, 1 = exact prefix match. Based on command-score heuristics.
|
|
4
|
+
* @param {string} text
|
|
5
|
+
* @param {string} query
|
|
6
|
+
* @returns {number}
|
|
7
|
+
*/
|
|
8
|
+
export function commandScore(text: string, query: string): number;
|
|
9
|
+
export default CommandPalette;
|
|
10
|
+
type CommandPalette = {
|
|
11
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
12
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* CommandPalette
|
|
16
|
+
*
|
|
17
|
+
* Modal search + command launcher triggered by keyboard shortcut.
|
|
18
|
+
* Supports built-in fuzzy scoring, grouped results, keyboard navigation,
|
|
19
|
+
* and both declarative (sections prop) and composable (children) APIs.
|
|
20
|
+
* Consumes --palette-* tokens from components.css.
|
|
21
|
+
*
|
|
22
|
+
* @example Declarative
|
|
23
|
+
* <CommandPalette
|
|
24
|
+
* bind:open={paletteOpen}
|
|
25
|
+
* trigger="mod+k"
|
|
26
|
+
* placeholder="Type a command or search..."
|
|
27
|
+
* sections={[
|
|
28
|
+
* { heading: 'Recent', items: [
|
|
29
|
+
* { value: 'pipeline-1', label: 'Customer ETL', onselect: () => goto('/pipelines/1') },
|
|
30
|
+
* ]},
|
|
31
|
+
* { heading: 'Actions', items: [
|
|
32
|
+
* { value: 'new-pipeline', label: 'Create pipeline', shortcut: '⌘N', onselect: createPipeline },
|
|
33
|
+
* ]},
|
|
34
|
+
* ]}
|
|
35
|
+
* />
|
|
36
|
+
*
|
|
37
|
+
* @example Composable
|
|
38
|
+
* <CommandPalette.Root bind:open={paletteOpen} trigger="mod+k">
|
|
39
|
+
* <CommandPalette.Input placeholder="Search..." />
|
|
40
|
+
* <CommandPalette.List>
|
|
41
|
+
* <CommandPalette.Group heading="Recent">
|
|
42
|
+
* <CommandPalette.Item value="pipeline-1" onselect={...}>Customer ETL</CommandPalette.Item>
|
|
43
|
+
* </CommandPalette.Group>
|
|
44
|
+
* <CommandPalette.Empty>No results found</CommandPalette.Empty>
|
|
45
|
+
* </CommandPalette.List>
|
|
46
|
+
* </CommandPalette.Root>
|
|
47
|
+
*/
|
|
48
|
+
declare const CommandPalette: import("svelte").Component<{
|
|
49
|
+
open?: boolean;
|
|
50
|
+
trigger?: string;
|
|
51
|
+
placeholder?: string;
|
|
52
|
+
sections?: any[];
|
|
53
|
+
shouldFilter?: boolean;
|
|
54
|
+
loop?: boolean;
|
|
55
|
+
onopenchange?: any;
|
|
56
|
+
class?: string;
|
|
57
|
+
children?: any;
|
|
58
|
+
} & Record<string, any>, {}, "open">;
|
|
59
|
+
type $$ComponentProps = {
|
|
60
|
+
open?: boolean;
|
|
61
|
+
trigger?: string;
|
|
62
|
+
placeholder?: string;
|
|
63
|
+
sections?: any[];
|
|
64
|
+
shouldFilter?: boolean;
|
|
65
|
+
loop?: boolean;
|
|
66
|
+
onopenchange?: any;
|
|
67
|
+
class?: string;
|
|
68
|
+
children?: any;
|
|
69
|
+
} & Record<string, any>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export default ConditionTable;
|
|
2
|
+
export type SelectOption = {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
};
|
|
6
|
+
export type ComboboxItem = {
|
|
7
|
+
value: string;
|
|
8
|
+
label: string;
|
|
9
|
+
group?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
};
|
|
12
|
+
export type ColumnDef = {
|
|
13
|
+
key: string;
|
|
14
|
+
label: string;
|
|
15
|
+
type: "text" | "select" | "combobox";
|
|
16
|
+
width?: string;
|
|
17
|
+
options?: SelectOption[];
|
|
18
|
+
items?: ComboboxItem[];
|
|
19
|
+
placeholder?: string;
|
|
20
|
+
};
|
|
21
|
+
type ConditionTable = {
|
|
22
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
23
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* ConditionTable
|
|
27
|
+
*
|
|
28
|
+
* Configurable condition-row editor for building rule-based filters.
|
|
29
|
+
* Composes Input, Select, and Button primitives into an interactive grid.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* <ConditionTable
|
|
33
|
+
* columns={[
|
|
34
|
+
* { key: 'field', label: 'Field', type: 'text', placeholder: 'data.field_name' },
|
|
35
|
+
* { key: 'operator', label: 'Operator', type: 'select', width: '10rem', options: operators },
|
|
36
|
+
* { key: 'value', label: 'Value', type: 'text', placeholder: 'value' },
|
|
37
|
+
* ]}
|
|
38
|
+
* bind:conditions
|
|
39
|
+
* onchange={handleChange}
|
|
40
|
+
* />
|
|
41
|
+
*/
|
|
42
|
+
declare const ConditionTable: import("svelte").Component<{
|
|
43
|
+
conditions?: any[];
|
|
44
|
+
columns?: any[];
|
|
45
|
+
maxRows?: number;
|
|
46
|
+
disabled?: boolean;
|
|
47
|
+
emptyMessage?: string;
|
|
48
|
+
addLabel?: string;
|
|
49
|
+
onchange?: any;
|
|
50
|
+
class?: string;
|
|
51
|
+
} & Record<string, any>, {}, "conditions">;
|
|
52
|
+
type $$ComponentProps = {
|
|
53
|
+
conditions?: any[];
|
|
54
|
+
columns?: any[];
|
|
55
|
+
maxRows?: number;
|
|
56
|
+
disabled?: boolean;
|
|
57
|
+
emptyMessage?: string;
|
|
58
|
+
addLabel?: string;
|
|
59
|
+
onchange?: any;
|
|
60
|
+
class?: string;
|
|
61
|
+
} & Record<string, any>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export default EmptyState;
|
|
2
|
+
type EmptyState = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* EmptyState
|
|
8
|
+
*
|
|
9
|
+
* Shown when there's nothing to display. Different contexts need different copy.
|
|
10
|
+
* Consumes --empty-* tokens from components.css.
|
|
11
|
+
*
|
|
12
|
+
* @example First use
|
|
13
|
+
* <EmptyState
|
|
14
|
+
* heading="Create your first project"
|
|
15
|
+
* body="Projects organize your work into focused spaces."
|
|
16
|
+
* actionLabel="NEW PROJECT"
|
|
17
|
+
* onaction={() => create()}
|
|
18
|
+
* >
|
|
19
|
+
* {#snippet icon()}
|
|
20
|
+
* <PhPlusCircle size={48} />
|
|
21
|
+
* {/snippet}
|
|
22
|
+
* </EmptyState>
|
|
23
|
+
*
|
|
24
|
+
* @example Error recovery
|
|
25
|
+
* <EmptyState
|
|
26
|
+
* heading="Couldn't load your projects"
|
|
27
|
+
* body="The server didn't respond. Check your connection."
|
|
28
|
+
* actionLabel="TRY AGAIN"
|
|
29
|
+
* actionVariant="secondary"
|
|
30
|
+
* onaction={() => retry()}
|
|
31
|
+
* >
|
|
32
|
+
* {#snippet icon()}
|
|
33
|
+
* <PhWarningCircle size={48} />
|
|
34
|
+
* {/snippet}
|
|
35
|
+
* </EmptyState>
|
|
36
|
+
*/
|
|
37
|
+
declare const EmptyState: import("svelte").Component<{
|
|
38
|
+
heading: any;
|
|
39
|
+
body?: any;
|
|
40
|
+
actionLabel?: any;
|
|
41
|
+
actionVariant?: string;
|
|
42
|
+
onaction?: any;
|
|
43
|
+
class?: string;
|
|
44
|
+
icon?: any;
|
|
45
|
+
} & Record<string, any>, {}, "">;
|
|
46
|
+
type $$ComponentProps = {
|
|
47
|
+
heading: any;
|
|
48
|
+
body?: any;
|
|
49
|
+
actionLabel?: any;
|
|
50
|
+
actionVariant?: string;
|
|
51
|
+
onaction?: any;
|
|
52
|
+
class?: string;
|
|
53
|
+
icon?: any;
|
|
54
|
+
} & Record<string, any>;
|