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.
Files changed (61) hide show
  1. package/README.md +4 -4
  2. package/dist/index.d.ts +11 -0
  3. package/dist/index.js +8 -0
  4. package/dist/qr-code/context.svelte.d.ts +8 -0
  5. package/dist/qr-code/context.svelte.js +14 -0
  6. package/dist/qr-code/frame.svelte +21 -0
  7. package/dist/qr-code/frame.svelte.d.ts +22 -0
  8. package/dist/qr-code/index.d.ts +4 -0
  9. package/dist/qr-code/index.js +4 -0
  10. package/dist/qr-code/overlay.svelte +21 -0
  11. package/dist/qr-code/overlay.svelte.d.ts +22 -0
  12. package/dist/qr-code/pattern.svelte +21 -0
  13. package/dist/qr-code/pattern.svelte.d.ts +22 -0
  14. package/dist/qr-code/root.svelte +48 -0
  15. package/dist/qr-code/root.svelte.d.ts +25 -0
  16. package/dist/tags-input/clear-trigger.svelte +21 -0
  17. package/dist/tags-input/clear-trigger.svelte.d.ts +22 -0
  18. package/dist/tags-input/context.svelte.d.ts +10 -0
  19. package/dist/tags-input/context.svelte.js +20 -0
  20. package/dist/tags-input/control.svelte +21 -0
  21. package/dist/tags-input/control.svelte.d.ts +22 -0
  22. package/dist/tags-input/hidden-input.svelte +19 -0
  23. package/dist/tags-input/hidden-input.svelte.d.ts +22 -0
  24. package/dist/tags-input/index.d.ts +11 -0
  25. package/dist/tags-input/index.js +11 -0
  26. package/dist/tags-input/input.svelte +19 -0
  27. package/dist/tags-input/input.svelte.d.ts +22 -0
  28. package/dist/tags-input/item-delete-trigger.svelte +23 -0
  29. package/dist/tags-input/item-delete-trigger.svelte.d.ts +22 -0
  30. package/dist/tags-input/item-input.svelte +20 -0
  31. package/dist/tags-input/item-input.svelte.d.ts +22 -0
  32. package/dist/tags-input/item-preview.svelte +22 -0
  33. package/dist/tags-input/item-preview.svelte.d.ts +22 -0
  34. package/dist/tags-input/item-text.svelte +22 -0
  35. package/dist/tags-input/item-text.svelte.d.ts +22 -0
  36. package/dist/tags-input/item.svelte +37 -0
  37. package/dist/tags-input/item.svelte.d.ts +23 -0
  38. package/dist/tags-input/label.svelte +21 -0
  39. package/dist/tags-input/label.svelte.d.ts +22 -0
  40. package/dist/tags-input/root.svelte +97 -0
  41. package/dist/tags-input/root.svelte.d.ts +25 -0
  42. package/dist/timer/action-trigger.svelte +23 -0
  43. package/dist/timer/action-trigger.svelte.d.ts +23 -0
  44. package/dist/timer/context.svelte.d.ts +10 -0
  45. package/dist/timer/context.svelte.js +20 -0
  46. package/dist/timer/index.d.ts +6 -0
  47. package/dist/timer/index.js +6 -0
  48. package/dist/timer/item-label.svelte +22 -0
  49. package/dist/timer/item-label.svelte.d.ts +22 -0
  50. package/dist/timer/item-value.svelte +26 -0
  51. package/dist/timer/item-value.svelte.d.ts +22 -0
  52. package/dist/timer/item.svelte +24 -0
  53. package/dist/timer/item.svelte.d.ts +23 -0
  54. package/dist/timer/root.svelte +54 -0
  55. package/dist/timer/root.svelte.d.ts +25 -0
  56. package/dist/timer/separator.svelte +21 -0
  57. package/dist/timer/separator.svelte.d.ts +22 -0
  58. package/package.json +1 -1
  59. package/dist/qr-code/.gitkeep +0 -0
  60. package/dist/tags-input/.gitkeep +0 -0
  61. 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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ui-ingredients",
3
3
  "type": "module",
4
- "version": "0.0.7",
4
+ "version": "0.0.8",
5
5
  "packageManager": "pnpm@9.7.0",
6
6
  "svelte": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
File without changes
File without changes
File without changes