ui-ingredients 0.0.21 → 0.0.23

Sign up to get free protection for your applications and to get access to all the features.
Files changed (163) hide show
  1. package/README.md +6 -3
  2. package/dist/accordion/accordion.d.ts +1 -0
  3. package/dist/accordion/accordion.js +1 -0
  4. package/dist/accordion/index.d.ts +0 -1
  5. package/dist/accordion/index.js +0 -1
  6. package/dist/avatar/avatar.d.ts +1 -0
  7. package/dist/avatar/avatar.js +1 -0
  8. package/dist/avatar/index.d.ts +0 -1
  9. package/dist/avatar/index.js +0 -1
  10. package/dist/carousel/carousel.d.ts +1 -0
  11. package/dist/carousel/carousel.js +1 -0
  12. package/dist/carousel/index.d.ts +0 -1
  13. package/dist/carousel/index.js +0 -1
  14. package/dist/checkbox/checkbox.d.ts +1 -0
  15. package/dist/checkbox/checkbox.js +1 -0
  16. package/dist/checkbox/index.d.ts +0 -1
  17. package/dist/checkbox/index.js +0 -1
  18. package/dist/clipboard/clipboard.d.ts +1 -0
  19. package/dist/clipboard/clipboard.js +1 -0
  20. package/dist/clipboard/index.d.ts +0 -1
  21. package/dist/clipboard/index.js +0 -1
  22. package/dist/collapsible/collapsible.d.ts +1 -0
  23. package/dist/collapsible/collapsible.js +1 -0
  24. package/dist/collapsible/index.d.ts +0 -1
  25. package/dist/collapsible/index.js +0 -1
  26. package/dist/combobox/combobox.d.ts +1 -0
  27. package/dist/combobox/combobox.js +1 -0
  28. package/dist/combobox/index.d.ts +1 -2
  29. package/dist/combobox/index.js +0 -1
  30. package/dist/date-picker/anatomy.js +3 -3
  31. package/dist/date-picker/date-picker.d.ts +2 -0
  32. package/dist/date-picker/date-picker.js +2 -0
  33. package/dist/date-picker/index.d.ts +0 -2
  34. package/dist/date-picker/index.js +0 -2
  35. package/dist/dialog/dialog.d.ts +1 -0
  36. package/dist/dialog/dialog.js +1 -0
  37. package/dist/dialog/index.d.ts +1 -2
  38. package/dist/dialog/index.js +0 -1
  39. package/dist/editable/editable.d.ts +1 -0
  40. package/dist/editable/editable.js +1 -0
  41. package/dist/editable/index.d.ts +1 -2
  42. package/dist/editable/index.js +0 -1
  43. package/dist/file-upload/file-upload.d.ts +1 -0
  44. package/dist/file-upload/file-upload.js +1 -0
  45. package/dist/file-upload/index.d.ts +1 -2
  46. package/dist/file-upload/index.js +0 -1
  47. package/dist/hover-card/hover-card.d.ts +1 -0
  48. package/dist/hover-card/hover-card.js +1 -0
  49. package/dist/hover-card/index.d.ts +1 -2
  50. package/dist/hover-card/index.js +0 -1
  51. package/dist/index.d.ts +1 -0
  52. package/dist/index.js +1 -0
  53. package/dist/menu/index.d.ts +1 -2
  54. package/dist/menu/index.js +1 -2
  55. package/dist/menu/menu.d.ts +1 -0
  56. package/dist/menu/menu.js +1 -0
  57. package/dist/number-input/index.d.ts +1 -2
  58. package/dist/number-input/index.js +0 -1
  59. package/dist/number-input/number-input.d.ts +1 -0
  60. package/dist/number-input/number-input.js +1 -0
  61. package/dist/pagination/index.d.ts +1 -2
  62. package/dist/pagination/index.js +0 -1
  63. package/dist/pagination/pagination.d.ts +1 -0
  64. package/dist/pagination/pagination.js +1 -0
  65. package/dist/pin-input/index.d.ts +1 -2
  66. package/dist/pin-input/index.js +0 -1
  67. package/dist/pin-input/pin-input.d.ts +1 -0
  68. package/dist/pin-input/pin-input.js +1 -0
  69. package/dist/popover/index.d.ts +1 -2
  70. package/dist/popover/index.js +0 -1
  71. package/dist/popover/popover.d.ts +1 -0
  72. package/dist/popover/popover.js +1 -0
  73. package/dist/progress/index.d.ts +1 -2
  74. package/dist/progress/index.js +0 -1
  75. package/dist/progress/progress.d.ts +1 -0
  76. package/dist/progress/progress.js +1 -0
  77. package/dist/qr-code/index.d.ts +1 -2
  78. package/dist/qr-code/index.js +0 -1
  79. package/dist/qr-code/qr-code.d.ts +1 -0
  80. package/dist/qr-code/qr-code.js +1 -0
  81. package/dist/radio-group/index.d.ts +1 -2
  82. package/dist/radio-group/index.js +0 -1
  83. package/dist/radio-group/radio-group.d.ts +1 -0
  84. package/dist/radio-group/radio-group.js +1 -0
  85. package/dist/rating-group/index.d.ts +1 -2
  86. package/dist/rating-group/index.js +0 -1
  87. package/dist/rating-group/rating-group.d.ts +1 -0
  88. package/dist/rating-group/rating-group.js +1 -0
  89. package/dist/segment-group/anatomy.js +3 -3
  90. package/dist/segment-group/index.d.ts +1 -2
  91. package/dist/segment-group/index.js +0 -1
  92. package/dist/segment-group/segment-group.d.ts +1 -0
  93. package/dist/segment-group/segment-group.js +1 -0
  94. package/dist/select/index.d.ts +1 -2
  95. package/dist/select/index.js +0 -1
  96. package/dist/select/select.d.ts +1 -0
  97. package/dist/select/select.js +1 -0
  98. package/dist/signature-pad/clear-trigger.svelte +20 -0
  99. package/dist/signature-pad/clear-trigger.svelte.d.ts +18 -0
  100. package/dist/signature-pad/context.svelte.d.ts +3 -0
  101. package/dist/signature-pad/context.svelte.js +2 -0
  102. package/dist/signature-pad/control.svelte +20 -0
  103. package/dist/signature-pad/control.svelte.d.ts +18 -0
  104. package/dist/signature-pad/create-signature-pad.svelte.d.ts +7 -0
  105. package/dist/signature-pad/create-signature-pad.svelte.js +17 -0
  106. package/dist/signature-pad/current-segment-path.svelte +29 -0
  107. package/dist/signature-pad/current-segment-path.svelte.d.ts +18 -0
  108. package/dist/signature-pad/guide.svelte +20 -0
  109. package/dist/signature-pad/guide.svelte.d.ts +18 -0
  110. package/dist/signature-pad/hidden-input.svelte +20 -0
  111. package/dist/signature-pad/hidden-input.svelte.d.ts +18 -0
  112. package/dist/signature-pad/index.d.ts +10 -0
  113. package/dist/signature-pad/index.js +1 -0
  114. package/dist/signature-pad/label.svelte +20 -0
  115. package/dist/signature-pad/label.svelte.d.ts +18 -0
  116. package/dist/signature-pad/root.svelte +55 -0
  117. package/dist/signature-pad/root.svelte.d.ts +18 -0
  118. package/dist/signature-pad/segment-path.svelte +22 -0
  119. package/dist/signature-pad/segment-path.svelte.d.ts +18 -0
  120. package/dist/signature-pad/segment.svelte +20 -0
  121. package/dist/signature-pad/segment.svelte.d.ts +18 -0
  122. package/dist/signature-pad/signature-pad.d.ts +10 -0
  123. package/dist/signature-pad/signature-pad.js +10 -0
  124. package/dist/slider/index.d.ts +1 -2
  125. package/dist/slider/index.js +0 -1
  126. package/dist/slider/slider.d.ts +1 -0
  127. package/dist/slider/slider.js +1 -0
  128. package/dist/steps/completed-content.svelte +27 -0
  129. package/dist/steps/completed-content.svelte.d.ts +18 -0
  130. package/dist/steps/index.d.ts +2 -2
  131. package/dist/steps/index.js +0 -1
  132. package/dist/steps/steps.d.ts +2 -0
  133. package/dist/steps/steps.js +2 -0
  134. package/dist/switch/index.d.ts +1 -2
  135. package/dist/switch/index.js +0 -1
  136. package/dist/switch/switch.d.ts +1 -0
  137. package/dist/switch/switch.js +1 -0
  138. package/dist/tabs/index.d.ts +1 -2
  139. package/dist/tabs/index.js +0 -1
  140. package/dist/tabs/tabs.d.ts +1 -0
  141. package/dist/tabs/tabs.js +1 -0
  142. package/dist/tags-input/index.d.ts +1 -2
  143. package/dist/tags-input/index.js +0 -1
  144. package/dist/tags-input/tags-input.d.ts +1 -0
  145. package/dist/tags-input/tags-input.js +1 -0
  146. package/dist/time-picker/.gitkeep +0 -0
  147. package/dist/timer/timer.d.ts +1 -0
  148. package/dist/timer/timer.js +1 -0
  149. package/dist/toast/index.d.ts +6 -7
  150. package/dist/toast/index.js +1 -7
  151. package/dist/toast/toast.d.ts +6 -5
  152. package/dist/toast/toast.js +1 -0
  153. package/dist/toggle-group/index.d.ts +1 -2
  154. package/dist/toggle-group/index.js +0 -1
  155. package/dist/toggle-group/toggle-group.d.ts +1 -0
  156. package/dist/toggle-group/toggle-group.js +1 -0
  157. package/dist/tooltip/index.d.ts +1 -2
  158. package/dist/tooltip/index.js +0 -1
  159. package/dist/tooltip/tooltip.d.ts +1 -0
  160. package/dist/tooltip/tooltip.js +1 -0
  161. package/dist/tour/.gitkeep +0 -0
  162. package/package.json +4 -2
  163. /package/dist/{signature-pad → floating-panel}/.gitkeep +0 -0
