ui-ingredients 0.21.0 → 0.21.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/accordion/accordion-item-content.svelte +55 -55
  2. package/dist/accordion/accordion-root.svelte +66 -66
  3. package/dist/alert-dialog/alert-dialog-backdrop.svelte +49 -49
  4. package/dist/alert-dialog/alert-dialog-root.svelte +48 -48
  5. package/dist/avatar/avatar-root.svelte +46 -46
  6. package/dist/carousel/carousel-root.svelte +56 -56
  7. package/dist/checkbox/checkbox-root.svelte +59 -59
  8. package/dist/clipboard/clipboard-root.svelte +52 -52
  9. package/dist/collapsible/collapsible-root.svelte +75 -75
  10. package/dist/color-picker/color-picker-root.svelte +87 -87
  11. package/dist/combobox/combobox-root.svelte +101 -101
  12. package/dist/combobox/combobox-trigger.svelte +41 -41
  13. package/dist/date-picker/date-picker-root.svelte +89 -89
  14. package/dist/dialog/dialog-backdrop.svelte +45 -45
  15. package/dist/dialog/dialog-root.svelte +48 -48
  16. package/dist/drawer/drawer-backdrop.svelte +45 -45
  17. package/dist/drawer/drawer-root.svelte +48 -48
  18. package/dist/editable/editable-root.svelte +74 -74
  19. package/dist/field/field-error-text.svelte +50 -50
  20. package/dist/field/field-root.svelte +63 -63
  21. package/dist/file-upload/file-upload-root.svelte +66 -66
  22. package/dist/floating-panel/floating-panel-root.svelte +47 -47
  23. package/dist/hover-card/hover-card-root.svelte +52 -52
  24. package/dist/menu/menu-root.svelte +74 -74
  25. package/dist/number-input/number-input-root.svelte +74 -74
  26. package/dist/pagination/pagination-root.svelte +57 -57
  27. package/dist/pin-input/pin-input-root.svelte +68 -68
  28. package/dist/popover/popover-root.svelte +60 -60
  29. package/dist/presence/presence.svelte +48 -48
  30. package/dist/progress/progress-root.svelte +54 -54
  31. package/dist/qr-code/qr-code-root.svelte +48 -48
  32. package/dist/radio-group/radio-group-root.svelte +56 -56
  33. package/dist/rating-group/rating-group-root.svelte +63 -63
  34. package/dist/segment-group/segment-group-root.svelte +58 -58
  35. package/dist/select/select-root.svelte +88 -88
  36. package/dist/signature-pad/signature-pad-root.svelte +59 -59
  37. package/dist/slider/slider-root.svelte +69 -69
  38. package/dist/splitter/splitter-root.svelte +53 -53
  39. package/dist/steps/steps-completed-content.svelte +51 -51
  40. package/dist/steps/steps-content.svelte +55 -55
  41. package/dist/steps/steps-root.svelte +65 -65
  42. package/dist/switch/switch-root.svelte +59 -59
  43. package/dist/tabs/tabs-root.svelte +57 -57
  44. package/dist/tags-input/tags-input-root.svelte +74 -74
  45. package/dist/time-picker/time-picker-root.svelte +81 -81
  46. package/dist/timer/timer-root.svelte +55 -55
  47. package/dist/toast/create-toaster.svelte.d.ts +1 -1
  48. package/dist/toast/toast-actor.svelte +19 -19
  49. package/dist/toast/toast-actor.svelte.d.ts +3 -3
  50. package/dist/toast/toaster.svelte +19 -21
  51. package/dist/toast/toaster.svelte.d.ts +1 -1
  52. package/dist/toggle/toggle-root.svelte +50 -50
  53. package/dist/toggle-group/toggle-group-root.svelte +58 -58
  54. package/dist/tooltip/tooltip-root.svelte +44 -44
  55. package/dist/tour/tour-backdrop.svelte +44 -44
  56. package/dist/tour/tour-root.svelte +47 -47
  57. package/dist/tree-view/tree-view-branch-content.svelte +55 -55
  58. package/dist/tree-view/tree-view-root.svelte +68 -68
  59. package/package.json +5 -5
