ui-ingredients 0.0.22 → 0.0.24
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/signature-pad/clear-trigger.svelte +20 -0
- package/dist/signature-pad/clear-trigger.svelte.d.ts +18 -0
- package/dist/signature-pad/context.svelte.d.ts +3 -0
- package/dist/signature-pad/context.svelte.js +2 -0
- package/dist/signature-pad/control.svelte +20 -0
- package/dist/signature-pad/control.svelte.d.ts +18 -0
- package/dist/signature-pad/create-signature-pad.svelte.d.ts +7 -0
- package/dist/signature-pad/create-signature-pad.svelte.js +17 -0
- package/dist/signature-pad/current-segment-path.svelte +29 -0
- package/dist/signature-pad/current-segment-path.svelte.d.ts +18 -0
- package/dist/signature-pad/guide.svelte +20 -0
- package/dist/signature-pad/guide.svelte.d.ts +18 -0
- package/dist/signature-pad/hidden-input.svelte +20 -0
- package/dist/signature-pad/hidden-input.svelte.d.ts +18 -0
- package/dist/signature-pad/index.d.ts +10 -0
- package/dist/signature-pad/index.js +1 -0
- package/dist/signature-pad/label.svelte +20 -0
- package/dist/signature-pad/label.svelte.d.ts +18 -0
- package/dist/signature-pad/root.svelte +55 -0
- package/dist/signature-pad/root.svelte.d.ts +18 -0
- package/dist/signature-pad/segment-path.svelte +22 -0
- package/dist/signature-pad/segment-path.svelte.d.ts +18 -0
- package/dist/signature-pad/segment.svelte +20 -0
- package/dist/signature-pad/segment.svelte.d.ts +18 -0
- package/dist/signature-pad/signature-pad.d.ts +10 -0
- package/dist/signature-pad/signature-pad.js +10 -0
- package/dist/steps/completed-content.svelte +27 -0
- package/dist/steps/completed-content.svelte.d.ts +18 -0
- package/dist/steps/index.d.ts +1 -0
- package/dist/steps/steps.d.ts +1 -0
- package/dist/steps/steps.js +1 -0
- package/dist/tree-view/branch-content.svelte +21 -0
- package/dist/tree-view/branch-content.svelte.d.ts +18 -0
- package/dist/tree-view/branch-control.svelte +21 -0
- package/dist/tree-view/branch-control.svelte.d.ts +18 -0
- package/dist/tree-view/branch-indicator.svelte +21 -0
- package/dist/tree-view/branch-indicator.svelte.d.ts +18 -0
- package/dist/tree-view/branch-text.svelte +21 -0
- package/dist/tree-view/branch-text.svelte.d.ts +18 -0
- package/dist/tree-view/branch-trigger.svelte +21 -0
- package/dist/tree-view/branch-trigger.svelte.d.ts +18 -0
- package/dist/tree-view/branch.svelte +40 -0
- package/dist/tree-view/branch.svelte.d.ts +18 -0
- package/dist/tree-view/context.svelte.d.ts +6 -0
- package/dist/tree-view/context.svelte.js +4 -0
- package/dist/tree-view/create-tree-view.svelte.d.ts +7 -0
- package/dist/tree-view/create-tree-view.svelte.js +17 -0
- package/dist/tree-view/index.d.ts +13 -0
- package/dist/tree-view/index.js +1 -0
- package/dist/tree-view/item-indicator.svelte +21 -0
- package/dist/tree-view/item-indicator.svelte.d.ts +18 -0
- package/dist/tree-view/item-text.svelte +21 -0
- package/dist/tree-view/item-text.svelte.d.ts +18 -0
- package/dist/tree-view/item.svelte +39 -0
- package/dist/tree-view/item.svelte.d.ts +18 -0
- package/dist/tree-view/label.svelte +20 -0
- package/dist/tree-view/label.svelte.d.ts +18 -0
- package/dist/tree-view/root.svelte +54 -0
- package/dist/tree-view/root.svelte.d.ts +18 -0
- package/dist/tree-view/tree-view.d.ts +13 -0
- package/dist/tree-view/tree-view.js +13 -0
- package/dist/tree-view/tree.svelte +20 -0
- package/dist/tree-view/tree.svelte.d.ts +18 -0
- package/package.json +1 -2
- package/dist/signature-pad/.gitkeep +0 -0
- package/dist/tree-view/.gitkeep +0 -0
package/README.md
CHANGED
@@ -62,7 +62,7 @@ npm install ui-ingredients
|
|
62
62
|
- 🟢 RatingGroup
|
63
63
|
- 🟢 Select
|
64
64
|
- 🟢 SegmentGroup
|
65
|
-
-
|
65
|
+
- 🟢 SignaturePad
|
66
66
|
- 🟢 Slider
|
67
67
|
- ⚪ Splitter
|
68
68
|
- 🟢 Steps
|
@@ -75,6 +75,6 @@ npm install ui-ingredients
|
|
75
75
|
- 🟢 ToggleGroup
|
76
76
|
- 🟢 Tooltip
|
77
77
|
- ⚪ Tour
|
78
|
-
-
|
78
|
+
- 🟢 TreeView
|
79
79
|
|
80
80
|
View components demo [here](https://ui-ingredients.vercel.app/)
|
package/dist/index.d.ts
CHANGED
@@ -25,6 +25,7 @@ export * from './radio-group/index.js';
|
|
25
25
|
export * from './rating-group/index.js';
|
26
26
|
export * from './segment-group/index.js';
|
27
27
|
export * from './select/index.js';
|
28
|
+
export * from './signature-pad/index.js';
|
28
29
|
export * from './slider/index.js';
|
29
30
|
export * from './steps/index.js';
|
30
31
|
export * from './switch/index.js';
|
@@ -34,3 +35,4 @@ export * from './timer/index.js';
|
|
34
35
|
export * from './toast/index.js';
|
35
36
|
export * from './toggle-group/index.js';
|
36
37
|
export * from './tooltip/index.js';
|
38
|
+
export * from './tree-view/index.js';
|
package/dist/index.js
CHANGED
@@ -25,6 +25,7 @@ export * from './radio-group/index.js';
|
|
25
25
|
export * from './rating-group/index.js';
|
26
26
|
export * from './segment-group/index.js';
|
27
27
|
export * from './select/index.js';
|
28
|
+
export * from './signature-pad/index.js';
|
28
29
|
export * from './slider/index.js';
|
29
30
|
export * from './steps/index.js';
|
30
31
|
export * from './switch/index.js';
|
@@ -34,3 +35,4 @@ export * from './timer/index.js';
|
|
34
35
|
export * from './toast/index.js';
|
35
36
|
export * from './toggle-group/index.js';
|
36
37
|
export * from './tooltip/index.js';
|
38
|
+
export * from './tree-view/index.js';
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface SignaturePadClearTriggerProps extends HtmlProps<'button'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '@zag-js/svelte';
|
9
|
+
import {signaturePadContext} from './context.svelte.js';
|
10
|
+
|
11
|
+
let {children,...props}: SignaturePadClearTriggerProps = $props();
|
12
|
+
|
13
|
+
let signaturePad = signaturePadContext.get();
|
14
|
+
|
15
|
+
let attrs = $derived(mergeProps(props, signaturePad.getClearTriggerProps()));
|
16
|
+
</script>
|
17
|
+
|
18
|
+
<button type="button" {...attrs} >
|
19
|
+
{@render children?.()}
|
20
|
+
</button>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
3
|
+
$$bindings?: Bindings;
|
4
|
+
} & Exports;
|
5
|
+
(internal: unknown, props: Props & {
|
6
|
+
$$events?: Events;
|
7
|
+
$$slots?: Slots;
|
8
|
+
}): Exports & {
|
9
|
+
$set?: any;
|
10
|
+
$on?: any;
|
11
|
+
};
|
12
|
+
z_$$bindings?: Bindings;
|
13
|
+
}
|
14
|
+
declare const ClearTrigger: $$__sveltets_2_IsomorphicComponent<SignaturePadClearTriggerProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type ClearTrigger = InstanceType<typeof ClearTrigger>;
|
18
|
+
export default ClearTrigger;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface SignaturePadControlProps extends HtmlProps<'div'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '@zag-js/svelte';
|
9
|
+
import {signaturePadContext} from './context.svelte.js';
|
10
|
+
|
11
|
+
let {children, ...props}: SignaturePadControlProps = $props();
|
12
|
+
|
13
|
+
let signaturePad = signaturePadContext.get();
|
14
|
+
|
15
|
+
let attrs = $derived(mergeProps(props, signaturePad.getControlProps()));
|
16
|
+
</script>
|
17
|
+
|
18
|
+
<div {...attrs}>
|
19
|
+
{@render children?.()}
|
20
|
+
</div>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
3
|
+
$$bindings?: Bindings;
|
4
|
+
} & Exports;
|
5
|
+
(internal: unknown, props: Props & {
|
6
|
+
$$events?: Events;
|
7
|
+
$$slots?: Slots;
|
8
|
+
}): Exports & {
|
9
|
+
$set?: any;
|
10
|
+
$on?: any;
|
11
|
+
};
|
12
|
+
z_$$bindings?: Bindings;
|
13
|
+
}
|
14
|
+
declare const Control: $$__sveltets_2_IsomorphicComponent<SignaturePadControlProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type Control = InstanceType<typeof Control>;
|
18
|
+
export default Control;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import * as signaturePad from '@zag-js/signature-pad';
|
2
|
+
export interface CreateSignaturePadProps extends Omit<signaturePad.Context, 'id' | 'dir' | 'getRootNode'> {
|
3
|
+
id?: string | null;
|
4
|
+
}
|
5
|
+
export interface CreateSignaturePadReturn extends signaturePad.Api {
|
6
|
+
}
|
7
|
+
export declare function createSignaturePad(props: CreateSignaturePadProps): CreateSignaturePadReturn;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { getEnvironmentContext } from '../environment-provider/context.svelte.js';
|
2
|
+
import { getLocaleContext } from '../locale-provider/context.svelte.js';
|
3
|
+
import { createUniqueId } from '../utils.svelte.js';
|
4
|
+
import * as signaturePad from '@zag-js/signature-pad';
|
5
|
+
import { normalizeProps, reflect, useMachine } from '@zag-js/svelte';
|
6
|
+
export function createSignaturePad(props) {
|
7
|
+
const locale = getLocaleContext();
|
8
|
+
const environment = getEnvironmentContext();
|
9
|
+
const [state, send] = useMachine(signaturePad.machine({
|
10
|
+
...props,
|
11
|
+
id: props.id ?? createUniqueId(),
|
12
|
+
dir: locale?.dir,
|
13
|
+
getRootNode: environment?.getRootNode,
|
14
|
+
}));
|
15
|
+
const api = $derived(reflect(() => signaturePad.connect(state, send, normalizeProps)));
|
16
|
+
return api;
|
17
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface SignaturePadCurrentSegmentPathProps extends HtmlProps<'path'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '@zag-js/svelte';
|
9
|
+
import {signaturePadContext} from './context.svelte.js';
|
10
|
+
|
11
|
+
let {path, children, ...props}: SignaturePadCurrentSegmentPathProps = $props();
|
12
|
+
|
13
|
+
let signaturePad = signaturePadContext.get();
|
14
|
+
|
15
|
+
let attrs = $derived(
|
16
|
+
mergeProps(
|
17
|
+
props,
|
18
|
+
signaturePad.getSegmentPathProps({
|
19
|
+
path: signaturePad.currentPath ?? '',
|
20
|
+
}),
|
21
|
+
),
|
22
|
+
);
|
23
|
+
</script>
|
24
|
+
|
25
|
+
{#if signaturePad.currentPath}
|
26
|
+
<path {...attrs}>
|
27
|
+
{@render children?.()}
|
28
|
+
</path>
|
29
|
+
{/if}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
3
|
+
$$bindings?: Bindings;
|
4
|
+
} & Exports;
|
5
|
+
(internal: unknown, props: Props & {
|
6
|
+
$$events?: Events;
|
7
|
+
$$slots?: Slots;
|
8
|
+
}): Exports & {
|
9
|
+
$set?: any;
|
10
|
+
$on?: any;
|
11
|
+
};
|
12
|
+
z_$$bindings?: Bindings;
|
13
|
+
}
|
14
|
+
declare const CurrentSegmentPath: $$__sveltets_2_IsomorphicComponent<SignaturePadCurrentSegmentPathProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type CurrentSegmentPath = InstanceType<typeof CurrentSegmentPath>;
|
18
|
+
export default CurrentSegmentPath;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface SignaturePadGuideProps extends HtmlProps<'div'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '@zag-js/svelte';
|
9
|
+
import {signaturePadContext} from './context.svelte.js';
|
10
|
+
|
11
|
+
let {children,...props}: SignaturePadGuideProps = $props();
|
12
|
+
|
13
|
+
let signaturePad = signaturePadContext.get();
|
14
|
+
|
15
|
+
let attrs = $derived(mergeProps(props, signaturePad.getGuideProps()));
|
16
|
+
</script>
|
17
|
+
|
18
|
+
<div {...attrs} >
|
19
|
+
{@render children?.()}
|
20
|
+
</div>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
3
|
+
$$bindings?: Bindings;
|
4
|
+
} & Exports;
|
5
|
+
(internal: unknown, props: Props & {
|
6
|
+
$$events?: Events;
|
7
|
+
$$slots?: Slots;
|
8
|
+
}): Exports & {
|
9
|
+
$set?: any;
|
10
|
+
$on?: any;
|
11
|
+
};
|
12
|
+
z_$$bindings?: Bindings;
|
13
|
+
}
|
14
|
+
declare const Guide: $$__sveltets_2_IsomorphicComponent<SignaturePadGuideProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type Guide = InstanceType<typeof Guide>;
|
18
|
+
export default Guide;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {Assign, HtmlProps} from '../types.js';
|
3
|
+
import type {HiddenInputProps} from '@zag-js/signature-pad';
|
4
|
+
|
5
|
+
export interface SignaturePadHiddenInputProps
|
6
|
+
extends Assign<HtmlProps<'input'>, HiddenInputProps> {}
|
7
|
+
</script>
|
8
|
+
|
9
|
+
<script lang="ts">
|
10
|
+
import {mergeProps} from '@zag-js/svelte';
|
11
|
+
import {signaturePadContext} from './context.svelte.js';
|
12
|
+
|
13
|
+
let {value, ...props}: SignaturePadHiddenInputProps = $props();
|
14
|
+
|
15
|
+
let signaturePad = signaturePadContext.get();
|
16
|
+
|
17
|
+
let attrs = $derived(mergeProps(props, signaturePad.getHiddenInputProps({value})));
|
18
|
+
</script>
|
19
|
+
|
20
|
+
<input {...attrs} />
|
@@ -0,0 +1,18 @@
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
3
|
+
$$bindings?: Bindings;
|
4
|
+
} & Exports;
|
5
|
+
(internal: unknown, props: Props & {
|
6
|
+
$$events?: Events;
|
7
|
+
$$slots?: Slots;
|
8
|
+
}): Exports & {
|
9
|
+
$set?: any;
|
10
|
+
$on?: any;
|
11
|
+
};
|
12
|
+
z_$$bindings?: Bindings;
|
13
|
+
}
|
14
|
+
declare const HiddenInput: $$__sveltets_2_IsomorphicComponent<SignaturePadHiddenInputProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type HiddenInput = InstanceType<typeof HiddenInput>;
|
18
|
+
export default HiddenInput;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export * as SignaturePad from './signature-pad.js';
|
2
|
+
export type { SignaturePadClearTriggerProps } from './clear-trigger.svelte';
|
3
|
+
export type { SignaturePadControlProps } from './control.svelte';
|
4
|
+
export type { SignaturePadCurrentSegmentPathProps } from './current-segment-path.svelte';
|
5
|
+
export type { SignaturePadGuideProps } from './guide.svelte';
|
6
|
+
export type { SignaturePadHiddenInputProps } from './hidden-input.svelte';
|
7
|
+
export type { SignaturePadLabelProps } from './label.svelte';
|
8
|
+
export type { SignaturePadProps } from './root.svelte';
|
9
|
+
export type { SignaturePadSegmentPathProps } from './segment-path.svelte';
|
10
|
+
export type { SignaturePadSegmentProps } from './segment.svelte';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * as SignaturePad from './signature-pad.js';
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface SignaturePadLabelProps extends HtmlProps<'label'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '@zag-js/svelte';
|
9
|
+
import {signaturePadContext} from './context.svelte.js';
|
10
|
+
|
11
|
+
let {children, ...props}: SignaturePadLabelProps = $props();
|
12
|
+
|
13
|
+
let signaturePad = signaturePadContext.get();
|
14
|
+
|
15
|
+
let attrs = $derived(mergeProps(props, signaturePad.getLabelProps()));
|
16
|
+
</script>
|
17
|
+
|
18
|
+
<label {...attrs}>
|
19
|
+
{@render children?.()}
|
20
|
+
</label>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
3
|
+
$$bindings?: Bindings;
|
4
|
+
} & Exports;
|
5
|
+
(internal: unknown, props: Props & {
|
6
|
+
$$events?: Events;
|
7
|
+
$$slots?: Slots;
|
8
|
+
}): Exports & {
|
9
|
+
$set?: any;
|
10
|
+
$on?: any;
|
11
|
+
};
|
12
|
+
z_$$bindings?: Bindings;
|
13
|
+
}
|
14
|
+
declare const Label: $$__sveltets_2_IsomorphicComponent<SignaturePadLabelProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type Label = InstanceType<typeof Label>;
|
18
|
+
export default Label;
|
@@ -0,0 +1,55 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {Assign, HtmlProps} from '../types.js';
|
3
|
+
import type {Snippet} from 'svelte';
|
4
|
+
import type {
|
5
|
+
CreateSignaturePadProps,
|
6
|
+
CreateSignaturePadReturn,
|
7
|
+
} from './create-signature-pad.svelte.js';
|
8
|
+
|
9
|
+
export interface SignaturePadProps
|
10
|
+
extends Assign<Omit<HtmlProps<'div'>, 'children'>, CreateSignaturePadProps> {
|
11
|
+
children?: Snippet<[signaturePad: CreateSignaturePadReturn]>;
|
12
|
+
}
|
13
|
+
</script>
|
14
|
+
|
15
|
+
<script lang="ts">
|
16
|
+
import {mergeProps} from '@zag-js/svelte';
|
17
|
+
import {signaturePadContext} from './context.svelte.js';
|
18
|
+
import {createSignaturePad} from './create-signature-pad.svelte.js';
|
19
|
+
|
20
|
+
let {
|
21
|
+
id,
|
22
|
+
ids,
|
23
|
+
name,
|
24
|
+
drawing,
|
25
|
+
required,
|
26
|
+
disabled,
|
27
|
+
readOnly,
|
28
|
+
translations,
|
29
|
+
onDraw,
|
30
|
+
onDrawEnd,
|
31
|
+
children,
|
32
|
+
...props
|
33
|
+
}: SignaturePadProps = $props();
|
34
|
+
|
35
|
+
let signaturePad = createSignaturePad({
|
36
|
+
id,
|
37
|
+
ids,
|
38
|
+
name,
|
39
|
+
drawing,
|
40
|
+
required,
|
41
|
+
disabled,
|
42
|
+
readOnly,
|
43
|
+
translations,
|
44
|
+
onDraw,
|
45
|
+
onDrawEnd,
|
46
|
+
});
|
47
|
+
|
48
|
+
let attrs = $derived(mergeProps(props, signaturePad.getRootProps()));
|
49
|
+
|
50
|
+
signaturePadContext.set(signaturePad);
|
51
|
+
</script>
|
52
|
+
|
53
|
+
<div {...attrs}>
|
54
|
+
{@render children?.(signaturePad)}
|
55
|
+
</div>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
3
|
+
$$bindings?: Bindings;
|
4
|
+
} & Exports;
|
5
|
+
(internal: unknown, props: Props & {
|
6
|
+
$$events?: Events;
|
7
|
+
$$slots?: Slots;
|
8
|
+
}): Exports & {
|
9
|
+
$set?: any;
|
10
|
+
$on?: any;
|
11
|
+
};
|
12
|
+
z_$$bindings?: Bindings;
|
13
|
+
}
|
14
|
+
declare const Root: $$__sveltets_2_IsomorphicComponent<SignaturePadProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type Root = InstanceType<typeof Root>;
|
18
|
+
export default Root;
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {Assign, HtmlProps} from '../types.js';
|
3
|
+
import type {SegmentPathProps} from '@zag-js/signature-pad';
|
4
|
+
|
5
|
+
export interface SignaturePadSegmentPathProps
|
6
|
+
extends Assign<HtmlProps<'path'>, SegmentPathProps> {}
|
7
|
+
</script>
|
8
|
+
|
9
|
+
<script lang="ts">
|
10
|
+
import {mergeProps} from '@zag-js/svelte';
|
11
|
+
import {signaturePadContext} from './context.svelte.js';
|
12
|
+
|
13
|
+
let {path, children, ...props}: SignaturePadSegmentPathProps = $props();
|
14
|
+
|
15
|
+
let signaturePad = signaturePadContext.get();
|
16
|
+
|
17
|
+
let attrs = $derived(mergeProps(props, signaturePad.getSegmentPathProps({path})));
|
18
|
+
</script>
|
19
|
+
|
20
|
+
<path {...attrs}>
|
21
|
+
{@render children?.()}
|
22
|
+
</path>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
3
|
+
$$bindings?: Bindings;
|
4
|
+
} & Exports;
|
5
|
+
(internal: unknown, props: Props & {
|
6
|
+
$$events?: Events;
|
7
|
+
$$slots?: Slots;
|
8
|
+
}): Exports & {
|
9
|
+
$set?: any;
|
10
|
+
$on?: any;
|
11
|
+
};
|
12
|
+
z_$$bindings?: Bindings;
|
13
|
+
}
|
14
|
+
declare const SegmentPath: $$__sveltets_2_IsomorphicComponent<SignaturePadSegmentPathProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type SegmentPath = InstanceType<typeof SegmentPath>;
|
18
|
+
export default SegmentPath;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface SignaturePadSegmentProps extends HtmlProps<'svg'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '@zag-js/svelte';
|
9
|
+
import {signaturePadContext} from './context.svelte.js';
|
10
|
+
|
11
|
+
let {children, ...props}: SignaturePadSegmentProps = $props();
|
12
|
+
|
13
|
+
let signaturePad = signaturePadContext.get();
|
14
|
+
|
15
|
+
let attrs = $derived(mergeProps(props, signaturePad.getSegmentProps()));
|
16
|
+
</script>
|
17
|
+
|
18
|
+
<svg {...attrs}>
|
19
|
+
{@render children?.()}
|
20
|
+
</svg>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
3
|
+
$$bindings?: Bindings;
|
4
|
+
} & Exports;
|
5
|
+
(internal: unknown, props: Props & {
|
6
|
+
$$events?: Events;
|
7
|
+
$$slots?: Slots;
|
8
|
+
}): Exports & {
|
9
|
+
$set?: any;
|
10
|
+
$on?: any;
|
11
|
+
};
|
12
|
+
z_$$bindings?: Bindings;
|
13
|
+
}
|
14
|
+
declare const Segment: $$__sveltets_2_IsomorphicComponent<SignaturePadSegmentProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type Segment = InstanceType<typeof Segment>;
|
18
|
+
export default Segment;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export { anatomy } from '@zag-js/signature-pad';
|
2
|
+
export { default as ClearTrigger } from './clear-trigger.svelte';
|
3
|
+
export { default as Control } from './control.svelte';
|
4
|
+
export { default as CurrentSegmentPath } from './current-segment-path.svelte';
|
5
|
+
export { default as Guide } from './guide.svelte';
|
6
|
+
export { default as HiddenInput } from './hidden-input.svelte';
|
7
|
+
export { default as Label } from './label.svelte';
|
8
|
+
export { default as Root } from './root.svelte';
|
9
|
+
export { default as SegmentPath } from './segment-path.svelte';
|
10
|
+
export { default as Segment } from './segment.svelte';
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export { anatomy } from '@zag-js/signature-pad';
|
2
|
+
export { default as ClearTrigger } from './clear-trigger.svelte';
|
3
|
+
export { default as Control } from './control.svelte';
|
4
|
+
export { default as CurrentSegmentPath } from './current-segment-path.svelte';
|
5
|
+
export { default as Guide } from './guide.svelte';
|
6
|
+
export { default as HiddenInput } from './hidden-input.svelte';
|
7
|
+
export { default as Label } from './label.svelte';
|
8
|
+
export { default as Root } from './root.svelte';
|
9
|
+
export { default as SegmentPath } from './segment-path.svelte';
|
10
|
+
export { default as Segment } from './segment.svelte';
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface StepsCompletedContentProps extends HtmlProps<'div'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '@zag-js/svelte';
|
9
|
+
import {stepsContext} from './context.svelte.js';
|
10
|
+
|
11
|
+
let {children, ...props}: StepsCompletedContentProps = $props();
|
12
|
+
|
13
|
+
let steps = stepsContext.get();
|
14
|
+
|
15
|
+
let attrs = $derived(
|
16
|
+
mergeProps(
|
17
|
+
props,
|
18
|
+
steps.getContentProps({
|
19
|
+
index: steps.count,
|
20
|
+
}),
|
21
|
+
),
|
22
|
+
);
|
23
|
+
</script>
|
24
|
+
|
25
|
+
<div {...attrs}>
|
26
|
+
{@render children?.()}
|
27
|
+
</div>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
3
|
+
$$bindings?: Bindings;
|
4
|
+
} & Exports;
|
5
|
+
(internal: unknown, props: Props & {
|
6
|
+
$$events?: Events;
|
7
|
+
$$slots?: Slots;
|
8
|
+
}): Exports & {
|
9
|
+
$set?: any;
|
10
|
+
$on?: any;
|
11
|
+
};
|
12
|
+
z_$$bindings?: Bindings;
|
13
|
+
}
|
14
|
+
declare const CompletedContent: $$__sveltets_2_IsomorphicComponent<StepsCompletedContentProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type CompletedContent = InstanceType<typeof CompletedContent>;
|
18
|
+
export default CompletedContent;
|
package/dist/steps/index.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
export * as Steps from './steps.js';
|
2
|
+
export type { StepsCompletedContentProps } from './completed-content.svelte';
|
2
3
|
export type { StepsContentProps } from './content.svelte';
|
3
4
|
export type { StepsIndicatorProps } from './indicator.svelte';
|
4
5
|
export type { StepsItemProps } from './item.svelte';
|
package/dist/steps/steps.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
export { anatomy } from '@zag-js/steps';
|
2
|
+
export { default as CompletedContent } from './completed-content.svelte';
|
2
3
|
export { default as Content } from './content.svelte';
|
3
4
|
export { default as Indicator } from './indicator.svelte';
|
4
5
|
export { default as Item } from './item.svelte';
|
package/dist/steps/steps.js
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
export { anatomy } from '@zag-js/steps';
|
2
|
+
export { default as CompletedContent } from './completed-content.svelte';
|
2
3
|
export { default as Content } from './content.svelte';
|
3
4
|
export { default as Indicator } from './indicator.svelte';
|
4
5
|
export { default as Item } from './item.svelte';
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface TreeViewBranchContentProps extends HtmlProps<'div'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '@zag-js/svelte';
|
9
|
+
import {treeViewBranchPropsContext, treeViewContext} from './context.svelte.js';
|
10
|
+
|
11
|
+
let {children, ...props}: TreeViewBranchContentProps = $props();
|
12
|
+
|
13
|
+
let treeView = treeViewContext.get();
|
14
|
+
let branchProps = treeViewBranchPropsContext.get();
|
15
|
+
|
16
|
+
let attrs = $derived(mergeProps(props, treeView.getBranchContentProps(branchProps)));
|
17
|
+
</script>
|
18
|
+
|
19
|
+
<div {...attrs}>
|
20
|
+
{@render children?.()}
|
21
|
+
</div>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
3
|
+
$$bindings?: Bindings;
|
4
|
+
} & Exports;
|
5
|
+
(internal: unknown, props: Props & {
|
6
|
+
$$events?: Events;
|
7
|
+
$$slots?: Slots;
|
8
|
+
}): Exports & {
|
9
|
+
$set?: any;
|
10
|
+
$on?: any;
|
11
|
+
};
|
12
|
+
z_$$bindings?: Bindings;
|
13
|
+
}
|
14
|
+
declare const BranchContent: $$__sveltets_2_IsomorphicComponent<TreeViewBranchContentProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type BranchContent = InstanceType<typeof BranchContent>;
|
18
|
+
export default BranchContent;
|