ui-ingredients 0.0.43 → 0.0.45
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +3 -0
- package/dist/accordion/create-accordion.svelte.js +3 -4
- package/dist/accordion/item-content.svelte +7 -11
- package/dist/accordion/item.svelte +2 -2
- package/dist/accordion/root.svelte +4 -6
- package/dist/avatar/create-avatar.svelte.js +3 -4
- package/dist/avatar/root.svelte +2 -2
- package/dist/carousel/create-carousel.svelte.js +3 -4
- package/dist/carousel/indicator.svelte +2 -2
- package/dist/carousel/item.svelte +2 -2
- package/dist/carousel/root.svelte +2 -2
- package/dist/checkbox/create-checkbox.svelte.js +4 -5
- package/dist/checkbox/root.svelte +2 -2
- package/dist/clipboard/create-clipboard.svelte.js +3 -4
- package/dist/clipboard/root.svelte +2 -2
- package/dist/collapsible/create-collapsible.svelte.js +3 -4
- package/dist/collapsible/root.svelte +2 -2
- package/dist/color-picker/create-color-picker.svelte.js +3 -4
- package/dist/color-picker/root.svelte +2 -2
- package/dist/combobox/create-combobox.svelte.js +4 -5
- package/dist/combobox/item.svelte +2 -2
- package/dist/combobox/root.svelte +10 -16
- package/dist/create-context.svelte.js +1 -9
- package/dist/date-picker/create-date-picker.svelte.js +2 -3
- package/dist/date-picker/day-table-cell.svelte +2 -2
- package/dist/date-picker/month-table-cell.svelte +2 -2
- package/dist/date-picker/root.svelte +10 -18
- package/dist/date-picker/year-table-cell.svelte +2 -2
- package/dist/dialog/backdrop.svelte +7 -12
- package/dist/dialog/create-dialog.svelte.js +3 -4
- package/dist/dialog/root.svelte +6 -12
- package/dist/editable/create-editable.svelte.js +4 -5
- package/dist/editable/root.svelte +2 -2
- package/dist/environment-provider/root.svelte +5 -8
- package/dist/field/create-field.svelte.d.ts +1 -22
- package/dist/field/create-field.svelte.js +9 -20
- package/dist/field/root.svelte +2 -2
- package/dist/file-upload/create-file-upload.svelte.js +4 -5
- package/dist/file-upload/item.svelte +2 -2
- package/dist/file-upload/root.svelte +2 -2
- package/dist/floating-panel/body.svelte +24 -0
- package/dist/floating-panel/body.svelte.d.ts +18 -0
- package/dist/floating-panel/close-trigger.svelte +27 -0
- package/dist/floating-panel/close-trigger.svelte.d.ts +18 -0
- package/dist/floating-panel/content.svelte +36 -0
- package/dist/floating-panel/content.svelte.d.ts +18 -0
- package/dist/floating-panel/context.svelte.d.ts +2 -0
- package/dist/floating-panel/context.svelte.js +2 -0
- package/dist/floating-panel/create-floating-panel.svelte.d.ts +2 -1
- package/dist/floating-panel/create-floating-panel.svelte.js +4 -4
- package/dist/floating-panel/drag-trigger.svelte +27 -0
- package/dist/floating-panel/drag-trigger.svelte.d.ts +18 -0
- package/dist/floating-panel/floating-panel.d.ts +13 -0
- package/dist/floating-panel/floating-panel.js +13 -0
- package/dist/floating-panel/header.svelte +25 -0
- package/dist/floating-panel/header.svelte.d.ts +18 -0
- package/dist/floating-panel/index.d.ts +16 -0
- package/dist/floating-panel/index.js +3 -0
- package/dist/floating-panel/maximize-trigger.svelte +28 -0
- package/dist/floating-panel/maximize-trigger.svelte.d.ts +18 -0
- package/dist/floating-panel/minimize-trigger.svelte +28 -0
- package/dist/floating-panel/minimize-trigger.svelte.d.ts +18 -0
- package/dist/floating-panel/positioner.svelte +35 -0
- package/dist/floating-panel/positioner.svelte.d.ts +18 -0
- package/dist/floating-panel/resize-trigger.svelte +36 -0
- package/dist/floating-panel/resize-trigger.svelte.d.ts +18 -0
- package/dist/floating-panel/restore-trigger.svelte +28 -0
- package/dist/floating-panel/restore-trigger.svelte.d.ts +18 -0
- package/dist/floating-panel/root.svelte +45 -0
- package/dist/floating-panel/root.svelte.d.ts +18 -0
- package/dist/floating-panel/title.svelte +25 -0
- package/dist/floating-panel/title.svelte.d.ts +18 -0
- package/dist/floating-panel/trigger.svelte +27 -0
- package/dist/floating-panel/trigger.svelte.d.ts +18 -0
- package/dist/highlight/highlight.svelte +42 -0
- package/dist/highlight/highlight.svelte.d.ts +18 -0
- package/dist/highlight/index.d.ts +1 -0
- package/dist/highlight/index.js +1 -0
- package/dist/hover-card/create-hover-card.svelte.js +3 -4
- package/dist/hover-card/root.svelte +6 -11
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/is-object.d.ts +2 -0
- package/dist/is-object.js +4 -0
- package/dist/locale-provider/root.svelte +8 -6
- package/dist/menu/create-menu.svelte.js +3 -4
- package/dist/menu/item.svelte +2 -2
- package/dist/menu/option-item.svelte +2 -2
- package/dist/menu/root.svelte +6 -12
- package/dist/merge-props.js +1 -4
- package/dist/number-input/create-number-input.svelte.js +4 -5
- package/dist/number-input/root.svelte +2 -2
- package/dist/pagination/create-pagination.svelte.js +3 -4
- package/dist/pagination/root.svelte +2 -2
- package/dist/pin-input/create-pin-input.svelte.js +4 -5
- package/dist/pin-input/root.svelte +2 -2
- package/dist/popover/create-popover.svelte.js +3 -4
- package/dist/popover/root.svelte +6 -11
- package/dist/presence/root.svelte +7 -3
- package/dist/progress/create-progress.svelte.js +3 -4
- package/dist/progress/root.svelte +2 -2
- package/dist/qr-code/create-qr-code.svelte.js +3 -4
- package/dist/qr-code/root.svelte +2 -2
- package/dist/radio-group/create-radio-group.svelte.js +3 -4
- package/dist/radio-group/item.svelte +2 -2
- package/dist/radio-group/root.svelte +2 -2
- package/dist/rating-group/create-rating-group.svelte.js +4 -5
- package/dist/rating-group/root.svelte +2 -2
- package/dist/segment-group/create-segment-group.svelte.js +3 -4
- package/dist/segment-group/item.svelte +2 -2
- package/dist/segment-group/root.svelte +2 -2
- package/dist/select/create-select.svelte.js +2 -3
- package/dist/select/item.svelte +2 -2
- package/dist/select/root.svelte +11 -19
- package/dist/signature-pad/create-signature-pad.svelte.js +3 -4
- package/dist/signature-pad/root.svelte +2 -2
- package/dist/slider/create-slider.svelte.js +3 -4
- package/dist/slider/root.svelte +2 -2
- package/dist/slider/thumb.svelte +2 -2
- package/dist/splitter/create-splitter.svelte.js +3 -4
- package/dist/splitter/panel.svelte +2 -2
- package/dist/splitter/resize-trigger.svelte +2 -2
- package/dist/splitter/root.svelte +2 -2
- package/dist/steps/create-steps.svelte.js +3 -4
- package/dist/steps/item.svelte +2 -2
- package/dist/steps/root.svelte +2 -2
- package/dist/switch/create-switch.svelte.js +4 -5
- package/dist/switch/root.svelte +2 -2
- package/dist/tabs/content.svelte +2 -2
- package/dist/tabs/create-tabs.svelte.js +3 -4
- package/dist/tabs/root.svelte +2 -2
- package/dist/tabs/trigger.svelte +2 -2
- package/dist/tags-input/create-tags-input.svelte.js +4 -5
- package/dist/tags-input/item.svelte +2 -2
- package/dist/tags-input/root.svelte +2 -2
- package/dist/time-picker/create-time-picker.svelte.js +3 -4
- package/dist/time-picker/root.svelte +11 -21
- package/dist/timer/create-timer.svelte.js +3 -4
- package/dist/timer/item.svelte +2 -2
- package/dist/timer/root.svelte +2 -2
- package/dist/toast/create-toast.svelte.js +1 -2
- package/dist/toast/create-toaster.svelte.js +2 -3
- package/dist/toggle-group/create-toggle-group.svelte.js +3 -4
- package/dist/toggle-group/item.svelte +2 -2
- package/dist/toggle-group/root.svelte +2 -2
- package/dist/tooltip/create-tooltip.svelte.js +3 -4
- package/dist/tooltip/root.svelte +6 -12
- package/dist/tour/arrow-tip.svelte +24 -0
- package/dist/tour/arrow-tip.svelte.d.ts +18 -0
- package/dist/tour/arrow.svelte +24 -0
- package/dist/tour/arrow.svelte.d.ts +18 -0
- package/dist/tour/close-trigger.svelte +25 -0
- package/dist/tour/close-trigger.svelte.d.ts +18 -0
- package/dist/tour/content.svelte +30 -0
- package/dist/tour/content.svelte.d.ts +18 -0
- package/dist/tour/context.svelte.d.ts +2 -0
- package/dist/tour/context.svelte.js +3 -0
- package/dist/tour/create-tour.svelte.js +4 -4
- package/dist/tour/description.svelte +24 -0
- package/dist/tour/description.svelte.d.ts +18 -0
- package/dist/tour/index.d.ts +17 -0
- package/dist/tour/index.js +3 -0
- package/dist/tour/next-trigger.svelte +24 -0
- package/dist/tour/next-trigger.svelte.d.ts +18 -0
- package/dist/tour/overlay.svelte +38 -0
- package/dist/tour/overlay.svelte.d.ts +18 -0
- package/dist/tour/positioner.svelte +30 -0
- package/dist/tour/positioner.svelte.d.ts +18 -0
- package/dist/tour/prev-trigger.svelte +24 -0
- package/dist/tour/prev-trigger.svelte.d.ts +18 -0
- package/dist/tour/progress-text.svelte +28 -0
- package/dist/tour/progress-text.svelte.d.ts +18 -0
- package/dist/tour/root.svelte +47 -0
- package/dist/tour/root.svelte.d.ts +18 -0
- package/dist/tour/skip-trigger.svelte +24 -0
- package/dist/tour/skip-trigger.svelte.d.ts +18 -0
- package/dist/tour/spotlight.svelte +24 -0
- package/dist/tour/spotlight.svelte.d.ts +18 -0
- package/dist/tour/title.svelte +24 -0
- package/dist/tour/title.svelte.d.ts +18 -0
- package/dist/tour/tour.d.ts +14 -0
- package/dist/tour/tour.js +14 -0
- package/dist/tree-view/branch.svelte +2 -2
- package/dist/tree-view/create-tree-view.svelte.js +3 -4
- package/dist/tree-view/item.svelte +2 -2
- package/dist/tree-view/root.svelte +2 -2
- package/dist/types.d.ts +10 -16
- package/package.json +2 -1
@@ -21,7 +21,7 @@
|
|
21
21
|
|
22
22
|
let {asChild, children, ...props}: SplitterProps = $props();
|
23
23
|
|
24
|
-
let [splitterProps,
|
24
|
+
let [splitterProps, localProps] = $derived(
|
25
25
|
createSplitProps<CreateSplitterProps>([
|
26
26
|
'id',
|
27
27
|
'ids',
|
@@ -34,7 +34,7 @@
|
|
34
34
|
|
35
35
|
let splitter = createSplitter(reflect(() => splitterProps));
|
36
36
|
|
37
|
-
let mergedProps = $derived(mergeProps(
|
37
|
+
let mergedProps = $derived(mergeProps(localProps, splitter.getRootProps()));
|
38
38
|
|
39
39
|
setSplitterContext(splitter);
|
40
40
|
</script>
|
@@ -7,13 +7,12 @@ export function createSteps(props) {
|
|
7
7
|
const locale = getLocaleContext();
|
8
8
|
const environment = getEnvironmentContext();
|
9
9
|
const id = uid();
|
10
|
-
const context =
|
10
|
+
const context = reflect(() => ({
|
11
11
|
...props,
|
12
12
|
id: props.id ?? id,
|
13
13
|
dir: locale?.dir,
|
14
14
|
getRootNode: environment?.getRootNode,
|
15
|
-
}))
|
15
|
+
}));
|
16
16
|
const [state, send] = useMachine(steps.machine(context), { context });
|
17
|
-
|
18
|
-
return api;
|
17
|
+
return reflect(() => steps.connect(state, send, normalizeProps));
|
19
18
|
}
|
package/dist/steps/item.svelte
CHANGED
@@ -15,14 +15,14 @@
|
|
15
15
|
|
16
16
|
let steps = getStepsContext();
|
17
17
|
|
18
|
-
let [itemProps,
|
18
|
+
let [itemProps, localProps] = $derived(
|
19
19
|
createSplitProps<ItemProps>(['index'])(props),
|
20
20
|
);
|
21
21
|
|
22
22
|
let itemState = $derived(steps.getItemState(itemProps));
|
23
23
|
|
24
24
|
let mergedProps = $derived(
|
25
|
-
mergeProps(
|
25
|
+
mergeProps(localProps, steps.getItemProps(itemProps)),
|
26
26
|
);
|
27
27
|
|
28
28
|
setStepsItemPropsContext(() => itemProps);
|
package/dist/steps/root.svelte
CHANGED
@@ -21,7 +21,7 @@
|
|
21
21
|
|
22
22
|
let {asChild, children, ...props}: StepsProps = $props();
|
23
23
|
|
24
|
-
let [stepsProps,
|
24
|
+
let [stepsProps, localProps] = $derived(
|
25
25
|
createSplitProps<CreateStepsProps>([
|
26
26
|
'id',
|
27
27
|
'ids',
|
@@ -36,7 +36,7 @@
|
|
36
36
|
|
37
37
|
let steps = createSteps(reflect(() => stepsProps));
|
38
38
|
|
39
|
-
let mergedProps = $derived(mergeProps(
|
39
|
+
let mergedProps = $derived(mergeProps(localProps, steps.getRootProps()));
|
40
40
|
|
41
41
|
setStepsContext(steps);
|
42
42
|
</script>
|
@@ -9,7 +9,7 @@ export function createSwitch(props) {
|
|
9
9
|
const locale = getLocaleContext();
|
10
10
|
const environment = getEnvironmentContext();
|
11
11
|
const id = uid();
|
12
|
-
const context =
|
12
|
+
const context = reflect(() => ({
|
13
13
|
ids: {
|
14
14
|
label: field?.ids.label,
|
15
15
|
hiddenInput: field?.ids.control,
|
@@ -22,9 +22,9 @@ export function createSwitch(props) {
|
|
22
22
|
id: props.id ?? id,
|
23
23
|
dir: locale?.dir,
|
24
24
|
getRootNode: environment?.getRootNode,
|
25
|
-
}))
|
25
|
+
}));
|
26
26
|
const [state, send] = useMachine(switch$.machine(context), { context });
|
27
|
-
|
27
|
+
return reflect(() => {
|
28
28
|
const o = switch$.connect(state, send, normalizeProps);
|
29
29
|
return {
|
30
30
|
...o,
|
@@ -35,6 +35,5 @@ export function createSwitch(props) {
|
|
35
35
|
};
|
36
36
|
},
|
37
37
|
};
|
38
|
-
})
|
39
|
-
return api;
|
38
|
+
});
|
40
39
|
}
|
package/dist/switch/root.svelte
CHANGED
@@ -21,7 +21,7 @@
|
|
21
21
|
|
22
22
|
let {asChild, children, ...props}: SwitchProps = $props();
|
23
23
|
|
24
|
-
let [switchProps,
|
24
|
+
let [switchProps, localProps] = $derived(
|
25
25
|
createSplitProps<CreateSwitchProps>([
|
26
26
|
'id',
|
27
27
|
'ids',
|
@@ -40,7 +40,7 @@
|
|
40
40
|
|
41
41
|
let switch$ = createSwitch(reflect(() => switchProps));
|
42
42
|
|
43
|
-
let mergedProps = $derived(mergeProps(
|
43
|
+
let mergedProps = $derived(mergeProps(localProps, switch$.getRootProps()));
|
44
44
|
|
45
45
|
setSwitchContext(switch$);
|
46
46
|
</script>
|
package/dist/tabs/content.svelte
CHANGED
@@ -15,12 +15,12 @@
|
|
15
15
|
|
16
16
|
let tabs = getTabsContext();
|
17
17
|
|
18
|
-
let [contentProps,
|
18
|
+
let [contentProps, localProps] = $derived(
|
19
19
|
createSplitProps<ContentProps>(['value'])(props),
|
20
20
|
);
|
21
21
|
|
22
22
|
let mergedProps = $derived(
|
23
|
-
mergeProps(
|
23
|
+
mergeProps(localProps, tabs.getContentProps(contentProps)),
|
24
24
|
);
|
25
25
|
</script>
|
26
26
|
|
@@ -7,13 +7,12 @@ export function createTabs(props) {
|
|
7
7
|
const locale = getLocaleContext();
|
8
8
|
const environment = getEnvironmentContext();
|
9
9
|
const id = uid();
|
10
|
-
const context =
|
10
|
+
const context = reflect(() => ({
|
11
11
|
...props,
|
12
12
|
id: props.id ?? id,
|
13
13
|
dir: locale?.dir,
|
14
14
|
getRootNode: environment?.getRootNode,
|
15
|
-
}))
|
15
|
+
}));
|
16
16
|
const [state, send] = useMachine(tabs.machine(context), { context });
|
17
|
-
|
18
|
-
return api;
|
17
|
+
return reflect(() => tabs.connect(state, send, normalizeProps));
|
19
18
|
}
|
package/dist/tabs/root.svelte
CHANGED
@@ -21,7 +21,7 @@
|
|
21
21
|
|
22
22
|
let {asChild, children, ...props}: TabsProps = $props();
|
23
23
|
|
24
|
-
let [tabsProps,
|
24
|
+
let [tabsProps, localProps] = $derived(
|
25
25
|
createSplitProps<CreateTabsProps>([
|
26
26
|
'id',
|
27
27
|
'ids',
|
@@ -38,7 +38,7 @@
|
|
38
38
|
|
39
39
|
let tabs = createTabs(reflect(() => tabsProps));
|
40
40
|
|
41
|
-
let mergedProps = $derived(mergeProps(
|
41
|
+
let mergedProps = $derived(mergeProps(localProps, tabs.getRootProps()));
|
42
42
|
|
43
43
|
setTabsContext(tabs);
|
44
44
|
</script>
|
package/dist/tabs/trigger.svelte
CHANGED
@@ -15,12 +15,12 @@
|
|
15
15
|
|
16
16
|
let tabs = getTabsContext();
|
17
17
|
|
18
|
-
let [triggerProps,
|
18
|
+
let [triggerProps, localProps] = $derived(
|
19
19
|
createSplitProps<TriggerProps>(['value', 'disabled'])(props),
|
20
20
|
);
|
21
21
|
|
22
22
|
let mergedProps = $derived(
|
23
|
-
mergeProps(
|
23
|
+
mergeProps(localProps, tabs.getTriggerProps(triggerProps)),
|
24
24
|
);
|
25
25
|
</script>
|
26
26
|
|
@@ -9,7 +9,7 @@ export function createTagsInput(props) {
|
|
9
9
|
const locale = getLocaleContext();
|
10
10
|
const environment = getEnvironmentContext();
|
11
11
|
const id = uid();
|
12
|
-
const context =
|
12
|
+
const context = reflect(() => ({
|
13
13
|
ids: {
|
14
14
|
label: field?.ids.label,
|
15
15
|
hiddenInput: field?.ids.control,
|
@@ -22,9 +22,9 @@ export function createTagsInput(props) {
|
|
22
22
|
id: props.id ?? id,
|
23
23
|
dir: locale?.dir,
|
24
24
|
getRootNode: environment?.getRootNode,
|
25
|
-
}))
|
25
|
+
}));
|
26
26
|
const [state, send] = useMachine(tagsInput.machine(context), { context });
|
27
|
-
|
27
|
+
return reflect(() => {
|
28
28
|
const o = tagsInput.connect(state, send, normalizeProps);
|
29
29
|
return {
|
30
30
|
...o,
|
@@ -35,6 +35,5 @@ export function createTagsInput(props) {
|
|
35
35
|
};
|
36
36
|
},
|
37
37
|
};
|
38
|
-
})
|
39
|
-
return api;
|
38
|
+
});
|
40
39
|
}
|
@@ -18,14 +18,14 @@
|
|
18
18
|
|
19
19
|
let tagsInput = getTagsInputContext();
|
20
20
|
|
21
|
-
let [itemProps,
|
21
|
+
let [itemProps, localProps] = $derived(
|
22
22
|
createSplitProps<ItemProps>(['index', 'value', 'disabled'])(props),
|
23
23
|
);
|
24
24
|
|
25
25
|
let itemState = $derived(tagsInput.getItemState(itemProps));
|
26
26
|
|
27
27
|
let mergedProps = $derived(
|
28
|
-
mergeProps(
|
28
|
+
mergeProps(localProps, tagsInput.getItemProps(itemProps)),
|
29
29
|
);
|
30
30
|
|
31
31
|
setTagsInputItemPropsContext(() => itemProps);
|
@@ -21,7 +21,7 @@
|
|
21
21
|
|
22
22
|
let {asChild, children, ...props}: TagsInputProps = $props();
|
23
23
|
|
24
|
-
let [tagsInputProps,
|
24
|
+
let [tagsInputProps, localProps] = $derived(
|
25
25
|
createSplitProps<CreateTagsInputProps>([
|
26
26
|
'id',
|
27
27
|
'ids',
|
@@ -55,7 +55,7 @@
|
|
55
55
|
|
56
56
|
let tagsInput = createTagsInput(reflect(() => tagsInputProps));
|
57
57
|
|
58
|
-
let mergedProps = $derived(mergeProps(
|
58
|
+
let mergedProps = $derived(mergeProps(localProps, tagsInput.getRootProps()));
|
59
59
|
|
60
60
|
setTagsInputContext(tagsInput);
|
61
61
|
</script>
|
@@ -7,7 +7,7 @@ export function createTimePicker(props) {
|
|
7
7
|
const locale = getLocaleContext();
|
8
8
|
const environment = getEnvironmentContext();
|
9
9
|
const id = uid();
|
10
|
-
const context =
|
10
|
+
const context = reflect(() => ({
|
11
11
|
...props,
|
12
12
|
id: props.id ?? id,
|
13
13
|
dir: locale?.dir,
|
@@ -15,8 +15,7 @@ export function createTimePicker(props) {
|
|
15
15
|
locale: props.locale ?? locale?.locale,
|
16
16
|
getRootNode: environment?.getRootNode,
|
17
17
|
'open.controlled': props.defaultOpen != null,
|
18
|
-
}))
|
18
|
+
}));
|
19
19
|
const [state, send] = useMachine(timePicker.machine(context), { context });
|
20
|
-
|
21
|
-
return api;
|
20
|
+
return reflect(() => timePicker.connect(state, send, normalizeProps));
|
22
21
|
}
|
@@ -25,7 +25,7 @@
|
|
25
25
|
|
26
26
|
let {asChild, children, ...props}: TimePickerProps = $props();
|
27
27
|
|
28
|
-
let [timePickerProps,
|
28
|
+
let [timePickerProps, rest] = $derived(
|
29
29
|
createSplitProps<CreateTimePickerProps>([
|
30
30
|
'id',
|
31
31
|
'ids',
|
@@ -49,30 +49,20 @@
|
|
49
49
|
])(props),
|
50
50
|
);
|
51
51
|
|
52
|
-
let
|
53
|
-
|
54
|
-
let [presenceStrategyProps, elementProps] = $derived(
|
55
|
-
createSplitProps<PresenceStrategyProps>(['lazyMount', 'keepMounted'])(
|
56
|
-
otherProps,
|
57
|
-
),
|
52
|
+
let [presenceStrategyProps, localProps] = $derived(
|
53
|
+
createSplitProps<PresenceStrategyProps>(['lazyMount', 'keepMounted'])(rest),
|
58
54
|
);
|
59
55
|
|
60
|
-
let
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
},
|
67
|
-
get keepMounted() {
|
68
|
-
return presenceStrategyProps.keepMounted;
|
69
|
-
},
|
70
|
-
});
|
71
|
-
|
72
|
-
let mergedProps = $derived(
|
73
|
-
mergeProps(elementProps, timePicker.getRootProps()),
|
56
|
+
let timePicker = createTimePicker(reflect(() => timePickerProps));
|
57
|
+
let presence = createPresence(
|
58
|
+
reflect(() => ({
|
59
|
+
...presenceStrategyProps,
|
60
|
+
present: timePicker.open,
|
61
|
+
})),
|
74
62
|
);
|
75
63
|
|
64
|
+
let mergedProps = $derived(mergeProps(localProps, timePicker.getRootProps()));
|
65
|
+
|
76
66
|
setTimePickerContext(timePicker);
|
77
67
|
setPresenceContext(presence);
|
78
68
|
</script>
|
@@ -5,12 +5,11 @@ import { uid } from 'uid';
|
|
5
5
|
export function createTimer(props) {
|
6
6
|
const environment = getEnvironmentContext();
|
7
7
|
const id = uid();
|
8
|
-
const context =
|
8
|
+
const context = reflect(() => ({
|
9
9
|
...props,
|
10
10
|
id: props.id ?? id,
|
11
11
|
getRootNode: environment?.getRootNode,
|
12
|
-
}))
|
12
|
+
}));
|
13
13
|
const [state, send] = useMachine(timer.machine(context), { context });
|
14
|
-
|
15
|
-
return api;
|
14
|
+
return reflect(() => timer.connect(state, send, normalizeProps));
|
16
15
|
}
|
package/dist/timer/item.svelte
CHANGED
@@ -15,12 +15,12 @@
|
|
15
15
|
|
16
16
|
let timer = getTimerContext();
|
17
17
|
|
18
|
-
let [itemProps,
|
18
|
+
let [itemProps, localProps] = $derived(
|
19
19
|
createSplitProps<ItemProps>(['type'])(props),
|
20
20
|
);
|
21
21
|
|
22
22
|
let mergedProps = $derived(
|
23
|
-
mergeProps(
|
23
|
+
mergeProps(localProps, timer.getItemProps(itemProps)),
|
24
24
|
);
|
25
25
|
|
26
26
|
setTimerItemPropsContext(() => itemProps);
|
package/dist/timer/root.svelte
CHANGED
@@ -21,7 +21,7 @@
|
|
21
21
|
|
22
22
|
let {asChild, children, ...props}: TimerProps = $props();
|
23
23
|
|
24
|
-
let [timerProps,
|
24
|
+
let [timerProps, localProps] = $derived(
|
25
25
|
createSplitProps<CreateTimerProps>([
|
26
26
|
'id',
|
27
27
|
'startMs',
|
@@ -36,7 +36,7 @@
|
|
36
36
|
|
37
37
|
let timer = createTimer(reflect(() => timerProps));
|
38
38
|
|
39
|
-
let mergedProps = $derived(mergeProps(
|
39
|
+
let mergedProps = $derived(mergeProps(localProps, timer.getRootProps()));
|
40
40
|
|
41
41
|
setTimerContext(timer);
|
42
42
|
</script>
|
@@ -2,6 +2,5 @@ import { normalizeProps, reflect, useActor } from '@zag-js/svelte';
|
|
2
2
|
import * as toast from '@zag-js/toast';
|
3
3
|
export function createToast(props) {
|
4
4
|
const [state, send] = useActor(props);
|
5
|
-
|
6
|
-
return api;
|
5
|
+
return reflect(() => toast.connect(state, send, normalizeProps));
|
7
6
|
}
|
@@ -13,9 +13,8 @@ export function createToaster(props) {
|
|
13
13
|
dir: locale?.dir,
|
14
14
|
getRootNode: environment?.getRootNode,
|
15
15
|
}));
|
16
|
-
|
16
|
+
return reflect(() => ({
|
17
17
|
machine,
|
18
18
|
...toast.group.connect(machine, machine.send, normalizeProps),
|
19
|
-
}))
|
20
|
-
return api;
|
19
|
+
}));
|
21
20
|
}
|
@@ -7,13 +7,12 @@ export function createToggleGroup(props) {
|
|
7
7
|
const locale = getLocaleContext();
|
8
8
|
const environment = getEnvironmentContext();
|
9
9
|
const id = uid();
|
10
|
-
const context =
|
10
|
+
const context = reflect(() => ({
|
11
11
|
...props,
|
12
12
|
id: props.id ?? id,
|
13
13
|
dir: locale?.dir,
|
14
14
|
getRootNode: environment?.getRootNode,
|
15
|
-
}))
|
15
|
+
}));
|
16
16
|
const [state, send] = useMachine(toggleGroup.machine(context), { context });
|
17
|
-
|
18
|
-
return api;
|
17
|
+
return reflect(() => toggleGroup.connect(state, send, normalizeProps));
|
19
18
|
}
|
@@ -15,14 +15,14 @@
|
|
15
15
|
|
16
16
|
let toggleGroup = getToggleGroupContext();
|
17
17
|
|
18
|
-
let [itemProps,
|
18
|
+
let [itemProps, localProps] = $derived(
|
19
19
|
createSplitProps<ItemProps>(['value', 'disabled'])(props),
|
20
20
|
);
|
21
21
|
|
22
22
|
let itemState = $derived(toggleGroup.getItemState(itemProps));
|
23
23
|
|
24
24
|
let mergedProps = $derived(
|
25
|
-
mergeProps(
|
25
|
+
mergeProps(localProps, toggleGroup.getItemProps(itemProps)),
|
26
26
|
);
|
27
27
|
</script>
|
28
28
|
|
@@ -21,7 +21,7 @@
|
|
21
21
|
|
22
22
|
let {asChild, children, ...props}: ToggleGroupProps = $props();
|
23
23
|
|
24
|
-
let [toggleGroupProps,
|
24
|
+
let [toggleGroupProps, localProps] = $derived(
|
25
25
|
createSplitProps<CreateToggleGroupProps>([
|
26
26
|
'id',
|
27
27
|
'ids',
|
@@ -38,7 +38,7 @@
|
|
38
38
|
let toggleGroup = createToggleGroup(reflect(() => toggleGroupProps));
|
39
39
|
|
40
40
|
let mergedProps = $derived(
|
41
|
-
mergeProps(
|
41
|
+
mergeProps(localProps, toggleGroup.getRootProps()),
|
42
42
|
);
|
43
43
|
|
44
44
|
setToggleGroupContext(toggleGroup);
|
@@ -7,15 +7,14 @@ export function createTooltip(props) {
|
|
7
7
|
const locale = getLocaleContext();
|
8
8
|
const environment = getEnvironmentContext();
|
9
9
|
const id = uid();
|
10
|
-
const context =
|
10
|
+
const context = reflect(() => ({
|
11
11
|
...props,
|
12
12
|
id: props.id ?? id,
|
13
13
|
dir: locale?.dir,
|
14
14
|
open: props.defaultOpen ?? props.open,
|
15
15
|
getRootNode: environment?.getRootNode,
|
16
16
|
'open.controlled': props.open != null,
|
17
|
-
}))
|
17
|
+
}));
|
18
18
|
const [state, send] = useMachine(tooltip.machine(context), { context });
|
19
|
-
|
20
|
-
return api;
|
19
|
+
return reflect(() => tooltip.connect(state, send, normalizeProps));
|
21
20
|
}
|
package/dist/tooltip/root.svelte
CHANGED
@@ -30,18 +30,12 @@
|
|
30
30
|
);
|
31
31
|
|
32
32
|
let tooltip = createTooltip(reflect(() => tooltipProps));
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
},
|
38
|
-
|
39
|
-
return presenceStrategyProps.lazyMount;
|
40
|
-
},
|
41
|
-
get keepMounted() {
|
42
|
-
return presenceStrategyProps.keepMounted;
|
43
|
-
},
|
44
|
-
});
|
33
|
+
let presence = createPresence(
|
34
|
+
reflect(() => ({
|
35
|
+
...presenceStrategyProps,
|
36
|
+
present: tooltip.open,
|
37
|
+
})),
|
38
|
+
);
|
45
39
|
|
46
40
|
setTooltipContext(tooltip);
|
47
41
|
setPresenceContext(presence);
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlIngredientProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface TourArrowTipProps extends HtmlIngredientProps<'span'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '../merge-props.js';
|
9
|
+
import {getTourContext} from './context.svelte.js';
|
10
|
+
|
11
|
+
let {asChild, children, ...props}: TourArrowTipProps = $props();
|
12
|
+
|
13
|
+
let tour = getTourContext();
|
14
|
+
|
15
|
+
let mergedProps = $derived(mergeProps(props, tour.getArrowTipProps()));
|
16
|
+
</script>
|
17
|
+
|
18
|
+
{#if asChild}
|
19
|
+
{@render asChild(mergedProps)}
|
20
|
+
{:else}
|
21
|
+
<span {...mergedProps}>
|
22
|
+
{@render children?.()}
|
23
|
+
</span>
|
24
|
+
{/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 ArrowTip: $$__sveltets_2_IsomorphicComponent<TourArrowTipProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type ArrowTip = InstanceType<typeof ArrowTip>;
|
18
|
+
export default ArrowTip;
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlIngredientProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface TourArrowProps extends HtmlIngredientProps<'span'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '../merge-props.js';
|
9
|
+
import {getTourContext} from './context.svelte.js';
|
10
|
+
|
11
|
+
let {asChild, children, ...props}: TourArrowProps = $props();
|
12
|
+
|
13
|
+
let tour = getTourContext();
|
14
|
+
|
15
|
+
let mergedProps = $derived(mergeProps(props, tour.getArrowProps()));
|
16
|
+
</script>
|
17
|
+
|
18
|
+
{#if asChild}
|
19
|
+
{@render asChild(mergedProps)}
|
20
|
+
{:else}
|
21
|
+
<span {...mergedProps}>
|
22
|
+
{@render children?.()}
|
23
|
+
</span>
|
24
|
+
{/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 Arrow: $$__sveltets_2_IsomorphicComponent<TourArrowProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type Arrow = InstanceType<typeof Arrow>;
|
18
|
+
export default Arrow;
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlIngredientProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface TourCloseTriggerProps
|
5
|
+
extends HtmlIngredientProps<'button'> {}
|
6
|
+
</script>
|
7
|
+
|
8
|
+
<script lang="ts">
|
9
|
+
import {mergeProps} from '../merge-props.js';
|
10
|
+
import {getTourContext} from './context.svelte.js';
|
11
|
+
|
12
|
+
let {asChild, children, ...props}: TourCloseTriggerProps = $props();
|
13
|
+
|
14
|
+
let tour = getTourContext();
|
15
|
+
|
16
|
+
let mergedProps = $derived(mergeProps(props, tour.getCloseTriggerProps()));
|
17
|
+
</script>
|
18
|
+
|
19
|
+
{#if asChild}
|
20
|
+
{@render asChild(mergedProps)}
|
21
|
+
{:else}
|
22
|
+
<button type="button" {...mergedProps}>
|
23
|
+
{@render children?.()}
|
24
|
+
</button>
|
25
|
+
{/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 CloseTrigger: $$__sveltets_2_IsomorphicComponent<TourCloseTriggerProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type CloseTrigger = InstanceType<typeof CloseTrigger>;
|
18
|
+
export default CloseTrigger;
|