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
package/README.md CHANGED
@@ -45,7 +45,7 @@ npm install ui-ingredients
45
45
  - 🟢 Combobox
46
46
  - 🟡 DatePicker
47
47
  - 🟢 Dialog
48
- - Editable
48
+ - 🟡 Editable
49
49
  - ⚪ FileUpload
50
50
  - 🟢 HoverCard
51
51
  - 🟡 Menu
@@ -56,7 +56,7 @@ npm install ui-ingredients
56
56
  - 🟢 Portal
57
57
  - 🟢 Presence
58
58
  - 🟢 Progress
59
- - QRCode
59
+ - 🟢 QRCode
60
60
  - 🟢 RadioGroup
61
61
  - ⚪ RatingGroup
62
62
  - 🟢 Select
@@ -66,8 +66,8 @@ npm install ui-ingredients
66
66
  - 🟢 Steps
67
67
  - 🟢 Switch
68
68
  - 🟢 Tabs
69
- - 🟡 TagsInput
70
- - Timer
69
+ - 🟢 TagsInput
70
+ - 🟢 Timer
71
71
  - 🟢 Toast
72
72
  - 🟢 ToggleGroup
73
73
  - 🟢 Tooltip
package/dist/index.d.ts CHANGED
@@ -26,6 +26,8 @@ export * as Popover from './popover/index.js';
26
26
  export type { PopoverArrowProps, PopoverArrowTipProps, PopoverCloseTriggerProps, PopoverContentProps, PopoverDescriptionProps, PopoverPositionerProps, PopoverProps, PopoverTitleProps, PopoverTriggerProps, } from './popover/index.js';
27
27
  export * as Progress from './progress/index.js';
28
28
  export type { ProgressCircleProps, ProgressCircleRangeProps, ProgressCircleTrackProps, ProgressLabelProps, ProgressProps, ProgressRangeProps, ProgressTrackProps, ProgressValueTextProps, } from './progress/index.js';
29
+ export * as QRCode from './qr-code/index.js';
30
+ export type { QRCodeFrameProps, QRCodeOverlayProps, QRCodePatternProps, QRCodeProps, } from './qr-code/index.js';
29
31
  export * as RadioGroup from './radio-group/index.js';
30
32
  export type { RadioGroupIndicatorProps, RadioGroupItemControlProps, RadioGroupItemHiddenInputProps, RadioGroupItemProps, RadioGroupItemTextProps, RadioGroupLabelProps, RadioGroupProps, } from './radio-group/index.js';
31
33
  export * as Select from './select/index.js';
@@ -38,6 +40,10 @@ export * as Switch from './switch/index.js';
38
40
  export type { SwitchControlProps, SwitchHiddenInputProps, SwitchLabelProps, SwitchProps, SwitchThumbProps, } from './switch/index.js';
39
41
  export * as Tabs from './tabs/index.js';
40
42
  export type { TabsContentProps, TabsListProps, TabsProps, TabsTriggerProps, } from './tabs/index.js';
43
+ export * as TagsInput from './tags-input/index.js';
44
+ export type { TagsInputClearTriggerProps, TagsInputControlProps, TagsInputHiddenInputProps, TagsInputInputProps, TagsInputItemDeleteTriggerProps, TagsInputItemInputProps, TagsInputItemPreviewProps, TagsInputItemProps, TagsInputItemTextProps, TagsInputLabelProps, TagsInputProps, } from './tags-input/index.js';
45
+ export * as Timer from './timer/index.js';
46
+ export type { TimerActionTriggerProps, TimerItemLabelProps, TimerItemProps, TimerItemValueProps, TimerProps, TimerSeparatorProps, } from './timer/index.js';
41
47
  export * as ToggleGroup from './toggle-group/index.js';
42
48
  export type { ToggleGroupItemProps, ToggleGroupProps, } from './toggle-group/index.js';
43
49
  export * as Tooltip from './tooltip/index.js';
