ui-ingredients 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +4 -4
- package/dist/index.d.ts +11 -0
- package/dist/index.js +8 -0
- package/dist/qr-code/context.svelte.d.ts +8 -0
- package/dist/qr-code/context.svelte.js +14 -0
- package/dist/qr-code/frame.svelte +21 -0
- package/dist/qr-code/frame.svelte.d.ts +22 -0
- package/dist/qr-code/index.d.ts +4 -0
- package/dist/qr-code/index.js +4 -0
- package/dist/qr-code/overlay.svelte +21 -0
- package/dist/qr-code/overlay.svelte.d.ts +22 -0
- package/dist/qr-code/pattern.svelte +21 -0
- package/dist/qr-code/pattern.svelte.d.ts +22 -0
- package/dist/qr-code/root.svelte +48 -0
- package/dist/qr-code/root.svelte.d.ts +25 -0
- package/dist/tags-input/clear-trigger.svelte +21 -0
- package/dist/tags-input/clear-trigger.svelte.d.ts +22 -0
- package/dist/tags-input/context.svelte.d.ts +10 -0
- package/dist/tags-input/context.svelte.js +20 -0
- package/dist/tags-input/control.svelte +21 -0
- package/dist/tags-input/control.svelte.d.ts +22 -0
- package/dist/tags-input/hidden-input.svelte +19 -0
- package/dist/tags-input/hidden-input.svelte.d.ts +22 -0
- package/dist/tags-input/index.d.ts +11 -0
- package/dist/tags-input/index.js +11 -0
- package/dist/tags-input/input.svelte +19 -0
- package/dist/tags-input/input.svelte.d.ts +22 -0
- package/dist/tags-input/item-delete-trigger.svelte +23 -0
- package/dist/tags-input/item-delete-trigger.svelte.d.ts +22 -0
- package/dist/tags-input/item-input.svelte +20 -0
- package/dist/tags-input/item-input.svelte.d.ts +22 -0
- package/dist/tags-input/item-preview.svelte +22 -0
- package/dist/tags-input/item-preview.svelte.d.ts +22 -0
- package/dist/tags-input/item-text.svelte +22 -0
- package/dist/tags-input/item-text.svelte.d.ts +22 -0
- package/dist/tags-input/item.svelte +37 -0
- package/dist/tags-input/item.svelte.d.ts +23 -0
- package/dist/tags-input/label.svelte +21 -0
- package/dist/tags-input/label.svelte.d.ts +22 -0
- package/dist/tags-input/root.svelte +97 -0
- package/dist/tags-input/root.svelte.d.ts +25 -0
- package/dist/timer/action-trigger.svelte +23 -0
- package/dist/timer/action-trigger.svelte.d.ts +23 -0
- package/dist/timer/context.svelte.d.ts +10 -0
- package/dist/timer/context.svelte.js +20 -0
- package/dist/timer/index.d.ts +6 -0
- package/dist/timer/index.js +6 -0
- package/dist/timer/item-label.svelte +22 -0
- package/dist/timer/item-label.svelte.d.ts +22 -0
- package/dist/timer/item-value.svelte +26 -0
- package/dist/timer/item-value.svelte.d.ts +22 -0
- package/dist/timer/item.svelte +24 -0
- package/dist/timer/item.svelte.d.ts +23 -0
- package/dist/timer/root.svelte +54 -0
- package/dist/timer/root.svelte.d.ts +25 -0
- package/dist/timer/separator.svelte +21 -0
- package/dist/timer/separator.svelte.d.ts +22 -0
- package/package.json +1 -1
- package/dist/qr-code/.gitkeep +0 -0
- package/dist/tags-input/.gitkeep +0 -0
- package/dist/timer/.gitkeep +0 -0
@@ -0,0 +1,54 @@
|
|
1
|
+
<script lang="ts" context="module">
|
2
|
+
import type {Assign, OptionalId, WithoutChildren} from '../types.js';
|
3
|
+
import type {Snippet} from 'svelte';
|
4
|
+
import type {SvelteHTMLElements} from 'svelte/elements';
|
5
|
+
import type {CreateTimerContextProps, CreateTimerContextReturn} from './context.svelte.js';
|
6
|
+
|
7
|
+
export interface TimerProps
|
8
|
+
extends Assign<
|
9
|
+
WithoutChildren<SvelteHTMLElements['div']>,
|
10
|
+
OptionalId<CreateTimerContextProps>
|
11
|
+
> {
|
12
|
+
children?: Snippet<[CreateTimerContextReturn]>;
|
13
|
+
}
|
14
|
+
</script>
|
15
|
+
|
16
|
+
<script lang="ts">
|
17
|
+
import {uuid} from '../utils.svelte.js';
|
18
|
+
import {mergeProps} from '@zag-js/svelte';
|
19
|
+
import {createTimerContext, setTimerContext} from './context.svelte.js';
|
20
|
+
|
21
|
+
let {
|
22
|
+
id = uuid(),
|
23
|
+
startMs,
|
24
|
+
targetMs,
|
25
|
+
interval,
|
26
|
+
autoStart,
|
27
|
+
countdown,
|
28
|
+
onTick,
|
29
|
+
onComplete,
|
30
|
+
getRootNode,
|
31
|
+
children,
|
32
|
+
...props
|
33
|
+
}: TimerProps = $props();
|
34
|
+
|
35
|
+
let context = createTimerContext({
|
36
|
+
id,
|
37
|
+
startMs,
|
38
|
+
targetMs,
|
39
|
+
interval,
|
40
|
+
autoStart,
|
41
|
+
countdown,
|
42
|
+
onTick,
|
43
|
+
onComplete,
|
44
|
+
getRootNode,
|
45
|
+
});
|
46
|
+
|
47
|
+
let attrs = $derived(mergeProps(props, context.getRootProps()));
|
48
|
+
|
49
|
+
setTimerContext(context);
|
50
|
+
</script>
|
51
|
+
|
52
|
+
<div {...attrs}>
|
53
|
+
{@render children?.(context)}
|
54
|
+
</div>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import type { Assign, OptionalId, WithoutChildren } from '../types.js';
|
2
|
+
import type { Snippet } from 'svelte';
|
3
|
+
import type { SvelteHTMLElements } from 'svelte/elements';
|
4
|
+
import type { CreateTimerContextProps, CreateTimerContextReturn } from './context.svelte.js';
|
5
|
+
export interface TimerProps extends Assign<WithoutChildren<SvelteHTMLElements['div']>, OptionalId<CreateTimerContextProps>> {
|
6
|
+
children?: Snippet<[CreateTimerContextReturn]>;
|
7
|
+
}
|
8
|
+
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> {
|
9
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
10
|
+
$$bindings?: Bindings;
|
11
|
+
} & Exports;
|
12
|
+
(internal: unknown, props: Props & {
|
13
|
+
$$events?: Events;
|
14
|
+
$$slots?: Slots;
|
15
|
+
}): Exports & {
|
16
|
+
$set?: any;
|
17
|
+
$on?: any;
|
18
|
+
};
|
19
|
+
z_$$bindings?: Bindings;
|
20
|
+
}
|
21
|
+
declare const Root: $$__sveltets_2_IsomorphicComponent<TimerProps, {
|
22
|
+
[evt: string]: CustomEvent<any>;
|
23
|
+
}, {}, {}, "">;
|
24
|
+
type Root = InstanceType<typeof Root>;
|
25
|
+
export default Root;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<script lang="ts" context="module">
|
2
|
+
import type {Assign} from '../types.js';
|
3
|
+
import type {SvelteHTMLElements} from 'svelte/elements';
|
4
|
+
|
5
|
+
export interface TimerSeparatorProps extends Assign<SvelteHTMLElements['span'], {}> {}
|
6
|
+
</script>
|
7
|
+
|
8
|
+
<script lang="ts">
|
9
|
+
import {mergeProps} from '@zag-js/svelte';
|
10
|
+
import {useTimerContext} from './context.svelte.js';
|
11
|
+
|
12
|
+
let {children, ...props}: TimerSeparatorProps = $props();
|
13
|
+
|
14
|
+
let context = useTimerContext();
|
15
|
+
|
16
|
+
let attrs = $derived(mergeProps(props, context.getSeparatorProps()));
|
17
|
+
</script>
|
18
|
+
|
19
|
+
<span {...attrs}>
|
20
|
+
{@render children?.()}
|
21
|
+
</span>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import type { Assign } from '../types.js';
|
2
|
+
import type { SvelteHTMLElements } from 'svelte/elements';
|
3
|
+
export interface TimerSeparatorProps extends Assign<SvelteHTMLElements['span'], {}> {
|
4
|
+
}
|
5
|
+
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> {
|
6
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
7
|
+
$$bindings?: Bindings;
|
8
|
+
} & Exports;
|
9
|
+
(internal: unknown, props: Props & {
|
10
|
+
$$events?: Events;
|
11
|
+
$$slots?: Slots;
|
12
|
+
}): Exports & {
|
13
|
+
$set?: any;
|
14
|
+
$on?: any;
|
15
|
+
};
|
16
|
+
z_$$bindings?: Bindings;
|
17
|
+
}
|
18
|
+
declare const Separator: $$__sveltets_2_IsomorphicComponent<TimerSeparatorProps, {
|
19
|
+
[evt: string]: CustomEvent<any>;
|
20
|
+
}, {}, {}, "">;
|
21
|
+
type Separator = InstanceType<typeof Separator>;
|
22
|
+
export default Separator;
|
package/package.json
CHANGED
package/dist/qr-code/.gitkeep
DELETED
File without changes
|
package/dist/tags-input/.gitkeep
DELETED
File without changes
|
package/dist/timer/.gitkeep
DELETED
File without changes
|