@skeletonlabs/skeleton-svelte 2.0.0-next.4 → 2.0.0-next.6
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.
- package/dist/components/accordion/anatomy/content.svelte +6 -5
- package/dist/components/accordion/anatomy/content.svelte.d.ts +2 -1
- package/dist/components/accordion/anatomy/content.svelte.d.ts.map +1 -0
- package/dist/components/accordion/anatomy/heading.svelte +3 -3
- package/dist/components/accordion/anatomy/heading.svelte.d.ts +1 -0
- package/dist/components/accordion/anatomy/heading.svelte.d.ts.map +1 -0
- package/dist/components/accordion/anatomy/indicator.svelte +4 -3
- package/dist/components/accordion/anatomy/indicator.svelte.d.ts +2 -1
- package/dist/components/accordion/anatomy/indicator.svelte.d.ts.map +1 -0
- package/dist/components/accordion/anatomy/item.svelte +8 -6
- package/dist/components/accordion/anatomy/item.svelte.d.ts +2 -1
- package/dist/components/accordion/anatomy/item.svelte.d.ts.map +1 -0
- package/dist/components/accordion/anatomy/root-context.svelte +1 -0
- package/dist/components/accordion/anatomy/root-context.svelte.d.ts +1 -0
- package/dist/components/accordion/anatomy/root-context.svelte.d.ts.map +1 -0
- package/dist/components/accordion/anatomy/root-provider.svelte +3 -1
- package/dist/components/accordion/anatomy/root-provider.svelte.d.ts +1 -0
- package/dist/components/accordion/anatomy/root-provider.svelte.d.ts.map +1 -0
- package/dist/components/accordion/anatomy/root.svelte +7 -5
- package/dist/components/accordion/anatomy/root.svelte.d.ts +1 -0
- package/dist/components/accordion/anatomy/root.svelte.d.ts.map +1 -0
- package/dist/components/accordion/anatomy/trigger.svelte +5 -4
- package/dist/components/accordion/anatomy/trigger.svelte.d.ts +1 -0
- package/dist/components/accordion/anatomy/trigger.svelte.d.ts.map +1 -0
- package/dist/components/accordion/index.d.ts +8 -7
- package/dist/components/accordion/index.d.ts.map +1 -0
- package/dist/components/accordion/modules/anatomy.d.ts +1 -0
- package/dist/components/accordion/modules/anatomy.d.ts.map +1 -0
- package/dist/components/accordion/modules/anatomy.js +6 -6
- package/dist/components/accordion/modules/item-context.d.ts +1 -0
- package/dist/components/accordion/modules/item-context.d.ts.map +1 -0
- package/dist/components/accordion/modules/root-context.d.ts +6 -0
- package/dist/components/accordion/modules/root-context.d.ts.map +1 -0
- package/dist/components/accordion/modules/use-accordion.svelte.d.ts +3 -0
- package/dist/components/accordion/modules/use-accordion.svelte.d.ts.map +1 -0
- package/dist/components/accordion/modules/use-accordion.svelte.js +1 -1
- package/dist/components/avatar/anatomy/fallback.svelte +5 -4
- package/dist/components/avatar/anatomy/fallback.svelte.d.ts +2 -1
- package/dist/components/avatar/anatomy/fallback.svelte.d.ts.map +1 -0
- package/dist/components/avatar/anatomy/image.svelte +5 -4
- package/dist/components/avatar/anatomy/image.svelte.d.ts +2 -1
- package/dist/components/avatar/anatomy/image.svelte.d.ts.map +1 -0
- package/dist/components/avatar/anatomy/root-context.svelte +1 -0
- package/dist/components/avatar/anatomy/root-context.svelte.d.ts +1 -0
- package/dist/components/avatar/anatomy/root-context.svelte.d.ts.map +1 -0
- package/dist/components/avatar/anatomy/root-provider.svelte +5 -3
- package/dist/components/avatar/anatomy/root-provider.svelte.d.ts +1 -0
- package/dist/components/avatar/anatomy/root-provider.svelte.d.ts.map +1 -0
- package/dist/components/avatar/anatomy/root.svelte +8 -6
- package/dist/components/avatar/anatomy/root.svelte.d.ts +2 -1
- package/dist/components/avatar/anatomy/root.svelte.d.ts.map +1 -0
- package/dist/components/avatar/index.d.ts +6 -5
- package/dist/components/avatar/index.d.ts.map +1 -0
- package/dist/components/avatar/modules/anatomy.d.ts +1 -0
- package/dist/components/avatar/modules/anatomy.d.ts.map +1 -0
- package/dist/components/avatar/modules/anatomy.js +4 -4
- package/dist/components/avatar/modules/root-context.d.ts +6 -0
- package/dist/components/avatar/modules/root-context.d.ts.map +1 -0
- package/dist/components/avatar/modules/use-avatar.svelte.d.ts +3 -0
- package/dist/components/avatar/modules/use-avatar.svelte.d.ts.map +1 -0
- package/dist/components/avatar/modules/use-avatar.svelte.js +1 -1
- package/dist/components/file-upload/anatomy/dropzone.svelte +35 -0
- package/dist/components/file-upload/anatomy/dropzone.svelte.d.ts +9 -0
- package/dist/components/file-upload/anatomy/dropzone.svelte.d.ts.map +1 -0
- package/dist/components/file-upload/anatomy/hidden-input.svelte +31 -0
- package/dist/components/file-upload/anatomy/hidden-input.svelte.d.ts +8 -0
- package/dist/components/file-upload/anatomy/hidden-input.svelte.d.ts.map +1 -0
- package/dist/components/file-upload/anatomy/item-delete-trigger.svelte +39 -0
- package/dist/components/file-upload/anatomy/item-delete-trigger.svelte.d.ts +8 -0
- package/dist/components/file-upload/anatomy/item-delete-trigger.svelte.d.ts.map +1 -0
- package/dist/components/file-upload/anatomy/item-group.svelte +33 -0
- package/dist/components/file-upload/anatomy/item-group.svelte.d.ts +8 -0
- package/dist/components/file-upload/anatomy/item-group.svelte.d.ts.map +1 -0
- package/dist/components/file-upload/anatomy/item-name.svelte +35 -0
- package/dist/components/file-upload/anatomy/item-name.svelte.d.ts +8 -0
- package/dist/components/file-upload/anatomy/item-name.svelte.d.ts.map +1 -0
- package/dist/components/file-upload/anatomy/item-size-text.svelte +35 -0
- package/dist/components/file-upload/anatomy/item-size-text.svelte.d.ts +8 -0
- package/dist/components/file-upload/anatomy/item-size-text.svelte.d.ts.map +1 -0
- package/dist/components/file-upload/anatomy/item.svelte +39 -0
- package/dist/components/file-upload/anatomy/item.svelte.d.ts +9 -0
- package/dist/components/file-upload/anatomy/item.svelte.d.ts.map +1 -0
- package/dist/components/file-upload/anatomy/root-context.svelte +20 -0
- package/dist/components/file-upload/anatomy/root-context.svelte.d.ts +9 -0
- package/dist/components/file-upload/anatomy/root-context.svelte.d.ts.map +1 -0
- package/dist/components/file-upload/anatomy/root-provider.svelte +37 -0
- package/dist/components/file-upload/anatomy/root-provider.svelte.d.ts +10 -0
- package/dist/components/file-upload/anatomy/root-provider.svelte.d.ts.map +1 -0
- package/dist/components/file-upload/anatomy/root.svelte +44 -0
- package/dist/components/file-upload/anatomy/root.svelte.d.ts +9 -0
- package/dist/components/file-upload/anatomy/root.svelte.d.ts.map +1 -0
- package/dist/components/file-upload/anatomy/trigger.svelte +33 -0
- package/dist/components/file-upload/anatomy/trigger.svelte.d.ts +8 -0
- package/dist/components/file-upload/anatomy/trigger.svelte.d.ts.map +1 -0
- package/dist/components/file-upload/index.d.ts +12 -0
- package/dist/components/file-upload/index.d.ts.map +1 -0
- package/dist/components/file-upload/index.js +2 -0
- package/dist/components/file-upload/modules/anatomy.d.ts +13 -0
- package/dist/components/file-upload/modules/anatomy.d.ts.map +1 -0
- package/dist/components/file-upload/modules/anatomy.js +23 -0
- package/dist/components/file-upload/modules/item-context.d.ts +7 -0
- package/dist/components/file-upload/modules/item-context.d.ts.map +1 -0
- package/dist/components/file-upload/modules/item-context.js +2 -0
- package/dist/components/file-upload/modules/root-context.d.ts +6 -0
- package/dist/components/file-upload/modules/root-context.d.ts.map +1 -0
- package/dist/components/file-upload/modules/root-context.js +2 -0
- package/dist/components/file-upload/modules/use-file-upload.svelte.d.ts +3 -0
- package/dist/components/file-upload/modules/use-file-upload.svelte.d.ts.map +1 -0
- package/dist/components/file-upload/modules/use-file-upload.svelte.js +7 -0
- package/dist/components/progress-linear/anatomy/label.svelte +5 -4
- package/dist/components/progress-linear/anatomy/label.svelte.d.ts +2 -1
- package/dist/components/progress-linear/anatomy/label.svelte.d.ts.map +1 -0
- package/dist/components/progress-linear/anatomy/range.svelte +5 -4
- package/dist/components/progress-linear/anatomy/range.svelte.d.ts +2 -1
- package/dist/components/progress-linear/anatomy/range.svelte.d.ts.map +1 -0
- package/dist/components/progress-linear/anatomy/root-context.svelte +1 -0
- package/dist/components/progress-linear/anatomy/root-context.svelte.d.ts +1 -0
- package/dist/components/progress-linear/anatomy/root-context.svelte.d.ts.map +1 -0
- package/dist/components/progress-linear/anatomy/root-provider.svelte +5 -3
- package/dist/components/progress-linear/anatomy/root-provider.svelte.d.ts +1 -0
- package/dist/components/progress-linear/anatomy/root-provider.svelte.d.ts.map +1 -0
- package/dist/components/progress-linear/anatomy/root.svelte +7 -5
- package/dist/components/progress-linear/anatomy/root.svelte.d.ts +2 -1
- package/dist/components/progress-linear/anatomy/root.svelte.d.ts.map +1 -0
- package/dist/components/progress-linear/anatomy/track.svelte +5 -4
- package/dist/components/progress-linear/anatomy/track.svelte.d.ts +2 -1
- package/dist/components/progress-linear/anatomy/track.svelte.d.ts.map +1 -0
- package/dist/components/progress-linear/index.d.ts +6 -5
- package/dist/components/progress-linear/index.d.ts.map +1 -0
- package/dist/components/progress-linear/modules/anatomy.d.ts +1 -0
- package/dist/components/progress-linear/modules/anatomy.d.ts.map +1 -0
- package/dist/components/progress-linear/modules/anatomy.js +3 -3
- package/dist/components/progress-linear/modules/root-context.d.ts +6 -0
- package/dist/components/progress-linear/modules/root-context.d.ts.map +1 -0
- package/dist/components/progress-linear/modules/use-progress-linear.svelte.d.ts +3 -0
- package/dist/components/progress-linear/modules/use-progress-linear.svelte.d.ts.map +1 -0
- package/dist/components/progress-linear/modules/use-progress-linear.svelte.js +1 -1
- package/dist/components/rating-group/anatomy/control.svelte +4 -3
- package/dist/components/rating-group/anatomy/control.svelte.d.ts +1 -0
- package/dist/components/rating-group/anatomy/control.svelte.d.ts.map +1 -0
- package/dist/components/rating-group/anatomy/hidden-input.svelte +5 -4
- package/dist/components/rating-group/anatomy/hidden-input.svelte.d.ts +2 -1
- package/dist/components/rating-group/anatomy/hidden-input.svelte.d.ts.map +1 -0
- package/dist/components/rating-group/anatomy/item.svelte +10 -7
- package/dist/components/rating-group/anatomy/item.svelte.d.ts +2 -1
- package/dist/components/rating-group/anatomy/item.svelte.d.ts.map +1 -0
- package/dist/components/rating-group/anatomy/label.svelte +5 -4
- package/dist/components/rating-group/anatomy/label.svelte.d.ts +2 -1
- package/dist/components/rating-group/anatomy/label.svelte.d.ts.map +1 -0
- package/dist/components/rating-group/anatomy/root-context.svelte +1 -0
- package/dist/components/rating-group/anatomy/root-context.svelte.d.ts +1 -0
- package/dist/components/rating-group/anatomy/root-context.svelte.d.ts.map +1 -0
- package/dist/components/rating-group/anatomy/root-provider.svelte +6 -4
- package/dist/components/rating-group/anatomy/root-provider.svelte.d.ts +2 -1
- package/dist/components/rating-group/anatomy/root-provider.svelte.d.ts.map +1 -0
- package/dist/components/rating-group/anatomy/root.svelte +8 -6
- package/dist/components/rating-group/anatomy/root.svelte.d.ts +2 -1
- package/dist/components/rating-group/anatomy/root.svelte.d.ts.map +1 -0
- package/dist/components/rating-group/index.d.ts +8 -7
- package/dist/components/rating-group/index.d.ts.map +1 -0
- package/dist/components/rating-group/modules/anatomy.d.ts +1 -0
- package/dist/components/rating-group/modules/anatomy.d.ts.map +1 -0
- package/dist/components/rating-group/modules/anatomy.js +6 -6
- package/dist/components/rating-group/modules/root-context.d.ts +6 -0
- package/dist/components/rating-group/modules/root-context.d.ts.map +1 -0
- package/dist/components/rating-group/modules/use-rating-group.svelte.d.ts +3 -0
- package/dist/components/rating-group/modules/use-rating-group.svelte.d.ts.map +1 -0
- package/dist/components/rating-group/modules/use-rating-group.svelte.js +1 -1
- package/dist/components/switch/anatomy/control.svelte +5 -4
- package/dist/components/switch/anatomy/control.svelte.d.ts +2 -1
- package/dist/components/switch/anatomy/control.svelte.d.ts.map +1 -0
- package/dist/components/switch/anatomy/hidden-input.svelte +5 -4
- package/dist/components/switch/anatomy/hidden-input.svelte.d.ts +2 -1
- package/dist/components/switch/anatomy/hidden-input.svelte.d.ts.map +1 -0
- package/dist/components/switch/anatomy/label.svelte +5 -4
- package/dist/components/switch/anatomy/label.svelte.d.ts +2 -1
- package/dist/components/switch/anatomy/label.svelte.d.ts.map +1 -0
- package/dist/components/switch/anatomy/root-context.svelte +1 -0
- package/dist/components/switch/anatomy/root-context.svelte.d.ts +1 -0
- package/dist/components/switch/anatomy/root-context.svelte.d.ts.map +1 -0
- package/dist/components/switch/anatomy/root-provider.svelte +6 -4
- package/dist/components/switch/anatomy/root-provider.svelte.d.ts +2 -1
- package/dist/components/switch/anatomy/root-provider.svelte.d.ts.map +1 -0
- package/dist/components/switch/anatomy/root.svelte +8 -6
- package/dist/components/switch/anatomy/root.svelte.d.ts +2 -1
- package/dist/components/switch/anatomy/root.svelte.d.ts.map +1 -0
- package/dist/components/switch/anatomy/thumb.svelte +5 -4
- package/dist/components/switch/anatomy/thumb.svelte.d.ts +2 -1
- package/dist/components/switch/anatomy/thumb.svelte.d.ts.map +1 -0
- package/dist/components/switch/index.d.ts +7 -6
- package/dist/components/switch/index.d.ts.map +1 -0
- package/dist/components/switch/modules/anatomy.d.ts +1 -0
- package/dist/components/switch/modules/anatomy.d.ts.map +1 -0
- package/dist/components/switch/modules/anatomy.js +5 -5
- package/dist/components/switch/modules/root-context.d.ts +6 -0
- package/dist/components/switch/modules/root-context.d.ts.map +1 -0
- package/dist/components/switch/modules/use-switch.svelte.d.ts +3 -0
- package/dist/components/switch/modules/use-switch.svelte.d.ts.map +1 -0
- package/dist/components/switch/modules/use-switch.svelte.js +1 -1
- package/dist/components/tabs/anatomy/content.svelte +6 -4
- package/dist/components/tabs/anatomy/content.svelte.d.ts +1 -0
- package/dist/components/tabs/anatomy/content.svelte.d.ts.map +1 -0
- package/dist/components/tabs/anatomy/indicator.svelte +5 -4
- package/dist/components/tabs/anatomy/indicator.svelte.d.ts +1 -0
- package/dist/components/tabs/anatomy/indicator.svelte.d.ts.map +1 -0
- package/dist/components/tabs/anatomy/list.svelte +5 -4
- package/dist/components/tabs/anatomy/list.svelte.d.ts +1 -0
- package/dist/components/tabs/anatomy/list.svelte.d.ts.map +1 -0
- package/dist/components/tabs/anatomy/root-context.svelte +1 -0
- package/dist/components/tabs/anatomy/root-context.svelte.d.ts +1 -0
- package/dist/components/tabs/anatomy/root-context.svelte.d.ts.map +1 -0
- package/dist/components/tabs/anatomy/root-provider.svelte +5 -3
- package/dist/components/tabs/anatomy/root-provider.svelte.d.ts +2 -1
- package/dist/components/tabs/anatomy/root-provider.svelte.d.ts.map +1 -0
- package/dist/components/tabs/anatomy/root.svelte +6 -4
- package/dist/components/tabs/anatomy/root.svelte.d.ts +1 -0
- package/dist/components/tabs/anatomy/root.svelte.d.ts.map +1 -0
- package/dist/components/tabs/anatomy/trigger.svelte +6 -4
- package/dist/components/tabs/anatomy/trigger.svelte.d.ts +1 -0
- package/dist/components/tabs/anatomy/trigger.svelte.d.ts.map +1 -0
- package/dist/components/tabs/index.d.ts +7 -6
- package/dist/components/tabs/index.d.ts.map +1 -0
- package/dist/components/tabs/modules/anatomy.d.ts +1 -0
- package/dist/components/tabs/modules/anatomy.d.ts.map +1 -0
- package/dist/components/tabs/modules/anatomy.js +5 -5
- package/dist/components/tabs/modules/root-context.d.ts +6 -0
- package/dist/components/tabs/modules/root-context.d.ts.map +1 -0
- package/dist/components/tabs/modules/use-tabs.svelte.d.ts +3 -0
- package/dist/components/tabs/modules/use-tabs.svelte.d.ts.map +1 -0
- package/dist/components/tabs/modules/use-tabs.svelte.js +1 -1
- package/dist/components/toast/anatomy/action-trigger.svelte +5 -4
- package/dist/components/toast/anatomy/action-trigger.svelte.d.ts +2 -1
- package/dist/components/toast/anatomy/action-trigger.svelte.d.ts.map +1 -0
- package/dist/components/toast/anatomy/close-trigger.svelte +7 -5
- package/dist/components/toast/anatomy/close-trigger.svelte.d.ts +2 -1
- package/dist/components/toast/anatomy/close-trigger.svelte.d.ts.map +1 -0
- package/dist/components/toast/anatomy/description.svelte +5 -4
- package/dist/components/toast/anatomy/description.svelte.d.ts +2 -1
- package/dist/components/toast/anatomy/description.svelte.d.ts.map +1 -0
- package/dist/components/toast/anatomy/group.svelte +9 -7
- package/dist/components/toast/anatomy/group.svelte.d.ts +3 -2
- package/dist/components/toast/anatomy/group.svelte.d.ts.map +1 -0
- package/dist/components/toast/anatomy/message.svelte +4 -4
- package/dist/components/toast/anatomy/message.svelte.d.ts +2 -1
- package/dist/components/toast/anatomy/message.svelte.d.ts.map +1 -0
- package/dist/components/toast/anatomy/root-context.svelte +1 -1
- package/dist/components/toast/anatomy/root-context.svelte.d.ts +2 -1
- package/dist/components/toast/anatomy/root-context.svelte.d.ts.map +1 -0
- package/dist/components/toast/anatomy/root.svelte +9 -7
- package/dist/components/toast/anatomy/root.svelte.d.ts +2 -1
- package/dist/components/toast/anatomy/root.svelte.d.ts.map +1 -0
- package/dist/components/toast/anatomy/title.svelte +5 -4
- package/dist/components/toast/anatomy/title.svelte.d.ts +2 -1
- package/dist/components/toast/anatomy/title.svelte.d.ts.map +1 -0
- package/dist/components/toast/index.d.ts +6 -5
- package/dist/components/toast/index.d.ts.map +1 -0
- package/dist/components/toast/modules/anatomy.d.ts +1 -0
- package/dist/components/toast/modules/anatomy.d.ts.map +1 -0
- package/dist/components/toast/modules/anatomy.js +6 -6
- package/dist/components/toast/modules/group-context.d.ts +1 -0
- package/dist/components/toast/modules/group-context.d.ts.map +1 -0
- package/dist/components/toast/modules/root-context.d.ts +1 -0
- package/dist/components/toast/modules/root-context.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -0
- package/dist/internal/components/star-empty.svelte.d.ts +1 -0
- package/dist/internal/components/star-empty.svelte.d.ts.map +1 -0
- package/dist/internal/components/star-full.svelte.d.ts +1 -0
- package/dist/internal/components/star-full.svelte.d.ts.map +1 -0
- package/dist/internal/components/star-half.svelte.d.ts +1 -0
- package/dist/internal/components/star-half.svelte.d.ts.map +1 -0
- package/dist/internal/components/x.svelte.d.ts +1 -0
- package/dist/internal/components/x.svelte.d.ts.map +1 -0
- package/dist/internal/create-context.d.ts +1 -0
- package/dist/internal/create-context.d.ts.map +1 -0
- package/dist/internal/create-context.js +1 -1
- package/dist/internal/html-attributes.d.ts +1 -0
- package/dist/internal/html-attributes.d.ts.map +1 -0
- package/dist/internal/props-with-children.d.ts +1 -0
- package/dist/internal/props-with-children.d.ts.map +1 -0
- package/dist/internal/props-with-element.d.ts +2 -1
- package/dist/internal/props-with-element.d.ts.map +1 -0
- package/package.json +18 -22
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
|
-
import type { PropsWithElement } from '../../../internal/props-with-element';
|
|
3
2
|
import type { HTMLAttributes } from '../../../internal/html-attributes';
|
|
3
|
+
import type { PropsWithElement } from '../../../internal/props-with-element';
|
|
4
|
+
|
|
4
5
|
import type { useRatingGroup } from '../modules/use-rating-group.svelte';
|
|
5
6
|
|
|
6
7
|
export interface RatingGroupRootProviderProps extends PropsWithElement<'div'>, HTMLAttributes<'div', 'id' | 'dir'> {
|
|
@@ -9,8 +10,9 @@
|
|
|
9
10
|
</script>
|
|
10
11
|
|
|
11
12
|
<script lang="ts">
|
|
12
|
-
import { mergeProps } from '@zag-js/svelte';
|
|
13
13
|
import { classesRatingGroup } from '@skeletonlabs/skeleton-common';
|
|
14
|
+
import { mergeProps } from '@zag-js/svelte';
|
|
15
|
+
|
|
14
16
|
import { RatingGroupRootContext } from '../modules/root-context';
|
|
15
17
|
|
|
16
18
|
const props: RatingGroupRootProviderProps = $props();
|
|
@@ -19,8 +21,8 @@
|
|
|
19
21
|
|
|
20
22
|
const attributes = $derived(
|
|
21
23
|
mergeProps(ratingGroup().getRootProps(), rest, {
|
|
22
|
-
class: classesRatingGroup.root
|
|
23
|
-
})
|
|
24
|
+
class: classesRatingGroup.root,
|
|
25
|
+
}),
|
|
24
26
|
);
|
|
25
27
|
|
|
26
28
|
RatingGroupRootContext.provide(() => ratingGroup());
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PropsWithElement } from '../../../internal/props-with-element';
|
|
2
1
|
import type { HTMLAttributes } from '../../../internal/html-attributes';
|
|
2
|
+
import type { PropsWithElement } from '../../../internal/props-with-element';
|
|
3
3
|
import type { useRatingGroup } from '../modules/use-rating-group.svelte';
|
|
4
4
|
export interface RatingGroupRootProviderProps extends PropsWithElement<'div'>, HTMLAttributes<'div', 'id' | 'dir'> {
|
|
5
5
|
value: ReturnType<typeof useRatingGroup>;
|
|
@@ -7,3 +7,4 @@ export interface RatingGroupRootProviderProps extends PropsWithElement<'div'>, H
|
|
|
7
7
|
declare const RootProvider: import("svelte").Component<RatingGroupRootProviderProps, {}, "">;
|
|
8
8
|
type RootProvider = ReturnType<typeof RootProvider>;
|
|
9
9
|
export default RootProvider;
|
|
10
|
+
//# sourceMappingURL=root-provider.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"root-provider.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/rating-group/anatomy/root-provider.svelte.ts"],"names":[],"mappings":"AAGC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEzE,MAAM,WAAW,4BAA6B,SAAQ,gBAAgB,CAAC,KAAK,CAAC,EAAE,cAAc,CAAC,KAAK,EAAE,IAAI,GAAG,KAAK,CAAC;IACjH,KAAK,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;CACzC;AAuCF,QAAA,MAAM,YAAY,kEAAwC,CAAC;AAC3D,KAAK,YAAY,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AACpD,eAAe,YAAY,CAAC"}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
2
|
import type { Props } from '@zag-js/rating-group';
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
import type { HTMLAttributes } from '../../../internal/html-attributes';
|
|
5
|
+
import type { PropsWithElement } from '../../../internal/props-with-element';
|
|
5
6
|
|
|
6
7
|
export interface RatingGroupRootProps extends Omit<Props, 'id'>, PropsWithElement<'div'>, HTMLAttributes<'div', 'id' | 'dir'> {}
|
|
7
8
|
</script>
|
|
8
9
|
|
|
9
10
|
<script lang="ts">
|
|
10
|
-
import { mergeProps } from '@zag-js/svelte';
|
|
11
|
-
import { splitProps } from '@zag-js/rating-group';
|
|
12
11
|
import { classesRatingGroup } from '@skeletonlabs/skeleton-common';
|
|
12
|
+
import { splitProps } from '@zag-js/rating-group';
|
|
13
|
+
import { mergeProps } from '@zag-js/svelte';
|
|
14
|
+
|
|
13
15
|
import { RatingGroupRootContext } from '../modules/root-context';
|
|
14
16
|
import { useRatingGroup } from '../modules/use-rating-group.svelte';
|
|
15
17
|
|
|
@@ -21,13 +23,13 @@
|
|
|
21
23
|
const id = $props.id();
|
|
22
24
|
const ratingGroup = useRatingGroup(() => ({
|
|
23
25
|
id: id,
|
|
24
|
-
...ratingGroupProps
|
|
26
|
+
...ratingGroupProps,
|
|
25
27
|
}));
|
|
26
28
|
|
|
27
29
|
const attributes = $derived(
|
|
28
30
|
mergeProps(ratingGroup().getRootProps(), rest, {
|
|
29
|
-
class: classesRatingGroup.root
|
|
30
|
-
})
|
|
31
|
+
class: classesRatingGroup.root,
|
|
32
|
+
}),
|
|
31
33
|
);
|
|
32
34
|
|
|
33
35
|
RatingGroupRootContext.provide(() => ratingGroup());
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { Props } from '@zag-js/rating-group';
|
|
2
|
-
import type { PropsWithElement } from '../../../internal/props-with-element';
|
|
3
2
|
import type { HTMLAttributes } from '../../../internal/html-attributes';
|
|
3
|
+
import type { PropsWithElement } from '../../../internal/props-with-element';
|
|
4
4
|
export interface RatingGroupRootProps extends Omit<Props, 'id'>, PropsWithElement<'div'>, HTMLAttributes<'div', 'id' | 'dir'> {
|
|
5
5
|
}
|
|
6
6
|
declare const Root: import("svelte").Component<RatingGroupRootProps, {}, "">;
|
|
7
7
|
type Root = ReturnType<typeof Root>;
|
|
8
8
|
export default Root;
|
|
9
|
+
//# sourceMappingURL=root.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"root.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/rating-group/anatomy/root.svelte.ts"],"names":[],"mappings":"AAGC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,gBAAgB,CAAC,KAAK,CAAC,EAAE,cAAc,CAAC,KAAK,EAAE,IAAI,GAAG,KAAK,CAAC;CAAG;AAkDjI,QAAA,MAAM,IAAI,0DAAwC,CAAC;AACnD,KAAK,IAAI,GAAG,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC;AACpC,eAAe,IAAI,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
export { RatingGroup } from './modules/anatomy';
|
|
2
|
-
export { useRatingGroup } from './modules/use-rating-group.svelte';
|
|
3
|
-
export type { RatingGroupRootProps } from './anatomy/root.svelte';
|
|
4
|
-
export type { RatingGroupRootProviderProps } from './anatomy/root-provider.svelte';
|
|
5
|
-
export type { RatingGroupRootContextProps } from './anatomy/root-context.svelte';
|
|
6
|
-
export type { RatingGroupLabelProps } from './anatomy/label.svelte';
|
|
7
1
|
export type { RatingGroupControlProps } from './anatomy/control.svelte';
|
|
8
|
-
export type { RatingGroupItemProps } from './anatomy/item.svelte';
|
|
9
2
|
export type { RatingGroupHiddenInputProps } from './anatomy/hidden-input.svelte';
|
|
3
|
+
export type { RatingGroupItemProps } from './anatomy/item.svelte';
|
|
4
|
+
export type { RatingGroupLabelProps } from './anatomy/label.svelte';
|
|
5
|
+
export type { RatingGroupRootProps } from './anatomy/root.svelte';
|
|
6
|
+
export type { RatingGroupRootContextProps } from './anatomy/root-context.svelte';
|
|
7
|
+
export type { RatingGroupRootProviderProps } from './anatomy/root-provider.svelte';
|
|
8
|
+
export { RatingGroup } from './modules/anatomy';
|
|
9
|
+
export { useRatingGroup } from './modules/use-rating-group.svelte';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/rating-group/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACxE,YAAY,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACjF,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,YAAY,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AACpE,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,YAAY,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACjF,YAAY,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC"}
|
|
@@ -6,3 +6,4 @@ export declare const RatingGroup: import("svelte").Component<import("../anatomy/
|
|
|
6
6
|
Item: import("svelte").Component<import("../anatomy/item.svelte").RatingGroupItemProps, {}, "">;
|
|
7
7
|
HiddenInput: import("svelte").Component<import("../anatomy/hidden-input.svelte").RatingGroupHiddenInputProps, {}, "">;
|
|
8
8
|
};
|
|
9
|
+
//# sourceMappingURL=anatomy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anatomy.d.ts","sourceRoot":"","sources":["../../../../src/components/rating-group/modules/anatomy.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,WAAW;;;;;;;CAOtB,CAAC"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import Root from '../anatomy/root.svelte';
|
|
2
|
-
import RootProvider from '../anatomy/root-provider.svelte';
|
|
3
|
-
import RootContext from '../anatomy/root-context.svelte';
|
|
4
|
-
import Label from '../anatomy/label.svelte';
|
|
5
1
|
import Control from '../anatomy/control.svelte';
|
|
6
|
-
import Item from '../anatomy/item.svelte';
|
|
7
2
|
import HiddenInput from '../anatomy/hidden-input.svelte';
|
|
3
|
+
import Item from '../anatomy/item.svelte';
|
|
4
|
+
import Label from '../anatomy/label.svelte';
|
|
5
|
+
import Root from '../anatomy/root.svelte';
|
|
6
|
+
import RootContext from '../anatomy/root-context.svelte';
|
|
7
|
+
import RootProvider from '../anatomy/root-provider.svelte';
|
|
8
8
|
export const RatingGroup = Object.assign(Root, {
|
|
9
9
|
Provider: RootProvider,
|
|
10
10
|
Context: RootContext,
|
|
11
11
|
Label: Label,
|
|
12
12
|
Control: Control,
|
|
13
13
|
Item: Item,
|
|
14
|
-
HiddenInput: HiddenInput
|
|
14
|
+
HiddenInput: HiddenInput,
|
|
15
15
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"root-context.d.ts","sourceRoot":"","sources":["../../../../src/components/rating-group/modules/root-context.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,sBAAsB;;;;CAAqD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-rating-group.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/rating-group/modules/use-rating-group.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAoB,KAAK,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAG9E,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,CAAC,MAAM,KAAK,CAAC,GAAG,MAAM,GAAG,CAItE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { connect, machine } from '@zag-js/rating-group';
|
|
2
|
-
import {
|
|
2
|
+
import { normalizeProps, useMachine } from '@zag-js/svelte';
|
|
3
3
|
export function useRatingGroup(props) {
|
|
4
4
|
const service = useMachine(machine, props);
|
|
5
5
|
const ratingGroup = $derived(connect(service, normalizeProps));
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
|
-
import type { PropsWithElement } from '../../../internal/props-with-element';
|
|
3
2
|
import type { HTMLAttributes } from '../../../internal/html-attributes';
|
|
3
|
+
import type { PropsWithElement } from '../../../internal/props-with-element';
|
|
4
4
|
|
|
5
5
|
export interface SwitchControlProps extends PropsWithElement<'span'>, HTMLAttributes<'span'> {}
|
|
6
6
|
</script>
|
|
7
7
|
|
|
8
8
|
<script lang="ts">
|
|
9
|
-
import { mergeProps } from '@zag-js/svelte';
|
|
10
9
|
import { classesSwitch } from '@skeletonlabs/skeleton-common';
|
|
10
|
+
import { mergeProps } from '@zag-js/svelte';
|
|
11
|
+
|
|
11
12
|
import { SwitchRootContext } from '../modules/root-context';
|
|
12
13
|
|
|
13
14
|
const props: SwitchControlProps = $props();
|
|
@@ -18,8 +19,8 @@
|
|
|
18
19
|
|
|
19
20
|
const attributes = $derived(
|
|
20
21
|
mergeProps(switch_().getControlProps(), rest, {
|
|
21
|
-
class: classesSwitch.control
|
|
22
|
-
})
|
|
22
|
+
class: classesSwitch.control,
|
|
23
|
+
}),
|
|
23
24
|
);
|
|
24
25
|
</script>
|
|
25
26
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { PropsWithElement } from '../../../internal/props-with-element';
|
|
2
1
|
import type { HTMLAttributes } from '../../../internal/html-attributes';
|
|
2
|
+
import type { PropsWithElement } from '../../../internal/props-with-element';
|
|
3
3
|
export interface SwitchControlProps extends PropsWithElement<'span'>, HTMLAttributes<'span'> {
|
|
4
4
|
}
|
|
5
5
|
declare const Control: import("svelte").Component<SwitchControlProps, {}, "">;
|
|
6
6
|
type Control = ReturnType<typeof Control>;
|
|
7
7
|
export default Control;
|
|
8
|
+
//# sourceMappingURL=control.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/switch/anatomy/control.svelte.ts"],"names":[],"mappings":"AAGC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB,CAAC,MAAM,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC;CAAG;AAuChG,QAAA,MAAM,OAAO,wDAAwC,CAAC;AACtD,KAAK,OAAO,GAAG,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC;AAC1C,eAAe,OAAO,CAAC"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
|
-
import type { PropsWithElement } from '../../../internal/props-with-element';
|
|
3
2
|
import type { HTMLAttributes } from '../../../internal/html-attributes';
|
|
3
|
+
import type { PropsWithElement } from '../../../internal/props-with-element';
|
|
4
4
|
|
|
5
5
|
export interface SwitchHiddenInputProps extends PropsWithElement<'input'>, HTMLAttributes<'input', 'children'> {}
|
|
6
6
|
</script>
|
|
7
7
|
|
|
8
8
|
<script lang="ts">
|
|
9
|
-
import { mergeProps } from '@zag-js/svelte';
|
|
10
9
|
import { classesSwitch } from '@skeletonlabs/skeleton-common';
|
|
10
|
+
import { mergeProps } from '@zag-js/svelte';
|
|
11
|
+
|
|
11
12
|
import { SwitchRootContext } from '../modules/root-context';
|
|
12
13
|
|
|
13
14
|
const props: SwitchHiddenInputProps = $props();
|
|
@@ -18,8 +19,8 @@
|
|
|
18
19
|
|
|
19
20
|
const attributes = $derived(
|
|
20
21
|
mergeProps(switch_().getHiddenInputProps(), rest, {
|
|
21
|
-
class: classesSwitch.hiddenInput
|
|
22
|
-
})
|
|
22
|
+
class: classesSwitch.hiddenInput,
|
|
23
|
+
}),
|
|
23
24
|
);
|
|
24
25
|
</script>
|
|
25
26
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { PropsWithElement } from '../../../internal/props-with-element';
|
|
2
1
|
import type { HTMLAttributes } from '../../../internal/html-attributes';
|
|
2
|
+
import type { PropsWithElement } from '../../../internal/props-with-element';
|
|
3
3
|
export interface SwitchHiddenInputProps extends PropsWithElement<'input'>, HTMLAttributes<'input', 'children'> {
|
|
4
4
|
}
|
|
5
5
|
declare const HiddenInput: import("svelte").Component<SwitchHiddenInputProps, {}, "">;
|
|
6
6
|
type HiddenInput = ReturnType<typeof HiddenInput>;
|
|
7
7
|
export default HiddenInput;
|
|
8
|
+
//# sourceMappingURL=hidden-input.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hidden-input.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/switch/anatomy/hidden-input.svelte.ts"],"names":[],"mappings":"AAGC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,MAAM,WAAW,sBAAuB,SAAQ,gBAAgB,CAAC,OAAO,CAAC,EAAE,cAAc,CAAC,OAAO,EAAE,UAAU,CAAC;CAAG;AAqClH,QAAA,MAAM,WAAW,4DAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
|
-
import type { PropsWithElement } from '../../../internal/props-with-element';
|
|
3
2
|
import type { HTMLAttributes } from '../../../internal/html-attributes';
|
|
3
|
+
import type { PropsWithElement } from '../../../internal/props-with-element';
|
|
4
4
|
|
|
5
5
|
export interface SwitchLabelProps extends PropsWithElement<'span'>, HTMLAttributes<'span'> {}
|
|
6
6
|
</script>
|
|
7
7
|
|
|
8
8
|
<script lang="ts">
|
|
9
|
-
import { mergeProps } from '@zag-js/svelte';
|
|
10
9
|
import { classesSwitch } from '@skeletonlabs/skeleton-common';
|
|
10
|
+
import { mergeProps } from '@zag-js/svelte';
|
|
11
|
+
|
|
11
12
|
import { SwitchRootContext } from '../modules/root-context';
|
|
12
13
|
|
|
13
14
|
const props: SwitchLabelProps = $props();
|
|
@@ -18,8 +19,8 @@
|
|
|
18
19
|
|
|
19
20
|
const attributes = $derived(
|
|
20
21
|
mergeProps(switch_().getLabelProps(), rest, {
|
|
21
|
-
class: classesSwitch.label
|
|
22
|
-
})
|
|
22
|
+
class: classesSwitch.label,
|
|
23
|
+
}),
|
|
23
24
|
);
|
|
24
25
|
</script>
|
|
25
26
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { PropsWithElement } from '../../../internal/props-with-element';
|
|
2
1
|
import type { HTMLAttributes } from '../../../internal/html-attributes';
|
|
2
|
+
import type { PropsWithElement } from '../../../internal/props-with-element';
|
|
3
3
|
export interface SwitchLabelProps extends PropsWithElement<'span'>, HTMLAttributes<'span'> {
|
|
4
4
|
}
|
|
5
5
|
declare const Label: import("svelte").Component<SwitchLabelProps, {}, "">;
|
|
6
6
|
type Label = ReturnType<typeof Label>;
|
|
7
7
|
export default Label;
|
|
8
|
+
//# sourceMappingURL=label.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/switch/anatomy/label.svelte.ts"],"names":[],"mappings":"AAGC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB,CAAC,MAAM,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC;CAAG;AAuC9F,QAAA,MAAM,KAAK,sDAAwC,CAAC;AACpD,KAAK,KAAK,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC;AACtC,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"root-context.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/switch/anatomy/root-context.svelte.ts"],"names":[],"mappings":"AAGC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAE9D,MAAM,WAAW,sBAAsB;IACtC,QAAQ,EAAE,OAAO,CAAC,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC;CAClD;AAqBF,QAAA,MAAM,WAAW,4DAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
|
-
import type { PropsWithElement } from '../../../internal/props-with-element';
|
|
3
2
|
import type { HTMLAttributes } from '../../../internal/html-attributes';
|
|
3
|
+
import type { PropsWithElement } from '../../../internal/props-with-element';
|
|
4
|
+
|
|
4
5
|
import type { useSwitch } from '../modules/use-switch.svelte';
|
|
5
6
|
|
|
6
7
|
export interface SwitchRootProviderProps extends PropsWithElement<'label'>, HTMLAttributes<'label', 'id' | 'dir' | 'form'> {
|
|
@@ -9,8 +10,9 @@
|
|
|
9
10
|
</script>
|
|
10
11
|
|
|
11
12
|
<script lang="ts">
|
|
12
|
-
import { mergeProps } from '@zag-js/svelte';
|
|
13
13
|
import { classesSwitch } from '@skeletonlabs/skeleton-common';
|
|
14
|
+
import { mergeProps } from '@zag-js/svelte';
|
|
15
|
+
|
|
14
16
|
import { SwitchRootContext } from '../modules/root-context';
|
|
15
17
|
|
|
16
18
|
const props: SwitchRootProviderProps = $props();
|
|
@@ -19,8 +21,8 @@
|
|
|
19
21
|
|
|
20
22
|
const attributes = $derived(
|
|
21
23
|
mergeProps(switch_().getRootProps(), rest, {
|
|
22
|
-
class: classesSwitch.root
|
|
23
|
-
})
|
|
24
|
+
class: classesSwitch.root,
|
|
25
|
+
}),
|
|
24
26
|
);
|
|
25
27
|
|
|
26
28
|
SwitchRootContext.provide(() => switch_());
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PropsWithElement } from '../../../internal/props-with-element';
|
|
2
1
|
import type { HTMLAttributes } from '../../../internal/html-attributes';
|
|
2
|
+
import type { PropsWithElement } from '../../../internal/props-with-element';
|
|
3
3
|
import type { useSwitch } from '../modules/use-switch.svelte';
|
|
4
4
|
export interface SwitchRootProviderProps extends PropsWithElement<'label'>, HTMLAttributes<'label', 'id' | 'dir' | 'form'> {
|
|
5
5
|
value: ReturnType<typeof useSwitch>;
|
|
@@ -7,3 +7,4 @@ export interface SwitchRootProviderProps extends PropsWithElement<'label'>, HTML
|
|
|
7
7
|
declare const RootProvider: import("svelte").Component<SwitchRootProviderProps, {}, "">;
|
|
8
8
|
type RootProvider = ReturnType<typeof RootProvider>;
|
|
9
9
|
export default RootProvider;
|
|
10
|
+
//# sourceMappingURL=root-provider.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"root-provider.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/switch/anatomy/root-provider.svelte.ts"],"names":[],"mappings":"AAGC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAE9D,MAAM,WAAW,uBAAwB,SAAQ,gBAAgB,CAAC,OAAO,CAAC,EAAE,cAAc,CAAC,OAAO,EAAE,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;IACzH,KAAK,EAAE,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;CACpC;AAuCF,QAAA,MAAM,YAAY,6DAAwC,CAAC;AAC3D,KAAK,YAAY,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AACpD,eAAe,YAAY,CAAC"}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
2
|
import type { Props } from '@zag-js/switch';
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
import type { HTMLAttributes } from '../../../internal/html-attributes';
|
|
5
|
+
import type { PropsWithElement } from '../../../internal/props-with-element';
|
|
5
6
|
|
|
6
7
|
export interface SwitchRootProps extends Omit<Props, 'id'>, PropsWithElement<'label'>, HTMLAttributes<'label', 'id' | 'dir' | 'form'> {}
|
|
7
8
|
</script>
|
|
8
9
|
|
|
9
10
|
<script lang="ts">
|
|
10
|
-
import { mergeProps } from '@zag-js/svelte';
|
|
11
11
|
import { classesSwitch } from '@skeletonlabs/skeleton-common';
|
|
12
|
-
import {
|
|
12
|
+
import { mergeProps } from '@zag-js/svelte';
|
|
13
13
|
import { splitProps } from '@zag-js/switch';
|
|
14
|
+
|
|
15
|
+
import { SwitchRootContext } from '../modules/root-context';
|
|
14
16
|
import { useSwitch } from '../modules/use-switch.svelte';
|
|
15
17
|
|
|
16
18
|
const props: SwitchRootProps = $props();
|
|
@@ -21,13 +23,13 @@
|
|
|
21
23
|
const id = $props.id();
|
|
22
24
|
const switch_ = useSwitch(() => ({
|
|
23
25
|
id: id,
|
|
24
|
-
...switchProps
|
|
26
|
+
...switchProps,
|
|
25
27
|
}));
|
|
26
28
|
|
|
27
29
|
const attributes = $derived(
|
|
28
30
|
mergeProps(switch_().getRootProps(), rest, {
|
|
29
|
-
class: classesSwitch.root
|
|
30
|
-
})
|
|
31
|
+
class: classesSwitch.root,
|
|
32
|
+
}),
|
|
31
33
|
);
|
|
32
34
|
|
|
33
35
|
SwitchRootContext.provide(() => switch_());
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { Props } from '@zag-js/switch';
|
|
2
|
-
import type { PropsWithElement } from '../../../internal/props-with-element';
|
|
3
2
|
import type { HTMLAttributes } from '../../../internal/html-attributes';
|
|
3
|
+
import type { PropsWithElement } from '../../../internal/props-with-element';
|
|
4
4
|
export interface SwitchRootProps extends Omit<Props, 'id'>, PropsWithElement<'label'>, HTMLAttributes<'label', 'id' | 'dir' | 'form'> {
|
|
5
5
|
}
|
|
6
6
|
declare const Root: import("svelte").Component<SwitchRootProps, {}, "">;
|
|
7
7
|
type Root = ReturnType<typeof Root>;
|
|
8
8
|
export default Root;
|
|
9
|
+
//# sourceMappingURL=root.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"root.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/switch/anatomy/root.svelte.ts"],"names":[],"mappings":"AAGC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,EAAE,cAAc,CAAC,OAAO,EAAE,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;CAAG;AAkDzI,QAAA,MAAM,IAAI,qDAAwC,CAAC;AACnD,KAAK,IAAI,GAAG,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC;AACpC,eAAe,IAAI,CAAC"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
|
-
import type { PropsWithElement } from '../../../internal/props-with-element';
|
|
3
2
|
import type { HTMLAttributes } from '../../../internal/html-attributes';
|
|
3
|
+
import type { PropsWithElement } from '../../../internal/props-with-element';
|
|
4
4
|
|
|
5
5
|
export interface SwitchThumbProps extends PropsWithElement<'span'>, HTMLAttributes<'span'> {}
|
|
6
6
|
</script>
|
|
7
7
|
|
|
8
8
|
<script lang="ts">
|
|
9
|
-
import { mergeProps } from '@zag-js/svelte';
|
|
10
9
|
import { classesSwitch } from '@skeletonlabs/skeleton-common';
|
|
10
|
+
import { mergeProps } from '@zag-js/svelte';
|
|
11
|
+
|
|
11
12
|
import { SwitchRootContext } from '../modules/root-context';
|
|
12
13
|
|
|
13
14
|
const props: SwitchThumbProps = $props();
|
|
@@ -18,8 +19,8 @@
|
|
|
18
19
|
|
|
19
20
|
const attributes = $derived(
|
|
20
21
|
mergeProps(switch_().getThumbProps(), rest, {
|
|
21
|
-
class: classesSwitch.thumb
|
|
22
|
-
})
|
|
22
|
+
class: classesSwitch.thumb,
|
|
23
|
+
}),
|
|
23
24
|
);
|
|
24
25
|
</script>
|
|
25
26
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { PropsWithElement } from '../../../internal/props-with-element';
|
|
2
1
|
import type { HTMLAttributes } from '../../../internal/html-attributes';
|
|
2
|
+
import type { PropsWithElement } from '../../../internal/props-with-element';
|
|
3
3
|
export interface SwitchThumbProps extends PropsWithElement<'span'>, HTMLAttributes<'span'> {
|
|
4
4
|
}
|
|
5
5
|
declare const Thumb: import("svelte").Component<SwitchThumbProps, {}, "">;
|
|
6
6
|
type Thumb = ReturnType<typeof Thumb>;
|
|
7
7
|
export default Thumb;
|
|
8
|
+
//# sourceMappingURL=thumb.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thumb.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/switch/anatomy/thumb.svelte.ts"],"names":[],"mappings":"AAGC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB,CAAC,MAAM,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC;CAAG;AAuC9F,QAAA,MAAM,KAAK,sDAAwC,CAAC;AACpD,KAAK,KAAK,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC;AACtC,eAAe,KAAK,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export type { SwitchControlProps } from './anatomy/control.svelte';
|
|
2
|
+
export type { SwitchHiddenInputProps } from './anatomy/hidden-input.svelte';
|
|
3
|
+
export type { SwitchLabelProps } from './anatomy/label.svelte';
|
|
3
4
|
export type { SwitchRootProps } from './anatomy/root.svelte';
|
|
4
|
-
export type { SwitchRootProviderProps } from './anatomy/root-provider.svelte';
|
|
5
5
|
export type { SwitchRootContextProps } from './anatomy/root-context.svelte';
|
|
6
|
-
export type {
|
|
7
|
-
export type { SwitchControlProps } from './anatomy/control.svelte';
|
|
6
|
+
export type { SwitchRootProviderProps } from './anatomy/root-provider.svelte';
|
|
8
7
|
export type { SwitchThumbProps } from './anatomy/thumb.svelte';
|
|
9
|
-
export
|
|
8
|
+
export { Switch } from './modules/anatomy';
|
|
9
|
+
export { useSwitch } from './modules/use-switch.svelte';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/switch/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,YAAY,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC5E,YAAY,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,YAAY,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,YAAY,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC5E,YAAY,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAC9E,YAAY,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -6,3 +6,4 @@ export declare const Switch: import("svelte").Component<import("../anatomy/root.
|
|
|
6
6
|
Label: import("svelte").Component<import("../anatomy/label.svelte").SwitchLabelProps, {}, "">;
|
|
7
7
|
HiddenInput: import("svelte").Component<import("../anatomy/hidden-input.svelte").SwitchHiddenInputProps, {}, "">;
|
|
8
8
|
};
|
|
9
|
+
//# sourceMappingURL=anatomy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anatomy.d.ts","sourceRoot":"","sources":["../../../../src/components/switch/modules/anatomy.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,MAAM;;;;;;;CAOjB,CAAC"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
+
import Control from '../anatomy/control.svelte';
|
|
2
|
+
import HiddenInput from '../anatomy/hidden-input.svelte';
|
|
3
|
+
import Label from '../anatomy/label.svelte';
|
|
1
4
|
import Root from '../anatomy/root.svelte';
|
|
2
|
-
import RootProvider from '../anatomy/root-provider.svelte';
|
|
3
5
|
import RootContext from '../anatomy/root-context.svelte';
|
|
4
|
-
import
|
|
6
|
+
import RootProvider from '../anatomy/root-provider.svelte';
|
|
5
7
|
import Thumb from '../anatomy/thumb.svelte';
|
|
6
|
-
import Label from '../anatomy/label.svelte';
|
|
7
|
-
import HiddenInput from '../anatomy/hidden-input.svelte';
|
|
8
8
|
export const Switch = Object.assign(Root, {
|
|
9
9
|
Provider: RootProvider,
|
|
10
10
|
Context: RootContext,
|
|
11
11
|
Control: Control,
|
|
12
12
|
Thumb: Thumb,
|
|
13
13
|
Label: Label,
|
|
14
|
-
HiddenInput: HiddenInput
|
|
14
|
+
HiddenInput: HiddenInput,
|
|
15
15
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"root-context.d.ts","sourceRoot":"","sources":["../../../../src/components/switch/modules/root-context.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB;;;;CAAgD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-switch.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/switch/modules/use-switch.svelte.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,GAAG,EAAoB,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAExE,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,CAAC,MAAM,KAAK,CAAC,GAAG,MAAM,GAAG,CAIjE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { normalizeProps, useMachine } from '@zag-js/svelte';
|
|
1
2
|
import { connect, machine } from '@zag-js/switch';
|
|
2
|
-
import { useMachine, normalizeProps } from '@zag-js/svelte';
|
|
3
3
|
export function useSwitch(props) {
|
|
4
4
|
const service = useMachine(machine, props);
|
|
5
5
|
const switch_ = $derived(connect(service, normalizeProps));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
2
|
import type { ContentProps } from '@zag-js/tabs';
|
|
3
|
+
|
|
3
4
|
import type { HTMLAttributes } from '../../../internal/html-attributes';
|
|
4
5
|
import type { PropsWithElement } from '../../../internal/props-with-element';
|
|
5
6
|
|
|
@@ -7,11 +8,12 @@
|
|
|
7
8
|
</script>
|
|
8
9
|
|
|
9
10
|
<script lang="ts">
|
|
10
|
-
import { TabsRootContext } from '../modules/root-context';
|
|
11
|
-
import { mergeProps } from '@zag-js/svelte';
|
|
12
11
|
import { classesTabs } from '@skeletonlabs/skeleton-common';
|
|
12
|
+
import { mergeProps } from '@zag-js/svelte';
|
|
13
13
|
import { splitContentProps } from '@zag-js/tabs';
|
|
14
14
|
|
|
15
|
+
import { TabsRootContext } from '../modules/root-context';
|
|
16
|
+
|
|
15
17
|
const props: TabsContentProps = $props();
|
|
16
18
|
|
|
17
19
|
const tabs = TabsRootContext.consume();
|
|
@@ -21,8 +23,8 @@
|
|
|
21
23
|
|
|
22
24
|
const attributes = $derived(
|
|
23
25
|
mergeProps(tabs().getContentProps(contentProps), rest, {
|
|
24
|
-
class: classesTabs.content
|
|
25
|
-
})
|
|
26
|
+
class: classesTabs.content,
|
|
27
|
+
}),
|
|
26
28
|
);
|
|
27
29
|
</script>
|
|
28
30
|
|
|
@@ -6,3 +6,4 @@ export interface TabsContentProps extends ContentProps, PropsWithElement<'div'>,
|
|
|
6
6
|
declare const Content: import("svelte").Component<TabsContentProps, {}, "">;
|
|
7
7
|
type Content = ReturnType<typeof Content>;
|
|
8
8
|
export default Content;
|
|
9
|
+
//# sourceMappingURL=content.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/tabs/anatomy/content.svelte.ts"],"names":[],"mappings":"AAGC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,MAAM,WAAW,gBAAiB,SAAQ,YAAY,EAAE,gBAAgB,CAAC,KAAK,CAAC,EAAE,cAAc,CAAC,KAAK,CAAC;CAAG;AA0C1G,QAAA,MAAM,OAAO,sDAAwC,CAAC;AACtD,KAAK,OAAO,GAAG,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC;AAC1C,eAAe,OAAO,CAAC"}
|