ui-ingredients 0.12.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. package/README.md +1 -1
  2. package/dist/accordion/accordion-item-trigger.svelte +1 -1
  3. package/dist/alert-dialog/alert-dialog-close-trigger.svelte +1 -1
  4. package/dist/alert-dialog/alert-dialog-trigger.svelte +1 -1
  5. package/dist/carousel/carousel-indicator.svelte +1 -1
  6. package/dist/carousel/carousel-next-trigger.svelte +1 -1
  7. package/dist/carousel/carousel-prev-trigger.svelte +1 -1
  8. package/dist/clipboard/clipboard-trigger.svelte +1 -1
  9. package/dist/collapsible/collapsible-trigger.svelte +1 -1
  10. package/dist/color-picker/color-picker-channel-slider-label.svelte +2 -5
  11. package/dist/color-picker/color-picker-channel-slider-label.svelte.d.ts +2 -3
  12. package/dist/color-picker/color-picker-swatch-trigger.svelte +1 -1
  13. package/dist/color-picker/create-color-picker.svelte.d.ts +1 -2
  14. package/dist/color-picker/create-color-picker.svelte.js +0 -1
  15. package/dist/color-picker/index.d.ts +1 -0
  16. package/dist/combobox/combobox-clear-trigger.svelte +1 -1
  17. package/dist/combobox/combobox-root.svelte +6 -10
  18. package/dist/combobox/combobox-root.svelte.d.ts +16 -19
  19. package/dist/combobox/combobox-trigger.svelte +1 -1
  20. package/dist/combobox/combobox.d.ts +1 -0
  21. package/dist/combobox/combobox.js +1 -0
  22. package/dist/combobox/create-combobox.svelte.d.ts +3 -3
  23. package/dist/combobox/create-combobox.svelte.js +1 -10
  24. package/dist/create-context.svelte.d.ts +1 -1
  25. package/dist/date-picker/create-date-picker.svelte.d.ts +1 -5
  26. package/dist/date-picker/create-date-picker.svelte.js +0 -6
  27. package/dist/date-picker/date-picker-clear-trigger.svelte +1 -1
  28. package/dist/date-picker/date-picker-day-table-cell-trigger.svelte +1 -1
  29. package/dist/date-picker/date-picker-month-table-cell-trigger.svelte +1 -1
  30. package/dist/date-picker/date-picker-next-trigger.svelte +1 -1
  31. package/dist/date-picker/date-picker-preset-trigger.svelte +1 -1
  32. package/dist/date-picker/date-picker-prev-trigger.svelte +1 -1
  33. package/dist/date-picker/date-picker-trigger.svelte +1 -1
  34. package/dist/date-picker/date-picker-view-trigger.svelte +1 -1
  35. package/dist/date-picker/date-picker-year-table-cell-trigger.svelte +1 -1
  36. package/dist/date-picker/index.d.ts +1 -0
  37. package/dist/dialog/dialog-close-trigger.svelte +1 -1
  38. package/dist/dialog/dialog-trigger.svelte +1 -1
  39. package/dist/drawer/drawer-close-trigger.svelte +1 -1
  40. package/dist/drawer/drawer-trigger.svelte +1 -1
  41. package/dist/editable/editable-cancel-trigger.svelte +1 -1
  42. package/dist/editable/editable-edit-trigger.svelte +1 -1
  43. package/dist/editable/editable-submit-trigger.svelte +1 -1
  44. package/dist/field/field-textarea.svelte +30 -4
  45. package/dist/field/field-textarea.svelte.d.ts +3 -1
  46. package/dist/file-upload/file-upload-clear-trigger.svelte +1 -1
  47. package/dist/file-upload/file-upload-item-delete-trigger.svelte +1 -1
  48. package/dist/file-upload/file-upload-trigger.svelte +1 -1
  49. package/dist/floating-panel/floating-panel-close-trigger.svelte +1 -1
  50. package/dist/floating-panel/floating-panel-drag-trigger.svelte +1 -1
  51. package/dist/floating-panel/floating-panel-maximize-trigger.svelte +1 -1
  52. package/dist/floating-panel/floating-panel-minimize-trigger.svelte +1 -1
  53. package/dist/floating-panel/floating-panel-resize-trigger.svelte +1 -1
  54. package/dist/floating-panel/floating-panel-restore-trigger.svelte +1 -1
  55. package/dist/floating-panel/floating-panel-trigger.svelte +1 -1
  56. package/dist/menu/menu-context-trigger.svelte +1 -1
  57. package/dist/menu/menu-trigger-item.svelte +1 -1
  58. package/dist/menu/menu-trigger.svelte +1 -1
  59. package/dist/number-input/number-input-decrement-trigger.svelte +1 -1
  60. package/dist/number-input/number-input-increment-trigger.svelte +1 -1
  61. package/dist/pagination/pagination-item.svelte +1 -1
  62. package/dist/pagination/pagination-next-trigger.svelte +1 -1
  63. package/dist/pagination/pagination-prev-trigger.svelte +1 -1
  64. package/dist/pin-input/create-pin-input.svelte.js +1 -0
  65. package/dist/pin-input/pin-input-clear-trigger.svelte +1 -1
  66. package/dist/popover/popover-close-trigger.svelte +1 -1
  67. package/dist/popover/popover-trigger.svelte +1 -1
  68. package/dist/select/create-select.svelte.d.ts +3 -3
  69. package/dist/select/create-select.svelte.js +1 -10
  70. package/dist/select/select-clear-trigger.svelte +1 -1
  71. package/dist/select/select-root.svelte +6 -9
  72. package/dist/select/select-root.svelte.d.ts +16 -19
  73. package/dist/select/select-trigger.svelte +1 -1
  74. package/dist/select/select.d.ts +1 -0
  75. package/dist/select/select.js +1 -0
  76. package/dist/signature-pad/signature-pad-clear-trigger.svelte +1 -1
  77. package/dist/steps/steps-next-trigger.svelte +1 -1
  78. package/dist/steps/steps-prev-trigger.svelte +1 -1
  79. package/dist/steps/steps-trigger.svelte +1 -1
  80. package/dist/tabs/tabs-trigger.svelte +1 -1
  81. package/dist/tags-input/tags-input-clear-trigger.svelte +1 -1
  82. package/dist/tags-input/tags-input-item-delete-trigger.svelte +1 -1
  83. package/dist/time-picker/index.d.ts +1 -1
  84. package/dist/time-picker/time-picker-clear-trigger.svelte +1 -1
  85. package/dist/time-picker/time-picker-trigger.svelte +1 -1
  86. package/dist/timer/timer-action-trigger.svelte +1 -1
  87. package/dist/toast/create-toaster.svelte.d.ts +3 -17
  88. package/dist/toast/toast-action-trigger.svelte +1 -1
  89. package/dist/toast/toast-close-trigger.svelte +1 -1
  90. package/dist/toggle-group/toggle-group-item.svelte +1 -1
  91. package/dist/tooltip/tooltip-trigger.svelte +1 -1
  92. package/dist/tour/tour-action-trigger.svelte +1 -1
  93. package/dist/tour/tour-close-trigger.svelte +1 -1
  94. package/dist/tour/tour-trigger.svelte +1 -1
  95. package/dist/tree-view/index.d.ts +2 -0
  96. package/dist/tree-view/tree-view-branch-content.svelte +6 -7
  97. package/dist/tree-view/tree-view-branch-control.svelte +3 -5
  98. package/dist/tree-view/tree-view-branch-indent-guide.svelte +35 -0
  99. package/dist/tree-view/tree-view-branch-indent-guide.svelte.d.ts +21 -0
  100. package/dist/tree-view/tree-view-branch-indicator.svelte +6 -8
  101. package/dist/tree-view/tree-view-branch-indicator.svelte.d.ts +1 -1
  102. package/dist/tree-view/tree-view-branch-text.svelte +3 -5
  103. package/dist/tree-view/tree-view-branch-trigger.svelte +3 -5
  104. package/dist/tree-view/tree-view-branch.svelte +11 -20
  105. package/dist/tree-view/tree-view-branch.svelte.d.ts +2 -2
  106. package/dist/tree-view/tree-view-context.svelte.d.ts +2 -10
  107. package/dist/tree-view/tree-view-context.svelte.js +1 -3
  108. package/dist/tree-view/tree-view-item-indicator.svelte +3 -5
  109. package/dist/tree-view/tree-view-item-text.svelte +3 -5
  110. package/dist/tree-view/tree-view-item.svelte +9 -22
  111. package/dist/tree-view/tree-view-item.svelte.d.ts +2 -2
  112. package/dist/tree-view/tree-view-label.svelte +0 -1
  113. package/dist/tree-view/tree-view-root.svelte +1 -0
  114. package/dist/tree-view/tree-view-tree.svelte +2 -11
  115. package/dist/tree-view/tree-view-tree.svelte.d.ts +0 -1
  116. package/dist/tree-view/tree-view.d.ts +2 -0
  117. package/dist/tree-view/tree-view.js +2 -0
  118. package/dist/tree-view/types.d.ts +4 -0
  119. package/dist/tree-view/types.js +1 -0
  120. package/package.json +58 -57