@@ -51,10 +57,12 @@ export { anatomy as carouselAnatomy } from '@zag-js/carousel';
51
57
  export { anatomy as checkboxAnatomy } from '@zag-js/checkbox';
52
58
  export { anatomy as clipboardAnatomy } from '@zag-js/clipboard';
53
59
  export { anatomy as collapsibleAnatomy } from '@zag-js/collapsible';
60
+ export { anatomy as colorPickerAnatomy } from '@zag-js/color-picker';
54
61
  export { anatomy as comboboxAnatomy } from '@zag-js/combobox';
55
62
  export { anatomy as datePickerAnatomy } from '@zag-js/date-picker';
56
63
  export { anatomy as dialogAnatomy } from '@zag-js/dialog';
57
64
  export { anatomy as editableAnatomy } from '@zag-js/editable';
65
+ export { anatomy as fileUploadAnatomy } from '@zag-js/file-upload';
58
66
  export { anatomy as hoverCardAnatomy } from '@zag-js/hover-card';
59
67
  export { anatomy as menuAnatomy } from '@zag-js/menu';
60
68
  export { anatomy as numberInputAnatomy } from '@zag-js/number-input';
@@ -62,14 +70,17 @@ export { anatomy as paginationAnatomy } from '@zag-js/pagination';
62
70
  export { anatomy as pinInputAnatomy } from '@zag-js/pin-input';
63
71
  export { anatomy as popoverAnatomy } from '@zag-js/popover';
64
72
  export { anatomy as progressAnatomy } from '@zag-js/progress';
73
+ export { anatomy as qrCodeAnatomy } from '@zag-js/qr-code';
65
74
  export { anatomy as radioGroupAnatomy } from '@zag-js/radio-group';
66
75
  export { anatomy as ratingGroupAnatomy } from '@zag-js/rating-group';
67
76
  export { anatomy as selectAnatomy } from '@zag-js/select';
77
+ export { anatomy as signaturePadAnatomy } from '@zag-js/signature-pad';
68
78
  export { anatomy as sliderAnatomy } from '@zag-js/slider';
69
79
  export { anatomy as stepsAnatomy } from '@zag-js/steps';
70
80
  export { anatomy as switchAnatomy } from '@zag-js/switch';
71
81
  export { anatomy as tabsAnatomy } from '@zag-js/tabs';
72
82
  export { anatomy as tagsInputAnatomy } from '@zag-js/tags-input';
83
+ export { anatomy as timerAnatomy } from '@zag-js/timer';
73
84
  export { anatomy as toastAnatomy } from '@zag-js/toast';
74
85
  export { anatomy as toggleGroupAnatomy } from '@zag-js/toggle-group';
75
86
  export { anatomy as tooltipAnatomy } from '@zag-js/tooltip';
package/dist/index.js CHANGED
@@ -12,12 +12,15 @@ export * as Pagination from './pagination/index.js';
12
12
  export * as PinInput from './pin-input/index.js';
13
13
  export * as Popover from './popover/index.js';
14
14
  export * as Progress from './progress/index.js';
15
+ export * as QRCode from './qr-code/index.js';
15
16
  export * as RadioGroup from './radio-group/index.js';
16
17
  export * as Select from './select/index.js';
17
18
  export * as Slider from './slider/index.js';
18
19
  export * as Steps from './steps/index.js';
19
20
  export * as Switch from './switch/index.js';
20
21
  export * as Tabs from './tabs/index.js';
22
+ export * as TagsInput from './tags-input/index.js';
23
+ export * as Timer from './timer/index.js';
21
24
  export * as ToggleGroup from './toggle-group/index.js';
22
25
  export * as Tooltip from './tooltip/index.js';
23
26
  export * from './portal/index.js';
@@ -29,10 +32,12 @@ export { anatomy as carouselAnatomy } from '@zag-js/carousel';
29
32
  export { anatomy as checkboxAnatomy } from '@zag-js/checkbox';
