ui-ingredients 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/accordion/root.svelte +2 -2
- package/dist/avatar/root.svelte +2 -2
- package/dist/carousel/root.svelte +2 -2
- package/dist/checkbox/root.svelte +2 -2
- package/dist/clipboard/root.svelte +2 -2
- package/dist/collapsible/root.svelte +2 -2
- package/dist/combobox/item-group.svelte +2 -2
- package/dist/combobox/root.svelte +2 -2
- package/dist/dialog/root.svelte +2 -2
- package/dist/editable/root.svelte +2 -2
- package/dist/hover-card/root.svelte +2 -2
- package/dist/number-input/root.svelte +2 -2
- package/dist/pagination/root.svelte +2 -2
- package/dist/pin-input/root.svelte +2 -2
- package/dist/popover/root.svelte +2 -2
- package/dist/presence/root.svelte +1 -7
- package/dist/progress/root.svelte +2 -2
- package/dist/qr-code/root.svelte +2 -2
- package/dist/radio-group/root.svelte +2 -2
- package/dist/rating-group/root.svelte +2 -2
- package/dist/segment-group/root.svelte +2 -2
- package/dist/select/item-group.svelte +2 -2
- package/dist/select/root.svelte +2 -2
- package/dist/slider/root.svelte +2 -2
- package/dist/steps/root.svelte +2 -2
- package/dist/switch/root.svelte +2 -2
- package/dist/tabs/root.svelte +2 -2
- package/dist/tags-input/root.svelte +2 -2
- package/dist/timer/root.svelte +2 -2
- package/dist/toast/create-toaster.svelte.js +2 -2
- package/dist/toggle-group/root.svelte +2 -2
- package/dist/tooltip/root.svelte +2 -2
- package/dist/utils.svelte.d.ts +1 -1
- package/dist/utils.svelte.js +2 -2
- package/package.json +2 -2
@@ -18,7 +18,7 @@
|
|
18
18
|
<script lang="ts">
|
19
19
|
import {useEnvironmentContext} from '../environment-provider/index.js';
|
20
20
|
import {useLocaleContext} from '../locale-provider/index.js';
|
21
|
-
import {
|
21
|
+
import {createUniqueId} from '../utils.svelte.js';
|
22
22
|
import {mergeProps} from '@zag-js/svelte';
|
23
23
|
import {
|
24
24
|
createAccordionContext,
|
@@ -45,7 +45,7 @@
|
|
45
45
|
let environmentContext = useEnvironmentContext();
|
46
46
|
|
47
47
|
let context = createAccordionContext({
|
48
|
-
id: id ??
|
48
|
+
id: id ?? createUniqueId(),
|
49
49
|
ids,
|
50
50
|
dir: dir ?? localeContext?.dir,
|
51
51
|
value: $state.snapshot(value),
|
package/dist/avatar/root.svelte
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
<script lang="ts">
|
19
19
|
import {useEnvironmentContext} from '../environment-provider/index.js';
|
20
20
|
import {useLocaleContext} from '../locale-provider/index.js';
|
21
|
-
import {
|
21
|
+
import {createUniqueId} from '../utils.svelte.js';
|
22
22
|
import {mergeProps} from '@zag-js/svelte';
|
23
23
|
import {createAvatarContext, setAvatarContext} from './context.svelte.js';
|
24
24
|
|
@@ -36,7 +36,7 @@
|
|
36
36
|
let environmentContext = useEnvironmentContext();
|
37
37
|
|
38
38
|
let context = createAvatarContext({
|
39
|
-
id: id ??
|
39
|
+
id: id ?? createUniqueId(),
|
40
40
|
ids,
|
41
41
|
dir: dir ?? localeContext?.dir,
|
42
42
|
onStatusChange,
|
@@ -18,7 +18,7 @@
|
|
18
18
|
<script lang="ts">
|
19
19
|
import {useEnvironmentContext} from '../environment-provider/index.js';
|
20
20
|
import {useLocaleContext} from '../locale-provider/index.js';
|
21
|
-
import {
|
21
|
+
import {createUniqueId} from '../utils.svelte.js';
|
22
22
|
import {mergeProps} from '@zag-js/svelte';
|
23
23
|
import {createCarouselContext, setCarouselContext} from './context.svelte.js';
|
24
24
|
|
@@ -42,7 +42,7 @@
|
|
42
42
|
let environmentContext = useEnvironmentContext();
|
43
43
|
|
44
44
|
let context = createCarouselContext({
|
45
|
-
id: id ??
|
45
|
+
id: id ?? createUniqueId(),
|
46
46
|
ids,
|
47
47
|
dir: dir ?? localeContext?.dir,
|
48
48
|
loop,
|
@@ -18,7 +18,7 @@
|
|
18
18
|
<script lang="ts">
|
19
19
|
import {useEnvironmentContext} from '../environment-provider/index.js';
|
20
20
|
import {useLocaleContext} from '../locale-provider/index.js';
|
21
|
-
import {
|
21
|
+
import {createUniqueId} from '../utils.svelte.js';
|
22
22
|
import {mergeProps} from '@zag-js/svelte';
|
23
23
|
import {createCheckboxContext, setCheckboxContext} from './context.svelte.js';
|
24
24
|
|
@@ -44,7 +44,7 @@
|
|
44
44
|
let environmentContext = useEnvironmentContext();
|
45
45
|
|
46
46
|
let context = createCheckboxContext({
|
47
|
-
id: id ??
|
47
|
+
id: id ?? createUniqueId(),
|
48
48
|
ids,
|
49
49
|
dir: dir ?? localeContext?.dir,
|
50
50
|
form,
|
@@ -17,7 +17,7 @@
|
|
17
17
|
|
18
18
|
<script lang="ts">
|
19
19
|
import {useEnvironmentContext} from '../environment-provider/index.js';
|
20
|
-
import {
|
20
|
+
import {createUniqueId} from '../utils.svelte.js';
|
21
21
|
import {mergeProps} from '@zag-js/svelte';
|
22
22
|
import {
|
23
23
|
createClipboardContext,
|
@@ -38,7 +38,7 @@
|
|
38
38
|
let environmentContext = useEnvironmentContext();
|
39
39
|
|
40
40
|
let context = createClipboardContext({
|
41
|
-
id: id ??
|
41
|
+
id: id ?? createUniqueId(),
|
42
42
|
ids,
|
43
43
|
value: $state.snapshot(value),
|
44
44
|
timeout,
|
@@ -18,7 +18,7 @@
|
|
18
18
|
<script lang="ts">
|
19
19
|
import {useEnvironmentContext} from '../environment-provider/index.js';
|
20
20
|
import {useLocaleContext} from '../locale-provider/index.js';
|
21
|
-
import {
|
21
|
+
import {createUniqueId} from '../utils.svelte.js';
|
22
22
|
import {mergeProps} from '@zag-js/svelte';
|
23
23
|
import {
|
24
24
|
createCollapsibleContext,
|
@@ -43,7 +43,7 @@
|
|
43
43
|
let environmentContext = useEnvironmentContext();
|
44
44
|
|
45
45
|
let context = createCollapsibleContext({
|
46
|
-
id: id ??
|
46
|
+
id: id ?? createUniqueId(),
|
47
47
|
ids,
|
48
48
|
dir: dir ?? localeContext?.dir,
|
49
49
|
open,
|
@@ -7,7 +7,7 @@
|
|
7
7
|
</script>
|
8
8
|
|
9
9
|
<script lang="ts">
|
10
|
-
import {
|
10
|
+
import {createUniqueId} from '../utils.svelte.js';
|
11
11
|
import {mergeProps} from '@zag-js/svelte';
|
12
12
|
import {
|
13
13
|
setComboboxItemGroupPropsContext,
|
@@ -18,7 +18,7 @@
|
|
18
18
|
|
19
19
|
let context = useComboboxContext();
|
20
20
|
|
21
|
-
let uid =
|
21
|
+
let uid = createUniqueId();
|
22
22
|
|
23
23
|
let attrs = $derived(
|
24
24
|
mergeProps(props, context.getItemGroupProps({id: id ?? uid})),
|
@@ -18,7 +18,7 @@
|
|
18
18
|
<script lang="ts" generics="T">
|
19
19
|
import {useEnvironmentContext} from '../environment-provider/index.js';
|
20
20
|
import {useLocaleContext} from '../locale-provider/index.js';
|
21
|
-
import {
|
21
|
+
import {createUniqueId} from '../utils.svelte.js';
|
22
22
|
import {mergeProps} from '@zag-js/svelte';
|
23
23
|
import {createComboboxContext, setComboboxContext} from './context.svelte.js';
|
24
24
|
|
@@ -74,7 +74,7 @@
|
|
74
74
|
let environmentContext = useEnvironmentContext();
|
75
75
|
|
76
76
|
let context = createComboboxContext({
|
77
|
-
id: id ??
|
77
|
+
id: id ?? createUniqueId(),
|
78
78
|
ids,
|
79
79
|
dir: dir ?? localeContext?.dir,
|
80
80
|
name,
|
package/dist/dialog/root.svelte
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
<script lang="ts">
|
15
15
|
import {useEnvironmentContext} from '../environment-provider/index.js';
|
16
16
|
import {useLocaleContext} from '../locale-provider/index.js';
|
17
|
-
import {
|
17
|
+
import {createUniqueId} from '../utils.svelte.js';
|
18
18
|
import {createDialogContext, setDialogContext} from './context.svelte.js';
|
19
19
|
|
20
20
|
let {id, dir, getRootNode, children, ...props}: DialogProps = $props();
|
@@ -23,7 +23,7 @@
|
|
23
23
|
let environmentContext = useEnvironmentContext();
|
24
24
|
|
25
25
|
let context = createDialogContext({
|
26
|
-
id: id ??
|
26
|
+
id: id ?? createUniqueId(),
|
27
27
|
dir: dir ?? localeContext?.dir,
|
28
28
|
getRootNode: getRootNode ?? environmentContext?.getRootNode,
|
29
29
|
...props,
|
@@ -15,7 +15,7 @@
|
|
15
15
|
<script lang="ts">
|
16
16
|
import {useEnvironmentContext} from '../environment-provider/index.js';
|
17
17
|
import {useLocaleContext} from '../locale-provider/index.js';
|
18
|
-
import {
|
18
|
+
import {createUniqueId} from '../utils.svelte.js';
|
19
19
|
import {createEditableContext, setEditableContext} from './context.svelte.js';
|
20
20
|
|
21
21
|
let {id, dir, getRootNode, children, ...props}: EditableProps = $props();
|
@@ -24,7 +24,7 @@
|
|
24
24
|
let environmentContext = useEnvironmentContext();
|
25
25
|
|
26
26
|
let context = createEditableContext({
|
27
|
-
id: id ??
|
27
|
+
id: id ?? createUniqueId(),
|
28
28
|
dir: dir ?? localeContext?.dir,
|
29
29
|
getRootNode: getRootNode ?? environmentContext?.getRootNode,
|
30
30
|
...props,
|
@@ -15,7 +15,7 @@
|
|
15
15
|
<script lang="ts">
|
16
16
|
import {useEnvironmentContext} from '../environment-provider/index.js';
|
17
17
|
import {useLocaleContext} from '../locale-provider/index.js';
|
18
|
-
import {
|
18
|
+
import {createUniqueId} from '../utils.svelte.js';
|
19
19
|
import {
|
20
20
|
createHoverCardContext,
|
21
21
|
setHoverCardContext,
|
@@ -27,7 +27,7 @@
|
|
27
27
|
let environmentContext = useEnvironmentContext();
|
28
28
|
|
29
29
|
let context = createHoverCardContext({
|
30
|
-
id: id ??
|
30
|
+
id: id ?? createUniqueId(),
|
31
31
|
dir: dir ?? localeContext?.dir,
|
32
32
|
getRootNode: getRootNode ?? environmentContext?.getRootNode,
|
33
33
|
...props,
|
@@ -18,7 +18,7 @@
|
|
18
18
|
<script lang="ts">
|
19
19
|
import {useEnvironmentContext} from '../environment-provider/index.js';
|
20
20
|
import {useLocaleContext} from '../locale-provider/index.js';
|
21
|
-
import {
|
21
|
+
import {createUniqueId} from '../utils.svelte.js';
|
22
22
|
import {mergeProps} from '@zag-js/svelte';
|
23
23
|
import {
|
24
24
|
createNumberInputContext,
|
@@ -61,7 +61,7 @@
|
|
61
61
|
let environmentContext = useEnvironmentContext();
|
62
62
|
|
63
63
|
let context = createNumberInputContext({
|
64
|
-
id: id ??
|
64
|
+
id: id ?? createUniqueId(),
|
65
65
|
ids,
|
66
66
|
dir: dir ?? localeContext?.dir,
|
67
67
|
max,
|
@@ -18,7 +18,7 @@
|
|
18
18
|
<script lang="ts">
|
19
19
|
import {useEnvironmentContext} from '../environment-provider/index.js';
|
20
20
|
import {useLocaleContext} from '../locale-provider/index.js';
|
21
|
-
import {
|
21
|
+
import {createUniqueId} from '../utils.svelte.js';
|
22
22
|
import {mergeProps} from '@zag-js/svelte';
|
23
23
|
import {
|
24
24
|
createPaginationContext,
|
@@ -46,7 +46,7 @@
|
|
46
46
|
let environmentContext = useEnvironmentContext();
|
47
47
|
|
48
48
|
let context = createPaginationContext({
|
49
|
-
id: id ??
|
49
|
+
id: id ?? createUniqueId(),
|
50
50
|
ids,
|
51
51
|
dir: dir ?? localeContext?.dir,
|
52
52
|
type,
|
@@ -18,7 +18,7 @@
|
|
18
18
|
<script lang="ts">
|
19
19
|
import {useEnvironmentContext} from '../environment-provider/index.js';
|
20
20
|
import {useLocaleContext} from '../locale-provider/index.js';
|
21
|
-
import {
|
21
|
+
import {createUniqueId} from '../utils.svelte.js';
|
22
22
|
import {mergeProps} from '@zag-js/svelte';
|
23
23
|
import {createPinInputContext, setPinInputContext} from './context.svelte.js';
|
24
24
|
|
@@ -54,7 +54,7 @@
|
|
54
54
|
let environmentContext = useEnvironmentContext();
|
55
55
|
|
56
56
|
let context = createPinInputContext({
|
57
|
-
id: id ??
|
57
|
+
id: id ?? createUniqueId(),
|
58
58
|
ids,
|
59
59
|
dir: dir ?? localeContext?.dir,
|
60
60
|
otp,
|
package/dist/popover/root.svelte
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
<script lang="ts">
|
15
15
|
import {useEnvironmentContext} from '../environment-provider/index.js';
|
16
16
|
import {useLocaleContext} from '../locale-provider/index.js';
|
17
|
-
import {
|
17
|
+
import {createUniqueId} from '../utils.svelte.js';
|
18
18
|
import {createPopoverContext, setPopoverContext} from './context.svelte.js';
|
19
19
|
|
20
20
|
let {id, dir, getRootNode, children, ...props}: PopoverProps = $props();
|
@@ -23,7 +23,7 @@
|
|
23
23
|
let environmentContext = useEnvironmentContext();
|
24
24
|
|
25
25
|
let context = createPopoverContext({
|
26
|
-
id: id ??
|
26
|
+
id: id ?? createUniqueId(),
|
27
27
|
dir: dir ?? localeContext?.dir,
|
28
28
|
getRootNode: getRootNode ?? environmentContext?.getRootNode,
|
29
29
|
...props,
|
@@ -28,16 +28,10 @@
|
|
28
28
|
);
|
29
29
|
|
30
30
|
let api = $derived(presence.connect(machineState, send, normalizeProps));
|
31
|
-
|
32
|
-
let node: HTMLElement | null = $state(null);
|
33
|
-
|
34
|
-
$effect(() => {
|
35
|
-
api.setNode(node);
|
36
|
-
});
|
37
31
|
</script>
|
38
32
|
|
39
33
|
<div
|
40
|
-
|
34
|
+
use:api.setNode
|
41
35
|
hidden={!api.present}
|
42
36
|
data-state={api.skip ? undefined : present ? 'open' : 'closed'}
|
43
37
|
{...props}
|
@@ -18,7 +18,7 @@
|
|
18
18
|
<script lang="ts">
|
19
19
|
import {useEnvironmentContext} from '../environment-provider/index.js';
|
20
20
|
import {useLocaleContext} from '../locale-provider/index.js';
|
21
|
-
import {
|
21
|
+
import {createUniqueId} from '../utils.svelte.js';
|
22
22
|
import {mergeProps} from '@zag-js/svelte';
|
23
23
|
import {createProgressContext, setProgressContext} from './context.svelte.js';
|
24
24
|
|
@@ -40,7 +40,7 @@
|
|
40
40
|
let environmentContext = useEnvironmentContext();
|
41
41
|
|
42
42
|
let context = createProgressContext({
|
43
|
-
id: id ??
|
43
|
+
id: id ?? createUniqueId(),
|
44
44
|
ids,
|
45
45
|
dir: dir ?? localeContext?.dir,
|
46
46
|
max,
|
package/dist/qr-code/root.svelte
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
<script lang="ts">
|
19
19
|
import {useEnvironmentContext} from '../environment-provider/index.js';
|
20
20
|
import {useLocaleContext} from '../locale-provider/index.js';
|
21
|
-
import {
|
21
|
+
import {createUniqueId} from '../utils.svelte.js';
|
22
22
|
import {mergeProps} from '@zag-js/svelte';
|
23
23
|
import {createQRCodeContext, setQRCodeContext} from './context.svelte.js';
|
24
24
|
|
@@ -37,7 +37,7 @@
|
|
37
37
|
let environmentContext = useEnvironmentContext();
|
38
38
|
|
39
39
|
let context = createQRCodeContext({
|
40
|
-
id: id ??
|
40
|
+
id: id ?? createUniqueId(),
|
41
41
|
ids,
|
42
42
|
dir: dir ?? localeContext?.dir,
|
43
43
|
value: $state.snapshot(value),
|
@@ -18,7 +18,7 @@
|
|
18
18
|
<script lang="ts">
|
19
19
|
import {useEnvironmentContext} from '../environment-provider/index.js';
|
20
20
|
import {useLocaleContext} from '../locale-provider/index.js';
|
21
|
-
import {
|
21
|
+
import {createUniqueId} from '../utils.svelte.js';
|
22
22
|
import {mergeProps} from '@zag-js/svelte';
|
23
23
|
import {
|
24
24
|
createRadioGroupContext,
|
@@ -45,7 +45,7 @@
|
|
45
45
|
let environmentContext = useEnvironmentContext();
|
46
46
|
|
47
47
|
let context = createRadioGroupContext({
|
48
|
-
id: id ??
|
48
|
+
id: id ?? createUniqueId(),
|
49
49
|
ids,
|
50
50
|
dir: dir ?? localeContext?.dir,
|
51
51
|
form,
|
@@ -18,7 +18,7 @@
|
|
18
18
|
<script lang="ts">
|
19
19
|
import {useEnvironmentContext} from '../environment-provider/index.js';
|
20
20
|
import {useLocaleContext} from '../locale-provider/index.js';
|
21
|
-
import {
|
21
|
+
import {createUniqueId} from '../utils.svelte.js';
|
22
22
|
import {mergeProps} from '@zag-js/svelte';
|
23
23
|
import {
|
24
24
|
createRatingGroupContext,
|
@@ -50,7 +50,7 @@
|
|
50
50
|
let environmentContext = useEnvironmentContext();
|
51
51
|
|
52
52
|
let context = createRatingGroupContext({
|
53
|
-
id: id ??
|
53
|
+
id: id ?? createUniqueId(),
|
54
54
|
ids,
|
55
55
|
dir: dir ?? localeContext?.dir,
|
56
56
|
form,
|
@@ -18,7 +18,7 @@
|
|
18
18
|
<script lang="ts">
|
19
19
|
import {useEnvironmentContext} from '../environment-provider/index.js';
|
20
20
|
import {useLocaleContext} from '../locale-provider/index.js';
|
21
|
-
import {
|
21
|
+
import {createUniqueId} from '../utils.svelte.js';
|
22
22
|
import {mergeProps} from '@zag-js/svelte';
|
23
23
|
import {
|
24
24
|
createSegmentGroupContext,
|
@@ -45,7 +45,7 @@
|
|
45
45
|
let environmentContext = useEnvironmentContext();
|
46
46
|
|
47
47
|
let context = createSegmentGroupContext({
|
48
|
-
id: id ??
|
48
|
+
id: id ?? createUniqueId(),
|
49
49
|
ids,
|
50
50
|
dir: dir ?? localeContext?.dir,
|
51
51
|
form,
|
@@ -7,7 +7,7 @@
|
|
7
7
|
</script>
|
8
8
|
|
9
9
|
<script lang="ts">
|
10
|
-
import {
|
10
|
+
import {createUniqueId} from '../utils.svelte.js';
|
11
11
|
import {mergeProps} from '@zag-js/svelte';
|
12
12
|
import {
|
13
13
|
setSelectItemGroupPropsContext,
|
@@ -18,7 +18,7 @@
|
|
18
18
|
|
19
19
|
let context = useSelectContext();
|
20
20
|
|
21
|
-
let uid =
|
21
|
+
let uid = createUniqueId();
|
22
22
|
|
23
23
|
let attrs = $derived(
|
24
24
|
mergeProps(props, context.getItemGroupProps({id: id ?? uid})),
|
package/dist/select/root.svelte
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
<script lang="ts" generics="T">
|
19
19
|
import {useEnvironmentContext} from '../environment-provider/index.js';
|
20
20
|
import {useLocaleContext} from '../locale-provider/index.js';
|
21
|
-
import {
|
21
|
+
import {createUniqueId} from '../utils.svelte.js';
|
22
22
|
import {mergeProps} from '@zag-js/svelte';
|
23
23
|
import {createSelectContext, setSelectContext} from './context.svelte.js';
|
24
24
|
|
@@ -61,7 +61,7 @@
|
|
61
61
|
let environmentContext = useEnvironmentContext();
|
62
62
|
|
63
63
|
let context = createSelectContext({
|
64
|
-
id: id ??
|
64
|
+
id: id ?? createUniqueId(),
|
65
65
|
ids,
|
66
66
|
dir: dir ?? localeContext?.dir,
|
67
67
|
form,
|
package/dist/slider/root.svelte
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
<script lang="ts">
|
19
19
|
import {useEnvironmentContext} from '../environment-provider/index.js';
|
20
20
|
import {useLocaleContext} from '../locale-provider/index.js';
|
21
|
-
import {
|
21
|
+
import {createUniqueId} from '../utils.svelte.js';
|
22
22
|
import {mergeProps} from '@zag-js/svelte';
|
23
23
|
import {createSliderContext, setSliderContext} from './context.svelte.js';
|
24
24
|
|
@@ -55,7 +55,7 @@
|
|
55
55
|
let environmentContext = useEnvironmentContext();
|
56
56
|
|
57
57
|
let context = createSliderContext({
|
58
|
-
id: id ??
|
58
|
+
id: id ?? createUniqueId(),
|
59
59
|
ids,
|
60
60
|
dir: dir ?? localeContext?.dir,
|
61
61
|
max,
|
package/dist/steps/root.svelte
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
<script lang="ts">
|
19
19
|
import {useEnvironmentContext} from '../environment-provider/index.js';
|
20
20
|
import {useLocaleContext} from '../locale-provider/index.js';
|
21
|
-
import {
|
21
|
+
import {createUniqueId} from '../utils.svelte.js';
|
22
22
|
import {mergeProps} from '@zag-js/svelte';
|
23
23
|
import {createStepsContext, setStepsContext} from './context.svelte.js';
|
24
24
|
|
@@ -40,7 +40,7 @@
|
|
40
40
|
let localeContext = useLocaleContext();
|
41
41
|
|
42
42
|
let context = createStepsContext({
|
43
|
-
id: id ??
|
43
|
+
id: id ?? createUniqueId(),
|
44
44
|
ids,
|
45
45
|
dir: dir ?? localeContext?.dir,
|
46
46
|
step,
|
package/dist/switch/root.svelte
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
<script lang="ts">
|
19
19
|
import {useEnvironmentContext} from '../environment-provider/index.js';
|
20
20
|
import {useLocaleContext} from '../locale-provider/index.js';
|
21
|
-
import {
|
21
|
+
import {createUniqueId} from '../utils.svelte.js';
|
22
22
|
import {mergeProps} from '@zag-js/svelte';
|
23
23
|
import {createSwitchContext, setSwitchContext} from './context.svelte.js';
|
24
24
|
|
@@ -45,7 +45,7 @@
|
|
45
45
|
let environmentContext = useEnvironmentContext();
|
46
46
|
|
47
47
|
let context = createSwitchContext({
|
48
|
-
id: id ??
|
48
|
+
id: id ?? createUniqueId(),
|
49
49
|
ids,
|
50
50
|
dir: dir ?? localeContext?.dir,
|
51
51
|
form,
|
package/dist/tabs/root.svelte
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
<script lang="ts">
|
19
19
|
import {useEnvironmentContext} from '../environment-provider/index.js';
|
20
20
|
import {useLocaleContext} from '../locale-provider/index.js';
|
21
|
-
import {
|
21
|
+
import {createUniqueId} from '../utils.svelte.js';
|
22
22
|
import {mergeProps} from '@zag-js/svelte';
|
23
23
|
import {createTabsContext, setTabsContext} from './context.svelte.js';
|
24
24
|
|
@@ -43,7 +43,7 @@
|
|
43
43
|
let environmentContext = useEnvironmentContext();
|
44
44
|
|
45
45
|
let context = createTabsContext({
|
46
|
-
id: id ??
|
46
|
+
id: id ?? createUniqueId(),
|
47
47
|
ids,
|
48
48
|
dir: dir ?? localeContext?.dir,
|
49
49
|
value: $state.snapshot(value),
|
@@ -18,7 +18,7 @@
|
|
18
18
|
<script lang="ts">
|
19
19
|
import {useEnvironmentContext} from '../environment-provider/index.js';
|
20
20
|
import {useLocaleContext} from '../locale-provider/index.js';
|
21
|
-
import {
|
21
|
+
import {createUniqueId} from '../utils.svelte.js';
|
22
22
|
import {mergeProps} from '@zag-js/svelte';
|
23
23
|
import {
|
24
24
|
createTagsInputContext,
|
@@ -63,7 +63,7 @@
|
|
63
63
|
let environmentContext = useEnvironmentContext();
|
64
64
|
|
65
65
|
let context = createTagsInputContext({
|
66
|
-
id: id ??
|
66
|
+
id: id ?? createUniqueId(),
|
67
67
|
ids,
|
68
68
|
dir: dir ?? localeContext?.dir,
|
69
69
|
max,
|
package/dist/timer/root.svelte
CHANGED
@@ -17,7 +17,7 @@
|
|
17
17
|
|
18
18
|
<script lang="ts">
|
19
19
|
import {useEnvironmentContext} from '../environment-provider/index.js';
|
20
|
-
import {
|
20
|
+
import {createUniqueId} from '../utils.svelte.js';
|
21
21
|
import {mergeProps} from '@zag-js/svelte';
|
22
22
|
import {createTimerContext, setTimerContext} from './context.svelte.js';
|
23
23
|
|
@@ -38,7 +38,7 @@
|
|
38
38
|
let environmentContext = useEnvironmentContext();
|
39
39
|
|
40
40
|
let context = createTimerContext({
|
41
|
-
id: id ??
|
41
|
+
id: id ?? createUniqueId(),
|
42
42
|
startMs,
|
43
43
|
targetMs,
|
44
44
|
interval,
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import { useEnvironmentContext } from '../environment-provider/index.js';
|
2
2
|
import { useLocaleContext } from '../locale-provider/index.js';
|
3
|
-
import {
|
3
|
+
import { createUniqueId } from '../utils.svelte.js';
|
4
4
|
import { normalizeProps, reflect } from '@zag-js/svelte';
|
5
5
|
import * as toast from '@zag-js/toast';
|
6
6
|
export default function createToaster(props) {
|
7
7
|
const localContext = useLocaleContext();
|
8
8
|
const environmentContext = useEnvironmentContext();
|
9
|
-
const id = $derived(props?.id ??
|
9
|
+
const id = $derived(props?.id ?? createUniqueId());
|
10
10
|
const dir = $derived(props?.dir ?? localContext?.dir);
|
11
11
|
const getRootNode = $derived(props?.getRootNode ?? environmentContext?.getRootNode);
|
12
12
|
const machine = $derived(toast.group.machine({
|
@@ -18,7 +18,7 @@
|
|
18
18
|
<script lang="ts">
|
19
19
|
import {useEnvironmentContext} from '../environment-provider/index.js';
|
20
20
|
import {useLocaleContext} from '../locale-provider/index.js';
|
21
|
-
import {
|
21
|
+
import {createUniqueId} from '../utils.svelte.js';
|
22
22
|
import {mergeProps} from '@zag-js/svelte';
|
23
23
|
import {
|
24
24
|
createToggleGroupContext,
|
@@ -45,7 +45,7 @@
|
|
45
45
|
let environmentContext = useEnvironmentContext();
|
46
46
|
|
47
47
|
let context = createToggleGroupContext({
|
48
|
-
id: id ??
|
48
|
+
id: id ?? createUniqueId(),
|
49
49
|
ids,
|
50
50
|
dir: dir ?? localeContext?.dir,
|
51
51
|
value: $state.snapshot(value),
|
package/dist/tooltip/root.svelte
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
<script lang="ts">
|
15
15
|
import {useEnvironmentContext} from '../environment-provider/index.js';
|
16
16
|
import {useLocaleContext} from '../locale-provider/index.js';
|
17
|
-
import {
|
17
|
+
import {createUniqueId} from '../utils.svelte.js';
|
18
18
|
import {createTooltipContext, setTooltipContext} from './context.svelte.js';
|
19
19
|
|
20
20
|
let {id, dir, getRootNode, children, ...props}: TooltipProps = $props();
|
@@ -23,7 +23,7 @@
|
|
23
23
|
let environmentContext = useEnvironmentContext();
|
24
24
|
|
25
25
|
let context = createTooltipContext({
|
26
|
-
id: id ??
|
26
|
+
id: id ?? createUniqueId(),
|
27
27
|
dir: dir ?? localeContext?.dir,
|
28
28
|
getRootNode: getRootNode ?? environmentContext?.getRootNode,
|
29
29
|
...props,
|
package/dist/utils.svelte.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export declare const
|
1
|
+
export declare const createUniqueId: () => string;
|
package/dist/utils.svelte.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import {
|
2
|
-
export const
|
1
|
+
import { uid } from 'uid';
|
2
|
+
export const createUniqueId = () => uid();
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "ui-ingredients",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.0.
|
4
|
+
"version": "0.0.14",
|
5
5
|
"packageManager": "pnpm@9.7.0",
|
6
6
|
"svelte": "./dist/index.js",
|
7
7
|
"types": "./dist/index.d.ts",
|
@@ -123,7 +123,7 @@
|
|
123
123
|
"@zag-js/toggle-group": "0.65.1",
|
124
124
|
"@zag-js/tooltip": "0.65.1",
|
125
125
|
"@zag-js/tree-view": "0.65.1",
|
126
|
-
"
|
126
|
+
"uid": "2.0.2"
|
127
127
|
},
|
128
128
|
"peerDependencies": {
|
129
129
|
"svelte": "^5.0.0-next.1"
|