@@ -1,69 +1,69 @@
1
- <script lang="ts" module>
2
- import type {Assign, HtmlIngredientProps} from '../types.js';
3
- import type {
4
- CreateSliderProps,
5
- CreateSliderReturn,
6
- } from './create-slider.svelte.js';
7
-
8
- export interface SliderProps
9
- extends Assign<
10
- HtmlIngredientProps<'div', HTMLDivElement, CreateSliderReturn>,
11
- CreateSliderProps
12
- > {}
13
- </script>
14
-
15
- <script lang="ts">
16
- import {mergeProps} from '../merge-props.js';
17
- import {reflect} from '@zag-js/svelte';
18
- import {createSplitProps} from '@zag-js/utils';
19
- import {createSlider} from './create-slider.svelte.js';
20
- import {setSliderContext} from './slider-context.svelte.js';
21
-
22
- let {
23
- ref = $bindable(null),
24
- asChild,
25
- children,
26
- ...props
27
- }: SliderProps = $props();
28
-
29
- let [createSliderProps, localProps] = $derived(
30
- createSplitProps<CreateSliderProps>([
31
- 'id',
32
- 'ids',
33
- 'max',
34
- 'min',
35
- 'step',
36
- 'form',
37
- 'name',
38
- 'value',
39
- 'origin',
40
- 'invalid',
41
- 'readOnly',
42
- 'disabled',
43
- 'orientation',
44
- 'thumbAlignment',
45
- 'thumbSize',
46
- 'minStepsBetweenThumbs',
47
- 'onFocusChange',
48
- 'onValueChange',
49
- 'onValueChangeEnd',
50
- 'getAriaValueText',
51
- 'aria-label',
52
- 'aria-labelledby',
53
- ])(props),
54
- );
55
-
56
- let slider = createSlider(reflect(() => createSliderProps));
57
-
58
- let mergedProps = $derived(mergeProps(slider.getRootProps(), localProps));
59
-
60
- setSliderContext(slider);
61
- </script>
62
-
63
- {#if asChild}
64
- {@render asChild(mergedProps, slider)}
65
- {:else}
66
- <div bind:this={ref} {...mergedProps}>
67
- {@render children?.(slider)}
68
- </div>
69
- {/if}
1
+ <script lang="ts" module>
2
+ import type {Assign, HtmlIngredientProps} from '../types.js';
3
+ import type {
4
+ CreateSliderProps,
5
+ CreateSliderReturn,
6
+ } from './create-slider.svelte.js';
7
+
8
+ export interface SliderProps
9
+ extends Assign<
10
+ HtmlIngredientProps<'div', HTMLDivElement, CreateSliderReturn>,
11
+ CreateSliderProps
12
+ > {}
13
+ </script>
14
+
15
+ <script lang="ts">
16
+ import {mergeProps} from '../merge-props.js';
17
+ import {reflect} from '@zag-js/svelte';
18
+ import {createSplitProps} from '@zag-js/utils';
19
+ import {createSlider} from './create-slider.svelte.js';
20
+ import {setSliderContext} from './slider-context.svelte.js';
21
+
22
+ let {
23
+ ref = $bindable(null),
24
+ asChild,
25
+ children,
26
+ ...props
27
+ }: SliderProps = $props();
28
+
29
+ let [createSliderProps, localProps] = $derived(
30
+ createSplitProps<CreateSliderProps>([
31
+ 'id',
32
+ 'ids',
33
+ 'max',
34
+ 'min',
35
+ 'step',
36
+ 'form',
37
+ 'name',
38
+ 'value',
39
+ 'origin',
40
+ 'invalid',
41
+ 'readOnly',
42
+ 'disabled',
43
+ 'orientation',
44
+ 'thumbAlignment',
45
+ 'thumbSize',
46
+ 'minStepsBetweenThumbs',
47
+ 'onFocusChange',
48
+ 'onValueChange',
49
+ 'onValueChangeEnd',
50
+ 'getAriaValueText',
51
+ 'aria-label',
52
+ 'aria-labelledby',
53
+ ])(props),
54
+ );
55
+
56
+ let slider = createSlider(reflect(() => createSliderProps));
57
+
58
+ let mergedProps = $derived(mergeProps(slider.getRootProps(), localProps));
59
+
60
+ setSliderContext(slider);
61
+ </script>
62
+
63
+ {#if asChild}
64
+ {@render asChild(mergedProps, slider)}
65
+ {:else}
66
+ <div bind:this={ref} {...mergedProps}>
67
+ {@render children?.(slider)}
68
+ </div>
69
+ {/if}
@@ -1,53 +1,53 @@
1
- <script lang="ts" module>
2
- import type {Assign, HtmlIngredientProps} from '../types.js';
3
- import type {
4
- CreateSplitterProps,
5
- CreateSplitterReturn,
6
- } from './create-splitter.svelte.js';
7
-
8
- export interface SplitterProps
9
- extends Assign<
10
- HtmlIngredientProps<'div', HTMLDivElement, CreateSplitterReturn>,
11
- CreateSplitterProps
12
- > {}
13
- </script>
14
-
15
- <script lang="ts">
16
- import {mergeProps} from '../merge-props.js';
17
- import {reflect} from '@zag-js/svelte';
18
- import {createSplitProps} from '@zag-js/utils';
19
- import {createSplitter} from './create-splitter.svelte.js';
20
- import {setSplitterContext} from './splitter-context.svelte.js';
21
-
22
- let {
23
- ref = $bindable(null),
24
- asChild,
25
- children,
26
- ...props
27
- }: SplitterProps = $props();
28
-
29
- let [createSplitterProps, localProps] = $derived(
30
- createSplitProps<CreateSplitterProps>([
31
- 'id',
32
- 'ids',
33
- 'size',
34
- 'orientation',
35
- 'onSizeChange',
36
- 'onSizeChangeEnd',
37
- ])(props),
38
- );
39
-
40
- let splitter = createSplitter(reflect(() => createSplitterProps));
41
-
42
- let mergedProps = $derived(mergeProps(splitter.getRootProps(), localProps));
43
-
44
- setSplitterContext(splitter);
45
- </script>
46
-
47
- {#if asChild}
48
- {@render asChild(mergedProps, splitter)}
49
- {:else}
50
- <div bind:this={ref} {...mergedProps}>
51
- {@render children?.(splitter)}
52
- </div>
53
- {/if}
1
+ <script lang="ts" module>
2
+ import type {Assign, HtmlIngredientProps} from '../types.js';
3
+ import type {
4
+ CreateSplitterProps,
5
+ CreateSplitterReturn,
6
+ } from './create-splitter.svelte.js';
7
+
8
+ export interface SplitterProps
9
+ extends Assign<
10
+ HtmlIngredientProps<'div', HTMLDivElement, CreateSplitterReturn>,
11
+ CreateSplitterProps
12
+ > {}
13
+ </script>
14
+
15
+ <script lang="ts">
16
+ import {mergeProps} from '../merge-props.js';
17
+ import {reflect} from '@zag-js/svelte';
18
+ import {createSplitProps} from '@zag-js/utils';
19
+ import {createSplitter} from './create-splitter.svelte.js';
20
+ import {setSplitterContext} from './splitter-context.svelte.js';
21
+
22
+ let {
23
+ ref = $bindable(null),
24
+ asChild,
25
+ children,
26
+ ...props
27
+ }: SplitterProps = $props();
28
+
29
+ let [createSplitterProps, localProps] = $derived(
30
+ createSplitProps<CreateSplitterProps>([
31
+ 'id',
32
+ 'ids',
33
+ 'size',
34
+ 'orientation',
35
+ 'onSizeChange',
36
+ 'onSizeChangeEnd',
37
+ ])(props),
38
+ );
39
+
40
+ let splitter = createSplitter(reflect(() => createSplitterProps));
41
+
42
+ let mergedProps = $derived(mergeProps(splitter.getRootProps(), localProps));
43
+
44
+ setSplitterContext(splitter);
45
+ </script>
46
+
47
+ {#if asChild}
48
+ {@render asChild(mergedProps, splitter)}
49
+ {:else}
50
+ <div bind:this={ref} {...mergedProps}>
51
+ {@render children?.(splitter)}
52
+ </div>
53
+ {/if}
@@ -1,51 +1,51 @@
1
- <script lang="ts" module>
2
- import type {HtmlIngredientProps} from '../types.js';
3
- import type {Action} from 'svelte/action';
4
-
5
- export interface StepsCompletedContentProps
6
- extends HtmlIngredientProps<'div', HTMLDivElement, never, Action> {}
7
- </script>
8
-
9
- <script lang="ts">
10
- import {mergeProps} from '../merge-props.js';
11
- import {createPresence} from '../presence/create-presence.svelte.js';
12
- import {getPresenceStrategyPropsContext} from '../presence/presence-context.svelte.js';
13
- import {reflect} from '@zag-js/svelte';
14
- import {getStepsContext} from './steps-context.svelte.js';
15
-
16
- let {
17
- ref = $bindable(null),
18
- asChild,
19
- children,
20
- ...props
21
- }: StepsCompletedContentProps = $props();
22
-
23
- let steps = getStepsContext();
24
- let index = $derived(steps.count);
25
-
26
- let presenceStrategyProps = getPresenceStrategyPropsContext();
27
- let presence = createPresence(
28
- reflect(() => ({
29
- ...presenceStrategyProps,
30
- present: steps.value === index,
31
- })),
32
- );
33
-
34
- let mergedProps = $derived(
35
- mergeProps(
36
- steps.getContentProps({index}),
37
- presence.getPresenceProps(),
38
- props,
39
- ),
40
- );
41
- </script>
42
-
43
- {#if presence.mounted}
44
- {#if asChild}
45
- {@render asChild(presence.setReference, mergedProps)}
46
- {:else}
47
- <div use:presence.setReference bind:this={ref} {...mergedProps}>
48
- {@render children?.()}
49
- </div>
50
- {/if}
51
- {/if}
1
+ <script lang="ts" module>
2
+ import type {HtmlIngredientProps} from '../types.js';
3
+ import type {Action} from 'svelte/action';
4
+
5
+ export interface StepsCompletedContentProps
6
+ extends HtmlIngredientProps<'div', HTMLDivElement, never, Action> {}
7
+ </script>
8
+
9
+ <script lang="ts">
10
+ import {mergeProps} from '../merge-props.js';
11
+ import {createPresence} from '../presence/create-presence.svelte.js';
12
+ import {getPresenceStrategyPropsContext} from '../presence/presence-context.svelte.js';
13
+ import {reflect} from '@zag-js/svelte';
14
+ import {getStepsContext} from './steps-context.svelte.js';
15
+
16
+ let {
17
+ ref = $bindable(null),
18
+ asChild,
19
+ children,
20
+ ...props
21
+ }: StepsCompletedContentProps = $props();
22
+
23
+ let steps = getStepsContext();
24
+ let index = $derived(steps.count);
25
+
26
+ let presenceStrategyProps = getPresenceStrategyPropsContext();
27
+ let presence = createPresence(
28
+ reflect(() => ({
29
+ ...presenceStrategyProps,
30
+ present: steps.value === index,
31
+ })),
32
+ );
33
+
34
+ let mergedProps = $derived(
35
+ mergeProps(
36
+ steps.getContentProps({index}),
37
+ presence.getPresenceProps(),
38
+ props,
39
+ ),
40
+ );
41
+ </script>
42
+
43
+ {#if presence.mounted}
44
+ {#if asChild}
45
+ {@render asChild(presence.setReference, mergedProps)}
46
+ {:else}
47
+ <div use:presence.setReference bind:this={ref} {...mergedProps}>
48
+ {@render children?.()}
49
+ </div>
50
+ {/if}
51
+ {/if}
@@ -1,55 +1,55 @@
1
- <script lang="ts" module>
2
- import type {Assign, HtmlIngredientProps} from '../types.js';
3
- import type {ItemProps} from '@zag-js/steps';
4
- import type {Action} from 'svelte/action';
5
-
6
- export interface StepsContentProps
7
- extends Assign<
8
- HtmlIngredientProps<'div', HTMLDivElement, never, Action>,
9
- ItemProps
10
- > {}
11
- </script>
12
-
13
- <script lang="ts">
14
- import {mergeProps} from '../merge-props.js';
15
- import {createPresence} from '../presence/create-presence.svelte.js';
16
- import {getPresenceStrategyPropsContext} from '../presence/presence-context.svelte.js';
17
- import {reflect} from '@zag-js/svelte';
18
- import {getStepsContext} from './steps-context.svelte.js';
19
-
20
- let {
21
- ref = $bindable(null),
22
- index,
23
- asChild,
24
- children,
25
- ...props
26
- }: StepsContentProps = $props();
27
-
28
- let steps = getStepsContext();
29
-
30
- let presenceStrategyProps = getPresenceStrategyPropsContext();
31
- let presence = createPresence(
32
- reflect(() => ({
33
- ...presenceStrategyProps,
34
- present: steps.value === index,
35
- })),
36
- );
37
-
38
- let mergedProps = $derived(
39
- mergeProps(
40
- steps.getContentProps({index}),
41
- presence.getPresenceProps(),
42
- props,
43
- ),
44
- );
45
- </script>
46
-
47
- {#if presence.mounted}
48
- {#if asChild}
49
- {@render asChild(presence.setReference, mergedProps)}
50
- {:else}
51
- <div use:presence.setReference bind:this={ref} {...mergedProps}>
52
- {@render children?.()}
53
- </div>
54
- {/if}
55
- {/if}
1
+ <script lang="ts" module>
2
+ import type {Assign, HtmlIngredientProps} from '../types.js';
3
+ import type {ItemProps} from '@zag-js/steps';
4
+ import type {Action} from 'svelte/action';
5
+
6
+ export interface StepsContentProps
7
+ extends Assign<
8
+ HtmlIngredientProps<'div', HTMLDivElement, never, Action>,
9
+ ItemProps
10
+ > {}
11
+ </script>
12
+
13
+ <script lang="ts">
14
+ import {mergeProps} from '../merge-props.js';
15
+ import {createPresence} from '../presence/create-presence.svelte.js';
16
+ import {getPresenceStrategyPropsContext} from '../presence/presence-context.svelte.js';
17
+ import {reflect} from '@zag-js/svelte';
18
+ import {getStepsContext} from './steps-context.svelte.js';
19
+
20
+ let {
21
+ ref = $bindable(null),
22
+ index,
23
+ asChild,
24
+ children,
25
+ ...props
26
+ }: StepsContentProps = $props();
27
+
28
+ let steps = getStepsContext();
29
+
30
+ let presenceStrategyProps = getPresenceStrategyPropsContext();
31
+ let presence = createPresence(
32
+ reflect(() => ({
33
+ ...presenceStrategyProps,
34
+ present: steps.value === index,
35
+ })),
36
+ );
37
+
38
+ let mergedProps = $derived(
39
+ mergeProps(
40
+ steps.getContentProps({index}),
41
+ presence.getPresenceProps(),
42
+ props,
43
+ ),
44
+ );
45
+ </script>
46
+
47
+ {#if presence.mounted}
48
+ {#if asChild}
49
+ {@render asChild(presence.setReference, mergedProps)}
50
+ {:else}
51
+ <div use:presence.setReference bind:this={ref} {...mergedProps}>
52
+ {@render children?.()}
53
+ </div>
54
+ {/if}
55
+ {/if}
@@ -1,65 +1,65 @@
1
- <script lang="ts" module>
2
- import type {PresenceStrategyProps} from '../presence/create-presence.svelte.js';
3
- import type {Assign, HtmlIngredientProps} from '../types.js';
4
- import type {
5
- CreateStepsProps,
6
- CreateStepsReturn,
7
- } from './create-steps.svelte.js';
8
-
9
- export interface StepsProps
10
- extends Assign<
11
- HtmlIngredientProps<'div', HTMLDivElement, CreateStepsReturn>,
12
- CreateStepsProps
13
- >,
14
- PresenceStrategyProps {}
15
- </script>
16
-
17
- <script lang="ts">
18
- import {mergeProps} from '../merge-props.js';
19
- import {setPresenceStrategyPropsContext} from '../presence/presence-context.svelte.js';
20
- import {reflect} from '@zag-js/svelte';
21
- import {createSplitProps} from '@zag-js/utils';
22
- import {createSteps} from './create-steps.svelte.js';
23
- import {setStepsContext} from './steps-context.svelte.js';
24
-
25
- let {
26
- ref = $bindable(null),
27
- asChild,
28
- children,
29
- ...props
30
- }: StepsProps = $props();
31
-
32
- let [presenceStrategyProps, rest] = $derived(
33
- createSplitProps<PresenceStrategyProps>(['lazyMount', 'keepMounted'])(
34
- props,
35
- ),
36
- );
37
-
38
- let [createStepsProps, localProps] = $derived(
39
- createSplitProps<CreateStepsProps>([
40
- 'id',
41
- 'ids',
42
- 'step',
43
- 'count',
44
- 'linear',
45
- 'orientation',
46
- 'onStepChange',
47
- 'onStepComplete',
48
- ])(rest),
49
- );
50
-
51
- let steps = createSteps(reflect(() => createStepsProps));
52
-
53
- let mergedProps = $derived(mergeProps(steps.getRootProps(), localProps));
54
-
55
- setStepsContext(steps);
56
- setPresenceStrategyPropsContext(() => presenceStrategyProps);
57
- </script>
58
-
59
- {#if asChild}
60
- {@render asChild(mergedProps, steps)}
61
- {:else}
62
- <div bind:this={ref} {...mergedProps}>
63
- {@render children?.(steps)}
64
- </div>
65
- {/if}
1
+ <script lang="ts" module>
2
+ import type {PresenceStrategyProps} from '../presence/create-presence.svelte.js';
3
+ import type {Assign, HtmlIngredientProps} from '../types.js';
4
+ import type {
5
+ CreateStepsProps,
6
+ CreateStepsReturn,
7
+ } from './create-steps.svelte.js';
8
+
9
+ export interface StepsProps
10
+ extends Assign<
11
+ HtmlIngredientProps<'div', HTMLDivElement, CreateStepsReturn>,
12
+ CreateStepsProps
13
+ >,
14
+ PresenceStrategyProps {}
15
+ </script>
16
+
17
+ <script lang="ts">
18
+ import {mergeProps} from '../merge-props.js';
19
+ import {setPresenceStrategyPropsContext} from '../presence/presence-context.svelte.js';
20
+ import {reflect} from '@zag-js/svelte';
21
+ import {createSplitProps} from '@zag-js/utils';
22
+ import {createSteps} from './create-steps.svelte.js';
23
+ import {setStepsContext} from './steps-context.svelte.js';
24
+
25
+ let {
26
+ ref = $bindable(null),
27
+ asChild,
28
+ children,
29
+ ...props
30
+ }: StepsProps = $props();
31
+
32
+ let [presenceStrategyProps, rest] = $derived(
33
+ createSplitProps<PresenceStrategyProps>(['lazyMount', 'keepMounted'])(
34
+ props,
35
+ ),
36
+ );
37
+
38
+ let [createStepsProps, localProps] = $derived(
39
+ createSplitProps<CreateStepsProps>([
40
+ 'id',
41
+ 'ids',
42
+ 'step',
43
+ 'count',
44
+ 'linear',
45
+ 'orientation',
46
+ 'onStepChange',
47
+ 'onStepComplete',
48
+ ])(rest),
49
+ );
50
+
51
+ let steps = createSteps(reflect(() => createStepsProps));
52
+
53
+ let mergedProps = $derived(mergeProps(steps.getRootProps(), localProps));
54
+
55
+ setStepsContext(steps);
56
+ setPresenceStrategyPropsContext(() => presenceStrategyProps);
57
+ </script>
58
+
59
+ {#if asChild}
60
+ {@render asChild(mergedProps, steps)}
61
+ {:else}
62
+ <div bind:this={ref} {...mergedProps}>
63
+ {@render children?.(steps)}
64
+ </div>
65
+ {/if}