@@ -1,3 +1,4 @@
1
+ export { anatomy } from '@zag-js/radio-group';
1
2
  export { default as Indicator } from './indicator.svelte';
2
3
  export { default as ItemControl } from './item-control.svelte';
3
4
  export { default as ItemHiddenInput } from './item-hidden-input.svelte';
@@ -1,3 +1,4 @@
1
+ export { anatomy } from '@zag-js/radio-group';
1
2
  export { default as Indicator } from './indicator.svelte';
2
3
  export { default as ItemControl } from './item-control.svelte';
3
4
  export { default as ItemHiddenInput } from './item-hidden-input.svelte';
@@ -1,7 +1,6 @@
1
- export { anatomy as ratingGroupAnatomy } from '@zag-js/rating-group';
1
+ export * as RatingGroup from './rating-group.js';
2
2
  export type { RatingGroupControlProps } from './control.svelte';
3
3
  export type { RatingGroupHiddenInputProps } from './hidden-input.svelte';
4
4
  export type { RatingGroupItemProps } from './item.svelte';
5
5
  export type { RatingGroupLabelProps } from './label.svelte';
6
- export * as RatingGroup from './rating-group.js';
7
6
  export type { RatingGroupProps } from './root.svelte';
@@ -1,2 +1 @@
1
- export { anatomy as ratingGroupAnatomy } from '@zag-js/rating-group';
2
1
  export * as RatingGroup from './rating-group.js';
