ui-ingredients 0.0.25 → 0.0.27
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +80 -80
- package/dist/accordion/item-content.svelte +13 -7
- package/dist/accordion/item-indicator.svelte +13 -7
- package/dist/accordion/item-trigger.svelte +13 -7
- package/dist/accordion/item.svelte +11 -6
- package/dist/accordion/root.svelte +11 -5
- package/dist/avatar/fallback.svelte +13 -7
- package/dist/avatar/image.svelte +11 -5
- package/dist/avatar/root.svelte +11 -13
- package/dist/carousel/indicator-group.svelte +13 -7
- package/dist/carousel/indicator.svelte +13 -7
- package/dist/carousel/item-group.svelte +13 -7
- package/dist/carousel/item.svelte +12 -8
- package/dist/carousel/next-trigger.svelte +13 -7
- package/dist/carousel/prev-trigger.svelte +13 -7
- package/dist/carousel/root.svelte +11 -5
- package/dist/carousel/viewport.svelte +13 -7
- package/dist/checkbox/control.svelte +13 -7
- package/dist/checkbox/hidden-input.svelte +1 -1
- package/dist/checkbox/indicator.svelte +13 -7
- package/dist/checkbox/label.svelte +13 -7
- package/dist/checkbox/root.svelte +11 -5
- package/dist/clipboard/control.svelte +13 -7
- package/dist/clipboard/indicator.svelte +13 -7
- package/dist/clipboard/input.svelte +11 -5
- package/dist/clipboard/label.svelte +13 -7
- package/dist/clipboard/root.svelte +11 -5
- package/dist/clipboard/trigger.svelte +13 -7
- package/dist/collapsible/content.svelte +13 -7
- package/dist/collapsible/root.svelte +12 -6
- package/dist/collapsible/trigger.svelte +13 -7
- package/dist/color-picker/area-background.svelte +21 -0
- package/dist/color-picker/area-background.svelte.d.ts +18 -0
- package/dist/color-picker/area-thumb.svelte +21 -0
- package/dist/color-picker/area-thumb.svelte.d.ts +18 -0
- package/dist/color-picker/area.svelte +27 -0
- package/dist/color-picker/area.svelte.d.ts +18 -0
- package/dist/color-picker/channel-input.svelte +28 -0
- package/dist/color-picker/channel-input.svelte.d.ts +18 -0
- package/dist/color-picker/channel-slider-label.svelte +25 -0
- package/dist/color-picker/channel-slider-label.svelte.d.ts +18 -0
- package/dist/color-picker/channel-slider-thumb.svelte +23 -0
- package/dist/color-picker/channel-slider-thumb.svelte.d.ts +18 -0
- package/dist/color-picker/channel-slider-track.svelte +23 -0
- package/dist/color-picker/channel-slider-track.svelte.d.ts +18 -0
- package/dist/color-picker/channel-slider-value-text.svelte +29 -0
- package/dist/color-picker/channel-slider-value-text.svelte.d.ts +18 -0
- package/dist/color-picker/channel-slider.svelte +29 -0
- package/dist/color-picker/channel-slider.svelte.d.ts +18 -0
- package/dist/color-picker/color-picker.d.ts +26 -0
- package/dist/color-picker/color-picker.js +26 -0
- package/dist/color-picker/content.svelte +20 -0
- package/dist/color-picker/content.svelte.d.ts +18 -0
- package/dist/color-picker/context.svelte.d.ts +8 -0
- package/dist/color-picker/context.svelte.js +6 -0
- package/dist/color-picker/control.svelte +20 -0
- package/dist/color-picker/control.svelte.d.ts +18 -0
- package/dist/color-picker/create-color-picker.svelte.d.ts +9 -0
- package/dist/color-picker/create-color-picker.svelte.js +20 -0
- package/dist/color-picker/eye-dropper-trigger.svelte +20 -0
- package/dist/color-picker/eye-dropper-trigger.svelte.d.ts +18 -0
- package/dist/color-picker/format-select.svelte +28 -0
- package/dist/color-picker/format-select.svelte.d.ts +18 -0
- package/dist/color-picker/format-trigger.svelte +20 -0
- package/dist/color-picker/format-trigger.svelte.d.ts +18 -0
- package/dist/color-picker/hidden-input.svelte +18 -0
- package/dist/color-picker/hidden-input.svelte.d.ts +18 -0
- package/dist/color-picker/index.d.ts +26 -0
- package/dist/color-picker/index.js +1 -0
- package/dist/color-picker/label.svelte +20 -0
- package/dist/color-picker/label.svelte.d.ts +18 -0
- package/dist/color-picker/positioner.svelte +20 -0
- package/dist/color-picker/positioner.svelte.d.ts +18 -0
- package/dist/color-picker/root.svelte +75 -0
- package/dist/color-picker/root.svelte.d.ts +18 -0
- package/dist/color-picker/swatch-group.svelte +20 -0
- package/dist/color-picker/swatch-group.svelte.d.ts +18 -0
- package/dist/color-picker/swatch-indicator.svelte +21 -0
- package/dist/color-picker/swatch-indicator.svelte.d.ts +18 -0
- package/dist/color-picker/swatch-trigger.svelte +31 -0
- package/dist/color-picker/swatch-trigger.svelte.d.ts +18 -0
- package/dist/color-picker/swatch.svelte +27 -0
- package/dist/color-picker/swatch.svelte.d.ts +18 -0
- package/dist/color-picker/transparency-grid.svelte +29 -0
- package/dist/color-picker/transparency-grid.svelte.d.ts +18 -0
- package/dist/color-picker/trigger.svelte +20 -0
- package/dist/color-picker/trigger.svelte.d.ts +18 -0
- package/dist/color-picker/value-text.svelte +24 -0
- package/dist/color-picker/value-text.svelte.d.ts +18 -0
- package/dist/combobox/clear-trigger.svelte +13 -7
- package/dist/combobox/content.svelte +13 -7
- package/dist/combobox/control.svelte +13 -7
- package/dist/combobox/input.svelte +11 -5
- package/dist/combobox/item-group-label.svelte +13 -7
- package/dist/combobox/item-group.svelte +13 -8
- package/dist/combobox/item-indicator.svelte +13 -7
- package/dist/combobox/item-text.svelte +17 -11
- package/dist/combobox/item.svelte +11 -6
- package/dist/combobox/label.svelte +13 -7
- package/dist/combobox/list.svelte +13 -7
- package/dist/combobox/positioner.svelte +13 -7
- package/dist/combobox/root.svelte +11 -5
- package/dist/combobox/trigger.svelte +13 -7
- package/dist/date-picker/clear-trigger.svelte +13 -7
- package/dist/date-picker/content.svelte +13 -7
- package/dist/date-picker/control.svelte +13 -7
- package/dist/date-picker/create-date-picker.svelte.d.ts +2 -0
- package/dist/date-picker/create-date-picker.svelte.js +11 -1
- package/dist/date-picker/day-table-cell-trigger.svelte +13 -7
- package/dist/date-picker/day-table-cell.svelte +13 -14
- package/dist/date-picker/input.svelte +11 -5
- package/dist/date-picker/label.svelte +13 -7
- package/dist/date-picker/month-select.svelte +19 -13
- package/dist/date-picker/month-table-cell-trigger.svelte +13 -7
- package/dist/date-picker/month-table-cell.svelte +13 -14
- package/dist/date-picker/next-trigger.svelte +13 -7
- package/dist/date-picker/positioner.svelte +13 -7
- package/dist/date-picker/preset-trigger.svelte +13 -7
- package/dist/date-picker/prev-trigger.svelte +13 -7
- package/dist/date-picker/range-text.svelte +17 -11
- package/dist/date-picker/root.svelte +11 -5
- package/dist/date-picker/table-body.svelte +13 -7
- package/dist/date-picker/table-head.svelte +13 -7
- package/dist/date-picker/table-header.svelte +13 -7
- package/dist/date-picker/table-row.svelte +13 -7
- package/dist/date-picker/table.svelte +13 -7
- package/dist/date-picker/trigger.svelte +13 -7
- package/dist/date-picker/view-control.svelte +13 -7
- package/dist/date-picker/view-trigger.svelte +13 -7
- package/dist/date-picker/view.svelte +21 -9
- package/dist/date-picker/year-select.svelte +19 -13
- package/dist/date-picker/year-table-cell-trigger.svelte +13 -7
- package/dist/date-picker/year-table-cell.svelte +13 -14
- package/dist/dialog/backdrop.svelte +13 -7
- package/dist/dialog/close-trigger.svelte +13 -7
- package/dist/dialog/content.svelte +13 -7
- package/dist/dialog/description.svelte +13 -7
- package/dist/dialog/positioner.svelte +14 -7
- package/dist/dialog/title.svelte +13 -7
- package/dist/dialog/trigger.svelte +13 -7
- package/dist/editable/area.svelte +13 -7
- package/dist/editable/cancel-trigger.svelte +13 -7
- package/dist/editable/control.svelte +13 -7
- package/dist/editable/edit-trigger.svelte +13 -7
- package/dist/editable/input.svelte +11 -5
- package/dist/editable/label.svelte +13 -7
- package/dist/editable/preview.svelte +17 -11
- package/dist/editable/root.svelte +73 -4
- package/dist/editable/submit-trigger.svelte +13 -7
- package/dist/file-upload/dropzone.svelte +13 -7
- package/dist/file-upload/hidden-input.svelte +1 -1
- package/dist/file-upload/item-delete-trigger.svelte +13 -7
- package/dist/file-upload/item-group.svelte +13 -7
- package/dist/file-upload/item-name.svelte +17 -11
- package/dist/file-upload/item-preview-image.svelte +11 -5
- package/dist/file-upload/item-preview.svelte +13 -7
- package/dist/file-upload/item-size-text.svelte +17 -11
- package/dist/file-upload/item.svelte +13 -7
- package/dist/file-upload/label.svelte +13 -7
- package/dist/file-upload/root.svelte +11 -5
- package/dist/file-upload/trigger.svelte +13 -7
- package/dist/hover-card/arrow-tip.svelte +13 -7
- package/dist/hover-card/arrow.svelte +13 -7
- package/dist/hover-card/content.svelte +13 -7
- package/dist/hover-card/positioner.svelte +13 -7
- package/dist/hover-card/trigger.svelte +13 -7
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/menu/arrow-tip.svelte +13 -7
- package/dist/menu/arrow.svelte +13 -7
- package/dist/menu/content.svelte +13 -7
- package/dist/menu/context-trigger.svelte +13 -7
- package/dist/menu/indicator.svelte +13 -7
- package/dist/menu/item-group-label.svelte +13 -7
- package/dist/menu/item-group.svelte +13 -9
- package/dist/menu/item.svelte +12 -6
- package/dist/menu/option-item-indicator.svelte +13 -7
- package/dist/menu/option-item-text.svelte +17 -11
- package/dist/menu/option-item.svelte +11 -5
- package/dist/menu/positioner.svelte +13 -7
- package/dist/menu/separator.svelte +13 -7
- package/dist/menu/trigger-item.svelte +13 -7
- package/dist/menu/trigger.svelte +13 -7
- package/dist/number-input/control.svelte +13 -7
- package/dist/number-input/decrement-trigger.svelte +13 -7
- package/dist/number-input/increment-trigger.svelte +13 -7
- package/dist/number-input/input.svelte +11 -5
- package/dist/number-input/label.svelte +13 -7
- package/dist/number-input/root.svelte +11 -5
- package/dist/number-input/scrubber.svelte +13 -7
- package/dist/pagination/ellipsis.svelte +13 -7
- package/dist/pagination/item.svelte +13 -7
- package/dist/pagination/next-trigger.svelte +13 -7
- package/dist/pagination/prev-trigger.svelte +13 -7
- package/dist/pagination/root.svelte +11 -5
- package/dist/pin-input/anatomy.js +3 -0
- package/dist/pin-input/clear-trigger.svelte +18 -13
- package/dist/pin-input/create-pin-input.svelte.d.ts +2 -0
- package/dist/pin-input/create-pin-input.svelte.js +13 -1
- package/dist/pin-input/hidden-input.svelte +1 -1
- package/dist/pin-input/input.svelte +11 -5
- package/dist/pin-input/label.svelte +13 -7
- package/dist/pin-input/pin-input.d.ts +1 -1
- package/dist/pin-input/pin-input.js +1 -1
- package/dist/pin-input/root.svelte +11 -5
- package/dist/popover/arrow-tip.svelte +13 -7
- package/dist/popover/arrow.svelte +13 -7
- package/dist/popover/close-trigger.svelte +13 -7
- package/dist/popover/content.svelte +13 -7
- package/dist/popover/description.svelte +13 -7
- package/dist/popover/positioner.svelte +13 -7
- package/dist/popover/title.svelte +13 -7
- package/dist/popover/trigger.svelte +13 -7
- package/dist/presence/context.svelte.d.ts +3 -0
- package/dist/presence/context.svelte.js +2 -0
- package/dist/presence/create-presence.svelte.d.ts +11 -4
- package/dist/presence/create-presence.svelte.js +19 -3
- package/dist/presence/root.svelte +9 -9
- package/dist/presence/root.svelte.d.ts +1 -1
- package/dist/progress/circle-range.svelte +13 -7
- package/dist/progress/circle-track.svelte +13 -7
- package/dist/progress/circle.svelte +13 -7
- package/dist/progress/label.svelte +13 -7
- package/dist/progress/range.svelte +13 -7
- package/dist/progress/root.svelte +11 -5
- package/dist/progress/track.svelte +13 -7
- package/dist/progress/value-text.svelte +17 -11
- package/dist/progress/view.svelte +13 -7
- package/dist/qr-code/frame.svelte +13 -7
- package/dist/qr-code/overlay.svelte +13 -7
- package/dist/qr-code/pattern.svelte +13 -7
- package/dist/qr-code/root.svelte +11 -5
- package/dist/radio-group/indicator.svelte +13 -7
- package/dist/radio-group/item-control.svelte +13 -7
- package/dist/radio-group/item-hidden-input.svelte +1 -1
- package/dist/radio-group/item-text.svelte +13 -7
- package/dist/radio-group/item.svelte +11 -13
- package/dist/radio-group/label.svelte +13 -7
- package/dist/radio-group/root.svelte +11 -5
- package/dist/rating-group/control.svelte +15 -9
- package/dist/rating-group/hidden-input.svelte +1 -1
- package/dist/rating-group/item.svelte +14 -9
- package/dist/rating-group/label.svelte +15 -9
- package/dist/rating-group/root.svelte +15 -9
- package/dist/segment-group/indicator.svelte +13 -8
- package/dist/segment-group/item-control.svelte +13 -8
- package/dist/segment-group/item-hidden-input.svelte +1 -1
- package/dist/segment-group/item-text.svelte +13 -8
- package/dist/segment-group/item.svelte +11 -6
- package/dist/segment-group/label.svelte +13 -8
- package/dist/segment-group/root.svelte +11 -6
- package/dist/select/clear-trigger.svelte +13 -7
- package/dist/select/content.svelte +13 -7
- package/dist/select/control.svelte +13 -7
- package/dist/select/hidden-select.svelte +1 -1
- package/dist/select/indicator.svelte +13 -7
- package/dist/select/item-group-label.svelte +13 -7
- package/dist/select/item-group.svelte +13 -8
- package/dist/select/item-indicator.svelte +13 -7
- package/dist/select/item-text.svelte +17 -11
- package/dist/select/item.svelte +11 -6
- package/dist/select/label.svelte +13 -7
- package/dist/select/list.svelte +13 -7
- package/dist/select/positioner.svelte +13 -7
- package/dist/select/root.svelte +12 -6
- package/dist/select/trigger.svelte +13 -7
- package/dist/select/value-text.svelte +19 -13
- package/dist/signature-pad/clear-trigger.svelte +13 -7
- package/dist/signature-pad/control.svelte +13 -7
- package/dist/signature-pad/current-segment-path.svelte +13 -7
- package/dist/signature-pad/guide.svelte +13 -7
- package/dist/signature-pad/hidden-input.svelte +1 -1
- package/dist/signature-pad/label.svelte +13 -7
- package/dist/signature-pad/root.svelte +11 -5
- package/dist/signature-pad/segment-path.svelte +13 -7
- package/dist/signature-pad/segment.svelte +13 -7
- package/dist/slider/control.svelte +13 -7
- package/dist/slider/hidden-input.svelte +1 -1
- package/dist/slider/label.svelte +13 -7
- package/dist/slider/marker-group.svelte +13 -7
- package/dist/slider/marker.svelte +13 -7
- package/dist/slider/range.svelte +13 -7
- package/dist/slider/root.svelte +11 -5
- package/dist/slider/thumb.svelte +13 -7
- package/dist/slider/track.svelte +13 -7
- package/dist/slider/value-text.svelte +17 -11
- package/dist/splitter/panel.svelte +13 -7
- package/dist/splitter/resize-trigger.svelte +11 -6
- package/dist/splitter/root.svelte +11 -5
- package/dist/steps/completed-content.svelte +13 -7
- package/dist/steps/content.svelte +13 -7
- package/dist/steps/indicator.svelte +13 -7
- package/dist/steps/item.svelte +11 -6
- package/dist/steps/list.svelte +13 -7
- package/dist/steps/next-trigger.svelte +13 -7
- package/dist/steps/prev-trigger.svelte +13 -7
- package/dist/steps/progress.svelte +13 -7
- package/dist/steps/root.svelte +12 -6
- package/dist/steps/separator.svelte +13 -7
- package/dist/steps/trigger.svelte +13 -7
- package/dist/switch/control.svelte +13 -7
- package/dist/switch/hidden-input.svelte +1 -1
- package/dist/switch/label.svelte +13 -7
- package/dist/switch/root.svelte +11 -5
- package/dist/switch/thumb.svelte +13 -7
- package/dist/tabs/content.svelte +13 -7
- package/dist/tabs/list.svelte +13 -7
- package/dist/tabs/root.svelte +12 -6
- package/dist/tabs/trigger.svelte +13 -7
- package/dist/tags-input/clear-trigger.svelte +13 -7
- package/dist/tags-input/control.svelte +13 -7
- package/dist/tags-input/hidden-input.svelte +1 -1
- package/dist/tags-input/input.svelte +11 -5
- package/dist/tags-input/item-delete-trigger.svelte +13 -7
- package/dist/tags-input/item-input.svelte +11 -5
- package/dist/tags-input/item-preview.svelte +13 -7
- package/dist/tags-input/item-text.svelte +13 -7
- package/dist/tags-input/item.svelte +11 -13
- package/dist/tags-input/label.svelte +13 -7
- package/dist/tags-input/root.svelte +12 -6
- package/dist/time-picker/clear-trigger.svelte +13 -7
- package/dist/time-picker/column.svelte +13 -7
- package/dist/time-picker/content.svelte +13 -7
- package/dist/time-picker/control.svelte +13 -7
- package/dist/time-picker/hour-cell.svelte +13 -7
- package/dist/time-picker/input.svelte +11 -5
- package/dist/time-picker/label.svelte +13 -7
- package/dist/time-picker/minute-cell.svelte +13 -7
- package/dist/time-picker/period-cell.svelte +13 -7
- package/dist/time-picker/positioner.svelte +13 -7
- package/dist/time-picker/root.svelte +11 -5
- package/dist/time-picker/second-cell.svelte +13 -7
- package/dist/time-picker/spacer.svelte +13 -7
- package/dist/time-picker/trigger.svelte +13 -7
- package/dist/timer/action-trigger.svelte +13 -8
- package/dist/timer/item-label.svelte +13 -7
- package/dist/timer/item-value.svelte +17 -11
- package/dist/timer/item.svelte +13 -7
- package/dist/timer/root.svelte +11 -5
- package/dist/timer/separator.svelte +13 -7
- package/dist/toast/action-trigger.svelte +13 -7
- package/dist/toast/actor.svelte +6 -6
- package/dist/toast/actor.svelte.d.ts +3 -3
- package/dist/toast/close-trigger.svelte +13 -7
- package/dist/toast/description.svelte +17 -11
- package/dist/toast/ghost-after.svelte +18 -0
- package/dist/toast/ghost-after.svelte.d.ts +18 -0
- package/dist/toast/ghost-before.svelte +18 -0
- package/dist/toast/ghost-before.svelte.d.ts +18 -0
- package/dist/toast/index.d.ts +2 -0
- package/dist/toast/root.svelte +16 -14
- package/dist/toast/title.svelte +17 -11
- package/dist/toast/toast.d.ts +2 -0
- package/dist/toast/toast.js +2 -0
- package/dist/toast/toaster.svelte +6 -5
- package/dist/toggle-group/item.svelte +11 -6
- package/dist/toggle-group/root.svelte +12 -6
- package/dist/tooltip/arrow-tip.svelte +13 -7
- package/dist/tooltip/arrow.svelte +13 -7
- package/dist/tooltip/content.svelte +13 -7
- package/dist/tooltip/positioner.svelte +13 -7
- package/dist/tooltip/trigger.svelte +13 -7
- package/dist/tree-view/branch-content.svelte +13 -7
- package/dist/tree-view/branch-control.svelte +13 -7
- package/dist/tree-view/branch-indicator.svelte +13 -7
- package/dist/tree-view/branch-text.svelte +13 -7
- package/dist/tree-view/branch-trigger.svelte +13 -7
- package/dist/tree-view/branch.svelte +11 -13
- package/dist/tree-view/item-indicator.svelte +13 -7
- package/dist/tree-view/item-text.svelte +13 -7
- package/dist/tree-view/item.svelte +11 -13
- package/dist/tree-view/label.svelte +13 -7
- package/dist/tree-view/root.svelte +12 -6
- package/dist/tree-view/tree.svelte +13 -7
- package/dist/types.d.ts +8 -1
- package/dist/utils.svelte.d.ts +2 -5
- package/dist/utils.svelte.js +9 -9
- package/package.json +4 -3
- package/dist/color-picker/.gitkeep +0 -0
@@ -1,16 +1,17 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {Assign, HtmlProps} from '../types.js';
|
2
|
+
import type {AsChild, Assign, GenericHtmlProps, HtmlProps} from '../types.js';
|
3
3
|
import type {Snippet} from 'svelte';
|
4
4
|
import type {CreateCarouselProps, CreateCarouselReturn} from './create-carousel.svelte.js';
|
5
5
|
|
6
6
|
export interface CarouselProps
|
7
7
|
extends Assign<Omit<HtmlProps<'div'>, 'children'>, CreateCarouselProps> {
|
8
|
+
asChild?: AsChild<GenericHtmlProps, CreateCarouselReturn>;
|
8
9
|
children?: Snippet<[carousel: CreateCarouselReturn]>;
|
9
10
|
}
|
10
11
|
</script>
|
11
12
|
|
12
13
|
<script lang="ts">
|
13
|
-
import {mergeProps} from '
|
14
|
+
import {mergeProps} from '../utils.svelte.js';
|
14
15
|
import {carouselContext} from './context.svelte.js';
|
15
16
|
import {createCarousel} from './create-carousel.svelte.js';
|
16
17
|
|
@@ -24,6 +25,7 @@
|
|
24
25
|
orientation,
|
25
26
|
slidesPerView,
|
26
27
|
onIndexChange,
|
28
|
+
asChild,
|
27
29
|
children,
|
28
30
|
...props
|
29
31
|
}: CarouselProps = $props();
|
@@ -45,6 +47,10 @@
|
|
45
47
|
carouselContext.set(carousel);
|
46
48
|
</script>
|
47
49
|
|
48
|
-
|
49
|
-
{@render
|
50
|
-
|
50
|
+
{#if asChild}
|
51
|
+
{@render asChild(attrs, carousel)}
|
52
|
+
{:else}
|
53
|
+
<div {...attrs}>
|
54
|
+
{@render children?.(carousel)}
|
55
|
+
</div>
|
56
|
+
{/if}
|
@@ -1,20 +1,26 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {HtmlProps} from '../types.js';
|
2
|
+
import type {AsChild, HtmlProps} from '../types.js';
|
3
3
|
|
4
|
-
export interface CarouselViewportProps extends HtmlProps<'div'> {
|
4
|
+
export interface CarouselViewportProps extends HtmlProps<'div'> {
|
5
|
+
asChild?: AsChild;
|
6
|
+
}
|
5
7
|
</script>
|
6
8
|
|
7
9
|
<script lang="ts">
|
8
|
-
import {mergeProps} from '
|
10
|
+
import {mergeProps} from '../utils.svelte.js';
|
9
11
|
import {carouselContext} from './context.svelte.js';
|
10
12
|
|
11
|
-
let {children, ...props}: CarouselViewportProps = $props();
|
13
|
+
let {asChild, children, ...props}: CarouselViewportProps = $props();
|
12
14
|
|
13
15
|
let carousel = carouselContext.get();
|
14
16
|
|
15
17
|
let attrs = $derived(mergeProps(props, carousel.getViewportProps()));
|
16
18
|
</script>
|
17
19
|
|
18
|
-
|
19
|
-
{@render
|
20
|
-
|
20
|
+
{#if asChild}
|
21
|
+
{@render asChild(attrs)}
|
22
|
+
{:else}
|
23
|
+
<div {...attrs}>
|
24
|
+
{@render children?.()}
|
25
|
+
</div>
|
26
|
+
{/if}
|
@@ -1,20 +1,26 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {HtmlProps} from '../types.js';
|
2
|
+
import type {AsChild, HtmlProps} from '../types.js';
|
3
3
|
|
4
|
-
export interface CheckboxControlProps extends HtmlProps<'div'> {
|
4
|
+
export interface CheckboxControlProps extends HtmlProps<'div'> {
|
5
|
+
asChild?: AsChild;
|
6
|
+
}
|
5
7
|
</script>
|
6
8
|
|
7
9
|
<script lang="ts">
|
8
|
-
import {mergeProps} from '
|
10
|
+
import {mergeProps} from '../utils.svelte.js';
|
9
11
|
import {checkboxContext} from './context.svelte.js';
|
10
12
|
|
11
|
-
let {children, ...props}: CheckboxControlProps = $props();
|
13
|
+
let {asChild, children, ...props}: CheckboxControlProps = $props();
|
12
14
|
|
13
15
|
let checkbox = checkboxContext.get();
|
14
16
|
|
15
17
|
let attrs = $derived(mergeProps(props, checkbox.getControlProps()));
|
16
18
|
</script>
|
17
19
|
|
18
|
-
|
19
|
-
{@render
|
20
|
-
|
20
|
+
{#if asChild}
|
21
|
+
{@render asChild(attrs)}
|
22
|
+
{:else}
|
23
|
+
<div {...attrs}>
|
24
|
+
{@render children?.()}
|
25
|
+
</div>
|
26
|
+
{/if}
|
@@ -1,20 +1,26 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {HtmlProps} from '../types.js';
|
2
|
+
import type {AsChild, HtmlProps} from '../types.js';
|
3
3
|
|
4
|
-
export interface CheckboxIndicatorProps extends HtmlProps<'
|
4
|
+
export interface CheckboxIndicatorProps extends HtmlProps<'div'> {
|
5
|
+
asChild?: AsChild;
|
6
|
+
}
|
5
7
|
</script>
|
6
8
|
|
7
9
|
<script lang="ts">
|
8
|
-
import {mergeProps} from '
|
10
|
+
import {mergeProps} from '../utils.svelte.js';
|
9
11
|
import {checkboxContext} from './context.svelte.js';
|
10
12
|
|
11
|
-
let {children, ...props}: CheckboxIndicatorProps = $props();
|
13
|
+
let {asChild, children, ...props}: CheckboxIndicatorProps = $props();
|
12
14
|
|
13
15
|
let checkbox = checkboxContext.get();
|
14
16
|
|
15
17
|
let attrs = $derived(mergeProps(props, checkbox.getIndicatorProps()));
|
16
18
|
</script>
|
17
19
|
|
18
|
-
|
19
|
-
{@render
|
20
|
-
|
20
|
+
{#if asChild}
|
21
|
+
{@render asChild(attrs)}
|
22
|
+
{:else}
|
23
|
+
<div {...attrs}>
|
24
|
+
{@render children?.()}
|
25
|
+
</div>
|
26
|
+
{/if}
|
@@ -1,20 +1,26 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {HtmlProps} from '../types.js';
|
2
|
+
import type {AsChild, HtmlProps} from '../types.js';
|
3
3
|
|
4
|
-
export interface CheckboxLabelProps extends HtmlProps<'span'> {
|
4
|
+
export interface CheckboxLabelProps extends HtmlProps<'span'> {
|
5
|
+
asChild?: AsChild;
|
6
|
+
}
|
5
7
|
</script>
|
6
8
|
|
7
9
|
<script lang="ts">
|
8
|
-
import {mergeProps} from '
|
10
|
+
import {mergeProps} from '../utils.svelte.js';
|
9
11
|
import {checkboxContext} from './context.svelte.js';
|
10
12
|
|
11
|
-
let {children, ...props}: CheckboxLabelProps = $props();
|
13
|
+
let {asChild, children, ...props}: CheckboxLabelProps = $props();
|
12
14
|
|
13
15
|
let checkbox = checkboxContext.get();
|
14
16
|
|
15
17
|
let attrs = $derived(mergeProps(props, checkbox.getLabelProps()));
|
16
18
|
</script>
|
17
19
|
|
18
|
-
|
19
|
-
{@render
|
20
|
-
|
20
|
+
{#if asChild}
|
21
|
+
{@render asChild(attrs)}
|
22
|
+
{:else}
|
23
|
+
<span {...attrs}>
|
24
|
+
{@render children?.()}
|
25
|
+
</span>
|
26
|
+
{/if}
|
@@ -1,16 +1,17 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {Assign, HtmlProps} from '../types.js';
|
2
|
+
import type {AsChild, Assign, HtmlProps} from '../types.js';
|
3
3
|
import type {Snippet} from 'svelte';
|
4
4
|
import type {CreateCheckboxProps, CreateCheckboxReturn} from './create-checkbox.svelte.js';
|
5
5
|
|
6
6
|
export interface CheckboxProps
|
7
7
|
extends Assign<Omit<HtmlProps<'label'>, 'children'>, CreateCheckboxProps> {
|
8
|
+
asChild?: AsChild<HtmlProps<'label'>, CreateCheckboxReturn>;
|
8
9
|
children?: Snippet<[checkbox: CreateCheckboxReturn]>;
|
9
10
|
}
|
10
11
|
</script>
|
11
12
|
|
12
13
|
<script lang="ts">
|
13
|
-
import {mergeProps} from '
|
14
|
+
import {mergeProps} from '../utils.svelte.js';
|
14
15
|
import {checkboxContext} from './context.svelte.js';
|
15
16
|
import {createCheckbox} from './create-checkbox.svelte.js';
|
16
17
|
|
@@ -26,6 +27,7 @@
|
|
26
27
|
readOnly,
|
27
28
|
required,
|
28
29
|
onCheckedChange,
|
30
|
+
asChild,
|
29
31
|
children,
|
30
32
|
...props
|
31
33
|
}: CheckboxProps = $props();
|
@@ -49,6 +51,10 @@
|
|
49
51
|
checkboxContext.set(checkbox);
|
50
52
|
</script>
|
51
53
|
|
52
|
-
|
53
|
-
{@render
|
54
|
-
|
54
|
+
{#if asChild}
|
55
|
+
{@render asChild(attrs, checkbox)}
|
56
|
+
{:else}
|
57
|
+
<label {...attrs}>
|
58
|
+
{@render children?.(checkbox)}
|
59
|
+
</label>
|
60
|
+
{/if}
|
@@ -1,20 +1,26 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {HtmlProps} from '../types.js';
|
2
|
+
import type {AsChild, HtmlProps} from '../types.js';
|
3
3
|
|
4
|
-
export interface ClipboardControlProps extends HtmlProps<'div'> {
|
4
|
+
export interface ClipboardControlProps extends HtmlProps<'div'> {
|
5
|
+
asChild?: AsChild;
|
6
|
+
}
|
5
7
|
</script>
|
6
8
|
|
7
9
|
<script lang="ts">
|
8
|
-
import {mergeProps} from '
|
10
|
+
import {mergeProps} from '../utils.svelte.js';
|
9
11
|
import {clipboardContext} from './context.svelte.js';
|
10
12
|
|
11
|
-
let {children, ...props}: ClipboardControlProps = $props();
|
13
|
+
let {asChild, children, ...props}: ClipboardControlProps = $props();
|
12
14
|
|
13
15
|
let clipboard = clipboardContext.get();
|
14
16
|
|
15
17
|
let attrs = $derived(mergeProps(props, clipboard.getControlProps()));
|
16
18
|
</script>
|
17
19
|
|
18
|
-
|
19
|
-
{@render
|
20
|
-
|
20
|
+
{#if asChild}
|
21
|
+
{@render asChild(attrs)}
|
22
|
+
{:else}
|
23
|
+
<div {...attrs}>
|
24
|
+
{@render children?.()}
|
25
|
+
</div>
|
26
|
+
{/if}
|
@@ -1,22 +1,28 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {Assign, HtmlProps} from '../types.js';
|
2
|
+
import type {AsChild, Assign, HtmlProps} from '../types.js';
|
3
3
|
import type {IndicatorProps} from '@zag-js/clipboard';
|
4
4
|
|
5
5
|
export interface ClipboardIndicatorProps
|
6
|
-
extends Assign<HtmlProps<'span'>, Partial<IndicatorProps>> {
|
6
|
+
extends Assign<HtmlProps<'span'>, Partial<IndicatorProps>> {
|
7
|
+
asChild?: AsChild;
|
8
|
+
}
|
7
9
|
</script>
|
8
10
|
|
9
11
|
<script lang="ts">
|
10
|
-
import {mergeProps} from '
|
12
|
+
import {mergeProps} from '../utils.svelte.js';
|
11
13
|
import {clipboardContext} from './context.svelte.js';
|
12
14
|
|
13
|
-
let {copied = false, children, ...props}: ClipboardIndicatorProps = $props();
|
15
|
+
let {copied = false, asChild, children, ...props}: ClipboardIndicatorProps = $props();
|
14
16
|
|
15
17
|
let clipboard = clipboardContext.get();
|
16
18
|
|
17
19
|
let attrs = $derived(mergeProps(props, clipboard.getIndicatorProps({copied})));
|
18
20
|
</script>
|
19
21
|
|
20
|
-
|
21
|
-
{@render
|
22
|
-
|
22
|
+
{#if asChild}
|
23
|
+
{@render asChild(attrs)}
|
24
|
+
{:else}
|
25
|
+
<span {...attrs}>
|
26
|
+
{@render children?.()}
|
27
|
+
</span>
|
28
|
+
{/if}
|
@@ -1,18 +1,24 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {HtmlProps} from '../types.js';
|
2
|
+
import type {AsChild, HtmlProps} from '../types.js';
|
3
3
|
|
4
|
-
export interface ClipboardInputProps extends HtmlProps<'input'> {
|
4
|
+
export interface ClipboardInputProps extends HtmlProps<'input'> {
|
5
|
+
asChild?: AsChild<HtmlProps<'input'>>;
|
6
|
+
}
|
5
7
|
</script>
|
6
8
|
|
7
9
|
<script lang="ts">
|
8
|
-
import {mergeProps} from '
|
10
|
+
import {mergeProps} from '../utils.svelte.js';
|
9
11
|
import {clipboardContext} from './context.svelte.js';
|
10
12
|
|
11
|
-
let {...props}: ClipboardInputProps = $props();
|
13
|
+
let {asChild, ...props}: ClipboardInputProps = $props();
|
12
14
|
|
13
15
|
let clipboard = clipboardContext.get();
|
14
16
|
|
15
17
|
let attrs = $derived(mergeProps(props, clipboard.getInputProps()));
|
16
18
|
</script>
|
17
19
|
|
18
|
-
|
20
|
+
{#if asChild}
|
21
|
+
{@render asChild(attrs)}
|
22
|
+
{:else}
|
23
|
+
<input {...attrs} />
|
24
|
+
{/if}
|
@@ -1,20 +1,26 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {HtmlProps} from '../types.js';
|
2
|
+
import type {AsChild, HtmlProps} from '../types.js';
|
3
3
|
|
4
|
-
export interface ClipboardLabelProps extends HtmlProps<'label'> {
|
4
|
+
export interface ClipboardLabelProps extends HtmlProps<'label'> {
|
5
|
+
asChild?: AsChild<HtmlProps<'label'>>;
|
6
|
+
}
|
5
7
|
</script>
|
6
8
|
|
7
9
|
<script lang="ts">
|
8
|
-
import {mergeProps} from '
|
10
|
+
import {mergeProps} from '../utils.svelte.js';
|
9
11
|
import {clipboardContext} from './context.svelte.js';
|
10
12
|
|
11
|
-
let {children, ...props}: ClipboardLabelProps = $props();
|
13
|
+
let {asChild, children, ...props}: ClipboardLabelProps = $props();
|
12
14
|
|
13
15
|
let clipboard = clipboardContext.get();
|
14
16
|
|
15
17
|
let attrs = $derived(mergeProps(props, clipboard.getLabelProps()));
|
16
18
|
</script>
|
17
19
|
|
18
|
-
|
19
|
-
{@render
|
20
|
-
|
20
|
+
{#if asChild}
|
21
|
+
{@render asChild(attrs)}
|
22
|
+
{:else}
|
23
|
+
<label {...attrs}>
|
24
|
+
{@render children?.()}
|
25
|
+
</label>
|
26
|
+
{/if}
|
@@ -1,16 +1,17 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {Assign, HtmlProps} from '../types.js';
|
2
|
+
import type {AsChild, Assign, GenericHtmlProps, HtmlProps} from '../types.js';
|
3
3
|
import type {Snippet} from 'svelte';
|
4
4
|
import type {CreateClipboardProps, CreateClipboardReturn} from './create-clipboard.svelte.js';
|
5
5
|
|
6
6
|
export interface ClipboardProps
|
7
7
|
extends Assign<Omit<HtmlProps<'div'>, 'children'>, CreateClipboardProps> {
|
8
|
+
asChild?: AsChild<GenericHtmlProps, CreateClipboardReturn>;
|
8
9
|
children?: Snippet<[clipboard: CreateClipboardReturn]>;
|
9
10
|
}
|
10
11
|
</script>
|
11
12
|
|
12
13
|
<script lang="ts">
|
13
|
-
import {mergeProps} from '
|
14
|
+
import {mergeProps} from '../utils.svelte.js';
|
14
15
|
import {clipboardContext} from './context.svelte.js';
|
15
16
|
import {createClipboard} from './create-clipboard.svelte.js';
|
16
17
|
|
@@ -21,6 +22,7 @@
|
|
21
22
|
value,
|
22
23
|
timeout,
|
23
24
|
onStatusChange,
|
25
|
+
asChild,
|
24
26
|
children,
|
25
27
|
...props
|
26
28
|
}: ClipboardProps = $props();
|
@@ -38,6 +40,10 @@
|
|
38
40
|
clipboardContext.set(clipboard);
|
39
41
|
</script>
|
40
42
|
|
41
|
-
|
42
|
-
{@render
|
43
|
-
|
43
|
+
{#if asChild}
|
44
|
+
{@render asChild(attrs, clipboard)}
|
45
|
+
{:else}
|
46
|
+
<div {...attrs}>
|
47
|
+
{@render children?.(clipboard)}
|
48
|
+
</div>
|
49
|
+
{/if}
|
@@ -1,20 +1,26 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {HtmlProps} from '../types.js';
|
2
|
+
import type {AsChild, HtmlProps} from '../types.js';
|
3
3
|
|
4
|
-
export interface ClipboardTriggerProps extends HtmlProps<'button'> {
|
4
|
+
export interface ClipboardTriggerProps extends HtmlProps<'button'> {
|
5
|
+
asChild?: AsChild<HtmlProps<'button'>>;
|
6
|
+
}
|
5
7
|
</script>
|
6
8
|
|
7
9
|
<script lang="ts">
|
8
|
-
import {mergeProps} from '
|
10
|
+
import {mergeProps} from '../utils.svelte.js';
|
9
11
|
import {clipboardContext} from './context.svelte.js';
|
10
12
|
|
11
|
-
let {children, ...props}: ClipboardTriggerProps = $props();
|
13
|
+
let {asChild, children, ...props}: ClipboardTriggerProps = $props();
|
12
14
|
|
13
15
|
let clipboard = clipboardContext.get();
|
14
16
|
|
15
17
|
let attrs = $derived(mergeProps(props, clipboard.getTriggerProps()));
|
16
18
|
</script>
|
17
19
|
|
18
|
-
|
19
|
-
{@render
|
20
|
-
|
20
|
+
{#if asChild}
|
21
|
+
{@render asChild(attrs)}
|
22
|
+
{:else}
|
23
|
+
<button type="button" {...attrs}>
|
24
|
+
{@render children?.()}
|
25
|
+
</button>
|
26
|
+
{/if}
|
@@ -1,20 +1,26 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {HtmlProps} from '../types.js';
|
2
|
+
import type {AsChild, HtmlProps} from '../types.js';
|
3
3
|
|
4
|
-
export interface CollapsibleContentProps extends HtmlProps<'div'> {
|
4
|
+
export interface CollapsibleContentProps extends HtmlProps<'div'> {
|
5
|
+
asChild?: AsChild;
|
6
|
+
}
|
5
7
|
</script>
|
6
8
|
|
7
9
|
<script lang="ts">
|
8
|
-
import {mergeProps} from '
|
10
|
+
import {mergeProps} from '../utils.svelte.js';
|
9
11
|
import {collapsibleContext} from './context.svelte.js';
|
10
12
|
|
11
|
-
let {children, ...props}: CollapsibleContentProps = $props();
|
13
|
+
let {asChild, children, ...props}: CollapsibleContentProps = $props();
|
12
14
|
|
13
15
|
let collapsible = collapsibleContext.get();
|
14
16
|
|
15
17
|
let attrs = $derived(mergeProps(props, collapsible.getContentProps()));
|
16
18
|
</script>
|
17
19
|
|
18
|
-
|
19
|
-
{@render
|
20
|
-
|
20
|
+
{#if asChild}
|
21
|
+
{@render asChild(attrs)}
|
22
|
+
{:else}
|
23
|
+
<div {...attrs}>
|
24
|
+
{@render children?.()}
|
25
|
+
</div>
|
26
|
+
{/if}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {Assign, HtmlProps} from '../types.js';
|
2
|
+
import type {AsChild, Assign, GenericHtmlProps, HtmlProps} from '../types.js';
|
3
3
|
import type {Snippet} from 'svelte';
|
4
4
|
import type {
|
5
5
|
CreateCollapsibleProps,
|
@@ -8,12 +8,13 @@
|
|
8
8
|
|
9
9
|
export interface CollapsibleProps
|
10
10
|
extends Assign<Omit<HtmlProps<'div'>, 'children'>, CreateCollapsibleProps> {
|
11
|
-
|
11
|
+
asChild?: AsChild<GenericHtmlProps, CreateCollapsibleReturn>;
|
12
|
+
children?: Snippet<[collapsible: CreateCollapsibleReturn]>;
|
12
13
|
}
|
13
14
|
</script>
|
14
15
|
|
15
16
|
<script lang="ts">
|
16
|
-
import {mergeProps} from '
|
17
|
+
import {mergeProps} from '../utils.svelte.js';
|
17
18
|
import {collapsibleContext} from './context.svelte.js';
|
18
19
|
import {createCollapsible} from './create-collapsible.svelte.js';
|
19
20
|
|
@@ -25,6 +26,7 @@
|
|
25
26
|
defaultOpen,
|
26
27
|
onOpenChange,
|
27
28
|
onExitComplete,
|
29
|
+
asChild,
|
28
30
|
children,
|
29
31
|
...props
|
30
32
|
}: CollapsibleProps = $props();
|
@@ -44,6 +46,10 @@
|
|
44
46
|
collapsibleContext.set(collapsible);
|
45
47
|
</script>
|
46
48
|
|
47
|
-
|
48
|
-
{@render
|
49
|
-
|
49
|
+
{#if asChild}
|
50
|
+
{@render asChild(attrs, collapsible)}
|
51
|
+
{:else}
|
52
|
+
<div {...attrs}>
|
53
|
+
{@render children?.(collapsible)}
|
54
|
+
</div>
|
55
|
+
{/if}
|
@@ -1,20 +1,26 @@
|
|
1
1
|
<script lang="ts" module>
|
2
|
-
import type {HtmlProps} from '../types.js';
|
2
|
+
import type {AsChild, HtmlProps} from '../types.js';
|
3
3
|
|
4
|
-
export interface CollapsibleTriggerProps extends HtmlProps<'button'> {
|
4
|
+
export interface CollapsibleTriggerProps extends HtmlProps<'button'> {
|
5
|
+
asChild?: AsChild<HtmlProps<'button'>>;
|
6
|
+
}
|
5
7
|
</script>
|
6
8
|
|
7
9
|
<script lang="ts">
|
8
|
-
import {mergeProps} from '
|
10
|
+
import {mergeProps} from '../utils.svelte.js';
|
9
11
|
import {collapsibleContext} from './context.svelte.js';
|
10
12
|
|
11
|
-
let {children, ...props}: CollapsibleTriggerProps = $props();
|
13
|
+
let {asChild, children, ...props}: CollapsibleTriggerProps = $props();
|
12
14
|
|
13
15
|
let collapsible = collapsibleContext.get();
|
14
16
|
|
15
17
|
let attrs = $derived(mergeProps(props, collapsible.getTriggerProps()));
|
16
18
|
</script>
|
17
19
|
|
18
|
-
|
19
|
-
{@render
|
20
|
-
|
20
|
+
{#if asChild}
|
21
|
+
{@render asChild(attrs)}
|
22
|
+
{:else}
|
23
|
+
<button type="button" {...attrs}>
|
24
|
+
{@render children?.()}
|
25
|
+
</button>
|
26
|
+
{/if}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface ColorPickerAreaBackgroundProps extends HtmlProps<'div'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '../utils.svelte.js';
|
9
|
+
import {colorPickerAreaPropsContext, colorPickerContext} from './context.svelte.js';
|
10
|
+
|
11
|
+
let {children, ...props}: ColorPickerAreaBackgroundProps = $props();
|
12
|
+
|
13
|
+
let colorPicker = colorPickerContext.get();
|
14
|
+
let areaProps = colorPickerAreaPropsContext.get();
|
15
|
+
|
16
|
+
let attrs = $derived(mergeProps(props, colorPicker.getAreaBackgroundProps(areaProps)));
|
17
|
+
</script>
|
18
|
+
|
19
|
+
<div {...attrs}>
|
20
|
+
{@render children?.()}
|
21
|
+
</div>
|
@@ -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 AreaBackground: $$__sveltets_2_IsomorphicComponent<ColorPickerAreaBackgroundProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type AreaBackground = InstanceType<typeof AreaBackground>;
|
18
|
+
export default AreaBackground;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface ColorPickerAreaThumbProps extends HtmlProps<'div'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '../utils.svelte.js';
|
9
|
+
import {colorPickerAreaPropsContext, colorPickerContext} from './context.svelte.js';
|
10
|
+
|
11
|
+
let {children, ...props}: ColorPickerAreaThumbProps = $props();
|
12
|
+
|
13
|
+
let colorPicker = colorPickerContext.get();
|
14
|
+
let areaProps = colorPickerAreaPropsContext.get();
|
15
|
+
|
16
|
+
let attrs = $derived(mergeProps(props, colorPicker.getAreaThumbProps(areaProps)));
|
17
|
+
</script>
|
18
|
+
|
19
|
+
<div {...attrs}>
|
20
|
+
{@render children?.()}
|
21
|
+
</div>
|
@@ -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 AreaThumb: $$__sveltets_2_IsomorphicComponent<ColorPickerAreaThumbProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type AreaThumb = InstanceType<typeof AreaThumb>;
|
18
|
+
export default AreaThumb;
|