30
33
  export { anatomy as clipboardAnatomy } from '@zag-js/clipboard';
31
34
  export { anatomy as collapsibleAnatomy } from '@zag-js/collapsible';
35
+ export { anatomy as colorPickerAnatomy } from '@zag-js/color-picker';
32
36
  export { anatomy as comboboxAnatomy } from '@zag-js/combobox';
33
37
  export { anatomy as datePickerAnatomy } from '@zag-js/date-picker';
34
38
  export { anatomy as dialogAnatomy } from '@zag-js/dialog';
35
39
  export { anatomy as editableAnatomy } from '@zag-js/editable';
40
+ export { anatomy as fileUploadAnatomy } from '@zag-js/file-upload';
36
41
  export { anatomy as hoverCardAnatomy } from '@zag-js/hover-card';
37
42
  export { anatomy as menuAnatomy } from '@zag-js/menu';
38
43
  export { anatomy as numberInputAnatomy } from '@zag-js/number-input';
@@ -40,14 +45,17 @@ export { anatomy as paginationAnatomy } from '@zag-js/pagination';
40
45
  export { anatomy as pinInputAnatomy } from '@zag-js/pin-input';
41
46
  export { anatomy as popoverAnatomy } from '@zag-js/popover';
42
47
  export { anatomy as progressAnatomy } from '@zag-js/progress';
48
+ export { anatomy as qrCodeAnatomy } from '@zag-js/qr-code';
43
49
  export { anatomy as radioGroupAnatomy } from '@zag-js/radio-group';
44
50
  export { anatomy as ratingGroupAnatomy } from '@zag-js/rating-group';
45
51
  export { anatomy as selectAnatomy } from '@zag-js/select';
52
+ export { anatomy as signaturePadAnatomy } from '@zag-js/signature-pad';
46
53
  export { anatomy as sliderAnatomy } from '@zag-js/slider';
47
54
  export { anatomy as stepsAnatomy } from '@zag-js/steps';
48
55
  export { anatomy as switchAnatomy } from '@zag-js/switch';
49
56
  export { anatomy as tabsAnatomy } from '@zag-js/tabs';
50
57
  export { anatomy as tagsInputAnatomy } from '@zag-js/tags-input';
58
+ export { anatomy as timerAnatomy } from '@zag-js/timer';
51
59
  export { anatomy as toastAnatomy } from '@zag-js/toast';
52
60
  export { anatomy as toggleGroupAnatomy } from '@zag-js/toggle-group';
53
61
  export { anatomy as tooltipAnatomy } from '@zag-js/tooltip';
