ui-ingredients 0.0.45 → 0.0.46
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/accordion/context.svelte.d.ts +2 -2
- package/dist/accordion/item-content.svelte +7 -2
- package/dist/accordion/item-indicator.svelte +7 -2
- package/dist/accordion/item-trigger.svelte +7 -2
- package/dist/accordion/item.svelte +2 -2
- package/dist/accordion/root.svelte +61 -61
- package/dist/avatar/context.svelte.d.ts +1 -1
- package/dist/avatar/fallback.svelte +2 -2
- package/dist/avatar/image.svelte +2 -2
- package/dist/avatar/root.svelte +2 -2
- package/dist/carousel/context.svelte.d.ts +1 -1
- package/dist/carousel/indicator-group.svelte +7 -2
- package/dist/carousel/indicator.svelte +2 -2
- package/dist/carousel/item-group.svelte +2 -2
- package/dist/carousel/item.svelte +2 -2
- package/dist/carousel/next-trigger.svelte +7 -2
- package/dist/carousel/prev-trigger.svelte +7 -2
- package/dist/carousel/root.svelte +2 -2
- package/dist/carousel/viewport.svelte +2 -2
- package/dist/checkbox/context.svelte.d.ts +1 -1
- package/dist/checkbox/control.svelte +2 -2
- package/dist/checkbox/hidden-input.svelte +2 -2
- package/dist/checkbox/indicator.svelte +2 -2
- package/dist/checkbox/label.svelte +2 -2
- package/dist/checkbox/root.svelte +2 -2
- package/dist/clipboard/context.svelte.d.ts +1 -1
- package/dist/clipboard/control.svelte +2 -2
- package/dist/clipboard/indicator.svelte +2 -1
- package/dist/clipboard/input.svelte +2 -2
- package/dist/clipboard/label.svelte +2 -2
- package/dist/clipboard/root.svelte +2 -2
- package/dist/clipboard/trigger.svelte +2 -2
- package/dist/collapsible/content.svelte +7 -2
- package/dist/collapsible/context.svelte.d.ts +1 -1
- package/dist/collapsible/root.svelte +2 -2
- package/dist/collapsible/trigger.svelte +7 -2
- package/dist/color-picker/context.svelte.d.ts +5 -5
- package/dist/combobox/clear-trigger.svelte +7 -2
- package/dist/combobox/content.svelte +2 -2
- package/dist/combobox/context.svelte.d.ts +3 -3
- package/dist/combobox/control.svelte +2 -2
- package/dist/combobox/input.svelte +2 -2
- package/dist/combobox/item-group-label.svelte +7 -2
- package/dist/combobox/item-group.svelte +8 -2
- package/dist/combobox/item-indicator.svelte +7 -2
- package/dist/combobox/item-text.svelte +2 -2
- package/dist/combobox/item.svelte +2 -2
- package/dist/combobox/label.svelte +2 -2
- package/dist/combobox/list.svelte +2 -2
- package/dist/combobox/positioner.svelte +7 -2
- package/dist/combobox/root.svelte +2 -2
- package/dist/combobox/trigger.svelte +2 -2
- package/dist/create-context.svelte.d.ts +8 -3
- package/dist/create-context.svelte.js +15 -12
- package/dist/date-picker/clear-trigger.svelte +7 -2
- package/dist/date-picker/content.svelte +2 -2
- package/dist/date-picker/context.svelte.d.ts +5 -5
- package/dist/date-picker/control.svelte +2 -2
- package/dist/date-picker/day-table-cell-trigger.svelte +7 -3
- package/dist/date-picker/day-table-cell.svelte +7 -2
- package/dist/date-picker/input.svelte +2 -2
- package/dist/date-picker/label.svelte +8 -2
- package/dist/date-picker/month-select.svelte +7 -2
- package/dist/date-picker/month-table-cell-trigger.svelte +7 -3
- package/dist/date-picker/month-table-cell.svelte +7 -2
- package/dist/date-picker/next-trigger.svelte +7 -2
- package/dist/date-picker/positioner.svelte +7 -2
- package/dist/date-picker/preset-trigger.svelte +8 -3
- package/dist/date-picker/prev-trigger.svelte +7 -2
- package/dist/date-picker/range-text.svelte +7 -2
- package/dist/date-picker/root.svelte +2 -2
- package/dist/date-picker/table-body.svelte +7 -2
- package/dist/date-picker/table-head.svelte +7 -2
- package/dist/date-picker/table-header.svelte +7 -2
- package/dist/date-picker/table-row.svelte +7 -2
- package/dist/date-picker/table.svelte +9 -3
- package/dist/date-picker/trigger.svelte +2 -2
- package/dist/date-picker/view-control.svelte +7 -2
- package/dist/date-picker/view-trigger.svelte +7 -2
- package/dist/date-picker/view.svelte +2 -1
- package/dist/date-picker/year-select.svelte +7 -2
- package/dist/date-picker/year-table-cell-trigger.svelte +7 -3
- package/dist/date-picker/year-table-cell.svelte +7 -2
- package/dist/dialog/backdrop.svelte +2 -2
- package/dist/dialog/close-trigger.svelte +7 -2
- package/dist/dialog/content.svelte +2 -2
- package/dist/dialog/context.svelte.d.ts +1 -1
- package/dist/dialog/description.svelte +2 -2
- package/dist/dialog/positioner.svelte +2 -2
- package/dist/dialog/title.svelte +2 -2
- package/dist/dialog/trigger.svelte +2 -2
- package/dist/editable/area.svelte +2 -2
- package/dist/editable/cancel-trigger.svelte +7 -2
- package/dist/editable/context.svelte.d.ts +1 -1
- package/dist/editable/control.svelte +2 -2
- package/dist/editable/edit-trigger.svelte +7 -2
- package/dist/editable/input.svelte +2 -2
- package/dist/editable/label.svelte +2 -2
- package/dist/editable/preview.svelte +2 -2
- package/dist/editable/root.svelte +2 -2
- package/dist/editable/submit-trigger.svelte +7 -2
- package/dist/environment-provider/context.svelte.d.ts +1 -1
- package/dist/field/context.svelte.d.ts +1 -1
- package/dist/field/error-text.svelte +2 -2
- package/dist/field/helper-text.svelte +2 -2
- package/dist/field/input.svelte +2 -2
- package/dist/field/label.svelte +2 -2
- package/dist/field/root.svelte +2 -2
- package/dist/field/select.svelte +2 -2
- package/dist/field/textarea.svelte +2 -2
- package/dist/file-upload/context.svelte.d.ts +2 -2
- package/dist/file-upload/dropzone.svelte +7 -2
- package/dist/file-upload/hidden-input.svelte +2 -2
- package/dist/file-upload/item-delete-trigger.svelte +7 -3
- package/dist/file-upload/item-group.svelte +7 -2
- package/dist/file-upload/item-name.svelte +7 -2
- package/dist/file-upload/item-preview-image.svelte +2 -2
- package/dist/file-upload/item-preview.svelte +7 -2
- package/dist/file-upload/item-size-text.svelte +7 -2
- package/dist/file-upload/item.svelte +2 -2
- package/dist/file-upload/label.svelte +2 -2
- package/dist/file-upload/root.svelte +2 -2
- package/dist/file-upload/trigger.svelte +2 -2
- package/dist/floating-panel/body.svelte +2 -2
- package/dist/floating-panel/close-trigger.svelte +7 -2
- package/dist/floating-panel/content.svelte +7 -2
- package/dist/floating-panel/context.svelte.d.ts +1 -1
- package/dist/floating-panel/drag-trigger.svelte +7 -2
- package/dist/floating-panel/header.svelte +7 -2
- package/dist/floating-panel/maximize-trigger.svelte +7 -3
- package/dist/floating-panel/minimize-trigger.svelte +7 -3
- package/dist/floating-panel/positioner.svelte +7 -2
- package/dist/floating-panel/resize-trigger.svelte +7 -2
- package/dist/floating-panel/restore-trigger.svelte +7 -3
- package/dist/floating-panel/title.svelte +7 -2
- package/dist/floating-panel/trigger.svelte +7 -2
- package/dist/highlight/highlight.svelte +2 -2
- package/dist/hover-card/arrow-tip.svelte +2 -2
- package/dist/hover-card/arrow.svelte +2 -2
- package/dist/hover-card/content.svelte +2 -2
- package/dist/hover-card/context.svelte.d.ts +1 -1
- package/dist/hover-card/positioner.svelte +7 -2
- package/dist/hover-card/trigger.svelte +2 -2
- package/dist/locale-provider/context.svelte.d.ts +1 -1
- package/dist/menu/arrow-tip.svelte +2 -2
- package/dist/menu/arrow.svelte +2 -2
- package/dist/menu/content.svelte +2 -2
- package/dist/menu/context-trigger.svelte +7 -2
- package/dist/menu/context.svelte.d.ts +3 -3
- package/dist/menu/indicator.svelte +2 -2
- package/dist/menu/item-group-label.svelte +7 -2
- package/dist/menu/item-group.svelte +2 -2
- package/dist/menu/item.svelte +2 -2
- package/dist/menu/option-item-indicator.svelte +7 -2
- package/dist/menu/option-item-text.svelte +7 -2
- package/dist/menu/option-item.svelte +2 -2
- package/dist/menu/positioner.svelte +2 -2
- package/dist/menu/separator.svelte +2 -2
- package/dist/menu/trigger-item.svelte +7 -2
- package/dist/menu/trigger.svelte +2 -2
- package/dist/number-input/context.svelte.d.ts +1 -1
- package/dist/number-input/control.svelte +7 -2
- package/dist/number-input/decrement-trigger.svelte +7 -3
- package/dist/number-input/increment-trigger.svelte +7 -3
- package/dist/number-input/input.svelte +2 -2
- package/dist/number-input/label.svelte +2 -2
- package/dist/number-input/root.svelte +2 -2
- package/dist/number-input/scrubber.svelte +7 -2
- package/dist/pagination/context.svelte.d.ts +1 -1
- package/dist/pagination/ellipsis.svelte +8 -2
- package/dist/pagination/item.svelte +8 -2
- package/dist/pagination/next-trigger.svelte +7 -2
- package/dist/pagination/prev-trigger.svelte +7 -2
- package/dist/pagination/root.svelte +2 -2
- package/dist/pin-input/clear-trigger.svelte +7 -2
- package/dist/pin-input/context.svelte.d.ts +1 -1
- package/dist/pin-input/hidden-input.svelte +2 -2
- package/dist/pin-input/input.svelte +2 -2
- package/dist/pin-input/label.svelte +2 -2
- package/dist/pin-input/root.svelte +2 -2
- package/dist/popover/arrow-tip.svelte +2 -2
- package/dist/popover/arrow.svelte +2 -2
- package/dist/popover/close-trigger.svelte +7 -2
- package/dist/popover/content.svelte +2 -2
- package/dist/popover/context.svelte.d.ts +1 -1
- package/dist/popover/description.svelte +7 -2
- package/dist/popover/positioner.svelte +2 -2
- package/dist/popover/title.svelte +2 -2
- package/dist/popover/trigger.svelte +2 -2
- package/dist/presence/context.svelte.d.ts +2 -2
- package/dist/progress/circle-range.svelte +7 -2
- package/dist/progress/circle-track.svelte +7 -2
- package/dist/progress/circle.svelte +2 -2
- package/dist/progress/context.svelte.d.ts +1 -1
- package/dist/progress/label.svelte +2 -2
- package/dist/progress/range.svelte +2 -2
- package/dist/progress/root.svelte +2 -2
- package/dist/progress/track.svelte +2 -2
- package/dist/progress/value-text.svelte +2 -2
- package/dist/progress/view.svelte +8 -2
- package/dist/qr-code/context.svelte.d.ts +1 -1
- package/dist/qr-code/frame.svelte +2 -2
- package/dist/qr-code/overlay.svelte +2 -2
- package/dist/qr-code/pattern.svelte +2 -2
- package/dist/qr-code/root.svelte +2 -2
- package/dist/radio-group/context.svelte.d.ts +2 -2
- package/dist/radio-group/indicator.svelte +7 -2
- package/dist/radio-group/item-control.svelte +7 -2
- package/dist/radio-group/item-hidden-input.svelte +2 -2
- package/dist/radio-group/item-text.svelte +7 -2
- package/dist/radio-group/item.svelte +2 -2
- package/dist/radio-group/label.svelte +2 -2
- package/dist/radio-group/root.svelte +2 -2
- package/dist/rating-group/context.svelte.d.ts +1 -1
- package/dist/rating-group/control.svelte +7 -2
- package/dist/rating-group/hidden-input.svelte +2 -2
- package/dist/rating-group/item.svelte +8 -2
- package/dist/rating-group/label.svelte +2 -2
- package/dist/rating-group/root.svelte +2 -2
- package/dist/segment-group/context.svelte.d.ts +2 -2
- package/dist/segment-group/indicator.svelte +7 -2
- package/dist/segment-group/item-control.svelte +7 -2
- package/dist/segment-group/item-hidden-input.svelte +2 -2
- package/dist/segment-group/item-text.svelte +7 -2
- package/dist/segment-group/item.svelte +2 -2
- package/dist/segment-group/label.svelte +2 -2
- package/dist/segment-group/root.svelte +2 -2
- package/dist/select/clear-trigger.svelte +7 -2
- package/dist/select/content.svelte +2 -2
- package/dist/select/context.svelte.d.ts +3 -3
- package/dist/select/control.svelte +2 -2
- package/dist/select/create-select.svelte.js +2 -2
- package/dist/select/hidden-select.svelte +7 -2
- package/dist/select/indicator.svelte +2 -2
- package/dist/select/item-group-label.svelte +7 -2
- package/dist/select/item-group.svelte +8 -2
- package/dist/select/item-indicator.svelte +7 -2
- package/dist/select/item-text.svelte +2 -2
- package/dist/select/item.svelte +2 -2
- package/dist/select/label.svelte +2 -2
- package/dist/select/list.svelte +2 -2
- package/dist/select/positioner.svelte +2 -2
- package/dist/select/root.svelte +2 -2
- package/dist/select/trigger.svelte +2 -2
- package/dist/select/value-text.svelte +8 -3
- package/dist/signature-pad/clear-trigger.svelte +7 -2
- package/dist/signature-pad/context.svelte.d.ts +1 -1
- package/dist/signature-pad/control.svelte +7 -2
- package/dist/signature-pad/current-segment-path.svelte +7 -3
- package/dist/signature-pad/guide.svelte +2 -2
- package/dist/signature-pad/hidden-input.svelte +7 -2
- package/dist/signature-pad/label.svelte +2 -2
- package/dist/signature-pad/root.svelte +2 -2
- package/dist/signature-pad/segment-path.svelte +8 -3
- package/dist/signature-pad/segment.svelte +7 -2
- package/dist/slider/context.svelte.d.ts +2 -2
- package/dist/slider/control.svelte +2 -2
- package/dist/slider/hidden-input.svelte +2 -2
- package/dist/slider/label.svelte +2 -2
- package/dist/slider/marker-group.svelte +2 -2
- package/dist/slider/marker.svelte +8 -2
- package/dist/slider/range.svelte +2 -2
- package/dist/slider/root.svelte +2 -2
- package/dist/slider/thumb.svelte +2 -2
- package/dist/slider/track.svelte +2 -2
- package/dist/slider/value-text.svelte +2 -2
- package/dist/splitter/context.svelte.d.ts +1 -1
- package/dist/splitter/panel.svelte +2 -2
- package/dist/splitter/resize-trigger.svelte +7 -2
- package/dist/splitter/root.svelte +2 -2
- package/dist/steps/completed-content.svelte +7 -2
- package/dist/steps/content.svelte +8 -2
- package/dist/steps/context.svelte.d.ts +2 -2
- package/dist/steps/indicator.svelte +2 -2
- package/dist/steps/item.svelte +2 -2
- package/dist/steps/list.svelte +2 -2
- package/dist/steps/next-trigger.svelte +2 -2
- package/dist/steps/prev-trigger.svelte +2 -2
- package/dist/steps/progress.svelte +2 -2
- package/dist/steps/root.svelte +2 -2
- package/dist/steps/separator.svelte +2 -2
- package/dist/steps/trigger.svelte +2 -2
- package/dist/switch/context.svelte.d.ts +1 -1
- package/dist/switch/control.svelte +4 -4
- package/dist/switch/create-switch.svelte.d.ts +3 -3
- package/dist/switch/create-switch.svelte.js +3 -3
- package/dist/switch/hidden-input.svelte +4 -4
- package/dist/switch/label.svelte +4 -4
- package/dist/switch/root.svelte +7 -7
- package/dist/switch/thumb.svelte +4 -4
- package/dist/tabs/content.svelte +2 -2
- package/dist/tabs/context.svelte.d.ts +1 -1
- package/dist/tabs/list.svelte +2 -2
- package/dist/tabs/root.svelte +2 -2
- package/dist/tabs/trigger.svelte +2 -2
- package/dist/tags-input/clear-trigger.svelte +7 -2
- package/dist/tags-input/context.svelte.d.ts +2 -2
- package/dist/tags-input/control.svelte +2 -2
- package/dist/tags-input/hidden-input.svelte +2 -2
- package/dist/tags-input/input.svelte +2 -2
- package/dist/tags-input/item-delete-trigger.svelte +7 -2
- package/dist/tags-input/item-input.svelte +2 -2
- package/dist/tags-input/item-preview.svelte +7 -2
- package/dist/tags-input/item-text.svelte +2 -2
- package/dist/tags-input/item.svelte +2 -2
- package/dist/tags-input/label.svelte +2 -2
- package/dist/tags-input/root.svelte +2 -2
- package/dist/time-picker/clear-trigger.svelte +7 -2
- package/dist/time-picker/column.svelte +8 -2
- package/dist/time-picker/content.svelte +2 -2
- package/dist/time-picker/context.svelte.d.ts +1 -1
- package/dist/time-picker/control.svelte +2 -2
- package/dist/time-picker/hour-cell.svelte +8 -2
- package/dist/time-picker/input.svelte +2 -2
- package/dist/time-picker/label.svelte +2 -2
- package/dist/time-picker/minute-cell.svelte +8 -3
- package/dist/time-picker/period-cell.svelte +8 -3
- package/dist/time-picker/positioner.svelte +7 -2
- package/dist/time-picker/root.svelte +2 -2
- package/dist/time-picker/second-cell.svelte +8 -3
- package/dist/time-picker/spacer.svelte +2 -2
- package/dist/time-picker/trigger.svelte +2 -2
- package/dist/timer/action-trigger.svelte +8 -2
- package/dist/timer/context.svelte.d.ts +2 -2
- package/dist/timer/item-label.svelte +2 -2
- package/dist/timer/item-value.svelte +2 -2
- package/dist/timer/item.svelte +2 -2
- package/dist/timer/root.svelte +2 -2
- package/dist/timer/separator.svelte +2 -2
- package/dist/toast/action-trigger.svelte +7 -2
- package/dist/toast/close-trigger.svelte +2 -2
- package/dist/toast/context.svelte.d.ts +1 -1
- package/dist/toast/description.svelte +2 -2
- package/dist/toast/ghost-after.svelte +2 -2
- package/dist/toast/ghost-before.svelte +2 -2
- package/dist/toast/root.svelte +2 -2
- package/dist/toast/title.svelte +2 -2
- package/dist/toast/toaster.svelte +2 -2
- package/dist/toggle-group/context.svelte.d.ts +1 -1
- package/dist/toggle-group/item.svelte +2 -2
- package/dist/toggle-group/root.svelte +2 -2
- package/dist/tooltip/arrow-tip.svelte +2 -2
- package/dist/tooltip/arrow.svelte +2 -2
- package/dist/tooltip/content.svelte +2 -2
- package/dist/tooltip/context.svelte.d.ts +1 -1
- package/dist/tooltip/positioner.svelte +2 -2
- package/dist/tooltip/trigger.svelte +2 -2
- package/dist/tour/arrow-tip.svelte +2 -2
- package/dist/tour/arrow.svelte +2 -2
- package/dist/tour/close-trigger.svelte +2 -2
- package/dist/tour/content.svelte +2 -2
- package/dist/tour/context.svelte.d.ts +1 -1
- package/dist/tour/description.svelte +2 -2
- package/dist/tour/next-trigger.svelte +2 -2
- package/dist/tour/overlay.svelte +2 -2
- package/dist/tour/positioner.svelte +2 -2
- package/dist/tour/prev-trigger.svelte +2 -2
- package/dist/tour/progress-text.svelte +2 -2
- package/dist/tour/skip-trigger.svelte +2 -2
- package/dist/tour/spotlight.svelte +2 -2
- package/dist/tour/title.svelte +2 -2
- package/dist/tree-view/branch-content.svelte +7 -2
- package/dist/tree-view/branch-control.svelte +7 -2
- package/dist/tree-view/branch-indicator.svelte +7 -2
- package/dist/tree-view/branch-text.svelte +7 -2
- package/dist/tree-view/branch-trigger.svelte +7 -2
- package/dist/tree-view/branch.svelte +2 -2
- package/dist/tree-view/context.svelte.d.ts +3 -3
- package/dist/tree-view/item-indicator.svelte +7 -2
- package/dist/tree-view/item-text.svelte +2 -2
- package/dist/tree-view/item.svelte +2 -2
- package/dist/tree-view/label.svelte +2 -2
- package/dist/tree-view/root.svelte +2 -2
- package/dist/tree-view/tree.svelte +2 -2
- package/dist/types.d.ts +2 -1
- package/package.json +176 -176
@@ -1,4 +1,4 @@
|
|
1
1
|
import type { ItemProps } from '@zag-js/accordion';
|
2
2
|
import type { CreateAccordionReturn } from './create-accordion.svelte.js';
|
3
|
-
export declare const getAccordionContext: () => CreateAccordionReturn, setAccordionContext: (context: CreateAccordionReturn | (() => CreateAccordionReturn)) =>
|
4
|
-
export declare const getAccordionItemPropsContext: () => ItemProps, setAccordionItemPropsContext: (context: ItemProps | (() => ItemProps)) =>
|
3
|
+
export declare const getAccordionContext: () => CreateAccordionReturn, setAccordionContext: (context: CreateAccordionReturn | (() => CreateAccordionReturn)) => CreateAccordionReturn;
|
4
|
+
export declare const getAccordionItemPropsContext: () => ItemProps, setAccordionItemPropsContext: (context: ItemProps | (() => ItemProps)) => ItemProps;
|
@@ -16,7 +16,12 @@
|
|
16
16
|
getAccordionItemPropsContext,
|
17
17
|
} from './context.svelte.js';
|
18
18
|
|
19
|
-
let {
|
19
|
+
let {
|
20
|
+
this: e,
|
21
|
+
asChild,
|
22
|
+
children,
|
23
|
+
...props
|
24
|
+
}: AccordionItemContentProps = $props();
|
20
25
|
|
21
26
|
let accordion = getAccordionContext();
|
22
27
|
let itemProps = getAccordionItemPropsContext();
|
@@ -43,7 +48,7 @@
|
|
43
48
|
{#if asChild}
|
44
49
|
{@render asChild(presence.ref, mergedProps)}
|
45
50
|
{:else}
|
46
|
-
<div use:presence.ref {...mergedProps}>
|
51
|
+
<div bind:this={e} use:presence.ref {...mergedProps}>
|
47
52
|
{@render children?.()}
|
48
53
|
</div>
|
49
54
|
{/if}
|
@@ -12,7 +12,12 @@
|
|
12
12
|
getAccordionItemPropsContext,
|
13
13
|
} from './context.svelte.js';
|
14
14
|
|
15
|
-
let {
|
15
|
+
let {
|
16
|
+
this: e,
|
17
|
+
asChild,
|
18
|
+
children,
|
19
|
+
...props
|
20
|
+
}: AccordionIndicatorProps = $props();
|
16
21
|
|
17
22
|
let accordion = getAccordionContext();
|
18
23
|
let itemProps = getAccordionItemPropsContext();
|
@@ -25,7 +30,7 @@
|
|
25
30
|
{#if asChild}
|
26
31
|
{@render asChild(mergedProps)}
|
27
32
|
{:else}
|
28
|
-
<span {...mergedProps}>
|
33
|
+
<span bind:this={e} {...mergedProps}>
|
29
34
|
{@render children?.()}
|
30
35
|
</span>
|
31
36
|
{/if}
|
@@ -12,7 +12,12 @@
|
|
12
12
|
getAccordionItemPropsContext,
|
13
13
|
} from './context.svelte.js';
|
14
14
|
|
15
|
-
let {
|
15
|
+
let {
|
16
|
+
this: e,
|
17
|
+
asChild,
|
18
|
+
children,
|
19
|
+
...props
|
20
|
+
}: AccordionItemTriggerProps = $props();
|
16
21
|
|
17
22
|
let accordion = getAccordionContext();
|
18
23
|
let itemProps = getAccordionItemPropsContext();
|
@@ -25,7 +30,7 @@
|
|
25
30
|
{#if asChild}
|
26
31
|
{@render asChild(mergedProps)}
|
27
32
|
{:else}
|
28
|
-
<button type="button" {...mergedProps}>
|
33
|
+
<button bind:this={e} type="button" {...mergedProps}>
|
29
34
|
{@render children?.()}
|
30
35
|
</button>
|
31
36
|
{/if}
|
@@ -14,7 +14,7 @@
|
|
14
14
|
setAccordionItemPropsContext,
|
15
15
|
} from './context.svelte.js';
|
16
16
|
|
17
|
-
let {asChild, children, ...props}: AccordionItemProps = $props();
|
17
|
+
let {this: e, asChild, children, ...props}: AccordionItemProps = $props();
|
18
18
|
|
19
19
|
let accordion = getAccordionContext();
|
20
20
|
|
@@ -33,7 +33,7 @@
|
|
33
33
|
{#if asChild}
|
34
34
|
{@render asChild(mergedProps, itemState)}
|
35
35
|
{:else}
|
36
|
-
<div {...mergedProps}>
|
36
|
+
<div bind:this={e} {...mergedProps}>
|
37
37
|
{@render children?.(itemState)}
|
38
38
|
</div>
|
39
39
|
{/if}
|
@@ -1,61 +1,61 @@
|
|
1
|
-
<script lang="ts" module>
|
2
|
-
import type {PresenceStrategyProps} from '../presence/create-presence.svelte.js';
|
3
|
-
import type {Assign, HtmlIngredientProps} from '../types.js';
|
4
|
-
import type {
|
5
|
-
CreateAccordionProps,
|
6
|
-
CreateAccordionReturn,
|
7
|
-
} from './create-accordion.svelte.js';
|
8
|
-
|
9
|
-
export interface AccordionProps
|
10
|
-
extends Assign<
|
11
|
-
HtmlIngredientProps<'div', CreateAccordionReturn>,
|
12
|
-
CreateAccordionProps
|
13
|
-
>,
|
14
|
-
PresenceStrategyProps {}
|
15
|
-
</script>
|
16
|
-
|
17
|
-
<script lang="ts">
|
18
|
-
import {mergeProps} from '../merge-props.js';
|
19
|
-
import {setPresenceStrategyPropsContext} from '../presence/context.svelte.js';
|
20
|
-
import {reflect} from '@zag-js/svelte';
|
21
|
-
import {createSplitProps} from '@zag-js/utils';
|
22
|
-
import {setAccordionContext} from './context.svelte.js';
|
23
|
-
import {createAccordion} from './create-accordion.svelte.js';
|
24
|
-
|
25
|
-
let {asChild, children, ...props}: AccordionProps = $props();
|
26
|
-
|
27
|
-
let [presenceStrategyProps, rest] = $derived(
|
28
|
-
createSplitProps<PresenceStrategyProps>(['lazyMount', 'keepMounted'])(
|
29
|
-
props,
|
30
|
-
),
|
31
|
-
);
|
32
|
-
|
33
|
-
let [accordionProps, localProps] = $derived(
|
34
|
-
createSplitProps<CreateAccordionProps>([
|
35
|
-
'id',
|
36
|
-
'ids',
|
37
|
-
'value',
|
38
|
-
'disabled',
|
39
|
-
'multiple',
|
40
|
-
'orientation',
|
41
|
-
'collapsible',
|
42
|
-
'onFocusChange',
|
43
|
-
'onValueChange',
|
44
|
-
])(rest),
|
45
|
-
);
|
46
|
-
|
47
|
-
let accordion = createAccordion(reflect(() => accordionProps));
|
48
|
-
|
49
|
-
let mergedProps = $derived(mergeProps(localProps, accordion.getRootProps()));
|
50
|
-
|
51
|
-
setAccordionContext(accordion);
|
52
|
-
setPresenceStrategyPropsContext(() => presenceStrategyProps);
|
53
|
-
</script>
|
54
|
-
|
55
|
-
{#if asChild}
|
56
|
-
{@render asChild(mergedProps, accordion)}
|
57
|
-
{:else}
|
58
|
-
<div {...mergedProps}>
|
59
|
-
{@render children?.(accordion)}
|
60
|
-
</div>
|
61
|
-
{/if}
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {PresenceStrategyProps} from '../presence/create-presence.svelte.js';
|
3
|
+
import type {Assign, HtmlIngredientProps} from '../types.js';
|
4
|
+
import type {
|
5
|
+
CreateAccordionProps,
|
6
|
+
CreateAccordionReturn,
|
7
|
+
} from './create-accordion.svelte.js';
|
8
|
+
|
9
|
+
export interface AccordionProps
|
10
|
+
extends Assign<
|
11
|
+
HtmlIngredientProps<'div', CreateAccordionReturn>,
|
12
|
+
CreateAccordionProps
|
13
|
+
>,
|
14
|
+
PresenceStrategyProps {}
|
15
|
+
</script>
|
16
|
+
|
17
|
+
<script lang="ts">
|
18
|
+
import {mergeProps} from '../merge-props.js';
|
19
|
+
import {setPresenceStrategyPropsContext} from '../presence/context.svelte.js';
|
20
|
+
import {reflect} from '@zag-js/svelte';
|
21
|
+
import {createSplitProps} from '@zag-js/utils';
|
22
|
+
import {setAccordionContext} from './context.svelte.js';
|
23
|
+
import {createAccordion} from './create-accordion.svelte.js';
|
24
|
+
|
25
|
+
let {this: e, asChild, children, ...props}: AccordionProps = $props();
|
26
|
+
|
27
|
+
let [presenceStrategyProps, rest] = $derived(
|
28
|
+
createSplitProps<PresenceStrategyProps>(['lazyMount', 'keepMounted'])(
|
29
|
+
props,
|
30
|
+
),
|
31
|
+
);
|
32
|
+
|
33
|
+
let [accordionProps, localProps] = $derived(
|
34
|
+
createSplitProps<CreateAccordionProps>([
|
35
|
+
'id',
|
36
|
+
'ids',
|
37
|
+
'value',
|
38
|
+
'disabled',
|
39
|
+
'multiple',
|
40
|
+
'orientation',
|
41
|
+
'collapsible',
|
42
|
+
'onFocusChange',
|
43
|
+
'onValueChange',
|
44
|
+
])(rest),
|
45
|
+
);
|
46
|
+
|
47
|
+
let accordion = createAccordion(reflect(() => accordionProps));
|
48
|
+
|
49
|
+
let mergedProps = $derived(mergeProps(localProps, accordion.getRootProps()));
|
50
|
+
|
51
|
+
setAccordionContext(accordion);
|
52
|
+
setPresenceStrategyPropsContext(() => presenceStrategyProps);
|
53
|
+
</script>
|
54
|
+
|
55
|
+
{#if asChild}
|
56
|
+
{@render asChild(mergedProps, accordion)}
|
57
|
+
{:else}
|
58
|
+
<div bind:this={e} {...mergedProps}>
|
59
|
+
{@render children?.(accordion)}
|
60
|
+
</div>
|
61
|
+
{/if}
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import type { CreateAvatarReturn } from './create-avatar.svelte.js';
|
2
|
-
export declare const getAvatarContext: () => CreateAvatarReturn, setAvatarContext: (context: CreateAvatarReturn | (() => CreateAvatarReturn)) =>
|
2
|
+
export declare const getAvatarContext: () => CreateAvatarReturn, setAvatarContext: (context: CreateAvatarReturn | (() => CreateAvatarReturn)) => CreateAvatarReturn;
|
@@ -8,7 +8,7 @@
|
|
8
8
|
import {mergeProps} from '../merge-props.js';
|
9
9
|
import {getAvatarContext} from './context.svelte.js';
|
10
10
|
|
11
|
-
let {asChild, children, ...props}: AvatarFallbackProps = $props();
|
11
|
+
let {this: e, asChild, children, ...props}: AvatarFallbackProps = $props();
|
12
12
|
|
13
13
|
let avatar = getAvatarContext();
|
14
14
|
|
@@ -18,7 +18,7 @@
|
|
18
18
|
{#if asChild}
|
19
19
|
{@render asChild(mergedProps)}
|
20
20
|
{:else}
|
21
|
-
<span {...mergedProps}>
|
21
|
+
<span bind:this={e} {...mergedProps}>
|
22
22
|
{@render children?.()}
|
23
23
|
</span>
|
24
24
|
{/if}
|
package/dist/avatar/image.svelte
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
import {mergeProps} from '../merge-props.js';
|
9
9
|
import {getAvatarContext} from './context.svelte.js';
|
10
10
|
|
11
|
-
let {asChild, ...props}: AvatarImageProps = $props();
|
11
|
+
let {this: e, asChild, ...props}: AvatarImageProps = $props();
|
12
12
|
|
13
13
|
let avatar = getAvatarContext();
|
14
14
|
|
@@ -18,5 +18,5 @@
|
|
18
18
|
{#if asChild}
|
19
19
|
{@render asChild(mergedProps)}
|
20
20
|
{:else}
|
21
|
-
<img {...mergedProps} />
|
21
|
+
<img bind:this={e} {...mergedProps} />
|
22
22
|
{/if}
|
package/dist/avatar/root.svelte
CHANGED
@@ -19,7 +19,7 @@
|
|
19
19
|
import {setAvatarContext} from './context.svelte.js';
|
20
20
|
import {createAvatar} from './create-avatar.svelte.js';
|
21
21
|
|
22
|
-
let {asChild, children, ...props}: AvatarProps = $props();
|
22
|
+
let {this: e, asChild, children, ...props}: AvatarProps = $props();
|
23
23
|
|
24
24
|
let [avatarProps, localProps] = $derived(
|
25
25
|
createSplitProps<CreateAvatarProps>(['id', 'ids', 'onStatusChange'])(props),
|
@@ -35,7 +35,7 @@
|
|
35
35
|
{#if asChild}
|
36
36
|
{@render asChild(mergedProps, avatar)}
|
37
37
|
{:else}
|
38
|
-
<div {...mergedProps}>
|
38
|
+
<div bind:this={e} {...mergedProps}>
|
39
39
|
{@render children?.(avatar)}
|
40
40
|
</div>
|
41
41
|
{/if}
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import type { CreateCarouselReturn } from './create-carousel.svelte.js';
|
2
|
-
export declare const getCarouselContext: () => CreateCarouselReturn, setCarouselContext: (context: CreateCarouselReturn | (() => CreateCarouselReturn)) =>
|
2
|
+
export declare const getCarouselContext: () => CreateCarouselReturn, setCarouselContext: (context: CreateCarouselReturn | (() => CreateCarouselReturn)) => CreateCarouselReturn;
|
@@ -9,7 +9,12 @@
|
|
9
9
|
import {mergeProps} from '../merge-props.js';
|
10
10
|
import {getCarouselContext} from './context.svelte.js';
|
11
11
|
|
12
|
-
let {
|
12
|
+
let {
|
13
|
+
this: e,
|
14
|
+
asChild,
|
15
|
+
children,
|
16
|
+
...props
|
17
|
+
}: CarouselIndicatorGroupProps = $props();
|
13
18
|
|
14
19
|
let carousel = getCarouselContext();
|
15
20
|
|
@@ -21,7 +26,7 @@
|
|
21
26
|
{#if asChild}
|
22
27
|
{@render asChild(mergedProps)}
|
23
28
|
{:else}
|
24
|
-
<div {...mergedProps}>
|
29
|
+
<div bind:this={e} {...mergedProps}>
|
25
30
|
{@render children?.()}
|
26
31
|
</div>
|
27
32
|
{/if}
|
@@ -11,7 +11,7 @@
|
|
11
11
|
import {createSplitProps} from '@zag-js/utils';
|
12
12
|
import {getCarouselContext} from './context.svelte.js';
|
13
13
|
|
14
|
-
let {asChild, children, ...props}: CarouselIndicatorProps = $props();
|
14
|
+
let {this: e, asChild, children, ...props}: CarouselIndicatorProps = $props();
|
15
15
|
|
16
16
|
let carousel = getCarouselContext();
|
17
17
|
|
@@ -27,7 +27,7 @@
|
|
27
27
|
{#if asChild}
|
28
28
|
{@render asChild(mergedProps)}
|
29
29
|
{:else}
|
30
|
-
<button type="button" {...mergedProps}>
|
30
|
+
<button bind:this={e} type="button" {...mergedProps}>
|
31
31
|
{@render children?.()}
|
32
32
|
</button>
|
33
33
|
{/if}
|
@@ -8,7 +8,7 @@
|
|
8
8
|
import {mergeProps} from '../merge-props.js';
|
9
9
|
import {getCarouselContext} from './context.svelte.js';
|
10
10
|
|
11
|
-
let {asChild, children, ...props}: CarouselItemGroupProps = $props();
|
11
|
+
let {this: e, asChild, children, ...props}: CarouselItemGroupProps = $props();
|
12
12
|
|
13
13
|
let carousel = getCarouselContext();
|
14
14
|
|
@@ -18,7 +18,7 @@
|
|
18
18
|
{#if asChild}
|
19
19
|
{@render asChild(mergedProps)}
|
20
20
|
{:else}
|
21
|
-
<div {...mergedProps}>
|
21
|
+
<div bind:this={e} {...mergedProps}>
|
22
22
|
{@render children?.()}
|
23
23
|
</div>
|
24
24
|
{/if}
|
@@ -11,7 +11,7 @@
|
|
11
11
|
import {createSplitProps} from '@zag-js/utils';
|
12
12
|
import {getCarouselContext} from './context.svelte.js';
|
13
13
|
|
14
|
-
let {asChild, children, ...props}: CarouselItemProps = $props();
|
14
|
+
let {this: e, asChild, children, ...props}: CarouselItemProps = $props();
|
15
15
|
|
16
16
|
let carousel = getCarouselContext();
|
17
17
|
|
@@ -28,7 +28,7 @@
|
|
28
28
|
{#if asChild}
|
29
29
|
{@render asChild(mergedProps, itemState)}
|
30
30
|
{:else}
|
31
|
-
<div {...mergedProps}>
|
31
|
+
<div bind:this={e} {...mergedProps}>
|
32
32
|
{@render children?.(itemState)}
|
33
33
|
</div>
|
34
34
|
{/if}
|
@@ -9,7 +9,12 @@
|
|
9
9
|
import {mergeProps} from '../merge-props.js';
|
10
10
|
import {getCarouselContext} from './context.svelte.js';
|
11
11
|
|
12
|
-
let {
|
12
|
+
let {
|
13
|
+
this: e,
|
14
|
+
asChild,
|
15
|
+
children,
|
16
|
+
...props
|
17
|
+
}: CarouselNextTriggerProps = $props();
|
13
18
|
|
14
19
|
let carousel = getCarouselContext();
|
15
20
|
|
@@ -19,7 +24,7 @@
|
|
19
24
|
{#if asChild}
|
20
25
|
{@render asChild(mergedProps)}
|
21
26
|
{:else}
|
22
|
-
<button type="button" {...mergedProps}>
|
27
|
+
<button bind:this={e} type="button" {...mergedProps}>
|
23
28
|
{@render children?.()}
|
24
29
|
</button>
|
25
30
|
{/if}
|
@@ -9,7 +9,12 @@
|
|
9
9
|
import {mergeProps} from '../merge-props.js';
|
10
10
|
import {getCarouselContext} from './context.svelte.js';
|
11
11
|
|
12
|
-
let {
|
12
|
+
let {
|
13
|
+
this: e,
|
14
|
+
asChild,
|
15
|
+
children,
|
16
|
+
...props
|
17
|
+
}: CarouselPrevTriggerProps = $props();
|
13
18
|
|
14
19
|
let carousel = getCarouselContext();
|
15
20
|
|
@@ -19,7 +24,7 @@
|
|
19
24
|
{#if asChild}
|
20
25
|
{@render asChild(mergedProps)}
|
21
26
|
{:else}
|
22
|
-
<button type="button" {...mergedProps}>
|
27
|
+
<button bind:this={e} type="button" {...mergedProps}>
|
23
28
|
{@render children?.()}
|
24
29
|
</button>
|
25
30
|
{/if}
|
@@ -19,7 +19,7 @@
|
|
19
19
|
import {setCarouselContext} from './context.svelte.js';
|
20
20
|
import {createCarousel} from './create-carousel.svelte.js';
|
21
21
|
|
22
|
-
let {asChild, children, ...props}: CarouselProps = $props();
|
22
|
+
let {this: e, asChild, children, ...props}: CarouselProps = $props();
|
23
23
|
|
24
24
|
let [carouselProps, localProps] = $derived(
|
25
25
|
createSplitProps<CreateCarouselProps>([
|
@@ -45,7 +45,7 @@
|
|
45
45
|
{#if asChild}
|
46
46
|
{@render asChild(mergedProps, carousel)}
|
47
47
|
{:else}
|
48
|
-
<div {...mergedProps}>
|
48
|
+
<div bind:this={e} {...mergedProps}>
|
49
49
|
{@render children?.(carousel)}
|
50
50
|
</div>
|
51
51
|
{/if}
|
@@ -8,7 +8,7 @@
|
|
8
8
|
import {mergeProps} from '../merge-props.js';
|
9
9
|
import {getCarouselContext} from './context.svelte.js';
|
10
10
|
|
11
|
-
let {asChild, children, ...props}: CarouselViewportProps = $props();
|
11
|
+
let {this: e, asChild, children, ...props}: CarouselViewportProps = $props();
|
12
12
|
|
13
13
|
let carousel = getCarouselContext();
|
14
14
|
|
@@ -18,7 +18,7 @@
|
|
18
18
|
{#if asChild}
|
19
19
|
{@render asChild(mergedProps)}
|
20
20
|
{:else}
|
21
|
-
<div {...mergedProps}>
|
21
|
+
<div bind:this={e} {...mergedProps}>
|
22
22
|
{@render children?.()}
|
23
23
|
</div>
|
24
24
|
{/if}
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import type { CreateCheckboxReturn } from './create-checkbox.svelte.js';
|
2
|
-
export declare const getCheckboxContext: () => CreateCheckboxReturn, setCheckboxContext: (context: CreateCheckboxReturn | (() => CreateCheckboxReturn)) =>
|
2
|
+
export declare const getCheckboxContext: () => CreateCheckboxReturn, setCheckboxContext: (context: CreateCheckboxReturn | (() => CreateCheckboxReturn)) => CreateCheckboxReturn;
|
@@ -8,7 +8,7 @@
|
|
8
8
|
import {mergeProps} from '../merge-props.js';
|
9
9
|
import {getCheckboxContext} from './context.svelte.js';
|
10
10
|
|
11
|
-
let {asChild, children, ...props}: CheckboxControlProps = $props();
|
11
|
+
let {this: e, asChild, children, ...props}: CheckboxControlProps = $props();
|
12
12
|
|
13
13
|
let checkbox = getCheckboxContext();
|
14
14
|
|
@@ -18,7 +18,7 @@
|
|
18
18
|
{#if asChild}
|
19
19
|
{@render asChild(mergedProps)}
|
20
20
|
{:else}
|
21
|
-
<div {...mergedProps}>
|
21
|
+
<div bind:this={e} {...mergedProps}>
|
22
22
|
{@render children?.()}
|
23
23
|
</div>
|
24
24
|
{/if}
|
@@ -9,7 +9,7 @@
|
|
9
9
|
import {mergeProps} from '../merge-props.js';
|
10
10
|
import {getCheckboxContext} from './context.svelte.js';
|
11
11
|
|
12
|
-
let {asChild, ...props}: CheckboxHiddenInputProps = $props();
|
12
|
+
let {this: e, asChild, ...props}: CheckboxHiddenInputProps = $props();
|
13
13
|
|
14
14
|
let checkbox = getCheckboxContext();
|
15
15
|
|
@@ -19,5 +19,5 @@
|
|
19
19
|
{#if asChild}
|
20
20
|
{@render asChild(mergedProps)}
|
21
21
|
{:else}
|
22
|
-
<input {...mergedProps} />
|
22
|
+
<input bind:this={e} {...mergedProps} />
|
23
23
|
{/if}
|
@@ -8,7 +8,7 @@
|
|
8
8
|
import {mergeProps} from '../merge-props.js';
|
9
9
|
import {getCheckboxContext} from './context.svelte.js';
|
10
10
|
|
11
|
-
let {asChild, children, ...props}: CheckboxIndicatorProps = $props();
|
11
|
+
let {this: e, asChild, children, ...props}: CheckboxIndicatorProps = $props();
|
12
12
|
|
13
13
|
let checkbox = getCheckboxContext();
|
14
14
|
|
@@ -18,7 +18,7 @@
|
|
18
18
|
{#if asChild}
|
19
19
|
{@render asChild(mergedProps)}
|
20
20
|
{:else}
|
21
|
-
<div {...mergedProps}>
|
21
|
+
<div bind:this={e} {...mergedProps}>
|
22
22
|
{@render children?.()}
|
23
23
|
</div>
|
24
24
|
{/if}
|
@@ -8,7 +8,7 @@
|
|
8
8
|
import {mergeProps} from '../merge-props.js';
|
9
9
|
import {getCheckboxContext} from './context.svelte.js';
|
10
10
|
|
11
|
-
let {asChild, children, ...props}: CheckboxLabelProps = $props();
|
11
|
+
let {this: e, asChild, children, ...props}: CheckboxLabelProps = $props();
|
12
12
|
|
13
13
|
let checkbox = getCheckboxContext();
|
14
14
|
|
@@ -18,7 +18,7 @@
|
|
18
18
|
{#if asChild}
|
19
19
|
{@render asChild(mergedProps)}
|
20
20
|
{:else}
|
21
|
-
<span {...mergedProps}>
|
21
|
+
<span bind:this={e} {...mergedProps}>
|
22
22
|
{@render children?.()}
|
23
23
|
</span>
|
24
24
|
{/if}
|
@@ -20,7 +20,7 @@
|
|
20
20
|
|
21
21
|
import {reflect} from '@zag-js/svelte';
|
22
22
|
|
23
|
-
let {asChild, children, ...props}: CheckboxProps = $props();
|
23
|
+
let {this: e, asChild, children, ...props}: CheckboxProps = $props();
|
24
24
|
|
25
25
|
let [checkboxProps, localProps] = $derived(
|
26
26
|
createSplitProps<CreateCheckboxProps>([
|
@@ -48,7 +48,7 @@
|
|
48
48
|
{#if asChild}
|
49
49
|
{@render asChild(mergedProps, checkbox)}
|
50
50
|
{:else}
|
51
|
-
<label {...mergedProps}>
|
51
|
+
<label bind:this={e} {...mergedProps}>
|
52
52
|
{@render children?.(checkbox)}
|
53
53
|
</label>
|
54
54
|
{/if}
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import type { CreateClipboardReturn } from './create-clipboard.svelte.js';
|
2
|
-
export declare const getClipboardContext: () => CreateClipboardReturn, setClipboardContext: (context: CreateClipboardReturn | (() => CreateClipboardReturn)) =>
|
2
|
+
export declare const getClipboardContext: () => CreateClipboardReturn, setClipboardContext: (context: CreateClipboardReturn | (() => CreateClipboardReturn)) => CreateClipboardReturn;
|
@@ -8,7 +8,7 @@
|
|
8
8
|
import {mergeProps} from '../merge-props.js';
|
9
9
|
import {getClipboardContext} from './context.svelte.js';
|
10
10
|
|
11
|
-
let {asChild, children, ...props}: ClipboardControlProps = $props();
|
11
|
+
let {this: e, asChild, children, ...props}: ClipboardControlProps = $props();
|
12
12
|
|
13
13
|
let clipboard = getClipboardContext();
|
14
14
|
|
@@ -18,7 +18,7 @@
|
|
18
18
|
{#if asChild}
|
19
19
|
{@render asChild(mergedProps)}
|
20
20
|
{:else}
|
21
|
-
<div {...mergedProps}>
|
21
|
+
<div bind:this={e} {...mergedProps}>
|
22
22
|
{@render children?.()}
|
23
23
|
</div>
|
24
24
|
{/if}
|
@@ -11,6 +11,7 @@
|
|
11
11
|
import {getClipboardContext} from './context.svelte.js';
|
12
12
|
|
13
13
|
let {
|
14
|
+
this: e,
|
14
15
|
copied = false,
|
15
16
|
asChild,
|
16
17
|
children,
|
@@ -27,7 +28,7 @@
|
|
27
28
|
{#if asChild}
|
28
29
|
{@render asChild(mergedProps)}
|
29
30
|
{:else}
|
30
|
-
<span {...mergedProps}>
|
31
|
+
<span bind:this={e} {...mergedProps}>
|
31
32
|
{@render children?.()}
|
32
33
|
</span>
|
33
34
|
{/if}
|
@@ -8,7 +8,7 @@
|
|
8
8
|
import {mergeProps} from '../merge-props.js';
|
9
9
|
import {getClipboardContext} from './context.svelte.js';
|
10
10
|
|
11
|
-
let {asChild, ...props}: ClipboardInputProps = $props();
|
11
|
+
let {this: e, asChild, ...props}: ClipboardInputProps = $props();
|
12
12
|
|
13
13
|
let clipboard = getClipboardContext();
|
14
14
|
|
@@ -18,5 +18,5 @@
|
|
18
18
|
{#if asChild}
|
19
19
|
{@render asChild(mergedProps)}
|
20
20
|
{:else}
|
21
|
-
<input {...mergedProps} />
|
21
|
+
<input bind:this={e} {...mergedProps} />
|
22
22
|
{/if}
|
@@ -8,7 +8,7 @@
|
|
8
8
|
import {mergeProps} from '../merge-props.js';
|
9
9
|
import {getClipboardContext} from './context.svelte.js';
|
10
10
|
|
11
|
-
let {asChild, children, ...props}: ClipboardLabelProps = $props();
|
11
|
+
let {this: e, asChild, children, ...props}: ClipboardLabelProps = $props();
|
12
12
|
|
13
13
|
let clipboard = getClipboardContext();
|
14
14
|
|
@@ -18,7 +18,7 @@
|
|
18
18
|
{#if asChild}
|
19
19
|
{@render asChild(mergedProps)}
|
20
20
|
{:else}
|
21
|
-
<label {...mergedProps}>
|
21
|
+
<label bind:this={e} {...mergedProps}>
|
22
22
|
{@render children?.()}
|
23
23
|
</label>
|
24
24
|
{/if}
|
@@ -19,7 +19,7 @@
|
|
19
19
|
import {setClipboardContext} from './context.svelte.js';
|
20
20
|
import {createClipboard} from './create-clipboard.svelte.js';
|
21
21
|
|
22
|
-
let {asChild, children, ...props}: ClipboardProps = $props();
|
22
|
+
let {this: e, asChild, children, ...props}: ClipboardProps = $props();
|
23
23
|
|
24
24
|
let [clipboardProps, localProps] = $derived(
|
25
25
|
createSplitProps<CreateClipboardProps>([
|
@@ -41,7 +41,7 @@
|
|
41
41
|
{#if asChild}
|
42
42
|
{@render asChild(mergedProps, clipboard)}
|
43
43
|
{:else}
|
44
|
-
<div {...mergedProps}>
|
44
|
+
<div bind:this={e} {...mergedProps}>
|
45
45
|
{@render children?.(clipboard)}
|
46
46
|
</div>
|
47
47
|
{/if}
|
@@ -9,7 +9,7 @@
|
|
9
9
|
import {mergeProps} from '../merge-props.js';
|
10
10
|
import {getClipboardContext} from './context.svelte.js';
|
11
11
|
|
12
|
-
let {asChild, children, ...props}: ClipboardTriggerProps = $props();
|
12
|
+
let {this: e, asChild, children, ...props}: ClipboardTriggerProps = $props();
|
13
13
|
|
14
14
|
let clipboard = getClipboardContext();
|
15
15
|
|
@@ -19,7 +19,7 @@
|
|
19
19
|
{#if asChild}
|
20
20
|
{@render asChild(mergedProps)}
|
21
21
|
{:else}
|
22
|
-
<button type="button" {...mergedProps}>
|
22
|
+
<button bind:this={e} type="button" {...mergedProps}>
|
23
23
|
{@render children?.()}
|
24
24
|
</button>
|
25
25
|
{/if}
|