@@ -1,3 +1,4 @@
1
+ export { anatomy } from '@zag-js/rating-group';
1
2
  export { default as Control } from './control.svelte';
2
3
  export { default as HiddenInput } from './hidden-input.svelte';
3
4
  export { default as Item } from './item.svelte';
@@ -1,3 +1,4 @@
1
+ export { anatomy } from '@zag-js/rating-group';
1
2
  export { default as Control } from './control.svelte';
2
3
  export { default as HiddenInput } from './hidden-input.svelte';
3
4
  export { default as Item } from './item.svelte';
@@ -1,3 +1,3 @@
1
- import { anatomy } from '@zag-js/radio-group';
2
- export const segmentGroupAnatomy = anatomy.rename('segment-group');
3
- export const parts = segmentGroupAnatomy.build();
1
+ import { anatomy as _ } from '@zag-js/radio-group';
2
+ export const anatomy = _.rename('segment-group');
3
+ export const parts = anatomy.build();
@@ -1,4 +1,4 @@
1
- export { segmentGroupAnatomy } from './anatomy.js';
1
+ export * as SegmentGroup from './segment-group.js';
2
2
  export type { SegmentGroupIndicatorProps } from './indicator.svelte';
3
3
  export type { SegmentGroupItemControlProps } from './item-control.svelte';
4
4
  export type { SegmentGroupItemHiddenInputProps } from './item-hidden-input.svelte';
@@ -6,4 +6,3 @@ export type { SegmentGroupItemTextProps } from './item-text.svelte';
6
6
  export type { SegmentGroupItemProps } from './item.svelte';
7
7
  export type { SegmentGroupLabelProps } from './label.svelte';
8
8
  export type { SegmentGroupProps } from './root.svelte';