@@ -0,0 +1,8 @@
1
+ import * as qrCode from '@zag-js/qr-code';
2
+ export interface CreateQRCodeContextProps extends qrCode.Context {
3
+ }
4
+ export interface CreateQRCodeContextReturn extends ReturnType<typeof createQRCodeContext> {
5
+ }
6
+ export declare function createQRCodeContext(props: CreateQRCodeContextProps): any;
7
+ export declare function setQRCodeContext(value: CreateQRCodeContextReturn): void;
8
+ export declare function useQRCodeContext(): CreateQRCodeContextReturn;
@@ -0,0 +1,14 @@
1
+ import * as qrCode from '@zag-js/qr-code';
2
+ import { normalizeProps, reflect, useMachine } from '@zag-js/svelte';
3
+ import { getContext, setContext } from 'svelte';
4
+ export function createQRCodeContext(props) {
5
+ const [state, send] = useMachine(qrCode.machine(props));
6
+ const api = $derived(reflect(() => qrCode.connect(state, send, normalizeProps)));
7
+ return api;
8
+ }
9
+ export function setQRCodeContext(value) {
10
+ setContext('QRCode', value);
11
+ }
12
+ export function useQRCodeContext() {
13
+ return getContext('QRCode');
14
+ }
@@ -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 QRCodeFrameProps extends Assign<SvelteHTMLElements['svg'], {}> {}
6
+ </script>
7
+
8
+ <script lang="ts">
9
+ import {mergeProps} from '@zag-js/svelte';
10
+ import {useQRCodeContext} from './context.svelte.js';
11
+
12
+ let {children, ...props}: QRCodeFrameProps = $props();
13
+
14
+ let context = useQRCodeContext();
15
+
16
+ let attrs = $derived(mergeProps(props, context.getFrameProps()));
17
+ </script>
18
+
19
+ <svg {...attrs}>
20
+ {@render children?.()}
21
+ </svg>
@@ -0,0 +1,22 @@
1
+ import type { Assign } from '../types.js';
2
+ import type { SvelteHTMLElements } from 'svelte/elements';
3
+ export interface QRCodeFrameProps extends Assign<SvelteHTMLElements['svg'], {}> {
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 Frame: $$__sveltets_2_IsomorphicComponent<QRCodeFrameProps, {
19
+ [evt: string]: CustomEvent<any>;
20
+ }, {}, {}, "">;
21
+ type Frame = InstanceType<typeof Frame>;
22
+ export default Frame;
@@ -0,0 +1,4 @@
1
+ export { default as Frame, type QRCodeFrameProps } from './frame.svelte';
2
+ export { default as Overlay, type QRCodeOverlayProps } from './overlay.svelte';
3
+ export { default as Pattern, type QRCodePatternProps } from './pattern.svelte';
4
+ export { default as Root, type QRCodeProps } from './root.svelte';
@@ -0,0 +1,4 @@
1
+ export { default as Frame } from './frame.svelte';
2
+ export { default as Overlay } from './overlay.svelte';
3
+ export { default as Pattern } from './pattern.svelte';
4
+ export { default as Root } from './root.svelte';
@@ -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 QRCodeOverlayProps extends Assign<SvelteHTMLElements['div'], {}> {}
6
+ </script>
7
+
8
+ <script lang="ts">
9
+ import {mergeProps} from '@zag-js/svelte';
10
+ import {useQRCodeContext} from './context.svelte.js';
11
+
12
+ let {children, ...props}: QRCodeOverlayProps = $props();
13
+
14
+ let context = useQRCodeContext();
15
+
16
+ let attrs = $derived(mergeProps(props, context.getOverlayProps()));
17
+ </script>
18
+
19
+ <div {...attrs}>
20
+ {@render children?.()}
21
+ </div>
@@ -0,0 +1,22 @@
1
+ import type { Assign } from '../types.js';
2
+ import type { SvelteHTMLElements } from 'svelte/elements';
3
+ export interface QRCodeOverlayProps extends Assign<SvelteHTMLElements['div'], {}> {
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 Overlay: $$__sveltets_2_IsomorphicComponent<QRCodeOverlayProps, {
19
+ [evt: string]: CustomEvent<any>;
20
+ }, {}, {}, "">;
21
+ type Overlay = InstanceType<typeof Overlay>;
22
+ export default Overlay;
@@ -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 QRCodePatternProps extends Assign<SvelteHTMLElements['path'], {}> {}
6
+ </script>
7
+
8
+ <script lang="ts">
9
+ import {mergeProps} from '@zag-js/svelte';
10
+ import {useQRCodeContext} from './context.svelte.js';
11
+
12
+ let {children, ...props}: QRCodePatternProps = $props();
13
+
14
+ let context = useQRCodeContext();
15
+
16
+ let attrs = $derived(mergeProps(props, context.getPatternProps()));
17
+ </script>
18
+
19
+ <path {...attrs}>
20
+ {@render children?.()}
21
+ </path>
@@ -0,0 +1,22 @@
1
+ import type { Assign } from '../types.js';
2
+ import type { SvelteHTMLElements } from 'svelte/elements';
3
+ export interface QRCodePatternProps extends Assign<SvelteHTMLElements['path'], {}> {
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 Pattern: $$__sveltets_2_IsomorphicComponent<QRCodePatternProps, {
19
+ [evt: string]: CustomEvent<any>;
20
+ }, {}, {}, "">;
21
+ type Pattern = InstanceType<typeof Pattern>;
22
+ export default Pattern;
@@ -0,0 +1,48 @@
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 {CreateQRCodeContextProps, CreateQRCodeContextReturn} from './context.svelte.js';
6
+
7
+ export interface QRCodeProps
8
+ extends Assign<
9
+ WithoutChildren<SvelteHTMLElements['div']>,
10
+ OptionalId<CreateQRCodeContextProps>
11
+ > {
12
+ children?: Snippet<[CreateQRCodeContextReturn]>;
13
+ }
14
+ </script>
15
+
16
+ <script lang="ts">
17
+ import {uuid} from '../utils.svelte.js';
18
+ import {mergeProps} from '@zag-js/svelte';
19
+ import {createQRCodeContext, setQRCodeContext} from './context.svelte.js';
20
+
21
+ let {
22
+ id = uuid(),
23
+ ids,
24
+ dir,
25
+ value,
26
+ encoding,
27
+ getRootNode,
28
+ children,
29
+ ...props
30
+ }: QRCodeProps = $props();
31
+
32
+ let context = createQRCodeContext({
33
+ id,
34
+ ids,
35
+ dir,
36
+ value: $state.snapshot(value),
37
+ encoding,
38
+ getRootNode,
39
+ });
40
+
41
+ let attrs = $derived(mergeProps(props, context.getRootProps()));
42
+
43
+ setQRCodeContext(context);
44
+ </script>
45
+
46
+ <div {...attrs}>
47
+ {@render children?.(context)}
48
+ </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 { CreateQRCodeContextProps, CreateQRCodeContextReturn } from './context.svelte.js';
5
+ export interface QRCodeProps extends Assign<WithoutChildren<SvelteHTMLElements['div']>, OptionalId<CreateQRCodeContextProps>> {
6
+ children?: Snippet<[CreateQRCodeContextReturn]>;
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<QRCodeProps, {
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 TagsInputClearTriggerProps extends Assign<SvelteHTMLElements['button'], {}> {}
6
+ </script>
7
+
8
+ <script lang="ts">
9
+ import {mergeProps} from '@zag-js/svelte';
10
+ import {useTagsInputContext} from './context.svelte.js';
11
+
12
+ let {children, ...props}: TagsInputClearTriggerProps = $props();
13
+
14
+ let context = useTagsInputContext();
15
+
16
+ let attrs = $derived(mergeProps(props, context.getClearTriggerProps()));
17
+ </script>
18
+
19
+ <button type="button" {...attrs}>
20
+ {@render children?.()}
21
+ </button>
@@ -0,0 +1,22 @@
1
+ import type { Assign } from '../types.js';
2
+ import type { SvelteHTMLElements } from 'svelte/elements';
3
+ export interface TagsInputClearTriggerProps extends Assign<SvelteHTMLElements['button'], {}> {
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 ClearTrigger: $$__sveltets_2_IsomorphicComponent<TagsInputClearTriggerProps, {
19
+ [evt: string]: CustomEvent<any>;
20
+ }, {}, {}, "">;
21
+ type ClearTrigger = InstanceType<typeof ClearTrigger>;
22
+ export default ClearTrigger;
@@ -0,0 +1,10 @@
1
+ import * as tagsInput from '@zag-js/tags-input';
2
+ export interface CreateTagsInputContextProps extends tagsInput.Context {
3
+ }
4
+ export interface CreateTagsInputContextReturn extends ReturnType<typeof createTagsInputContext> {
5
+ }
6
+ export declare function createTagsInputContext(props: CreateTagsInputContextProps): any;
7
+ export declare function setTagsInputContext(value: CreateTagsInputContextReturn): void;
8
+ export declare function useTagsInputContext(): CreateTagsInputContextReturn;
9
+ export declare function setTagsInputItemContext(value: tagsInput.ItemProps): void;
10
+ export declare function useTagsInputItemContext(): tagsInput.ItemProps;
@@ -0,0 +1,20 @@
1
+ import { normalizeProps, reflect, useMachine } from '@zag-js/svelte';
2
+ import * as tagsInput from '@zag-js/tags-input';
3
+ import { getContext, setContext } from 'svelte';
4
+ export function createTagsInputContext(props) {
5
+ const [state, send] = useMachine(tagsInput.machine(props));
6
+ const api = $derived(reflect(() => tagsInput.connect(state, send, normalizeProps)));
7
+ return api;
8
+ }
9
+ export function setTagsInputContext(value) {
10
+ setContext('TagsInput', value);
11
+ }
12
+ export function useTagsInputContext() {
13
+ return getContext('TagsInput');
14
+ }
15
+ export function setTagsInputItemContext(value) {
16
+ setContext('TagsInputItem', value);
17
+ }
18
+ export function useTagsInputItemContext() {
19
+ return getContext('TagsInputItem');
20
+ }
@@ -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 TagsInputControlProps extends Assign<SvelteHTMLElements['div'], {}> {}
6
+ </script>
7
+
8
+ <script lang="ts">
9
+ import {mergeProps} from '@zag-js/svelte';
10
+ import {useTagsInputContext} from './context.svelte.js';
11
+
12
+ let {children, ...props}: TagsInputControlProps = $props();
13
+
14
+ let context = useTagsInputContext();
15
+
16
+ let attrs = $derived(mergeProps(props, context.getControlProps()));
17
+ </script>
18
+
19
+ <div {...attrs}>
20
+ {@render children?.()}
21
+ </div>
@@ -0,0 +1,22 @@
1
+ import type { Assign } from '../types.js';
2
+ import type { SvelteHTMLElements } from 'svelte/elements';
3
+ export interface TagsInputControlProps extends Assign<SvelteHTMLElements['div'], {}> {
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 Control: $$__sveltets_2_IsomorphicComponent<TagsInputControlProps, {
19
+ [evt: string]: CustomEvent<any>;
20
+ }, {}, {}, "">;
21
+ type Control = InstanceType<typeof Control>;
22
+ export default Control;
@@ -0,0 +1,19 @@
1
+ <script lang="ts" context="module">
2
+ import type {Assign} from '../types.js';
3
+ import type {SvelteHTMLElements} from 'svelte/elements';
4
+
5
+ export interface TagsInputHiddenInputProps extends Assign<SvelteHTMLElements['input'], {}> {}
6
+ </script>
7
+
8
+ <script lang="ts">
9
+ import {mergeProps} from '@zag-js/svelte';
10
+ import {useTagsInputContext} from './context.svelte.js';
11
+
12
+ let {...props}: TagsInputHiddenInputProps = $props();
13
+
14
+ let context = useTagsInputContext();
15
+
16
+ let attrs = $derived(mergeProps(props, context.getHiddenInputProps()));
17
+ </script>
18
+
19
+ <input {...attrs} />
@@ -0,0 +1,22 @@
1
+ import type { Assign } from '../types.js';
2
+ import type { SvelteHTMLElements } from 'svelte/elements';
3
+ export interface TagsInputHiddenInputProps extends Assign<SvelteHTMLElements['input'], {}> {
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 HiddenInput: $$__sveltets_2_IsomorphicComponent<TagsInputHiddenInputProps, {
19
+ [evt: string]: CustomEvent<any>;
20
+ }, {}, {}, "">;
21
+ type HiddenInput = InstanceType<typeof HiddenInput>;
22
+ export default HiddenInput;
@@ -0,0 +1,11 @@
1
+ export { default as ClearTrigger, type TagsInputClearTriggerProps } from './clear-trigger.svelte';
2
+ export { default as Control, type TagsInputControlProps } from './control.svelte';
3
+ export { default as HiddenInput, type TagsInputHiddenInputProps } from './hidden-input.svelte';
4
+ export { default as Input, type TagsInputInputProps } from './input.svelte';
5
+ export { default as ItemDeleteTrigger, type TagsInputItemDeleteTriggerProps, } from './item-delete-trigger.svelte';
6
+ export { default as ItemInput, type TagsInputItemInputProps } from './item-input.svelte';
7
+ export { default as ItemPreview, type TagsInputItemPreviewProps } from './item-preview.svelte';
8
+ export { default as ItemText, type TagsInputItemTextProps } from './item-text.svelte';
9
+ export { default as Item, type TagsInputItemProps } from './item.svelte';
10
+ export { default as Label, type TagsInputLabelProps } from './label.svelte';
11
+ export { default as Root, type TagsInputProps } from './root.svelte';
@@ -0,0 +1,11 @@
1
+ export { default as ClearTrigger } from './clear-trigger.svelte';
2
+ export { default as Control } from './control.svelte';
3
+ export { default as HiddenInput } from './hidden-input.svelte';
4
+ export { default as Input } from './input.svelte';
5
+ export { default as ItemDeleteTrigger, } from './item-delete-trigger.svelte';
6
+ export { default as ItemInput } from './item-input.svelte';
7
+ export { default as ItemPreview } from './item-preview.svelte';
8
+ export { default as ItemText } from './item-text.svelte';
9
+ export { default as Item } from './item.svelte';
10
+ export { default as Label } from './label.svelte';
11
+ export { default as Root } from './root.svelte';
@@ -0,0 +1,19 @@
1
+ <script lang="ts" context="module">
2
+ import type {Assign} from '../types.js';
3
+ import type {SvelteHTMLElements} from 'svelte/elements';
4
+
5
+ export interface TagsInputInputProps extends Assign<SvelteHTMLElements['input'], {}> {}
6
+ </script>
7
+
8
+ <script lang="ts">
9
+ import {mergeProps} from '@zag-js/svelte';
10
+ import {useTagsInputContext} from './context.svelte.js';
11
+
12
+ let {...props}: TagsInputInputProps = $props();
13
+
14
+ let context = useTagsInputContext();
15
+
16
+ let attrs = $derived(mergeProps(props, context.getInputProps()));
17
+ </script>
18
+
19
+ <input {...attrs} />
@@ -0,0 +1,22 @@
1
+ import type { Assign } from '../types.js';
2
+ import type { SvelteHTMLElements } from 'svelte/elements';
3
+ export interface TagsInputInputProps extends Assign<SvelteHTMLElements['input'], {}> {
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 Input: $$__sveltets_2_IsomorphicComponent<TagsInputInputProps, {
19
+ [evt: string]: CustomEvent<any>;
20
+ }, {}, {}, "">;
21
+ type Input = InstanceType<typeof Input>;
22
+ export default Input;
@@ -0,0 +1,23 @@
1
+ <script lang="ts" context="module">
2
+ import type {Assign} from '../types.js';
3
+ import type {SvelteHTMLElements} from 'svelte/elements';
4
+
5
+ export interface TagsInputItemDeleteTriggerProps
6
+ extends Assign<SvelteHTMLElements['button'], {}> {}
7
+ </script>
8
+
9
+ <script lang="ts">
10
+ import {mergeProps} from '@zag-js/svelte';
11
+ import {useTagsInputContext, useTagsInputItemContext} from './context.svelte.js';
12
+
13
+ let {children, ...props}: TagsInputItemDeleteTriggerProps = $props();
14
+
15
+ let context = useTagsInputContext();
16
+ let itemContext = useTagsInputItemContext();
17
+
18
+ let attrs = $derived(mergeProps(props, context.getItemDeleteTriggerProps(itemContext)));
19
+ </script>
20
+
21
+ <button type="button" {...attrs}>
22
+ {@render children?.()}
23
+ </button>