@@ -24,7 +24,7 @@
24
24
  {#if asChild}
25
25
  {@render asChild(mergedProps)}
26
26
  {:else}
27
- <button bind:this={ref} type="button" {...mergedProps}>
27
+ <button bind:this={ref} {...mergedProps}>
28
28
  {@render children?.()}
29
29
  </button>
30
30
  {/if}
@@ -26,7 +26,7 @@
26
26
  {#if asChild}
27
27
  {@render asChild(mergedProps)}
28
28
  {:else}
29
- <button bind:this={ref} type="button" {...mergedProps}>
29
+ <button bind:this={ref} {...mergedProps}>
30
30
  {@render children?.()}
31
31
  </button>
32
32
  {/if}
@@ -26,7 +26,7 @@
26
26
  {#if asChild}
27
27
  {@render asChild(mergedProps)}
28
28
  {:else}
29
- <button bind:this={ref} type="button" {...mergedProps}>
29
+ <button bind:this={ref} {...mergedProps}>
30
30
  {@render children?.()}
31
31
  </button>
32
32
  {/if}
@@ -26,7 +26,7 @@
26
26
  {#if asChild}
27
27
  {@render asChild(mergedProps)}
28
28
  {:else}
29
- <button bind:this={ref} type="button" {...mergedProps}>
29
+ <button bind:this={ref} {...mergedProps}>
30
30
  {@render children?.()}
31
31
  </button>
32
32
  {/if}
@@ -26,7 +26,7 @@
26
26
  {#if asChild}
27
27
  {@render asChild(mergedProps)}
28
28
  {:else}
29
- <button bind:this={ref} type="button" {...mergedProps}>
29
+ <button bind:this={ref} {...mergedProps}>
30
30
  {@render children?.()}
31
31
  </button>
32
32
  {/if}
@@ -38,7 +38,7 @@
38
38
  {#if asChild}
39
39
  {@render asChild(mergedProps)}
40
40
  {:else}
41
- <button bind:this={ref} type="button" {...mergedProps}>
41
+ <button bind:this={ref} {...mergedProps}>
42
42
  {@render children?.()}
43
43
  </button>
44
44
  {/if}
@@ -26,7 +26,7 @@
26
26
  {#if asChild}
27
27
  {@render asChild(mergedProps)}
28
28
  {:else}
29
- <button bind:this={ref} type="button" {...mergedProps}>
29
+ <button bind:this={ref} {...mergedProps}>
30
30
  {@render children?.()}
31
31
  </button>
32
32
  {/if}
@@ -26,7 +26,7 @@
26
26
  {#if asChild}
27
27
  {@render asChild(mergedProps)}
28
28
  {:else}
29
- <button bind:this={ref} type="button" {...mergedProps}>
29
+ <button bind:this={ref} {...mergedProps}>
30
30
  {@render children?.()}
31
31
  </button>
32
32
  {/if}
@@ -24,7 +24,7 @@
24
24
  {#if asChild}
25
25
  {@render asChild(mergedProps)}
26
26
  {:else}
27
- <button bind:this={ref} type="button" {...mergedProps}>
27
+ <button bind:this={ref} {...mergedProps}>
28
28
  {@render children?.()}
29
29
  </button>
30
30
  {/if}
@@ -24,7 +24,7 @@
24
24
  {#if asChild}
25
25
  {@render asChild(mergedProps)}
26
26
  {:else}
27
- <button bind:this={ref} type="button" {...mergedProps}>
27
+ <button bind:this={ref} {...mergedProps}>
28
28
  {@render children?.()}
29
29
  </button>
30
30
  {/if}
@@ -24,7 +24,7 @@
24
24
  {#if asChild}
25
25
  {@render asChild(mergedProps)}
26
26
  {:else}
27
- <button bind:this={ref} type="button" {...mergedProps}>
27
+ <button bind:this={ref} {...mergedProps}>
28
28
  {@render children?.()}
29
29
  </button>
30
30
  {/if}
@@ -26,7 +26,7 @@
26
26
  {#if asChild}
27
27
  {@render asChild(mergedProps)}
28
28
  {:else}
29
- <button bind:this={ref} type="button" {...mergedProps}>
29
+ <button bind:this={ref} {...mergedProps}>
30
30
  {@render children?.()}
31
31
  </button>
32
32
  {/if}
@@ -26,7 +26,7 @@
26
26
  {#if asChild}
27
27
  {@render asChild(mergedProps)}
28
28
  {:else}
29
- <button bind:this={ref} type="button" {...mergedProps}>
29
+ <button bind:this={ref} {...mergedProps}>
30
30
  {@render children?.()}
31
31
  </button>
32
32
  {/if}
@@ -37,7 +37,7 @@
37
37
  {#if asChild}
38
38
  {@render asChild(mergedProps)}
39
39
  {:else}
40
- <button bind:this={ref} type="button" {...mergedProps}>
40
+ <button bind:this={ref} {...mergedProps}>
41
41
  {#if children}
42
42
  {@render children?.()}
43
43
  {:else}
@@ -26,7 +26,7 @@
26
26
  {#if asChild}
27
27
  {@render asChild(mergedProps)}
28
28
  {:else}
29
- <button bind:this={ref} type="button" {...mergedProps}>
29
+ <button bind:this={ref} {...mergedProps}>
30
30
  {@render children?.()}
31
31
  </button>
32
32
  {/if}
@@ -26,7 +26,7 @@
26
26
  {#if asChild}
27
27
  {@render asChild(mergedProps)}
28
28
  {:else}
29
- <button bind:this={ref} type="button" {...mergedProps}>
29
+ <button bind:this={ref} {...mergedProps}>
30
30
  {@render children?.()}
31
31
  </button>
32
32
  {/if}
@@ -31,6 +31,7 @@ export function createPinInputContext(props) {
31
31
  ...o,
32
32
  getClearTriggerProps() {
33
33
  return {
34
+ type: 'button',
34
35
  onclick() {
35
36
  o.clearValue();
36
37
  },
@@ -26,7 +26,7 @@
26
26
  {#if asChild}
27
27
  {@render asChild(mergedProps)}
28
28
  {:else}
29
- <button bind:this={ref} type="button" {...mergedProps}>
29
+ <button bind:this={ref} {...mergedProps}>
30
30
  {@render children?.()}
31
31
  </button>
32
32
  {/if}
@@ -24,7 +24,7 @@
24
24
  {#if asChild}
25
25
  {@render asChild(mergedProps)}
26
26
  {:else}
27
- <button bind:this={ref} type="button" {...mergedProps}>
27
+ <button bind:this={ref} {...mergedProps}>
28
28
  {@render children?.()}
29
29
  </button>
30
30
  {/if}
@@ -24,7 +24,7 @@
24
24
  {#if asChild}
25
25
  {@render asChild(mergedProps)}
26
26
  {:else}
27
- <button bind:this={ref} type="button" {...mergedProps}>
27
+ <button bind:this={ref} {...mergedProps}>
28
28
  {@render children?.()}
29
29
  </button>
30
30
  {/if}
@@ -1,10 +1,10 @@
1
1
  import * as select from '@zag-js/select';
2
- type Omitted = 'id' | 'dir' | 'getRootNode' | 'collection' | 'open.controlled';
3
- export interface CreateSelectProps<T> extends select.CollectionOptions<T>, Omit<select.Context, Omitted> {
2
+ type Omitted = 'id' | 'dir' | 'getRootNode' | 'open.controlled';
3
+ export interface CreateSelectProps extends Omit<select.Context, Omitted> {
4
4
  id?: string;
5
5
  openControlled?: boolean;
6
6
  }
7
7
  export interface CreateSelectReturn extends select.Api {
8
8
  }
9
- export declare function createSelect<T>(props: CreateSelectProps<T>): CreateSelectReturn;
9
+ export declare function createSelect(props: CreateSelectProps): CreateSelectReturn;
10
10
  export {};
@@ -4,15 +4,7 @@ import { getFieldContext } from '../field/field-context.svelte.js';
4
4
  import { getLocaleContext } from '../locale-provider/local-provider-context.svelte.js';
5
5
  import * as select from '@zag-js/select';
6
6
  import { normalizeProps, reflect, useMachine } from '@zag-js/svelte';
7
- import { createSplitProps } from '@zag-js/utils';
8
7
  export function createSelect(props) {
9
- const [collectionProps, selectProps] = $derived(createSplitProps([
10
- 'items',
11
- 'itemToValue',
12
- 'itemToString',
13
- 'isItemDisabled',
14
- ])(props));
15
- const collection = $derived(select.collection(collectionProps));
16
8
  const field = getFieldContext();
17
9
  const locale = getLocaleContext();
18
10
  const environment = getEnvironmentContext();
@@ -28,10 +20,9 @@ export function createSelect(props) {
28
20
  disabled: field?.disabled,
29
21
  readOnly: field?.readOnly,
30
22
  required: field?.required,
31
- ...selectProps,
23
+ ...props,
32
24
  getRootNode: environment?.getRootNode,
33
25
  'open.controlled': props.openControlled,
34
- collection,
35
26
  }));
36
27
  const [state, send] = useMachine(select.machine(context), { context });
37
28
  return reflect(() => {
@@ -24,7 +24,7 @@
24
24
  {#if asChild}
25
25
  {@render asChild(mergedProps)}
26
26
  {:else}
27
- <button bind:this={ref} type="button" {...mergedProps}>
27
+ <button bind:this={ref} {...mergedProps}>
28
28
  {@render children?.()}
29
29
  </button>
30
30
  {/if}
@@ -6,15 +6,15 @@
6
6
  CreateSelectReturn,
7
7
  } from './create-select.svelte.js';
8
8
 
9
- export interface SelectProps<T>
9
+ export interface SelectProps
10
10
  extends Assign<
11
11
  HtmlIngredientProps<'div', HTMLDivElement, CreateSelectReturn>,
12
- CreateSelectProps<T>
12
+ CreateSelectProps
13
13
  >,
14
14
  PresenceStrategyProps {}
15
15
  </script>
16
16
 
17
- <script lang="ts" generics="T">
17
+ <script lang="ts">
18
18
  import {mergeProps} from '../merge-props.js';
19
19
  import {createPresence} from '../presence/create-presence.svelte.js';
20
20
  import {setPresenceContext} from '../presence/presence-context.svelte.js';
@@ -28,10 +28,10 @@
28
28
  asChild,
29
29
  children,
30
30
  ...props
31
- }: SelectProps<T> = $props();
31
+ }: SelectProps = $props();
32
32
 
33
33
  let [createSelectProps, rest] = $derived(
34
- createSplitProps<CreateSelectProps<T>>([
34
+ createSplitProps<CreateSelectProps>([
35
35
  'id',
36
36
  'ids',
37
37
  'form',
@@ -39,7 +39,6 @@
39
39
  'open',
40
40
  'openControlled',
41
41
  'value',
42
- 'items',
43
42
  'invalid',
44
43
  'multiple',
45
44
  'disabled',
@@ -51,9 +50,6 @@
51
50
  'deselectable',
52
51
  'closeOnSelect',
53
52
  'highlightedValue',
54
- 'itemToValue',
55
- 'itemToString',
56
- 'isItemDisabled',
57
53
  'onOpenChange',
58
54
  'onValueChange',
59
55
  'onFocusOutside',
@@ -61,6 +57,7 @@
61
57
  'onInteractOutside',
62
58
  'onPointerDownOutside',
63
59
  'scrollToIndexFn',
60
+ 'collection',
64
61
  ])(props),
65
62
  );
66
63
 
@@ -1,26 +1,23 @@
1
1
  import type { PresenceStrategyProps } from '../presence/create-presence.svelte.js';
2
2
  import type { Assign, HtmlIngredientProps } from '../types.js';
3
3
  import type { CreateSelectProps, CreateSelectReturn } from './create-select.svelte.js';
4
- export interface SelectProps<T> extends Assign<HtmlIngredientProps<'div', HTMLDivElement, CreateSelectReturn>, CreateSelectProps<T>>, PresenceStrategyProps {
4
+ export interface SelectProps extends Assign<HtmlIngredientProps<'div', HTMLDivElement, CreateSelectReturn>, CreateSelectProps>, PresenceStrategyProps {
5
5
  }
6
- declare class __sveltets_Render<T> {
7
- props(): SelectProps<T>;
8
- events(): {} & {
9
- [evt: string]: CustomEvent<any>;
6
+ 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> {
7
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
8
+ $$bindings?: Bindings;
9
+ } & Exports;
10
+ (internal: unknown, props: Props & {
11
+ $$events?: Events;
12
+ $$slots?: Slots;
13
+ }): Exports & {
14
+ $set?: any;
15
+ $on?: any;
10
16
  };
11
- slots(): {};
12
- bindings(): "ref";
13
- exports(): {};
17
+ z_$$bindings?: Bindings;
14
18
  }
15
- interface $$IsomorphicComponent {
16
- new <T>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<T>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<T>['props']>, ReturnType<__sveltets_Render<T>['events']>, ReturnType<__sveltets_Render<T>['slots']>> & {
17
- $$bindings?: ReturnType<__sveltets_Render<T>['bindings']>;
18
- } & ReturnType<__sveltets_Render<T>['exports']>;
19
- <T>(internal: unknown, props: ReturnType<__sveltets_Render<T>['props']> & {
20
- $$events?: ReturnType<__sveltets_Render<T>['events']>;
21
- }): ReturnType<__sveltets_Render<T>['exports']>;
22
- z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
23
- }
24
- declare const SelectRoot: $$IsomorphicComponent;
25
- type SelectRoot<T> = InstanceType<typeof SelectRoot<T>>;
19
+ declare const SelectRoot: $$__sveltets_2_IsomorphicComponent<SelectProps, {
20
+ [evt: string]: CustomEvent<any>;
21
+ }, {}, {}, "ref">;
22
+ type SelectRoot = InstanceType<typeof SelectRoot>;
26
23
  export default SelectRoot;
@@ -26,7 +26,7 @@
26
26
  {#if asChild}
27
27
  {@render asChild(mergedProps)}
28
28
  {:else}
29
- <button bind:this={ref} type="button" {...mergedProps}>
29
+ <button bind:this={ref} {...mergedProps}>
30
30
  {@render children?.()}
31
31
  </button>
32
32
  {/if}
@@ -1,3 +1,4 @@
1
+ export { collection } from '@zag-js/select';
1
2
  export { default as ClearTrigger } from './select-clear-trigger.svelte';
2
3
  export { default as Content } from './select-content.svelte';
3
4
  export { default as Control } from './select-control.svelte';
@@ -1,3 +1,4 @@
1
+ export { collection } from '@zag-js/select';
1
2
  export { default as ClearTrigger } from './select-clear-trigger.svelte';
2
3
  export { default as Content } from './select-content.svelte';
3
4
  export { default as Control } from './select-control.svelte';
@@ -26,7 +26,7 @@
26
26
  {#if asChild}
27
27
  {@render asChild(mergedProps)}
28
28
  {:else}
29
- <button bind:this={ref} type="button" {...mergedProps}>
29
+ <button bind:this={ref} {...mergedProps}>
30
30
  {@render children?.()}
31
31
  </button>
32
32
  {/if}
@@ -24,7 +24,7 @@
24
24
  {#if asChild}
25
25
  {@render asChild(mergedProps)}
26
26
  {:else}
27
- <button bind:this={ref} type="button" {...mergedProps}>
27
+ <button bind:this={ref} {...mergedProps}>
28
28
  {@render children?.()}
29
29
  </button>
30
30
  {/if}
@@ -24,7 +24,7 @@
24
24
  {#if asChild}
25
25
  {@render asChild(mergedProps)}
26
26
  {:else}
27
- <button bind:this={ref} type="button" {...mergedProps}>
27
+ <button bind:this={ref} {...mergedProps}>
28
28
  {@render children?.()}
29
29
  </button>
30
30
  {/if}
@@ -30,7 +30,7 @@
30
30
  {#if asChild}
31
31
  {@render asChild(mergedProps)}
32
32
  {:else}
33
- <button bind:this={ref} type="button" {...mergedProps}>
33
+ <button bind:this={ref} {...mergedProps}>
34
34
  {@render children?.()}
35
35
  </button>
36
36
  {/if}
@@ -35,7 +35,7 @@
35
35
  {#if asChild}
36
36
  {@render asChild(mergedProps)}
37
37
  {:else}
38
- <button bind:this={ref} type="button" {...mergedProps}>
38
+ <button bind:this={ref} {...mergedProps}>
39
39
  {@render children?.()}
40
40
  </button>
41
41
  {/if}
@@ -26,7 +26,7 @@
26
26
  {#if asChild}
27
27
  {@render asChild(mergedProps)}
28
28
  {:else}
29
- <button bind:this={ref} type="button" {...mergedProps}>
29
+ <button bind:this={ref} {...mergedProps}>
30
30
  {@render children?.()}
31
31
  </button>
32
32
  {/if}
@@ -30,7 +30,7 @@
30
30
  {#if asChild}
31
31
  {@render asChild(mergedProps)}
32
32
  {:else}
33
- <button bind:this={ref} type="button" {...mergedProps}>
33
+ <button bind:this={ref} {...mergedProps}>
34
34
  {@render children?.()}
35
35
  </button>
36
36
  {/if}
@@ -13,5 +13,5 @@ export type { TimePickerProps } from './time-picker-root.svelte';
13
13
  export type { TimePickerSecondCellProps } from './time-picker-second-cell.svelte';
14
14
  export type { TimePickerSpacerProps } from './time-picker-spacer.svelte';
15
15
  export type { TimePickerTriggerProps } from './time-picker-trigger.svelte';
16
- export { anatomy as timePickerAnatomy } from '@zag-js/time-picker';
16
+ export { anatomy as timePickerAnatomy, type Time } from '@zag-js/time-picker';
17
17
  export { getTimePickerContext } from './time-picker-context.svelte.js';
@@ -26,7 +26,7 @@
26
26
  {#if asChild}
27
27
  {@render asChild(mergedProps)}
28
28
  {:else}
29
- <button bind:this={ref} type="button" {...mergedProps}>
29
+ <button bind:this={ref} {...mergedProps}>
30
30
  {@render children?.()}
31
31
  </button>
32
32
  {/if}
@@ -24,7 +24,7 @@
24
24
  {#if asChild}
25
25
  {@render asChild(mergedProps)}
26
26
  {:else}
27
- <button bind:this={ref} type="button" {...mergedProps}>
27
+ <button bind:this={ref} {...mergedProps}>
28
28
  {@render children?.()}
29
29
  </button>
30
30
  {/if}
@@ -31,7 +31,7 @@
31
31
  {#if asChild}
32
32
  {@render asChild(mergedProps)}
33
33
  {:else}
34
- <button bind:this={ref} type="button" {...mergedProps}>
34
+ <button bind:this={ref} {...mergedProps}>
35
35
  {@render children?.()}
36
36
  </button>
37
37
  {/if}
@@ -1,23 +1,9 @@
1
- import type { Machine, StateMachine } from '@zag-js/core';
2
1
  import * as toast from '@zag-js/toast';
3
- export interface CreateToasterProps {
2
+ export interface CreateToasterProps extends Omit<Partial<toast.GroupMachineContext>, 'id'> {
4
3
  id?: string;
5
- max?: toast.GroupMachineContext['max'];
6
- gap?: toast.GroupMachineContext['gap'];
7
- hotkey?: toast.GroupMachineContext['hotkey'];
8
- offsets?: toast.GroupMachineContext['offsets'];
9
- overlap?: toast.GroupMachineContext['overlap'];
10
- duration?: toast.GroupMachineContext['duration'];
11
- placement?: toast.GroupMachineContext['placement'];
12
- removeDelay?: toast.GroupMachineContext['removeDelay'];
13
- pauseOnPageIdle?: toast.GroupMachineContext['pauseOnPageIdle'];
4
+ placement?: toast.Placement;
14
5
  }
15
- type ToasterMachineState = {
16
- value: 'stack' | 'overlap';
17
- };
18
- type ToasterMachine = Machine<toast.GroupMachineContext, ToasterMachineState, StateMachine.AnyEventObject>;
19
6
  export interface CreateToasterReturn extends toast.GroupApi {
20
- machine: ToasterMachine;
7
+ machine: toast.GroupService;
21
8
  }
22
9
  export declare function createToaster(props?: CreateToasterProps): CreateToasterReturn;
23
- export {};
@@ -26,7 +26,7 @@
26
26
  {#if asChild}
27
27
  {@render asChild(mergedProps)}
28
28
  {:else}
29
- <button bind:this={ref} type="button" {...mergedProps}>
29
+ <button bind:this={ref} {...mergedProps}>
30
30
  {@render children?.()}
31
31
  </button>
32
32
  {/if}
@@ -24,7 +24,7 @@
24
24
  {#if asChild}
25
25
  {@render asChild(mergedProps)}
26
26
  {:else}
27
- <button bind:this={ref} type="button" {...mergedProps}>
27
+ <button bind:this={ref} {...mergedProps}>
28
28
  {@render children?.()}
29
29
  </button>
30
30
  {/if}
@@ -37,7 +37,7 @@
37
37
  {#if asChild}
38
38
  {@render asChild(mergedProps, itemState)}
39
39
  {:else}
40
- <button bind:this={ref} type="button" {...mergedProps}>
40
+ <button bind:this={ref} {...mergedProps}>
41
41
  {@render children?.(itemState)}
42
42
  </button>
43
43
  {/if}
@@ -24,7 +24,7 @@
24
24
  {#if asChild}
25
25
  {@render asChild(mergedProps)}
26
26
  {:else}
27
- <button bind:this={ref} type="button" {...mergedProps}>
27
+ <button bind:this={ref} {...mergedProps}>
28
28
  {@render children?.()}
29
29
  </button>
30
30
  {/if}
@@ -29,7 +29,7 @@
29
29
  {#if asChild}
30
30
  {@render asChild(mergedProps)}
31
31
  {:else}
32
- <button bind:this={ref} type="button" {...mergedProps}>
32
+ <button bind:this={ref} {...mergedProps}>
33
33
  {#if children}
34
34
  {@render children?.()}
35
35
  {:else}
@@ -24,7 +24,7 @@
24
24
  {#if asChild}
25
25
  {@render asChild(mergedProps)}
26
26
  {:else}
27
- <button bind:this={ref} type="button" {...mergedProps}>
27
+ <button bind:this={ref} {...mergedProps}>
28
28
  {@render children?.()}
29
29
  </button>
30
30
  {/if}
@@ -24,7 +24,7 @@
24
24
  {#if asChild}
25
25
  {@render asChild(mergedProps)}
26
26
  {:else}
27
- <button bind:this={ref} type="button" {...mergedProps}>
27
+ <button bind:this={ref} {...mergedProps}>
28
28
  {@render children?.()}
29
29
  </button>
30
30
  {/if}
@@ -1,6 +1,7 @@
1
1
  export * as TreeView from './tree-view.js';
2
2
  export type { TreeViewBranchContentProps } from './tree-view-branch-content.svelte';
3
3
  export type { TreeViewBranchControlProps } from './tree-view-branch-control.svelte';
4
+ export type { TreeViewBranchIndentGuideProps } from './tree-view-branch-indent-guide.svelte';
4
5
  export type { TreeViewBranchIndicatorProps } from './tree-view-branch-indicator.svelte';
5
6
  export type { TreeViewBranchTextProps } from './tree-view-branch-text.svelte';
6
7
  export type { TreeViewBranchTriggerProps } from './tree-view-branch-trigger.svelte';
@@ -13,3 +14,4 @@ export type { TreeViewProps } from './tree-view-root.svelte';
13
14
  export type { TreeViewTreeProps } from './tree-view-tree.svelte';
14
15
  export { anatomy as treeViewAnatomy } from '@zag-js/tree-view';
15
16
  export { getTreeViewContext } from './tree-view-context.svelte.js';
17
+ export type { NodeProps } from './types.js';