9
- export * as SegmentGroup from './segment-group.js';
@@ -1,2 +1 @@
1
- export { segmentGroupAnatomy } from './anatomy.js';
2
1
  export * as SegmentGroup from './segment-group.js';
@@ -1,3 +1,4 @@
1
+ export { anatomy } from './anatomy.js';
1
2
  export { default as Indicator } from './indicator.svelte';
2
3
  export { default as ItemControl } from './item-control.svelte';
3
4
  export { default as ItemHiddenInput } from './item-hidden-input.svelte';
@@ -1,3 +1,4 @@
1
+ export { anatomy } from './anatomy.js';
1
2
  export { default as Indicator } from './indicator.svelte';
2
3
  export { default as ItemControl } from './item-control.svelte';
3
4
  export { default as ItemHiddenInput } from './item-hidden-input.svelte';
@@ -1,4 +1,4 @@
1
- export { anatomy as selectAnatomy } from '@zag-js/select';
1
+ export * as Select from './select.js';
2
2
  export type { SelectClearTriggerProps } from './clear-trigger.svelte';
3
3
  export type { SelectContentProps } from './content.svelte';
4
4
  export type { SelectControlProps } from './control.svelte';
@@ -13,6 +13,5 @@ export type { SelectLabelProps } from './label.svelte';
13
13
  export type { SelectListProps } from './list.svelte';
14
14
  export type { SelectPositionerProps } from './positioner.svelte';
15
15
  export type { SelectProps } from './root.svelte';
16
- export * as Select from './select.js';
17
16
  export type { SelectTriggerProps } from './trigger.svelte';
18
17
  export type { SelectValueTextProps } from './value-text.svelte';
@@ -1,2 +1 @@
1
- export { anatomy as selectAnatomy } from '@zag-js/select';
2
1
  export * as Select from './select.js';
@@ -1,3 +1,4 @@
1
+ export { anatomy } from '@zag-js/select';
1
2
  export { default as ClearTrigger } from './clear-trigger.svelte';
2
3
  export { default as Content } from './content.svelte';
3
4
  export { default as Control } from './control.svelte';
@@ -1,3 +1,4 @@
1
+ export { anatomy } from '@zag-js/select';
1
2
  export { default as ClearTrigger } from './clear-trigger.svelte';
2
3
  export { default as Content } from './content.svelte';
3
4
  export { default as Control } from './control.svelte';
@@ -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,3 @@
1
+ import { Context } from '../utils.svelte.js';
2
+ import type { CreateSignaturePadReturn } from './create-signature-pad.svelte.js';
3
+ export declare const signaturePadContext: Context<CreateSignaturePadReturn>;
@@ -0,0 +1,2 @@
1
+ import { Context } from '../utils.svelte.js';
2
+ export const signaturePadContext = new Context('SignaturePad');
@@ -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';
@@ -1,4 +1,4 @@
1
- export { anatomy as sliderAnatomy } from '@zag-js/slider';
1
+ export * as Slider from './slider.js';
2
2
  export type { SliderControlProps } from './control.svelte';
3
3
  export type { SliderHiddenInputProps } from './hidden-input.svelte';
4
4
  export type { SliderLabelProps } from './label.svelte';
@@ -6,7 +6,6 @@ export type { SliderMarkerGroupProps } from './marker-group.svelte';
6
6
  export type { SliderMarkerProps } from './marker.svelte';
7
7
  export type { SliderRangeProps } from './range.svelte';
8
8
  export type { SliderProps } from './root.svelte';
9
- export * as Slider from './slider.js';
10
9
  export type { SliderThumbProps } from './thumb.svelte';
11
10
  export type { SliderTrackProps } from './track.svelte';
12
11
  export type { SliderValueTextProps } from './value-text.svelte';
@@ -1,2 +1 @@
1
- export { anatomy as sliderAnatomy } from '@zag-js/slider';
2
1
  export * as Slider from './slider.js';
@@ -1,3 +1,4 @@
1
+ export { anatomy } from '@zag-js/slider';
1
2
  export { default as Control } from './control.svelte';
2
3
  export { default as HiddenInput } from './hidden-input.svelte';
3
4
  export { default as Label } from './label.svelte';
@@ -1,3 +1,4 @@
1
+ export { anatomy } from '@zag-js/slider';
1
2
  export { default as Control } from './control.svelte';
2
3
  export { default as HiddenInput } from './hidden-input.svelte';
3
4
  export { default as Label } from './label.svelte';