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
@@ -9,7 +9,12 @@
|
|
9
9
|
import {getPresenceContext} from '../presence/context.svelte.js';
|
10
10
|
import {getComboboxContext} from './context.svelte.js';
|
11
11
|
|
12
|
-
let {
|
12
|
+
let {
|
13
|
+
this: e,
|
14
|
+
asChild,
|
15
|
+
children,
|
16
|
+
...props
|
17
|
+
}: ComboboxPositionerProps = $props();
|
13
18
|
|
14
19
|
let combobox = getComboboxContext();
|
15
20
|
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,15 +23,15 @@
|
|
23
23
|
import {setComboboxContext} from './context.svelte.js';
|
24
24
|
import {createCombobox} from './create-combobox.svelte.js';
|
25
25
|
|
26
|
-
let {asChild, children, ...props}: ComboboxProps<T> = $props();
|
26
|
+
let {this: e, asChild, children, ...props}: ComboboxProps<T> = $props();
|
27
27
|
|
28
|
-
let [presenceStrategyProps,
|
28
|
+
let [presenceStrategyProps, rest] = $derived(
|
29
29
|
createSplitProps<PresenceStrategyProps>(['lazyMount', 'keepMounted'])(
|
30
30
|
props,
|
31
31
|
),
|
32
32
|
);
|
33
33
|
|
34
|
-
let [comboboxProps,
|
34
|
+
let [comboboxProps, localProps] = $derived(
|
35
35
|
createSplitProps<CreateComboboxProps<T>>([
|
36
36
|
'id',
|
37
37
|
'ids',
|
@@ -74,24 +74,18 @@
|
|
74
74
|
'onPointerDownOutside',
|
75
75
|
'getSelectionValue',
|
76
76
|
'scrollToIndexFn',
|
77
|
-
])(
|
77
|
+
])(rest),
|
78
78
|
);
|
79
79
|
|
80
80
|
let combobox = createCombobox(reflect(() => comboboxProps));
|
81
|
+
let presence = createPresence(
|
82
|
+
reflect(() => ({
|
83
|
+
...presenceStrategyProps,
|
84
|
+
present: combobox.open,
|
85
|
+
})),
|
86
|
+
);
|
81
87
|
|
82
|
-
let
|
83
|
-
get present() {
|
84
|
-
return combobox.open;
|
85
|
-
},
|
86
|
-
get lazyMount() {
|
87
|
-
return presenceStrategyProps.lazyMount;
|
88
|
-
},
|
89
|
-
get keepMounted() {
|
90
|
-
return presenceStrategyProps.keepMounted;
|
91
|
-
},
|
92
|
-
});
|
93
|
-
|
94
|
-
let mergedProps = $derived(mergeProps(elementProps, combobox.getRootProps()));
|
88
|
+
let mergedProps = $derived(mergeProps(localProps, combobox.getRootProps()));
|
95
89
|
|
96
90
|
setComboboxContext(combobox);
|
97
91
|
setPresenceContext(presence);
|
@@ -100,7 +94,7 @@
|
|
100
94
|
{#if asChild}
|
101
95
|
{@render asChild(mergedProps, combobox)}
|
102
96
|
{:else}
|
103
|
-
<div {...mergedProps}>
|
97
|
+
<div bind:this={e} {...mergedProps}>
|
104
98
|
{@render children?.(combobox)}
|
105
99
|
</div>
|
106
100
|
{/if}
|
@@ -8,7 +8,7 @@
|
|
8
8
|
import {mergeProps} from '../merge-props.js';
|
9
9
|
import {getComboboxContext} from './context.svelte.js';
|
10
10
|
|
11
|
-
let {asChild, children, ...props}: ComboboxTriggerProps = $props();
|
11
|
+
let {this: e, asChild, children, ...props}: ComboboxTriggerProps = $props();
|
12
12
|
|
13
13
|
let combobox = getComboboxContext();
|
14
14
|
|
@@ -18,7 +18,7 @@
|
|
18
18
|
{#if asChild}
|
19
19
|
{@render asChild(mergedProps)}
|
20
20
|
{:else}
|
21
|
-
<button type="button" {...mergedProps}>
|
21
|
+
<button bind:this={e} type="button" {...mergedProps}>
|
22
22
|
{@render children?.()}
|
23
23
|
</button>
|
24
24
|
{/if}
|
@@ -1,5 +1,10 @@
|
|
1
1
|
import type { GenericObject } from './types.js';
|
2
|
-
type
|
3
|
-
type
|
4
|
-
|
2
|
+
type GetContext<T extends GenericObject> = () => T;
|
3
|
+
type SetContext<T extends GenericObject> = (context: T | (() => T)) => T;
|
4
|
+
type HasContext = () => boolean;
|
5
|
+
export declare function createContext<T extends GenericObject>(key: string, strict?: boolean): [
|
6
|
+
getContext: GetContext<T>,
|
7
|
+
setContext: SetContext<T>,
|
8
|
+
hasContext: HasContext
|
9
|
+
];
|
5
10
|
export {};
|
@@ -1,25 +1,20 @@
|
|
1
1
|
import { reflect } from '@zag-js/svelte';
|
2
2
|
import { getContext, hasContext, setContext } from 'svelte';
|
3
3
|
export function createContext(key, strict = true) {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
4
|
+
const has = () => hasContext(key);
|
5
|
+
const set = (context) => {
|
6
|
+
return setContext(key, typeof context === 'function' ? reflect(context) : context);
|
7
|
+
};
|
8
|
+
const get = () => {
|
9
|
+
if (strict && !has())
|
10
|
+
throw err(key);
|
11
11
|
return getContext(key);
|
12
|
-
}
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
}
|
21
|
-
});
|
22
|
-
setContext(key, v);
|
23
|
-
}
|
24
|
-
return [g, s];
|
12
|
+
};
|
13
|
+
return [get, set, has];
|
14
|
+
}
|
15
|
+
function err(k) {
|
16
|
+
const e = new Error();
|
17
|
+
e.name = 'ContextError';
|
18
|
+
e.message = "No context found for '%s'".replace('%s', k);
|
19
|
+
throw e;
|
25
20
|
}
|
@@ -9,7 +9,12 @@
|
|
9
9
|
import {mergeProps} from '../merge-props.js';
|
10
10
|
import {getDatePickerContext} from './context.svelte.js';
|
11
11
|
|
12
|
-
let {
|
12
|
+
let {
|
13
|
+
this: e,
|
14
|
+
asChild,
|
15
|
+
children,
|
16
|
+
...props
|
17
|
+
}: DatePickerClearTriggerProps = $props();
|
13
18
|
|
14
19
|
let datePicker = getDatePickerContext();
|
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}
|
@@ -11,7 +11,7 @@
|
|
11
11
|
import {getPresenceContext} from '../presence/context.svelte.js';
|
12
12
|
import {getDatePickerContext} from './context.svelte.js';
|
13
13
|
|
14
|
-
let {asChild, children, ...props}: DatePickerContentProps = $props();
|
14
|
+
let {this: e, asChild, children, ...props}: DatePickerContentProps = $props();
|
15
15
|
|
16
16
|
let datePicker = getDatePickerContext();
|
17
17
|
let presence = getPresenceContext();
|
@@ -29,7 +29,7 @@
|
|
29
29
|
{#if asChild}
|
30
30
|
{@render asChild(presence.ref, mergedProps)}
|
31
31
|
{:else}
|
32
|
-
<div use:presence.ref {...mergedProps}>
|
32
|
+
<div bind:this={e} use:presence.ref {...mergedProps}>
|
33
33
|
{@render children?.()}
|
34
34
|
</div>
|
35
35
|
{/if}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import type { DayTableCellProps, TableCellProps, TableProps, ViewProps } from '@zag-js/date-picker';
|
2
2
|
import type { CreateDatePickerReturn } from './create-date-picker.svelte.js';
|
3
|
-
export declare const getDatePickerContext: () => CreateDatePickerReturn, setDatePickerContext: (context: CreateDatePickerReturn | (() => CreateDatePickerReturn)) =>
|
4
|
-
export declare const getDatePickerViewPropsContext: () => ViewProps, setDatePickerViewPropsContext: (context: ViewProps | (() => ViewProps)) =>
|
5
|
-
export declare const getDatePickerTablePropsContext: () => TableProps, setDatePickerTablePropsContext: (context: TableProps | (() => TableProps)) =>
|
6
|
-
export declare const getDatePickerTableCellPropsContext: () => TableCellProps, setDatePickerTableCellPropsContext: (context: TableCellProps | (() => TableCellProps)) =>
|
7
|
-
export declare const getDatePickerDayTableCellPropsContext: () => DayTableCellProps, setDatePickerDayTableCellPropsContext: (context: DayTableCellProps | (() => DayTableCellProps)) =>
|
3
|
+
export declare const getDatePickerContext: () => CreateDatePickerReturn, setDatePickerContext: (context: CreateDatePickerReturn | (() => CreateDatePickerReturn)) => CreateDatePickerReturn;
|
4
|
+
export declare const getDatePickerViewPropsContext: () => ViewProps, setDatePickerViewPropsContext: (context: ViewProps | (() => ViewProps)) => ViewProps;
|
5
|
+
export declare const getDatePickerTablePropsContext: () => TableProps, setDatePickerTablePropsContext: (context: TableProps | (() => TableProps)) => TableProps;
|
6
|
+
export declare const getDatePickerTableCellPropsContext: () => TableCellProps, setDatePickerTableCellPropsContext: (context: TableCellProps | (() => TableCellProps)) => TableCellProps;
|
7
|
+
export declare const getDatePickerDayTableCellPropsContext: () => DayTableCellProps, setDatePickerDayTableCellPropsContext: (context: DayTableCellProps | (() => DayTableCellProps)) => DayTableCellProps;
|
@@ -8,7 +8,7 @@
|
|
8
8
|
import {mergeProps} from '../merge-props.js';
|
9
9
|
import {getDatePickerContext} from './context.svelte.js';
|
10
10
|
|
11
|
-
let {asChild, children, ...props}: DatePickerControlProps = $props();
|
11
|
+
let {this: e, asChild, children, ...props}: DatePickerControlProps = $props();
|
12
12
|
|
13
13
|
let datePicker = getDatePickerContext();
|
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}
|
@@ -24,7 +24,7 @@ export function createDatePicker(props) {
|
|
24
24
|
getRootNode: environment?.getRootNode,
|
25
25
|
});
|
26
26
|
const [state, send] = useMachine(datePicker.machine(context), { context });
|
27
|
-
|
27
|
+
return reflect(() => {
|
28
28
|
const o = datePicker.connect(state, send, normalizeProps);
|
29
29
|
return {
|
30
30
|
...o,
|
@@ -35,6 +35,5 @@ export function createDatePicker(props) {
|
|
35
35
|
};
|
36
36
|
},
|
37
37
|
};
|
38
|
-
})
|
39
|
-
return api;
|
38
|
+
});
|
40
39
|
}
|
@@ -12,8 +12,12 @@
|
|
12
12
|
getDatePickerDayTableCellPropsContext,
|
13
13
|
} from './context.svelte.js';
|
14
14
|
|
15
|
-
let {
|
16
|
-
|
15
|
+
let {
|
16
|
+
this: e,
|
17
|
+
asChild,
|
18
|
+
children,
|
19
|
+
...props
|
20
|
+
}: DatePickerDayTableCellTriggerProps = $props();
|
17
21
|
|
18
22
|
let datePicker = getDatePickerContext();
|
19
23
|
let tableCellProps = getDatePickerDayTableCellPropsContext();
|
@@ -26,7 +30,7 @@
|
|
26
30
|
{#if asChild}
|
27
31
|
{@render asChild(mergedProps)}
|
28
32
|
{:else}
|
29
|
-
<button type="button" {...mergedProps}>
|
33
|
+
<button bind:this={e} type="button" {...mergedProps}>
|
30
34
|
{@render children?.()}
|
31
35
|
</button>
|
32
36
|
{/if}
|
@@ -17,11 +17,16 @@
|
|
17
17
|
setDatePickerDayTableCellPropsContext,
|
18
18
|
} from './context.svelte.js';
|
19
19
|
|
20
|
-
let {
|
20
|
+
let {
|
21
|
+
this: e,
|
22
|
+
asChild,
|
23
|
+
children,
|
24
|
+
...props
|
25
|
+
}: DatePickerDayTableCellProps = $props();
|
21
26
|
|
22
27
|
let datePicker = getDatePickerContext();
|
23
28
|
|
24
|
-
let [tableCellProps,
|
29
|
+
let [tableCellProps, localProps] = $derived(
|
25
30
|
createSplitProps<DayTableCellProps>(['value', 'disabled', 'visibleRange'])(
|
26
31
|
props,
|
27
32
|
),
|
@@ -32,7 +37,7 @@
|
|
32
37
|
);
|
33
38
|
|
34
39
|
let mergedProps = $derived(
|
35
|
-
mergeProps(
|
40
|
+
mergeProps(localProps, datePicker.getDayTableCellProps(tableCellProps)),
|
36
41
|
);
|
37
42
|
|
38
43
|
setDatePickerDayTableCellPropsContext(() => tableCellProps);
|
@@ -41,7 +46,7 @@
|
|
41
46
|
{#if asChild}
|
42
47
|
{@render asChild(mergedProps, tableCellState)}
|
43
48
|
{:else}
|
44
|
-
<td {...mergedProps}>
|
49
|
+
<td bind:this={e} {...mergedProps}>
|
45
50
|
{@render children?.(tableCellState)}
|
46
51
|
</td>
|
47
52
|
{/if}
|
@@ -10,7 +10,7 @@
|
|
10
10
|
import {mergeProps} from '../merge-props.js';
|
11
11
|
import {getDatePickerContext} from './context.svelte.js';
|
12
12
|
|
13
|
-
let {index, asChild, ...props}: DatePickerInputProps = $props();
|
13
|
+
let {this: e, index, asChild, ...props}: DatePickerInputProps = $props();
|
14
14
|
|
15
15
|
let datePicker = getDatePickerContext();
|
16
16
|
|
@@ -22,5 +22,5 @@
|
|
22
22
|
{#if asChild}
|
23
23
|
{@render asChild(mergedProps)}
|
24
24
|
{:else}
|
25
|
-
<input {...mergedProps} />
|
25
|
+
<input bind:this={e} {...mergedProps} />
|
26
26
|
{/if}
|
@@ -10,7 +10,13 @@
|
|
10
10
|
import {mergeProps} from '../merge-props.js';
|
11
11
|
import {getDatePickerContext} from './context.svelte.js';
|
12
12
|
|
13
|
-
let {
|
13
|
+
let {
|
14
|
+
this: e,
|
15
|
+
index,
|
16
|
+
asChild,
|
17
|
+
children,
|
18
|
+
...props
|
19
|
+
}: DatePickerLabelProps = $props();
|
14
20
|
|
15
21
|
let datePicker = getDatePickerContext();
|
16
22
|
|
@@ -22,7 +28,7 @@
|
|
22
28
|
{#if asChild}
|
23
29
|
{@render asChild(mergedProps)}
|
24
30
|
{:else}
|
25
|
-
<label {...mergedProps}>
|
31
|
+
<label bind:this={e} {...mergedProps}>
|
26
32
|
{@render children?.()}
|
27
33
|
</label>
|
28
34
|
{/if}
|
@@ -9,7 +9,12 @@
|
|
9
9
|
import {mergeProps} from '../merge-props.js';
|
10
10
|
import {getDatePickerContext} from './context.svelte.js';
|
11
11
|
|
12
|
-
let {
|
12
|
+
let {
|
13
|
+
this: e,
|
14
|
+
asChild,
|
15
|
+
children,
|
16
|
+
...props
|
17
|
+
}: DatePickerMonthSelectProps = $props();
|
13
18
|
|
14
19
|
let datePicker = getDatePickerContext();
|
15
20
|
|
@@ -36,7 +41,7 @@
|
|
36
41
|
{#if asChild}
|
37
42
|
{@render asChild(mergedProps)}
|
38
43
|
{:else}
|
39
|
-
<select {...mergedProps}>
|
44
|
+
<select bind:this={e} {...mergedProps}>
|
40
45
|
{#if children}
|
41
46
|
{@render children()}
|
42
47
|
{:else}
|
@@ -12,8 +12,12 @@
|
|
12
12
|
getDatePickerTableCellPropsContext,
|
13
13
|
} from './context.svelte.js';
|
14
14
|
|
15
|
-
let {
|
16
|
-
|
15
|
+
let {
|
16
|
+
this: e,
|
17
|
+
asChild,
|
18
|
+
children,
|
19
|
+
...props
|
20
|
+
}: DatePickerMonthTableCellTriggerProps = $props();
|
17
21
|
|
18
22
|
let datePicker = getDatePickerContext();
|
19
23
|
let tableCellProps = getDatePickerTableCellPropsContext();
|
@@ -26,7 +30,7 @@
|
|
26
30
|
{#if asChild}
|
27
31
|
{@render asChild(mergedProps)}
|
28
32
|
{:else}
|
29
|
-
<button type="button" {...mergedProps}>
|
33
|
+
<button bind:this={e} type="button" {...mergedProps}>
|
30
34
|
{@render children?.()}
|
31
35
|
</button>
|
32
36
|
{/if}
|
@@ -14,11 +14,16 @@
|
|
14
14
|
setDatePickerTableCellPropsContext,
|
15
15
|
} from './context.svelte.js';
|
16
16
|
|
17
|
-
let {
|
17
|
+
let {
|
18
|
+
this: e,
|
19
|
+
asChild,
|
20
|
+
children,
|
21
|
+
...props
|
22
|
+
}: DatePickerMonthTableCellProps = $props();
|
18
23
|
|
19
24
|
let datePicker = getDatePickerContext();
|
20
25
|
|
21
|
-
let [tableCellProps,
|
26
|
+
let [tableCellProps, localProps] = $derived(
|
22
27
|
createSplitProps<TableCellProps>(['value', 'disabled', 'columns'])(props),
|
23
28
|
);
|
24
29
|
|
@@ -27,7 +32,7 @@
|
|
27
32
|
);
|
28
33
|
|
29
34
|
let mergedProps = $derived(
|
30
|
-
mergeProps(
|
35
|
+
mergeProps(localProps, datePicker.getMonthTableCellProps(tableCellProps)),
|
31
36
|
);
|
32
37
|
|
33
38
|
setDatePickerTableCellPropsContext(() => tableCellProps);
|
@@ -36,7 +41,7 @@
|
|
36
41
|
{#if asChild}
|
37
42
|
{@render asChild(mergedProps, tableCellState)}
|
38
43
|
{:else}
|
39
|
-
<td {...mergedProps}>
|
44
|
+
<td bind:this={e} {...mergedProps}>
|
40
45
|
{@render children?.(tableCellState)}
|
41
46
|
</td>
|
42
47
|
{/if}
|
@@ -12,7 +12,12 @@
|
|
12
12
|
getDatePickerViewPropsContext,
|
13
13
|
} from './context.svelte.js';
|
14
14
|
|
15
|
-
let {
|
15
|
+
let {
|
16
|
+
this: e,
|
17
|
+
asChild,
|
18
|
+
children,
|
19
|
+
...props
|
20
|
+
}: DatePickerNextTriggerProps = $props();
|
16
21
|
|
17
22
|
let datePicker = getDatePickerContext();
|
18
23
|
let viewProps = getDatePickerViewPropsContext();
|
@@ -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}
|
@@ -10,7 +10,12 @@
|
|
10
10
|
import {getPresenceContext} from '../presence/context.svelte.js';
|
11
11
|
import {getDatePickerContext} from './context.svelte.js';
|
12
12
|
|
13
|
-
let {
|
13
|
+
let {
|
14
|
+
this: e,
|
15
|
+
asChild,
|
16
|
+
children,
|
17
|
+
...props
|
18
|
+
}: DatePickerPositionerProps = $props();
|
14
19
|
|
15
20
|
let datePicker = getDatePickerContext();
|
16
21
|
let presence = getPresenceContext();
|
@@ -28,7 +33,7 @@
|
|
28
33
|
{#if asChild}
|
29
34
|
{@render asChild(mergedProps)}
|
30
35
|
{:else}
|
31
|
-
<div {...mergedProps}>
|
36
|
+
<div bind:this={e} {...mergedProps}>
|
32
37
|
{@render children?.()}
|
33
38
|
</div>
|
34
39
|
{/if}
|
@@ -10,8 +10,13 @@
|
|
10
10
|
import {mergeProps} from '../merge-props.js';
|
11
11
|
import {getDatePickerContext} from './context.svelte.js';
|
12
12
|
|
13
|
-
let {
|
14
|
-
|
13
|
+
let {
|
14
|
+
this: e,
|
15
|
+
value,
|
16
|
+
asChild,
|
17
|
+
children,
|
18
|
+
...props
|
19
|
+
}: DatePickerPresetTriggerProps = $props();
|
15
20
|
|
16
21
|
let datePicker = getDatePickerContext();
|
17
22
|
|
@@ -23,7 +28,7 @@
|
|
23
28
|
{#if asChild}
|
24
29
|
{@render asChild(mergedProps)}
|
25
30
|
{:else}
|
26
|
-
<button type="button" {...mergedProps}>
|
31
|
+
<button bind:this={e} type="button" {...mergedProps}>
|
27
32
|
{@render children?.()}
|
28
33
|
</button>
|
29
34
|
{/if}
|
@@ -12,7 +12,12 @@
|
|
12
12
|
getDatePickerViewPropsContext,
|
13
13
|
} from './context.svelte.js';
|
14
14
|
|
15
|
-
let {
|
15
|
+
let {
|
16
|
+
this: e,
|
17
|
+
asChild,
|
18
|
+
children,
|
19
|
+
...props
|
20
|
+
}: DatePickerPrevTriggerProps = $props();
|
16
21
|
|
17
22
|
let datePicker = getDatePickerContext();
|
18
23
|
let viewProps = getDatePickerViewPropsContext();
|
@@ -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}
|
@@ -9,7 +9,12 @@
|
|
9
9
|
import {mergeProps} from '../merge-props.js';
|
10
10
|
import {getDatePickerContext} from './context.svelte.js';
|
11
11
|
|
12
|
-
let {
|
12
|
+
let {
|
13
|
+
this: e,
|
14
|
+
asChild,
|
15
|
+
children,
|
16
|
+
...props
|
17
|
+
}: DatePickerRangeTextProps = $props();
|
13
18
|
|
14
19
|
let datePicker = getDatePickerContext();
|
15
20
|
|
@@ -19,7 +24,7 @@
|
|
19
24
|
{#if asChild}
|
20
25
|
{@render asChild(mergedProps)}
|
21
26
|
{:else}
|
22
|
-
<span {...mergedProps}>
|
27
|
+
<span bind:this={e} {...mergedProps}>
|
23
28
|
{#if children}
|
24
29
|
{@render children()}
|
25
30
|
{:else}
|
@@ -23,13 +23,13 @@
|
|
23
23
|
import {setDatePickerContext} from './context.svelte.js';
|
24
24
|
import {createDatePicker} from './create-date-picker.svelte.js';
|
25
25
|
|
26
|
-
let {asChild, children, ...props}: DatePickerProps = $props();
|
26
|
+
let {this: e, asChild, children, ...props}: DatePickerProps = $props();
|
27
27
|
|
28
|
-
let [presenceStrategyProps,
|
28
|
+
let [presenceStrategyProps, rest] = $derived(
|
29
29
|
createSplitProps<PresenceStrategyProps>([])(props),
|
30
30
|
);
|
31
31
|
|
32
|
-
let [datePickerProps,
|
32
|
+
let [datePickerProps, localProps] = $derived(
|
33
33
|
createSplitProps<CreateDatePickerProps>([
|
34
34
|
'id',
|
35
35
|
'ids',
|
@@ -59,27 +59,19 @@
|
|
59
59
|
'onValueChange',
|
60
60
|
'onFocusChange',
|
61
61
|
'isDateUnavailable',
|
62
|
-
])(
|
62
|
+
])(rest),
|
63
63
|
);
|
64
64
|
|
65
65
|
let datePicker = createDatePicker(reflect(() => datePickerProps));
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
},
|
71
|
-
get lazyMount() {
|
72
|
-
return presenceStrategyProps.lazyMount;
|
73
|
-
},
|
74
|
-
get keepMounted() {
|
75
|
-
return presenceStrategyProps.keepMounted;
|
76
|
-
},
|
77
|
-
});
|
78
|
-
|
79
|
-
let mergedProps = $derived(
|
80
|
-
mergeProps(elementProps, datePicker.getRootProps()),
|
66
|
+
let presence = createPresence(
|
67
|
+
reflect(() => ({
|
68
|
+
...presenceStrategyProps,
|
69
|
+
present: datePicker.open,
|
70
|
+
})),
|
81
71
|
);
|
82
72
|
|
73
|
+
let mergedProps = $derived(mergeProps(localProps, datePicker.getRootProps()));
|
74
|
+
|
83
75
|
setDatePickerContext(datePicker);
|
84
76
|
setPresenceContext(presence);
|
85
77
|
</script>
|
@@ -87,7 +79,7 @@
|
|
87
79
|
{#if asChild}
|
88
80
|
{@render asChild(mergedProps, datePicker)}
|
89
81
|
{:else}
|
90
|
-
<div {...mergedProps}>
|
82
|
+
<div bind:this={e} {...mergedProps}>
|
91
83
|
{@render children?.(datePicker)}
|
92
84
|
</div>
|
93
85
|
{/if}
|
@@ -12,7 +12,12 @@
|
|
12
12
|
getDatePickerTablePropsContext,
|
13
13
|
} from './context.svelte.js';
|
14
14
|
|
15
|
-
let {
|
15
|
+
let {
|
16
|
+
this: e,
|
17
|
+
asChild,
|
18
|
+
children,
|
19
|
+
...props
|
20
|
+
}: DatePickerTableBodyProps = $props();
|
16
21
|
|
17
22
|
let datePicker = getDatePickerContext();
|
18
23
|
let tableProps = getDatePickerTablePropsContext();
|
@@ -25,7 +30,7 @@
|
|
25
30
|
{#if asChild}
|
26
31
|
{@render asChild(mergedProps)}
|
27
32
|
{:else}
|
28
|
-
<tbody {...mergedProps}>
|
33
|
+
<tbody bind:this={e} {...mergedProps}>
|
29
34
|
{@render children?.()}
|
30
35
|
</tbody>
|
31
36
|
{/if}
|
@@ -12,7 +12,12 @@
|
|
12
12
|
getDatePickerTablePropsContext,
|
13
13
|
} from './context.svelte.js';
|
14
14
|
|
15
|
-
let {
|
15
|
+
let {
|
16
|
+
this: e,
|
17
|
+
asChild,
|
18
|
+
children,
|
19
|
+
...props
|
20
|
+
}: DatePickerTableHeadProps = $props();
|
16
21
|
|
17
22
|
let datePicker = getDatePickerContext();
|
18
23
|
let tableProps = getDatePickerTablePropsContext();
|
@@ -25,7 +30,7 @@
|
|
25
30
|
{#if asChild}
|
26
31
|
{@render asChild(mergedProps)}
|
27
32
|
{:else}
|
28
|
-
<thead {...mergedProps}>
|
33
|
+
<thead bind:this={e} {...mergedProps}>
|
29
34
|
{@render children?.()}
|
30
35
|
</thead>
|
31
36
|
{/if}
|