ui-ingredients 0.0.44 → 0.0.46
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -0
- package/dist/accordion/context.svelte.d.ts +2 -2
- package/dist/accordion/create-accordion.svelte.js +3 -4
- package/dist/accordion/item-content.svelte +14 -13
- package/dist/accordion/item-indicator.svelte +7 -2
- package/dist/accordion/item-trigger.svelte +7 -2
- package/dist/accordion/item.svelte +4 -4
- package/dist/accordion/root.svelte +61 -63
- package/dist/avatar/context.svelte.d.ts +1 -1
- package/dist/avatar/create-avatar.svelte.js +3 -4
- package/dist/avatar/fallback.svelte +2 -2
- package/dist/avatar/image.svelte +2 -2
- package/dist/avatar/root.svelte +4 -4
- package/dist/carousel/context.svelte.d.ts +1 -1
- package/dist/carousel/create-carousel.svelte.js +3 -4
- package/dist/carousel/indicator-group.svelte +7 -2
- package/dist/carousel/indicator.svelte +4 -4
- package/dist/carousel/item-group.svelte +2 -2
- package/dist/carousel/item.svelte +4 -4
- package/dist/carousel/next-trigger.svelte +7 -2
- package/dist/carousel/prev-trigger.svelte +7 -2
- package/dist/carousel/root.svelte +4 -4
- 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/create-checkbox.svelte.js +4 -5
- 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 +4 -4
- package/dist/clipboard/context.svelte.d.ts +1 -1
- package/dist/clipboard/control.svelte +2 -2
- package/dist/clipboard/create-clipboard.svelte.js +3 -4
- 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 +4 -4
- 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/create-collapsible.svelte.js +3 -4
- package/dist/collapsible/root.svelte +4 -4
- package/dist/collapsible/trigger.svelte +7 -2
- package/dist/color-picker/context.svelte.d.ts +5 -5
- package/dist/color-picker/create-color-picker.svelte.js +3 -4
- package/dist/color-picker/root.svelte +2 -2
- 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/create-combobox.svelte.js +4 -5
- 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 +4 -4
- 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 +12 -18
- package/dist/combobox/trigger.svelte +2 -2
- package/dist/create-context.svelte.d.ts +8 -3
- package/dist/create-context.svelte.js +15 -20
- 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/create-date-picker.svelte.js +2 -3
- package/dist/date-picker/day-table-cell-trigger.svelte +7 -3
- package/dist/date-picker/day-table-cell.svelte +9 -4
- 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 +9 -4
- 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 +12 -20
- 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 +9 -4
- package/dist/dialog/backdrop.svelte +9 -14
- 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/create-dialog.svelte.js +3 -4
- package/dist/dialog/description.svelte +2 -2
- package/dist/dialog/positioner.svelte +2 -2
- package/dist/dialog/root.svelte +6 -12
- 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/create-editable.svelte.js +4 -5
- 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 +4 -4
- package/dist/editable/submit-trigger.svelte +7 -2
- package/dist/environment-provider/context.svelte.d.ts +1 -1
- package/dist/environment-provider/root.svelte +5 -8
- package/dist/field/context.svelte.d.ts +1 -1
- package/dist/field/create-field.svelte.d.ts +1 -22
- package/dist/field/create-field.svelte.js +9 -20
- 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 +4 -4
- 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/create-file-upload.svelte.js +4 -5
- 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 +4 -4
- package/dist/file-upload/label.svelte +2 -2
- package/dist/file-upload/root.svelte +4 -4
- 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/create-floating-panel.svelte.js +3 -4
- 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 +9 -4
- package/dist/floating-panel/restore-trigger.svelte +7 -3
- package/dist/floating-panel/root.svelte +6 -11
- package/dist/floating-panel/title.svelte +7 -2
- package/dist/floating-panel/trigger.svelte +7 -2
- package/dist/highlight/highlight.svelte +42 -0
- package/dist/highlight/highlight.svelte.d.ts +18 -0
- package/dist/highlight/index.d.ts +1 -0
- package/dist/highlight/index.js +1 -0
- package/dist/hover-card/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/create-hover-card.svelte.js +3 -4
- package/dist/hover-card/positioner.svelte +7 -2
- package/dist/hover-card/root.svelte +6 -11
- package/dist/hover-card/trigger.svelte +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/locale-provider/context.svelte.d.ts +1 -1
- package/dist/locale-provider/root.svelte +8 -6
- 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/create-menu.svelte.js +3 -4
- 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 +4 -4
- package/dist/menu/option-item-indicator.svelte +7 -2
- package/dist/menu/option-item-text.svelte +7 -2
- package/dist/menu/option-item.svelte +4 -4
- package/dist/menu/positioner.svelte +2 -2
- package/dist/menu/root.svelte +6 -12
- 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/create-number-input.svelte.js +4 -5
- 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 +4 -4
- package/dist/number-input/scrubber.svelte +7 -2
- package/dist/pagination/context.svelte.d.ts +1 -1
- package/dist/pagination/create-pagination.svelte.js +3 -4
- 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 +4 -4
- package/dist/pin-input/clear-trigger.svelte +7 -2
- package/dist/pin-input/context.svelte.d.ts +1 -1
- package/dist/pin-input/create-pin-input.svelte.js +4 -5
- 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 +4 -4
- 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/create-popover.svelte.js +3 -4
- package/dist/popover/description.svelte +7 -2
- package/dist/popover/positioner.svelte +2 -2
- package/dist/popover/root.svelte +6 -11
- 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/presence/root.svelte +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/create-progress.svelte.js +3 -4
- package/dist/progress/label.svelte +2 -2
- package/dist/progress/range.svelte +2 -2
- package/dist/progress/root.svelte +4 -4
- 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/create-qr-code.svelte.js +3 -4
- 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 +4 -4
- package/dist/radio-group/context.svelte.d.ts +2 -2
- package/dist/radio-group/create-radio-group.svelte.js +3 -4
- 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 +4 -4
- package/dist/radio-group/label.svelte +2 -2
- package/dist/radio-group/root.svelte +4 -4
- package/dist/rating-group/context.svelte.d.ts +1 -1
- package/dist/rating-group/control.svelte +7 -2
- package/dist/rating-group/create-rating-group.svelte.js +4 -5
- 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 +4 -4
- package/dist/segment-group/context.svelte.d.ts +2 -2
- package/dist/segment-group/create-segment-group.svelte.js +3 -4
- 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 +4 -4
- package/dist/segment-group/label.svelte +2 -2
- package/dist/segment-group/root.svelte +4 -4
- 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 +4 -5
- 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 +4 -4
- 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 +13 -21
- 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/create-signature-pad.svelte.js +3 -4
- 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 +4 -4
- 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/create-slider.svelte.js +3 -4
- 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 +4 -4
- package/dist/slider/thumb.svelte +4 -4
- 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/create-splitter.svelte.js +3 -4
- package/dist/splitter/panel.svelte +4 -4
- package/dist/splitter/resize-trigger.svelte +9 -4
- package/dist/splitter/root.svelte +4 -4
- 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/create-steps.svelte.js +3 -4
- package/dist/steps/indicator.svelte +2 -2
- package/dist/steps/item.svelte +4 -4
- 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 +4 -4
- 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 +7 -8
- package/dist/switch/hidden-input.svelte +4 -4
- package/dist/switch/label.svelte +4 -4
- package/dist/switch/root.svelte +8 -8
- package/dist/switch/thumb.svelte +4 -4
- package/dist/tabs/content.svelte +4 -4
- package/dist/tabs/context.svelte.d.ts +1 -1
- package/dist/tabs/create-tabs.svelte.js +3 -4
- package/dist/tabs/list.svelte +2 -2
- package/dist/tabs/root.svelte +4 -4
- package/dist/tabs/trigger.svelte +4 -4
- 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/create-tags-input.svelte.js +4 -5
- 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 +4 -4
- package/dist/tags-input/label.svelte +2 -2
- package/dist/tags-input/root.svelte +4 -4
- 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/create-time-picker.svelte.js +3 -4
- 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 +13 -23
- 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/create-timer.svelte.js +3 -4
- package/dist/timer/item-label.svelte +2 -2
- package/dist/timer/item-value.svelte +2 -2
- package/dist/timer/item.svelte +4 -4
- package/dist/timer/root.svelte +4 -4
- 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/create-toast.svelte.js +1 -2
- package/dist/toast/create-toaster.svelte.js +2 -3
- 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/create-toggle-group.svelte.js +3 -4
- package/dist/toggle-group/item.svelte +4 -4
- package/dist/toggle-group/root.svelte +4 -4
- 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/create-tooltip.svelte.js +3 -4
- package/dist/tooltip/positioner.svelte +2 -2
- package/dist/tooltip/root.svelte +6 -12
- 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/create-tour.svelte.js +3 -4
- package/dist/tour/description.svelte +2 -2
- package/dist/tour/next-trigger.svelte +2 -2
- package/dist/tour/overlay.svelte +9 -14
- 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/root.svelte +6 -11
- 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 +4 -4
- package/dist/tree-view/context.svelte.d.ts +3 -3
- package/dist/tree-view/create-tree-view.svelte.js +3 -4
- package/dist/tree-view/item-indicator.svelte +7 -2
- package/dist/tree-view/item-text.svelte +2 -2
- package/dist/tree-view/item.svelte +4 -4
- package/dist/tree-view/label.svelte +2 -2
- package/dist/tree-view/root.svelte +4 -4
- package/dist/tree-view/tree.svelte +2 -2
- package/dist/types.d.ts +2 -1
- package/package.json +176 -175
@@ -10,7 +10,12 @@
|
|
10
10
|
import {getPresenceContext} from '../presence/context.svelte.js';
|
11
11
|
import {getTimePickerContext} from './context.svelte.js';
|
12
12
|
|
13
|
-
let {
|
13
|
+
let {
|
14
|
+
this: e,
|
15
|
+
asChild,
|
16
|
+
children,
|
17
|
+
...props
|
18
|
+
}: TimePickerPositionerProps = $props();
|
14
19
|
|
15
20
|
let timePicker = getTimePickerContext();
|
16
21
|
let presence = getPresenceContext();
|
@@ -27,7 +32,7 @@
|
|
27
32
|
{#if asChild}
|
28
33
|
{@render asChild(mergedProps)}
|
29
34
|
{:else}
|
30
|
-
<div {...mergedProps}>
|
35
|
+
<div bind:this={e} {...mergedProps}>
|
31
36
|
{@render children?.()}
|
32
37
|
</div>
|
33
38
|
{/if}
|
@@ -23,9 +23,9 @@
|
|
23
23
|
import {setTimePickerContext} from './context.svelte.js';
|
24
24
|
import {createTimePicker} from './create-time-picker.svelte.js';
|
25
25
|
|
26
|
-
let {asChild, children, ...props}: TimePickerProps = $props();
|
26
|
+
let {this: e, asChild, children, ...props}: TimePickerProps = $props();
|
27
27
|
|
28
|
-
let [timePickerProps,
|
28
|
+
let [timePickerProps, rest] = $derived(
|
29
29
|
createSplitProps<CreateTimePickerProps>([
|
30
30
|
'id',
|
31
31
|
'ids',
|
@@ -49,30 +49,20 @@
|
|
49
49
|
])(props),
|
50
50
|
);
|
51
51
|
|
52
|
-
let
|
53
|
-
|
54
|
-
let [presenceStrategyProps, elementProps] = $derived(
|
55
|
-
createSplitProps<PresenceStrategyProps>(['lazyMount', 'keepMounted'])(
|
56
|
-
otherProps,
|
57
|
-
),
|
52
|
+
let [presenceStrategyProps, localProps] = $derived(
|
53
|
+
createSplitProps<PresenceStrategyProps>(['lazyMount', 'keepMounted'])(rest),
|
58
54
|
);
|
59
55
|
|
60
|
-
let
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
},
|
67
|
-
get keepMounted() {
|
68
|
-
return presenceStrategyProps.keepMounted;
|
69
|
-
},
|
70
|
-
});
|
71
|
-
|
72
|
-
let mergedProps = $derived(
|
73
|
-
mergeProps(elementProps, timePicker.getRootProps()),
|
56
|
+
let timePicker = createTimePicker(reflect(() => timePickerProps));
|
57
|
+
let presence = createPresence(
|
58
|
+
reflect(() => ({
|
59
|
+
...presenceStrategyProps,
|
60
|
+
present: timePicker.open,
|
61
|
+
})),
|
74
62
|
);
|
75
63
|
|
64
|
+
let mergedProps = $derived(mergeProps(localProps, timePicker.getRootProps()));
|
65
|
+
|
76
66
|
setTimePickerContext(timePicker);
|
77
67
|
setPresenceContext(presence);
|
78
68
|
</script>
|
@@ -80,7 +70,7 @@
|
|
80
70
|
{#if asChild}
|
81
71
|
{@render asChild(mergedProps, timePicker)}
|
82
72
|
{:else}
|
83
|
-
<div {...mergedProps}>
|
73
|
+
<div bind:this={e} {...mergedProps}>
|
84
74
|
{@render children?.(timePicker)}
|
85
75
|
</div>
|
86
76
|
{/if}
|
@@ -10,8 +10,13 @@
|
|
10
10
|
import {mergeProps} from '../merge-props.js';
|
11
11
|
import {getTimePickerContext} from './context.svelte.js';
|
12
12
|
|
13
|
-
let {
|
14
|
-
|
13
|
+
let {
|
14
|
+
this: e,
|
15
|
+
value,
|
16
|
+
asChild,
|
17
|
+
children,
|
18
|
+
...props
|
19
|
+
}: TimePickerSecondCellProps = $props();
|
15
20
|
|
16
21
|
let timePicker = getTimePickerContext();
|
17
22
|
|
@@ -23,7 +28,7 @@
|
|
23
28
|
{#if asChild}
|
24
29
|
{@render asChild(mergedProps)}
|
25
30
|
{:else}
|
26
|
-
<div {...mergedProps}>
|
31
|
+
<div bind:this={e} {...mergedProps}>
|
27
32
|
{@render children?.()}
|
28
33
|
</div>
|
29
34
|
{/if}
|
@@ -8,7 +8,7 @@
|
|
8
8
|
import {mergeProps} from '../merge-props.js';
|
9
9
|
import {getTimePickerContext} from './context.svelte.js';
|
10
10
|
|
11
|
-
let {asChild, children, ...props}: TimePickerSpacerProps = $props();
|
11
|
+
let {this: e, asChild, children, ...props}: TimePickerSpacerProps = $props();
|
12
12
|
|
13
13
|
let timePicker = getTimePickerContext();
|
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}
|
@@ -9,7 +9,7 @@
|
|
9
9
|
import {mergeProps} from '../merge-props.js';
|
10
10
|
import {getTimePickerContext} from './context.svelte.js';
|
11
11
|
|
12
|
-
let {asChild, children, ...props}: TimePickerTriggerProps = $props();
|
12
|
+
let {this: e, asChild, children, ...props}: TimePickerTriggerProps = $props();
|
13
13
|
|
14
14
|
let timePicker = getTimePickerContext();
|
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}
|
@@ -10,7 +10,13 @@
|
|
10
10
|
import {mergeProps} from '../merge-props.js';
|
11
11
|
import {getTimerContext} from './context.svelte.js';
|
12
12
|
|
13
|
-
let {
|
13
|
+
let {
|
14
|
+
this: e,
|
15
|
+
action,
|
16
|
+
asChild,
|
17
|
+
children,
|
18
|
+
...props
|
19
|
+
}: TimerActionTriggerProps = $props();
|
14
20
|
|
15
21
|
let timer = getTimerContext();
|
16
22
|
|
@@ -22,7 +28,7 @@
|
|
22
28
|
{#if asChild}
|
23
29
|
{@render asChild(mergedProps)}
|
24
30
|
{:else}
|
25
|
-
<button type="button" {...mergedProps}>
|
31
|
+
<button bind:this={e} type="button" {...mergedProps}>
|
26
32
|
{@render children?.()}
|
27
33
|
</button>
|
28
34
|
{/if}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import type { ItemProps } from '@zag-js/timer';
|
2
2
|
import type { CreateTimerReturn } from './create-timer.svelte.js';
|
3
|
-
export declare const getTimerContext: () => CreateTimerReturn, setTimerContext: (context: CreateTimerReturn | (() => CreateTimerReturn)) =>
|
4
|
-
export declare const getTimerItemPropsContext: () => ItemProps, setTimerItemPropsContext: (context: ItemProps | (() => ItemProps)) =>
|
3
|
+
export declare const getTimerContext: () => CreateTimerReturn, setTimerContext: (context: CreateTimerReturn | (() => CreateTimerReturn)) => CreateTimerReturn;
|
4
|
+
export declare const getTimerItemPropsContext: () => ItemProps, setTimerItemPropsContext: (context: ItemProps | (() => ItemProps)) => ItemProps;
|
@@ -5,12 +5,11 @@ import { uid } from 'uid';
|
|
5
5
|
export function createTimer(props) {
|
6
6
|
const environment = getEnvironmentContext();
|
7
7
|
const id = uid();
|
8
|
-
const context =
|
8
|
+
const context = reflect(() => ({
|
9
9
|
...props,
|
10
10
|
id: props.id ?? id,
|
11
11
|
getRootNode: environment?.getRootNode,
|
12
|
-
}))
|
12
|
+
}));
|
13
13
|
const [state, send] = useMachine(timer.machine(context), { context });
|
14
|
-
|
15
|
-
return api;
|
14
|
+
return reflect(() => timer.connect(state, send, normalizeProps));
|
16
15
|
}
|
@@ -8,7 +8,7 @@
|
|
8
8
|
import {mergeProps} from '../merge-props.js';
|
9
9
|
import {getTimerContext, getTimerItemPropsContext} from './context.svelte.js';
|
10
10
|
|
11
|
-
let {asChild, children, ...props}: TimerItemLabelProps = $props();
|
11
|
+
let {this: e, asChild, children, ...props}: TimerItemLabelProps = $props();
|
12
12
|
|
13
13
|
let timer = getTimerContext();
|
14
14
|
let itemProps = getTimerItemPropsContext();
|
@@ -21,7 +21,7 @@
|
|
21
21
|
{#if asChild}
|
22
22
|
{@render asChild(mergedProps)}
|
23
23
|
{:else}
|
24
|
-
<span {...mergedProps}>
|
24
|
+
<span bind:this={e} {...mergedProps}>
|
25
25
|
{@render children?.()}
|
26
26
|
</span>
|
27
27
|
{/if}
|
@@ -8,7 +8,7 @@
|
|
8
8
|
import {mergeProps} from '../merge-props.js';
|
9
9
|
import {getTimerContext, getTimerItemPropsContext} from './context.svelte.js';
|
10
10
|
|
11
|
-
let {asChild, children, ...props}: TimerItemValueProps = $props();
|
11
|
+
let {this: e, asChild, children, ...props}: TimerItemValueProps = $props();
|
12
12
|
|
13
13
|
let timer = getTimerContext();
|
14
14
|
let itemProps = getTimerItemPropsContext();
|
@@ -21,7 +21,7 @@
|
|
21
21
|
{#if asChild}
|
22
22
|
{@render asChild(mergedProps)}
|
23
23
|
{:else}
|
24
|
-
<div {...mergedProps}>
|
24
|
+
<div bind:this={e} {...mergedProps}>
|
25
25
|
{#if children}
|
26
26
|
{@render children?.()}
|
27
27
|
{:else}
|
package/dist/timer/item.svelte
CHANGED
@@ -11,16 +11,16 @@
|
|
11
11
|
import {createSplitProps} from '@zag-js/utils';
|
12
12
|
import {getTimerContext, setTimerItemPropsContext} from './context.svelte.js';
|
13
13
|
|
14
|
-
let {asChild, children, ...props}: TimerItemProps = $props();
|
14
|
+
let {this: e, asChild, children, ...props}: TimerItemProps = $props();
|
15
15
|
|
16
16
|
let timer = getTimerContext();
|
17
17
|
|
18
|
-
let [itemProps,
|
18
|
+
let [itemProps, localProps] = $derived(
|
19
19
|
createSplitProps<ItemProps>(['type'])(props),
|
20
20
|
);
|
21
21
|
|
22
22
|
let mergedProps = $derived(
|
23
|
-
mergeProps(
|
23
|
+
mergeProps(localProps, timer.getItemProps(itemProps)),
|
24
24
|
);
|
25
25
|
|
26
26
|
setTimerItemPropsContext(() => itemProps);
|
@@ -29,7 +29,7 @@
|
|
29
29
|
{#if asChild}
|
30
30
|
{@render asChild(mergedProps)}
|
31
31
|
{:else}
|
32
|
-
<div {...mergedProps}>
|
32
|
+
<div bind:this={e} {...mergedProps}>
|
33
33
|
{@render children?.()}
|
34
34
|
</div>
|
35
35
|
{/if}
|
package/dist/timer/root.svelte
CHANGED
@@ -19,9 +19,9 @@
|
|
19
19
|
import {setTimerContext} from './context.svelte.js';
|
20
20
|
import {createTimer} from './create-timer.svelte.js';
|
21
21
|
|
22
|
-
let {asChild, children, ...props}: TimerProps = $props();
|
22
|
+
let {this: e, asChild, children, ...props}: TimerProps = $props();
|
23
23
|
|
24
|
-
let [timerProps,
|
24
|
+
let [timerProps, localProps] = $derived(
|
25
25
|
createSplitProps<CreateTimerProps>([
|
26
26
|
'id',
|
27
27
|
'startMs',
|
@@ -36,7 +36,7 @@
|
|
36
36
|
|
37
37
|
let timer = createTimer(reflect(() => timerProps));
|
38
38
|
|
39
|
-
let mergedProps = $derived(mergeProps(
|
39
|
+
let mergedProps = $derived(mergeProps(localProps, timer.getRootProps()));
|
40
40
|
|
41
41
|
setTimerContext(timer);
|
42
42
|
</script>
|
@@ -44,7 +44,7 @@
|
|
44
44
|
{#if asChild}
|
45
45
|
{@render asChild(mergedProps, timer)}
|
46
46
|
{:else}
|
47
|
-
<div {...mergedProps}>
|
47
|
+
<div bind:this={e} {...mergedProps}>
|
48
48
|
{@render children?.(timer)}
|
49
49
|
</div>
|
50
50
|
{/if}
|
@@ -8,7 +8,7 @@
|
|
8
8
|
import {mergeProps} from '../merge-props.js';
|
9
9
|
import {getTimerContext} from './context.svelte.js';
|
10
10
|
|
11
|
-
let {asChild, children, ...props}: TimerSeparatorProps = $props();
|
11
|
+
let {this: e, asChild, children, ...props}: TimerSeparatorProps = $props();
|
12
12
|
|
13
13
|
let timer = getTimerContext();
|
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}
|
@@ -9,7 +9,12 @@
|
|
9
9
|
import {mergeProps} from '../merge-props.js';
|
10
10
|
import {getToastContext} from './context.svelte.js';
|
11
11
|
|
12
|
-
let {
|
12
|
+
let {
|
13
|
+
this: e,
|
14
|
+
asChild,
|
15
|
+
children,
|
16
|
+
...props
|
17
|
+
}: ToastActionTriggerProps = $props();
|
13
18
|
|
14
19
|
let context = getToastContext();
|
15
20
|
|
@@ -21,7 +26,7 @@
|
|
21
26
|
{#if asChild}
|
22
27
|
{@render asChild(mergedProps)}
|
23
28
|
{:else}
|
24
|
-
<button type="button" {...mergedProps}>
|
29
|
+
<button bind:this={e} type="button" {...mergedProps}>
|
25
30
|
{@render children?.()}
|
26
31
|
</button>
|
27
32
|
{/if}
|
@@ -9,7 +9,7 @@
|
|
9
9
|
import {mergeProps} from '../merge-props.js';
|
10
10
|
import {getToastContext} from './context.svelte.js';
|
11
11
|
|
12
|
-
let {asChild, children, ...props}: ToastCloseTriggerProps = $props();
|
12
|
+
let {this: e, asChild, children, ...props}: ToastCloseTriggerProps = $props();
|
13
13
|
|
14
14
|
let context = getToastContext();
|
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}
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import type { CreateToastReturn } from './create-toast.svelte.js';
|
2
|
-
export declare const getToastContext: () => CreateToastReturn, setToastContext: (context: CreateToastReturn | (() => CreateToastReturn)) =>
|
2
|
+
export declare const getToastContext: () => CreateToastReturn, setToastContext: (context: CreateToastReturn | (() => CreateToastReturn)) => CreateToastReturn;
|
@@ -2,6 +2,5 @@ import { normalizeProps, reflect, useActor } from '@zag-js/svelte';
|
|
2
2
|
import * as toast from '@zag-js/toast';
|
3
3
|
export function createToast(props) {
|
4
4
|
const [state, send] = useActor(props);
|
5
|
-
|
6
|
-
return api;
|
5
|
+
return reflect(() => toast.connect(state, send, normalizeProps));
|
7
6
|
}
|
@@ -13,9 +13,8 @@ export function createToaster(props) {
|
|
13
13
|
dir: locale?.dir,
|
14
14
|
getRootNode: environment?.getRootNode,
|
15
15
|
}));
|
16
|
-
|
16
|
+
return reflect(() => ({
|
17
17
|
machine,
|
18
18
|
...toast.group.connect(machine, machine.send, normalizeProps),
|
19
|
-
}))
|
20
|
-
return api;
|
19
|
+
}));
|
21
20
|
}
|
@@ -8,7 +8,7 @@
|
|
8
8
|
import {mergeProps} from '../merge-props.js';
|
9
9
|
import {getToastContext} from './context.svelte.js';
|
10
10
|
|
11
|
-
let {asChild, children, ...props}: ToastDescriptionProps = $props();
|
11
|
+
let {this: e, asChild, children, ...props}: ToastDescriptionProps = $props();
|
12
12
|
|
13
13
|
let context = getToastContext();
|
14
14
|
|
@@ -18,7 +18,7 @@
|
|
18
18
|
{#if asChild}
|
19
19
|
{@render asChild(mergedProps)}
|
20
20
|
{:else}
|
21
|
-
<p {...mergedProps}>
|
21
|
+
<p bind:this={e} {...mergedProps}>
|
22
22
|
{#if children}
|
23
23
|
{@render children?.()}
|
24
24
|
{:else}
|
@@ -8,7 +8,7 @@
|
|
8
8
|
import {mergeProps} from '../merge-props.js';
|
9
9
|
import {getToastContext} from './context.svelte.js';
|
10
10
|
|
11
|
-
let {asChild, children, ...props}: ToastGhostAfterProps = $props();
|
11
|
+
let {this: e, asChild, children, ...props}: ToastGhostAfterProps = $props();
|
12
12
|
|
13
13
|
let context = getToastContext();
|
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}
|
@@ -8,7 +8,7 @@
|
|
8
8
|
import {mergeProps} from '../merge-props.js';
|
9
9
|
import {getToastContext} from './context.svelte.js';
|
10
10
|
|
11
|
-
let {asChild, children, ...props}: ToastGhostBeforeProps = $props();
|
11
|
+
let {this: e, asChild, children, ...props}: ToastGhostBeforeProps = $props();
|
12
12
|
|
13
13
|
let context = getToastContext();
|
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/toast/root.svelte
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
import {mergeProps} from '../merge-props.js';
|
11
11
|
import {getToastContext} from './context.svelte.js';
|
12
12
|
|
13
|
-
let {asChild, children, ...props}: ToastProps = $props();
|
13
|
+
let {this: e, asChild, children, ...props}: ToastProps = $props();
|
14
14
|
|
15
15
|
let toast = getToastContext();
|
16
16
|
|
@@ -20,7 +20,7 @@
|
|
20
20
|
{#if asChild}
|
21
21
|
{@render asChild(mergedProps, toast)}
|
22
22
|
{:else}
|
23
|
-
<div {...mergedProps}>
|
23
|
+
<div bind:this={e} {...mergedProps}>
|
24
24
|
<div {...toast.getGhostBeforeProps()}></div>
|
25
25
|
{@render children?.(toast)}
|
26
26
|
<div {...toast.getGhostAfterProps()}></div>
|
package/dist/toast/title.svelte
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
import {mergeProps} from '../merge-props.js';
|
9
9
|
import {getToastContext} from './context.svelte.js';
|
10
10
|
|
11
|
-
let {asChild, children, ...props}: ToastTitleProps = $props();
|
11
|
+
let {this: e, asChild, children, ...props}: ToastTitleProps = $props();
|
12
12
|
|
13
13
|
let context = getToastContext();
|
14
14
|
|
@@ -18,7 +18,7 @@
|
|
18
18
|
{#if asChild}
|
19
19
|
{@render asChild(mergedProps)}
|
20
20
|
{:else}
|
21
|
-
<h2 {...mergedProps}>
|
21
|
+
<h2 bind:this={e} {...mergedProps}>
|
22
22
|
{#if children}
|
23
23
|
{@render children?.()}
|
24
24
|
{:else}
|
@@ -16,7 +16,7 @@
|
|
16
16
|
import * as toast from '@zag-js/toast';
|
17
17
|
import ToastActor from './actor.svelte';
|
18
18
|
|
19
|
-
let {toaster, children, ...props}: ToasterProps = $props();
|
19
|
+
let {this: e, toaster, children, ...props}: ToasterProps = $props();
|
20
20
|
|
21
21
|
let [snapshot, send] = useMachine(toaster.machine);
|
22
22
|
|
@@ -27,7 +27,7 @@
|
|
27
27
|
</script>
|
28
28
|
|
29
29
|
<Portal>
|
30
|
-
<div {...mergedProps}>
|
30
|
+
<div bind:this={e} {...mergedProps}>
|
31
31
|
{#each toasts as toast (toast.id)}
|
32
32
|
<ToastActor actor={toast}>
|
33
33
|
{#snippet children$(ctx)}
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import type { CreateToggleGroupReturn } from './create-toggle-group.svelte.js';
|
2
|
-
export declare const getToggleGroupContext: () => CreateToggleGroupReturn, setToggleGroupContext: (context: CreateToggleGroupReturn | (() => CreateToggleGroupReturn)) =>
|
2
|
+
export declare const getToggleGroupContext: () => CreateToggleGroupReturn, setToggleGroupContext: (context: CreateToggleGroupReturn | (() => CreateToggleGroupReturn)) => CreateToggleGroupReturn;
|
@@ -7,13 +7,12 @@ export function createToggleGroup(props) {
|
|
7
7
|
const locale = getLocaleContext();
|
8
8
|
const environment = getEnvironmentContext();
|
9
9
|
const id = uid();
|
10
|
-
const context =
|
10
|
+
const context = reflect(() => ({
|
11
11
|
...props,
|
12
12
|
id: props.id ?? id,
|
13
13
|
dir: locale?.dir,
|
14
14
|
getRootNode: environment?.getRootNode,
|
15
|
-
}))
|
15
|
+
}));
|
16
16
|
const [state, send] = useMachine(toggleGroup.machine(context), { context });
|
17
|
-
|
18
|
-
return api;
|
17
|
+
return reflect(() => toggleGroup.connect(state, send, normalizeProps));
|
19
18
|
}
|
@@ -11,25 +11,25 @@
|
|
11
11
|
import {createSplitProps} from '@zag-js/utils';
|
12
12
|
import {getToggleGroupContext} from './context.svelte.js';
|
13
13
|
|
14
|
-
let {asChild, children, ...props}: ToggleGroupItemProps = $props();
|
14
|
+
let {this: e, asChild, children, ...props}: ToggleGroupItemProps = $props();
|
15
15
|
|
16
16
|
let toggleGroup = getToggleGroupContext();
|
17
17
|
|
18
|
-
let [itemProps,
|
18
|
+
let [itemProps, localProps] = $derived(
|
19
19
|
createSplitProps<ItemProps>(['value', 'disabled'])(props),
|
20
20
|
);
|
21
21
|
|
22
22
|
let itemState = $derived(toggleGroup.getItemState(itemProps));
|
23
23
|
|
24
24
|
let mergedProps = $derived(
|
25
|
-
mergeProps(
|
25
|
+
mergeProps(localProps, toggleGroup.getItemProps(itemProps)),
|
26
26
|
);
|
27
27
|
</script>
|
28
28
|
|
29
29
|
{#if asChild}
|
30
30
|
{@render asChild(mergedProps, itemState)}
|
31
31
|
{:else}
|
32
|
-
<button type="button" {...mergedProps}>
|
32
|
+
<button bind:this={e} type="button" {...mergedProps}>
|
33
33
|
{@render children?.(itemState)}
|
34
34
|
</button>
|
35
35
|
{/if}
|
@@ -19,9 +19,9 @@
|
|
19
19
|
import {setToggleGroupContext} from './context.svelte.js';
|
20
20
|
import {createToggleGroup} from './create-toggle-group.svelte.js';
|
21
21
|
|
22
|
-
let {asChild, children, ...props}: ToggleGroupProps = $props();
|
22
|
+
let {this: e, asChild, children, ...props}: ToggleGroupProps = $props();
|
23
23
|
|
24
|
-
let [toggleGroupProps,
|
24
|
+
let [toggleGroupProps, localProps] = $derived(
|
25
25
|
createSplitProps<CreateToggleGroupProps>([
|
26
26
|
'id',
|
27
27
|
'ids',
|
@@ -38,7 +38,7 @@
|
|
38
38
|
let toggleGroup = createToggleGroup(reflect(() => toggleGroupProps));
|
39
39
|
|
40
40
|
let mergedProps = $derived(
|
41
|
-
mergeProps(
|
41
|
+
mergeProps(localProps, toggleGroup.getRootProps()),
|
42
42
|
);
|
43
43
|
|
44
44
|
setToggleGroupContext(toggleGroup);
|
@@ -47,7 +47,7 @@
|
|
47
47
|
{#if asChild}
|
48
48
|
{@render asChild(mergedProps, toggleGroup)}
|
49
49
|
{:else}
|
50
|
-
<div {...mergedProps}>
|
50
|
+
<div bind:this={e} {...mergedProps}>
|
51
51
|
{@render children?.(toggleGroup)}
|
52
52
|
</div>
|
53
53
|
{/if}
|
@@ -8,7 +8,7 @@
|
|
8
8
|
import {mergeProps} from '../merge-props.js';
|
9
9
|
import {getTooltipContext} from './context.svelte.js';
|
10
10
|
|
11
|
-
let {asChild, children, ...props}: TooltipArrowTipProps = $props();
|
11
|
+
let {this: e, asChild, children, ...props}: TooltipArrowTipProps = $props();
|
12
12
|
|
13
13
|
let tooltip = getTooltipContext();
|
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}
|
@@ -8,7 +8,7 @@
|
|
8
8
|
import {mergeProps} from '../merge-props.js';
|
9
9
|
import {getTooltipContext} from './context.svelte.js';
|
10
10
|
|
11
|
-
let {asChild, children, ...props}: TooltipArrowProps = $props();
|
11
|
+
let {this: e, asChild, children, ...props}: TooltipArrowProps = $props();
|
12
12
|
|
13
13
|
let tooltip = getTooltipContext();
|
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}
|
@@ -11,7 +11,7 @@
|
|
11
11
|
import {getPresenceContext} from '../presence/context.svelte.js';
|
12
12
|
import {getTooltipContext} from './context.svelte.js';
|
13
13
|
|
14
|
-
let {asChild, children, ...props}: TooltipContentProps = $props();
|
14
|
+
let {this: e, asChild, children, ...props}: TooltipContentProps = $props();
|
15
15
|
|
16
16
|
let tooltip = getTooltipContext();
|
17
17
|
let presence = getPresenceContext();
|
@@ -25,7 +25,7 @@
|
|
25
25
|
{#if asChild}
|
26
26
|
{@render asChild(presence.ref, mergedProps)}
|
27
27
|
{:else}
|
28
|
-
<div use:presence.ref {...mergedProps}>
|
28
|
+
<div bind:this={e} use:presence.ref {...mergedProps}>
|
29
29
|
{@render children?.()}
|
30
30
|
</div>
|
31
31
|
{/if}
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import type { CreateTooltipReturn } from './create-tooltip.svelte.js';
|
2
|
-
export declare const getTooltipContext: () => CreateTooltipReturn, setTooltipContext: (context: CreateTooltipReturn | (() => CreateTooltipReturn)) =>
|
2
|
+
export declare const getTooltipContext: () => CreateTooltipReturn, setTooltipContext: (context: CreateTooltipReturn | (() => CreateTooltipReturn)) => CreateTooltipReturn;
|
@@ -7,15 +7,14 @@ export function createTooltip(props) {
|
|
7
7
|
const locale = getLocaleContext();
|
8
8
|
const environment = getEnvironmentContext();
|
9
9
|
const id = uid();
|
10
|
-
const context =
|
10
|
+
const context = reflect(() => ({
|
11
11
|
...props,
|
12
12
|
id: props.id ?? id,
|
13
13
|
dir: locale?.dir,
|
14
14
|
open: props.defaultOpen ?? props.open,
|
15
15
|
getRootNode: environment?.getRootNode,
|
16
16
|
'open.controlled': props.open != null,
|
17
|
-
}))
|
17
|
+
}));
|
18
18
|
const [state, send] = useMachine(tooltip.machine(context), { context });
|
19
|
-
|
20
|
-
return api;
|
19
|
+
return reflect(() => tooltip.connect(state, send, normalizeProps));
|
21
20
|
}
|